I'm writing an article and I need to put a figure on the top right but only on the first page.  Also on the top left I need to place the type of article  for Example        Scientific Paper (left header).............................Figure (right header)                                Title of the Article                              Author 1, Author 2, Author 3                         Affiliation1, Affiliation2, Affiliation3,                  Other Abstract                          Abstract                Some text                               Some text                 Some text                               Some text                 Some text                               Some text                 Some text                               Some text    I try to put "Scientific Paper" using fancyhdr but it only shows up from the second page onwards.  the code I've worked with so far is:  \documentclass[12pt,twoside,titlepage]{ingenius} \usepackage{blindtext} \usepackage[spanish]{babel} \usepackage{multicol} \usepackage{booktabs} \usepackage{subfig} \usepackage{marvosym} \usepackage{authblk} \usepackage{blindtext} \usepackage{url} \usepackage{caption} \captionsetup{font=small} \captionsetup[figure]{labelfont=bf}%,textfont=it} \captionsetup[table]{labelfont=bf}%,textfont=it} \usepackage{fancyhdr} \pagestyle{fancy} \fancyhf{} \fancyhead[LO]{}  \fancyhead[RE]{Journal Name} \fancyhead[LE,RO]{{ \thepage }} \fancyhead[LO]{{Author 1 / Title of the Article}}  \renewcommand{\headrulewidth}{0.5pt} \usepackage{amsmath} \date{} \title{  {\textsc {Title of the Article}}}  \author[1,*]{Author 1} \author[2]{Author 2} \author[1]{Author 3} \affil[1]{\it Department of Mechanical Engineering} \affil[2]{\it Department of Electrical Engineering}  \begin{document} \maketitle \let\oldthefootnote\thefootnote \renewcommand{\thefootnote}{\fnsymbol{footnote}} \footnotetext[1]{Autor para correspondencia. Email:  \url{apsarmientoc@gmail.com} } \let\thefootnote\oldthefootnote  \renewcommand{\tablename}{Table} \renewcommand{\figurename}{Figure} \renewcommand{\refname}{References}  \vspace{-.7cm} \noindent  \begin{center} {\bf Received:} 18 -- May -- 2012;  \hspace{0.25cm} {\bf Approved:} 20 -- May -- 2012 \end{center}  \begin{multicols}{2} \noindent {\bf \large  Abstract} \vspace{0.5cm} \blindtext \palabrasclave{keyword 1, keyword 2, etc} \vfill \columnbreak  \noindent {\bf \large Other Abstract} \vspace{0.5cm} \blindtext \keywords{keyword 1, keyword 2, etc} \end{multicols} \twocolumn \section{Introduction} \blindtext \blindtext \blindtext \section{Conclusions} \blindtext \blindtext \blindtext \section{Conclusions} \blindtext \blindtext \blindtext \end{document}   The code of the class to use is  \NeedsTeXFormat{LaTeX2e} \ProvidesClass{ingenius}[2011/09/13]  \LoadClass{article}     \RequirePackage[latin9]{inputenc} \RequirePackage[T1]{fontenc} \RequirePackage[english,spanish,es-nolayout]{babel} %\RequirePackage[font={small},tablename=Tabla,labelfont= {bf,small},labelsep=period,justification=centerlast]{caption} \RequirePackage{graphicx} \RequirePackage{setspace} \RequirePackage{lmodern} \RequirePackage[obeyspaces,spaces]{url} \urlstyle{same} \RequirePackage[papersize= {21cm,28cm},twoside,top=2cm,bottom=1.5cm,left=1.2cm,right=1.2cm,  headheight=1.8cm,headsep=.35cm,footskip=0.85cm]{geometry}   \RequirePackage[colorlinks,linkcolor=black,urlcolor=black,   citecolor=black,breaklinks=true,% bookmarks=true,pdfstartview=XYZ]{hyperref}  \newcommand{\keywords}[1]{\vspace{\baselineskip}\parindent  0pt\textit{\textbf{Keywords}}: #1} \newcommand{\palabrasclave}[1]{\vspace{\baselineskip}\parindent  0pt\textbf{\textit{Palabras clave}}: #1}  \newcommand{\tituloingles}[1]% {\newcommand\@tituloingles{#1}}   Thanks for your help

I'm using the package fancyhdr to format my footers and headers, with my name in the header and a n of m pages format for the footer. Like so:  \pagestyle{fancy} \fancyhf{} % clear all header and footer fields \fancyhead[C]{Name} \fancyfoot[C]{\footnotesize Page \thepage\ of \pageref{LastPage}}   By default, the fancy page style only affects the pages after the first page. I know I can set the first page to the fancy page style using \thispagestyle, but I only want the first page to use the footer, not the header. Is there a way to create a custom style that just the first page will use?


I would like to know about QGIS plugins from a user point of view, because some plugin lack some user case, and one doesn't know what to do with it. I guess a lot of great plugin are under-used because people don't know what it does.  Could you describe a plugin you like, what it's supposed to do, and specifically what you use it for and how you use it ? The best would be an answer = a plugin !   My question is similar to , but QGIS has evolved since and many features have been implemented and some plugin are depreciated, while great plugins appear every day.  I hope my question is not too broad. Any answer on any plugin can be useful in my opinion, even if the plugin is depreciated some day. I'll probably answer to my own question for some plugins I like and use a lot too.

What QGIS plugins do you consider to be essential - vector, raster, geoprocessing plugins?


There are 2 files, that are almost similar. Say, for example, only 2 lines in one file do not match the contants of another file. Is there a way to make a comparison between these 2 files, and write the difference to the another file?

I'm looking for something that will compare directories and files like Beyond Compare does for windows.  Its mainly for use of source control, but I need to use it for deployment as well.


If every subsequence of a given sequence of real numbers is convergent, prove that the sequence is convergent.   Help me please. I could not understand how to solve this question.

I want to prove this and intuitively it makes sense. But I'm having a hard time coming up with a proof. So if a sequence converges, then we have a natural number for which the distance between all terms after it and the limit point get arbitrarily small. So how can I show that this also holds for every subsequence (which is like a subset of a sequence)?  (are subsequences always infinite?)  Could I suppose that there is a subsequence that doesn't converge to that limit, and find a contradiction? (and do the same for the other direction?)


I am trying to detect and track markers in a clip, from the first frame forwards. I am using bpy.data.scenes["Scene"].frame_current = 1 to set the clip to the first frame, followed by detecting and tracking features using: ctx = bpy.context.copy() for area in bpy.context.screen.areas:     if area.type == 'CLIP_EDITOR':         ctx['area'] = area  bpy.ops.clip.select_all(ctx,action='DESELECT') bpy.ops.clip.detect_features(ctx)  bpy.ops.clip.track_markers(ctx,backwards=False, sequence=True)  However, I am struggling to integrate the two components as detect and track runs from the current frame, not the first frame (i.e. if frame 48 is the current frame, the features will be detected and tracked from frame 48 to the final frame, not frame 1 to final frame). Printing the current frame in the python console yields '1' after running bpy.data.scenes["Scene"].frame_current = 1. I can't seem to work out what the issue is here and any help with this would be greatly appreciated! Thanks!(:

I am attempting to make these GUI steps into a script. When I follow this process manually, I get a tracking error under 1 and I get some great matches. This is far better than autotrack. import bpy  Step 1 - Set tracking settings extra correlation to .99: bpy.data.movieclips["Name.png"].(null) = 0.99  Step 2 - Loop through 1000 times When in loop, it loops but only tracks one frame forward: for loopv in range (1000):  Step 3 - Detect Features bpy.ops.clip.detect_features(ctx)  Step 4 - Track Features 1 Frame bpy.ops.clip.track_markers(ctx,backwards=False, sequence=False)  Step 5 - Deselect all features bpy.ops.clip.select_all(ctx,action='TOGGLE')  or bpy.ops.object.select_all(ctx,action='DESELECT')  Step 6 - End Indentation of loop and Return to Step 2 This is my current code. I have to hit Run Script. over and over, for it to work and go through all the frames of the clip. import bpy import random  #for loopv in range (1000): ctx = bpy.context.copy() for area in bpy.context.screen.areas:    if area.type == 'CLIP_EDITOR':    ctx['area'] = area  bpy.ops.clip.select_all(ctx,action='DESELECT') bpy.ops.clip.detect_features(ctx) bpy.ops.clip.track_markers(ctx,backwards=False, sequence=False)


Greetings, as you can see in the picture, I want this picture to be background image for my amateur video. Any advices?

I've done a quick 3D track in blender and I'm trying to render my output, but the plate I used to track is showing up over my 3d objects.  I want to render the objects in the scene with an alpha channel and comp them over the plate I tracked. My renders however, are covered by the aforementioned plate.  Un-checking "Background Images" in the camera properties (only removes it from the viewport) isn't doing it for my render outputs.  Working on some production tests and am not really proficient with the software yet, my apologies in advance.


When should "the" be capitalized when it begins a proper noun?  There are some proper nouns that seem to have their leading "the" included as part of their name/title. For example, The Real Ghostbusters. But there are others, such as the Greenhill School that seem like they could go either way (as in, Greenhill School could also be acceptable, so "the" is not part of the proper noun). What's the rule?

When capitalising a proper noun that has a “the” prefix, should the “the” be capitalised?  Eg:     “This puts the Union at risk”   or:     “This puts The Union at risk”


Suppose that $z_1+z_2+z_3=0$ and $|z_1|=|z_2|=|z_3|=1$. I want to prove that $z_1,z_2,z_3$ are the vertices of an equilateral triangle.  We can assume that $z_1\neq0$. Thus $1+\frac{z_2}{z_1}+\frac{z_3}{z_1}=0$ and  $|\frac{z_2}{z_1}|=|\frac{z_3}{z_1}|=1$.  I can prove that if $1+z_2+z_3=0$ and $|z_2|=|z_3|=1$, then $1,z_2,z_3$ are vertices of an equilateral triangle.  So back to original problem we can conclude that $1,\frac{z_2}{z_1},\frac{z_3}{z_1}$ are vertices of an equilateral triangle. Could you give me some hint to continue from here? Thanks!

Prove that if $z_{1}+z_{2}+z_{3}=0$ and $|z_{1}|=|z_{2}|=|z_{3}|=1$ then the points $z_{1},z_{2},z_{3}$ are the vertices of an equilateral triangle inscribed in the unit circle $|z|=1$.  My idea was the following: since the sum of the numbers has to be $0$ and they have equal modulus, the interior angles between them should be equal to $120º$.   Later I could use the Inscribed Angles Theorem to prove that   $$\arg \left(\frac{z_{j}-z_{i}}{z_{j}-z_{k}}\right)=\frac{1}{2}\arg\left(\frac{z_{i}}{z_{k}}\right)$$   and since all $\arg(z_{i}/z_{k})=120º$, all angles would be equal. So the triangle formed would be equilateral.  I am wondering if this is correct and if would there be a more organized way to prove this.


I have multiple instances of Firefox running in Ubuntu 14.04. How can I close the most recently opened window/instance from the Terminal?  I tried using , but it didn’t work.

I have firefox already running on my system, and now in minimised state. What I want is to close the current tab running in firefox. How can I do this by simply using commands in terminal?


Someone removed all admin and moderator of my group. Now how can I get back this group? Note: The group has no admin or moderator now.

I created a Facebook group and was later removed by another admin.   How do I get my group back?


I want to set it so that the Windows 10 tiles for things like Candy Crush do not appear for users logging in to a machine. This is on a fresh 1909 install.  I understand that these apps aren't installed as such, I just want to hide that tile.  information here -  suggests editing registry keys at   HKU\Default_User\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager  However I don't have this 'ContentDeliveryManager' folder. I'm finding that other similar solutions have similar results - I don't have the same registry keys!  Does anyone have any advice?

Windows 10 comes with "Candy Crush Saga" preinstalled, but I do not want it on my system. How do I remove it?


Trying to find out why fail2ban is not working.  Where does Ubuntu 14.04 log SSH access attempts?

I'd like to see if somebody has been trying to log-in by brute-force into my Ubuntu 12.04 server over SSH. How can I see if such activities have been taking place?


I hope this is easy: how do I bring back the Math Function menu for a mesh once it has been initially created?  After I first configure the function the menu disappears and I can't seem to bring it back.

When you first add a cylinder, you have the option to change the number of vertices, etc, but once you do anything else in blender, it seems you no longer can edit those parameters.   Is there a setting anywhere or an add-on that allows these parameters to be edited later on? If not, how easy would such an addon/feature be to create for anyone reading this?


Currently, my smithing level is 71. There are only two options of increasing smithing for me:   Making Iron Daggers Get Training From Smithing Experts   Which method is more faster and can help me reach 100 Smithing?

Leveling smithing to 100 seems like a difficult task. Is it more effective to craft cheap things such as iron daggers, or to craft expensive items such as Elven weapons?


There is a pluralization issue on the Ask question's side panel on the right-hand side. When you have one issue to be resolved on the post, it shows a warning as:  Resolve 1 issues before posting  Screenshot for reference:

Typo on "Resolve 1 issues before posting": issues should be issue.


I have some issues with this sentence:     I don't know Alex and Marla.   Is it correct to write it like this:     I don't know either Alex or(or it's "nor"?) Marla.   Or like this:     I don't know neither Alex nor Marla.   And another thing:  May I say something like     I don't know Alex nor Marla.   or     I don't know Alex or Marla.

Given these facts:   The tool cannot be found in the kitchen. The tool cannot be found in the bathroom.   Which is the correct sentence to represent the situation above?        I can find the tool neither in the kitchen nor in the bathroom.   I cannot find the tool neither in the kitchen nor in the bathroom.   I cannot find the tool, neither in the kitchen nor in the bathroom.


It was marked duplicate and i am expanding my question.  My question is how JDK internally serializing objects.  How ObjectxxxStreams class serializing when the class implements that interface.?  I was looking into the serialization topic and deeply dived into the JDK Source code.    This was the source code of serialization Interface in JDK.  package java.io; public interface Serializable { }   There is nothing in this interface.  What is the use of implementing this interface.  I know that, to serialize a object we should implement this.  I know what serialization is and how to work with that.  But how serialization happens internally using ObjectInputStream and ObjectOutputStream.  These classes are how related to serialization. Alternatively let us keep that those two classes are doing their duty.  All my question is why we need to implement this empty interface to serialize and deserialize objects and how it works internally?  Please explain in detail about this.

We work heavily with serialization and having to specify Serializable tag on every object we use is kind of a burden. Especially when it's a 3rd-party class that we can't really change.  The question is: since Serializable is an empty interface and Java provides robust serialization once you add  implements Serializable - why didn't they make everything serializable and that's it?    What am I missing?


I want to use Eagle or Kicad to design a board using Maxim chips MAXQ1103 and MAX32550    and    MAXQ1103 is 144 pins TQFP package (see page 1 of the above datasheet)  while  MAX32550 is 121 CSBGA package   (see page 2 of the above datasheet)  The question is i am not able to find these parts in the Eagle's library (my google search didn't help me much). Where can i find these parts or do i have to create myself? If so, is it really worth the effort (how hard is it for Eagle beginner)?  The reference schematics of both these chips are done in Cadence ORCAD, which is very expensive to purchase.  Thanks

I am missing libraries of certain ICs for use in Eagle. Can someone guide me to a source where I can find these IC libraries? I am asking this question to find out if there is any central repository where I can find most/all of the IC libraries.  Additional Information (if required):   Currently missing ICs are AD8318, ADL5542, and TLV3501 I am using Eagle v5.6.0 for Windows


I am currently learning SQL. I am trying to create Views using Oracle SQL Developer. I came across the JOIN statement but I do not understand why do we need JOIN. According to , the purpose of JOIN is to join multiple rows together. I can do that without the expression JOIN (refer to the following code blocks, both of them produce the same view/table). So what is the purpose of JOIN?  With INNER JOIN:  SELECT      Acc.Cust_Id,     Cus.Address,     Acc.Avail_Balance FROM      Account Acc INNER JOIN     Customer Cus ON     Acc.Cust_Id = Cus.CUST_ID   Without INNER JOIN:  SELECT      Acc.Cust_Id,     Cus.Address,     Acc.Avail_Balance FROM      Account Acc,     Customer Cus WHERE     Acc.Cust_Id = Cus.CUST_ID

Is there any efficiency difference in an explicit vs implicit inner join? For example:  SELECT * FROM table a INNER JOIN table b ON a.id = b.id;   vs.  SELECT a.*, b.* FROM table a, table b WHERE a.id = b.id;


My Apple Store notifies me that i have 4 updates, but when i go to the Updates tab i cant see anything.

My updates badge shows 6 (also in the  menu), but the section in the updates tab seems to be collapsed (top separator line is thicker, like two lines) and not showing the available apps. I'm currently running macOS 10.12.1 (Mac App Store 2.2) and first noticed this problem today. The other tabs are behaving normally and this badge has changed from 5 to 6 updates today. I've tried restarting my computer, but the problem persists. Any ideas for fixing this?


Suppose that I'm alone on a planet of $M$. From what I learned from school, the gravitation force acting on me   $$F=G\frac{mM}{r^2},$$  where $m$ is my mass, $r$ is the distance between me and the planet and $G = 6.67 \cdot 10 ^{-11}$. Suppose that my dog, of mass $\tilde m$, comes to live with me on this planet. Now, is the gravitation force acting on me still $F$ or is it $$\tilde F=G\frac{m(M+\tilde m)}{r^2}~? $$

: Earth weighs about 13,170,000,000,000,000,000,000,000 pounds (or   5,974,000,000,000,000,000,000,000 kilograms). Since Earth is too big   to be placed on a scale, scientists use mathematics and the laws of   gravity to figure out Earth's weight.   So, this seems to be a constant. But I guess it doesn't consider the things that are on the earth, the trees, buildings, people, animals, water etc...  So, are all the above mentioned things' mass is too small or negligible to be left off?


Say I'm building a e-commerce website. I have a lot of products in different categories. For example one of them is:     Flat to Round Power Plug Convertor   So I have two ways to link to this product, directly to it:        or add the categories recursively before it:        According to  it seems it's recommending to put content in their own folders so that both users and robots can understand them easier. Besides if user simply remove the last part of URL flat-to-round-power-plug-convertor-1005874, they can easily get to the category.   The simply question is, when the product is in a 3rd or 4th level directory, the URL gets pretty long. I don't know if this long URL harms SEO or not. Or should I use the first form?  EDIT: The thing that confuses me is the URL should be "descriptive", and it should be "short". Consider the following example:     It would definitely help people find what they want. And when you got tens of thousands of products, this situation would happen a lot. Besides, Google definitely encourages to categorize content in their own folders as referenced above. The problem is, the more descriptive the URL is, the longer it is. How should I make choice between "descriptive" and "short"?

I'm working for a website to convert the website URL to an SEO friendly URL. I plan to use this:  example.com/category-name/pageid-123-page-name  I looked at some similarly categorized, highly ranked websites. They have the same structure, except for one thing. In one case, the URL format was  example.com/category-name/pageid-123-page-name.html  Another was   example.com/category-name/pageid-123-page-name.php  Now I know the text in URLs help with SEO. Is it more helpful to have a file extension? If yes, which one is better?  Or if my current plan is okay, will it be better with a / at the end?


In my program, I have 2 objects, A and B, with some code like this:   var a = {"color":"blue"}; var b = a; a.color = "orange"; console.log(b.color);    By setting B to A, they point to the same memory, and I don't want them to do that. I thought of running a for loop of all the keys and values, setting them individually to B, but there's got to be a better way. Any ideas?

What is the most efficient way to clone a JavaScript object? I've seen obj = eval(uneval(o)); being used, but . I've done things like obj = JSON.parse(JSON.stringify(o)); but question the efficiency.  I've also seen recursive copying functions with various flaws.  I'm surprised no canonical solution exists.


I read in a piece of news . " the amount of time that young people spend inactive." Inactive is an adjective . I consider it should be inactively . Is it right?

You can’t buy your kids clever. What’s more, if they’re merely above average, by sending them to some hideous Holland Park hothouse, you’re probably buying them miserable.  — Alex Proud,   ""   As far as I know, clever and miserable are both adjectives, not nouns. So why were they used with to buy? Is this an idiomatic way of saying You can't buy your kids intelligence and you're probably buying them (moral) misery? If so, what is the idiom used here? I'm not familiar with it.


i have a upvote posts style layout on my website, i have an ajax request that loads more posts, that code works fine, but my problem is when i try to upvote them. The ones that are not dynamically showed from the ajax request can be upvoted but when it loads more they can't be upvoted.  I have a id like_postID so the code can check wich post is being upvoted.  Searching i came across the $(document).on( eventName, selector, function(){} );, i tried it and it still works but only the ones that are not requested by the ajax call.  Heres my HTML code:

'.$upvote['upvotes'].' Up Votes

   Heres i my Jquery:  $(document).ready(function(){      // like and unlike click     $(".upvote-vetor").on("click",".like", function(){         var id = this.id;   // Getting Button id         var split_id = id.split("_");          var text = split_id[0];         var postid = split_id[1];  // postid         // Finding click type         var type = 1;         // AJAX Request         $.ajax({             url: 'php/upvote.php',             type: 'post',             data: {postid:postid,type:type},             dataType: 'json',             success: function(data){                 var likes = data['likes'];                  $("#likes_"+postid).text(likes);        // setting likes              },             error: function(data){                 alert("error : " + JSON.stringify(data));             }         });     }); });   PHP upvote code:  $userid = $id_user; $postid = $_POST['postid'];   // Check entry within table $query = "SELECT COUNT(*) AS upvotes FROM upvotes WHERE id_post='$postid' and id_user= '$userid'";  $result = $conn->prepare($query); $result->execute(); $fetchdata = $result->fetch(PDO::FETCH_ASSOC); $count = $fetchdata['upvotes'];   if($count == 0){     $insertquery = $conn->prepare("INSERT INTO `upvotes` (`id_upvote`, `id_user`, `id_post`) VALUES (NULL, '$id_user', '$postid');");     $insertquery ->execute(); }else {      $updatequery = $conn->prepare("DELETE FROM `upvotes` WHERE   id_user= '$userid' and id_post='$postid'");     $updatequery->execute(); }   // count numbers of like and unlike in post $query2 = "SELECT COUNT(*) AS upvotes FROM upvotes WHERE id_post='$postid'"; $result2 = $conn->prepare($query2); $result2->execute(); $fetchlikes = $result2->fetch(PDO::FETCH_ASSOC); $totalLikes = $fetchlikes['upvotes']. " Up Votes";   $return_arr = array("likes"=>$totalLikes);  echo json_encode($return_arr);   Thanks in advance. :)

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


How was Harry Potter able to get the Sword back after giving it to Griphook in exchange for him getting Harry into the Vault to get Hufflepuff's Cup?

I recently read the final book of the series. At one point was the vault heist, where the goblin Griphook runs off with the Sword of Gryffindor. Yet near the end of the book, Neville Longbottom suddenly has the sword and uses it to defeat the snake Nagini.  How could this be possible? Griphook wanted the sword because it was goblin-made, so I doubt he would given it over to any non-goblin. How does Neville suddenly get the sword?


Which of these sentences is correct? 1)Internet technology has significantly contributed to furthering education in the world. 2)Internet technology has significantly contributed in furthering education in the world. If only one is correct, does this mean that the other one is grammatically wrong or it can be used in a certain context?

We said :      I do want to thank Mr. Foulen and Mr. Felten who contribute for   server hosting .   or     I do want to thank Mr. Foulen and Mr. Felten who contribute to   server hosting .   or     I do want to thank Mr. Foulen and Mr. Felten who contribute on   server hosting .   or     I do want to thank Mr. Foulen and Mr. Felten who contribute in   server hosting .


I found this identity in ,  When $D$ is a $1 \times 1$ matrix, $B$ is a column vector, and $C$ is a row vector, then $$\det{\begin{bmatrix} A &  B \\  C & D\end{bmatrix}}=(D-1)\det(A) +\det(A-BC)= (D+1)\det(A) -\det(A+BC)$$  I wonder how to prove that. Thanks!

I would like to know the proof for:  The determinant of the block matrix $$\begin{pmatrix} A & B\\ C& D\end{pmatrix}$$ equals $$(D-1) \det(A) + \det(A-BC) = (D+1) \det(A) - \det(A+BC)$$ when $A$ is a square matrix, $D$ is a scalar, $C$ is a row vector and $B$ is a column vector.  I appreciate your help.


I'm creating a networked application. For this I'm creating a messaging system. What I've got so far (a snippet at least...)  public static byte[] ClassToBytes(GenericMessage Data) {     int Size = Marshal.SizeOf(Data);     byte[] Buffer = new byte[Size];     IntPtr Ptr = Marshal.AllocHGlobal(Size);      Marshal.StructureToPtr(Data, Ptr, true);     Marshal.Copy(Ptr, Buffer, 0, Size);     Marshal.FreeHGlobal(Ptr);      return Buffer; }  public static GenericMessage BytesToClass(byte[] Source, ClassType Type) {     switch (Type) //This is going to be extended     {         case ClassType.GenericMessage:             return BytesToClass<GenericMessage>(Source);             break;         case ClassType.RequestMessage: //RequestMessage is derived from GenericMessage             return BytesToClass<RequestMessage>(Source);             break;         case ClassType.ResponseMessage: //ResponseMessage is derived from GenericMessage             return BytesToClass<ResponseMessage>(Source);             break;         default:             throw new KeyNotFoundException();             break;     } }  public static T BytesToClass<T>(byte[] Source) {     int Size = Marshal.SizeOf(typeof(T));     IntPtr Ptr = Marshal.AllocHGlobal(Size);     Marshal.Copy(Source, 0, Ptr, Size);     T result = (T)Marshal.PtrToStructure(Ptr, typeof(T));     Marshal.FreeHGlobal(Ptr);     return result; }   Essentially what I want to do is:  public static GenericMessage BytesToClass(byte[] Source, ClassType Type) {     return BytesToClass<Type>(Source);   }   Is there such a way with an enum, or maybe a dictionary?  I've tried and searched, but without any result.

What's the best way to call a generic method when the type parameter isn't known at compile time, but instead is obtained dynamically at runtime?  Consider the following sample code - inside the Example() method, what's the most concise way to invoke GenericMethod<T>() using the Type stored in the myType variable?  public class Sample {     public void Example(string typeName)     {         Type myType = FindType(typeName);          // What goes here to call GenericMethod<T>()?         GenericMethod<myType>(); // This doesn't work          // What changes to call StaticMethod<T>()?         Sample.StaticMethod<myType>(); // This also doesn't work     }      public void GenericMethod<T>()     {         // ...     }      public static void StaticMethod<T>()     {         //...     } }


I'm am making a bunch of liquor bottles and i have too much reflection on the transparent image on the outer part of the transparency.  My first material is the glass node,  my 2nd material is the transparent image on the section of the bottle I need it on.  I am thinking it needs to be all one material but i cant find the correct node set up if that is the case.  Do you have a node set up that will help him achieve less reflection.

Well, i am new to blender so this question might be easy for some to answer. My problem, you can see on the picture. i want unwrap the label which has a transparent area (though it is not a square). The problem i have you can see. I want the transparent area to have same material as the glass. Is this possible without changing the faces? I know about baking all to single image, but i don't think the glass material would be good if i did that. Hope I can get some advice.   EDIT  I think I need attach a photo so you understand what i mean,i want to fix the edges and faces on the model so they fit the label, but how can i do ? seems like it all get distorted when i try.    i think i need attach a photo so you understand what i mean,i want to fix the edges and faces on the model so they fit the label, but how can i do ? seems like it all get distorted when i try.


There is no default split function in SQL Server 2012 that I'm using.  I want to split the string (ex: /Folder1/Folder2/) by /.   if string is /Folder1/ then output should be Folder1, if string is /Folder1/Folder2/ then output should be Folder2, if string is /Folder1/Folder2/Folder3/ then output should be Folder3.

Using SQL Server, how do I split a string so I can access item x?  Take a string "Hello John Smith". How can I split the string by space and access the item at index 1 which should return "John"?


My university has a captive portal login. Each user is given a username and a password. For Wpa, if you go to Edit-> Preferences and type IEEE 802.11, you can decrypt wireshark data. How can i decrypt data that is on a captive portal? Since everyone has their own username and password to access the internet, data will also be encrypted in 802.11 frames right? If anything doesn't make sense, please ask?  Thank You

To decrypt 802.11 header in Wireshark, you must know the WPA password.  Now, for example, there is a network which when clicked takes you to a login page where every user on the network has a username and a password. So, it's an open network but redirects you to a page with a login screen.  If I decrypt the 802.11 packets with wireshark with my username and password, can I see all the other packets, like other people that are browsing without knowing their username and password? Like, instead of seeing "protocol:802.11", can I see "http,tcp"? Even though it's all on the same network but everyone has their own password? If, what i am saying is wrong, is there a way to decrypt 802.11 headers without knowing the WPA password?  I am not sure how much sense it made but if some part does'nt make sense, please ask.


I tried to flag a question on Stack Overflow and when the dialog prompted I wasn't able to close it nor scroll through the flagging options.  Update: Went to another question to try again and it let me close the dialog but answer textarea continues to overlap it as shown in the picture.  Info:   iPhone 5 with iOS 7 Safari   Steps to reproduce:   Click on flag Click on 'It should be closed fir another reason' Answer textarea overlaps and doesn't leave clicking in any other option that gets behind it.   Photo:

The "Your Answer" textbox seems to be eating the flagging dialog as shown in Figure A.


I can't find trusty tar. This update seems somewhat half-baked.

So I have Ubuntu installed on my pc, and I want to upgrade to the new Ubuntu which was just released. When I check for any new updates it doesn't show any upgrades to the new release. How can I fix this? Thanks!


This series follows a tattooed protagonist through progressive attempts to escape the maze that his race was imprisoned in.

I'm trying to identify fantasy book series I encountered some time ago. Here are things I remember:   it was a fantasy setting but with some s-f elements; with many worlds and possibility to travel between them; resembling  setting a little, the two main races were non-human and probably hostile to each other,  a labyrinth (?), which somehow played an important role in the plot, a protagonist was some kind of emissary and was sent on a mission to another worlds  time period: 80s - 90s    Does anyone know what it is the name of the series?


I'm new to selenium .Please help me with how to take screenshot in seleniumwebdriver using java with filename as stepdefinition & time.

I have created screenShot() method to take the screenshot of the web page. When I used this method in my code first time it will capture the screen and it will save the image with image1 name. When I used the same method screenShot() to capture screens for other pages with the use of this.screenShot(); this will again capture the current web page screen but it stores With the same name image1 in the same folder (which overrides to previously captured screen image1).  Now, I have to take screenshots for the number of web pages & want to store it into the same folder with different names like image1, image2, image3...etc. by using the same method screenShot().  public void screenShot() throws IOException, InterruptedException {     File scr = ((TakesScreenshot)driver).getScreenshotAs(OutputType.FILE);     File dest = new File("filPath/image1.png");     FileUtils.copyFile(scr, dest); }   Any workaround to achieve this scenario?


I am trying to refresh the tab once i click on the update button . i have tried in the following way.  <apex:includeScript value="/support/console/22.0/integration.js"/>     <script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script> </script>      <script type="text/javascript">         function testRefreshPrimaryTabById() {             //Get the value for 'scc-pt-0' from the openPrimaryTab method             var primaryTabId = 'scc-pt-0';             alert("entering");             sforce.console.refreshPrimaryTabById(primaryTabId, true, refreshSuccess);             alert("exit");         }     </script>   page:  <apex:commandButton action="{!action}"  title="Submit" value="Update" reRender="id1" status="loadStatus"  rendered="{!controls}" oncomplete="testRefreshPrimaryTabById()"/>   but onclick of the update button the tab is not refreshing......  my computer code is:   <script type="text/javascript"> function RefreshPrimaryTab()          {             alert('hai');             sforce.console.getFocusedPrimaryTabId(showTabId);             alert('hello');         }          var showTabId = function showTabId(result)          {             var tabId = result.id;             alert('Primary Tab IDs: primaryTabId ' + tabId );             sforce.console.refreshPrimaryTabById(tabId , true, refreshSuccess);         };          var refreshSuccess = function refreshSuccess(result)          {             //Report whether refreshing the primary tab was successful             if (result.success == true)              {                 alert('Primary tab refreshed successfully');             }              else              {                 alert('Primary did not refresh');             }         };     </script>   button  <apex:commandButton action="{!function}" style="margin-left:900px;margin-top:4px;border-color: #e0e5ee;color:#fff;background: #0070d2;height: 32px;width:86px;"       title="Submit" value="Update" reRender="id1" status="loadStatus"  rendered="{!controls}" oncomplete="RefreshPrimaryTab();return false"/>   showing the both the alerts hai and hello .....but after that it is not refreshing the console.......  i want to refresh the tab as shown below attachment:

I've been trying to refresh a primary tab from a subtab with no luck, and would like a working example. According to their doc, they do not give an example of how to retrieve your primary tab's id from a subtab. How do you retrieve this information without knowing the Id from using something like openPrimaryTab?  Doc:            Click here to refresh a primary tab by id   <apex:includeScript value="/support/console/22.0/integration.js"/>


I have created a url field and submit button.and i want to validate this url like that it will show .xml regular expression at the end of url instead of .com and anything else. I have tried this code but didn't get reliable solution.It's redirecting me on another page when i writes invalid url.  Please help me through this . Any help will be appreciated.  Thanks in advance.  function validateURL(){ var re = /^(http[s]?:\/\/){0,1}(www\.){0,1}[a-zA-Z0-9\.\-]+\.[a-zA-Z]{2,5}[\.]{0,1}/.xml; if (!re.test(url)) {  alert("url error"); document.getElementById("error_msg").innerHTML = "invalid url";  return false; } }

How can I check if a given string is a valid URL address?  My knowledge of regular expressions is basic and doesn't allow me to choose from the hundreds of regular expressions I've already seen on the web.


When I use Spectracalc.com to calculate the peak wavelength at 500 Kelvin, I am told the peak is at 5.79551 µm.  When I switch the calculation result to wavenumber the peak is said to be at 980.506 cm-1.  But if I were to simply convert wavelength to wavenumber I do not get this value.  1/(5.79551E-6) = 172,547.3 m-1 = 1725.47  cm-1  What is going on here?    Edit:   Several people have answered that this has to do with the differentials not being the same size.  I don't think this answers my question.  I get that a wavenumber increment is not the same size as a wavelength increment.  That isn't the question at all.  The question is more about the physical meaning of what is measured.  Let me restate it more clearly.  Say I measure with a highly accurate physical instrument and get a value of the peak at 5.8 µm.  This is a physical quantity. It is the distance between two sequential peaks of the wave of the light measured as coming from the body at the temperature of 500 K.  This physical quantity, that describes a physical thing, also can be described by looking at the number of times the wave cycles in a unit distance. The wave that has a wavelength of 5.8 µm cycles 1/5.8 µm times in a unit distance, giving it a wavenumber of 1724.1 1/cm.  This is also a physically meaningful way a to describe the exact same wave I measured as the peak.  They are interchangeable descriptions of the same physical thing.  Now, say I had used a different instrument to measure the exact same physical body in the exact same state, an instrument that instead measured wavenumber. According to the wavenumber form of Planck's law, I should measure a wavenumber of 980.5 1/cm when earlier I had measured a wave with a wavelength of 1724.1 1/cm. This is supposed to be the exact same physical thing that was measured.  Yet the exact same physical thing cannot have two different values for the same measure!  So, which is it: Is one of the forms of Planck's law wrong, or are the two measures of the same wave not in fact interchangeable, i.e., is it false that a wave with a wavelength X has a wavenumber 1/X?  If the peak is a real physical phenomenon that corresponds to a real physical wavelength of X, then this physical wave MUST have a wavenumber of 1/X, unless that relation is just false. But if that relation is not false, then how on earth can we get two different values for the same physical phenomenon? The hot body knows which instrument I am using and moves the peak around accordingly?  Something is not right about this.

I read that it makes a difference whether you calculate $\frac{dE(\lambda) }{d \lambda}=0$ or $\frac{dE(\omega)}{d \omega}=0$ in the sense that the maximum energy density with respect to the wavelength does not coincide with the frequency maximum that one would assume to be at $\omega_{max} = \frac{c}{\lambda_{max}}$. Actually, I do not understand why this is so ( Now, I am only interested in a pure physical explanation, mathematically this is clear and due to the chain rule). Does anybody know how to explain this odd thing?  Somehow I feel that the core of the question has not been completely answered. Although I can easily look up wikipedia, where the need for the chain rule is explained, I am rather interested in understanding where the following argument breaks down, which seems to be why this question has caused some confusion in the past(as you can see by googling this question):  So we have $E(\omega)$ the energy radiated at a given frequency. Now this function has a maximum somewhere, so there is a frequency where a maximal amount of energy is emitted. In other words: If you add the sum of the photon's energies at each frequency that are emitted, you will notice that the maximum is reached at this frquency. Now $E(\lambda)$ tells you basically the same for the wavelength, but again: We know where at which frequency the maximal amount of energy is radiated, so we know the corresponding wavelength.   I think there is a need to explain this.   If anything is unclear, please let me know.


Prove that $(1+2+3+\cdots + n)^2 = 1^3+2^3+3^3+\cdots + n^3$ for every $n \in \mathbb{N}$.  Proof. We will use mathematical induction. If $n = 1$, then we have $(1)^2= 1^3 = 1$. We must show that $S_n$ implies $S_{n+1}$. Assume that for $n \in \mathbb{N}$, the statement $(1+2+3+\cdots + n)^2 = 1^3+2^3+3^3+\cdots + n^3$ holds. Then  $\begin{align} &\left[\displaystyle\sum_{n \in \mathbb{N}}^n n\right]^2+(n+1)^3 \\ =& \displaystyle\sum_{n \in \mathbb{N}}^n n^3+(n+1)^3 \\ =& \displaystyle\sum_{n \in \mathbb{N}}^n n^3 + n^3 + 3n^2 +3n + 1 \end{align}$  How do I finish carrying out the induction? I can't seem to manipulate the right hand side properly get the form $\left[\displaystyle\sum_{n \in \mathbb{N}}^n n+1\right]^2$.

How can I prove that     $$1^3+ 2^3 + \cdots + n^3 = \left(\frac{n(n+1)}{2}\right)^2$$    for all $n \in \mathbb{N}$? I am looking for a proof using mathematical induction.  Thanks


Let $g : I \rightarrow \mathbb{R}$ be a $C^1$ map such that $g'(x) \ne 0$ for any $x$ in $I$. Assume that there exists $r \in I$ such that $g(r)=0$. Prove that for $\eta \in I$ sufficiently close to $r$ then the fixed point iteration  $$x_{k+1}=x_k-\frac{g(x_k)}{g'(x_k)},\,x_0=\eta$$ satisfies $\lim_{k\rightarrow\infty}x_k=r$.  I noticed that this is Newton's method for finding the roots of $g$, but I couldn't manage yet to prove the desired conclusion.

I've googled this and I've seen different types of proofs but they all use notations that I don't understand.  But first of all, I need to understand what quadratic convergence means, I read that it has to   do with the speed of an algorithm. Is this correct?  Ok, so I know that this is the Newton-Raphson method:  $$x_{n+1}=x_n-\dfrac{f(x_n)}{f'(x_n)}$$  How do I prove that it converges?  Thanks.


