I have a script that is hitting a System.LimitException: Regex too complicated Error and so to combat this I've come up with a solution to chunk up the string and then do the regex to the chunks so that it wont hit that limit. Here is the problem, finding a clean way to cut up the document so that it still works. Originally I was cutting the string up by every new line String.split('\r\n|\r|\n') so it could then digest it line by line (but if the document was too long it hit the above limit) so now im targeting some text and then want to get the next new line that comes after so it will be a clean cut. So really I need to figure out the regex for the String.split() method to match the substring I give it then find the newline after that to split on. so for example: If myString = '22:45:07.0 (1307331)|HEAP_ALLOCATE|[139]|Bytes:6 /n 22:45:07.0 (1328106)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:27 /n 22:45:07.0 (1358441)|METHOD_ENTRY| [2]|01p4x000006c0jb|AttachmentTriggerLogic_Test.AttachmentTriggerLogic_Test() /n 22:45:07.0 (1374280)|STATEMENT_EXECUTE|[2] /n 22:45:07.0 (1383574)|STATEMENT_EXECUTE|[2] /n 22:45:07.0 (1386012)|STATEMENT_EXECUTE|[4] /n' and I target substring ')|METHOD_ENTRY|', how then would i be able to find the newline after it? The new line regex im using now is: '\r\n|\r|\n' I was thinking of using String.indexOf(substring, index) but I need it to be String.indexOf(REGEX, index) and when I try it using a regex it returns -1 as it cant find the regex (since thats not a sub string lol) I just need to find the position on of the end of line after the firstIndex I match. so really after trying a few things im down to just coming up with a regex for the String.split() method that matches the substring ')|METHOD_ENTRY|' and then finds the end of the line after that to split on? Let me know if anyone has any ideas? or other ways?

I have created a function wherein I split a string from the csv filecsvAsString.split('\n') . It is working when the string is not so big. But when I try to split a very large string, an error will occur      regex too complicated   what I want to do is to catch if an error occur during the split process. How will I do it ? I've tried to use try and catch but the problem still occur. Is there any other possible solution?


I used to use this command cd /Foldername to navigate the folder. But I am facing a problem with this now I need to use this command cd ~/foldername for navigating. Please have a look on the screen capture:   The fact is how can I retrieve the old command? I prefer the old command.

I have been googling how to use the terminal in Ubuntu 14.04. Many years ago, I could find my way around DOS,  albeit I'm a bit rusty. It seems that it's basically similar but when I try to change directory all I get is no such file or directory. This happens on every cd command I tried.  I even followed youtube videos and still no joy. Is there an app I need to install first? I want to install tarz files I have downloaded but I still want to be able to use the terminal for other things.


My goal is to convert an integer:  int = 1234;   to an array:  int converted[] = {1,2,3,4};   Can you give me a tip what I will need for programming this?

I am trying to convert an integer number in C into an array containing each of that number's digits  i.e.  if I have   int number = 5400   how can I get to   int numberArray[4]   where   numberArray[0] = 0; numberArray[1] = 0; numberArray[2] = 4; numberArray[3] = 5;   Any suggestions gratefully received.


