Our SQL 2016 AlwaysOn database failed over a week ago (round about the same time as we had some high load on the system) and the secondary never came back online. For some reason my alerts were not working and today I ran DBCC SQLPERF(logspace) and realised that we were at 95% log space used. I checked the secondary database and it was in the "Reverting / In recovery" state.   The first thing I did was make sure my log backups were running correctly and that there were no open transactions. I then checked the SQL log and realised there were hundreds of the following error     Time out occurred while waiting for buffer latch -- type 3   I struggled to find any definitive answer to what was causing this and eventually followed the advice of someone and decided to restart the secondary database.   This fixed the issue and after a while the database went from "Recovering" into "Synchronized". However, when I now run DBCC SQLPERF(logspace) it is stuck at around 5% (1.8GB) log space used and has been like that for the past few hours. I have checked and my log backups are running successfully and there are no open transactions. Even if I run it straight after a log backup it still sits at 5%.  Any suggestions on what might be causing the log file to stay at 5% used?

This one seems to be a common question in most forums and all over the web, it is asked here in many formats that typically sound like this:  In SQL Server -  What are some reasons the transaction log grows so large? Why is my log file so big? What are some ways to prevent this problem from occurring? What do I do when I get myself on track with the underlying cause and want to put my transaction log file to a healthy size?


I have a redhat server 7.5. I have a openssh installed on this server. The openssh is 7.4. I need to upgrade openssh 7.4 to 7.6 AS Nessus, vulnerability scanner scanned this vulnerability (Openssh <7.6) and thus need to upgrade to 7.6 or later.The details is found here, .  I found the link,  but they said that this cannot be installed on Red Hat as you cant install bsd on Linux. I referred to this link,   Thus I went to this link,  to have a portable version. I used this link, .  I downloaded this file in /tmp directory.  I performed the following command,  # tar xvfz …/openssh-7.6p1.tar.gz # cd ssh # make obj    ←--------------------  error message # make cleandir # make depend # make # make install   I got this error when I performed the command make obj. The error is  make: *** No rule to make target 'obj'. Stop.

I have a Red Hat Enterprise Linux server (7.5 x86_64). I have OpenSSH version 7.4. I was asked to upgrade it to a later version for security reasons: Nessus states that . However the Red Hat software and downloads does not have the latest package RPM.  I found some clues on where to get the latest package for OpenSSH. I found , however, I do not know on how to upgrade it and trust this website. I do not want the SSH and other configuration to be modified by the ugrade.  I did find links but however they are not useful, for example .  I would like to know how to upgrade OpenSSH without using yum.


I am thinking of purchasing this little fella  and (also) using it as an external monitor to my MacBook Pro (mid 2014).   Is it possible?

I have a MacBook Pro with Mini DisplayPort and I want to use target display mode to use a Thunderbolt iMac as an external display. If this works, would I need a Mini DisplayPort cable or a Thunderbolt cable?


I'm working on a Windows-10 machine, Home edition. I would like to know when I logged on to my computer, mostly after a lock. In order to do this, I'm looking at the event log (security auditing), where I see the events 4624 (Logon) and 4672 (Special Logon). Unfortunately those events seem to be launched also on other moments (I don't even know when and why). Are there other events I can use to filter the event log, so that I can know when I logged on to my PC? I suppose such events don't exist, but in that case, does anybody know how to create my own event and attach it at the "Logon" action? Edit after reopen: The  either mentions only the last logon (while I want all of them in one day) or it uses "Local Security Policy" while running "secpol.msc" gives nothing on my PC (it's a Windows 10 Home edition). Thanks in advance

On UNIX I can tell when I logged in and out of my workstation with the last command.  Is there a way to get the same information on my Windows workstation?  I notice that Cygwin has a last command, but wtmp doesn't seem to be populated.  Is there a way to get last working with Cygwin?  (If this can only be done programmatically, should the question be on StackOverflow?)


Here's my code:   if(isset($_POST['doSEARCH'])){     $mysqli->query("SELECT * FROM data WHERE title = '$search'"); } ?> <form action="" method="post">     <input type="text" name="search" />     <input type="submit" value="SAVE" name="doSEARCH" id="doSEARCH" /> </form>   1 Q: can I use this method without using mysqli_real_escape_string? Is it safe?  $search = filter_input(INPUT_POST, 'search', FILTER_SANITIZE_SPECIAL_CHARS); if(preg_match("/[^a-z0-9 ,.]/i",$search)){     header('Location: 500error.html');      exit(); }   2 Q: any other short solutins for this? (without using mysqli_real_escape_string)   thank you!

If user input is inserted without modification into an SQL query, then the application becomes vulnerable to , like in the following example:  $unsafe_variable = $_POST['user_input'];   mysql_query("INSERT INTO `table` (`column`) VALUES ('$unsafe_variable')");   That's because the user can input something like value'); DROP TABLE table;--, and the query becomes:  INSERT INTO `table` (`column`) VALUES('value'); DROP TABLE table;--')   What can be done to prevent this from happening?


when joining SVG curves into one object I am losing faces.  How do I avoid or add the face back in

It should be noted that this question poses a similar issue to some other questions on SE, but (the ones that I saw) were caused by massively large scaling factors, which (as far as I can tell) isn't the source of this issue.   I'm trying to import  into blender so that I can extrude it afterwards. All I can manage to get is this result:    I'm very new to blender, so I don't know what the issue could be. All I did to get this was create a new scene, import the svg, and zoom/move the view to make it visible.  As well, I have uploaded (and publicly shared, of course) the  for those who are interested.


I use this Javascript code to create a dialog box to ask some thing to user and after decide what to do depending of the response.  function dialogToCont() {     var retVal = confirm("Do you want to continue ?");     if( retVal == true )     {         alert("User wants to continue!");         return true;     }else     {         alert("User does not want to continue!");         return false;     } }   and in my plugin I want to call this to show the dialog box to the user.  In my php code I want to do something if the response of the use is true or false like this :  $tmp = "<script type='text/javascript'>dialogToCont();</script>"; //it is not correct this.. if ( tmp ) {...  // do something... }   I have already registered my javascript code with wp_enqueue_script method.

I have a a bunch of li's that are a blog but i want to show them enlarged in a colorbox. Therefore I need to know which li I clicked so I can get that ID and use that in my query to get all the date for that post.  Now I thought that the best way is to retrieve the blog id with jQuery and then use that to add to my query in the footer.       <li id="<?php the_ID;?>">blog
     <li id="<?php the_ID;?>">blog
     <li id="<?php the_ID;?>">blog
     <li id="<?php the_ID;?>">blog
      //My colorbox inline frame     <?php query_posts( 'p="the_ID_of_clicked_li' ); ?>      etc etc   I think this can be done with AJAX but is there a more simple method and give me a clean URL?  I haven't AJAX in projects before, so I am a beginner with that.  Any thoughts would be appreciated


I tried installing from a usb with a full image, but was having issues. So, I tried a minimal install and selected to include ubuntu desktop, but upon first boot it brought me to an extremely bare bones command line interface.  This is a quote from the canonical minimal page at :  "To install, boot your computer from the the mini iso and select "Install" at the prompt. You can then follow the instructions from the text-based installer. On the software selection screen, you can select from a number of collections of software such as different desktop environments (kde, xfce, etc), a multitude of different servers, multimedia creation tools, media center (mythbuntu), etc. You can also select "Manual package selection" which will take you to aptitude. You may also select nothing and just continue to finish the installation. If you selected nothing, upon reboot you will arrive at a cli prompt; from here you can fully customize your new system."  I'm going to go ahead and try re-installing it again, but does anybody know how I could install a desktop environment? Not just a desktop environment, but the current standard Ubuntu environment?

I want to burn Ubuntu Minimal CD ISO to an old, 1 GB USB thumbdrive. Regular ISO doesn't fit. I already tried Startup Disk Creator and Unetbootin but both failed. I tried installing GRUB and pointing it to boot like this:  insmod part_msdos linux /linux initrd /initrd.gz   but it doesn't work. I also tried dd but I ended up with not bootable drive.  Rufus worked on Windows with the same thumbdrive but I no longer use Windows.  What else can I do?


I was faced with the hypothesis that $4^n-1$ is always divisible by 3. I believe that this problem can be solved by a proof by induction. As far as I understand, a proof by induction works by first testing whether or not this is true for a small value of n (e.g. 0, 1, etc.). Then we assume that it is true for an arbitrary number $n=k$, and prove how it is also true for $n=k+1$. My first step At first, I tried to prove it for a small number ($n=1$). $$4^1-1 = 3$$ 3 is clearly divisible by 3, so the first step should hold true. However, I am completely stuck now when trying to prove that the same holds true for $4^{k}-1$ and $4^{k+1}-1$.

Prove by induction that $\forall n \in\mathbb N$, $3\mid4^{n}-1$.  1) For $n = 1$ the statement is obviously true.  2) Now what about $n+1$? I was thinking of writing $4^{n}-1$ as $2^{2n}-1$ and then $4^{n+1}-1 = 2^{2n+2}-1$ but that got me nowhere.


Compute: $\arctan{\frac{1}{7}}+\arctan{\frac{3}{4}}.$   I want to compute this sum by computing one term at a time. It's clear that  $$\arctan{\frac{1}{7}}=A \Longleftrightarrow\tan{A}=\frac{1}{7}\Longrightarrow A\in\left(0,\frac{\pi}{2}\right).$$  Drawing a right triangle with sides $1$, $7$ and $5\sqrt{2},$ I get that $$\begin{array}{lcl} \sin{A} & = & \frac{1}{5\sqrt{2}}\Longleftrightarrow A= \arcsin{\frac{1}{5\sqrt{2}}} \\ \cos{A} & = & \frac{7}{5\sqrt{2}}\Longleftrightarrow A= \arccos{\frac{7}{5\sqrt{2}}} \\ \end{array}$$  But this will not get me standard angles for $A.$

Show that,   $$2\arctan\left(\frac{1}{3}\right)+2\arcsin\left(\frac{1}{5\sqrt2}\right)-\arctan\left(\frac{1}{7}\right)=\frac{\pi}{4}$$  There is a mixed of sin and tan, how  can I simplify this to $\frac{\pi}{4}$  We know the identity of $\arctan\left(\frac{1}{a}\right)+\arctan\left(\frac{1}{b}\right)=\arctan\left(\frac{a+b}{ab-1}\right)$


Is it possible to remove a layer from the layers panel and the map canvas without removing it from memory. e.g if i have a vector layer named vlayer, and add it to the map with QgsMapLayerRegistry.instance().addMapLayer(vlayer), and then later remove it from the map, but still want to operate on vlayer.  I have tryed QgsMapLayerRegistry.instance().removeMapLayer(vlayer.id()), but then it seems that the layer is removed from vlayer as well