Is it true that if $\gcd(a,b,c)=1$ then there exists $x,y\in\mathbb{Z}$ such that $\gcd(a+xc,b+yc)=1$?   I came upon this while trying to prove that the natural homomorphism $r_m:\operatorname{SL}_n(\mathbb{Z})\to\operatorname{SL}_n(\mathbb{Z}/m\mathbb{Z})$ is surjective. I was trying to show that for $n=2$, if $A\in\operatorname{SL}_2(\mathbb{Z}/m\mathbb{Z})$ then it suffices to show that there exists $B\in M_2(\mathbb{Z})$ such that $r_m(B)=A$ and $\gcd(b_{11},b_{12})=1$.

I can't crack this one.      Prove: If $\gcd(a,b,c)=1$ then there exists $z$ such that $\gcd(az+b,c) = 1$ (the only constraint is that  $a,b,c,z \in \mathbb{Z}$ and $c\neq 0)$


my phpinfo() shows php version 7.0.26.   I want to upgrade it to php 7.2  I want to upgrade to phpversion 7.2.   sudo apt install php7.2   Doesn't update the apache php version.  How can I update the apache php version?

How can I upgrade to php 7.1 from php 7.0 in ubuntu 16.04 ?  If I do a php -v I get this message:  PHP 7.0.8-0ubuntu0.16.04.3 (cli) ( NTS ) Copyright (c) 1997-2016 The PHP Group Zend Engine v3.0.0, Copyright (c) 1998-2016 Zend Technologies     with Zend OPcache v7.0.8-0ubuntu0.16.04.3, Copyright (c) 1999-2016, by Zend Technologies