I'm working on an JBoss 6.1 environment, which the default options doesn't enable the debug, and everybody sometimes forget to add that option on the deploy. I was wondering if there is a way to enable the debug in an already deployed JBoss... That would be very helpful, depending on the project, restarting the application can last 3 hours! Also, I am using Seam 3.0 (I don't know if that could help in some way).

Normally to attach a debuger to a running jvm you would need start the jvm with arguments such as the following:  > java -Xdebug -Xrunjdwp:transport=dt_socket,address=1000,server=y,suspend=n   Now if I want to debug a process that wasn't started in debug mode, what can I do?  This situation arrises when a production system (i.e. started without debug args) exhibits a 'random' (I use the term loosely) bug. So I can't restart the jvm with the appropriate arguments, because nobody knows how to reproduce the bug again. Is it impossible to attach to the JVM in this situation?  Just to clarify it is not possible to use tools like jdb to attach to already running JVMs unless they were started in debug mode  from the JVM man page     Another way to use jdb is by attaching it to a Java VM that is   already running. A VM that is to be   debugged with jdb must be started with   the following options:


When I try below:  backup database not_existing_db to disk = 'E:\Backup\not_existing_db.bak'   SSMS shows two error messages:  Msg 911, Level 16, State 11, Line 22 Database 'not_existing_db' does not exist. Make sure that the name is entered correctly.  Msg 3013, Level 16, State 1, Line 22 BACKUP DATABASE is terminating abnormally.   When I try to encapsulate it into TRY...CATCH block like below:  begin try     backup database not_existing_db to disk = 'E:\Backup\not_existing_db.bak' end try begin catch     select ERROR_MESSAGE() end catch   error_message() only shows second error which is not informative at all  I want to find a way to log both messages, so most informative error message (first) could be send by email to DBA   Please help to find out how to do that

When issuing a backup command within a stored procedure that uses a try catch and dynamic sql, the error messages are very general when compared to running the backup command directly.  Try/Catch within SP:         begin try         execute sp_executesql @sql;  -- a backup command     end try     begin catch           print ERROR_MESSAGE();  -- save to log, etc.     end catch   Results in      50000:usp_Backup:117:  BACKUP DATABASE is terminating abnormally.   wheareas issuing the raw command:      backup DATABASE someDb to disk...   Results in better details:         Lookup Error - SQL Server Database Error: A nonrecoverable I/O error     occurred on file "H:\FolderName\Filename.bak:" 112(There is not enough     space on the disk.).   Is there a way to catch these details into variables within the stored procedure (to log, pass back to caller, for retry logic)?  It seems the details are coming through on the message channel but I would like them available within the SP.


I am running kernel 4.1.15, sometimes in /var/log/messages i am getting series of ^@ characters. Normally the content is ok in /var/log/messages it is just for once for few seconds i got these junk characters. Any idea why?

I have a small server which I use for testing and programming. Currently it runs Debian 9.4 stretch with 4.14.0-0.bpo.3-amd64 kernel.  Today I tried to connect through SSH but I couldn't then I tried to ping it and it was unreachable. Therefore I had to hard-restart it by unplugging power cable. Then I went to  /var/log/syslog  and I found a strange line containing exactly 6140 characters like the following  ^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@  then nothing else until new log entries of system restart. This is actually the first time it happens.  Does someone know what could it be?


I'm trying to remember the name of a novel I remember reading in the 90s about attempting to develop anti-gravity. General Googling hasn't brought up anything, I guess it was probably not well-known (I can't even remember how good it was, just very vague memories!) and likely well out of print. Not sure when it was written though, may well have been 70s or 80s. The premise as I remember it was the US government gathered together some of their best scientists and mathematicians, and told them (incorrectly - on purpose) that the Soviets had developed some form of "anti-gravity", and that they needed to re-create it for the US in a form of "Manhattan project".

This is a short story from the 50s or 60s.  A scientist or inventor has invented either teleportation or a space drive and has disappeared - leaving no documentation or clues except his extensive home library.  The government gathers all types of scientists to attempt to duplicate his research.  Several months later, as they are about to launch the first space drive space ship, the officer in charge reveals that there was no 'disappeared inventor'.  The greatest step toward a new impossible concept is knowing that it has already been done.


If I have the following code:  def f():     print 'ok!'     import sys     sys.exit()  if __name__=='__main__':     import billiard     billiard.forking_enable(0)     p = billiard.Process( target=f)     p.start()     while p.is_alive():         pass   The script behaves as expected, printing "ok!" and ending. But if I omit the if __name__=='__main__': line and de-indent the following lines, my machine (OS X) goes crazy, continually spawning tons of Python processes until I killall Python. Any idea what's going on here?  (To those marking this as a duplicate, note that while the other question asks the purpose of  if __name__=='__main__' generally, I'm specifically asking why failure to use it here causes dramatically unexpected behaviour)

Given the following code, what does the if __name__ == "__main__": do?  # Threading example import time, thread  def myfunction(string, sleeptime, lock, *args):     while True:         lock.acquire()         time.sleep(sleeptime)         lock.release()         time.sleep(sleeptime)  if __name__ == "__main__":     lock = thread.allocate_lock()     thread.start_new_thread(myfunction, ("Thread #: 1", 2, lock))     thread.start_new_thread(myfunction, ("Thread #: 2", 2, lock))


If we introduce $j$ for $\frac{1}{0}$, then $\frac{2}{0}$ will be $2j$ and $\frac{3}{0}$ will be $3j$ ,etc.  So, I'm asking to call the solution of $x\cdot 0=1$ $j$ and discover properties of $j$ just like we did with $i$.  But, if we say $j\cdot 0=1$ for some $j$, then, since for any $j$, $j\cdot 0=0$, so it will give the contradiction $0=1$.  But, we can mend the rules for $j$. I mean, we follow the rule $\sqrt{a}\cdot \sqrt{b}=-\sqrt{ab}$ for negative $a$ and $b$. If we don't follow this rule, then this contradiction happens:  Let's suppose $i$ exists.  Then $i^2=\sqrt{-1}\cdot \sqrt{-1}=\sqrt{(-1)(-1)}=\sqrt{1}=1$, which is a contradiction, because we've assumed $i^2=-1$. So, $i$ does not exist.  But we changed the rules for $i$ to avoid this contradiction.  Then, why can't we change the rules for $j$ to avoid contradictions? I mean, we can say $x\cdot 0=0$ only if $x\neq j$.  EDIT: As a side note, why can't we define $\frac{1}{0}$ to be $\infty$? It seems soo.. intuitive to say that $\frac{1}{0}=\infty$ and $\frac{1}{\infty}=0$,

Why don't we define $\frac 10$ as $j$ , $\frac 20$ as $2j$ , and so on? I know that by following the rules of math this eventually leads to $1=2$ , but we could make an exception and say that $j$ is the only number such that $0*j \not= 0$ , and put other restrictions necesary so that we don't get contradictions. We do this for $i$ , so why can't we do it here? For example, $i^2$ , is defined as $-1$ , but you could also say $i^2=\sqrt {-1} *\sqrt {-1}=\sqrt {(-1)(-1)}=\sqrt{1}=1$ , but we make an exception for this.


Controller.java  Map<String, String[]> formData  = request().body().asFormUrlEncoded();      if(formData.get("firstName") != null) {         JOptionPane.showMessageDialog(null, "not null");      }   When I click the save button after I run the program, it always returns an error message of NullPointerException even if I put a value in the firstName textbox.

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


I have gone through two proofs to show that matrices of rank $k$, where $0 \leq k \leq \min(m,n)$ form a submanifold of the set $ M(m \times n ,\mathbb{R}) $. Both proofs involve writing down an arbitrary matrix in the set considered, as :  $$ X = \begin{bmatrix} A & B \\ C & D \\ \end{bmatrix}$$  where $A$ is assumed to be of a minor of order $ k \times k$ that has non-zero determinant,(which I understand) and then they ask us to consider either the matrix :  $$ M_X= \begin{bmatrix} A^{-1} & -A^{-1}B \\ 0      &  I_{n-k} \\ \end{bmatrix}$$  or alternatively:  $$M_X= \begin{bmatrix} I & -A^{-1}B\\ 0 &  I \end{bmatrix}$$  This is followed by multiplication of $X$ with $M_X$. I understand what follows next. But this particular choice of matrix seemed to be picked out of the air as I viewed it.Could anyone please help motivate this idea??  Ref: The proof is found in J.Lee's Introduction to Smooth Manifolds, pg 117, ex 5.30.

I'm reading through G&P's Differential Topology book, but I hit a wall at the end of section 4. There is a result stating     The set $X=\{A\in M_{m\times n}(\mathbb{R}):\mathrm{rk}(A)=r\}$ is a submanifold of $\mathbb{R}^{m\times n}$ with codimension $(m-r)(n-r)$.    There is a suggestion: Let $A\in M_{m\times n}(\mathbb{R})$ have form $$ A=\begin{pmatrix} B & C \\ D & E\end{pmatrix} $$ where $B$ is an invertible $r\times r$ matrix. Then right multiply by $$ \begin{pmatrix} I & -BC^{-1} \\ 0 & I \end{pmatrix} $$ and show $\mathrm{rk}(A)=r$ iff $E-DB^{-1}C=0$.  I multiplied out and got the matrix $$ M:=\begin{pmatrix} B & 0 \\ D & E-DB^{-1}C\end{pmatrix}. $$  Since I multiplied by a nonsingular matrix, I know that $\mathrm{rk}(A)=\mathrm{rk}(M)$. If $E-DB^{-1}C=0$, then  $$ M=\begin{pmatrix} B & 0 \\ D & 0 \end{pmatrix} $$ has rank $r$, so $A$ has rank $r$. For the converse, if $A$ has rank $r$, then $M$ has rank $r$, so by performing row operations, $M$ is row equivalent to a matrix of the form $$ \begin{pmatrix} I_r & 0 \\ 0 & 0 \end{pmatrix}. $$ This would imply $E-DB^{-1}C$ is row equivalent to $0$, and I think this implies $E-DB^{-1}C=0$.  My main concern is then, how does this approach imply $\mathrm{codim}(X)=(m-r)(n-r)$? Is there some special map I can apply the Preimage Theorem to?  Thank you.


I'm trying to write a testMethod to cover a method that is using .getContent(). Here is a sample of code i want to cover    global class ExportReport {    @future(callout = true)    public static void sendMailReport() {        ApexPages.PageReference report = new ApexPages.PageReference('/' + Params_Report__c.getInstance().Id_Report__c + '?csv=1&isdtp=p1');         Messaging.EmailFileAttachment pj = new Messaging.EmailFileAttachment();        pj.setContentType('text/csv');        pj.setBody(report.getContent());        pj.setFileName('Name.csv');  After that, i make an email with pj as FileAttachments. I tried this as testMethod : static testMethod void testsendMailReport() { Test.StartTest();     ExportReport ajob = new ExportReport();     ExportReport.sendMailReport();     Integer invocations = Limits.getEmailInvocations(); Test.StopTest();     System.assertEquals(1, invocations, 'Mail Sent'); }  But I obtained this error message:  Methods defined as TestMethod do not support getContent call  How do I fix it?

My below test fails because of Run Failures: TestRangehoodObjectionSheet.RangehoodObjectionSheetTest Methods defined as TestMethod do not support getContent call. I added the Blob thinking it might resolve but it doesn't work. What could be the problem here? Have I used the Blob correctly?  @isTest public with sharing class TestRangehoodObjectionSheet {      static testMethod void RangehoodObjectionSheetTest() {             String Build                = NBATRecords.getIdFromDeveloperName('Plan_Reviews__c','Building_Plan_Review');             Account a = new Account(Name = 'Test1' ,Type = 'Lead Acct',BillingState = 'CA',Industry = 'Business Services');             insert a;              Establishment_Record__c er = new Establishment_Record__c(Account__c=a.Id ,Project_Name__c = 'TestPreet',PremiseStreet__c='Manhattan ave',PremiseBorough__c='Manhattan',PremiseState__c='NY',PremisePostalCode__c='11102',Referral_Source__c='311',Data_Source__c='CAMIS',Phase__c='Initiate',Business_Status__c='Open' );             insert er;              Application__c ap = new Application__c(Establishment_Record__c=er.Id,Job_Number__c='222222222');             insert ap;              Plan_Reviews__c pr = new Plan_Reviews__c(Application__c =ap.Id ,DOB_Job_Number__c='222222222',RecordTypeId =Build,Objections__c='Pipe size not indicated');             insert pr;             PageReference pageRef = Page.RangehoodObjectionSheet;              Test.setCurrentPage(pageRef);               Blob content = Test.isRunningTest() ? Blob.valueOf('UNIT.TEST') : pageRef.getContent();              Plan_Reviews__c              p   = new Plan_Reviews__c(id=pr.Id);                ApexPages.StandardController sc  = new ApexPages.standardController(p);             System.assertNotEquals(sc,null);             RangehoodObjectionExtention    ext = new RangehoodObjectionExtention(sc);              ext.Savecopy();       } }   Actual class for the test:  public with sharing class RangehoodObjectionExtention { private final ApexPages.StandardController controller; private final Id                           planreviewID; public String imageURL{get;set;} public List<String> objlist {get;set;}  public string currentdate {get; set;}    public RangehoodObjectionExtention (ApexPages.StandardController stdController) {         controller   = stdController;         planreviewID = (Id)controller.getRecord().get('Id');         Date dt = Date.today();         currentdate = dt.format();         list<Plan_Reviews__c> prlist = [select FDNY_Objections__c from Plan_Reviews__c where id = :planreviewID limit 1];         string obj;         for(Plan_Reviews__c pr: prlist){            obj = pr.FDNY_Objections__c;             }         if(obj!=null){            list<string> objections = obj.split(';');             integer i =1;            objlist = new list<string>();            for(string o : objections){               objlist.add(i++ +'. '+o);            }         }         imageURL='/servlet/servlet.FileDownload?file=';         List< document > documentList=[select name from document where Name='RangehoodObjectionLogo'];         if(documentList.size()>0)         {            imageURL=imageURL+documentList[0].id;         }       }          public PageReference Savecopy(){       PageReference p = Page.RangehoodObjectionSheet;       blob b = ApexPages.currentPage().getContentAsPDF ();       Attachment a = new Attachment();       a.body = b;       a.name = 'Rangehood Objection sheet Issued '+currentdate+'.pdf';       a.parentid = planreviewID;        insert a;        PageReference pref = new PageReference('/'+planreviewID);       return pref;    } }


Im having a brain fart at the moment, most likely due to being late at night. Any who, I have content that is prepended to the document after an ajax call. I am trying to assign a click event to these elements that are being prepended but it is not firing. Recreating the elements in static html fine.  Jquery  $('.row').click(function() {     $(this).children('.slide2').stop().slideToggle(200); })   $('

'                          + data.some + '

'                           + data.some + '

'                           + data.some + '

'                          + data.some + '

'                          + data.some + '

'                          + data.some + '

Info: '                          + data.some + 'Info: '                          + data.some + 'Info: '                          + data.some + '

').prependTo('#results').hide().slideDown(500);

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


I am trying to understand why when we play a note on a stringed instrument, not only it oscillates with it's fundamental frequency but also the multiples of that. For instance if you play a D on the lowest string on the cello, it causes the one octave higher D string vibrate also, as well as all other multiples of the fundamental frequency. The explanation I've heard is that ''the string oscillates with all multiples of the fundamental frequency''. It seems to me any vibrating string with fixed ends oscillates with a a fixed frequency. What is meant by this sentence exactly? Does it have something to do with Fourier series?

I was wondering how it is possible for overtones to co-exist at the same time. When one pulls a string, it starts to oscillate and forms a standing wave with frequency $$f_0 = f$$ Additionally, infinite overtones oscillate at integer multiples of the fundamental frequeny:$$f_n = (n + 1) * f$$ with n being the nth overtone. Since all overtones are essentially standing waves too and standing waves are formed due to reflection and interference, wouldn't the existence of multiple overtones disturb the wave?   And not only overtones but any disturbance like interfering waves from the environment, wouldn't they hinder the creating of standing waves? And lastly (from a physical standpoint) why has the fundamental frequency the greatest amplitude?


Lets consider there is channel between Alice and Bob, sequered with quantum cryptography.  To put it simple, Alice is left, Bob  is right  and the quantum states are 'up'  ~ U and 'down'  ~ D.  Alice and Bob generates pair of bounded particles ,always one u one d but you dont know wtigth one flyes left or right , what fly always in both direction. Also they can capture particles. If captured, a particle is destroyed.   Alice captures the particle what flyes left and sends free what flyes to the right, Bob does the mirrored. If anyone captures the particle, he would know that other particle of the pair is.   Lets consider the MiM attacker Eve, what can do like Alice and Bob do.  Eve captures the next particle send by Alice, let it be U. So she knows, that the particle what Alice captured locally was D. But the particle U is destroyed, Bob will know that way, that there is something wrong with the channel.   Important : Eve then generates own particles, while capturing the left one.  If the captured is D, Eve knows that the pair is U and it might be send further to Bob. In the model that there are only 2 states, the probability of producing the right pair is 50% , therefore Eve in average need to be capable to generate and send particles twice faster that Alice and Bob do, that generally fair possible practicly.  Alice can not distinguish between cases whether a sent particle was captured by Bob or Eve, neither Bob can distinguish,  because the quantum features of particles match.  Later Eve can, as usually in MiM take over a channel and start to send false data to them.  Is there something wrong it this szenario or generaly quantum cryptography is a big talk about nothing?

i read this recently:   and some parts of this:   they talk about direct fibre optic cable and evesdropping that seems passive.  i want to know whether quantum key distribution provides any security against active attacks too?  i mean, for example isn't it possible that fibre optic cable is cut at some point in its path by an attacker and then he places a repeater there and before repeating the signal he can read the secret information in the channel?


I modified both /etc/hosts and /private/etc/hosts here it is  ## # Host Database # # localhost is used to configure the loopback interface # when the system is booting.  Do not change this entry. ## 127.0.0.1   localhost 255.255.255.255 broadcasthost ::1             localhost  fe80::1%lo0 localhost 0.0.0.0 www.facebook.com 0.0.0.0 facebook.com 0.0.0.0 login.facebook.com 0.0.0.0 www.login.facebook.com 0.0.0.0 fbcdn.net 0.0.0.0 www.fbcdn.net 0.0.0.0 fbcdn.com 0.0.0.0 www.fbcdn.com 0.0.0.0 static.ak.fbcdn.net 0.0.0.0 static.ak.connect.facebook.com 0.0.0.0 connect.facebook.net 0.0.0.0 www.connect.facebook.net 0.0.0.0 apps.facebook.com   Apparently firefox still can connect to facebook, but apparently a ping facebook.com times out as expected. I even restarted firefox without success.  I've also ran  dscacheutil -flushcache;sudo killall -HUP mDNSResponder   Any idea ?

It worked for a while in the old configuration, but then stopped working for some reason.  Here is my /etc/hosts file from my Mountain Lion MacBook Air:  127.0.0.1 reddit.com www.reddit.com 127.0.0.1 facebook.com www.facebook.com ## # Host Database # # localhost is used to configure the loopback interface # when the system is booting.  Do not change this entry. ## 127.0.0.1       localhost 255.255.255.255 broadcasthost ::1             localhost fe80::1%lo0     localhost   This blocks Reddit,but not Facebook.   I've tried flushing the DNS cache for the machine ("sudo killall -HUP mDNSResponder"), the bowsers (FF and Chrome) and I've tried restarting the computer.   And I've moved the entries to the top of the file on the , but it didn't work before when it was at the bottom either. Each time it would block Reddit but not Facebook.


So I'm creating an application which will give you stats on you spotify account etc, after successfully logging in I'm trying to determin your Subscription status from the  page.  Dim Info As Match = Regex.Match(html, "
(\d+)
") Label3.Text = "Account Type: " + Info.Groups(1).Value   When writing the outcome of Info.Groups(1).Value to the console I get a blank, Any Ideas on how to get the value between the

's?

I would like to know if there is a simple way to parse HTML in vb.net. I know that HTML is not sctrict subset of XML, but it would be nice if it could be treated that way.  Is there anything out there that would let me parse HTML in an XML-like way in VB.net?


I'm having this issue with my model. Once I applied the rig the left side (models right) seems to be snagging on something yet it's a mirror of the right side. Does anyone know what could be causing this? I noticed by moving the other leg it changes the shape of the deformation as well.

I follow this  which uses rigify and I have run into some issues.    Not every vertex moves along the rig. Any idea what could cause this? I applied the location and rotation for every object.  The entire head is weight painted with blue.


This is my first system with UEFI.... Laptop name: HP Envy 15 Notebook PC (with Touchscreen).... OS installed: Windows 10, self installed .... Processor: Intel i7-5500U @ 2.40GHz (4 CPUs) .... Ram: 8 GB .... It has Intel HD Graphics 5500 and Nvidia Geforce GTX 850M .... I created a LiveUSB of Ubuntu 15.04. md5 was fine. it worked on a friends PC. But in my laptop, I can boot from it. I select "try Ubuntu without installing" Then this happens:  Then this happens:  After this Ubuntu regular boot image starts (the purple screen with Ubuntu logo) never to move ahead.  Edit: I use the nomodeset option. Boot the LiveCD/LiveUSB .. when you get to the screen where it ask if you want to install or try Ubuntu, leave "Try Ubuntu" highlighted and hit e....... Change quiet splash --  make it end with:-  quiet splash nomodeset

I am trying to boot Ubuntu on my computer.  When I boot Ubuntu, it boots to a black screen.  How can I fix this? Table of Contents:


I was going through the differences between Array List and Linked List implementations of the List interface in Java. Almost all resources, I went through told that Array Lists provide better performanceO(1)for Index Based Operations(Searching etc.) and require shifting of elements (or copying in this case) for insertions and deletions.On the other hand, Linked lists are better for Insertions and deletions as it requires just the change of the references and instantiation of the Node object. Then I came across this one article which stated      In most cases, however, ArrayList outperforms LinkedList. Even elements shifting in ArrayList, while being an O(n) operation, is implemented as a very fast System.arraycopy() call. It can even appear faster than the LinkedList‘s O(1) insertion which requires instantiating a Node object and updating multiple references under the hood. LinkedList also can have a large memory overhead due to a creation of multiple small Node objects.   This made me think that if the copying of the elements for insertion/deletion(in ArrayList) can be faster than the instantiation of node and subsequent change of references(in LinkedList), then Array List should outperform Linked List for each use case. Now My question is that if this is true then what are the use cases for the Linked Lists? Please enlighten me if this premise is wrong

I've always been one to simply use:  List<String> names = new ArrayList<>();   I use the interface as the type name for portability, so that when I ask questions such as these I can rework my code.    When should  be used over  and vice-versa?


I have to prove this theorem - Let $A$, $B$, and $C$ be sets. Then, $A \times (B \Delta C) = (A \times B) \Delta (A \times C)$.  I was wondering if this was the right way to start the proof?  Let $m$ be an arbitrary element of $A \times (B \Delta C)$. Then, $m=(x,y)$ s.t. $x \in A$ and $y \in (B \Delta C)$ by the definition of cartesian products. Then, $(m \in A) \land (y \in B) \land (y \not\in C)$ by the definition of set difference. So, $((x,y) \in A \times B) \land ((x,y) \not\in A \times C)$ by the definition of cartesian product. Thus, $(x,y) \in (A \times B) \Delta (A \times C)$.  So basically the LHS = RHS because (x,y) is an element of both sides?

I've figured out the following statement is true but I was wondering how you actually go about proving something like this?   $A \times (B \triangle C) = (A \times B) \triangle (A \times C)$


evaluate $\lim_{n\to \infty} \left \{\frac{1}{k.n}+\frac{1}{k(n+1)}+\frac{1}{k(n+2)}+...+\frac{1}{k(n+p-k)} \right \}$    i think it can be written as a integral somehow but i can't

There are four options. Which of them is correct?- (a)${p\over k}$ (b)${k\over p}$ (c)$\log({p\over k})$ (d)${\log p\over k}$ I somehow want to use the rule for evaluating this kind of sum using integration, i.e. $\int_{0}^{1} f(x) \ dx=\lim_{n\to\infty} {1\over n}\sum_{r=1}^{n}f({r\over n})$  But the given expression $\lim_{n\to\infty} [{1\over kn}+{1\over k(n+1)}+{1\over k(n+2)}+\cdots+{1\over k(n+p-k)}]={1\over k}\lim_{n\to\infty}{1\over n}\sum_{r=0}^{p-k}\frac{1}{1+{r\over n}}$, sum running from $0$ to $p-k$ instead of $n$. So, how to evaluate this limit? Thanks for assistance in advance.


I need to render a model on a transparent background. The models have a light source so they should be casting a shadow on a surface (the XY plane). The purpose for this is to overlay the rendered images (out of blender) on an image of the actual surface, so I want to generate the render including a semi-transparent shadow.  I don´t have any problem rendering the models on transparent background, but I can not make a shadow appear. I tried adding a surface below the model so the shadow can fall on it, but now there's the problem of keeping the surface from rendering.  How can I render the shadow on a transparent background?

In most of my models, I usually end up setting a world background using an HDRI image of some kind or another. This has always been really useful for lighting in general or as a background for my final render.  But what if I want my model to look like it is interacting or touching part of the background? For example, in the image below that I found, the modeled objects look like they're part of the scene, and even appear to cast shadows on the ground. How can I do this?


I have looked everywhere and I cannot find a good mouselook script that limits the up and down rotation of the camera.  I've already found many scripts that do not limit it. I want one that stays steady and does not wobble one you are not moving your mouse.

Is there a mouselook script that's exactly the same as the classic one except it moves left and right, not up and down. If there isn't one then can you show a property hook script that enables/disables up and down rotation.


What does 192.168.1.1 /4 mean? Is there a calculator that translates this kind of notation to a list of IP addresses? For that matter any type of notation so that it would be easy and quick in the future.  Anybody can give a short answer so I wouldn't need to study the whole wiki page?  thanks

This is a  about IPv4 Subnets.      Related:               How does Subnetting Work, and How do you do it by hand or in your head?  Can someone explain both conceptually and with several examples? Server Fault gets lots of subnetting homework questions, so we could use an answer to point them to on Server Fault itself.   If I have a network, how do I figure out how to split it up? If I am given a netmask, how do I know what the network Range is for it? Sometimes there is a slash followed by a number, what is that number? Sometimes there is a subnet mask, but also a wildcard mask, they seem like the same thing but they are different? Someone mentioned something about knowing binary for this?


In JavaScript, single and double quotes are somewhat interchangeable and largely a matter of styles (There is a good discussion of why this isn't actually the case in one of the answers here: ). How are chars and strings handled in C#?  For example:  string test = "hello world"; string test2 = 'hello world'; // Too many characters in character literal char test3 = 'a'; char test4 = "a"; // Cannot implicitly convert type string to char   It looks like strings and chars are being handled as separate, interchangeable types, and that the use of single or double quotes demarcates this?  What is the relationship between chars and strings in typed languages? Specifically, would it be correct to say that a string is an array of chars?

What's the difference between double quotes and single quote in C#?  I coded a program to count how many words are in a file  using System; using System.IO; namespace Consoleapp05 {     class Program     {         public static void Main(string[] args)         {             StreamReader sr = new StreamReader(@"C:\words.txt");             string text = sr.ReadToEnd();             int howmany = 0;             int howmany2 = 0;              for(int i = 0; i < text.Length; i++)             {                 if(text[i] == " ")                 {                 howmany++;                 }             }             howmany2 = howmany + 1;             Console.WriteLine("It is {0} words in the file", howmany2);             Console.ReadKey(true);         }     } }   This gives me an error because of the double quotes. My teacher told me to use single quote instead, but he didn't tell me why. So what's the difference between double quotes and single quote in C#?


I bought an Android 4.1.1 tablet, the ad said "comes with 8 GB". But when I go to the system configuration I get:  INTERNAL  1,18 GB total Apps 0,90 GB Available 161 MB  NAND FLASH Total 4,55 GB Free 4,17 GB  I ask the vendor where is the 8 GB, and they said: "the tablet comes with physical 8GB, but the Android System makes a partition for different purposes (Recovery, Loader, Apps, etc.) letting available for the user only 4 GB. The others partitions are not visible for the user. This is the same for all Android devices".  They are telling me the truth? or just are a bunch of liars and sold me an 4GB tablet ?  Android 4.1.1  Core 3.0.8+ Compilation P758.6.01.01.20 Brand: NOBLEX - Model: T7014AR  (official specification: RAM 1GB - Internal 8GB)   Thanks a lot.    EDIT:  u0_a78@android:/ $ df Filesystem             Size   Used   Free   Blksize /dev                  443.2M  36.0K  443.2M   4096 /mnt/asec             443.2M  0.0 K  443.2M   4096 /mnt/obb              443.2M  0.0 K  443.2M   4096 /system               607.4M  440.2M  167.2M  1024 /data                 1.2 G   1.0 G  153.8M   4096 /cache                629.9M  16.5M  613.4M   4096 /mnt/external_sd      941.7M  16.0K  941.7M   16384 /mnt/sdcard           4.5 G   382.1M  4.2 G   8192 /mnt/secure/asec: Permission denied /mnt/asec/com.robotinvader.fooding-1  36.5M  34.8M  1.7 M   4096 /mnt/asec/com.vkcode.SpaceTube-1  14.2M  12.6M  1.6 M   4096 1|u0_a78@android:/ $

I have an HTC Wildfire (the original, not the S version). It is supposed to have 512MB of memory. When I check my free space in the app manager I noticed I have around 185MB. Why is this?  I am using CyanogenMod which is around 80MB, if this wasn't accounted for there is still a lot of space missing. Why is my phone reporting so little?


How can I prove that  $$\lim_{(x,y)\to (0,0)} \frac{\left | x \right |^{\frac{3}{2}}y^{2}}{x^{4} + y^{2}} \rightarrow 0\;?$$  Thanks!

I have some trouble with this: Show that if $a, b \ge 0$, $c, d > 0$ and $\frac{a}{c} + \frac{b}{d} > 1$ then   $$\lim_{(x,y)\rightarrow (0,0)}\frac{\left|x\right|^a\left|y\right|^b}{\left|x\right|^c + \left|y\right|^d} = 0$$  we were not really shown how to evaluate multivariable limits other than trying different paths, which wouldn't work when the limit exists, or by applying the squeeze theorem which is my initial plan. Unfortunately I cannot find a proper bound for the denominator and so I am quite lost right now. Any help would be appreciated.


Let $f:\mathbb{R} \to \mathbb{R}$ be a function that's continuous at the origin. Show that if $$f(x+y)=f(x)+f(y)$$   for all $x, y \in\mathbb{R}$, then $f$ is continuous.   This was a problem on our homework and the TA's suggestion for the solution was the following:  Let's first show that $f(0) = 0$. Since $f(0) =f(0+0) = f(0)+f(0)$  we have that $f(0)=0$.  Now we get  $$\lim_{y\to x} f(y)=\lim_{h\to 0} f(x+h) = \lim_{h\to 0} (f(x) +f(h)) = \lim_{h\to 0} f(x) + \lim_{h\to 0} f(h) = f(x) +0=f(x).$$  I'm not very satisfied with this. There's no explanation for the result at all. Could someone open this up for me?   How can it be for sure that $f(0) =0$? They haven't given us any $f$. For all I know $f$ could be $f(x)= x^{73}+1$ and $f(0) = 1$? Where does he come up with $\lim_{y\to x}f(y)$ and how come this is equal to $\lim_{h\to 0} f(x+h)$? How does he get the result $\lim_{h\to 0} f(x) + \lim_{h\to 0} f(h) = f(x) +0$?

Suppose that $f: \mathbb R \to\mathbb  R$ satisfies $f(x + y) = f(x) + f(y)$ for each real $x,y$. Prove $f$ is continuous at $0$ if and only if $f$ is continuous on $\mathbb R$.  Proof: suppose $f$ is continuous at zero. Then let $R$ be an open interval containing zero. Then $f$ is continuous at zero if and only if $f(x) \to f(0)$ as $x \to 0$. Then $|f(x) - f(0)| < \epsilon$. Can anyone please help me? I don't really know how to continue. Thank you.


I want to find functions that are their own inverse function, so that  $$f(x) = f^{-1}(x)$$  and  $$f(f(x)) = x$$  I have managed to find the following examples:  $$f(x) = x$$  $$f(x) = -x + n$$  $$f(x) = \frac{1}{x - n} + n$$  Are there more examples?

What are the functions that are their own inverse?  (thus functions where $ f(f(x)) = x $ for a large domain)  I always thought there were only 4:  $f(x) = x , f(x) = -x , f(x) = \frac {1}{x} $ and $ f(x) = \frac {-1}{x} $   Later I heard about a fifth one     $$f(x) = \ln\left(\frac {e^x+1}{e^x-1}\right) $$ (for $x > 0$)  This made me wonder are there more? What are conditions that apply to all these functions to get more, etc.


I was trying to implement the scroll based animation. I mean i want to animate the content of a particular div when it comes in the view. To achieve this i have given the hard coded value to like   if($(window).scrollTop() > 700)   if there are so many section on a page then for all of them i will have to give the hard coded values.   is there a way to detect if a particular div is in view?  here is my HTML , CSS and JS.  HTML

     CSS  .container{     width: 100%;     height: 550px;     background: #ddd;     padding: 30px;     border-bottom: 1px solid black;     margin-bottom: 20px;     position: relative;     overflow: hidden;     perspective: 1000px;  } .clearFix{     clear: both; } .container > div{     display: block;     width: 22%;     height: 300px;     border:1px solid black;     background-color: #ccc;      padding: 10px;       text-align: justify;     position: absolute;     transition: all 1s ease-in-out;     transform-style: preserve-3d; } .text1{     left: 30px;     opacity: 0; } .text2{      right: 30px;     opacity: 0; } .container:nth-child(3) .text1{      transform: rotateY(90deg);     left: 200px; } .container:nth-child(3) .text2{      transform: rotateY(-90deg);     right: 200px;    } .section2T1{     transform: translate(200px) rotate(360deg) ;     opacity: 1; } .section2T2{     transform: translate(-200px) rotate(360deg) ;     opacity: 1; } .section3T1{     transform: rotateY(0deg) !important;     opacity: 1; } .section3T2{     transform: rotateY(0deg) !important;     opacity: 1;  }   JS  $(document).ready(function(){ $(".container:nth-child(1) .text1").delay(500).animate( {             left:200,             opacity: 1         },500);      $(".container:nth-child(1) .text2").delay(500).animate( {         right:200,         opacity: 1     },500);      $(document).on("scroll",function(){            if($(window).scrollTop() > 150){              $(".container:nth-child(2) .text1").delay(500).addClass("section2T1");              $(".container:nth-child(2) .text2").delay(500).addClass("section2T2");         }         else{             $(".container:nth-child(2) .text1").delay(500).removeClass("section2T1");              $(".container:nth-child(2) .text2").delay(500).removeClass("section2T2");          }           if($(window).scrollTop() > 700){              $(".container:nth-child(3) .text1").delay(500).addClass("section3T1");              $(".container:nth-child(3) .text2").delay(500).addClass("section3T2");         }         else{             $(".container:nth-child(3) .text1").delay(500).removeClass("section3T1");              $(".container:nth-child(3)        .text2").delay(500).removeClass("section3T2");         }    });  });

Is there an efficient way to tell if a DOM element (in an HTML document) is currently visible (appears in the viewport)?  (The question refers to Firefox.)


I would like to use cross-validation to test how predictive my mixed-effect logistic regression model is (model run with glmer). Is there an easy way to do this using a package in R? I've only seen cross validation functions in R for use with linear models.

My colleague and I are fitting a range of linear and nonlinear mixed effect models in R. We are asked to perform cross-validation on the fitted models so that one can verify that the effects observed are relatively generalizable. This is normally a trivial task, but in our case, we have to split the whole data into a training part and a testing part (for CV purposes) that share no common levels. For example,  The training data may be based on Groups 1,2,3,4; The fitted model is then cross-validated on Group 5.  So this creates a problem since the group-based random effects estimated on the training data do not apply to the testing data. Thus, we cannot CV the model.  Is there a relatively straightforward solution to this? Or has anyone written a package to tackle this problem yet? Any hint is welcome!  Thanks!


For each positive integer $n$, define $a_n = 20 + n^2 $ and $d_n = \gcd(a_n, a_{n+1})$. Find the set of all values that are taken by $d_n $ and show by examples that each of these values is achievable.   Hello! I hope everybody is doing great! Can anybody help me with the above problem?  I tried some values of $n $ and I think the answer may be $1,3,9$. I thought of using $\mod 3 $ and the fact that a square is congruent to $1 \pmod{3}$ and $20 \equiv 1 \pmod{3}$ but that did not really help.  Any help would be appreciated. Thanks.

I have tried to sopve this question and found the answer, but i cant find a proof. My answer is $1,3,9,27$. Thanks in advance to those who help me.


I have signed up with valid passwords and email address, but when I have to choose my name (even though I typed valid name, sticking with only letters) it keeps saying invalid. What am I doing wrong?

I am having trouble getting onto a server in Minecraft PE on iOS. When I tap on the person's server it just says invalid name:    I have tried turning off and restarting the iPad, going to home screen and logging back into the server but I have had no luck and no change. Is there a reason why this is so?


Please tell me what "would" means in this sentence.     In AmE, the phrase "go to hospital' would be not correct. One of the articles, a or the, would be necessary.

Do you think that "was going to be" or "would be" could be used as past tense of will?     I thought this book was going to be your choice.        I thought this book would be your choice.   Do these two sentences basically mean the same thing or are they slightly different?


I have strings in the format      Mar 25 2013 6:30PM   and I want to convert them to datetime objects in the format      2013-03-25 18:30:00   how would I go about doing this?

I have a datetime coming back from an XML file in the format:     20080916 11:02   as in      yyyymm hh:ss   How can i get the datetime.parse function to pick up on this? Ie parse it without erroring? Cheers


I'm on Ubuntu 19.04 and have been trying to install libgtk-3-dev, but getting the following error:  ~/Downloads/Software $ sudo apt install libgtk-3-dev Reading package lists... Done Building dependency tree        Reading state information... Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation:  The following packages have unmet dependencies:  libgtk-3-dev : Depends: libegl1-mesa-dev but it is not going to be installed                 Depends: libepoxy-dev (>= 1.0) but it is not going to be installed   I tried fixing with all the following:   sudo apt update && sudo apt upgrade (all good, no errors in output) sudo apt update --fix-missing (all good, no errors in output) sudo dpkg --configure -a (empty output, no errors) sudo aptitude install libgtk-3-dev (no errors, but package is not installed) Synaptic through UI (gives me the same error)   Nothing works. Any ideas what should I try next?

After upgrading from 10.04 to 12.04 I am trying to install different packages.  For instance ia32-libs and skype (4.0).  When trying to install these, I am getting the 'Unable to correct problems, you have held broken packages' error message.   Output of commands:  sudo apt-get install -f Reading package lists... Done Building dependency tree        Reading state information... Done 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.   After running this:  sudo dpkg --configure -a foo@foo:~$ sudo apt-get install -f Reading package lists... Done Building dependency tree        Reading state information... Done 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.


I want to add a JAR file to my project's classpath dynamically using Java code. If it is possible, I want to use external jar files and load their classes, and then execute them as beans later (Spring Framework).

Why is it so hard to do this in Java? If you want to have any kind of module system you need to be able to load JAR files dynamically. I'm told there's a way of doing it by writing your own ClassLoader, but that's a lot of work for something that should (in my mind at least) be as easy as calling a method with a JAR file as its argument.  Any suggestions for simple code that does this?


This is a classic problem but I can't find the right solution for me. I have downloaded iOS 11.1.2 (current latest version is 11.2.1) from  and tried to install it manually with the latest iTunes 12.7.2.58 on my iPhone 6. After extracting the software, I get the error:      Declined to authorize this image on this device for this user.   I'm currently on iOS 10.3.3 and don't want to upgrade to the latest version to keep my iPhone "jailbreakable".  I've tried to restore from my MacBook and my PC. The PC gave me  which seems to be the same error.  I know Apple doesn't sign this version anymore but I thought that upgrading was always possible (as opposed to downgrading). Am I wrong?  I checked my hosts files (/etc/hosts and /private/etc/hosts) and it looks fine. I also tried to restore in DFU mode without success.  Anyone with a potential solution is welcome to share it.

I'm trying to downgrade my iPhone from the current iOS to an older one, as per .  But every time I try, I always receive this error:     The iPhone could not be restored. This device isn't eligible for the requested build.     I have tried many times with and without DFU mode. Any ideas regarding this?


So I've been looking at plenty of watching orders for Arrow season 4, The Flash season 2, Legends of Tomorrow season 1 and Supergirl season 1.  As most of you know, there are crossovers but the airing order isn't all that clear.  [SEMI-SPOILER] In the 18th episode of Supergirl, The Flash appears and helps her do stuff. In the 17th episode of The Flash however, The Flash doesn't even come remotely close to going anywhere near Supergirl, which means that the 18th episode of The Flash should cover this.   Episode 18 of Supergirl aired last week but the 18th of The Flash should air on the 19th of April. Fun fact? Supergirl episode 19 will be aired on the 11th of April. Also Arrow episode 18 will be aired on the 6th of April, which is also before The Flash even remotely reaches the 18th episode. [/SEMI-SPOILER]  This really confuses me as most watch orders don't even cover these episodes. So what's up? Did the watching order get screwed over like it was back with Arrow season 3 and The Flash season 1?   Is this actually going wrong and if so, what should the actual order be?  Sorry if this is asked like 5000 times before but I can't seem to find any clear answer to what is happening.  Thanks in advance!

As I understand it the following shows all take place in the same shared universe:   Arrow Flash Constantine Vixen Legends of Tomorrow Supergirl ()  Freedom Fighters: The Ray   And any others that arrive.   In what order should these shows be viewed? How do they fit together chronologically?


I have debian on my VPS server and suddenly it stops to work. It says that  root@vps-16746:/# cd ~ root@vps-16746:~# mkdir 3 mkdir: cannot create directory `3': No space left on device   If I press TAB I'll get -bash: cannot create temp file for here-document: No space left on device. But it seems that I have enough space  root@vps-16746:~# df -h Filesystem                                              Size  Used Avail Use% Mounted on rootfs                                                   29G  5.0G   22G  19% / udev                                                     10M     0   10M   0% /dev tmpfs                                                    99M  244K   98M   1% /run /dev/disk/by-uuid/4546171a-7358-4c50-b66d-c86162f4d52d   29G  5.0G   22G  19% / tmpfs                                                   5.0M     0  5.0M   0% /run/lock tmpfs                                                   299M     0  299M   0% /run/shm /dev/xvda1                                              194M   24M  160M  13% /boot   Any advice?

Since some time I am unable to create file/folder on root. I always log in as root and was able to work properly. My experience is as follows: # pwd /root  # mkdir xcxcx mkdir: cannot create directory `xcxcx': No space left on device  # df -h Filesystem      Size  Used Avail Use% Mounted on /dev/sda1        41G  4.1G   35G  11% / /dev/sda3        91G   36G   51G  42% /home /dev/sda2        99G  3.4G   91G   4% /usr  I see ample space on my system; so why am I not able to create folder/files? Update: df -i  reports Filesystem   Inodes    IUsed    IFree IUse% Mounted on /dev/sda1   2681728  2681728        0  100% / /dev/sda3   6037504   111043  5926461    2% /home /dev/sda2   6553600   146034  6407566    3% /usr  Have I run out of inodes? If so, then how do I correct it?


How can I create a script on a windows box that retrieves data from the Linux box by executing cmds against the remote Linux box?   I have got putty and Plink on the win box but not sure how to fire the cmds from a script e.g. a bat file and get the results written back to a txt file on the win box.  How would I do this for something simple like a grep or ls cmd for example?

How can i create a script on a windows box that retrieves data from the Linux box by executing cmds against the remote Linux box?   I have got putty and Plink on the win box but not sure how to fire the cmds from a script eg a bat file and get the results written back to a txt file on the win box.  Any ideas how i would do this for something simple like a grep or LS cmd for example?


Please provide some hints as to how to solve questions with double limits such as this:  $$\lim_{m\to\infty}\left[\lim_{n\to\infty}(\cos(m!\cdot \pi\cdot x))^{2n}\right]$$  One of the things I did was convert the original function to: $$e^{n\ln(\cos(m!\cdot\pi\cdot x)^2)}$$ and then change cosine into sine and take $t=1/m$, and try to use  $$\lim \frac{\sin(m!\cdot\pi\cdot x)}{m!\cdot\pi\cdot x}$$ but that only messed it up even further. I obviously can't use L'Hopital as not both the numerator and denominator go to zero.   Another thing was to try to use the power series expansion, but that seemed even more complicated as there is still the power of 2n to deal with.   Please help! Thanks.

I stumbled upon this "relation" (is the name correct?):  $$ \lim_{m \to \infty} \lim_{n \to \infty} \cos^{2n}(m! \pi x) = \begin{cases} 1,&x\text{ is rational}\\ 0,&x\text{ is irrational}\end{cases} $$  How is it called and why is it so? I'm really not asking for a proof since I fear it would be too complicated for me to understand, but rather for an "intuition".


I am getting error on following lines " Type mismatch: cannot convert from int to short"   short a; a=09;   but not on   a=9;   why is it so.

This prints 83  System.out.println(0123)   However this prints 123  System.out.println(123)   Why does it work that way?


I changed my name on Meta Stack Exchange earlier today I used 24 of the 30 allowed characters:  Mooseman is eating pizza  However, now on , and  or , it shows my name as  Mooseman is eating pizz  According to one source, ' is a shortened version of '', which is  a note or passage played by plucking strings  ...but that's besides the point. Since 30 characters are allowed, and fewer than that are guaranteed to be visible... I propose that the name div gets text-overflow: ellipsis; to provide an ellipsis after its truncated version.

The Unhandled Exception's name is cut off in this  and in the answer too. The last 'n' looks like an 'r'.  Using Firefox 3.6.6.  Examples:


I have installed owncloud, apache2, php and all the other stuff on a fresh Ubuntu system (14.04) (owncloud version 8). The apache server works, but if I want to connect to localhost/owncloud it just shows me the message, that I can download a phtml file, it doesn't show me a site.   Has someone an idea what I did wrong or what could help?

I have just reinstalled Apache and PHP5 but when I visit my doc root it just downloads a "download" file. And when I try documentroot/index.php it just downloads the PHP file.  I have PHP installed but Apache doesn't seem to want to execute it. People suggested adding a 'Load Module' line to my httpd.conf but I don't have that file.


I have the following limit to find:  $$\lim\limits_{n \to \infty}\bigg ( \lim\limits_{x \to 0}(1 + \tan^2(x) + \tan^2(2x) + ... + \tan^2(nx))^\frac{1}{n^3x^2} \bigg )$$  I've never done a double limit before so I have no idea as to how to approach this.

$ \lim_{n\to \infty} ( \lim_{x\to0} (1+\tan^2(x)+\tan^2(2x)+ \cdots + \tan^2(nx)))^{\frac{1}{n^3x^2}} $  The answer should be $ {e}^\frac{1}{3} $  I haven't encountered problems like this before and I'm pretty confused, thank you.  I guess we must use the remarkable limit of $ \frac{\tan(x)}{x} $ when $ x $ approaches $ 0 $ by dividing and then multiplaying with $x$.


In Season 2 of TNG, Dr Crusher (played by McFadden) leaves, I understand, to take a position at Starfleet Medical.  I'm interested, however, in the out of universe reason as to why did McFadden leave for season 2, then return for season 3?

In season 2 of TNG, Dr. Crusher was replaced with Dr. Pulaski.   In season 3, Dr Crusher came back.   The best information I can find is  on Yahoo Answers.   But there must be better more complete information out there.


I have the following function that counts the number of characters left the user has to type in a textarea:  $("textarea").keyup(function() {     var max = 500;     var length = $(this).val().length;     var char = max - length;     if (length > max) {         $(this).parent().find('.counter span').html('
' + char + '
');     } else {         $(this).parent().find('.counter span').text(char);     } });   If I introduce a new DOM to the page, the above function doesn't work for the newly introduced textarea. How can I make it work with new DOMs?  Thanks.

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


I'm new to ubuntu (but i like it a lot), so please bear with me.  I want to install Java, but which one should I install?    The RPM or the normal one?  32bit or 64bit?   From what I know, even windows 64 bit is still using java 32 bit. This thing make me confused.  I'm asking here just to make sure everything is going to be all right, because I will need my system to be ready to code (eclipse :D) pretty soon, so I want to avoid any trouble now.  Thanks for your help, and sorry for my basic question.

How do I install Java, including in my browser, so websites with Java work?


When we are using logistic regression, we can get the probability that $y$ belongs to class $1$ as follows: $P(y=1|x;\theta)=\frac{1}{1+\exp(-\theta^Tx)}$. PDF of a  is given as follows: $f(x)=\frac{\exp(-x)}{(1+\exp(-x))^2}$ and this is a continuous distribution. Here are my questions:  Conditional distribution of $y|x$ is logistic distribution. Is this right? Or is it a categorical distribution? PDF at a single point is zero. So how can we get probabilities in logistic regression if it is a continuous distribution? As a side question, what is it we get when we evaluate a PDF at a single point? For example, in scipy.stats, norm().pdf(3) returns a value, what is it?

We all know that logistic regression is used to calculate probabilities through the logistic function. For a dependent categorical random variable $y$ and a set of $n$ predictors $\textbf{X} = [X_1 \quad X_2 \quad \dots \quad X_n]$ the probability $p$ is  $$p = P(y=1|\textbf{X}) = \frac{1}{1 + e^{-(\alpha + \boldsymbol{\beta}\textbf{X})}}$$  The cdf of the logistic distribution is parameterized by its scale $s$ and location $\mu$  $$F(x) = \frac{1}{1 - e^{-\frac{x - \mu}{s}}}$$  So, for $\textbf{X} = X_1$ it is easy to see that  $$s = \frac{1}{\beta}, \quad \mu = -\alpha s$$  and this way we map the two fashions of the sigmoid curve. However, how does this mapping works when $\textbf{X}$ has more than one predictor? Say $\textbf{X} = [X_1 \quad X_2]$, what I see from a tri-dimensional perspective is depicted in the figure below.    So, $\textbf{s} = [s_1 \quad s_2]$ and $\boldsymbol{\mu} = [\mu_1 \quad \mu_2]$ would become  $$\textbf{s} = \boldsymbol{\beta}^{-1}, \quad \boldsymbol{\mu} = -\alpha\textbf{s}$$  and $p$ would derive from the linear combination of the parameters and the predictors  in $\textbf{X}$. The way the unknown parameters of the logistic regression function relate to the cdf of the logistic distribution is what I am trying to understand here. I would be glad if someone could provide with insights on this matter.


When doing locale -av on Lubuntu, the result returned shows that all of the locales uses the UTF-8 character encoding.  Is there a way to add a locale with the ISO-8859-1 character encoding?

I need the cs_CZ.ISO8859-2 locale to exist on Ubuntu 12.04 so a specific unit test can pass. The test makes the following call:  std::locale("cs_CZ.ISO8859-2")   On my OS X Lion install, this locale does exist, so the call to std::locale should work:  $ locale -a | grep cs cs_CZ cs_CZ.ISO8859-2 cs_CZ.UTF-8 $   However, on my Ubuntu 12.04 install, there is only a UTF8 variant, and no ISO8859-2 version of the cs_CZ locale, despite having installed language-pack-cs:  $ dpkg -l | grep language-pack-cs ii  language-pack-cs                       1:12.04+20120417                        translation updates for language Czech ii  language-pack-cs-base                  1:12.04+20120417                        translations for language Czech $ locale -a | grep cs_ cs_CZ.utf8 $   The unit test fails on this machine. Running the unit test under strace shows that it really is looking for the ISO8859-2 variant and not finding it anywhere:  open("/usr/lib/locale/cs_CZ.ISO8859-2/LC_CTYPE", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) open("/usr/lib/locale/cs_CZ.iso88592/LC_CTYPE", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) open("/usr/lib/locale/cs_CZ/LC_CTYPE", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) open("/usr/lib/locale/cs.ISO8859-2/LC_CTYPE", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) open("/usr/lib/locale/cs.iso88592/LC_CTYPE", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) open("/usr/lib/locale/cs/LC_CTYPE", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) open("/usr/share/locale-langpack/cs_CZ.ISO8859-2/LC_CTYPE", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) open("/usr/share/locale-langpack/cs_CZ.iso88592/LC_CTYPE", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) open("/usr/share/locale-langpack/cs_CZ/LC_CTYPE", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) open("/usr/share/locale-langpack/cs.ISO8859-2/LC_CTYPE", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) open("/usr/share/locale-langpack/cs.iso88592/LC_CTYPE", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) open("/usr/share/locale-langpack/cs/LC_CTYPE", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)   I know absolutely nothing about locales, i18n, etc. However, I would like to get this test passing, and changing the test is not an option. If anyone can offer any insight into how to make this locale exist on Ubuntu 12.04 I would appreciate it greatly.


My iPhone 7 is in recovery mode and the home button is broken. There is a prompt that says “Press home to recover” and it’s not popping up when I connect with iTunes.

My iPhone says "press home to restart" but my home button is broken so there is no way to press home.  I can't use the answers in  as my iPhone isn't linked to my computer, and I can't activate Assistive Touch.  How can I activate my iPhone nevertheless?


I have written a few scripts, some are over 8000+ lines. How would I put these in a tab and link a button to those scripts. All I could find on the internet was how to run basic stuff like put down cubes but not how to make a button run an already written script.

I was watching this  on making a custom UI tab using Python, and in the line from bpy.types import Menu, Panel, UIList, I see the names of objects that look like they can all be used to make different UI elements. Does bpy.types contain all the objects that people use when they want to make custom UI elements?


I've tried to cut a float number to get the number with only two digits afer decimal point using this method:  private float two_digits_converter(float f) {         DecimalFormatSymbols symbols = DecimalFormatSymbols.getInstance();         symbols.setDecimalSeparator('.');         DecimalFormat decimalFormat = new DecimalFormat("#.##", symbols);         return Float.valueOf(decimalFormat.format(f));     }   But this method doesn't work in all devices. I keep getting this exception on some devices:  java.lang.RuntimeException:    at android.app.LoadedApk$ReceiverDispatcher$Args.run (LoadedApk.java:941)   at android.os.Handler.handleCallback (Handler.java:739)   at android.os.Handler.dispatchMessage (Handler.java:95)   at android.os.Looper.loop (Looper.java:145)   at android.app.ActivityThread.main (ActivityThread.java:6117)   at java.lang.reflect.Method.invoke (Native Method)   at java.lang.reflect.Method.invoke (Method.java:372)   at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run (ZygoteInit.java:1399)   at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1194) Caused by: java.lang.NumberFormatException:    at java.lang.StringToReal.invalidReal (StringToReal.java:63)   at java.lang.StringToReal.initialParse (StringToReal.java:164)   at java.lang.StringToReal.parseFloat (StringToReal.java:323)   at java.lang.Float.parseFloat (Float.java:306)   at java.lang.Float.valueOf (Float.java:343)   at com.great.two_digits_converter (GreatService.java:908)   at at com.great.GreatService.access$100 (GreatService.java:70)   at com.great.GreatService$4.onReceive (GreatService.java:433)   at android.app.LoadedApk$ReceiverDispatcher$Args.run (LoadedApk.java:931)   The exception is on this line:  return Float.valueOf(decimalFormat.format(f));  Would be great if you can share some more general methods that works better.  UPDATE:  I ended up doing it this way :    private float two_digits_converter(float f) {         String new_s = String.format(Locale.US,"%.2f", f);         return Float.valueOf(new_s);     }

What I would like is a method to convert a double to a string which rounds using the half-up method - i.e. if the decimal to be rounded is 5, it always rounds up to the next number. This is the standard method of rounding most people expect in most situations.  I also would like only significant digits to be displayed - i.e. there should not be any trailing zeroes.  I know one method of doing this is to use the String.format method:  String.format("%.5g%n", 0.912385);   returns:  0.91239   which is great, however it always displays numbers with 5 decimal places even if they are not significant:   String.format("%.5g%n", 0.912300);   returns:  0.91230   Another method is to use the DecimalFormatter:  DecimalFormat df = new DecimalFormat("#.#####"); df.format(0.912385);   returns:  0.91238   However as you can see this uses half-even rounding. That is it will round down if the previous digit is even. What I'd like is this:  0.912385 -> 0.91239 0.912300 -> 0.9123   What is the best way to achieve this in Java?


I had a working EC2 ubuntu instance (t1.micro) connected through an elastic IP, using an Amazon key pair for a passwordless ssh connection. After running fsck like the terminal suggested (wrong move, I know now), the system rebooted and I keep getting "Network Error: Connection Refused" when trying to connect via ssh. I managed to attach the instance's volume to an alternative instance, but I could not see what was wrong. I also tried "ssh -vvv" from an Ubuntu laptop, but got no useful output. Is there a log I can look at to see why ssh is refusing my connection?  Is there an alternative way I could debug this?

This is a  about Connection Refused    We see a lot of questions to the effect      When I try to connect to a system I get a message      Connection refused      Why is this ?


How to uninstall apache2 ?  I needed to install phpmyadmin, but it got errors so i decided to uninstall it and reinstall mysql php and apache.   But I am unable to uninstall apache.  I uninstalled it the following way:          $ whereis apache  $ apache:  $ which apache  $     still I'm getting  "Ubuntu Logo Apache2 Ubuntu Default Page" at localhost

It seems a simple apt-get remove apache2 does not completely remove apache2 as I can still see it on one of the processes when running top. How does one remove apache2 completely on his ubuntu server?  It's not removed indeed:  ~# which apache2 /usr/sbin/apache2 ~# whereis apache2 apache2: /usr/sbin/apache2 /etc/apache2 /usr/lib/apache2 /usr/share/apache2 /usr/share/man/man8/apache2.8.gz   But when I do apt-get remove apache2 again:  # apt-get remove apache2 Reading package lists... Done Building dependency tree Reading state information... Done Package apache2 is not installed, so not removed 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.


Ubuntu seems to detect that my laptop has a high resolution screen and, by default, sets everything to a 200% zoom.  I prefer to set this back to no zoom, but with larger font sizes.  This was no problem for Ubuntu/Gnome itself, but GDM does not seem to inherit these settings.  Moreover, figuring out how to configure GDM seems like an absolute nightmare.    How can I disable the zoom feature?  Or should I just switch from GDM to a different login manager?  This is distinct from questions about Grub resolution.  Grub uses my native resolution just fine.  The UI is scaled up separately.  This also has nothing to do with trying to enable fractional scaling.

So I just installed Ubuntu 16.04 on my Dell XPS 13. When I get to the login screen it starts at 3200x1800 for a quick second, then I get a way lower resolution like 800x600 but as soon as I login it adjusts to 3200x1800. How would I get 3200x1800 permanently on my login screen? I didn't have this issue on 14.04.


I am using the following regex to match URLs within text   new RegExp(`(https?://\\S+\\.\\S+)\\s`, 'ig');  The problem is when URL appear within brackets like this  (e.g. https://hello.com/fridaysforfuture-eu-socialmedia)  It picks off the closing bracket as part of the URL  My expected behavior is to include Closing bracket in the match if URL is like  https://hello.com/name-(1)  but exclude closing bracket if URL is within brackets like this   (e.g. https://hello.com/fridaysforfuture-eu-socialmedia)

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.


I read somewhere that you can add a cron job to run every minute like this:  #min hour day month weekday command */1   *    *    *    *     <your command>   What does the /1 part mean? Can I omit it?

Somehow, I am finding it difficult to understand tweaking around * parameters with cron.  I wanted a job to run every hour and I used the below setting:  * */1 * * *   But it does not seem to do the job. Could someone please explain the meaning of above and what is needed for the job?


I have read that it would slide off the table, because apparently in the frame of the table it experiences a centrifugal force outwards, but I can't seem to agree with that logic.  In the ground frame of reference there is no force in the direction of the groove (let me call it the instantaneous x axis). Centrifugal force is just a psuedo force right? So how is it that in the frame of the table it experiences an outward force?   According to me it is just like keeping a block on a frictionless table. Causing the table to move would have no effect on the block which would eventually fall off the table because it would eventually run out of table. But here the table is only rotating so no chance of that happening.  Perhaps it's some deep rooted misconception about circular motion .. please help!  EDIT: THE GROOVE IS DIAMETRICAL.

If some object is kept in a radial groove made on a disk and the disk is rotated with say constant angular velocity.   Now as we know that the object moves outwards ie away from the centre of the disk. I want to know which force is it which throws the object outwards.   As centrifugal force is a pseudo force and hence when the observer is in ground frame it shouldn't be present so which force exactly pulls it out.


I have my questions deleted after realizing the below standard quality, but still got banned.   similar case in  but it seems I need to open this question for moderators to undelete those?

If you are reading this, you may have been affected by one of our post quality bans. If so, it is important that you  to understand what has happened and how to regain the permissions that you lost. While trying to ask a question, one could see:  We are no longer accepting questions from this account. See  to learn more.  Likewise, for answers:  We are no longer accepting answers from this account. See  to learn more.   Why am I getting this message? Are deleted posts taken into account too? Is a question/answer ban the same as a suspension? How do I avoid getting a question ban? How long do I have to wait before I can post again? What can I do to release the ban? How can I reactivate my account? Can I simply create a new account? I'll just ask somewhere else on the SE network, and they'll migrate my question to the correct site! Will a ban on one Stack Exchange site affect my standing on other sites in the network? Does this apply to meta sites too? My account is in good standing. Why am I still blocked?


I recently found out that starting with $\frac{1}{1}$ and letting $p$ be the numerator and $q$ the denominator, then you can generate a sequence that approximates $\sqrt 2$ using:  $$\frac{p+2q}{p+q}$$  The first few terms of the sequence are:  $\frac{1}{1}$, $\frac{3}{2}$, $\frac{7}{5}$, $\frac{17}{12}$, $\frac{41}{29}$, $\frac{99}{70}$, $...$  But why is this case?

Claim: If $m/n$ is a good approximation of $\sqrt{2}$ then $(m+2n)/(m+n)$ is better.   My attempt at the proof:   Let d be the distance between $\sqrt{2}$ and some estimate, s.  So we have $d=s-\sqrt{2}$   Define $d'=m/n-\sqrt{2}$ and $d''=(m+2n)/(m+n)-\sqrt{2}$  To prove the claim, show $d''<d'$  Substituting in for d' and d'' yields:  $\sqrt{2}<m/n$   This result doesn't make sense to me, and I was wondering whether there is an other way I could approach the proof or if I am missing something.


I do not want to convert CST to GMT or UK Time. I want to create a UK DateTime object with value of "2019-10-01 00:00:00"  Like: DateTime ukTime = new DateTime(2019,10,1);  // BUT this gives me local US Central time as I live there  I can convert this "ukTime" from CST to UK Time but then it will not be 2019/10/01 in UK Time.

I'm trying to create a unit test to test the case for when the timezone changes on a machine because it has been incorrectly set and then corrected.  In the test I need to be able to create DateTime objects in a none local time zone to ensure that people running the test can do so successfully irrespective of where they are located.  From what I can see from the DateTime constructor I can set the TimeZone to be either the local timezone, the UTC timezone or not specified.  How do I create a DateTime with a specific timezone like PST?


When I compile a large document with many images, this compilation is very slow. Exist any method that allow read ONLY (no rendering) the width and height of imagen and then simulate this image with a dummy rule. For example:  \newdimen\onlyWidth \newdimen\onlyHeight  \setlenght{\onlyWidth}{\readOnlyWidth{\path\of\image.jpg}}   \setlenght{\onlyHeight}{\readOnlyHeight{\path\of\image.jpg}}    \begin{figure}[t]     \rule{\onlyWidth}{\onlyHeight}     \caption{any} \end{figure}

I am trying to make a draft by forcing LaTeX to ignore all images. How do I tell LaTeX to suppress all the image filenames (in the \includegraphics command) and just insert an empty box? The problem with the [draft] options is that it still requires me to have all images in the folder where I have my .tex files.


I want to display all the sub folders in side Uploads folder.this is my code  <?php     $somePath='uploads/';   $files = glob($somePath . "*", GLOB_ONLYDIR);   foreach($files as $file) {   if(is_dir($file))  {   echo ''.''.'
'. $file.''.''.'
';  } }         ?>   but it's display main folder name and subfolder name   eg:     uploads/abc  uploads/sub_folder  i want to display only sub folder name.

I'm trying to get rid of everything before the filename ex:  /home/mike/whatever/test_1.txt   leaving only test_1.txt  what would the simplest way?  thanks


Not sure if this has been asked previously, I couldn't find any references to it.  This question came to me based on this one -  but who was the first wizard or witch in the Harry Potter universe?    We know from the books and movies that Olivander's has been making wands since 382BC, so there would of had to have been Wizards or Witches around before that, but has J K Rowling ever given any information as to when magic was first used?  Was magic always around in the Harry Potter universe?  If so when and who used it first?  Edit -  I'm not sure that the linked question does actually answer mine.  JK Rowling might have stated that magic ability is gene related, and the answer speculating that this means the ability may of spontaneously erupted sometime in prehistory is just that, speculation.  The comment by NKCampell is actually what I'm asking. If there is a magical progenitor (either a magical Adam or Eve) then is that mentioned in any myths/legends that Wizards or Witches have in their universe?

What is a wizard that makes them non-Muggle? Or, more directly, what ancestry does the witch/wizard gene follow? Is there a patriarchal wizard (or matriarchal witch) that Muggles have no part in? Elves perhaps? Stop reading here.  Purpose of the Question/History/Don't Read There seem to be solid consequences associated with being Muggle, or Muggle-related. A dominant theme in the novels is discrimination against the non-gifted race, but, when read into, the wizard bloodline doesn't appear all that well defined. JKR indicates that wizard-ness is genetic, or inherited:  "Muggle-borns will have a witch or wizard somewhere on their family tree, in some cases many, many generations back. The gene resurfaces in some unexpected places."  By the above, it stands that a family that produces a squib (non-magical born of magical parents) must be a half-blooded family in some way, since half-blooded only requires one non-magical ancestor. Of course, we are dealing in magic genetics. Any other form of genetics would make this inherited, seemingly recessive trait (or squibs couldn't exist), never appear at all. Unless they were XMen. If it is so important, what does the wizard-bloodline follow? Other Mythos In other literature a wizard can be nearly anything, but magical powers are typically inherited as well as learned. Merlin of the Arthurian Legend (also mentioned in HP) is Cambian, meaning he is born of demonic intervention; this explains his source of enchantment. Gandalf of Middle Earth is a Maiar, as are all Wizards of Middle Earth. Wizards in Harry Potter seem to follow a bloodline, and it has been mentioned (in the question Gabe linked) that genetics have a heavy play in it, meaning that squibs and parents of Muggle-born wizards should have identical genetics. This bloodline must come from somewhere. Magical Creatures In Harry Potter it is common for magical creatures to "mingle" with humans, these beings are typically somewhat magical. Elves have been described to have very strong magic, but are for some unreasonable reason subservient to humans. I may be mistaken, but believe it was hinted that elves and the wizarding lineage had intersected at one time. Maybe I'm imagining this. Genocidal Allusions Voldemort hates muggles, and half-bloods, and whatever else is non-wizard. The presence of this theme, suggests that this wizardly bloodline must be at least defined if the main antagonist is so obsessed with keeping that mysterious bloodline pure. Since Slytherin himself was said to be a supremacist (circa a really long time ago) it suggests that this bloodline should have existed long before he was around, especially if he founded a school with people he was not related to, but were also magical.


I would like to mulitply a matrix with 3 elements (like a vector from physics) double3 with a scalar value. I wrote a class for everything (as you can see below). The problem is, that the overloaded operator* is not recognized. I can't find any issues with the syntax and also tried to adding const and & accordingly, to make sure the operator accept rvalues too. Error   C2676   binary '*': 'double3' does not define this operator or a conversion to a type acceptable to the predefined operator  Can anyone tell me where the issue is in the following code is? // main #include "vec3.h"  int main() {     double3 result, result2;     double3 vec = { 1,2,3 };     double testd = 2.3;     result = vec * testd;     result2 = vec * (testd / 5.0); }  // vec3.h #pragma once #include <iostream>  template <typename T> struct vec3 {     // assign data     vec3(const T u, const T v, const T w) : d{ u,v,w } {}     vec3(const T a[3]) : d{ a[0],a[1],a[2] } {}     vec3() : d{ 0,0,0 } {}          // read (and write) data     T& operator[] (int i) { return d[i]; }     T operator() (int i) const { return d[i]; }      // vec3.cpp contains more mathematical operations  protected:     T d[3]; };  using double3 = vec3<double>; using int3 = vec3<int>;  // vec3.cpp #include "vec3.h"  // vec3-scalar operations template<typename T>    // scalar multiplication vec3<T> operator*(const vec3<T>& a, T s) {     return vec3<T>(a(0) * s, a(1) * s, a(2) * s); } template<typename T>    // scalar multiplication 2 vec3<T> operator*(T s, const vec3<T> &a) {     return vec3<T>(a(0) * s, a(1) * s, a(2) * s); }

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


I'm having some trouble with a Stack class. Everything looks fine to me, but I could be missing something. I thought it might be something with the makefile, seeing as I'm not all that great with makefiles.  I've also looked through a few different questions, but not found anything that fixed my problem.  Here is all the code I'm compiling plus the makefile.  Stack.h:  #ifndef STACK_H #define STACK_H  #include "Node.h"  template<class Type> class Stack { public:   Stack();   void push(Type );   Type pop();   bool isEmpty() const;  protected:   Node<Type> *head; };  #endif   Stack.cpp:  #include "Stack.h"  template<class Type> Stack<Type>::Stack() {   head = NULL; }  template<class Type> void Stack<Type>::push(Type element) {   Node<Type> *newNode;    newNode = new Node<Type>;   newNode->data = element;   newNode->next = head;   head = newNode; }  template<class Type> Type Stack<Type>::pop() {   Node<Type> *current = head;   Type element = current->data;    head = head->next;   delete current;    return element; }  template<class Type> bool Stack<Type>::isEmpty() const {   return head == NULL; }   Node.h:  #ifndef NODE_H #define NODE_H  #include "Matrix.h"  template<class Type> struct Node {   Type data;   Node<Type> *next; };  #endif   main.cpp:  #include "Stack.h" #include <iostream>  using namespace std;  int main() {   Matrix m1;   Matrix m2(1, 2, 3, 4);   Matrix m3;   m3 = m1 + m2;    Stack<Matrix> stack;   cout << stack.isEmpty() << endl;    return 0; }   Makefile:  all: matrix matrix: removal main.o Matrix.o Stack.o         g++ -o matrix main.o Matrix.o Stack.o main.o: main.cpp         g++ -c -g main.cpp Matrix.o: Matrix.cpp         g++ -c -g Matrix.cpp Stack.o: Stack.cpp         g++ -c -g Stack.cpp removal:         rm -f *.o   If you need to see Matrix.h/Matrix.cpp, let me know. They're just for doing math on matrices and aren't causing any problems as far as I'm aware (they've compiled just fine).


I need to check if an IP address is within a specific netmask, ex:  ip: 85.12.12.13 netmask: 85.12.0.0/14  I've no idea how to achieve this with java (Android), any tips ?

I need to determine if given IP address is from some special network in order to authenticate automatically.


I have a txt files with all the file names I need to analyze. I have this file (inputFile.txt) :  /path/file1a  path/file1b  /path/file2a  path/file2b   i have a code which needs two two input files in order to run.   ./Analyzethis /path/file1a /path/file1b   i am trying to create a bash loop to go through my txt files, read through each row and run my code.  I had  #!/bin/bash IFS=$'\n'; for FILE1 in `cat inputFile.txt`; do ./Analyzethis $FILE1; done   but, it doesnt work. How can i loop through each row and use the columns with the bash loop?

I am writing shell script, to extract 2 variables from a file, and have used below FOR loop.   for i j in `cat list`                 do                 echo title                 echo total "$i" "," "$j"                 echo end done   where cat list is  AAA 111 BBB 222 CCC 333   Getting error as `j' unexpected, I have used "while loop" but no luck.   expect output is   title total AAA,111 total BBB,222 total CCC,333 end


In my Page Layout I am using one section calling a Visualforce Page. In Inner Visualforce Page I am not getting the URL parameter. How to get the parameter?  For example:         In Inner section of the Visualforce page, in the Apex class I am calling   Apexpages.currentpage.getParameter('RUN')   But I'm getting a NULL Value. How to get the URL parameter in Inner section of  Visualforce page.  Thanks!

What is the best (or preferred method) of setting a url parameter on a visualforce page embedded on a standard layout page?    This is easy to do when creating a custom link or a button, but I don't get how to do this on page load via the Apex Controller for the page.   When using a custom button you can do something like /apex/MyPageName?parameter=value  Can I use something like this?   ApexPages.currentPage.getParameters().put('Id',myId)


I want to make my Linux PC part of my existing digital world, which includes current documents that I share between Windows 10 and iOS devices using MicroSoft OneDrive.  Can I access my OneDrive from Ubuntu Linux?

Problem with OneDrive. Recently I've installed OneDrive in my PC (Ubuntu 17.04) but I'm not able to configure or not able to sign in OneDrive through the terminal. Actually I've strucked here. Please look on to this  jujube@jujube:~$ onedrive Authorize this app visiting:  https://login.live.com/oauth20_authorize.srf?client_id=000000004C15842F&scope=onedrive.readwrite%20offline_access&response_type=code&redirect_uri=https://login.live.com/oauth20_desktop.srf  Enter the response uri: https://login.microsoftonline.com/189de737-c93a-4f5a-8b68-6f4ca9941912/oauth2/authorize?client_id=00000003-0000-0ff1-ce00-000000000000&response_mode=form_post&response_type=code%20id_token&resource=00000003-0000-0ff1-ce00-000000000000&scope=openid&nonce=1263013103B7E6782803F03D5629B7D0FB1A68D46E17D09C-4B1B73911F92DE22FA330783ACEDE04C7C9991BB38BA7FCD9E3A9A900E0DB6AC&redirect_uri=https:%2F%2Fhclo365-my.sharepoint.com%2F_forms%2Fdefault.aspx&state=0&client-request-id=3fc31b9e-70d1-4000-78af-c23eabf4934b Invalid uri Could not initialize the OneDrive API jujube@jujube:~$


In Star Trek Warp Factor 36 is the highest FTL speed while in star wars I think the fastest canon was 0.4. So which is faster?

What's faster: a warp drive from Star Trek, or a hyperdrive from Star Wars?


I'm sure we have all seen questions like .  A one - two line question which shows a clear lack of even  the question. These are often easily identified by the phase Is it possible? when what the user really means is: GIVE ME THE CODEZ    I know that recently the flagging options have changed, however now cannot find the meta post.    What would be the most appropriate flag for a question like this, or are these kinds of questions allowed?    The flags too-board OR off-topic because it lacks sufficient information to diagnose the problem. Describe your problem in more detail or include a minimal example in the question itself. Don't really seem to quite cover the issue with questions like these.  Also the answer to the exampled question feels to me like a comment. However it is answering the question.   Whilst I know  is a little out dated and references the FAQ part of the site. Its still accepted that these types of questions should not be encouraged.

I regularily encounter questions on StackOverflow which are asked only because of the sole fact that the poster haven't made the effort to google for and the docs of a particular function/class/framework/whatever. My question is, to which category of the five proposed one should I vote when I vote to close the question? Is it: off-topic, not constructive, not a real question, exact dupe or too localized? I tend to be all for 'not a real question' - am I quite right?


From page 115 in the Player's Handbook:     While the ward has 0 hit points, it can't absorb damage, but its magic remains. Whenever you cast an abjuration spell of 1st level or higher, the ward regains a number of hit points equal to twice the level of the spell.   The grouping of the two sentences in that paragraph makes it sound like the intent might be that the ward only regains hit points if it has 0 hit points when the spell is cast.  In a previous paragraph on the same page, it also states:     The ward has a hit point maximum equal to twice your wizard level + your Intelligence modifier.   The maximum would never be reached if the ward only regains hit points when currently at 0 hit points (wizard level will always be greater than spell level). That seems to confirm that we should only consider the second of the sentences above when determining when the ward gains hit points.  Is it correct that Arcane Ward always gains hit points when casting an Abjuration spell of first level or higher, up to the ward's hit point maximum, even if the ward already has some number of hit points?

On p115 of the PHB under Arcane Ward there are a few facts that I think are clear:   The ward is created by the first abjuration spell you cast in a day It has a max hp of level × 2 + int modifier. The ward does not absorb damage once it reaches 0 hp, but it remains until you take a long rest The ward can be recharged by casting abjuration spells, at a rate of 2 x spell level worth of hp 3.   However, the way they wrote the paragraph about recharging seems unclear to me. Can you recharge the ward whenever it is below max hp or only when it is at 0? My understanding of temporary hp would say it is the latter, but the writing on this ability infers the former.  An example.  If I were a level 10 abjurer with 20 int and cast Mage Armor, it would give the ward 25 hp. If I took 30 damage from an enemy, the ward would absorb 25 damage, leaving it at 0, and I would take the remaining 5 damage. If I cast Stoneskin (level 4 abjuration) the ward would be recharged with 8 hp. If I then cast Planar Binding (level 5 abjuration) which would be correct?   The ward remain at 8 hp The ward would recharge an additional 10 hp to a total of 18 hp


Is it possible to write the Coulomb Hamiltonian in terms of creation and annihilation operators similar to the harmonic oscillator so that we can have the same commutations relations similar to that of the harmonic oscillator?

In my quantum chemistry course, we have been discussing the wavefunctions of the hydrogen atom, further, I am familiar with the idea of ladder operators from the quantum harmonic oscillator. Can we use ladder operators to jump between orbitals in a hydrogen atom? It appears from a cursory check that $$ \hat a^+ \psi_{1s} \neq \psi_{2s} $$ such that $$\hat a^+ = \frac{-i}{\sqrt{2w \hbar}}(\hat P+iw \hat X)$$ Is there any such set of ladder operators such that the above relation would be true? Thanks, and I apologize in advance if this question is naive. (Further, I am asking about ONLY wavefunctions of the solved hydrogen atom)


Clock is missing from System Settings in Ubuntu 16.04:

I did a fresh install of trusty 14.04, but a lot of icons are missing. I installed from DVD which was painfully slow and I hope to avoid repeating the process, especially since I started customizing stuff.  Here's my settings window:    I've tried:  sudo apt-get install --reinstall gnome-control-center sudo apt-get install --reinstall gnome-settings-daemon-schemas   None of which changed anything.  Any idea? I wanna edit preferences and none of them are in System Settings, neither in Unity Dash.


There must be some scientific reasons for why earth is a spheroid but what are they? If Earth would be a cuboid, Would it matter?

Is it possible to use the Lagrangian formalism involving physical terms to answer the question of why all planets are approximately spherical?  Let's assume that a planet is 'born' when lots of particles of uniform density are piled together, and constrained only by the Newtonian gravity of the $N$ particles with no external gravity.    My question is: Is it possible to use the variational calculus starting from this situation to prove that planets should be spherical?


When I try to finish a activity listener plugin project in Eclipse, I get null returned by DebugPlugin.getDefault() in my project, the code like below:  public class SampleHandler extends AbstractHandler {  @Override public Object execute(ExecutionEvent event) throws ExecutionException { //      System.out.println("hello1");     BreakpointListener bl = new BreakpointListener();     DebugEventSetListener desl = new DebugEventSetListener(); //      System.out.println("hello2");     System.out.println(bl.toString());      System.out.println(DebugPlugin.getDefault());//print null       System.out.println(DebugPlugin.getDefault().getBreakpointManager());    DebugPlugin.getDefault().getBreakpointManager().addBreakpointListener(bl);     DebugPlugin.getDefault().addDebugEventListener(desl);      return null;     } }   I'm sure I have imported org.eclipse.debug.core, but DebugPlugin.getDefault() give me a null.  How can I solve this problem? Why this problem occured?

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?


So I try typing Alt+Numpad1Numpad2 (that's §) and  nothing happens and it wont copy and paste it ether I'm trying to name a shulker box §2FOOD so it says FOOD in dark green, it already says 'Shulker Box' in dark gray and in the anvil it says '§7 Shulker Box' but when I try to replace the 7 with a 2 it just removes the § in fact when I try to change the name at all it automaticaly gets rid of the § but what i think the weirdest part is that I can add any other symbol such as ☺ ☻ ∞ and ╚ for example please help me because I cant find anything else to do

I'm trying to change sign text color in Java Edition on Windows 10. According to , this is done using the § symbol:  To enter "§" on Windows with most US/UK English keyboards type ALT + NUMPAD_2 NUMPAD_1  This works for me inside Notepad or this browser. However, when I enter this sequence in the sign input dialog, nothing happens. What could be causing this?


I've recently changed a motherboard to one that uses new Killer E2500 ethernet controller. My installation of Ubuntu 16.04 however did not accept it as part of the family - I can see no ethernet connections using ifconfig -a.  I've read  that it should have worked out of the box on newer kernels - and I'd assume my 4.4.0-62-generic should qualify as one?  So, is there any magic command I could do to make my installation rethink the issue and use the correct driver? Or do I have to reinstall / recompile kernel following the instructions from the link above?  --edit  $ lspci -knn | grep Eth -A3 05:00.0 Ethernet controller [0200]: Qualcomm Atheros Device [1969:e0b1] (rev 10)     Subsystem: Micro-Star International Co., Ltd. [MSI] Device [1462:7a62]

I have got a laptop on ubuntu 16.04 and I can't configure the ethernet card ... I don't have wifi and ethernet connexion... I believe that it is a atheros e2600 but I am not sure.  when I type modinfo alx I have this :      filename:       /lib/modules/4.4.0-31-generic/kernel/drivers/net/ethernet/atheros/alx/alx.ko license:        GPL description:    Qualcomm Atheros(R) AR816x/AR817x PCI-E Ethernet Network Driver author:         Qualcomm Corporation, <nic-devel@qualcomm.com> author:         Johannes Berg <johannes@sipsolutions.net> srcversion:     25B6ABE36E6CB50C1A7E6DF alias:          pci:v00001969d000010A0sv*sd*bc*sc*i* alias:          pci:v00001969d000010A1sv*sd*bc*sc*i* alias:          pci:v00001969d00001090sv*sd*bc*sc*i* alias:          pci:v00001969d0000E0A1sv*sd*bc*sc*i* alias:          pci:v00001969d0000E091sv*sd*bc*sc*i* alias:          pci:v00001969d00001091sv*sd*bc*sc*i* depends:        mdio intree:         Y vermagic:       4.4.0-31-generic SMP mod_unload modversions'   If I do lspci -nn I have this:  02:00.0 Network controller [0280]: Inter Corporation Device [8086:24fb] (rev 10) 03:00.0 Ethernet controller [0200]: Qualcomm Atheros Device [1969:e0b1] (rev 10)   I have download linux-firmware_1.127.22_all.deb and installed doing: sudo dpkg -i  linux-firmware____.deb  I have tried this solution as weel: [  without success either.  I added :  enter code #define ALX_DEV_ID_E2600                0xe0b1 in reg.h and :  { PCI_VDEVICE(ATTANSIC, ALX_DEV_ID_E2600),  .driver_data = ALX_DEV_QUIRK_MSI_INTX_DISABLE_BUG },   in main.c  but when I do   `make -C /lib/modules/$(uname -r)/build M=$(pwd) modules   (when I am in /ubuntu-xenial/drivers/net/ethernet/atheros/alx, is that where I should do it ?) I don't have any error. (make entering directory /usr/src/linux-headers-4.4.0-31-generic etc ... and then make leaving directory same one)  but when I do :  sudo make -C /lib/modules/$(uname -r)/build M=$(pwd) modules_install   I have an error: "no such file: bss_file.c:178 sign-file: certs/signing_key.pem no such file or directory".  any Idea ?  Regards,