I had always seen questions that are closed as duplicates with the following message at the top of the post:  This question already has an answer here: [link to existing question] X answers  Here is a sample screenshot of a recently closed question:  Today I noticed that some duplicate questions have a different message:  Possible duplicate: [link to existing question]  Here is a sample screenshot of such a question:  It seems odd that different questions should have different duplicate messages. The first message is more direct; it tells you that the question already has an answer, and it tells you how many answers there are. The second message is possibly more accurate, as it is possible for a question to be closed as duplicate even if it does not have an answer elsewhere. Additionally, the wording "possible duplicate" seems more in line with the reality that questions can be reopened at any time. But regardless of which message is better, it should surely be standardized across all questions. More importantly, the second message suffers from a serious flaw. It is apparently not an external note pinned to the question, but merely added into the text of the post:  As such, anyone with edit privileges can simply remove it, with the result that there is no longer a duplicate message displayed:  This seems to be a problem. Additionally, when it comes to the question containing the first message, I have the ability (due to a gold tag badge) to edit the duplicate list:  But when it comes to the question with the second message, that option no longer exists (even though it's the same tag where I have the badge):  Given that this is the first time I've seen this, I'm not sure if it's always been this way or if something recently happened to change something. I will note that all the questions that I've seen the second version of the message on are old questions. Either way, this seems like something that should be fixed.  (As noted in the comments, , so I changed this from  to .)

before :         after :        This is confusing. This is two different designs for the same thing. To sum the changes up:   Different banner on top of the post. Before: banner pushed as part of post contents and can be edited.   Worth to mention the "marked as duplicate by ..." message in the bottom is the same.  Suggested fix: simply run a script that within the same transaction Reopens all questions closed as duplicates before Feb 7th 2013 then closes them again as exact duplicates. If possible prevent this from bumping the question i.e. don't update the "last activity" time stamp.


I want to redirect output of a tar command to one file say, out.log and errors during execution should be redirected to another file for example, error.log.   How can I achieve this?

I often see tutorials online that connect various commands with different symbols. For example:  command1 |  command2 command1 &  command2 command1 || command2     command1 && command2   Others seem to be connecting commands to files:  command1  > file1 command1  >> file1   What are these things? What are they called? What do they do? Are there more of them?    .


Hi, I need an user group to only be allowed to use gthumb and read from only one folder/partition which I will decide.  Please can you let me know how to do this?

I need a simple and easy way to jail users in their home directories in Oneiric. Do you have a simple configuration for jailing users, with full help, or some good web links?  I would be offering an online free public server with 10 to 20 GB free space. I don't know how many users. I want to give them SSH and SFTP so that they can connect through FileZilla.


I create A java file Name Attend.java  public class Attend { String attend_id,studname,owner;  public String getOwner() {     return owner; }  public void setOwner(String owner) {     this.owner = owner;  }public String getStudname() {     return Studname; }  public void setStudname(String Studname) {     this.Studname = Studname; }  public String getAttend_id() {     return attend_id; }  public void setAttend_id(String attend_id) {     this.attend_id = attend_id; }} ;   other file DAO file AttendDao.java  , public class AttendDao {public static List<Attend> getAllRecords(){     List<Attend> list=new ArrayList<Attend>();         //Attend u1=null;      try{         Connection con=DbConnector.getConnection();         PreparedStatement ps=con.prepareStatement("select attend_id,studname,owner from attend_detail where owner=?");         Attend u1 = null;         //System.out.println(u1.getOwner());         ps.setString(1,u1.getOwner());         ResultSet rs=ps.executeQuery();         while(rs.next()){             Attend u=new Attend();             u.setAttend_id(rs.getString("attend_id"));             u.setStudname(rs.getString("studname"));             u.setOwner(rs.getString("owner"));             list.add(u);         }     }catch(SQLException e1){System.out.println("sql error:"+e1);     }catch(Exception e){System.out.println(e);}     return list;     //} }},   i want to get this owner value from database if owner="xyz@xyz.com" then it will display only that rows data  This is my database and its value.. database name Attend_detail.  attend_id  studname     owner  ATN001     abcd       xyz@xyz.com ATN002     efgh       null          this my jsp view.jsp   <%@page import="com.attend.detail.AttendDao,com.attend.detail.Attend,java.util.*"%> <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>

Attendance List
  <%  List<Attend> list=AttendDao.getAllRecords();  request.setAttribute("list",list);  %>

           Attend_id	           Student_id	            owner

     <c:forEach items="${list}" var="u">
           ${u.getAttend_id()}	           ${u.getStudentid()}	          ${u.getOwner()}
        </c:forEach>

   it shows NullpointerException  how to solve it.. please rply.

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


Unable to install Ubuntu 14.04 alongside Windows XP because the "Install Now" button (and the Back button) are disabled on the Partitioning screen.  Any suggestions on how to proceed are appreciated.

The "Back" and "Install Now" buttons are grayed out in the 14.04 installer. How do I restore them?


I'm trying to set a Date (highestNumber) with a long (highest) but it throws a NullPointer exception, I can't figure out why.  public static Date highestNumber = null;  long highest = 0;     for (int x = 0;x <numberofData - 2;x++){         long first = Array.Stop.get(x).getTime();         long next = Array.Stop.get(x+1).getTime();         if(x==0){highest = first;}         if (highest < next){             highest = next;         }     }     highestNumber.setTime(highest);   Exception is being thrown on the setTime() line. highest gets a valid value of 1523328768914   Error: java.lang.NullPointerException: Attempt to invoke virtual method 'void java.util.Date.setTime(long)' on a null object reference  Edit: I don't feel like this is a duplicate of "What is a nullpointerexception since i didn't realise a Date had to be initiaized. I thought it was just a variable like a string.


In the , it says normal types have no effectiveness against ghost types. Since Haunter is a primarily Ghost type (aside from being Poison type), it should receive no damage from Normal types right?  I'm asking this because I thought I was sneaky with my 450 CP Haunter battling a 1400 CP Snorlax... It did not turn out so well...  Follow-up question, if the answer is that "because Haunter is also a Poison type", are there any Pokémon in Go that are immune to any other pokémon's attacks?

Only generation-I Pokemon are available, however it seems that the types which did not exist in Gen-I do exist in Pokemon Go (e.g. Dark type moves).   So I'm wondering which type chart the game is using for move effectiveness.    According to Bulbapedia, in Gen I Bug attacks were super-effective against Poison, but in Gen II-V Bug attacks are not very effective against Poison. What is it in Pokemon Go? Similarly, in Gen II-V Ghost attacks are not very effective against Steel, but in Gen VI Ghost attacks are normal effective against Steel. Does anyone have a Magnemite, is it Steel type? Does it resist Ghost? Does STAB exist in this game?


I have new macbook pro and I format whole drive to one partition and restore my backup (time machine).  Now I have no "Recovery HD" partition. How can i create it?

I bought a second hand Macbook Pro which came with OSX Lion installed, when I wanted to clean it I found out that it had no Recovery HD partition. I confirmed this through the Disk Utility (enabled debug menu, showing every partition).  I am able to boot using Apple's Internet Recovery feature, but since Lion wasn't bought on my Apple ID, its only giving me the option to buy OSX Mountain Lion. Can I use that to completely reinstall my Macbook and create a proper Recovery HD partition, and then can I simply use Timemachine afterwards to recover my data?  Any hints or tips for this process would be highly appreciated.


"We all know running has health benefits" isn't how I would write the sentence (I'd probably say "We all know that running offers many health benefits"), but is it formally incorrect?  I want to say that you really need the "that" after "we all know," but I'm not sure.

He will understand that I was not joking.   He will understand I was not joking.  Which of the sentences is correct? Are there any specific rules about the use of "that" in the sentences I reported as example?


Recently, while chatting with a friend via text, my friend asked me, "Can you ask them tomorrow?"  I responded with:     I will when I go.   It occurred to me when writing this response that it would be really weird sounding to say:     I'll when I go.   However, it would have been normal sounding if I had said:     I'll ask when I go.   Is there any formal reason why the version without "ask" following "I'll" is incorrect? Or maybe it is correct, but merely awkward?   I suppose there may not be any explanation deeper than, "it just sounds weird," but any informative insights into why, ideally with examples of similar cases, would stand as an answer.

I heard this lyric in a song the other day and it just sounded so wrong that I assumed it must be incorrect grammar, but I can't find any specific prohibition that applies.     That's what it's.    That rolls off your tongue with the grace of a moose in a tutu, but I can't figure out why.  There is clearly no problem with ending other sentences with a contraction. These sound fine.     I thought I could, but I can't.   Stop touching that, it will fall off if you don't.   You say that the sky is green, but it isn't.   Also, it sounds just fine if you remove the contraction:     That's what it is.   So what's up with this construction? Should it be avoided?


In normal linear regression, defining $Y_i = X_i\beta+\epsilon_i,$ with $\epsilon_i$ c.i.i.d. $\mathcal{N}(0,\sigma^2)$, is equivalent to say $Y|X \sim \mathcal{N}_n(X\beta,\sigma^2I_n)$. The second seems a better choice for generalization, for instance in GLM's, where the distribution of $Y|X$ usually belongs to the exponential family. In practice, if there are no "physical constraints" in choosing the statistical model, how does one model the stochastic part of a GLM? I used to think that you could do it by looking at the histogram of $Y$, but this question  made me realize I was completely wrong!

I have fish density data that I am trying to compare between several different collection techniques, the data has lots of zeros, and the histogram looks vaugley appropriate for a poisson distribution except that, as densities, it is not integer data. I am relatively new to GLMs and have spent the last several days looking online for how to tell which distribution to use but have failed utterly in finding any resources that help make this decision. A sample histogram of the data looks like the following:   I have no idea how to go about deciding on the appropriate family to use for the GLM. If anyone has any advice or could give me a resource I should check out, that would be fantastic.


I am trying to save the output from the LINQ query to the generic list which is type of a Class which contains the get and set, but it shows me the error that can't convert implicitly, i searched many solution for it but not helpful for me. Following is the LINQ query and the generic Class definition.  LINQ Query:  var posts = from p in db.Posts join c in db.Comments   on p.Post_ID equals c.postID    into PostComments   select new { PostId = p.Post_ID, Post = p.Post1, cmtcount = PostComments.Count() }   CLass:  public class Class1 {     public int Post_ID { get; set; }         public string Post1 { get; set; }     public int cmtcount { get; set; }       }   I'm simply doing the conversion like posts.ToList();

I got an anonymous type inside a List anBook:  var anBook=new []{  new {Code=10, Book ="Harry Potter"}, new {Code=11, Book="James Bond"} };   Is to possible to convert it to a List with the following definition of clearBook:  public class ClearBook {   int Code;   string Book;  }   by using direct conversion, i.e., without looping through anBook?


For reasons outside the scope of this question I have two jars.  Jar1: project/project.jar which is a spring-boot jar and contains class A.  Jar2: mock/project-mock.jar which is a jar that contains class B.  project-mock.jar does not have a main class and is not meant to be ran standalone.  Class B extends Class A.  I'm trying to run these jars together using the following command  java -cp project/project.jar:mock/project-mock.jar org.springframework.boot.loader.JarLauncher    When I run the above command the spring boot jar starts initializing but then I get an exception:   problem with class file or dependent class; nested exception is java.lang.NoClassDefFoundError: com/project/Class A   Is this an issue relating to how I am trying to start the application or how do I fix the classpath issue to correctly set the jars on the same classpath?  Edit: I don't believe this is the same issue as  since adding the two jars on the command line would put them on the same classpath, i thought. If that is not the case then that would be the issue but I would like to know why then so I can fix it. Edit on the Edit: Looking further into the exception thrown there is a nested exception java.lang.ClassNotFoundException which brings me back to the classpath issue rather than the class not correctly loading the first time.

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


I have lots of .txt  files (point cloud) which are raw data acquired from from LIDAR and containing XYZI values. I want to convert them to shapefile.  Is there a way I can do that instead of adding XY data first and exporting to shapefile one after the other?

I tried to define my coordinate system on creating the shapefile but when I zoom to layer I don't see my features and ArcGIS crashes. I know it's not in the coordinate system I defined for it but it shows the coordinate under properties but doesn't reflect when I zoom to layer. Here is my python code:  import arcpy  newfcName ="newfc.shp"   outpath = r"C:/FLOOD/IKEJA AND KOSOFE"  # Declaration arcpy.env.overwriteOutput=True  arcpy.env.workspace= outpath  # Create new Shapefile and add FIELDS newfc = arcpy.CreateFeatureclass_management(outpath, newfcName, "Point") # get the coordinate system by describing a feature class dsc = arcpy.Describe("newfc.shp" )  coord_sys = dsc.spatialReference  try:        # run the tool    arcpy.DefineProjection_management(newfcName , coord_sys)     # print messages when the tool runs successfully    print(arcpy.GetMessages(0))  except arcpy.ExecuteError:    print(arcpy.GetMessages(2))  except Exception as ex:    print(ex.args[0])  arcpy.AddField_management(newfc, "X", "STRING", field_length = 50) arcpy.AddField_management(newfc, "Y", "STRING", field_length = 50) arcpy.AddField_management(newfc, "Z", "STRING", field_length = 50) arcpy.AddField_management(newfc, "I", "FLOAT", field_length = 50)  # Reference Cursors cursor=arcpy.da.InsertCursor(newfc, ["X", "Y", "Z", "I"])  # Read File  a = open("C:/FLOOD/IKEJA AND KOSOFE/DEM/532722.txt","r")  inputF = a.readlines()  for line in inputF:     xCoordinate, yCoordinate, zValue, iValue = line.split(" ")      newRow = (str(xCoordinate), str(yCoordinate), str(zValue), float(iValue))      cursor.insertRow(newRow)  a.close()


I simplified my code for better understanding. here is the problem :  case 1:  # -*- coding: utf-8 -*-  text = "چرا کار نمیکنی؟" # also using u"...." results the same print(text)   output:  UnicodeEncodeError: 'charmap' codec can't encode characters in position 0-2: character maps to <undefined>   case 2:  text = "چرا کار نمیکنی؟".encode("utf-8")  print(text)   there is no output.   3:  import sys  text = "چرا کار نمیکنی؟".encode("utf-8") sys.stdout.buffer.write(text)   output:  چرا کار نمیکنی؟     I know that case 3 works somehow , but I want to use other functions like print() , write(str()) , ....  I also read the documentation of python 3 regarding to Unicode .  and also read dozens of Q&A in stackoverflow.  and  is a long article explaining the problem and answer for python 2.X  the simple question is:  how to print non-ASCII characters like Farsi or Arabic using python print() function?  update 1 : as it is suggested from many guys that the problem is concerned with the terminal I tested the case :  case 4 :  text = "چرا کار نمیکنی؟" .encode("utf-8")# also using u"...." results the same print(text)   terminal :  python persian_encoding.py > test.txt   test.txt :  b'\xda\x86\xd8\xb1\xd8\xa7 \xda\xa9\xd8\xa7\xd8\xb1 \xd9\x86\xd9\x85\xdb\x8c\xda\xa9\xd9\x86\xdb\x8c\xd8\x9f'   very important update:  after a while playing around with this issue, finally I found another workaround to make cmd.exe do the job (without needing third party softwares like ConEmu or ...):  a little explanation first:  our main problem does not concern Python. it's a problem with the Command Prompt character set in Windows(for complete explanation check out Arman's Answer) so ... if you change the character set of Windows Command Prompt to UTF-8 instead of default ascii , then the Command Prompt will be able to interact with UTF-8 characters(like Farsi or Arabic) this solution does not guarantee good representation of characters(as they will be printed out like little squares), but it's a good solution if you want to have file I/O in python with UTF-8 characters.  Steps:  before starting python from command line , type:  chcp 65001   now run your python code as always.  python testcode.py   result in case 1:   ?????? ??? ??????   it runs without errors.  screenshot:    for more information about how to set 65001 as the default character set check  out.

When I try to print a Unicode string in a Windows console, I get an error . UnicodeEncodeError: 'charmap' codec can't encode character .... I assume this is because the Windows console does not accept Unicode-only characters. What's the best way around this? Is there any way I can make Python automatically print a ? instead of failing in this situation? Edit:  I'm using Python 2.5.  Note: @LasseV.Karlsen answer with the checkmark is sort of outdated (from 2008). Please use the solutions/answers/suggestions below with care!!  is more relevant as of today (6 Jan 2016).


Let $X$ and $Y$ be independent $\exp(1)$- distributed random variables. Find the conditional distribution of $X$ given that $X+Y = c$. ($c$ is a positive constant).   I have tried to solve this using convolution technique and change of variables but get stuck at the integration part. I think I'm over complicating this so I would love to see different approaches solving this. Thanks.

Let $X$ and $Y$ be independent $Exp(1)$-distributed random variables. Find the conditional distribution of $X$ given that $X + Y = c$ ($c$ is a positive constant).  this is my idea:  $$f_{X \mid X+Y}(x\mid c) = \frac{f_{X,X+Y}(x,c)}{f_{X+Y}(c) } $$  if this is the right definition then i might calculate the righthand side to obtain the distribution but Iam unsure


Permanent global application menu somehow? Doesn’t have to be Unity, but should work in 12.04 or newer.  Permanent means: one which doesn’t disappear after two seconds. Global application menu means: the application menu is not in it’s window but in a (top-)panel. – Eats less space if a permanent panel exists and is not full yet (so the menu fits in there).

I was recently playing around with Ubuntu 11.04 (Ah, the last version of Ubuntu to use Gnome 2 in the background) and I noticed this:      As you can see its the "Unity" "File Edit View..." menu in GNOME 2. It's available as an indicator addon in 11.04.  Now what I'm asking is how do I get this integrated menu to the top bar in GNOME Fallback/Classic in Ubuntu 12.04? As it will be a great addition on my custom distro. Its also good for saving space on smaller screens like on my netbook. (Wink wink, nudge nudge. Hmm, maybe thats why he wants the answer)   It would also be nicer if it hid when the mouse isn't over it, but that's just a perk, but it would be nice ;)  I can confirm that the answer by tabakisp works! Thank you tabakisp!


The campaign was intended to be difficult.  We knew and accepted that up front, and it sounded like a fun challenge.  But we never knew until we were already a fair ways into it how much of the difficulty would not be of the "challenge" variety but rather the "railroading" variety, inventing fake difficulty with no basis just to punish the PCs.  For example, at one point the party came across an abandoned wagon.  There were a few subtle things in the description that were just "off" enough about it that the first thought that crossed my character's mind was "plague."  He treated the entire encounter with excessive paranoia, staying well back, not touching anything, using Mage Hand to move items, etc.  Not all of the party members were as cautious, though, moving in freely to help whoever might be inside.  And... well... it turned out that there was in fact a serious disease that had claimed the owner.  Several party members had to make CON saves against disease because they touched things, including my character.  I pointed out that my character had never actually touched anything, and had only moved things from a distance with Mage Hand, and showed the DM the relevant point in the logs.  (It's a game being played online.)  The DM, faced with the proof, acknowledged that I was right... but my character still had to do the CON save and ended up contracting the disease, necessitating some long and pointless backtracking to find an NPC who could help get us cured.  And that kind of thing is distressingly common.  At one point, when the party came up with a highly unconventional approach to the broad quest we were facing, we decided to put the plan into motion.  The very next scene, we ran across a group of Duergar "traders" who were Most Definitely Not Evil Slavers, No Siree.  Everyone in the party recognized this for exactly what it was and wanted no part of it, so we did everything within our power to get them to go away and leave us alone: lying about where we were headed and rolling quite well on the deception check, (truthfully) pointing out how we were being hunted by a very powerful and scary dragon that they shouldn't want anything to do with, sneaking off after they left to gather the rest of their group, having the Ranger's flying pet fly overwatch as we fled, etc.  But none of that careful, detailed work meant anything; back on the rails you go!  The Duergar snuck up on us in the middle of the night, having tracked us perfectly (despite covering our tracks) without ever being seen (despite the eye in the sky) and ambushed our party (despite us setting a watch) to capture everyone.  How do you deal with DMs that completely discount players' agency every time it threatens to make the story diverge from whatever the pre-planned idea is of how the campaign should play out?  It kind of feels like, if our ability to foresee certain problems is meaningless because any attempt to avert them is nullified, then what's the point of being able to make choices in the first place?  Anyone have any techniques that would help to salvage a game like this?