Put another way, would achieving strong types without type erasure only require a new language or also a new JVM?  Note: I'm not asking when or how erasure occurs.  I'm asking what is demanding it.  The inability to change the language or the inability to change the JVM.  Or both.  UPDATE:   To be very clear, I am not asking about any implementation details.  This question is about legacy.  Unless I'm mistaken type erasure has been justified as something we have to live with for the sake of backwards compatibility.  How it is currently implemented and when it takes effect are not at issue.  Any answer to this question should make clear if a new specification to a new strongly typed language could do away with type erasure and still run on the JVM as it is currently specified.

I read about Java's type erasure .  When does type erasure occur? At compile time or runtime? When the class is loaded? When the class is instantiated?  A lot of sites (including the official tutorial mentioned above) say type erasure occurs at compile time. If the type information is completely removed at compile time, how does the JDK check type compatibility when a method using generics is invoked with no type information or wrong type information?  Consider the following example: Say class A has a method, empty(Box<? extends Number> b). We compile A.java and get the class file A.class.  public class A {     public static void empty(Box<? extends Number> b) {} }     public class Box<T> {}   Now we create another class B which invokes the method empty with a non-parameterized argument (raw type): empty(new Box()). If we compile B.java with A.class in the classpath, javac is smart enough to raise a warning. So A.class has some type information stored in it.  public class B {     public static void invoke() {         // java: unchecked method invocation:         //  method empty in class A is applied to given types         //  required: Box<? extends java.lang.Number>         //  found:    Box         // java: unchecked conversion         //  required: Box<? extends java.lang.Number>         //  found:    Box         A.empty(new Box());     } }   My guess would be that type erasure occurs when the class is loaded, but it is just a guess. So when does it happen?