I have a number of layers in the Layers Panel inside a group but I don't want them shown (there's quite a lot so it looks untidy). These layers are also joined to several others. Is it possible to make these layers invisible to the user (i.e. not shown in the Layers Panel, it is not about setting the visibility of the layer) but can still be joined to other layers, or perhaps to make the group invisible? Closest I found was this post but hoping there's a more direct approach:


Why is lxc-docker being held back? I also notice that my web app, running on Docker, is quite slow. Any suggestions?  [lucas@production]/home/lucas$ sudo apt-get dist-upgrade Reading package lists... Done Building dependency tree        Reading state information... Done Calculating upgrade... Done The following package was automatically installed and is no longer required:   linux-image-3.16.0-28-generic Use 'apt-get autoremove' to remove it. The following packages have been kept back:   lxc-docker 0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded. [lucas@production]/home/lucas$ sudo apt-get upgrade Reading package lists... Done Building dependency tree        Reading state information... Done Calculating upgrade... Done The following package was automatically installed and is no longer required:   linux-image-3.16.0-28-generic Use 'apt-get autoremove' to remove it. The following packages have been kept back:   lxc-docker 0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.   Note that I have already run sudo apt-get dist-upgrade, which does not resolve this issue. Thus, I don't think my questions is a duplicate of

I just added a PPA repository for the development version of the GIMP, but I get this error:  $ apt-get update && apt-get upgrade ... The following packages have been kept back:   gimp gimp-data libgegl-0.0-0 libgimp2.0   Why and how can I solve it so that I can use the latest version instead of the one I have now?


Hi i am having some trouble with a piece of code of mine and ive been trying to google the answers but for some wierd reason i cant get this to work properly.  The current code is working, but it does not stop the search when it found the "offline" in the txt file making it rather pointless as the programs pings a number of ip addresses and when it finds a offline unit has to mark the store name in red to notify the technician monitoring the stores. what happens is it scans the file created and changes the color from red to green for each line. instead of searching for the word offline and once found stop the search and change the color.  so my question is how do i make this stop once it found the first line containing offline?  the code i have so far is this please oif you can see my mistake please let me know.  var filename = "C:\\Scales\\scalecheck.txt"; var searchTarget = "offline"; foreach (var line in File.ReadLines(filename)) {     if (line.Contains(searchTarget))     {         var test = storeNumber;         var labels = Controls.Find("storename" + test, true);         if (labels.Length > 0)         {             var label = (Label)labels[0];             label.ForeColor = Color.Red;         }     }     else     {         var test1 = storeNumber;         var labels = Controls.Find("storename" + test1, true);         if (labels.Length > 0)         {             var label = (Label)labels[0];             label.ForeColor = Color.Green;         }     }

foreach (var name in parent.names) {     if name.lastname == null)     {         Violated = true;         this.message = "lastname reqd";     }      if (!Violated)     {         Violated = !(name.firstname == null) ? false : true;         if (ruleViolated)             this.message = "firstname reqd";     } }   Whenever violated is true, I want to get out of the foreach loop immediately. How do I do it?


How does Einstein's General Theory of Relativity compare with Newtonian gravity? How does the curvature of spacetime affect both gravity and the path of light in a planetary system?

The Newtonian description of gravity can be formulated in terms of a potential function $\phi$ whose partial derivatives give the acceleration:  $$\frac{d^2\vec{x}}{dt^2}=\vec{g}=-\vec{\nabla}\phi(x)=\left(\frac{\partial\phi}{\partial x}\hat{x}+\frac{\partial\phi}{\partial y}\hat{y}+\frac{\partial\phi}{\partial z}\hat{z}\right)$$  However, in general relativity, we describe gravity by means of the metric. This description is radically different from the Newtonian one, and I don't see how we can recover the latter from the former. Could someone explain how we can obtain the Newtonian potential from general relativity, starting from the metric $g_{\mu\nu}$?