I was wondering if anyone could give me some advice or anything on a GM situation.   My current GM is running a campaign and it is very video game/anime like. It started out super fun and the deeper we get the less fun I have. The reason is, it feels like GM is telling us a story but we cannot interact or change anything during his, "cut scenes". No matter what any player does he just says, "No it didn't work," or, "Yeah you do that. See if you roll a 20." We also can't damage any boss he has until we reach the point in the story that he has planned, so our interactions we have with villains don't matter.  I feel like he is making us sit there and listen to an anime he has come up with in his head. Since the players can't change or react to the key situations. I find my self sitting there thinking, why would I react, it doesn't matter.  It's not just me either. Another player feels the same way. I am going to talk to my other fellow players soon about it and see how they feel.  Side note: the GM as a person is very defensive and I am afraid to confront him about it because I know he will throw a fit. We have also caught him straight lying about abilities and stats on his own PC in other campaigns, and he doesn't take to kindly when you call him out.  He is new to GMing. This is only the second game I have played with him as a GM. The first one had one session the he just never wrote more for.  Is there anything I can do to maybe get him to more lenient with his story? I really enjoy the story for the most part and if he would just let our characters do things and give us a chance at stopping his villians or letting us change the story based on our actions, everything would be cool.


I'm trying to follow the instructions on  to add annotations to a PDF document in Evince. However, I don't see separate "List" and "Add" tabs as in the documentation. This is what I see:    Do I perhaps have to install a plug-in to enable annotation?