I am trying to prove that t-statistic has a t-distribution, but I am pretty much lost at the moment. I was not able to find any proofs in the internet as well. Can somebody help me to understand how to prove it?

My lecturer posed a question where we derive the density function of the student t-distribution from the Chi-square and Standard normal distribution. I worked on this question for days, and I am pretty sure the below integral is correct (Verified by others)  $$f_T(t)=\int_{-\infty}^\infty|x|2nx\times \frac{\frac{1}{2}^{\frac{n}{2}}}{\Gamma\left(\frac{n}{2}\right)}(x^2n)^{\frac{n}{2}-1}e^{-\frac{1}{2}x^2n}\frac{1}{\sqrt{2\pi}}e^{-\frac{(xt)^2}{2}}dx$$ where n is the degree of freedom of the t-distribution and $\Gamma$ is the gamma function from the Gamma distribution. My goal is $$f_T(t)=\frac{\Gamma[(n+1)/2]}{\sqrt{n\pi}\Gamma(n/2)}\left(1+\frac{t^2}{n}\right)^{-(n+1)/2}$$  I was given 2 hints. To proceed, I need to do integration by parts first, then I should use the fact that the Gamma d.f integrates to 1. From this point on, I am unsure, but I shall show you my steps.  We know that the d.f of the Gamma density with parameters $\alpha=\frac{n+1}{2} \lambda=\frac{1}{2}$ integrates to $1$, that is $\int_{0}^{\infty}g(t)dt= \int_{0}^{\infty}\frac{\frac{1}{2}^{\frac{n+1}{2}}}{\Gamma\left(\frac{n+1}{2}\right)}t^{\frac{n+1}{2}-1}e^{-\frac{1}{2}t}dt=1$ Let $t=x^2n$.  Therefore,      $dt=2xn\,dx$ We have $\int_{0}^{\infty}g(t)dt=\int_{0}^{\infty}g(x^2n)2xn\,dx=\int_{0}^{\infty}\frac{\frac{1}{2}^{\frac{n+1}{2}}}{\Gamma\left(\frac{n+1}{2}\right)}(x^2n)^{\frac{n+1}{2}-1}e^{-\frac{1}{2}(x^2n)}2xn\,dx=1$ This should be useful because I noticed the $\Gamma[(n+1)/2]$ in the end result.  Working on the big integral now... $f_T(t)=\int_{-\infty}^\infty|x|2nx\times \frac{\frac{1}{2}^{\frac{n}{2}}}{\Gamma\left(\frac{n}{2}\right)}(x^2n)^{\frac{n}{2}-1}e^{-\frac{1}{2}x^2n}\frac{1}{\sqrt{2\pi}}e^{-\frac{(xt)^2}{2}}$ $=\frac{\Gamma[(n+1]/2)]}{\sqrt{n\pi}\Gamma(n/2)}\int_{-\infty}^\infty \frac{\sqrt{n\pi}\Gamma(n/2)}{\Gamma[(n+1]/2)]}|x|2nx\times \frac{\frac{1}{2}^{\frac{n}{2}}}{\Gamma\left(\frac{n}{2}\right)}(x^2n)^{\frac{n}{2}-1}e^{-\frac{1}{2}x^2n}\frac{1}{\sqrt{2\pi}}e^{-\frac{(xt)^2}{2}}dx$ After a load of manipulation, $=\frac{\Gamma[(n+1]/2)]}{\sqrt{n\pi}\Gamma(n/2)}\int_{-\infty}^\infty 2nx \frac{(\frac{1}{2})^{\frac{n+1}{2}}}{\Gamma [(n+1)/2)] }(x^2n)^{\frac{n-1}{2}}e^{-\frac{1}{2}(x^2n)}\times2n|x|e^{-\frac{(xt)^2}{2}}dx$ Note that the first half is integrate to 1. Hence I do by parts.  But I still cannot get to my goal. I had tried this question for at least 6 times already now. Can I get some help? I tried to type these out as neatly as I knew how.