I have to travel out of the UK using my NZ passport as my UK passport is at the UK Passport Office.  Will they only give me a tourist visa on my NZ passport?  What happens when this expires?  Or can I give them the details of my UK passport (which hasn't yet expired)?

I'm a British National (Overseas), which basically means that while I don't have the right of abode in the UK, I am permitted to visit the UK without a visa. However, my passport has expired, and while it's being renewed, the schedule is a bit tight.  At the same time, I'm an US Citizen, and since I'm only planning to visit the UK, I don't need a visa if I enter on my US passport.  I'm not familiar with UK immigration law, and given that this probably isn't too common a situation, the UK Border Agency website doesn't have an answer that I can can find, nor do they seem to have a contact form that fits my situation, so here's hoping someone knows—given that I'm a British National (Overseas), am I required to enter the UK on my UK passport, or can I just use my (valid) US passport?


After finding , I thought about inspecting Community's ♦ profiles. What did I notice? Community ♦ have more than 1 rep on some meta sites.    - 5 rep  - 3 rep  - 3 rep  - 3 rep   Why is it?

Until recently  had one single reputation point, you can see it in this old screenshot:    Now it has over 2K reputation all of a sudden.. what has caused this? Has it affected "real" members as well?


I am trying to crop a picture so that it is shaped like a circle and additionally put a border around it. So far I figured out I will crop an image so that it looks like circle by using \clip:  \documentclass[12pt]{article} \usepackage{tikz}  \begin{document}  \begin{tikzpicture}       \begin{scope}         \clip [rounded corners=.6cm] (0,0) rectangle coordinate (centerpoint) (1.2,1.2cm);         \node [inner sep=0pt] at (centerpoint) {\includegraphics[width=1.2cm, height=1.2cm]{example-image-b}};       \end{scope}     \end{tikzpicture} \end{document}   Effect:    How do I make a red-colored border (circle-shaped) around the picture?   I thought about painting one image on top of another, but the circle and the image get arranged side by side. I am a beginner so any clue will be appreciated.

\documentclass[demo]{article} \usepackage{graphicx} \usepackage{tikz} \begin{document} \begin{tikzpicture} \node[circle,draw,inner sep=2cm]{\includegraphics{myimage.jpg}}; \end{tikzpicture} \end{document}   How do I modify the above code so that the included image is adapted to the circle shape and cropped of the exceeding parts?  I want to specify a shape (a circle) and then include an image respecting the given dimension and cropped.


Apex class   Public class BlockIEPolicyCondition implements TxnSecurity.PolicyCondition {     public boolean evaluate(TxnSecurity.Event e) {         List<User> users = [SELECT ProfileId FROM User WHERE Id = :e.UserId];        // if (users == null || users.size() == 0){            // return false;        // }         String profileId = (String)users.get(0).get('ProfileId');         List<Profile> profiles = [SELECT Name FROM Profile WHERE Id = :profileId];        if (profiles == null || profiles.size() == 0 ||users == null || users.size() == 0){             return false;         }          String profileName = (String)profiles.get(0).get('Name');         List<LoginHistory> eObjList = [SELECT Browser FROM LoginHistory WHERE Id = :e.data.get('LoginHistoryId') Limit 1];         string profileName1 = '"' +profileName + '"';         String P=system.label.BlockIEPolicyProfile;         Boolean ismatch = p.contains(profileName1);         if(ismatch && eObjList.size()>0 && eObjList[0].Browser.contains('IE'))             return true;        else              return false;     } }   Test class  @isTest public class BlockIEPolicyCondition_Test  {     static list<User> userList=new list<User>();     public static void setupTestData() {         User use1=SRVS_CreateTestDataFactory.createUser('Service Integration Profile');         use1.FederationIdentifier='9098';          use1.External_ID__c='9098';         use1.Dell_NTUserID__c='A_T';         use1.File_Source__c='AMS - Admin';                use1.Organization__c='dell';         use1.Service_User_Type__c='Business';         insert use1;         User use2=SRVS_CreateTestDataFactory.createUser('System Read Only');         use2.FederationIdentifier='4567';          use2.External_ID__c='4567';         use2.Dell_NTUserID__c='B_T';         use2.File_Source__c='AMS - Admin';                use2.Organization__c='dell';         use2.Service_User_Type__c='Business';         insert use2;         userList.add(use2);         userList.add(use1);     }     @isTest     public static  void testIsNotIE()      {          User use3=SRVS_CreateTestDataFactory.createUser('service Agent');         use3.FederationIdentifier='9876';          use3.External_ID__c='9876';         use3.Dell_NTUserID__c='C_T';         use3.File_Source__c='AMS - Admin';                use3.Organization__c='dell';         use3.Service_User_Type__c='Business';         insert use3;         system.runAs(use3)         {             Test.startTest();               LoginHistory loginHistoryObj = new LoginHistory();             Map<String, String> eventData = new Map<String, String>();             TxnSecurity.Event e = new TxnSecurity.Event(                 UserInfo.getOrganizationId(),                 UserInfo.getUserId(),                  'AuthSession',                  'Login',                 'LoginHistory',                 '01pR00000009D2H',                  Datetime.newInstance(2018, 6, 7),eventdata);              BlockIEPolicyCondition condition = new BlockIEPolicyCondition();             boolean b= condition.evaluate(e);             Test.stopTest();          }         System.assertEquals(0, userList.size());     } }

This is a canonical question and answer developed by the community to help address common questions. If you've been directed here, or your question has been closed as a duplicate, please look through the resources here and use them to shape more specific questions. To browse all canonical questions and answers, including more unit test resources, navigate to the  tag.  This canonical question is intended to address several classes of common questions by providing a quick summary and links to comprehensive resources:   How is code coverage obtained and calculated? How do I increase my coverage?  Why can't I cover these lines? Why isn't the body of my loop or conditional statement covered?


I installed a custom module that created few content type that I'm no longer need it. I disable and uninstall that module but I still have the content type. And it bother me every time I see it. So I try to delete it however, I cant because for some reason doesnt have the delete button. So now I have 5 content type that I don't need. Can anyone have a solution on how to remove these content types ?  In this picture you will see that doesnt allow me to delete the content type.

I have a Drupal 7 site, and under the Content Types menu, only certain types have a 'delete' link under the 'Operations' column.   All of the content types have the links for 'edit', 'manage fields', and 'manage display', but only some have 'delete', while others don't.   I checked my permissions for my user, and I do have Administer content types -- but that appears to be one global permission for all content types, so I still don't understand why some are deletable while others aren't.   Why do only certain content types have a delete operation?


How can I convert a string of a small integer? In my code below, I check whether a string is a member of a list, which returns a string of "0" or "1". I am trying to use this returned value in \fpeval to make a decision using if-statement in the macro \processNum.   Could someone kindly please help me?  \documentclass[tikz, border=0mm]{standalone} \usepackage{tikz,xfp}  \usepackage{xstring} \newcommand\IfStringInList[2]{\IfSubStr{,#2,}{,#1,}} % Adapted from https://tex.stackexchange.com/a/260909/23594  \newcommand{\convertStringToInteger}[1] {      % I am trying to find a convertor }  \newcommand{\singleBox}[4]{%     \fill(\fpeval{#1}mm,\fpeval{#2}mm) rectangle     (\fpeval{#1} mm + \fpeval{#3} mm,\fpeval{#2} mm - \fpeval{#4} mm); }  \newcommand{\processNum}[5] % {     \fpeval{        \convertStringToInteger{           \IfStringInList{#1}{1,17,130,109}{1}{0}} ? #3 + 39 + (#4 + #5) + (#2-1) : 0 } }  \begin{document}     \IfStringInList{17}{1,17,130,109}{1}{0} % Works just fine. [for debugging purposes].     \IfStringInList{16}{1,17,130,109}{1}{0} % Works just fine. [for debugging purposes].      \begin{tikzpicture}         \draw[draw=black] (0mm,0mm) rectangle (300 mm, 400 mm);         \singleBox{100}{200}{24}{13} % This works just fine. [for debugging purposes]         \singleBox{\processNum{1}{1}{0}{2}{1.46}}{200}{24}{13} % Fails at this line.     \end{tikzpicture}  \end{document}

Is there any way to check whether an integer is a member of a list of integer numbers and return a boolean?   I found this neat solution,  that does a great job. It checks whether a string exists in a list of strings:   \documentclass{article} \usepackage{xstring} \newcommand\IfStringInList[2]{\IfSubStr{,#2,}{,#1,}} \begin{document}     \IfStringInList{Paul}{George,John,Paul,Ringo}{True}{False} \end{document}    However, it does return a string not a boolean "true" or "false" and caused me some difficulty which is posted .    Let's call the macro I would like to have \ISMEMBER. My goal is to use \ISMEMBER and examine whether an integer is in the list and depending on whether it is or not, perform some tasks, as an example:  \fpeval{ \ISMEMBER{1}{1,2,3,4,5} ? \MACRO_FOR_MEMBERS : \MACRO_FOR_NON_MEMBERS }   Is such functionality possible?


I haven't installed any new packages recently or added any PPAs, just ran apt update.  After running 'apt upgrade'  Reading package lists... Done Building dependency tree        Reading state information... Done You might want to run 'apt --fix-broken install' to correct these. The following packages have unmet dependencies:  libglvnd-dev : Depends: libglvnd0 (= 1.0.0-2ubuntu2.1) but 1.0.0-2ubuntu2.2 is installed                 Depends: libglvnd-core-dev (= 1.0.0-2ubuntu2.1) but 1.0.0-2ubuntu2.2 is installed                 Depends: libegl1 (= 1.0.0-2ubuntu2.1) but 1.0.0-2ubuntu2.2 is installed                 Depends: libgles2 (= 1.0.0-2ubuntu2.1) but 1.0.0-2ubuntu2.2 is installed                 Depends: libgl1 (= 1.0.0-2ubuntu2.1) but 1.0.0-2ubuntu2.2 is installed                 Depends: libglx0 (= 1.0.0-2ubuntu2.1) but 1.0.0-2ubuntu2.2 is installed                 Depends: libopengl0 (= 1.0.0-2ubuntu2.1) but 1.0.0-2ubuntu2.2 is installed E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).   After running 'apt --fix-broken install' or 'apt-get install -f'  Reading package lists... Done Building dependency tree        Reading state information... Done Correcting dependencies... Done The following additional packages will be installed:   libgles1 libglvnd-dev The following NEW packages will be installed:   libgles1 The following packages will be upgraded:   libglvnd-dev 1 upgraded, 1 newly installed, 0 to remove and 1 not upgraded. Need to get 0 B/14.6 kB of archives. After this operation, 66.6 kB of additional disk space will be used. Do you want to continue? [Y/n] y (Reading database ... 686678 files and directories currently installed.) Preparing to unpack .../libgles1_1.0.0-2ubuntu2.2_amd64.deb ... Unpacking libgles1:amd64 (1.0.0-2ubuntu2.2) ... dpkg: error processing archive /var/cache/apt/archives/libgles1_1.0.0-2ubuntu2.2_amd64.deb (--unpack):  trying to overwrite '/usr/lib/x86_64-linux-gnu/libGLESv1_CM.so.1', which is also in package nvidia-340 340.106-0ubuntu3 Preparing to unpack .../libglvnd-dev_1.0.0-2ubuntu2.2_amd64.deb ... Unpacking libglvnd-dev:amd64 (1.0.0-2ubuntu2.2) over (1.0.0-2ubuntu2.1) ... dpkg: error processing archive /var/cache/apt/archives/libglvnd-dev_1.0.0-2ubuntu2.2_amd64.deb (--unpack):  trying to overwrite '/usr/lib/x86_64-linux-gnu/libGLESv1_CM.so', which is also in package nvidia-340 340.106-0ubuntu3 Errors were encountered while processing:  /var/cache/apt/archives/libgles1_1.0.0-2ubuntu2.2_amd64.deb  /var/cache/apt/archives/libglvnd-dev_1.0.0-2ubuntu2.2_amd64.deb E: Sub-process /usr/bin/dpkg returned an error code (1)   I tried switching back to nouoveau temporarily but due to apt being messed up I can't. The control file asks for all the dependencies to be *-2.2 but when I try to upgrade it's asking for *-2.1.  UPDATE I fixed it by running  sudo dpkg -i --force-overwrite /var/cache/apt/archives/libglvnd-dev_1.0.0-2ubuntu2.2_amd64.deb sudo dpkg -i --force-overwrite /var/cache/apt/archives/libgles1_1.0.0-2ubuntu2.2_amd64.deb sudo apt -f install

For example:  $ sudo apt-get install curl Reading package lists... Done Building dependency tree Reading state information... Done You might want to run 'apt-get -f install' to correct these: The following packages have unmet dependencies: bsh : Depends: libjline-java but it is not going to be installed groovy : Depends: libjline-java but it is not going to be installed rhino : Depends: libjline-java but it is not going to be installed E: Unmet dependencies.   Try 'apt-get -f install' with no packages (or specify a solution).   I get the same or similar errors when I attempt to install clojure1.3, leiningen, and several other packages.   When I try the suggestion made in the error message, this is what happens:  $ sudo apt-get -f install  Reading package lists... Done Building dependency tree        Reading state information... Done Correcting dependencies... Done The following packages were automatically installed and are no longer required:   diffstat linux-headers-3.2.0-26-generic linux-headers-3.2.0-26 dh-apparmor dkms html2text libmail-sendmail-perl libsys-hostname-long-perl Use 'apt-get autoremove' to remove them. The following extra packages will be installed:   libjline-java Suggested packages:   libjline-java-doc The following NEW packages will be installed:   libjline-java 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. 23 not fully installed or removed. Need to get 0 B/72.0 kB of archives. After this operation, 129 kB of additional disk space will be used. Do you want to continue [Y/n]? Y (Reading database ... 226243 files and directories currently installed.) Unpacking libjline-java (from .../libjline-java_1.0-1_all.deb) ... dpkg: error processing /var/cache/apt/archives/libjline-java_1.0-1_all.deb (--unpack):  trying to overwrite '/usr/share/java/jline.jar', which is also in package scala 2.9.2-400 Errors were encountered while processing:  /var/cache/apt/archives/libjline-java_1.0-1_all.deb E: Sub-process /usr/bin/dpkg returned an error code (1)  $ sudo apt-get upgrade Reading package lists... Done Building dependency tree        Reading state information... Done You might want to run 'apt-get -f install' to correct these. The following packages have unmet dependencies:  bsh : Depends: libjline-java but it is not installed  groovy : Depends: libjline-java but it is not installed  rhino : Depends: libjline-java but it is not installed E: Unmet dependencies. Try using -f.


Which one is more common? Example sentence:  The firework festival was held at/by the river.  Or are they equally correct?

If we want to say "near the river" or "near the lake" which preposition is more accurate by or at?  I think when speaking about a river or lake by is better. Am I right? I mean when we are situated near by, somewhere close to the river or lake, near the bank of the river or on the beach by-side the lake.


here is what i got so far:    // my array $this->headersArray = array(     array('handle' => 'buy_mobile_funcs', 'src' => 'jsFunctions', 'extention' => 'js', 'deps' => '', 'media' => ''),      array('handle' => 'css_main_style', 'src' => 'main_style', 'extention' => 'css', 'deps' => '', 'media' => 'screen') );  // registering  foreach($this->headersArray as $singleHeader){     if($singleHeader['extention'] == 'js'){         wp_register_script(             $singleHeader['handle'], plugins_url('scripts/'.$singleHeader['src'].'.'.$singleHeader['extention'],__FILE__),              (!empty($singleHeader['deps']))? $singleHeader['deps']  : ''         );     }else{         wp_register_style(             $singleHeader['handle'], plugins_url('css/'.$singleHeader['src'].'.'.$singleHeader['extention'],__FILE__),              (!empty($singleHeader['deps']))? $singleHeader['deps']  : ''         );     } }  // enqueuing  foreach($this->headersArray as $singleHeader){     if($singleHeader['extention'] == 'js'){         wp_enqueue_script($singleHeader['handle']);     }else{         wp_enqueue_style( $singleHeader['handle'], '', '', '', $singleHeader['media'] );     } }   I know i could combine the 2 foreach. however i have a reason to keep it as it is now which is not relevant to the questions.  Error:  Notice: wp_register_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. Please see Debugging in WordPress for more information. (This message was added in version 3.3.) in /home1/stodeckc/public_html/orgadsite/wp-includes/functions.php on line 3012   Thanks in advanced.

I get this error due to one of the plugins which I rely on.   Notice:  wp_enqueue_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or init hooks.   What does this error mean and how do you fix it?  Mind due that this is not a critical error. It only appears when I put WP into debug mode.   The full plugin-code is below.   It's one heck of a plug in that makes it a breeze to deal with the highly complicated and hierarchical cats. I'm posting it not just for the sake of debugging where the bloddy error is but also to hope that it helps someone.   <?php /*  **************************************************************************  Plugin Name:  Category Collapse Description:  Makes children categories hidden on the Write screens until an icon is clicked. Version:      2009.02.12 Author:       Viper007Bond Author URI:   http://www.viper007bond.com/  **************************************************************************/  class CategoryCollapse {      // Plugin initialization     function CategoryCollapse() {         if ( !is_admin() ) return;          wp_enqueue_style( 'category-collapse', plugins_url('/category-collapse/category-collapse.css'), array(), '2009.02.12', 'screen' );         add_action( 'admin_head', array(&$this, 'edit_form_advanced') );     }       // Output the Javascript (it's not in an external file due to the dynamic image URLs)     function edit_form_advanced() { ?>  <?php     } }  // Start this plugin once all other plugins are fully loaded add_action( 'plugins_loaded', create_function( '', 'global $CategoryCollapse; $CategoryCollapse = new CategoryCollapse();' ) );  ?>


I set my Minecraft username to a name I don't like. I don't want to wait the full 30 days to change it back or to something different. So is there ANY way I can speed up the 30 day wait?

How do I change my name in minecraft name earlier than the 30 days please, I need help. My name is really dumb and I would like to change it early.   I do not hack and I would like to change it early with NO hacks. I already looked up this question but I got no help . I tried looking up and I am quite impatient.  is the link I used


I've downloadad the latest  file, to install it into Ubuntu 13.04. After downloading the file, I just can run it. I've double click it (and I've tried right click and clicking "open", whith the same result). All the answer I get is this message:  Could not display “xampp-linux-1.8.3-1-installer.run”. There is no application installed for “executable” files. Do you want to search for an application to open this file?  I've tried searching for an application, with no result... Also, I haven't found any questions related to this issue with the 13.04 Unity version... I've tried , with no result. Please note that this isn't a Xampp question, the same happened to me when I tried to install Skype. UPDATE: I've tried :  cd ~/Downloads chmod +x myfile.run sudo sh myfile.run  And I've got this error:  Syntax error: "(" unexpected  What should I do? Thanks!

Hi all im a noob on Ubuntu/Linux World,  So i need some that give a full tutorial to How to install  from apachefriends.org correctly on Ubuntu 11.10 + all beyond Ubuntu for 32 bit and also 64 bit Desktop Version.. and also i need this:   Make a Folder on Your Home Folder and Linked to htdocs from Apache Web Server Make a GUI interface for Xmapp Start Xampp when Ubuntu Boot Up or Start Ubuntu   (Note: i ask it for both X86 and X64 so people in the further can see the tutorials)    New Data:  What i did was i download from  for now and i also what to say that I'm currently running Ubuntu 11.10 X64 bit for Dell Studio 1558 processor intel i3  i will let you know guys which solution was the best, and it is for a Desktop Version of Ubuntu 11.10 (Laptop 15 inch screen ^_^ ) not Server Ubuntu


I would like to ship homemade mozzarella. I'm considering purchasing a vacuum packaging system to preserve it for the 2-3 day trip. Is this recommended? If not, are there any alternatives?

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


I just installed Ubuntu 16.04 on a separate HDD, and I noticed two oddities:   Whereas on 14.04 (on my main HDD) my USB Wi-Fi dongle shows up as wlan0, on 16.04 it shows up as wlx112233445566. (Real MAC redacted) Also, using the hw ether parameter to change the MAC address doesn't work on 16.04.   Here's the relevant output from lsusb:  Bus 008 Device 002: ID 148f:5370 Ralink Technology, Corp. RT5370 Wireless Adapter   Can anyone shed some light on what's going on here?

A lot of my scripts stopped working after installing Ubuntu 15.10 and I have trouble remembering this new name as I was used to ethx and wlanx for years. Is there a reason for this change? Do I have to get used to this or can I just rename it and go back to good old eth0?  $ ifconfig  enp0s25   Link encap:Ethernet  HWaddr 77:5a:5e:a6:86:d5         inet addr:192.168.31.239  Bcast:192.168.31.255  Mask:255.255.255.0       inet6 addr: fe80::725a:b6ff:fea6:86d7/64 Scope:Link       UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1       RX packets:4833 errors:1332 dropped:0 overruns:0 frame:666       TX packets:5589 errors:0 dropped:0 overruns:0 carrier:0       collisions:0 txqueuelen:1000        RX bytes:3266446 (3.2 MB)  TX bytes:1046654 (1.0 MB)       Interrupt:20 Memory:d3500000-d3520000


I never put salt into the water when I boil it to make pasta even though cooking directions always suggest I do that and the pasta comes out fine. How necessary it is?

What is the effect of adding salt to the water when cooking pasta?


I working with an app but I have a problem. When I press the back button my app crashes and gives me Null Pointer Exception error. I have a list view with some data from api where I used retrofit2 to call them. Everything works fine except the back button. Here is what I did: My adapter  private Context context; private Industry industries;  public IndustryAdapter(Context context, Industry industries) {     this.industries = industries;     this.context = context; }  @Override public int getCount() {     return 1; }  @Override public Object getItem(int position) {     return 1; }  @Override public long getItemId(int position) {     return 0; }  @Override public View getView(int position, View convertView, ViewGroup parent) {     if (convertView == null) {         LayoutInflater inflater = ((Activity) context).getLayoutInflater();          convertView = inflater.inflate(R.layout.row_item, parent, false);     }      TextView tvName = (TextView)convertView.findViewById(R.id.tvName);     TextView tvDescription = (TextView)convertView.findViewById(R.id.tvDescription);      String name = industries.getName();     //industries.setName(name);     String descr = industries.getDescription();     //industries.setDescription(descr);      tvName.setText(name);     tvDescription.setText(descr);      return convertView; }   and in my activity I have this  CompaniesRetriver companiesRetriver = new CompaniesRetriver();     this.recyclerView = (RecyclerView) findViewById(R.id.companies_list);     SharedPreferences editor = getSharedPreferences(MY_PREFERENCE, MODE_PRIVATE);     String token = editor.getString("token", "");     final Context sfdsf = this;     Callback<Companies> callback = new Callback<Companies>() {         @Override         public void onResponse(Call<Companies> call, Response<Companies> response) {             progressBar.dismiss();             if(response.isSuccessful()) {                 progressBar.dismiss();                 Companies companies = response.body();                 CompanyAdapter adapter = new CompanyAdapter(CompaniesListActivity.this, companies);                 recyclerView.setLayoutManager(new LinearLayoutManager(CompaniesListActivity.this));                 recyclerView.setAdapter(adapter);                 System.out.println(companies);             } else {                 System.out.println(response.body());             }         }          @Override         public void onFailure(Call<Companies> call, Throwable t) {             progressBar.dismiss();             System.out.println(t.getLocalizedMessage());         }     };      companiesRetriver.getCompanies(callback, token);   My Log:   java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String al.sqmo.model.Industry.getName()' on a null object reference   my POJO class  @SerializedName("name")     private String  name;     @SerializedName("id")     private int  id;     @SerializedName("description")     private String description;      public Industry(String description, String name, int id) {         this.description = description;         this.name = name;         this.id = id;     }      public String getDescription() {         return description;     }      public void setDescription(String description) {         this.description = description;     }      public String getName() {         return name;     }      public void setName(String name) {         this.name = name;     }      public int getId() {         return id;     }      public void setId(int id) {         this.id = id;     }   Any help is appreciated!

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?


How can I create a hard link to a directory in Mac OS X?  This feature has been added to their file system in  (Leopard) (for time machine), but I could not find any information on actually using it from the command line.

How do you create a hardlink (as opposed to a symlink or a Mac OS alias) in OS X that points to a directory? I already know the command "ln target destination" but that only works when the target is a file. I know that Mac OS, unlike other Unix environments, does allow hardlinking to folders (this is used for Time Machine, for example) but I don't know how to do it myself.


I want to force a table and a figure to appear in a page with nothing except them. I've tried \clearpage but it makes lots of extra spaces in the document. Also some of the figs appear in the end of the document although I have placed them in the middle of the document.  This is the code I'm using :  \begin{figure*}[ht] {\includegraphics[width=\linewidth]{pic1}}\caption{example_fig}  \label{fig1} \end{figure*}  \begin{table*}[ht] \begin{tabularx}{\linewidth}{@{}>{\hsize=0.8\hsize}X *2{>{\hsize=1.1\hsize}X}@{}} a & b & c \\[0.7ex] \end{tabularx} \caption{example} \label{tab:template} \end{table*}   So if anyone could please assist me.

How to influence the position of float environments like figure and table in LaTeX?   This is a general question and should collect useful answers for all users. I hope we can use this as a reference


I have big document in LaTeX (approx. 1000 pages, tens used packages, math, hundreds references \bibitem + \cite, cross-references \label + \ref, indices \index, tables and TikZ figures). The document is built from hundreds LaTeX files (using standalone and \input). TikZ figures are also in separate files with \tikzexternalenable (whenever it is possible), some of them have more than 1000 rows. When compiled by PdfLaTeX the TikZ figures are not recompiled (corresponding files *.dpth, *.log, *. md5 and *.pdf are unchanged with old date).  The document reached some limit because after adding new TikZ figure the compilation PdfLaTeX finish after the 2nd run with error:   the 1st processing by PdfLaTeX finish with "Process exited normally" the 2nd processing by PdfLaTeX finish with error "TeX capacity exceeded, sorry [main memory size=123000000]" – every time in some TikZ file (which is not recompiled so I do not understand why problem is inside it)   In LOG file the location of error is described as follows (e.g.):    ! TeX capacity exceeded, sorry [main memory size=123000000].  ...755) (1.6,0.149253036) (1.64,0.                                                   14630663108) (1.68,0.14334... l.1661 \end{tikzpicture}    Summary in LOG file (problem is in "words of memory" record):  Here is how much of TeX's memory you used:   65319 strings out of 493340 1540999 string characters out of 3139331 123000001 words of memory out of 123000000 60823 multiletter control sequences out of 15000+200000 63320 words of font info for 190 fonts, out of 3000000 for 9000 1166 hyphenation exceptions out of 8191 114i,44n,128p,25560b,8155s stack positions out of 5000i,500n,10000p,200000b,50000s !  ==> Fatal error occurred, no output PDF file produced!     There are no syntax errors, because when I remove SOME TikZ figure then compilation is successful (I tried it with removing various figures, not with certain one).  Can somebody help me to find way for working with such big documents ?  Environment:   Windows 10 TexStudio 2.12.6 MiKTeX 2.9 PdfLaTeX command: pdflatex -synctex=1 -interaction=nonstopmode --shell-escape --enable-write18 --extra-mem-bot=120000000 ?me   Minimal Working Example is not attached, because problem occurs only with Maximal Working Example ...  Added 23.1.2018: This question was marked as an exact duplicate of an existing question - my problem is in compilation of big document with TikZ externalization in pdflatex if all (for me) known memory settings are on maximum  - not "How to expand TeX's “main memory size”?"  In my case:   externalize: it was used = no success (and still I do not understand why PDFLaTeX processes those TikZ files with big consumption of memmory while it does not create any new PDF external file for graphics ...) change "extra_mem_bot": it was set to maximal (possible in my PC) value 130000000 = no success add "extra_mem_top": I tried it with value 10000000 = no success add some setting to texmf.cnf: it is in TeXLive, not in TexStudio = so no success to add "save_size" or "main_memory" add some setting to pdftex.ini: this workaround is so suspicious that I had not enough courage to try it (especially after warnings "DO NOT EDIT THIS FILE DIRECTLY") use luatex: maybe, I will try, but it is run for longer distance   I have converted all my files from Win1250 to UTF8 I have changed several packages (for Unicode using) still I am not able to compile original document (e.g. luaLaTeX stops compilation after 100 errors = which in my case are undefined references typically defined in the second/third run)

I'm compiling one pretty simple LaTeX file with few dozen of pgfplots. Now, I can compile part by part, but am unable to compile it all at once. I really need good precision for all those plots (noise plots) and would like to avoid decimating graphs more. When I run compile, I get this error message:  [...] TeX capacity exceeded, sorry [main memory size=3000000].   Is there a way to avoid this message somehow? How am I supposed to use pgfplots if I can't plot couple dozen of figures with it without having TeX overloaded? How to expand TeX memory size, please?


Update query not taking integer variable ($user):- $user = $_POST["user"]; $user = (int)$user; $sql = "UPDATE users_meta     SET          `meta_value` = '$plan_end'     WHERE          `user_id` = $user AND          `meta_name` = 'plan_end'"; $conn->query($sql);  user_id column in mysql database is set to int datatype. When I simply put a number instead of the variable, it works:- WHERE      `user_id` = 37 AND ...  I also tried without converting the number from string to int, and its not working. I have a feeling that it has something to do with quotes, so I played around with it based on suggestions online, but none worked.

If user input is inserted without modification into an SQL query, then the application becomes vulnerable to , like in the following example:  $unsafe_variable = $_POST['user_input'];   mysql_query("INSERT INTO `table` (`column`) VALUES ('$unsafe_variable')");   That's because the user can input something like value'); DROP TABLE table;--, and the query becomes:  INSERT INTO `table` (`column`) VALUES('value'); DROP TABLE table;--')   What can be done to prevent this from happening?


I have the following text stored in a .txt file - I want to have the sum of 'NUM_OF_USERS' using linux command.     so the desired result here is - Total 236

I have a file as given below  -------------------------------------------------------------- Name_Customer   Item_Purchased  Item_Amount Credit -------------------------------------------------------------- Tom              H1_P            7657        N/A     Pras             Track_1         23          N/A Cha              Brace           9           N/A Moh              kite37          269         N/A Prab             Bols            87699       N/A   I need to add the values under the column Item_Amount by ignoring the header in the file and print the sum as  Total Amount collected = 95657


I've noticed in a lot of proceedings that Aboriginal citizens in Australia are referred to as 'Aboriginal peoples', not 'Aboriginal people' - is there any specific reason?

Let's say we are talking about the indigenous pukapuka who live in Pluto.  What is correct: "the pukapuka people" or "the pukapuka peoples"?  I've read somewhere the usage of "peoples" in this context, and it has surprised me.


I'm facing some doubts while studying the lecture on magnetic dipole potential energy  - "15–1 The forces on a current loop; energy of a dipole".  When it's showed that, for a rectangular loop, $\mathrm{U_{mech}}$ corresponds to the mechanical work done in bringing the loop into a magnetic  field $\bf{B}$ (from equation $(15.6)$ to equation $(15.11)$) the work on the loop "against magnetic forces" is calculated.   My question is: since magnetic forces never do work on electrons in the loop, how can there be a work done against them?    The explanation I tried to give myself is the following. As explained in the following sections of the lecture, the velocity of the electrons is not parallel to the loop but is also has a component due to the traslational motion. Therefore the force considered when the work is calculated shouldn't be the total magnetic force, but only a part of it. So maybe this has something to do with the possibility for this force to do work?   I'm getting a bit confused on the topic, any suggestion is highly appreciated.

In the textbook I'm reading it gives an example of where a person pulls a rectangular wire with a velocity $v$ and the left side of that wire is in a uniform magnetic field.    After some calculations, the author states that calculating the emf from the current induced in line $ab$ is equivalent to the work done by the person pulling the wire even though the force of the magnetic field has no effect on the work done by the person and the force exerted by the person has no effect on the emf. How is that the force produced by the magnetic field can produce an emf on line $ab$ if magnetic fields do no work?


The value of d which is a double when compared to 0.01 is not satisfied due to presence of some digits at the end of the number which I found using flags . Why does this occur and how do we overcome this ? Thank you . Code for this :

Consider the following code:   0.1 + 0.2 == 0.3  ->  false   0.1 + 0.2         ->  0.30000000000000004   Why do these inaccuracies happen?


I have a linux server hosting Minecraft that I can connect to using ssh, I should probably also mention that I do have an ssh key with no passphrase. I want to backup my Minecraft world every hour to my local pc in a backups/minecraft_backups folder I have a bash script in /etc/cron.hourly that looks like this: #!/bin/sh rsync -re ssh --delete root@<server-ip-address>:/root/minecraft/world/* ~/backups/minecraft_backups/$(date "+%B%d-%Y")  The script works perfectly if I run it on its own but, for some reason, the cronjob doesn't work(nothing happens).

This is a  about using cron & crontab.   You have been directed here because the community is fairly sure that the answer to your question can be found below. If your question is not answered below then the answers will help you gather information that will help the community help you. This information should be edited into your original question.  The answer for 'Why is my crontab not working, and how can I troubleshoot it?' can be seen below.  This addresses the cron system with the crontab highlighted.


"Prove that there exist 4 people in the waiting room who all know each other..."  This is a part of a math problem. Should the "exist" be "exists" or is it correct the way it currently is?

I know the usage of     This is a new car.   This is singular.     These are some books for you.   These is plural.  Shall we use   There exists some people who agree with me. There exist some people who agree with me.   Which one is the correct usage and why?


In Objective C I know that the asterisk * works as a pointer to creating/defining/initializing a pointer to an object.   But what about when the asterisk is inside a parenthesis?  It is the same   (NSString*) name;  than  NSString *name;  Second question  If I declare in the @ interface the methods without using @property way i do    - (void) setName:(NSString*) newName;   - (NSString*) name;   - (void) setSupervisor:(Employee*) newSupervisor;   - (Employee*) supervisor;   - (void) setSalary:(int) newSalary;   - (int) salary;   But if i use @property I do     @property (nonatomic, readonly) int employeeNumber;    @property (nonatomic, retain) NSString *name;     @property (nonatomic, retain) Employee *supervisor;    @property (nonatomic, assign) int salary;   Why the parenthesis in NSString, int, Employee disappeared? Why the asterisk move from (NSString*) name; to NSString *name  Thank you  CL

Just a quick question from an Objective-C beginner: what does the asterisk in the parenthesis mean in the following sample code? Is it a pointer? Thanks in advance.  #import <Foundation/Foundation.h>  @interface Tire : NSObject @end @implementation Tire  - (NSString *) description {    return (@"I am a tire."); }  @end


While mkusb was working to make a persistent Ubuntu Live USB, for a friend who damaged his HDD, I pulled out the USB cause it was taking too long. After that, I plugged it back in and I couldn't format it and when I select the option to format, it showed:  Error creating partition on /dev/sda: Command-line parted --align optimal --script "/dev/sda" "mkpart primary ext2 1MiB 15472047103b"' exited with non-zero exit status 1: Error: The location 1MiB is outside of the device /dev/sda.  (udisks-error-quark, 0)   I tried almost every guide but I don't get any results and fdisk seems to have completely forgotten that I have an 8 GB stick and shows 1.4 GB.

I have a 8 GB pendrive. I used to write raw data into the pendrive (without creating filesystem) using the dd command.    Today, when I inserted the pen drive, the I am unable to write anything on to it.  When I open gparted it is showing the total space on the pen drive as 500 MB. I am unable to create a new partition table or a partition on the pen drive now.   Here is the fdisk -l output.   Disk /dev/sdb: 0 MB, 512000 bytes 255 heads, 63 sectors/track, 0 cylinders, total 1000 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 4096 bytes I/O size (minimum/optimal): 4096 bytes / 4096 bytes Disk identifier: 0x00095df6   What's wrong with the pen drive? How can I recover the lost space?   Device Boot      Start         End      Blocks   Id  System   When I open gnome-disks, it shows the total space as 8 GB but when I try to create a new partition using it, it shows the following error:  Error creating partition on /dev/sdb: Command-line parted --align optimal --script "/dev/sdb" "mkpart primary ext2 1MiB 7969177599b"' exited with non-zero exit status 1: Error: The location 7969177599b is outside of the device /dev/sdb.  (udisks-error-quark, 0)


I'm wondering if my thinking here is right. I want to find all subfields of $\mathbb{Q}$($\sqrt2,\sqrt3)$. I believe that $\mathbb{Q}$($\sqrt2,\sqrt3)$ is the smallest field containing $\mathbb{Q}$, $\sqrt3$, and $\sqrt2$.   So this leads me to believe all of the subfields are: $\mathbb{Q}$($\sqrt2,\sqrt3)$ (the field itself), $\mathbb{Q}$($\sqrt2)$,$\mathbb{Q}$($\sqrt3)$, and $\mathbb{Q}$. Is this right?

Suppose one doesn't know any Galois theory, but they are familiar with the basic theory of field extensions. Then how would one justify the following picture?    I'm pretty sure they're just saying these are the known subfields, and there could be more but they just write down those ones (which seems weird, which is why I'm asking). Or have they deduced that this is a comprehensive list of subfields just by using basic theory? This occurs on page 573 of Dummit and Foote's Abstract Algebra.


I want to prove that  let S be the set on which group G operates. Let H ={ g∈G | g.s=s for all s∈S} prove that H is normal subgroup of G. This group action gives an homomorphism whose kernal is H. Then it follows directly from statement that H is normal.  How to prove that if the subgroup is the kernel of a homomorphism having the group as its domain then it is normal?  Any help clearing up the statement would be greatly appreciated. Thanks! Is there any other approch ?

My professor proved that the kernel is a normal subgroup under a homomorphism f by saying. Let $h\in H$  by applying f to it  $f(ghg^{-1})=f(g)f(h)f(g)^{-1}=e $  My question is how is this a proof that the kernel is normal. What is the reason we apply f to it ? By applying f dont we just prove that $f(ghg^{-1})$ is normal ?


I installed Ubuntu 18.04 on my Lenovo ThinkPad 10, but WiFi and Bluetooth are not working.  the output from   dmesg | grep brcm  [    5.930339] bluetooth hci0: Direct firmware load for brcm/BCM.hcd failed with error -2 [    5.930347] Bluetooth: hci0: BCM: Patch brcm/BCM.hcd not found [    6.349273] brcmfmac: brcmf_fw_map_chip_to_name: using brcm/brcmfmac43241b5-sdio.bin for chip 0x004324(17188) rev 0x000006 [    6.349381] usbcore: registered new interface driver brcmfmac [    6.353905] brcmfmac mmc1:0001:1: Direct firmware load for brcm/brcmfmac43241b5-sdio.txt failed with error -2 [    7.380766] brcmfmac: brcmf_sdio_htclk: HT Avail timeout (1000000): clkctl 0x50 [    8.384079] brcmfmac: brcmf_sdio_htclk: HT Avail timeout (1000000): clkctl 0x50   Can you please help?  Thank you. WiFi is working after applying: sudo cp /sys/firmware/efi/efivars/nvram-74b00bd9-805a-4d61-b51f-43268123d113 /lib/firmware/brcm/brcmfmac43241b5-sdio.txt  Bluetooth was enabled by following:  It now discovers BT devices. However, it will not connect to device.  There is still an error with firmware:  output from  dmesg | grep firmware  [    6.031479] brcmfmac mmc1:0001:1: Direct firmware load for brcm/brcmfmac43241b5-sdio.clm_blob failed with error -2

Bluetooth is on but can't find or be found by any other devices.  Output of sudo service bluetooth status:  ● bluetooth.service - Bluetooth service    Loaded: loaded (/lib/systemd/system/bluetooth.service; enabled; vendor preset: enabled)    Active: active (running) since ხუთ 2015-06-04 22:33:18 GET; 13min ago  Main PID: 26678 (bluetoothd)    CGroup: /system.slice/bluetooth.service            └─26678 /usr/sbin/bluetoothd -n  ივნ 04 22:39:14 Rangoo bluetoothd[26678]: Endpoint registered: sender=:1.63 path=/MediaEndpoint/BlueZ4/HFPAG ივნ 04 22:39:14 Rangoo bluetoothd[26678]: Endpoint registered: sender=:1.63 path=/MediaEndpoint/BlueZ4/HFPHS ივნ 04 22:39:14 Rangoo bluetoothd[26678]: Endpoint registered: sender=:1.63 path=/MediaEndpoint/BlueZ4/A2DPSource ივნ 04 22:39:14 Rangoo bluetoothd[26678]: Endpoint registered: sender=:1.63 path=/MediaEndpoint/BlueZ4/A2DPSink ივნ 04 22:39:14 Rangoo bluetoothd[26678]: bluetoothd[26678]: Endpoint registered: sender=:1.63 path=/MediaEndpoint/BlueZ4/HFPAG ივნ 04 22:39:14 Rangoo bluetoothd[26678]: bluetoothd[26678]: Endpoint registered: sender=:1.63 path=/MediaEndpoint/BlueZ4/HFPHS ივნ 04 22:39:14 Rangoo bluetoothd[26678]: bluetoothd[26678]: Endpoint registered: sender=:1.63 path=/MediaEndpoint/BlueZ4/A2DPSource ივნ 04 22:39:14 Rangoo bluetoothd[26678]: bluetoothd[26678]: Endpoint registered: sender=:1.63 path=/MediaEndpoint/BlueZ4/A2DPSink ივნ 04 22:39:14 Rangoo bluetoothd[26678]: Adapter /org/bluez/26678/hci0 has been enabled ივნ 04 22:39:14 Rangoo bluetoothd[26678]: bluetoothd[26678]: Adapter /org/bluez/26678/hci0 has been enabled   Output of lsusb:  Bus 003 Device 005: ID 0a5c:21d7 Broadcom Corp. BCM43142 Bluetooth 4.0   How can I fix it?


I am more familiar with Windows and Linux where when I close the application window, the application is closed. On Mac Big Sur, commonly, when I close an application, a small dot exists under the icon in the dock, indicating the program is still running. Why is this? For example, while on Linux or Windows, when I close my sole Visual Studio Code window, the application completely closes. The process is completely gone. When I close vscode on mac, a small dot still exists in the doc, and when I open activity monitor, I can see the 'Code' process is still running.

When I'm working on MS Office 2011, when I close a document, spreadsheet, presentation, etc., the application stays open. This is confusing (to me anyway) and I find myself having to explicitly quit these apps all the time (to get them out of the way).  Is there a way to quit an app when the last item is closed?  Thanks in advance!


Question involving RAW.  Basic question: does a multiclass druid know, and are they able to prepare and cast, any spell on the Druid spell list for which they have a spell slot?  For instance, would a Wizard 19/Druid 1 be able to prepare and cast a 9th level druid spell?  It seems like one of the major limitations put on multiclass spellcasters in RAI is that their spells known list is determined by each class individually.  So, for instance, as pointed out in the multiclass rules, a Ranger 4/Wizard 3 would only know second level Wizard spells (gained when leveling to Wizard 3).    However, druids seem to buck this limitation.  It seems like any druid would know, be able to prepare, and be able to cast a spell of any level for which it has a spell slot, even via multiclassing.  So, for instance, a 1 Druid/19 Wizard could prepare and cast a 9th-level Druid Spell.   Multiclassing rules, PHB pg. 164     "You determine what spells you know and can prepare for each class individually, as if you were a single-classed member of that class."   Druid Rules, PHB pg. 66     "You prepare the list of druid spells that are available for you to cast, choosing from the druid spell list.  When you do so, choose a number of spells equal to your Wisdom modifier + your druid level (minimum of one spell).  The spells must be of a level for which you have spell slots.     So if I were a 1 Druid/19 Wizard, I would be able to prepare druid spells = 1+Wis modifier, and of any spell for which I have spell slots.  As a 20th level multiclass caster, I would have the full slate of spell slots - so I could prepare 4 level 9 druid spells if I so chose.    Clarifying the decision spell selecting process for Druid.  The rules for multiclass read that you determine spells you know and can prepare as if you were a single class character of that level.  This refers to spells known (does not apply to druids) and can prepare (the number, 1+Wisdom modifier for the 1 druid/19 Wizard in question.  Spell slots are explicitly generated by combining levels, and druids explicitly can prepare a spell of any level for which they have a spell slot.   Please point out the error in this interpretation of the RAW.  I assume rule as intended would be "Spell slots you have available from your Druid class level".... but that's definitely not RAW.  This is tangentially addressed in this , but only in the Wizard context (where there is more evidence for limited casting) and only by adding words to the rules not actually in the rules.  So this answer does not appropriately address this question.

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


I need to reach the United States from a Schengen Country (I am an Italian Citizen), but as you may know, President Trump has issued a travel ban preventing to enter the US to those who have been in the Schengen area (plus UK and Ireland) in the last 14 days. Please note that I am already fine with visa and the rest of the documentation that I need to show at the US border. To comply with the proclamation, I'm looking for the most convenient place to do this. For convenient I mean that:  the 14-day "quarantine" country admits Italian citizens into its borders;  there is a reliable airlines that does not stop again in the Schengen area while reaching the US (otherwise I would invalidate the 14 days out).  if the place is nice or not too expensive (or both) it would be nice as well, but this is secondary compared to the previous two points.   As for now, I identified Istanbul (Turkey) as I heard that Turkish Airlines is good and I see it has a direct flight to Miami. I was also trying to understand if the Dominican Republic admits Italians into its territory (I'm waiting for an answer from the embassy). Does someone know/has tried other good options?

I'm a European citizen living in the US on a work visa. Due to some unfortunate circumstances, I need to urgently visit my home country. However I would like to get back to the US after my visit is complete. Flying from the US to Europe is not a problem as there are still daily flights between some city pairs. However going back could be tricky, as  anyone who has been in the Schengen area in the past 14 days from re-entering the country.   Is there a flight route that would let me from Europe to some country, stay there for 14 days and then fly to the US? Canada is out, as they've banned international visitors. Mexico seems to keep their border open, but I  any direct European flights from their airports. Almost every other country either suspended flights or doesn't allow foreign nationals to enter.


I have a sch-i800 galaxy tab and I wouldlike to up grade the programing so I can use some of the newer programs out there is this posible?  hardware version i800.0.4  firmware v 2.3.5  baseband v S:i800.0.4v.ei04  kernal v 2.6.35.7  Build # sch-i800.mc2

This Community Wiki question is designed to be the "canonical question" for questions asking how to upgrade one's device to a new Android version.   I want to get a newer version of the OS for my Android device. How can I do that?  See also:


Figured it out. Thanks guys. I know its not a perfect answer but, I'm new to java.   package Dr._Coles_Practice_Problems;  import java.util.Scanner;  public class GpaCalc {  public static void main(String[] args) {     // Needed variables       double credits = 0.0;      double totalcredits = 0.0;      double grade = 0.0;      double qualitypoints = 0;      int classes;      String lettergrade;      Scanner input = new Scanner(System.in);      System.out.println("Enter the amount of classes for this semester");      classes = input.nextInt();      while (classes > 0) {      System.out.println("Enter the amount of credits for this class");      credits = input.nextDouble();      System.out.println("Enter the grade achieved for this class");      lettergrade = input.next();          if (lettergrade.equalsIgnoreCase("a")) {              grade += 4.00;          }          if (lettergrade.equalsIgnoreCase("a-")) {              grade += 3.67;          }          if (lettergrade.equalsIgnoreCase("b+")) {              grade += 3.33;          }          if (lettergrade.equalsIgnoreCase("b")) {              grade += 3.00;          }          if (lettergrade.equalsIgnoreCase("b-")) {              grade += 2.67;          }          if (lettergrade.equalsIgnoreCase("c+")) {              grade += 2.33;          }          if (lettergrade.equalsIgnoreCase("c")) {              grade += 2.00;          }          if (lettergrade.equalsIgnoreCase("c-")) {              grade += 1.67;          }          if (lettergrade.equalsIgnoreCase("d+")) {              grade += 1.33;          }          if (lettergrade.equalsIgnoreCase("d")) {              grade += 1.00;          }          if (lettergrade.equalsIgnoreCase("f")) {              grade += 0.00;          }          classes--;          totalcredits += credits;        }             qualitypoints = grade * credits;         // GPA is calculated via total credits / total quality points     //of which are calculated by multiplying the credit(s) * the quality point value       System.out.println("Your total credit(s)are: " + totalcredits);      System.out.println("Your total quality points are: " + qualitypoints);      System.out.println("Your GPA is: " + (qualitypoints / totalcredits)); }   }  /*   Bloomsburg University's grading scale  A = 4.00 Superior Attainment  A- = 3.67  B+ = 3.33  B = 3.00 Above Average Attainment  B- = 2.67  C+ = 2.33  C = 2.00 Average Attainment  C- = 1.67  D+=1.33  D = 1.00 Minimum Attainment  F = 0.00 Failure  */

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


So what is the problem/contradiction If I state I can divide by 0 but the number will be 0 I tried a few thing but didn't find a problem

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


Suppose $G$ is a random simple graph, that has $n$ vertices, and edges, that are present independently with probability $p$. What is the probability of $G$ being connected?  It is quite easy to calculate the probability for small $n$ (as for small $n$ we can classify all connected graphs with $n$ vertices). Thus for $n = 1$ the probability is $1$, for $n = 2$ it is $p$, and for $n = 3$ it is $3p^2 - 2p^3$. However, I do not know, how to calculate it for arbitrary $n$.  Any help will be appreciated.

The problem: I'm trying to find the probability of a random undirected graph being connected. I'm using the model $G(n,p)$, where there are at most $n(n-1) \over 2$ edges (no self-loops or duplicate edges) and each edge has a probability $p$ of existing. I found a simple formula online  where $f(n)$ is the probability of $G(n,p)$ being connected. But apparently it's too trivial for the writer to explain the formula (it was just stated briefly).  The desired formula: $f(n) = 1-\sum\limits_{i=1}^{n-1}f(i){n-1 \choose i-1}(1-p)^{i(n-i)}$  My method is: Consider any vertex $v$. Then there's a probability ${n-1 \choose i}p^i(1-p)^{n-1-i}$ that it will have $i$ neighbours. After connecting $v$ to these $i$ neighbours, we contract them ($v$ and its neighbours) into a single connected component, so we are left with the problem of $n-i$ vertices (the connected component plus $n-i-1$ other "normal" vertices.   Except that now the probability of the vertex representing connected component being connected to any other vertex is $1-(1-p)^i$. So I introduced another parameter $s$ into the formula, giving us:  $g(n,s)=\sum\limits_{i=1}^{n-1}g(n-i,i){n-1 \choose i}q^i(1-q)^{n-1-i}$,  where $q=1-(1-p)^s$. Then $f(n)=g(n,1)$. But this is nowhere as simple as the mentioned formula, as it has an additional parameter...  Can someone explain how the formula $f(n)$ is obtained? Thanks!


When I try to update my laptop running Ubuntu 18.04.1 LTS I use the commands sudo apt update and sudo apt-get update and every time I get this message:  E: The repository 'cdrom://Ubuntu 18.04 LTS _Bionic Beaver_ - Release amd64 (20180426) bionic Release' does not have a Release file. N: Updating from such a repository can't be done securely, and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details. W: GPG error: https://dl.bintray.com/resin-io/debian stable Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 379CE192D401AB61 E: The repository 'https://dl.bintray.com/resin-io/debian stable Release' is not signed. N: Updating from such a repository can't be done securely, and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details.   Has the OS updated? What should I do so that it updates?

I added some extra repositories with the Software Sources program. But when I reload the package database, I get an error like the following:     W: GPG error:  trusty InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 8BAF9A6F   I know I can fix it using apt-key in a terminal, according to the official Ubuntu documentation. But I would have liked to do it graphically. Is there a way to do this without using a terminal?


I'm 16 and interested in getting into audio electronics so I can make things like mixers and speakers, etc. I currently only have a rudimentary understanding of electrical circuits which extends only to that contained in the book Make: Electronics.  I'm seeking out advice and recommendations of any books or online courses for either electronics in general or audio electronics specifically.

I need basic electronics books  (diodes,transistors,current.. etc) as I am just starting out with electronics and want to have something to read over the holiday.  Any suggestions of good beginners' books?


For the last month or so, seemingly at random and with no discernible pattern, my menu disappears. However, when I look at the Dashboard, what I find is that all the menu items have been deleted but the menu itself is still there. I can select and add the items back and they reappear. There is nothing in my error logs, and I'd guess it's happening about once/week, though that's just a guess.  I am using a modified default theme, though the theme has not changed for over a year and this problem started recently.   Because I cannot predict when this will happen it's difficult for me to remove all plugins indefinitely while I wait as it will break lots of functionality on my site. However, none of the plugins are directly related to the menu system. And they've all been in place for quite a while.   I've seen some posts that seem related to this problem but they all involve huge menus. My menu only has 4 items! The items all point to Pages. The structure/contents of the menu have not changed for a couple years.  Any ideas? Even ideas on how to troubleshoot this would be appreciated.

Since yesterday the wp_scheduled_auto_draft_delete cron job somehow deletes all page entries from our menus. All entries in the table wp_postmeta with meta_key = '_menu_item_object' and meta_value = 'page' get deleted in the process. By tracing back the DELETE query I found out that the menu entries are deleted by a function called _wp_delete_post_menu_item. I got the following stacktrace for that function:  #0  _wp_delete_post_menu_item(3244) #1  call_user_func_array(_wp_delete_post_menu_item, Array ([0] => 3244)) called at [/srv/www/htdocs/biva/wp-includes/plugin.php:470] #2  do_action(delete_post, 3244) called at [/srv/www/htdocs/biva/wp-includes/post.php:2483] #3  wp_delete_post(3244, 1) called at [/srv/www/htdocs/biva/wp-includes/post.php:5645] #4  wp_delete_auto_drafts() #5  call_user_func_array(wp_delete_auto_drafts, Array ()) called at [/srv/www/htdocs/biva/wp-includes/plugin.php:546] #6  do_action_ref_array(wp_scheduled_auto_draft_delete, Array ()) called at [/srv/www/htdocs/biva/wp-cron.php:100]   But I'm stuck here, I'm not a wordpress developer and I have no clue why deleting old drafts results in deleting attached menu entries although the main pages still exist.  Workaround: As a workaround we added the following to the top of wp-config, wich will disable wp-cron:  /** Disable wp-cron to prevent menu from getting deleted. Detailed Bug description: http://wordpress.stackexchange.com/questions/145953 **/ define('DISABLE_WP_CRON', true);   If you are experiencing similar difficulties you might try locking the rows in the table wp_postmeta with meta_key = '_menu_item_object' and meta_value = 'page' and then tracing back the error message when WP trys to delete these rows, that's how we nailed down our error.  Reproduce the Error: It is definitely the stealth publish plugin that is causing our error, one can easily reproduce it, by doing the following:   Install a fresh Wordpress 3.9.1. Install the stealth publish plugin . Create a few test pages and add them to a new menu. Create a new page, with some dummy content, but do not save it!. Leave the page without saving. Change the system time 8 days into the future. The wp_scheduled_auto_draft_delete cron job will run because it runs daily and it hasn't run for 7 days as soon as you visit your page. It will then find your never saved dummy page delete it as it is older than 7 days and the menu will vanish. You might need to refresh the page a few times till the effect becomes visible.   I've recorded a screencast on how to reproduce the error (but I took not the time to comment it):


I want to design a flex banner of (90 Feet X 4 Feet) @ 72dpi. But i cant open a work book of such size in Illustrator. Can you please guide me on how to design the banner using the idea of a sizing the design in proportionality.  Thank you

I need to create a banner that is 18 feet wide by 2.5 feet high.  What would be the best way to go about planning this as it is going to be made in Illustrator and every element will be a vector.  Would my best bet be to create the document in its native size and then scale it down in Illustrator to keep the ratio but reduce the file size?  I've come across this before working at large sizes but not quite this large.


I'm getting this error and I'm not sure why:       Warning: PDOStatement::execute(): SQLSTATE[HY093]: Invalid parameter   number: number of bound variables does not match number of tokens in   C:\wamp64\www\pdoTest\insert.php on line 32   Basically I'm just trying to get my entries in an HTML form to showup in my MYSQL Database.  // FROM INDEX.PHP  <html>     <form action="insert.php" method="post">     Enter the Title:<input type="text"      name="title">     Enter the Body:<input type="text"name="body">     Enter the Author:<input type="text"name="author">             <input type="submit">             </form> </html>  //FROM insert.php  <?php  session_start(); $host = 'localhost'; $user = 'root'; $password = ''; $dbname = 'pdoposts';  $dsn = 'mysql: host=' . $host . ';dbname=' . $dbname;  $pdo = new PDO($dsn, $user, $password);  if(!$pdo) {     echo "not Connected to table"; } else {     echo "connected to table"; }  $pdo->setAttribute(PDO::ATTR_DEFAULT_FETCH_MODE, PDO::FETCH_OBJ);  $title = $_POST['title']; $body = $_POST['body']; $author = $_POST['author']; // $title = "This is truth"; // $body = "What is truth"; // $author = "Georgina";       echo $title;  $sql = "INSERT INTO posts (title, body, author) VALUES ($title, $body, $author)"; $stmt = $pdo->prepare($sql); $stmt->execute([$title, $body, $author]); echo 'Post Added via Positional Parameters';      echo print_r($stmt);  ?>

If user input is inserted without modification into an SQL query, then the application becomes vulnerable to , like in the following example:  $unsafe_variable = $_POST['user_input'];   mysql_query("INSERT INTO `table` (`column`) VALUES ('$unsafe_variable')");   That's because the user can input something like value'); DROP TABLE table;--, and the query becomes:  INSERT INTO `table` (`column`) VALUES('value'); DROP TABLE table;--')   What can be done to prevent this from happening?


I just want a short clarification on these two lines of code. What's the difference between these two?  SuperClass c = new JustTesting(1, 'b'); JustTesting b = new JustTesting(2, 'c');    By the way, in case you'd want to see the full code, here it is:  import static java.lang.System.out;  public class JustTesting extends SuperClass{  public JustTesting(int firstVar, char secondVar) {     super(firstVar, secondVar); }  public static void main(String[] args) {     SuperClass c = new JustTesting(1, 'b');     JustTesting b = new JustTesting(2, 'c');      out.println(c.firstVar);     out.println(b.firstVar); } }

I have seen this mentioned a few times and I am not clear on what it means. When and why would you do this?   I know what interfaces do, but the fact I am not clear on this makes me think I am missing out on using them correctly.   Is it just so if you were to do:  IInterface classRef = new ObjectWhatever()   You could use any class that implements IInterface? When would you need to do that? The only thing I can think of is if you have a method and you are unsure of what object will be passed except for it implementing IInterface. I cannot think how often you would need to do that.   Also, how could you write a method that takes in an object that implements an interface? Is that possible?


Just want to understand, whether is there any vulnerability in this code, and any possibilities of altering the sql syntax by unsafe POST variable. please can someone advise, also please share an example of secured version of this code if this is has vulnerability and open to sql injections. Thanks.         <?php    $database = '     (DESCRIPTION =     (ADDRESS_LIST =    (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))    )    (CONNECT_DATA =    (SERVICE_NAME = pdsales1)    )    )';      $db = new PDO('oci:dbname='.$database, 'hr', 'hr');      $sth = $db->prepare('SELECT EMPLOYEE_ID,FIRST_NAME FROM EMPLOYEES where department_id=:department_id');     $sth->bindParam(':department_id', $department_id);     //$department_id=[$_POST['department_id'];     $department_id=20;     $sth->execute();     $rows = array();     while($row = $sth->fetch(PDO::FETCH_OBJ)) {       $rows[] = $row;     //echo $row->FIRST_NAME."\n";       }    $json_data=json_encode($rows);     //echo $json_data;    ?>


I want to get windows system type whether it is 32 bit or 64 bit?  is it applicable ??  if yes please tell me how?

In a  2.0 C# application I use the following code to detect the operating system platform:  string os_platform = System.Environment.OSVersion.Platform.ToString();   This returns "Win32NT". The problem is that it returns "Win32NT" even when running on Windows Vista 64-bit.  Is there any other method to know the correct platform (32 or 64 bit)?  Note that it should also detect 64 bit when run as a 32 bit application on Windows 64 bit.


I would like to replace all punctuation from a text, except whitespaces and without splitting the text.  I have tried:  text=re.sub('\W+', '', text)   but it removes whitespace. Any hint?

It seems like there should be a simpler way than:  import string s = "string. With. Punctuation?" # Sample string  out = s.translate(string.maketrans("",""), string.punctuation)   Is there?


I was wondering if definitions in mathematics are "if and only" statements?  I know for sure that theorems are not "iff" statements.  Thank you in advance for your help.

In some books the word "if" is used in definitions and it is not clear if they actually mean "iff" (i.e "if and only if"). I'd like to know if in mathematical literature in general "if" in definitions means "iff".  For example I am reading "Essential topology" and the following definition is written:     In a topological space $T$, a collection $B$ of open subsets of $T$ is said   to form a basis for the topology on $T$ if every open subset of $T$ can be written as a union of sets in $B$.   Should I assume the converse in such a case? Should I assume that given a basis $B$ for a topological space, every open set can be written as a union of sets in $B$?  This is just an example, I am not asking specifically about this sentence.


If schadenfreude is pleasure from another’s misery, what is displeasure caused by another’s success.

If schadenfreude means "pleasure derived by someone from another person's misfortune", is there a word to call someone who can't feel happy when something good/exciting happens to a relative/friend/someone close?


I am in Iraq and I need to purchase the Apple developer program? How do I do this, because I'm not able to purchase online?

How can I enroll in Apple's Developer Program from Kuwait?  I am from Kuwait. I have Apple IDs associated with the USA and associated with my country of origin. When I try to enroll with my Kuwait based account, I keep getting an error saying:     Sorry, you can’t enroll at this time.


I've been meaning to implement Grover's Algorithm for the 3-bit case, wherein I need to implement a CCCNOT gate. How can this be done efficiently (i.e. as few Toffoli and/or CNOT as possible)?

I want to create a Toffoli gate controlled by n qubits, and implement it in QISKit. Can this be done? If so, how?


I am creating paragraph field programmatically dynamically from array.   The logic for creating a paragraph field is different from others entity revisions.  Is there a way we can identify if field of entity type revisions is paragraph and not others?

I'd like to know when a field from a node it's a paragraph, I only get the type, that it's entity_reference_revisions, I use this method to get the information:  \Drupal\field\Entity\FieldStorageConfig::loadByName()   But I'm not able to get this information   [settings:protected] => Array     (         [target_type] => paragraph     )   The only way I get it's to check directly to the database to see it the name of the field it's in the table paragraphs_item_field_data.  Thanks  Oskar


I know a device I am making can run continuously using two AAA non-rechargeable batteries (namely Energizer Alkaline Max, at 5 volts) for X hours, and I'd like to provide advice on what rechargeable batteries the user can also use. (also AAA) How can I calculate which mAh-rated batteries will be needed for X hrs?

I've got 15 devices each with a current of 20mA and I am interested in running them all for 10 seconds. How would I go about working out the amount of mAh a battery would need to provide for this?   I understand that to find the mAh to run something for an hour you take the current and multiply it by 1000 and so my understanding of his problem was that you could get minutes by multiplying by 100 and then seconds by 10. So What I thought I needed to do was something like this:  15 x 20mA = 300mA/0.3A   0.3 x 10 = 3  3 x 10(seconds of runtime) = 30mAh   However I am not sure if this is right, so I would be grateful if someone could look it over and point out my mistakes.


I'm asking what this font is and whether this is a TrueType/OpenType font that works normally with non-latex software (preferrably) or an in-built math font in LaTeX.

Is it possible to identify the font used in a specific document/picture?  Answers to this question should identify:   Possible methods to do this (perhaps one answer per method) and adequately describe how to use it (as opposed to merely stating it); Ways of finding the identified fonts, if possible (free or not); and Any prerequisites associated with the method used, if required (for example, "In order to use method X, your document has to be in format Y").   This question is meant as an FAQ, based on an . Its aim is to facilitate the community with the general procedures involved in font identification. Similar cases are solved on a per-usage basis on 's  tag.


Standard Unix utilities like grep and diff use some heuristic to classify files as "text" or "binary".  (E.g. grep's output may include lines like Binary file frobozz matches.)  Is there a convenient test one can apply in a zsh script to perform a similar "text/binary" classification?  (Other than something like grep '' somefile | grep -q Binary.)  (I realize that any such test would necessarily be heuristic, and therefore imperfect.)

I am writing a menu based bash script, one of the menu options is to send an email with a text file attachment. I am having trouble with checking if my file is a text file. Here is what I have:  fileExists=10 until [ $fileExists -eq 9 ] do   echo "Please enter the name of the file you want to attach: "   read attachment   isFile=$(file $attachment | cut -d\ -f2)   if [[ $isFile = "ASCII" ]]     then       fileExists=0     else       echo "$attachment is not a text file, please use a different file"   fi done   I keep getting the error cut: delimiter must be a single character.


I want to self-study group theory.  Does anyone have good recommendations for me?

Which textbook is good for introductory group theory?


It may seem like a stupid thing, but could we please be able to pay real money to set a bounty.  For example, if I had only 1 rep, I want to be able have a bounty.   Here late the suggested prices in USD. Convert money    $0.49 for each 50 reputation $0.99 for each week $1.99 for a month $9.99 for a year   Every month, the bounty fee would come in. This would mean you would have to enable your account with a bounty fee button on your profile.

I have an idea for dealing with a question you badly want to be answered, which no one will answer, even after you've offered a large bounty: cash.  Users can offer cash, and whoever has the accepted answer can be paid, possibly via PayPal.  Does this sound like a good idea?


it's explained that there is no gravity force, it's all acceleration: Earth moving toward us, but how that's possible without expanding (toward people standing on the opposite sites of the planet) isn't clear (formula's magic doesn't clarify this). Also  and I understand him.

According to General Relativity I am being accelerated upwards by planet earth while writing this question. But a curious person on the the other side of the planet relative to me would have the same experience. That means we are accelerated in opposite directions, although earths diameter do not seem to increase. How can this be?


any hints on how to solve the recurrence relations for the following binomial coefficient   \begin{equation}   {n \choose k}=\begin{cases}     1, & \text{if $k\in\{0,n\}$}.\\     {n-1 \choose k-1}+{n-1 \choose k}, & \text{otherwise}.   \end{cases} \end{equation} for $ 0\ge k \le n $

Proving an Combination formula $\displaystyle \binom{n}{k} = \binom{n-1}{k}+\binom{n-1}{k-1}$  $\bf{My Try}$::$\displaystyle{\binom{n-1}{k}+\binom{n-1}{k-1}=}$  $\displaystyle{\frac{\left(n-1\right)!}{k!\left(n-k-1\right)!}+\frac{\left(n-1\right)!}{\left(k-1\right)!\left(n-k\right)!}=}$  $\displaystyle{\frac{\left(n-1\right)!}{k\,\left(k-1\right)!\left(n-k-1\right)!}+\frac{\left(n-1\right)!}{\left(k-1\right)!\left(n-k-1\right)!\,\left(n-k\right)}}=$  $\displaystyle \frac{(n-1)!}{(k-1)!\cdot (n-k-1)!}\left(\frac{1}{k}+\frac{1}{n-k}\right) = \binom{n}{k}$  My Question is How can i prove using combinational argument  Help Required  Thanks


for example : If you show up for work monday morning then you get the job, the only cases where we know the truth of this statement is if you show up on monday morning,if you don't you can't possibly know if you would have gotten the job. Why in this case do we just assume it to be true? that seems really arbitrary and "unmathsy". Why can't we assume that they are false by default instead? does it being automatically assumed to be true factor in later? I have to apologise since I haven't read that far yet.

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


If I have a polynomial with real cofficients $p_x \in \mathbb{R}[x]$ , is it always possible to pick a constant $c \in \mathbb{R}$ so that $p_x + c$ only has real roots✱? Equivalently, does the following hold?  $$p_x + c \propto \prod_{j=1}^{\deg(p_x)} \left(x-a_j\right) \;\;\;\;\text{where}\;\; a \in \mathbb{R} $$  All constant polynomials are proportional to $1_x$ .  All linear polynomials are proportional to themselves.  A quadratic polynomial $ax^2+bx+c$ has only real roots if and only if $b^2 - 4ac$ is non-negative, which can be ensured by picking $c=0$ .  Geometrically, picking a constant $c$ is like picking where the x-axis is. It's definitely possible to pick a $c$ so that the line $y = c$ intersects the graph of $p_x$, but I don't have a good intuition for what the multiplicity is for the root I've created by choosing to intersect the graph of $p_x$ at some specific point.  For instance, $x^3$ has a triple root, but $x^3-1$ only has a single root. The graph of $x^3$ flattens out near the origin, but I'm not sure how to turn that into an actual argument.  Is it always possible to pick a $c$ so that the resulting polynomial has only real roots?    ✱ I'm thinking of an element of $\mathbb{R}[x]$ as a formal expression with a degree and as function drawn from $\mathbb{C} \to \mathbb{C}$ that's constrained to send reals to reals, so it makes sense to talk about its complex roots. The graph of $p_x$ is just a figure in $\mathbb{R}^2$, as usual.

It seems to be true that every real polynomial $p_n$ of degree $n$ can be factored in the following (not unique) way $$ p_n = \sum_{i=0}^n a_ix^i = s \left\{\prod_{i=1}^n(x-b_i)\right\} +t \tag{$\ast$}$$ with $a_i, s, b_i, t $ all in $\mathbb{R}$.  For example:   $x-1=(x-1)+0$ $x^2-5x+7=(x-2)(x-3)+1=(x-5)(x-0)+7$ $x^2+1 = (x-0) \cdot (x-0) +1$   I am having a hard time coming up with a rigorous proof. I have tried using the fact that every polynomial $p_n$ can be written as $(x-a)g(x)+b$, where $g$ is a polynomial function and $a$ is an arbitrary real number, but with no success. Another way it could be done is by expanding the right-hand side of $(\ast)$ and showing that the linear system of equations with the coefficients of matching powers of $x$ has always a real solution. But I feel there must be a more simple proof out there, e.g. by induction, if possible without the Fundamental Theorem of Algebra. Would be glad if someone could enlighten me!