I have a vmware setup with Xubuntu and I have found myself not going back to OSX. Now I'm trying to learn a bit more about the ecosystem and how to set things that accommodate my needs. In my working environment, I read pdfs' often. I'm utilizing Document Viewer to read. However, I don't see the Add Annotations feature in the app. How I can enable this feature?


I had posted a question here when my schengen visa was rejected once. I applied the second time and I got the visa. So I decided to post my experience and also share what I did right the second time to get my Schengen visa. I hope it helps some one who will be in my situation. If there is any other ways to share my experience kindly let me know. Cheers.

I applied for a schengen visa, to attend some interviews in Germany. I am a doctor, and a recruiting agency is arranging all the interviews. They provided me with an invitation letter, stating they would pay for my accommodation and expenses in Germany.  I submitted this letter with other documents; I had hotel confirmation from booked.com.  My visa was rejected due to three reasons.   Justification for the purpose and conditions of the intended stay was not provided The information submitted regarding the justification for the purpose and conditions of the intended stay was not reliable No proof of accommodation   What does it mean - was my invitation letter not good, or was it that the company just stated they would pay for accommodation and did not actually provide the proof of accommodation?  I can get a detailed invitation letter stating where my interviews will be, and also proof of accommodation. Is there anything else required? I'm sure no company that invites a person would give me their bank statement.  Any input will help me a lot.


I want to order by post to check for the existence of a meta key ('featured') and include those posts first and as a secondary option I want to sort by post_date, similar to 'sticky' posts on a discussion forum.  I first tried this straightforward method ...  $args = array(   'store'         => 'walmart',   'post_type'     => 'post',   'showposts'     => '-1',   'orderby'       => 'featured date',   'order'         => 'desc',   'meta_key'      => 'featured' );   It almost worked but instead of having the 'featured' posts at the top of the order it had them at the bottom, and no simple toggling could get it to work.  I then researched some more and came across this method , but I can't get this to work for the life of me. I would prefer to use this filter as I have one other customization that this might help with, can anybody show me what I'm doing wrong.   Here's what I have now ...  add_filter('posts_orderby','customorderby'); $args = array(     'store'         => 'walmart',     'post_type'     => 'post',     'showposts'     => '-1',     'meta_key'      => 'featured',     'meta_query'    => array(         array(             'key' => 'featured'         )     ) );  $query = new WP_Query($args); remove_filter('posts_orderby','customorderby');   and in my functions.php  add_filter('posts_orderby','customorderby'); function customorderby($arg) {     global $wpdb;      $arg = 'mt1.meta_value DESC, post_date+0 DESC';     return $arg; }

i try to run a custom post type query to match following criteria: sort movies first by year in descending order, after that ("inside" the year order) by title alphabetically.      desired output: movie title A, 2006 movie title Z, 2006 ... movie title A, 1996 movie title Z, 1996    i use the following code:  $wp_query = new WP_Query(); $wp_query->query( array( 'post_type' => 'movies',                        'distribution' => 'companyA',                        'meta_key' => 'year',                       'orderby' => 'meta_value_num title',                         'order' => 'DESC',                        'posts_per_page' => -1,                        'post_status' => 'publish', ));   i tried several things but i can only get this "inverse" result:  movie title A, 1996 movie title Z, 1996 ... movie title A, 2006 movie title Z, 2006      if i change DESC, ASC it only changes the title sorting. but i need to apply it to the year and not to the title.  is it the right way to use two orderby values? or do i have to use a meta_query or custom SQL ?   thx in advance!  Here is the resulting SQL Query from $GLOBALS['wp_query']->request    SELECT wp_posts.* FROM   wp_posts        INNER JOIN wp_term_relationships                ON ( wp_posts.id = wp_term_relationships.object_id )        INNER JOIN wp_postmeta                ON ( wp_posts.id = wp_postmeta.post_id ) WHERE  1 = 1        AND ( wp_term_relationships.term_taxonomy_id IN ( 24 ) )        AND wp_posts.post_type = 'movies'        AND ( wp_posts.post_status = 'publish' )        AND ( wp_postmeta.meta_key = 'year' ) GROUP  BY wp_posts.id ORDER  BY wp_postmeta.meta_value + 0,           wp_posts.post_title DESC


In an article class:   How to make the chapter heading centered? The command \section or \chapter is come with the error "undefined control sequence" when it is compiled.   How to overcome this?

I am trying to center my chapters/sections/subsections.  I have used the following:  \newcommand{\cchapter}[1]{\chapter[#1]{\centering #1}} \newcommand{\ssection}[1]{\section[#1]{\centering #1}} \newcommand{\ssubsection}[1]{\subsection[#1]{\centering #1}}   This seems to work for chapter, but not for section and subsection. What is wrong?


So i am playing in a high level game where i am playing a 13th level Storm sorcerer multiclassed with a 2nd level Tempest Cleric. At the end of the last session we levelled up and I am taking a 14th level in Sorcerer.   Now, as a 16th level caster, I have 8th level spell slots. Under “Spells known of 1st level and higher” it says that           ... you learn more sorcerer spells of your choice. Each of these spells must be of a level for which you have spell slots      Does this mean that i can choose 8th level sorcerer spells? Has this been clarified anywhere?   I am aware of the discussions around wizards copying in higher level spells but the argument there seems to resolve around the fact that they could probably copy them into their book, but would be unable to prepare them. Sorcerers do not prepare spells and so it is a different question.  Many thanks guys!

The "Your Spellbook" sidebar for the wizard includes the following line:  Copying a Spell into the Book. When you find a wizard spell of 1st level or higher, you can add it to your spellbook if it is of a level for which you have spell slots and if you can spare the time to decipher and copy it.  Does this mean that a Wizard 1/Cleric 19 can copy any wizard spell they find into their spellbook? Is there anything preventing them from casting these spells?


I want to paint the fassade of my building with some leaves here and there. The file I'm using as a brush is a png with transparent parts. It's working fine in texture paint mode, but in renders it always displays the alpha as black. I created the picture which is painted on with transparent background though, so I'm not seeing why this is happening. Any clues?

I'm designing this animal-type creature, and want to add a transparent .png image to its face with the face features (object has a subsurf). On the left is the image with the features, on the right is the part of the object where I want it to be.    I tried to import the image as a plane, but matching the shape of the plane with the face didn't work, and the lines of the face left shadows on the head, and could be seen as a different object from some angles (although it's the closest I've gotten yet). It looked like this:    So , I tried selecting the faces of the head that the features should go over, and create a new material for it. Unfortunately, since the .png is transparent, the result produced was this:    (where it's impossible to tell the transparency from a black background default color, and where I wouldn't know where to start to adjust size and position).  I also tried UV mapping, but then the whole object became black with the features repeated all over.   Is it something I have to go into Nodes for? I'm kind of stuck here. Creating a new material and applying it is simple, but applying a material that is an image is a bit more complex it seems... Ideally, I would reproduce the same technique for the adhesive bandage on its arm (seen on the right of image 1).


I am facing a problem related to the shell change, when I change the shell from bash to csh and type the comand echo $SHELL, I expect the shell to print:  /bin/csh   But instead it prints:  /bin/bash   What is the reason for that? How do I print the path to the currently running shell instead?

I read that terminal is nothing but shell, and Unix provides different flavors of shells:   Bourne shell (sh) C shell (csh) TC shell (tcsh) Korn shell (ksh) Bourne Again shell (bash)   Questions:   When I open a terminal window, which shell is opened by default? How do I check how many shells are installed? How do I change the shell used from my account?


From Core Java for the Impatient:      a variable can only hold a reference to an object ...   and I try it out like this and it seems to work:   public class Person{     public String m_name;     public int m_age;      Person (final String name, final int age){         m_name = name;         m_age = age;     }      public static void main(String[] args){         Person a = new Person("John", 45);         Person b = a;          System.out.printf("Person a is %s, aged %d\n", a.m_name, a.m_age);         System.out.printf("Person b is %s, aged %d\n", b.m_name, b.m_age);          a.m_name = "Bob";          System.out.printf("Person a is now %s, aged %d\n", a.m_name, a.m_age);         System.out.printf("Person b is now %s, aged %d\n", b.m_name, b.m_age);     } } /*Output: Person a is John, aged 45 Person b is John, aged 45 Person a is now Bob, aged 45 Person b is now Bob, aged 45*/   However, it doesn't seem to work for just String objects or primitive types (though, admittedly latter are not objects in the sense of being class instances):   String aS = "John"; String bS = aS; aS = "Bob"; System.out.println(aS + '\n' + bS);  /*Output: Bob John*/  int a = 10; int b = a;  a = 5;  System.out.printf("a = %d, b = %d", a, b);  /*Output: a = 5, b = 10*/   I'm wondering why this dichotomy? Thanks   ps: Person class attributes public to avoid mutators, accessors for this simple example

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


Light coming from galaxies that are going away from us is redshifted. Since the energy of a photon is purely dependent on its frequency one may conclude that the energy of these photons decreases. The same light coming from the same star in the same galaxy will be seen to a planet in that galaxy as it "actually" is. So dependent on the relative motion the energy will be seen, differently. How does this not conflict with the conservation of energy? Or the "total" energy of the universe depend on the frame?  I was thinking that the light coming to us is located on a larger range since its period is larger. So the light carries the same energy for both observers. Even if its average energy is smaller total energies are same.  However, I could not convince myself and I think I am making wrong interpretations.

A photon emitted from a receding source (Doppler redshift) has less energy when detected at an observer's location. Please explain the energy loss from the perspective of energy conservation.


I want to have sub-hypotheses so I use following code:      \newtheorem{hyp}{Hypothesis}      \makeatletter     \newcounter{subhyp}      \let\savedc@hyp\c@hyp     \newenvironment{subhyp}     {%     \setcounter{subhyp}{0}%     \stepcounter{hyp}%     \edef\saved@hyp{\thehyp}% Save the current value of hyp     \let\c@hyp\c@subhyp     % Now hyp is subhyp     \renewcommand{\thehyp}{\saved@hyp\alph{hyp}}%     }     {}     \newcommand{\normhyp}{%     \let\c@hyp\savedc@hyp % revert to the old one     \renewcommand\thehyp{\arabic{hyp}}%     }      \makeatother   It works great, however there is no break in the hypothesis numbering across chapters. I want the counter on the hypotheses to restart at the beginning of each new chapter. Can anyone help me modify this to restart the counter?  Here is a MWE:      \documentclass{report}     \usepackage{ntheorem}}     \newtheorem{hyp}{Hypothesis}      \makeatletter     \newcounter{subhyp}      \let\savedc@hyp\c@hyp     \newenvironment{subhyp}     {%     \setcounter{subhyp}{0}%     \stepcounter{hyp}%     \edef\saved@hyp{\thehyp}% Save the current value of hyp     \let\c@hyp\c@subhyp     % Now hyp is subhyp     \renewcommand{\thehyp}{\saved@hyp\alph{hyp}}%     }     {}     \newcommand{\normhyp}{%     \let\c@hyp\savedc@hyp % revert to the old one     \renewcommand\thehyp{\arabic{hyp}}%     }      \makeatother      \begin{document}     \chapter{This is Chapter 1}      \begin{subhyp}     \begin{hyp}     This is hypothesis 1A     \end{hyp}     \begin{hyp}      This is hypothesis 1B     \end{hyp}     \end{subhyp}      \chapter{This is Chapter 2}     \begin{subhyp}     \begin{hyp}     This should be hypothesis 1A     \end{hyp}     \begin{hyp}      This should be hypothesis 1B     \end{hyp}     \end{subhyp}     \end{document}

Some document elements (e.g., figures in the book class) are numbered per chapter (figure 1.1, 1.2, 2.1, ...). How can I achieve continuous numbering (figure 1, 2, 3, ...)?  And vice versa: Some document elements (e.g., figures in the article class) are numbered continuously. How can I achieve per-section numbering?  \documentclass{book}% for "vice versa" variant, replace `book` with `article`  \begin{document}  \chapter{foo}% for "vice versa" variant, replace `\chapter` with `\section`  \begin{figure} \centering \rule{1cm}{1cm}% placeholder for graphic \caption{A figure} \end{figure}  \end{document}   Bonus question: Is it possible to adjust the numbering of the sectioning headings themselves? Can I, e.g., switch from per-chapter to continuous numbering of sections in the book class?


I am dealing with two scenarios: 1) Non-Gaussian data distribution and 2) non-stationary data). First, I am planning to use a variational autoencoder for modeling the probability distribution of the non-Gaussian data distribution in the latent space. (Note, the input of the encoder part will be the non-Gaussian data). Then, I will it to perform some classification tasks. However, is it possible to use the variational autoencoder to deal with non-Gaussian Distribution data? (because the non-Gaussian data is not generated from a Gaussian distribution). Second, I also want to use the variational autoencoder to deal with non-stationary data. Would it be possible to use it with non-stationary data or should I consider other ML techniques.