I know the question sounds silly, however all I could find is the mathematical proof justifying the same but the convincing inference is still missing. My intent basically was to ask for the better comprehension of "there is only one way of arranging no objects."  Please be polite.

How can I prove  from first principles that $0!$ is equal to $1$?


I am tired of always trying to guess, if I should escape special characters like '()[]{}|' etc. when using many implementations of regexps.  It is different with, for example, Python, sed, grep, awk, Perl, rename, Apache, find and so on. Is there any rule set which tells when I should, and when I should not, escape special characters? Does it depend on the regexp type, like PCRE, POSIX or extended regexps?


For some reasons, I had to install Ubuntu 19.04 over 18.04 knowing that it lacks LTS. I want to know could I upgrade my system to the next stable version when it was released? if yes, then I think I wouldn't loose much! right?

What are the differences between an Ubuntu Long Term Support release (LTS) and a normal release?


I'm having trouble with any of the "extreme" integrals from the 2006 MIT Integration Bee.   Evaluate the following integral:  $$\int_{0}^{\infty}\dfrac{\mathrm{e}^{3x}-\mathrm{e}^{x}}{x\left(\mathrm{e}^{3x}+1\right)\left(\mathrm{e}^{x}+1\right)} \, dx$$  The final answer given was: $\frac{1}{2}\ln(3)$

I want to find the following integral: $$\int_{0}^{\infty} \frac{e^{3x}-e^x}{x(e^{3x}+1)(e^x+1)} dx$$ I have been trying to apply simple substitutions like $u=e^x$, to simplify the integral without any luck. I simplified it to  $$\int_{0}^{\infty} \frac{1}{x(e^x+1)}-\frac{1}{x(e^{3x}+1)}dx$$  which seems to have increased my problems.  Wolfram Alpha gives the answer to be 0.5493... and the graph looks like a Gaussian distribution.  Somehow, I feel that this integral is very non-trivial due to the 'troublesome' $x$ in the denominator.


I'm getting error below while on button click                                                         java.lang.NullPointerException at com.gor.hocam.MainActivity.getListitem(MainActivity.java:329) at com.gor.hocam.MainActivity$2.onClick(MainActivity.java:222) at android.view.View.performClick(View.java:4445) at android.view.View$PerformClick.run(View.java:18446) at android.os.Handler.handleCallback(Handler.java:733) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:136) at android.app.ActivityThread.main(ActivityThread.java:5139) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:515) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:796) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:612) at dalvik.system.NativeStart.main(Native Method)   My Button that i clicked is (MainActivity.java:222 is the first line below);  getListitem(); System.out.println(dersadilist.size());  String[] arrRecords = dersadilist.toArray(new String[dersadilist.size()]);  int arr[] = new int[derskodulist.size()]; for (int i = 0; i < derskodulist.size(); i++) {     arr[i] = Integer.parseInt(derskodulist.get(i)); }    new MaterialDialog.Builder(MainActivity.this)     .title("Son Çözdüğünüz Dersler:")     .items(arrRecords)     .itemsIds(arr)     .itemsCallback(new MaterialDialog.ListCallback() {         @Override         public void onSelection(MaterialDialog dialog, View view, int which, CharSequence text) {             Toast.makeText(MainActivity.this, which + ": " + text + ", ID = " + view.getId(), Toast.LENGTH_SHORT).show();         }     }).show();   Here my getListitem ( which is = (MainActivity.java:329);      public void getListitem() {      List<Scoredata> score = db.getAllContacts();      for (Scoredata sc : score) {         dersidler = String.valueOf(sc.getId());         dersadlari = sc.getName();         topscore = sc.getScore();         derskodlari = sc.getKodu();         //sc.getScore();          dersidlist.add(dersidler);         dersadilist.add(dersadlari);         scorelist.add(topscore);         derskodulist.add(dersadlari);     }    }   Thats my Scoredata;  public class Scoredata {  int id; String name, kodu, score; public int getId() {     return id; } public void setId(int id) {     this.id = id; } public String getName() {     return name; } public void setName(String name) {     this.name = name; }  public String getKodu() {     return kodu; } public void setKodu(String kodu) {     this.kodu = kodu; } public String getScore() {     return score; } public void setScore(String score) {     this.score = score; }  public Scoredata(String name, String kodu, String score) {     super();      this.name = name;     this.kodu = kodu;     this.score = score; } public Scoredata() {     super();     // TODO Auto-generated constructor stub }  }   And getAllContacts on my DbHighestScore;  public List<Scoredata> getAllContacts() {     List<Scoredata> scoreList = new ArrayList<Scoredata>();        // Select All Query     String selectQuery = "SELECT  * FROM " + TABLE_CONTACTS + " ORDER BY id DESC";      SQLiteDatabase db = this.getWritableDatabase();     Cursor cursor = db.rawQuery(selectQuery, null);      // looping through all rows and adding to list     if (cursor.moveToFirst()) {         do {             Scoredata score = new Scoredata();             score.setId(Integer.valueOf(cursor.getString(0)));             score.setName(cursor.getString(1));             score.setKodu(cursor.getString(2));             score.setScore(cursor.getString(3));               scoreList.add(score);         } while (cursor.moveToNext());     }     cursor.close();     db.close();      // return contact list     return scoreList; }

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?


What I want to do   I want to change the power of only the light object visible in the camera view. I want to remove vertices to mesh objects in visible in the camera view. Not remove mesh objects, only remove view vertices.   Question   How to get light objects visible in the camera view with Python. How to get vertices in mesh objects  visible in the camera view with Python.   Image  I want to get Only left light object.     I want to get Only inside camera view vertices    I can write Python but I'm not familiar with Blender. So I'm more glad if I can get it with a script.

I have a simple mesh of a cube.  I would like to know what are the coordinates of each vertex in the rendered image (i.e. for each 3d vertex I'd like to know it's pixel coordinates).  Is there a way to do this?  Clarification:  I'm experimenting with a pose estimation algorithm (i.e. finding out the 3d pose of the object) from a (set of) 2d image(s).  Instead of taking an image of a real object with a real camera I synthetically render the image of a cube using blender.  In this way I know the pose of the object and the intrinsics of the camera, so I can easily validate the results of the pose estimation algorithm. Pose estimation algorithms usually require to provide them with world points on the object and the corresponding image points.  So what I'm looking for is a way to produce a dump of correspondences of the 3d point <--> image point as a byproduct of the rendering procedure. Thanks, Alex


I want to convert my swing application into an executable one.I am using Neatbeans IDE.Is there any plugin available?

If I have a Java source file (*.java) or a class file (*.class), how can I convert it to a .exe file?  I also need an installer for my program.