I am thinking about the  in a variational auto-encoder. I know that it can be used with normal distribution. Can the re-parameterization trick be applied to other distributions like Bernoulli? What are the limitations of its application?


The only  can only be done with a request context:  from flask import request  def shutdown_server():     func = request.environ.get('werkzeug.server.shutdown')     if func is None:         raise RuntimeError('Not running with the Werkzeug Server')     func()  @app.route('/shutdown', methods=['POST']) def shutdown():     shutdown_server()     return 'Server shutting down...'   This leads to the very ugly and hacky scenario where you pretty much have to script a request from the server to itself if you want it to shut down from another part of the process (ie: not in response to a request and you have no request context). This also exposes the kill endpoint to the whole network (even if it's unimportant / non-prod, still stupid if not necessary).  Is there a clean way of stopping Flask without a request context, ie: the mythological app.stop()?  For more context, and without diving into the esoteric reasons that have me running Flask in a thread (makes sense for my program, I promise):  class WebServer:     def __init__(self):         self.app = Flask('test')         self.thread = threading.Thread(target=self.app.run)          @self.app.route('/')         def index():             return 'Hello World'      def start(self):         self.thread.start()      def stop(self):         # how can I implement this? just getting Flask to end would end the thread!

Is it possible to terminate a running thread without setting/checking any flags/semaphores/etc.?


When I run my program on a freshly installed computer, it tells me that Visual C++ Redistributable Package 2015 (namely, MSVCP140.dll) needs to be installed on the computer in order to run my dynamically linked program.  I understand that static linking would solve the problem - however, that just doubles the size of my executable.  Isn't there a way to suppress visual studio features so the redist package is not necessary and still use the visual studio compiler, as I'm not used to the alternatives like mingw etc.  Or does the redist package actually contain the STL? I can hardly imagine that.

My current preferred C++ environment is the free and largely excellent Microsoft Visual Studio 2005 Express edition. From time to time I have sent release .exe files to other people with pleasing results. However recently I made the disturbing discovery that the pleasing results were based on more luck that I would like. Attempting to run one of these programs on an old (2001 vintage, not scrupulously updated) XP box gave me nothing but a nasty "System cannot run x.exe" (or similar) message.  Some googling revealed that with this toolset, even specifying static linking results in a simple hello-world.exe actually relying on extra .dll files (msvcm80.dll etc.). An incredibly elaborate version scheming system (manifest files anyone?) then will not let the .exe run without exactly the right .dll versions. I don't want or need this stuff, I just want an old fashioned self contained .exe that does nothing but lowest common denominator Win32 operations and runs on any old win32 OS.  Does anyone know if its possible to do what I want to do with my existing toolset ?  Thank you.


Say I have the class:  package school; public class SchClass {     private Student[] students;     private int numStudents = 0;     public SchClass() {      }     public void addStudent(Student s) {         this.students[this.numStudents] = s;         this.amountStudents++;     } }   and I am trying to run this in another class:  import school.SchClass; import school.Student; import school.Tutor; public class JavaTesting {     public static void main(String[] args) {         Student s = new Student();         Tutor t = new Tutor();         SchClass shc = new SchClass();         sch.setTutor(t);         sch.addStudent(s);     } }      When I do this, it reports this NullPointerException:  Exception in thread "main" java.lang.NullPointerException     at school.SchClass.addStudent(SchClass.java:8)     at javatesting.JavaTesting.main(JavaTesting.java:10)   What is wrong? I'm sure I coded this perfect but it still reports an error.

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


When the initial velocity is perpendicular to the magnetic field, the force acting on the charged particle   F = qvBsin(theta)  F = qvBsin(90)  F = qvB  In my textbook, it is given that the force will continually deflect the particle making it move in a circle. It also says that as the magnetic field acts on a particle perpendicular to its velocity, it does not do any work on the particle, it doesn't change the kinetic energy of the speed or the particle.  However, how come that it doesn't change the speed or the kinetic energy? We do have force acting on the particle which means that there will certainly be some accerleration.

The Lorentz force on a charged particle is perpendicular to the particle's velocity and the magnetic field it's moving through. This is obvious from the equation:  $$ \mathbf{F} = q\mathbf{v} \times \mathbf{B} $$  Is there an intuitive explanation for this behavior? Every explanation I've seen simply points at the equation and leaves it at that.  I can accept mathematically why $\mathbf{F}$ will be perpendicular to $\mathbf{v}$ and $\mathbf{B}$ (assuming the equation is correct, which it is of course). But that doesn't help me picture what's fundamentally going on.  Trying to create an analogy with common experiences seems useless; if I were running north through a west-flowing "field" of some sort, I wouldn't expect to suddenly go flying into the sky.  I'm hoping there's a way to visualize the reason for this behavior without a deep understanding of advanced theory. Unfortunately, my searching for an explanation makes it seem like something one just has to accept as bizarre until several more years of study.


I want to end php session , if there is a inactivity of 5mins . The inactivity is that if i dont find any values in the database then the session would end after 5 mins or else there is no problem

I need to keep a session alive for 30 minutes and then destroy it.


So, I keep getting to this screen when I click on anything (picture down below) and I have tried going to settings and change my birthday there, but it's not letting me at all. Please help

I go to change my birthdate on Roblox, but nothing shows up, the dropdowns are just blank with no Month, Day or Year:  It also shows me a pop up asking to put in the Missing Details to improve the experience, but no matter how many times I put in my age it doesn't save and asks it again.


Theorem: T1. If the terms of an absolutely convergent series be rearranged in any order, the new series will converge absolutely and to the same sum as the original series. How can this be independently proved for each $Z$, $R$ & $Q$? That are either positive, negative or positive and negative? I'm currently trying to prove for a series of all terms that are positive. if we take the series: $a_1 + a_2 ... + a_n ... = s$ such that, $a_n$ > 0; let $s_n = a_1 + ... + a_n$ let $\sigma_n = a_{p_1} + ... + a_{p_n} $ be the rearranged series. Although, how to proceed from here?

I just completed the following proof.  Is it valid?   Let $\sum_{k=1}^{\infty} a_k$ be an arbitrary convergent series that also converges absolutely.  Then $\sum_{k=1}^{\infty} a_k \in \mathbb{C}$ and $\sum_{k=1}^{\infty} |a_k| \in \mathbb{R}$. Let $\{b_k\}$ denote a rearrangement of the $\{a_k\}$.  That is, we have that $\{a_k\} = \{b_k\}$ yet $a_i = b_i$ needn't hold. We will first show that $\sum_{k=1}^{\infty} b_k$ converges absolutely (immediately implying it converges non-absolutely).  We will use the Cauchy Criterion on the partial sums of $\sum_{k=1}^{\infty} |b_k|$ to demonstrate this. First let $\epsilon > 0$. Consider that since $\sum_{k=1}^{\infty} |a_k| \in \mathbb{R}$, we have that $\exists N_1 \in \mathbb{N}$ s.t. for all $N_1 < m < n$ we have   $$ \sum_{k=m}^n |a_k| \le \epsilon. $$ Now let $0 < N_2$ be large enough s.t $\{a_1, \ldots , a_{N_1}\} \subseteq \{b_1, \ldots , b_{N_2}\}$.  Let $M > max\{N_1, N_2\}$.  Let $M < m' < n'$.  Then since $\{b_k\} - \{b_1, \ldots , b_{m'}\} \subseteq \{a_{N_1}, a_{N_{1}+1},  a_{N_{1}+2} \ldots\}$, we will have that   $$ \sum_{k=m}^n |a_k| \le \epsilon \implies \sum_{k={m'}}^{n'} |b_k| < \epsilon. $$ Then we have that   $$ \left| \sum_{k={m'}}^{n'} |b_k| \right| = \sum_{k={m'}}^{n'} |b_k| < \epsilon $$  so that since $\epsilon$ was arbitrary, we have obtained that   $$ \left| \sum_{k=1}^n |b_k| - \sum_{k=1}^m |b_k|  \right| = \left| \sum_{k=m}^n |b_k|  \right| \rightarrow 0 $$  so that via the Cauchy Criterion for Convergence  we have that $\sum_{k=1}^{\infty} |b_k|$ converges to some  value in $\mathbb{R}$ as desired. Then it follows that $\sum_{k=1}^{\infty} b_k$ is absolutely convergent (and hence also just convergent).   $\square$


I am writing a quick program to decompose a number into powers of 2. Is this an efficient way to do it:      pows=[]     pos = 0     while n>0:         if n%2==1: pows.append(2**pos)         n/=2         pos+=1   I've written this in Python but I'm also interested in how it's done in C++.  I don't know if this is a "smart" way to do it or if it's considered horribly inefficient.

Building on , I was thinking about sensible, intuitive ways to do that Programming 101 chestnut of displaying integers in base-2 form.  This is the best I came up with, but I'd like to replace it with a better algorithm, or at least one that should have screaming-fast performance.    def num_bin(N, places=8):     def bit_at_p(N, p):         ''' find the bit at place p for number n '''         two_p = 1 << p   # 2 ^ p, using bitshift, will have exactly one                          # bit set, at place p         x = N & two_p    # binary composition, will be one where *both* numbers                          # have a 1 at that bit.  this can only happen                           # at position p.  will yield  two_p if  N has a 1 at                           # bit p         return int(x > 0)      bits =  ( bit_at_p(N,x) for x in xrange(places))     return "".join( (str(x) for x in bits) )      # or, more consisely      # return "".join([str(int((N & 1 << x)>0)) for x in xrange(places)])


I'm working on writing a program that requires two methods based on the user option. When prompted, the user selects whether or not they want to count vowels or words. Once they select their option, I need to print their result, and keep asking for more inputs until they enter "q". One of the methods outputs the number of vowels in a word, and the other puts out the numbers of words in a sentence, but it isn't working. I'm new to programming and have a very basic understanding, so my options for answers are limited. Here's what I have so far:  *I've fixed my = versus == sign issue. The first thing that comes up when I try to compile is incompatible types between char and a java string. I'm not sure how to tell the computer to look for a letter as an option to begin the rest of the program.        import java.util.Scanner;     public class MethodTester     {        public static void main (String[] args)        {     Scanner in = new Scanner (System.in);    System.out.println ("Please enter 'v' to count vowels or 'w' to count words.");    String count=in.nextLine();    char choice = count.charAt(0);    boolean done = false;     while (!done)    {    if (choice == "v")    {         Sytem.out.println("Please enter a single word or press q to quit.");        string str = in.nextLine();         System.out.println(str+" has "+str.countVowels+"Vowels.");        return countVowels;      } else if (str == "q")         {done = true;          }  else if (choice == "w")        { System.out.println("Please enter a sentence or phrase or press q to quit.");          string str = in.nextLine();            System.out.println(str+ " has "+ str.countWords+"words.");          return countWords;            } else if (str == "q")         {done = true;         }         }         System.out.println("You have quit.");   }          public static int countVowels (String str)        {char c=str.charAt(0);    int length = str.length();    int count = 0;    int location = str.charAt(0);     do{        if (c=="a" || c=="e" || c=="i" || c=="o" || c=="u" || c=="A" || c=="E" || c=="I" || c=="O" || c=="U" ){         location++;         count++;         c++;     }}     while(location<length);     return count; } public static int countWords (String str) {     int countWords=0;     boolean word = false;     int endStr = str.length() -1;      for (int i=0; i < str.length(); i++)     {         if (Character.isLetter(str.charAt(i)) && i != endStr)         {             word = true;         }         else if (!Character.isLetter(str.charAt(i)) && word)         {             countWords++;             word = false;         }         else if (Character.isLetter(str.charAt(i)) && i ==endStr)         {             countWords++;         }     }     return countWords; }        }

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


I'm making an animation that effects a class of menu's, It slides the menu in and out the left side of the screen. But because I change the width value for another part of the app, I have to look into the css somehow,  This is what I have in CSS:   width (600px (dependant on device with))    Using Javascript I change:   Width (a relative amount) left (-width)   The left is easy, because I can just do -element.offsetWidth But the width is harder, because I don't know how much it's going to change, and I don't want to hardcode it in either.  Does anyone know a way that lets me look into the elements css, before it's changed? (as it's written in code)  What I've tried so far:   element.offsetWidth (Didn't work because it returns the current width and not the width written in the css) element.style.width (Didn't work because it returns an empty string)        NOTE:    There is a similar question , but the answer gives the current width, and I want the width that's set by the CSS (while loading the document)   Simplified code:

Suppose that I have a <div> that I wish to center in the browser's display (viewport). To do so, I need to calculate the width and height of the <div> element.   What should I use? Please include information on browser compatibility.


Suppose that we are given an exponential distribution model with a pdf $f(x,\theta) = \theta^{-1}\exp(-x/\theta)$ with an iid sample $X_1, ..., X_n$, and we would like to test hypothesis $H_0 : \theta = 1$ and $H_1 : \theta > 1$. We shall investigate the limiting distribution of the likelihood test statistic $2n(l_n (\hat\theta) - l_n (1))$ where $l_n(\theta)$ is the log-likelihood function $\sum \log f(x,\theta$) and $\hat \theta$ is the MLE of $\theta$ in the parameter space. We shall investigate the asymptotic behavior of the test statistic.  Note that the parameter space is not the whole real line, so it does not create an open neighborhood around $H_0: \theta = 1$). Here is what I have discovered so far: we know that the MLE of exponential distribution is $\overline X_n$, the sample mean if we are allowed to take the whole parameter space. Using a similar argument, if the sample mean is greater than one, the same argument works. However, if it is smaller than or equal to one, the MLE is 1 (we can show it using a monotonicity argument). Hence, the test statistic becomes  $\begin{cases} 2n(\ln \overline X_n - (\overline X_n - 1)) && \text{if $\overline X_n > 1$} \\ 0 && \text{if $\overline X_n \leq 1$} \end{cases}$  we can use then a taylor expansion for the first case to show that it is indeed approximately equal to $n(\overline X_n - 1)^2$ that has a $\chi^2$-distribution asymptotically. However, how can we incorporate the case where $\overline X_n \leq 1$? If $H_1$ were $\theta \neq 1$ it would have been safe and sound. I guess the test becomes $\sum \overline X_n > k$ for some $k$, due to the zero part for the second case?


I'm writing a program that needs to receive an encrypted message from the server and decrypt it on the client.   The problem in this case, is to prevent the client from being able to re-transmit messages encrypted with same key. RSA is designed to use the public key for encryption and private key for decryption. So if a client can decrypt a message (using private key), the client is also able to encrypt another message using it.  I know that it is possible to sign a hashed message using private key and then verify it using public key. But my scenario is not a digital signature problem. I just need a "read only" encryption.   Is it possible to do this using RSA or any other asymmetric encryption algorithm?  UPDATE:  I know that RSA cannot encrypt data longer than it's key size and this is the reason for hashing data to a fixed length data. My supplemental question is: Can we convert a long message to a few small and fixed length blocks and use the same algorithm used in signing and verification to do encryption and decryption?

When using the RSA cryptosystem, does it still work if you instead encrypt with the private key and decrypt with the public key? What about in the case of using RSA for sender authentication?


Let $R$ be an integral domain. Is the $R$-Module $\DeclareMathOperator{\Quot}{Quot}\Quot(R)/R$ injective? ($\Quot R$ denotes the fraction field of $R$.)  By Baer's criterion it is sufficient to show that for any ideal $J \trianglelefteq R$, all $R$-linear maps $J \to \Quot(R)$ are of the form $a \mapsto c a$ for some $c \in R$. The statement is true if $R$ is a PID because $\Quot(R)/R$ is a divisible $R$-Module.

I am doing this exercise:  Let $R = \mathbb{Z}[t]$ and let $K$ be its fraction field. Show that the $R$ module $K/R$ is divisible but not injective.  I have done the divisible part, but I am stuck on the injective part, any hint ?


I'm working on a classification task, where the target can be one of many (30k+) categories, and I know some of these categories are much closer to each other than the others (but I don't know exactly which ones).  It seems the cross entropy loss may not be the best choice because it treats every category independently.  For instance say there're five almost indistinguishable categories, and my prediction is 0.2 for each and zero for others, which I think is a very good prediction, but it still gets a large cross entropy loss. I'm thinking maybe I can modify the loss to something like "if the predicted probability is above 0.2 for the ground truth category, it causes no loss", will that work?  What should be a proper loss in my case? or what else can I do (to impose the assumption that some categories are similar)?    Update One thing I thought of is to just set the loss of top K predicted categories to zero. I think it has similar effect as early stopping, since they both don't encourage the model to be too confident of their predictions (overfit) as opposed to a cross entropy loss.  As January has suggested, I think it makes sense to apply a hierarchical clustering method first, then the "degree of difference" between categories can be weighted according to the hierarchy.    Update Not the same as  The linked question is about using categorical attributes as inputs, not targets.

What techniques are available for collapsing (or pooling) many categories to a few, for the purpose of using them as an input (predictor) in a statistical model?    Consider a variable like  (discipline chosen by an undergraduate student). It is unordered and categorical, but it can potentially have dozens of distinct levels. Let's say I want to use major as a predictor in a regression model.  Using these levels as-is for modeling leads to all sorts of issues because there are just so many. A lot of statistical precision would be thrown away to use them, and the results are hard to interpret. We're rarely interested in specific majors -- we're much more likely to be interested in broad categories (subgroups) of majors. But it isn't always clear how to divide up the levels into such higher-level categories, or even how many higher-level categories to use.  For typical data I would be happy to use factor analysis, matrix factorization, or a discrete latent modeling technique. But majors are mutually exclusive categories, so I'm hesitant to exploit their covariance for anything.  Furthermore I don't care about the major categories on their own. I care about producing higher-level categories that are coherent with respect to my regression outcome. In the binary outcome case, that suggests to me something like linear discriminant analysis (LDA) to generate higher-level categories that maximize discriminative performance. But LDA is a limited technique and that feels like dirty data dredging to me. Moreover any continuous solution will be hard to interpret.  Meanwhile something based on covariances, like multiple correspondence analysis (MCA), seems suspect to me in this case because of the inherent dependence among mutually exclusive dummy variables -- they're better suited for studying multiple categorical variables, rather than multiple categories of the same variable.  edit: to be clear, this is about collapsing categories (not selecting them), and the categories are predictors or independent variables. In hindsight, this problem seems like an appropriate time to "regularize 'em all and let God sort 'em out". Glad to see this question is interesting to so many people!


I am new in Blender dev. I am trying to create an add-on, and I need to store an array of integers. The problem is that I don't know the size of this array. I used for testing the IntVectorProperty: bpy.props.IntVectorProperty(     name='Name',     description='Desc',     default=[0,0],     subtype='NONE',     size=2 )  But the size is a required field. Do you have any suggestions?

I am trying to create a script that will allow me to generate a list and store it in the blend file. The list starts out blank and then strings get added to the list, resulting in: ["test1","test2","test3"] I create a PropertyGroup Class for the enum, define a new scene property as a CollectionProperty type with access to that enum Class, before appending a new item into the enum: import bpy  class item_set(bpy.types.PropertyGroup):     myItems = []     enums = bpy.props.EnumProperty(name="My Items", items=myItems) bpy.utils.register_class(item_set)  bpy.types.Scene.myItemSet = bpy.props.CollectionProperty(type=item_set)      newItem = bpy.context.scene.myItemSet.add() newItem.myItems.append("test")    I need to be able to add items to the list, save the blend file, re-open the file, run the script again and retrieve the list from the scene. However, the  states:  One thing to keep in mind is that after saving and reloading your blend-file, your new property will have disappeared...    ...To make the values you assigned in a previous session available again, you need to redefine the property. So after reopening the blend-file you need to rerun: bpy.types.Object.myProperty = bpy.props.StringProperty()   I can do the appending into and retrieval of the property values absolutely fine upon an initial run, but as the documentation states, the property is unavailable when trying to view it's contents on a reload of the file (after having run the script, saved and re-opened the file), but I am unsure how to redefine it without clearing all it's values. If I redefined the scene property, it would presumably also need the enum Class to be available, which would currently set myItems back to [] (empty). Do I need to change the way I am initially setting the items in the class or am I on entirely the wrong track with all of this? All I need to do is store a list in the blend file, so if there is a better way please let me know. Thanks. (I would hope, eventually, to be able to store sub lists [["a","b"],["c","d"],["e","f"]], I'm just trying to get normal lists to work first.)


I simplified the expression into $$\sqrt{8-3\cdot \sqrt{7}}$$ but my tutor said it wasn't the answer he was looking for. Can someone help me?

I have recently read some passage about nested radicals, I'm deeply impressed by them. Simple nested radicals $\sqrt{2+\sqrt{2}}$,$\sqrt{3-2\sqrt{2}}$ which the later can be denested into $1-\sqrt{2}$. This may be able to see through easily, but how can we denest such a complicated one $\sqrt{61-24\sqrt{5}}(=4-3\sqrt{5})$? And Is there any ways to judge if a radical in $\sqrt{a+b\sqrt{c}}$ form can be denested?  Mr. Srinivasa Ramanujan even suggested some CRAZY nested radicals such as: $$\sqrt[3]{\sqrt{2}-1},\sqrt{\sqrt[3]{28}-\sqrt[3]{27}},\sqrt{\sqrt[3]{5}-\sqrt[3]{4}}, \sqrt[3]{\cos{\frac{2\pi}{7}}}+\sqrt[3]{\cos{\frac{4\pi}{7}}}+\sqrt[3]{\cos{\frac{8\pi}{7}}},\sqrt[6]{7\sqrt[3]{20}-19},...$$ Amazing, these all can be denested. I believe there must be some strategies to denest them, but I don't know how.  I'm a just a beginner, can anyone give me some ideas? Thank you.


I have a 64gb usb stick and it's now corrupting files that I place on it. On my previous computer I had Gparted (PCLinux) and that did the trick for a bit. Now I have Ubuntu I can't seem to find Gparted.  Is there an addon store for Ubuntu where I can find Gparted? Or is the another way to fix my usb stick?  Thanks.

How do I find gparted in Ubuntu, searching from the launcher sends me to Wiki or shopping?


I'm currently self studying Analysis I by Tao. He's sprinkled a little set theory into this book, and I'm really struggling to apply it. After painstakingly proving Zorn's Lemma via another lemma, we are given this very much non-obvious exercise:     Let $A$ and $B$ be two non-empty sets such that $A$ does not have lesser or equal cardinality to $B$. Using the principle of transfinite indcuction, prove that $B$ has lesser or equal cardinality to $A$. (Hint: for every subset $X \subseteq B$, let $P(X)$ denote the property that there exists an injective map from $X$ to $A$. This exercise (combined with Exercise 8.3.3 [Schroeder-Bernstein]) shows that cardinality of any two sets is comparable, as long as one assumes the axiom of choice.   His definition of transfinite induction is as follows:     We give some applications of Zorn's lemma (also called the principle of transfinite induction) in the exercises below.   That's it. I feel like I've been thrown not even into the deep end, but pretty much into the ocean. How could I even begin to solve that using Zorn's lemma? I don't see any partial order that could in any way be useful to solve this, and I don't see any way to maximise. Am I missing something obvious, or is this just really hard?

For any pair of sets $A$ and $B$, we can define $A\le B$ iff there exists injection $f\colon A\rightarrow B$. I am trying prove that  $$(A\le B)\vee (B\le A).$$  I have tried assuming  $\neg (A\le B)$, then proving $B\le A$ by constructing the required injection, but I haven't been able to make any progress. Any hints, etc. would be appreciated.  EDIT  Assuming  $\neg (A\le B)$, can you prove there exists a surjection $f: A\rightarrow B$? Then it would be easy, by applying AC, to construct an injection $g: B\rightarrow A$


Why did Eukaryotes evolve to have linear DNA and not circular like Prokaryotes? What are the pros and/or cons?

The DNA copying enzymes have a hard time working to the end of a chromosome. For circular chromosomes this is not a problem, since there is not a sharp 'end'. However, for a linear chromosome, without extra mechanisms in place, a bit of DNA is lost off the end of the chromosome after each replication. Because of this, eukaryotes have a  to cap off their chromosomes. In most cells of a mutli-cellular organism, this telomere is slowly worn away after each reproduction leading to . Cells that need to reproduce indefinitely such as germ and stem cells have to invest in extra mechanisms to replenish the telomere. For multi-cellular eukaryotes I can see how this might be usefull (for instance as a cancer counter mechanism). However, multi-cellular organisms evolved from single-cell eukaryotes. I cannot see a reason for wanting apoptosis in a single-cell organism. However, single cell eukaryotes (say yeast) still have linear chromosomes with telomere caps. What advantage did linear chromosomes provide single-cell eukaryotes to offset the extra investment in reparing the telomere?  Related questions


First of all: No I didn't get the phone off of someone else and no I can't get the password by going to iforgot.apple.com (because the email address used for the account has been deleted, so emailing doesn't work)  The iPhone is currently in the state where it acts like you just got it (because I tried to reset the phone by typing the wrong passcode 10 times), but after going through a few steps it will ask for the iCloud username and password. I don't care about any of the data on it, I just need to delete everything off it, so I can actually do something with it.

I bought a used iPhone 4.  The previous owner re-set the phone, but did not remove the device from their iCloud.  It is asking me for their iCloud information when I try to set-up the phone.  I don't have contact with the previous owner anymore.  Is there a way to remove the device from their iCloud so I can use a new one?


I'm trying to match everything after the first occurrence of a table element and before closing a body tag in an html document.  This is the regex that I tried with:  (?:<table>(.|\s)*<\/table>)((.|\s)*)(?:<\/body>)   I got no matches for this regex.  I'm using JavaScript.    When I switch to PHP mode on regex101.com, I notice that this regex leads to catastrophic backtracking.  I've isolated the section that breaks it, and apparently it's this:  <table>(.|\s)*<\/table>   What's wrong with this expression?

For example, this regex  (.*)<FooBar>   will match:  abcde<FooBar>   But how do I get it to match across multiple lines?  abcde fghij<FooBar>


Most of the places, examples for merging of cells in tables are given. But, I could not find a merging of cells in complicated fashion as shown below. This question may summarize all the possible methods of merging and may serve as the reference for all future questions on merging of cells. Experts can add much more complications if required.


How do I prove this statement?  As per my understanding, the number of ways to select $m$ items from a set of $n$ items, with repetition, is simply $n^m$, as each round of selection still deals with $n$ items.

The number of different ways to choose $k$ out of $n$ unique items:   Without repetition and without order-significance: $\binom{n}{k}=\frac{n!}{k!(n-k)!}$ Without repetition and with order-significance: $\binom{n}{k}\times k!=\frac{n!}{(n-k)!}$ With repetition and with order-significance: $n^k$ With repetition and without order-significance: $?$   Thank you!


I'm trying to define a toString helper method that should work either by using the << operator if available, or using a range-loop to print containers. I thought that C++11 and template magic would just sort of figure out what to use, but instead I'm getting the error "Redefinition of 'toString'".      /** to string via o<<value operations */     template<class T>     inline static std::string toString(const T& value) {         return (std::stringstream() << value).str();     }      /** to string via for each and tostring */     template<class T>     inline static std::string toString(const T& container) {         std::stringstream stream;         std::string delim = "";         stream << "{";         for (const auto& element : container) {             stream << delim << toString(element);             delim = ",";         }         stream << "}";         return stream.str();     }   I guess the definitions have to be separated somehow. It's possible to specialize the second template to vector, which works, but then it only works on vectors. So I tried to find a way to do it with traits and enable_if, which firstly I couldn't figure out, and secondly there doesn't seem to be a trait for 'supports range loop' or 'supports << operator'.

Is it possible to write a template that changes behavior depending on if a certain member function is defined on a class?  Here's a simple example of what I would want to write:  template<class T> std::string optionalToString(T* obj) {     if (FUNCTION_EXISTS(T->toString))         return obj->toString();     else         return "toString not defined"; }   So, if class T has toString() defined, then it uses it; otherwise, it doesn't. The magical part that I don't know how to do is the "FUNCTION_EXISTS" part.


With a cell tower in sight about a 3/4 of a mile away how accurate is the share my location if the phone is in a Walmart

How accurate is the GPS on the iPhone's Find My iPhone app?  I used Find My iPhone app to track a friend. The first 3 stops were dead on but when it refreshed it showed them to be several streets over from actual location. What could cause that?


Supposed you have a fixed amount of money to commit every month to debt repayment... well above all minimum payment requirements.  All other quirks and conditions being equal.  The only differences are the interest rates and the balances.  That said, Ive frequently seen it written that the best way to pay off your debts is to pay minimums on all but the highest interest rate loan, where you dump any surplus money. But I am wondering if this is necessarily the optimum way of doing it?!?! Doesnt it make more sense to pay off whichever loan is accruing the most in interest every month in terms of dollar amount? Not percentage.  i.e. the product between balance and interest rate.  Or am I wrong about this?

I have this hypothetical situation on my mind and I am not sure which is the best solution. Given:  Loan 1: $340,000 at an interest rate of 1.69% per year Loan 2: $40,000 at an interest rate of  3.6% per year  I have a fixed amount available to pay these, let's say, $1,500 monthly and I can decide how much I want to pay each one (I could pay 750/750, 1000/500, 1500/0 for instance). I do not have a time limit to pay these. My question: What is the optimal way to pay these? What I always heard is: pay the debt that has the highest interest first. This would lead me to a solution: pay loan 2 as fast as possible. But the total amount of interest on 340,000 is higher (in this case, $5780 annually) than the amount over $40,000 (1440, in this case), so, to me, it feels I should pay the Loan 1 first. I would love to run some simulations, but I have no idea how to calculate these things (I don't even have a clue on how to research it). ps: this is really a hypothetical situation, I am not getting such loans without being able to calculate it, don't worry ;)


I'm using JUnit 4.11.  Eclipse Version: Luna Service Release 2 (4.4.2)  I need do the exception test. The code maybe like this:  // src code public void myMethod throws MyException {     ...     throw new MyException(msg);     ... }  // test code @Test (expected = MyException.class) public void testMyMethod() {     try {         myMethod();         fail();     } catch (MyException e) {         assertEquals(expectedStr, e.getMessage());     } }   But the test always fail, where am i wrong?

How can I use JUnit4 idiomatically to test that some code throws an exception?  While I can certainly do something like this:  @Test public void testFooThrowsIndexOutOfBoundsException() {   boolean thrown = false;    try {     foo.doStuff();   } catch (IndexOutOfBoundsException e) {     thrown = true;   }    assertTrue(thrown); }   I recall that there is an annotation or an Assert.xyz or something that is far less kludgy and far more in-the-spirit of JUnit for these sorts of situations.


In The Search for Spock, Spock is resurrected as a consequence of super blood the Genesis effect.  A new organism, genetical identically to the deceased Spock, is created from the DNA in his corpse, which was left on the planet Genesis at the end of The Wrath of Khan.  On Genesis, the new Spock ages more rapidly than normal, going from infancy to adulthood in the space of a day or two.  By the time he is rescued from Genesis by Kirk and friends, he seems to be at roughly the same age as when he died (albeit somewhat conveniently).  My question:  Why did Spock stop aging so rapidly when he was removed from Genesis?  (If the answer is that one must be present on Genesis to experience the effect, then why did it not not affect David Marcus or Saavik?)  Also, when Spock was removed from Genesis, was he younger, the same age, or older than when he died?

In the movie The Search for Spock it is mentioned that Spock's rapid aging and the Genesis planet's turbulent nature are side effects of protomatter being used in the creation of the Genesis device. Considering the planet's end result (destruction) why didn't Spock's new body suffer a similar fate of a rapid death?


Which Ubuntu between these three is the best to be used for an embedded system? What are the differences between these three?  Minimal Ubuntu - Not the minimal installation, the cloud release, with the KVM and LXD. Ubuntu server - Is there a minimal version for this?  Ubuntu core - lightweight similar to minimal with snap but what are the exact differences with minimal?

I just want to know, what is the difference between ubuntu Minimal, Desktop & Server Editions? How they differ? is it by performance? If yes which one is recommended for a normal user and which one is recommended for a advanced user ?


I'll be traveling to Germany this May and my planes would arrive at 4 May 20.30 at Frankfurt Airport but the Schengen visa that I received is valid only at 5 May.  Is it possible to enter if it's only a few hours before the day change? Or do I have to wait until day change in the transit area?  Another thing, would the airline rejected me from boarding the plane?

(First off I do realize that someone has already asked this question but there didn't seem to be a conclusive answer.)  My flight reaches Zurich on July 4th at 7:25 pm, and the Schengen visa's validity begins from July 5th. I hold an Indian passport (residing in SingaporE), I checked that I don't need a transit visa for Switzerland, so I think I may be able to wait at the airport till 12am... I have called my country's airport-who told me to call Immigration- who told me to call the airline-who told me to call Immigration again... They all have agreed that it will "probably" not be a problem but as a first time solo traveler, would love to hear someone's experience on this matter.  *EDIT: So as expected, I was able to stay in the transit hotel overnight and exit immigration the next morning. The only problem I had was while boarding the connecting flight from Muscat, where I showed them my emails from the embassy and the airport/transit hotel and they agreed to let me board.  I chose an earlier flight because I was saving (overall) a pretty penny - Yes it was incredibly risky and no, I don't recommend it.  If you do find yourself in my situation though, be sure to confirm your plan with all parties - embassies, airlines, hotel etc. And keep ALL email printouts as proof to show in case of a problem.


Looking for a specific word when I want to be given to drink.  If I am hungry I say feed me. If I am thirsty I say ____ me.   I know a person who is given such is said to be fed and watered. But I don't think one can say water me.

I can say "I feed someone". Am I forced to say "I give someone a drink", or is there a single word for this (as in "I [verb] someone")?  Unfortunately my thesaurus can't really help me.


I have a mixture of knob-and-tube and NM-B. If I'm extending from knob and tube, but I have a (different) an NM-B circuit nearby, is it technically allowable to ground via ground wire in the other cable? If not, what is the right way to do it?  (Please don't tell me to replace all the knob and tube -- it's not going to happen.)

I've got a circuit in the basement carrying a handful of outlets.  This circuit has no ground wire.  I want to add a couple of outlets and want them to be grounded.  I may even want gfci outlets on them in the future.  I have no reasonable way of getting a ground wire to the panel but I do have easy access to another circuit that does have a ground wire.  Is it acceptable to borrow or share a ground wire between circuits?  If not, why not?  Both circuits are 20A with 12 AWG wire.


A week ago I bought Lenovo E531 with Windows 8, but I don't like this operating system. I used to use Win XP. I downloaded Ubuntu 12.10, followed all the instruction how to create an bootable USB stick, but my laptop can't boot Ubuntu yet. Can You help me please!

I'm absolutely new to Linux. I would like to know how to install Ubuntu alongside the pre-installed Windows 8+ OS.  Should I do it with Wubi, or through the Live USB/DVD?  What steps do I need to take to correctly install Ubuntu?


I have two content types, the first is Homepage and the second is SLider. The Slider content type has multiple fields like title, ink, and image. In the homepage content type, I have an entity reference field referring to the slider content type with multiple selections. I've created a template in my custom theme as node--home-page.html and want to get the sliders fields values, All is okay with me except the image. I cannot get the image URL.  My code:-  {% for slide in node.field_hoeme_slideshows %}         {{ kint(slide.entity.field_home_slide_cta.uri) }} {# This is working #}         {{ kint(slide.entity.title.value) }} {# This is working #}         {{ kint(slide.entity.field_home_slide_snippet.value) }} {# This is working #}         {{ kint(slide.entity.field_home_slide_image) }} {# ****** This is not working *****#} {% endfor %}

I want to render an image as a background image via an inline style in twig. I created a field called bg_image and attached it to the standard plain page.  After fiddling around for hours I was able to get the Image URL in node.html.twig  {{ file_url(node.field_bg_image.0.entity.uri.value) }}   but I could not get it to work inside field--field-bg_image.html.twig  Can I get the node from there anyhow, so I can then get the image?  How can I get the image URL to use as inline style? I thought maybe I can pass a variable from field--field-bg_image.html.twig to image.html.twig and then just render  {{ uri }}   instead of  <img{{ attributes.addClass(classes) }} />   but I could not get it to pass the variable there unless I use includes  {% include 'image.html.twig' with {'image': image, 'isFromField': isFromField} %}   (isFromField is true, when it comes from the field--field-bg_image.html.twig) But that didn't work either. The Image was never rendered that way.  Would be very glad if you can help - my php knowledge is very basic. Thanks


Suppose I have   $p, q$ as variables and lets say  $p$ is false and $q$ is false, then why and how is $p \implies q$ true?

I am studying entailment in classical first-order logic.  The Truth Table we have been presented with for the statement $(p \Rightarrow q)\;$ (a.k.a. '$p$ implies $q$') is: $$\begin{array}{|c|c|c|} \hline p&q&p\Rightarrow q\\ \hline T&T&T\\ T&F&F\\ F&T&T\\ F&F&T\\\hline \end{array}$$  I 'get' lines 1, 2, and 3, but I do not understand line 4.      Why is the statement $(p \Rightarrow q)$ True if both p and q are False?  We have also been told that $(p \Rightarrow q)$ is logically equivalent to $(~p || q)$ (that is $\lnot p \lor q$).  Stemming from my lack of understanding of line 4 of the Truth Table, I do not understand why this equivalence is accurate.       Administrative note. You may experience being directed here even though your question was actually about line 3 of the truth table instead. In that case, see the companion question  And even if your original worry was about line 4, it might be useful to skim the other question anyway; many of the answers to either question attempt to explain both lines.


I have seen multiple answers on the web, but I can't get my mind around why division by zero outputs an error and not zero. Can anyone explain this in laymen's terms?

We add negative numbers and zero to natural sequence to make it closed under subtraction, the same thing happens with division (rational numbers) and root of -1 (complex numbers).  Why this trick isn't performed with division by zero?


Our company acquired a new domain name a few years ago and have been forwarding (a significant amount of) traffic from our old domain, which no longer hosts content. Is there any reason to continue paying for an SSL certificate installed at the old domain?

We currently have a website set to redirect to a new address (our client changed domain names, but wants the old domain to send people to the new site) in IIS 8.5 using permanant redirects found in the 'HTTP Redirect' feature for the site.  The SSL cert has come up for renewal for the old domain, and there is an open question in our tech department as to whether or not it needs to be renewed.  With the HTTP Redirect set up in IIS, does the site need an SSL cert?  Or will a visitor be redirected before such things are checked?


I just upgraded my Kubuntu to 17.04 from 16.10 - following .  But during the upgrade stage it was interrupted - my machine hung so I had to restart it.  So I missed the step of Remove obsolete packages.  After logging in, from my terminal:  $ lsb_release -a Distributor ID: Ubuntu Description:    Ubuntu 17.04 Release:        17.04 Codename:       zesty   I have it upgraded but how can I remove obsolete packages then?  Edit:  I did this:  $ sudo apt-get autoremove   But is it the right way doing it?

Sometimes, when I upgrade a system via do-release-upgrade, the update process fails and the script tells me to finish the process manually via dpkg --configure -a. This is a not serious problem - after manually solving the dependencies problem and the finishing upgrade process all works well.  But the do-release-upgrade script has a cleanup process after finishing the upgrade:  Remove obsolete packages?   XXX packages are going to be removed.   Continue [yN]  Details [d]y   which removes some obsolete packages from old version of system.  Seems that this process doesn't execute when the automatic upgrade fails and I finish upgrade manually, so obsolete packages from old version remain installed in the system.  How I can run the "Remove obsolete packages" process manually after finishing the upgrade by hand?


I have PES 2012 installed on my HP (compaq) presario CQ61 notebook, but each time I try to open it it will give me a Warning :Your computer does not meet the Minimum System Requirements to run this software.As a result, you may experience errors during operation.Your Video Card does not meet the required specifications.(GPU:VRAM 128MB)  What could be the problem?

I bought a Dell N5110 laptop and installed . The Nvidia graphics card in the laptop has 1 GB of RAM, but when I try to run the game, a message appears that says there is only 128 MB of graphics memory.   Here is the message:     Warning : Your computer does not meet the Minimum System Requirements to run this software. As a result, you may experience errors during operation. Your Video Card does not meet the required specifications. (GPU:VRAM 128MB)   What could the problem be?


My teacher said that a rotational degree of freedom for a molecule in a gas can be neglected if the associated moment of inertia is very small, because the associated frequency of rotation will be very high.  Could somebody explain this to me ?

I was reading about the equipartition theorem and I got the following quotations from my books:  A diatomic molecule like oxygen can rotate about two different axes. But rotation about the axis down the length of the molecule doesn't count. - Daniel V. Schröder's Thermal Physics. A diatomic molecule can rotate like a top only about axes perpendicular to the line connecting the atoms but not about that line itself. - Resnick, Halliday, Walker s' Fundamentals of Physics.  Why is it so? Doesn't the rotation take place that way?


I am trying to show a image from mysql in a jtextpane but doesn't work,the problem appears when I try to turn the inputstream into BufferedImage, could you help me?  private void initialize() {     frame = new JFrame();     frame.setBounds(100, 100, 508, 300);     frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);     frame.getContentPane().setLayout(null);      JTextPane textPane = new JTextPane();     textPane.setEditable(false);     textPane.setBounds(55, 40, 370, 192);     frame.getContentPane().add(textPane);      try{         Statement a = (Statement) con.createStatement();         ResultSet b = a.executeQuery("Select imagen from chat");         InputStream i = null;         ImageIcon ii = null;         if (b.next()) {             i = b.getBinaryStream("imagen");             BufferedImage bi = ImageIO.read(i);             ii = new ImageIcon(bi);             textPane.insertIcon(ii);         }     } catch ( SQLException | IOException e) {          // TODO Auto-generated catch block          e.printStackTrace();      }   }   the console said...  java.lang.NullPointerException at javax.swing.ImageIcon.<init>(Unknown Source) at imagen.initialize(imagen.java:75)   I can't find the solution

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


for a project I need to get a mean each time, this mean I then use it to compare it to a distribution under the null hypothesis H0. However sometimes some values (few) are much larger than all the other values, so if I use a basic arithmetic mean these values will greatly impact the final mean. Here is an example  Here if I do an arithmetic mean I get about 90, while in reality we can see that the vast majority of values on the axis are around 50. Do you have an idea of an average that would be used in this kind of case?

If you look at       Or this Wikipedia page      Clearly  seems to be the statistic of choice when it comes to ages.  I am not able to explain to myself why  would be a worse statistic. Why is it so?  Originally posted  because I did not know this site existed.


In the 5th book, Voldemort creates a big flame that acted like a snake. In Crimes of Grindelwald, Grindelwald used Protego Diabolica to create those monster creatures nearly destroying Paris. Is that the same spell Crabbe used?

In Crimes of Grindlewald, Grindelwald uses a powerful blue flame that takes on the shape of monsters. Was this Fiendfyre?


Over , it's a duplicate, so it's not accepting answers, but this locked sign:  disagrees.  Seems like a bug that it wouldn't recognize a closed post.  Can we fix that? If this needs different tags, or is not correct in any way, please let me know.

When a question has a "comments-only" lock, the following notice is displayed on top of the question:  Locked for X days. Comments on this question have been disabled, but it is still accepting new answers and other interactions.  However, I noticed that if the question is closed (even before the lock), the same notice is used:  ..which could be confusing, especially for new users. Proposed change to the notice on closed questions:  Locked for X days. Comments on this question have been disabled, but it is still accepting [votes and] other interactions.  Or, as others have suggested, the additional "but it is still accepting [...]" part can simply be removed as it hardly provides any new information.


I am reading about generalized binomial series in Concrete Mathematics by Knuth,and FEW documents exist on the Internet(including wikipedia).What should I do to find more resources?If anyone could help,I would really appreciate it.

I was reading Concrete Mathematics by Knuth et al. and on p. 200, it references the generalized binomial series $\mathcal B_t(z)$ and the generalized exponential series $\mathcal E_t(z)$, defined as $$\mathcal B_t(z)=\sum_{k\ge0}(tk)^{\underline{k-1}}\frac{z^k}{k!}\quad\text{and}\quad\mathcal E_t(z)=\sum_{k\ge0}(tk+1)^{k-1}\frac{z^k}{k!},$$ where $x^{\underline k}$ denotes the falling factorial. I was interested in the generalized binomial series because it satisfied the identity $$\frac{\mathcal B_t(z)^r}{1-t+t\mathcal B_t(z)^{-1}}=\sum_{k\ge0}\binom{tk+r}{k}z^k.$$ I've been trying to find a way to compute the sum $\sum_{n\le k\le m}\binom{tk+r}{k}$, so this seemed related. It seems that $\mathcal E_1(z)$ is also somewhat related to the Lambert $W$ function, though I might be wrong. Searching them up online didn't seem to get anywhere, and I just want to find more sources where I can learn about these functions. If anyone can find some resources, I'd appreciate it!


I have nikon D3400 and an extra sigma lens 70-300mm DL Macro Super. They are not compatible because the lens does not have a built in af motor and d3400 also does not have af motor in it. Is there any extension or adapter that would make these 2 compatible? THANKS

I have a Nikon D3200, which doesn't have an autofocus motor. Therefore, I'm mostly deterred by lenses that don't have focus motors in them. But the ones that do have it are much more expensive.  Take the Nikon 70-300 for example:  AF Zoom-Nikkor 70-300mm f/4-5.6G: $172.95 AF-S VR Zoom-Nikkor 70-300mm f/4.5-5.6G IF-ED: $589.95   So is it possible to have an autofocus motor as a separate attachment to the camera? This would go between the camera and the lens, like an extender. I think it should be doable in principle, but not sure if anyone makes them..


hello i have such output from php   ????????? ??, 29/06/2014 - 17:50 !username ???????????? ????????:      --?????? ? ????????????? ??????????--     ??????????   i try echo utf8_decode($text);, echo iconv('ASCII', 'UTF-8//IGNORE', $text); SHOW GLOBAL VARIABLES LIKE 'char%'; +--------------------------+----------------------------+ | Variable_name            | Value                      | +--------------------------+----------------------------+ | character_set_client     | utf8                       | | character_set_connection | utf8                       | | character_set_database   | utf8                       | | character_set_filesystem | binary                     | | character_set_results    | utf8                       | | character_set_server     | utf8                       | | character_set_system     | utf8                       | | character_sets_dir       | /usr/share/mysql/charsets/ | +--------------------------+----------------------------+   can some one help me with my problem. Thank you.

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


If $f$ is a continuous mapping from $\mathbb C$ to $\mathbb C$ such that $f$ is analytic except $[-1,1]$ then $f$ is entire function   I want to prove this important theorem. Is there anyone who is going to help me with this? How can I use the fact analytic except $[-1,1]$?

Let $\Omega$ be a domain in $\mathbb C$, and let $\mathscr X$ be some class of functions from $\Omega$ to $\mathbb C$. A set $E\subset \Omega$ is called removable for holomorphic functions of class $\mathscr X$ if the following holds: every function $f\in\mathscr X$ that is holomorphic on $\Omega\setminus E$ is actually holomorphic on $\Omega$, possibly, after being redefined on $E$.   (An example of the above: $E$ is a line interval, $\mathscr X$ consists of continuous functions. In this case $E$ is removable, which is shown in the answer.)  It is clear that the larger $\mathscr X$ is, the smaller is the class of removable sets. In the extreme case, if $\mathscr X$ contains all functions $\Omega\to\mathbb C$, there are no nonempty removable sets. Indeed, if $a\in E$, then $f(z)=\frac{1}{z-a}$ (arbitrarily defined at $z=a$) is holomorphic on $\Omega\setminus E$ but has no holomorphic extension to $\Omega$.   The problem of describing removable sets is nontrivial in many classes $\mathscr X$ such as    $L^{\infty}(\Omega)$, bounded functions  $C(\Omega)$, continuous functions $C^{\alpha}(\Omega)$, Hölder continuous functions $\mathrm{Lip}(\Omega)$, Lipschitz functions      Which sets are removable for holomorphic functions in these classes?