of my problem is:  class Callee { public:   int m1()   {     return 5;   }    constexpr static int (Callee::*method)() = &Callee::m1; };  template <class O> int call(O &o, int (O::*m)()) {   return (o.*m)(); }  int main() {   Callee callee;   return     (callee.*Callee::method)() // works fine     *     call<Callee>(callee, Callee::method) // causes undefined reference in GCC   ; }   This code compiled in clang (3.4-1) but failed in gcc (4.8.4) with message:  undefined reference to `Callee::method'   Shorter, I can call some class method by its pointer directly, but I can't call it from templated function. (It is more unclear, than I inherit from Callee, because both methods works fine) Why?

Can anyone explain why following code won't compile? At least on g++ 4.2.4.  And more interesting, why it will compile when I cast MEMBER to int?  #include <vector>  class Foo {   public:       static const int MEMBER = 1;   };  int main(){       vector<int> v;       v.push_back( Foo::MEMBER );       // undefined reference to `Foo::MEMBER'     v.push_back( (int) Foo::MEMBER ); // OK       return 0; }


Let $c_n$ be sequence defined for $n\ge 1$ as follows: $$ c_n=a^n-1.$$  Prove that this sequence satifies strong divisibility condition, that is: $$ \gcd(c_n, c_m)=c_{\gcd(n,m)}.$$  where $\gcd$ denotes greatest common divisor. Any hints?


I roasted a chicken then took the meat off the bone and froze it in little freezer bags. Yesterday evening I thawed some of the chicken in the microwave, expecting to eat it straight away, but didn't eat all of it. I put the leftover chicken in the fridge yesterday evening, after it cooled. Do you think it is ok to eat today? And if so, would I need to heat it up before eating it, or could I eat it straight from the fridge? Thank you!

If I left food out of the refrigerator for some period of time, is it still safe? If I left it out too long, can I salvage it by cooking it more?


The task is to find all the Homomorphisms from group $\mathbb{Z}_{20}$ to $\mathbb{Z}_{16}$. My teacher told be that there is an sufficient way to do this, however I've just brute forced it. Do you have any ideas? Would be grateful for the answer also, just to check my own one.

Is it true that the number of homomorphisms between any two finite cyclic groups of order $m\,\&\,n$ is $\gcd(m,n)$?  I have posted an answer which I believe is true, just wanted to know different approaches to this problem.


We are migrating over to Lightning Web Components in the last couple of weeks now and we had some struggles with the arrays in Javascript. On a trackable array, when I call push in a wiredMethod, Array.push won't update the view. We found a workaround but I was wondering if there is a more elegant solution to this. Please take a look at the code snippets:  import { LightningElement, wire, track } from 'lwc'; import getData from '@salesforce/apex/LWCController.getData';  export default class myLWComponent extends LightningElement {     @track error;     @track dataArray = [];     @track processedArray = [];      @wire(getData)     wiredMethod({ error, data }) {         if (data) {             this.dataArray = data.arr;             this.dataArray.forEach(function (value) {                 // do some work on data here                 this.processedArray.push(value);             }         } else if (error) {             this.error = error;         }     }                  }   And on the view here:  <lightning-card title="Card Title">     <template for:each={processedArray} for:item='item'>         {item.title}     </template> </lightning-card>   Here is our workaround:  export default class myLWComponent extends LightningElement {     @track error;     @track dataArray = [];     @track processedArray = [];      @wire(getData)     wiredMethod({ error, data }) {         if (data) {             this.dataArray = data.arr;             let tempArray = [];             this.dataArray.forEach(function (value) {                 // do some work on data here                 this.tempArray.push(value);             }             this.processedArray = tempArray;         } else if (error) {             this.error = error;         }     }                  }   As you can see from the work around, if we set array to the temp array, framework understands that the array is updated and updates the view accordingly. We also tried setting values as follows which didn't work:  this.processedArray[index] = value;   We are wondering why push doesn't work and/or if there is a better way to do this.

From SF :      There are some limitations on the depth of changes tracked for   rerendering in reactive properties. The tracking depth depends on the   type of the reactive property.      Lightning Web Components tracks changes to the internal values of   these types of reactive properties:         Primitive values    Plain objects created with {…}   Arrays created with []         Also SF does not track for complex types like Date.   Now what I wanna do is track an Array of complex object. If a new element is added subtracted from the array re-render the UI. Classic Data - table example.  So I declared my Markup:  <template>     <h1>Hello </h1>     <lightning-datatable                 key-field="id"                 data={data}                 columns={columns}                 is-loading={tableLoadingState}>             </lightning-datatable>              <lightning-button variant="brand" label="Add row" title="Add row" onclick={addRow} class="slds-m-left_x-small"></lightning-button> </template>   JS:  import { LightningElement, track } from 'lwc'; const columns = [     { label: 'Label', fieldName: 'name', type:"text"},     { label: 'Website', fieldName: 'website', type: 'text' },     { label: 'Phone', fieldName: 'phone', type: 'text'  } ]; export default class App extends LightningElement {     @track data = [{name:'Mylabel' , website:'google.com' ,phone :'74126478963',amount : 45  }];     @track columns = columns;     @track tableLoadingState = false;      addRow(){         console.log('add row called');         this.data.push({name:'Mylabel2s' , website:'2google.com' ,phone :'74126478963',amount : 45 });         console.log(JSON.stringify(this.data));         //this.data =[];      }   }   When I save and try running this I get the message as shown in docs.  [LWC warning]: Property "_def" of [object:vm undefined (0)] is set to a non-trackable object, which means changes into that object cannot be observed. <lightning-primitive-header-factory>   which means I cannot track the row data for lightning-datatable, which also means when I add or remove rows I would be unsuccessful.  I could not find a solution to add row in datatable and get it updated back in the markup, I searched dev guide and recipe book. Is this a limitation? or there is a workaround?


I am of course well aware that distances in Euclidean geometry are calculated from the Pythagorean theorem. This is more of a conceptual question. My question may also be formulated as follows: If we approach the diagonal of a square (of side length 1) with a set of segments parallel to the sides, to total length of this set of segments is 2 (= taxicab distance), no matter the number of segments. If the number of segments tends towards infinity, the total length is still 2, but the set of segments looks like the diagonal of the square (whose length is $\sqrt{2}$). What is it about our world and Euclidean geometry that makes taxicab distance not the shortest distance? Sorry if what I'm saying is not strictly correct, I hope you can still understand what I mean :)

What is wrong with this proof?    Is $\pi=4?$


I have 5 properties and I thought that visualizing them along the axis of a pentagon would be nice. The properties can take an integer value between 0-5. Together that span a surface within the pentagon.  This is what I'd would like the image to look like [took me forever to make the markers in inkscape :-)] :    This is what I have so far:  \documentclass{standalone} \usepackage{tikz} \usetikzlibrary{shapes.geometric}  \begin{document}  \begin{tikzpicture} \newdimen\R \R=4cm \node[draw=black, minimum size=\R,regular polygon,regular polygon sides=5] (a) {}; \draw (a.center) -- (a.north)    node[above] {Property1}; \draw (a.center) -- (a.corner 5) node[right] {Property2}; \draw (a.center) -- (a.corner 4) node[right] {Property3}; \draw (a.center) -- (a.corner 3) node[left]  {Property4}; \draw (a.center) -- (a.corner 2) node[left]  {Property5};  \draw [thin,black!20] circle (\R) ; \fill[red] circle (2pt);  % Trial/error for this example %                              P1        P2           P3              P4             P5 \draw[fill=cyan, opacity=0.8] (0,1.5) -- (0.9,0.3) -- (0.55, -0.8) -- (-0.6,-0.8) -- (-1.4,0.45) -- cycle;  \end{tikzpicture}  \end{document}   Resulting in this:    I'm lost at drawing the markers on the vertexes and having them equally spaces and equally lost when it comes to filling the polygon given by the 5 integer-values  Since I have quite a few of these to draw, making the above into a macro would be really nice :-)

This question led to a new package:      Is there a way to draw  easily?


I have yajra datatable which is working properly. below is my datatable function         $.ajaxSetup({             headers:{'X-CSRF-TOKEN' : '{{ csrf_token() }}'}         });                  var table = $('#tblOrderList').DataTable({             "aaSorting": [],             destroy:true,             "pageLength": 25,             processing: true,             serverSide: true,             ajax: {                 url:'{{ route("admin.VirtualOrderCreditBin.getVirtualCreditOrders") }}',                 method:'post'             },             columns : [                 {data : 'order_number', name : 'orders.order_number'},                                    {data : 'location_description', name : 'location_description'},                            {data : 'customer_name', name : 'customer_name'}             ]         });  and now I want to add click events on table rows. I want to do different functionalities on right click event, left click event and duble click event. for that I have tried below code     $(document).ready(function(){         $('#tblOrderList tbody tr').mousedown(function(event) {             switch (event.which) {                 case 1:                     alert('Left mouse button is pressed');                     break;                 case 2:                     alert('Middle mouse button is pressed');                     break;                 case 3:                     alert('Right mouse button is pressed');                     break;                 default:                     alert('Nothing');             }         });     });  but this is not working I don't know why. can anybody help me in this?

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


Let $n\in\mathbb N$. Prove that there are $n$ consecutive natural numbers that are not prime. I tryed to use the fact about the factorization to product of primes and that there are infinite primes but I did not succeed. Any suggestions? thanks!

Given an integer $n\geq  2$ ,can we always find an integer $m$  such that each of the $n-1$ consecutive integers $m+2,m+3,.....,m+n$ are composite?


I am making a game in python. At the beginning, the User enters his name and when he finishes the game, the Programm is saving the name and the playing time in a text file, like this: Playerx: 12:04 Playery: 4:54 Playerz: 7:12  The program converts the text file to dictionary, like this: scorelist = {'Playerx': '12:04', 'Playery': '4:54', 'Playerz': '7:12'}  Now I am searching for a possibility to sort the elements and print the 3 lowest at the end (highscore). Can you help me?

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


According to  ...     A command is split into an array of strings named arguments. Argument   0 is (normally) the command name, argument 1, the first element   following the command, and so on.  $ ls -la /tmp /var/tmp arg0 = ls arg1 = -la arg2 = /tmp arg3 = /var/tmp    Would it be possible to print out each argument ... let say with echo.  I've been using echo $@ and echo $0 $1 $2 $3 right after executing ls -la /tmp /var/tmp command but didn't really work.  I also tried this without > /dev/null but didn't work as well. (I'm getting exactly similar output as below)  user@linux:~$ ls -la /tmp /var/tmp > /dev/null  user@linux:~$ echo $@  user@linux:~$   user@linux:~$ ls -la /tmp /var/tmp > /dev/null  user@linux:~$ echo $0 bash user@linux:~$   user@linux:~$ ls -la /tmp /var/tmp > /dev/null  user@linux:~$ echo $1  user@linux:~$   user@linux:~$ ls -la /tmp /var/tmp > /dev/null  user@linux:~$ echo $0 $1 $2 $3 bash user@linux:~$    Desired Output  I'm expecting to see the following output on my terminal screen after executing ls -la /tmp /var/tmp  Input  ls -la /tmp /var/tmp  Output  arg0 = ls arg1 = -la arg2 = /tmp arg3 = /var/tmp

This is the script  user@linux:~$ cat script.sh  #!/bin/bash for i in `seq $#` do   echo $i done user@linux:~$    Output  user@linux:~$ ./script.sh a b c 1 2 3 user@linux:~$    Desired Output  I would like to get argument value like this .... and not just the number  user@linux:~$ ./script.sh a b c 1 - a 2 - b 3 - c user@linux:~$


I have created a path that is a line segment. It only has two endpoint nodes. How do I create a new node at the exact midpoint of the segment? Thanks.

In Inkscape when I apply a dash stroke, then set a mid marker shape, it does not show anything.


I am writing a ADnroid app, and when i pass a string at this point, I get a nullpointer ...Does someone know why?  Code          Elements titles = doc.select("h3 a");         String[] titlelist = null;         Bitmap[] bitmaps = null;         outputText = "";         int i = 0;         for (Element title : titles) {             titlelist[i] = title.text(); // <--- here comes the NullPointer             i = i + 1;         }   Log:  08-18 17:17:54.522  26470-26470/de.m4lik.somesampleapp E/AndroidRuntime﹕ FATAL EXCEPTION: main Process: de.m4lik.somesampleapp, PID: 26470 java.lang.NullPointerException         at de.m4lik.somesampleapp.MainActivity$TheTask.onPostExecute(MainActivity.java:95)         at de.m4lik.somesampleapp.MainActivity$TheTask.onPostExecute(MainActivity.java:68)         at android.os.AsyncTask.finish(AsyncTask.java:632)         at android.os.AsyncTask.access$600(AsyncTask.java:177)         at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:645)         ...   The doc.select part is jsoup code where i select headings from a website.

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


I've encountered the same problem as described in  or  post: I'm using hyperref with biblatex option backref and the created backref links lead to wrong pages. The answers above didn't help. Any help  is appreciated. Here is my MWE, which reproduces the problem:  \documentclass{scrbook}  \usepackage[hyperref=auto, backref=true, style=chem-angew, backend=biber, sortcites=true, chaptertitle=true, doi]{biblatex}  \renewcommand{\cite}{\supercite}  \usepackage[pdftex, bookmarks=true, bookmarksnumbered=true, bookmarksopen=true, hypertexnames=false, breaklinks=true, linkbordercolor={0 0 1}, pdfpagelabels, plainpages=false, pdfencoding=auto, psdextra, pdfborder={0 0 .5}]{hyperref}  \usepackage{filecontents}  \begin{filecontents}{test.bib} @book{A01,   author = {Author, A.},   year = {2001},   title = {Alpha}, } @book{B02,   author = {Buthor, B.},   year = {2002},   title = {Bravo}, } @article{C03,   author = {Cuthor, C.},   year = {2003},   title = {Charlie}, } \end{filecontents}  \addbibresource{test.bib}  \begin{document} \pagenumbering{Roman} \tableofcontents \cleardoublepage \pagenumbering{arabic} \chapter{title} We are citing \cite{A01,C03} and \cite{B02}. \null \chapter{title} \null Now we cite \cite{C03} \printbibliography \end{document}   edit: now plainpages = false (was plainpages = true) in the code hypperref option, as suggested in first link -did't work, either.  edit2: I've tried  answer, which suggested to turn hypertexnames = true and it seems to work, but i'm not sure, if this has unpredictable consequences to my PhD thesis which i'm unable to see right now.

I try to use hyperref with pagebackref to get a page number and a link for each of my references. My first pages have roman numbers (title page, ...), later on I switch to arabic numbers. For whatever reason the links in the references have the right page number but the link is wrong (somehow a negative offset).  I have a minimal example:  \documentclass[a4paper, 12pt, twoside]{report} \usepackage[latin1]{inputenc}  \usepackage[T1]{fontenc} \usepackage[english,ngerman]{babel} \usepackage[left=4cm,top=3cm,right=3cm,bottom=4cm]{geometry} \usepackage[pdftex, plainpages=false, hypertexnames=false, pdfpagelabels=true,     hyperindex=true, linktocpage, pagebackref=true, pdfa=true]{hyperref}  \begin{document} \pagenumbering{roman} \pagestyle{empty} Titel  \setcounter{page}{1} \tableofcontents \newpage  \pagenumbering{arabic} \pagestyle{plain}  \chapter{one} \section{one} \newpage  \section{two} Zitation~\cite{citation_key}  \bibliographystyle{plain} \begin{thebibliography}{widest-label}     \bibitem{citation_key}Autor: Titel. Verlag, Jahr. \end{thebibliography}   \end{document}   Any ideas?


I have a complex file with a lot of objects in it. Many of them are there as a target for a modifier of some kind Boolean, curve modifier, etc. Sometimes I go through and clean out objects that are no longer needed. The problem is that it isn't always apparent if the object is being used in another object's modifier stack. I don't want to break my work only to find out a day later that I deleted something important. Is there some way that I can quickly see if the object is being used?

Could anyone help in making a script for selecting all objects that are specified in the different modifiers that an object has stacked? For example if my object has a Boolean modifier and an Array modifier, which both refer to an empty or another object (in the Array modifier there is for example an Object offset you can specify). Would it be possible to select all those object with one click? Thanks.


There is a glitch on the Ubuntu Software Center and whenever I open it an error appears and it keeps loading and never opens.  Why does this happen?  I have installed Ubuntu 13.04 on a disk and partitioned it.  Please help me and ask for excess information if you need it.  If you know of any duplicates please show me them!!  I get the following error in a terminal  SystemError: E:Type '<!DOCTYPE' is not known on line 1 in source list /etc/apt/sources.list.d/medibuntu.list   The /etc/apt/sources.list.d/medibuntu.list file contains a HTML document.

I accidentally added this in a terminal:  sudo wget http://www.medibuntu.org/sources.list.d/gutsy.list -0 /etc/apt/sources.list.d/medibuntu.list   after which I get this error:  E:not known on line 1 file /etc/apt/sources.list.d/medibuntu.list E:Could not read source list etc...etc...   I saw that you already 'solved a similar problem ... can you help me  Original (italian):  gestore pacchetti bloccato   Ho inserito per sbaglio questo comando nel terminale:   sudo wget http://www.medibuntu.org/sources.list.d/gutsy.list -0 /etc/apt/sources.list.d/medibuntu.list dopodiche si e'bloccato gestione pacchetto e ricevo questo errore: E:non riconosciuto alla riga 1nel file /etc/apt/sources.list.d/medibuntu.list E:impossibile leggere elenco sorgenti etc...etc...   ho visto che hai gia' risolto un problema simile... mi puoi aiutare


For the last couple months, I've been unable to fetch any pages of my site in Google Search Console.  (The error message says "Temporarily Unreachable")  Here are the possible causes I've come across and the ways I've tried to test them.  *The page doesn't exist. (I don't think this is it because the page is visible to any non-bot visitor.)  *The Googlebot is being blocked by my robots.txt file. (I don't think this is it because the only entry on this file is User-agent: * )  *The Googlebot is being blocked by my hosting company. (I don't think this is it because I viewed the bot traffic stats and Googlebot is successfully crawling the site.)  *The page takes too long to load and creates a timeout error. (I don't think this is it. Some of my pages are genuinely slow, but--as a test--I also uploaded some small, mostly blank html pages which load in half a second. And, they won't fetch either.)  Although , the suggested answer--that this is a temporary issue in Google Search Console--doesn't apply in this case as the issue has been persistent for eight weeks in my case.  If you can see an error in my testing logic above, please let me know. Alternatively, if you can think of another angle from which I should approach this, I'd be curious. Thanks!

The page I'm trying to fetch is public.  The server logs show no request.  Google reports that any page on my site is "Temporarily unreachable". It won't even fetch the verification file, a static HTML file that was successfully used to verify with the webmaster tool application itself.   My site is running on the .  What is causing this?


var re = /^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$/; var email = document.forms["checkout"]["email"].value; if (re.test(email.value)) {     return true; } else {     alert("Invalid email address");     return false; }   I have tried quite a few email regex suggestions on this site but when the function is called it always throws the alert. Not even simple email address are coming back valid. What am I doing wrong?

Is there a regular expression to validate an email address in JavaScript?


Prove that $\lim\limits_{z \to \infty} |f(z)| = \infty$ where $f(z)$ is entire and has entire inverse $g(z)$.  I can show that the limit cannot be finite since if it were, then we can use Liouville's theorem to conclude that $f$ is constant. But how do I show that the limit is actually infinity?   Every answer in the other question uses some of Picard's theorem, the Open mapping theorem, Riemann's theorem. The only theorems I've covered which are relevant to the question are Casorati-Weierstrass and Liouville.

Can we prove that every entire one-to-one function is linear?


I am trying to solve a  and one thing I didn't realize earlier came up: public class Kata {     private static int y(int x) => 2 * x + 1;     private static int z(int x) => 3 * x + 1;      private static int self(int x) => x;      public static int DblLinear(int n)     {         Func<int, int> lowerBound = self;         Func<int, int> upperBound = self;          int result = 1;          for (int i = 1; i <= n; ++i)         {             lowerBound = (x) => y(lowerBound(x)); // [1]             upperBound = (x) => z(upperBound(x)); // [2]         }          ...     } }  My intention was to calculate y(y(y(y(... (x)))) and z(z(z(z(... (x)))) iteratively, but lowerBound and upperBound do not appear to function as actual variables; they work more like delegates here. When I run the program, a StackOverflowException is thrown. Is there any way I can accomplish this?

I met an interesting issue about C#. I have code like below.  List<Func<int>> actions = new List<Func<int>>();  int variable = 0; while (variable < 5) {     actions.Add(() => variable * 2);     ++ variable; }  foreach (var act in actions) {     Console.WriteLine(act.Invoke()); }   I expect it to output 0, 2, 4, 6, 8. However, it actually outputs five 10s.  It seems that it is due to all actions referring to one captured variable. As a result, when they get invoked, they all have same output.  Is there a way to work round this limit to have each action instance have its own captured variable?


I wrote the following code  val input = """{"user":"foo", "name":"bar"}""" val regex = """.*(?<="user":)"(.*)".*""".r regex.findAllIn(input).matchData map{m => m.group(1)} toList   The output is      res5: List[String] = List("foo\", \"name\":\"bar")  Now I can easily change my regex to   val regex = """.*(?<="user":)"([^"]+)".*""".r   That's not the point...  But my point is why did the .* grab the entire string? My understanding was that the Regex engine is greedy generous so the regex should have seen that after the (.*) there is a " so the generous part should have kicked in and the regex should have only matched the string foo but it seems that the generous part did not kick in.

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


I hope someone can answer this that has a good deep understanding of Python :)  Consider the following code:  >>> class A(object): ...     pass ... >>> def __repr__(self): ...     return "A" ... >>> from types import MethodType >>> a = A() >>> a <__main__.A object at 0x00AC6990> >>> repr(a) '<__main__.A object at 0x00AC6990>' >>> setattr(a, "__repr__", MethodType(__repr__, a, a.__class__)) >>> a <__main__.A object at 0x00AC6990> >>> repr(a) '<__main__.A object at 0x00AC6990>' >>>   Notice how repr(a) does not yield the expected result of "A" ? I want to know why this is the case and if there is a way to achieve this...  I contrast, the following example works however (Maybe because we're not trying to override a special method?):  >>> class A(object): ...     def foo(self): ...             return "foo" ... >>> def bar(self): ...     return "bar" ... >>> from types import MethodType >>> a = A() >>> a.foo() 'foo' >>> setattr(a, "foo", MethodType(bar, a, a.__class__)) >>> a.foo() 'bar' >>>

Is there a way in Python to override a class method at instance level? For example:  class Dog:     def bark(self):         print "WOOF"  boby = Dog() boby.bark() # WOOF # METHOD OVERRIDE boby.bark() # WoOoOoF!!


After logging in to my system, the dash, top panel and title bars of windows are not being displayed. I tried opening dash by pressing the window key but it was of no use.  On my desktop, I had two shortcuts to some folders I use regularly. Using it I was able to open the nautilus explorer which let me realize that also the title bars are not being displayed.  Despite the comment at the start of  answer, I tried it never the less. Surprisingly, it seems compizconfig-settings-manager was already installed on my system and the Ubuntu Unity Plugin and Enable OpenGL checkboxes were already checked. I may have installed it when this system used to be an older version of Ubuntu but I don't remember doing it.  I also tried the following (again expecting it to work against all odds).  unity --replace   But the issue persists.  I thought of trying to get a screenshot but it would just have been my wallpaper with the two icons or maybe the title bar less window of nautilus. I don't think it would have helped anyway.  This system used to be 14.04 which I had then upgraded to 16.04. It used to work fine up until yesterday. I don't know what happened now.  Really need help with this :(    Update #1  As I mentioned, I've already tried most of the solutions given against  question; None helped.

When I login, nothing happens.   I am presented with my desktop wallpaper.    No Dash, no Launcher, nothing.


I'm in a network where I have to use local package repository. I would like to add some packages to this repository so that all computers using this repository can install it via the MiKTeX package manager. It seems to work fine with some packages, but .zip-packages are not listed in the MiKTeX package manager, even though they are copied to the local repository directory.  The specific packages are from texample:       How can I make the package manager listing these packages from my local directory?

I'm new to LaTeX, investigating using it for some work projects.  I'm using MiKTeX on Windows.  My employer's locked-down network blocks the application's automatic installation function.  I can take my laptop home and successfully install from there, but if I need a package in the middle of the day I'm stuck.  I am able to access the CTAN website and download the package files (.dtx or .ins?), but I don't know what do do with them.  How can I do a manual package installation?


Let $n$ be an odd integer not divisible by $3$. Prove that $n^2 \equiv 1 \ (\mathrm{mod}\ 24)$. We just started congruences in class so I'm a little stuck as to how to solve this.  So far, I've done: $24 \mid n^2 - 1$ and since $n$ is odd, I defined $n = 2m + 1$ for some integer $m$. Plugging that in gives me $24 \mid 4m(m+1)$, and now I'm not sure what to do with this. Where did I go wrong/any tips on how to solve this?

Let $p>3$ be a prime. Prove that $24 \mid p^2-1$.   I know this is very basic and old hat to many, but I love this question and I am interested in seeing whether there are any proofs beyond the two I already know.


Could anyone tell me why this is not working in Python?  s = "conversion of hotel into 16no managed flats" re.sub("((?<=\d\w|\w\d)|(?<=\d))(\s*NO\.|NO\s)", " no ", s, re.IGNORECASE)   It's working in https://regex101.com/ with Python engine selected.  I've overcame the look-behind fix length issue but not quite.

The Python docs say:     re.MULTILINE: When specified, the pattern character '^' matches at the beginning of the string and at the beginning of each line (immediately following each newline)... By default, '^' matches only at the beginning of the string...   So what's going on when I get the following unexpected result?  >>> import re >>> s = """// The quick brown fox. ... // Jumped over the lazy dog.""" >>> re.sub('^//', '', s, re.MULTILINE) ' The quick brown fox.\n// Jumped over the lazy dog.'


I have installed 16.04 on my macbook recently for use with work etc, and have not really had any issues up to this point, but I would simply like to access the files on my Mac partition, namely music files from Ubuntu.  I am able to mount the drive fine, see quite a few folders, but as soon as I try and access the downloads/music folder, I am unable to access anything due to permissions.  If I use the gksudo nautiluscommand, I am able to access everything fine, but it doesnt really make things easier as I ideally just like to be able to access as a normal user.   Information I've found so far seems outdated.

On my mac I'm using an unjournaled HFS partition to share files between OSX 10.8 and Ubuntu 12.04. It was a nice thought at first, because Time Machine will automatically backup the volume in OSX, but I soon noticed that OSX and Ubuntu mess with the permission in a way that makes things messy for me. So, in order to fully view and change files, I keep using chmod to apply permissions that will allow me to fully use a document. But I don't understand why I have to keep applying changes over and over. Is possible to set some kind of permission permanently so that both operating systems will respect permanently? I guess 777 will work, but I thought that this is not a smart thing to do. But as long as  'others' does not get full access (third seven), I see a lock icon on the file in ubuntu.


The problem is that through terminal I get a "didn't download". There may be a problem with network connection, I am using WIFI?

Recently I have installed an older version of Ubuntu on my old machine. Whenever I try to install any software, I get an error saying it couldn't be found:  $ sudo apt-get install vlc Reading package lists... Done                Building dependency tree        Reading state information... Done     E: Couldn't find package vlc


I used to do research (mostly computer science) at university X, including work on my master's thesis, parts of which I now want to publish.  However, I recently started working at another academic institution, university Y, where my research focus is slightly different – so there's no big topical overlap.  If I had submitted a paper a few months ago, I would have listed myself and my thesis supervisor as the authors, with my old affiliation of university X. But now, should I just change my affiliation to university Y? Would it be considered unethical to publish something that wasn't approved by them? (Even if I did it in my spare time?)  What is the recommended way to follow here?

I am moving from one job to another (postdoc to tenure track) this summer and I have papers in several stages of being written, these go from handwritten notes with all the necessary arguments to under revision at a journal. All the papers will have my new contact information put on them but where is the line for changing affiliation? It seems obvious to me that the one that is still in the handwritten notes stage will get the new affiliation and that the ones under revision won't. So somewhere in between is a line.   Where is it?  There are some similar questions so far (see  and  but they do not seem to be quite the same situation since I am not changing fields and the appointments are not concurrent.


It is not easy to understand why this becomes a hard problem.  The discrete logarithm problem as defined : “any integer k that solves $b^k = \{g\mod{n}\}$ is termed a discrete logarithm” i.e.: Finding an integer $k$ for $b$ and $g$ known in $b^k=\{g\mod{n}\}$  I wonder. Is the reverse, that is: Finding an integer $b$ for $k$ and $g$ known in $b^k=\{g\mod{n}\}$  equally difficult (equivalent), or there are easy ways to solve the later, and if so, how?  Edit:  analysis of “roots”. And  for n composite.  Edit: A  of the discrete logarithm problem is: “Discrete logarithms are perhaps simplest to understand in the group . This is the group of multiplication modulo the prime p.”  That was the initial intent of the question. But I realize that a general answer may be more apropiate.

Is there an efficient way (algorihtm) to compute the solutions of the congruence $x^n\equiv a \pmod p$?   $n\in \mathbb{N}$ $a\in\mathbb{Z}_p$ $p$ is a large prime number   Note that:   By efficient I mean computationally efficient even when the given prime $p$ is appropriate for use in cryptographic protocols (hard to find discrete logarithm in $\mathbb{Z}_p$) We do not know the prime factors of $p-1$.   It’s easy to find one solution when $\gcd(n,p-1)=1$.  I think this should be as hard as finding a Discrete Logarithm or as Factoring. Any ideas ? Thank you for your time.