What is the easiest way to update Opera browser on Ubuntu 18?

How can I update Opera browser on Ubuntu 18? when I do sudo apt-get upgrade opera I face with this:  Reading package lists... Done Building dependency tree        Reading state information... Done Calculating upgrade... Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation:  The following packages have unmet dependencies:  opera : Depends: libgstreamer-plugins-base0.10-0 (>= 0.10.16) but it is not installable          Depends: libgstreamer0.10-0 (>= 0.10.15) but it is not installable          Depends: gstreamer0.10-plugins-good but it is not installable  opera-stable : Conflicts: opera but 12.16.1860 is to be installed E: Broken packages   so how can I update it? I have Opera Version:56.0.3051.104.  Thanks in advance.


2d metaballs with shader to give blobs of water effect?

I want to simulate blobs of water in a 2d game in Unity3d. One possible way of doing it is to use 3d  moving in a 2d plane though this is very processor intensive. Do you think it would be possible to make 2d metaballs, so I end up with a 2d meshes something like in the picture (In this case its 2 metaballs in conjunction) and then apply some kind of shader to make it look like they are bulging out and refracting the texture behind them like drops of water? I ask because I dont have much experience with shaders and am not sure what is possible.


Android apps for "armeabi-v7a" and "x86" architecture: SoC vs. Processor vs. ABI

While downloading Android apps, sometimes I have seen apps for armeabi-v7a and x86 architecture.  I read some references for armeabi-v7a and x86 architecture. However, at the end, I couldn't finalize which mobile processors and architectures belong to armeabi-v7a and which belong to x86.  As per my knowledge, mobile processors commonly used in Android devices are Snapdragon (by Qualcomm), MediaTek, Exynos (by Samsung) and Kirin (by Huawei). Almost all brands explain specifications of a smartphone and almost all specifications say mobile processor is 64-bit or not. Should I conclude that 64-bit of mobile processors (Snapdragon, MediaTek, Exynos or Kirin) belong to ARM architecture?  EDIT: To understand which SoC supports armeabi-v7a Android apk and which SoC supports x86 Android apk, I have gone through the specifications of MediaTek Helio X30 and Snapdragon 855. The specification of Helio X30 says, it supports dual-core ARM Cortex-A73 and quad-core ARM Cortex-A53 but ARM is not mentioned anywhere in the specification of Snapdragon 855. So should I conclude that Helio X30 will support armeabi-v7a Android apps and Snapdragon 855 will not support armeabi-v7a apps?  Please clarify my confusions.


How to show that $\sum_{i=1}^n | \langle f, f_i\rangle |^2 \leq \Vert f \Vert^2$

If the set $\{f_1, ..., f_n\}$ is an orthonormal subset of inner product space $E$ and $f\in E$ then how can I show that:      $$\sum_{i=1}^n | \langle f, f_i\rangle |^2 \leq \Vert f \Vert^2.$$   How can I prove this inequality? What is the key step to notice?


Unable to find medium containing live file system

While installing Ubuntu, I got a message:   (initramfs) Unable to find a medium containing a live file system (initramfs)   I would also like to know what type of HDD is required for installing Ubuntu. Basic or Dynamic..


When to Log/Exp your Variables when using Random Forest Models?

I'm doing regression using Random Forests for predicting prices based on several attributes. Code is written in Python using Scikit-learn.  How do you decide whether you should transform your variables using exp/log before using it to fit the regression model? Is it necessary when using an Ensemble approach such as Random Forest?


Do questioners see deleted comments in their inbox?

Say Foo asks a question, then I comment "Yeah, right? Totally true, Foo." Then I delete it. Can Foo still read the comment in their inbox notification drop down?


continuous sequence of frames with multiple cameras with each camera starting at start of animation?

I have baked a fluid simulation that runs for 300 frames.  I have 3 cameras, one from the left side, one from the right side, and one from the top.  Can I render a sequence of 900 frames where the first 300 are rendered from the simulation from the left camera, then it uses the same simulation and does the next 300 frames from the right camera, then uses the same simulation for the final 300 frames from the top camera?


java.lang.NullPointerException: null - when calling a getAttributes().contains(key)

I got NPE when trying to call getter. It is a @OneToMany mapped property. It works when I call via other than the current object.   It is not working for the below code.   @PostMapping("/updateservice")     public void updateService(@ModelAttribute ServiceTyping serviceTyping, BindingResult bindingResult, HttpServletRequest req, HttpServletResponse res) throws IOException {  if(serviceTyping.getServiceEntryAttributes().containsKey(ServiceConstants.outsourcer)) {             LOG.info("**INFO OUTSOURCER FOUND*******");         } }   But working when I accessed from other object  @PostMapping("/updateservice")     public void updateService(@ModelAttribute ServiceTyping serviceTyping, BindingResult bindingResult, HttpServletRequest req, HttpServletResponse res) throws IOException {  ServiceTyping st = entryService.findTypingEntryById((long) 194);   if(st.getServiceEntryAttributes().containsKey(ServiceConstants.outsourcer)) {             LOG.info("**INFO OUTSOURCER FOUND*******");         } }   I tried with hot-coding below code, I mean directly pass the current object's id. It also doesn't work.  @PostMapping("/updateservice")     public void updateService(@ModelAttribute ServiceTyping serviceTyping, BindingResult bindingResult, HttpServletRequest req, HttpServletResponse res) throws IOException {  //here 176 is the id of the entity ServiceTyping st = entryService.findTypingEntryById((long) 176);      //checking the object which has the 176 is found are not     if(entryService.findEntryById((long) 176)!=null) {             LOG.info("**INFO OBJECT FOUND*******");            if(entryService.findEntryById((long) 176).getServiceEntryAttributes().containsKey(ServiceConstants.outsourcer)) {          LOG.info("**INFO OUTSOURCER FOUND*******"); }      }   }    I'm not saying it is not working for the particular id 176. It doesn't working for any other objects. but it works in the case when I access through the object other than the same object found in public void updateService(@ModelAttribute ServiceTyping serviceTyping)  From the code and attached table, I have proven two things. 1) the object through which I try to access is not null; 2) the value which I trying to get is found and it is also not null.   Let me know if I'm confusing


How to use a file in a jar as javax.net.ssl.keystore?

I'm trying to do something like   URL clientks = com.messaging.SubscriptionManager.class.getResource( "client.ks" ); String path = clientks.toURI().getPath(); System.setProperty( "javax.net.ssl.keyStore", path);   Where client.ks is a file stored in com/messaging in the jar file that I'm running.  The thing that reads the javax.net.ssl.keyStore is expecting a path to the client.ks file which is in the jar. I'd rather not extract the file and put in on the client's machine if possible. So is it possible to reference a file in a jar?  This doesn't work as getPath() returns null. Is there another way to do this?


Salesforce apex:commandLink image not downloading

I want image to get download or disply after clicking on link.  Visualforce page :-      <apex:pageBlockTable value="{!DORESAttachmentsWrapperList}" var="AttachVar" border="3px" width="98.5%">     <apex:column >     <apex:facet name="header">File</apex:facet>     <apex:commandLink action="{!DORESupdateHistory1}" styleClass="{!IF(AttachVar.DoresViewingStatus == 'Not Viewed' && (runningUser.Profile.Name == 'Profile1' || runningUser.Profile.Name =='Profile2'),'actionLink disableLink','actionLink')}"     value="{!AttachVar.attachmentName}" >   <apex:param value="{!AttachVar.attachmentID}" name="DORESupdateHistory1" assignTo="{!DORESSelectedId1}"/>   </apex:commandLink >   </apex:column>     Controller - DORESupdateHistory1 will update the timing and name of the person in a table who clicks on the new attached image.     public String DORESSelectedId1{get;set;}         public PageReference DORESupdateHistory1(){            system.debug('--DORESSelectedId1---' + DORESSelectedId1);            List<Profile> Profile= [Select Name from Profile where Id =:UserInfo.getProfileId() LIMIT 1];              list<attachment> relatedPaadAttachment = [select ID,parentID,name from attachment where ID=:DORESSelectedId1 limit 1];            system.debug('--DORESSelectedId1---' + DORESSelectedId1);              List<PAAD_Application_Attachment__c> ClickedAttachList1 = [Select id,Name,Type__c,CreatedDate,Dores_Viewer_Name__c,Dores_Viewed_Time__c,Dores_Viewing_Status__c from PAAD_Application_Attachment__c where id = :relatedPaadAttachment[0].parentID]; //To get the clicked attachment Id    if(ClickedAttachList1[0].Dores_Viewing_Status__c == 'Not Viewed' && Profile[0].Name == 'Profile1' || Profile[0].Name == 'Profile2'){    ClickedAttachList1[0].Dores_Viewing_Status__c = 'Viewed';    ClickedAttachList1[0].Dores_Viewed_Time__c = system.now();    ClickedAttachList1[0].Dores_Viewer_Name__c = UserInfo.getName();    update ClickedAttachList1;    List<PAAD_Application_Attachment__c> viewedattach1= [SELECT Id,Dores_Viewing_Status__c FROM PAAD_Application_Attachment__c where Dores_Viewing_Status__c != 'Viewed' and PAAD_Applicant__c=:app.ID];   List<PAAD_Application_Attachment__c> attach1 = [SELECT Id FROM PAAD_Application_Attachment__c where PAAD_Applicant__c=:app.ID];     if(viewedattach1.size() == attach1.size()){    List<PAAD_Applicant__c> attachcheck1= [SELECT Id,New_Dores_Attachment_Checker__c FROM PAAD_Applicant__c where ID=:app.ID];                   if(attachcheck1[0].New_Dores_Attachment_Checker__c == 'Y') {                       attachcheck1[0].New_Dores_Attachment_Checker__c = '';                       update attachcheck1;                   }                  }       List<AttachmentWrapper>  dummyWrapperList = new List<AttachmentWrapper>();                for(AttachmentWrapper wrap : DORESAttachmentsWrapperList){                   if(DORESSelectedId1 !=  wrap.attachmentID){                       dummyWrapperList.add(wrap);                   }else{                       dummyWrapperList.add(new AttachmentWrapper(ClickedAttachList1[0].Type__c,ClickedAttachList1[0].Member__c, ClickedAttachList1[0].Description_Final__c, relatedPaadAttachment[0].ID,relatedPaadAttachment[0].name, ClickedAttachList1[0].CreatedDate,'Attached', ClickedAttachList1[0].Dores_Viewed_Time__c, ClickedAttachList1[0].Dores_Viewer_Name__c, ClickedAttachList1[0].Dores_Viewing_Status__c));                     }               }               DORESAttachmentsWrapperList.clear();               DORESAttachmentsWrapperList.addAll(dummyWrapperList);            }              return null;        }


Count number of occurrences of token in a file

I have a server access log, with timestamps of each http request, I'd like to obtain a count of the number of requests at each second. Using sed, and cut -c, so far I've managed to cut the file down to just the timestamps, such as:     22-Sep-2008 20:00:21 +0000   22-Sep-2008 20:00:22 +0000   22-Sep-2008 20:00:22 +0000   22-Sep-2008 20:00:22 +0000   22-Sep-2008 20:00:24 +0000   22-Sep-2008 20:00:24 +0000   What I'd love to get is the number of times each unique timestamp appears in the file. For example, with the above example, I'd like to get output that looks like:     22-Sep-2008 20:00:21 +0000: 1   22-Sep-2008 20:00:22 +0000: 3   22-Sep-2008 20:00:24 +0000: 2   I've used sort -u to filter the list of timestamps down to a list of unique tokens, hoping that I could use grep like  grep -c -f <file containing patterns> <file>   but this just produces a single line of a grand total of matching lines.  I know this can be done in a single line, stringing a few utilities together ... but I can't think of which. Anyone know?


Below is my code but it gives me null point error. some please help me out to find out what is the error  package path1;  import org.openqa.selenium.WebDriver; import org.openqa.selenium.firefox.FirefoxDriver; import org.openqa.selenium.firefox.FirefoxProfile; import org.openqa.selenium.firefox.internal.ProfilesIni;  public class New1 {   public static void main(String[] args) {               System.setProperty("webdriv`enter code here`er.gecko.driver", "C://Users/Ramesh/Desktop/Udemy/Selenium/geckodriver.exe");           ProfilesIni profile = new ProfilesIni();      FirefoxProfile testprofile = profile.getProfile("default");     testprofile.setAcceptUntrustedCertificates(true);     testprofile.setAssumeUntrustedCertificateIssuer(true);      WebDriver driver = new FirefoxDriver(testprofile);     driver.get("https://www.w3schools.com/");   }     }


Javascript How can i ensure that the local scope of a function in a for each doesn't change the value of a higher scoped object

I am having some trouble with scoping for a project I was working and was able to generalize the problem as follows.   I have a list of objects that I want to iterate through using a foreach loop and pass into a helper function. In the helper function I want to have a locally scoped version of the object to operate on with out modifying the original object.  I understand that functions in javascript pass objects by reference but it should possible to locally scope the reference.   Does anyone have any as to what I am doing wrong? Is there a way to do this without cloning the object. I'd prefer not to have to rebuild each object since the objects are quite big and performance is important.  var gloabalList = [{n:0},{n:0},{n:0}]; var output = []; gloabalList.forEach((item,index)=>{     gloabalList[index].n = index;     //at this point the value n is the index     messUpItem(item);         //at this point n is 2 we want it to be the index     output.push(item.n); });  //we want this to be (1,2,3) but it is returning (2,2,2) alert(output);  function messUpItem(item){     var x = item;// this should copy object val but its grabbing a reference     x.n = 2;     return item; }


Table2 has a column with values containing column names in table1. I want to remove any entries in table2 where the actual column name in table1 does not exist. This is the general idea but apparently isn't the proper approach so how can it be done?  DELETE FROM table2  WHERE ID IN (SELECT  ID  FROM table2  WHERE FormID = 2  AND FieldName NOT IN (SELECT COLUMN_NAME  FROM INFORMATION_SCHEMA.COLUMNS  WHERE TABLE_SCHEMA = 'db_name'  AND TABLE_NAME =  'table1'))


Need help understanding pointers in some sample code

So I was given this sample code as an exercise and am having trouble understanding how exactly it works. I ran it and using some print statements I know it takes a string from the standard input and makes smaller versions of the string so hello becomes ello, then llo, then lo, then o. What I'm confused about is how source and target can have 1 added to them since their data type is a character pointer. How exactly does this code work?  #include <stdio.h> #include <stdlib.h>  int main(int argc, char** argv) {      char* target = malloc(100*sizeof(char));     char* source = argv[1];     char tmp;     while ((*source) != 0) {         tmp = *source;         *target = tmp;         target = target + 1;         source = source + 1;     }      return 0; }


How to make a system of equations with a number after every line and a tall curly brace on the left

So, i have this code:  \begin{align} S(t+\Delta) &= S(t)-\beta S(t)I(t)\Delta + \phi R(t) \Delta \label{S}\\ I(t+\Delta) &= I(t) + \beta S(t)I(t) \Delta - \gamma I(t) \Delta \label{I}\\ R(t+\Delta) &= R(t) + \gamma I(t)\Delta - \phi R(t)\Delta \label{R} \end{align}   I want this with the numbering after every line (i already have that); but i want an '{' in front of the three lines. Is that possible?


So here is the question, If I jump and hover over the ground for sometime why don't we move away from the point I jumped from? Because earth is rotating so if I hover long enough we should move from the point I jumped from.


Detecting the dimension where a player is

I want to check a player's current dimension using a scoreboard. For example, if a player is in the overworld, scoreboard would be set to 1. Nether would be 2. And the End would be 3.  I have tried execute if entity @a in minecraft:the_nether but that actually changes the coordinate's dimension.  Do you know any way to detect a player's current dimension?


How to install TortoiseHG with integration to Caja on Ubuntu MATE 20.04 LTS?

On previous systems like Ubuntu 16.04 LTS and 18.04 LTS it was possible.  But 20.04 LTS do not have tortoisehg and tortoisehg-caja in .  What to do?


Why does Management Studio add the second alter table "CHECK CONSTRAINT" for a foreign key constraint

ALTER TABLE [dbo].[REMINDER_EMAIL]  WITH CHECK ADD  CONSTRAINT    [FK__REMINDER_EMAIL__FACILITY_ID] FOREIGN KEY ( [FACILITY_ID] )   REFERENCES [dbo].[FACILITY] ( [FACILITY_ID] )  ALTER TABLE [dbo].[REMINDER_EMAIL] CHECK CONSTRAINT [FK__REMINDER_EMAIL__FACILITY_ID]


How can I lower the TouchBar brightness level?

On the 2016 MacBook Pro, the touchbar has very high luminosity. At day it is very nice, but at night it blinds me.  It's especially vexing because I run f.lux's Darkroom mode to reduce the glare that might wake my wife up, and the main source of light is the Touchbar!  Is there any way to reduce the brightness, if not via a menu, maybe through a Plist somewhere or using the CLI?


I have a package (fcl) in my PPA  in my launchpad PPA and it depends on another package (libccd) which is in another PPA ppa:imnmfotmal/libccd. fcl has both build and run dependency in libccd. So i added libccd as a PPA dependency in launchpad and both are successfully build. but when i am trying to install fcl package after adding the fcl PPA, its throwing an error Reading package lists... Done Building dependency tree        Reading state information... Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation:  The following packages have unmet dependencies:  fcl : Depends: libccd but it is not installable E: Unable to correct problems, you have held broken packages.  but its successfully getting installed after adding the libccd PPA also. I want fcl to install libccd automatically without adding its PPA. how can i achieve it ?? Output of apt-cache policy fcl fcl:   Installed: (none)   Candidate: 1.0-0ppa5   Version table:      1.0-0ppa5 0         500 http://ppa.launchpad.net/imnmfotmal/fcl/ubuntu/ trusty/main amd64 Packages


I have Chromium and I have installed the flash player for it. The flash videos are fine, on youtube, facebook, but the miniclip game does not load. What do I have to do?


What is an alternating series which converges but the Alternating Series Test does not apply?

If there is one how would you go about finding it ?


Prove that $\langle a^n \rangle \bigcap \langle a^k \rangle = \langle a^{lcm (n,k)} \rangle$

Let $G$ be a group. Let $a$ be an element. Let $n,k$ be pozitive integers. Let $m$ be least common multiple of $n$ and $k$. Prove $\langle a^n \rangle \bigcap \langle a^k \rangle = \langle a^{m} \rangle$. Trying to show both are subsets of each other. One side is trivial. But I can not show that $\langle a^n \rangle$ intersection $\langle a^k \rangle$ is a subset of $\langle a^m \rangle$


Show that if G is bipartite with bipartition (x,y) where |x| is not equal to |y|, then G is non-hamiltonian.  Case 1. G is not connected (trivial) Case 2. G is connected   Is it ok to start Letting C be a Hamiltonian cycle of G?


I have the following table representing my acronyms. Due to the length of the table, the table does not break at the end of the page.   \documentclass[12pt,a4paper, draft, oneside]{book}  \begin{document} \section*{Acronyms} \begin{table}[H] \begin{tabular}{ll} 2D            & 2-Dimentional \\[2ex] 3D            & 3-Dimentional \\[2ex] BA            & Bundle Adjustment \\[2ex] CRF           & Conditional Random Field \\[2ex] DLT           & Direct Linear Transformation \\[2ex] DOF           & Degrees of Freedom \\[2ex] DPM           & Deformable Part Model \\[2ex] EO            & Exterior Orientation \\[2ex] EP\textit{n}P & Efficient Perspective-$n$-Point Algorithm \\[2ex] FOV           & Field of View \\[2ex] FPS           & Frames per Second \\[2ex] GCP           & Ground Control Point \\[2ex] HOG           & Histogram of Orientated Gradients \\[2ex] ICP           & Iterative Closest Point \\[2ex] IO            & Interior Orientation \\[2ex] IP            & Infrared \\[2ex] iif           & if and only if \\[2ex] i.i.d         & independent and identically distributed \\[2ex] LM            & Levenberg-Marquardt \\[2ex] LS            & Least-Squares \\[2ex] MRF           & Markov Random Field \\[2ex] MVEE          & Minimum Volume Enclosing Ellipsoid \\[2ex] P\textit{n}P  & Perspective-$n$-Point Algorithm \\[2ex] PCA           & Principal Component Analysis \\[2ex] RMS           & Residual Mean Square Error \\[2ex] SSVM          & Structured Support Vector Machine \\[2ex] SVM           & Support Vector Machine \end{tabular} \end{table} \end{document}


Prove rigorously: $x^2=2^x$ has exactly $3$ real solutions

I am not sure how to prove rigorously (using calculus) that $x^2=2^x$ has exactly $3$ real solutions.


How is the field of view clipped in SLR Cameras

From what I know, if you have a 50mm lens that projects a circle of light onto a rectangular 35mm film/sensor, the film/sensor would clip the the 50mm, but instead you multiple it by some multiplier. (eg. 25mm x 1.6 = 40mm)  Could someone certify the operation of the SLR Camera?


Dual Citizenship - What Passport Do I Show Entering and Exiting Switzerland?

I'm leaving the U.S. for a two-months stay in Switzerland this summer.  I have dual citizenship, U.S. and German; I'm departing the U.S for Switzerland with German passport and returning from Switzerland to the U.S. with U.S. passport.  Is this correct?


So I was trying to compare the string in PackageInfo and ApplicationInfo and retrieve their package name in Android Studio.      List<ApplicationInfo> packages = pm.getInstalledApplications(PackageManager.GET_META_DATA);     List<PackageInfo> apps = pm.getInstalledPackages(PackageManager.GET_PERMISSIONS);              for (PackageInfo app : apps)                 for(ApplicationInfo packageInfo:packages)                         String packageName = packageInfo.packageName;                         String sysName = app.packageName;                          if (packageName != sysName)                         {                             Log.d("", "NOPE DOESNT MATCH");                             break;                         }                         if (packageName.equals(sysName.toString())) ;                         {                             Log.d("", "IT MATCHES");                         //do something after that   So the problem came by when I saw inside the debug mode, they actually HAD the same string   Example in debug mode :   com.android.quicksearchbox  com.android.quicksearchbox   It returns as "NOPE DOESNT MATCH"  I'm really curious why this will happen and I have tried other form like trim to take off away white spaces between and no, it still does not return me "IT MATCHES", can anyone help please?  Thanks.


Problem with biblatex apa style and uppercase umlauts

When using the apa style together with biblatex uppercase umlauts (like Ö) are always printed lowercase except at the beginning. With the default biblatex style it works fine. How can I fix this?  Example  \documentclass{scrbook}  \usepackage[utf8]{inputenc}  \usepackage{filecontents}  \begin{filecontents}{test.bib} @incollection{Brosse.1995,  author = {Br{\"o}sse, Ulrich},  title = {{\"{O}}konomisches {V}erhalten als bester {W}eg zu einer nachhaltigen {U}mweltverbesserung},  booktitle = {{\"{O}}konomie contra {\"{O}}kologie?},  year = {1995} } \end{filecontents}  \usepackage[ngerman]{babel}  \usepackage[backend=biber,sorting=nyt,style=apa]{biblatex} % this does not work \DeclareLanguageMapping{ngerman}{ngerman-apa}  %\usepackage[backend=biber,sorting=nyt]{biblatex} % this works  \bibliography{test}  \begin{document} \cite{Brosse.1995} \printbibliography \end{document}


How to delete duplicate features from shapefile/OSM XML using code/command line tools only? (NOT QGIS/ArcGis)

I have shapefile with lines, some of them are perfectly overlaps - duplicate, although each one have unique id etc.   When I view the file in QGIS I see they overlap. When I convert the file with ogr2osm to osm XML & import to JOSM, and running validation I also get warning of duplicate ways (the lines converted to ways...).   How can I "programmatically" detect and remove such situations? I don't mind doing it in the shapefile or later in the OSM XML.  Note 1 - The attributes (tags) are unique - the actual spatial geometry is duplicate.  Note 2 - I want to use something like ogrinfo, ogr2ogr etc GDAL libraries either as commandline tools or as import library for python/java code. If other code tools exits it's perfect also.


I have a Reynolds AR62 wheel on my road bike. When I took off the Shimano CS-R7000 11-28 cassette, I noticed some indents on the freehub body (see image below). The indents are only present at the positions of the single cogs (21, 19, 17, 15, 14, 13, 12, 11), not at the position of the pair of three cogs (28-25-23; at the most inner side of the wheel). Are these indents normal?


While inserting List to Realm  NullPointerException thrown.  Please help me anyone.   Can you suggest me for best practice in Realm DB Management in Android   My Code:  public class DrinksFragment         extends Fragment {      private Realm realm;      @Override     public View onCreateView(             LayoutInflater inflater, ViewGroup container,             Bundle savedInstanceState) {         View view = inflater.inflate(R.layout.fragment_drinks, container, false);         Realm.init(getActivity());         realm = Realm.getDefaultInstance();         return view;     }      public boolean drinksToDB(final List<ProductModel> productModel) {         realm.executeTransactionAsync(new Realm.Transaction() {             @Override             public void execute(Realm bgrealm) {                 RealmList<ProductModel> realproductList = new RealmList<>();                 realproductList.addAll(productModel);             }         }, new Realm.Transaction.OnSuccess() {             @Override             public void onSuccess() {                 Log.d("REALM_DB_INSERT", "Data Inserted");             }         }, new Realm.Transaction.OnError() {             @Override             public void onError(Throwable error) {                 Log.d("REALM_DB_INSERT", error.getMessage());             }         });          return true;     } }


This is more of a general "mathematical english/punctuation" question, but I figure TeX users will know the answer.  The following sentence seems natural:   We define the $xyz$ constant via $xyz=\int_0^\infty f(y)dy$.   Note the period at the end, which is of course correct.  What if I decide to align the equation for $xyz$?   We define the $xyz$ constant via   \begin{align}     xyz=\int_0^\infty f(y)dy  \end{align}     Should I still place a period at the end of this sentence (in the aligned equation)?  Is it considered bad form to end sentences in the middle of aligned equations like this?  Thanks!


If a load is placed onto a DC motor, will the current increase?

When a load, such as a weight on string, is placed into a motors axle, will this cause the current to increase?


Is the density of the unnormalised posterior distribution the same as the density for normalised posterior?

The posterior distribution is proportional to the likelihood times the prior distribution $p(\theta|D) \propto p(D|\theta)p(\theta)$. Computing $p(D|\theta)p(\theta)$ would give the un-normalised posterior distribution and the normalising constant gives rise to a valid probability distribution of 1. However, the normalising constant is just a scaling factor for the height of the distribution and it does not in any way affect the density of the distribution because the height of the posterior are all scaled proportionately. What is the purpose of techniques like MCMC sampling to estimate the posterior distribution ?


I have 4 authors for one article but I get one name and initals for all the others:  @Article{everythingIPA,   author       = {Federico Berruti \& Graeme Nixon\& Giambattista Taglioni\& Rob Whiteman},   journal      = {McKinsey Digital},   title        = {Intelligent process automation: The engine at the core of the next-generation operating model},   year         = {2017},   date         = {2017-03},   journaltitle = {McKinsey Digital}, }   I've tried using , or ; as separators and that way, I can get 2 names correct but not all 4.


Pluralisation of sports teams in British and American English

Why do British and American English differ in this respect:  British     Southampton are eyeing up a ready-made replacement for Luke Shaw   American     Southampton is eyeing up a ready-made replacement for Luke Shaw   American sports journalism differs in their reference to teams. The American style is to treat the team as singular, whereas the British use plurals.  What are the rules in other variants of English (Aus, NZ etc.)?


Put correct answer in the question or edit the accepted answer?

Let's say I have a problem (this is quite common) and ask on one of the Stack sites. There are a few answers, but none of them are really great. Eventually, after some back and forth in the comment section of one of the answers the question gets answered (Let's say a linked blog post did the trick).  I accept the answer since it clearly is the best one and even if it didn't resolve my issue directly, it clearly helped me to do so. But now I know how this is done right (putting all this information together) and I'd like to share this knowledge. What should I do? Here are the options that come to my mind:   Edit the accepted answer. But the difference might be that big that it would be more a rewrite than an improvement of the answer. I don't like editing other people's stuff in such an invasive way. If the original answer is close enough, I usually do this though. Put the thing that worked for into the question. I've seen this now and then and even if it's not great, I could live with it. Add an own answer with my solution. The problem here is that it might get lost and not get the attention it deserves. I could link it from the question or the comments though. Add my own answer and accept it. This resolves the visibility issue, but it kind of feels like stealing reputation from the person that did the original answering work.


NullPointerException while cloning a graph using DFS iteratively

I am trying to clone a graph using DFS in Java iteratively, but on compiling it keeps on showing NullPointerException. I know the code using recursion is uch simpler, but wanted to try out in iterative way. The code is shown below:   /**  * Definition for undirected graph.  * class UndirectedGraphNode {  *     int label;  *     List<UndirectedGraphNode> neighbors;  *     UndirectedGraphNode(int x) { label = x; neighbors = new ArrayList<UndirectedGraphNode>(); }  * };  */  public UndirectedGraphNode cloneGraph(UndirectedGraphNode node) {     if(node==null) return null;     Map<UndirectedGraphNode, UndirectedGraphNode> hm = new HashMap<>();     Stack<UndirectedGraphNode> st = new Stack<>();     st.push(node);      while(!st.isEmpty())     {         UndirectedGraphNode n = st.pop();          UndirectedGraphNode copy = null;         if(!hm.containsKey(n)) //if n is cloned before, no need to clone it again         {             copy = new UndirectedGraphNode(n.label); //clone parent             hm.put(n, copy);         }         else             copy = hm.get(n);           for(UndirectedGraphNode neighbor: n.neighbors)         {             if(!hm.containsKey(neighbor))             {                 UndirectedGraphNode copy_neighbor = new UndirectedGraphNode(neighbor.label);                 copy.neighbors.add(copy_neighbor); //clone child.                 hm.put(neighbor, copy_neighbor);                 st.push(neighbor);             }else                 copy.neighbors.add(hm.get(neighbor));//this handles parent node as well.         }      }     return hm.get(node);    }   Here, what I am tryig to do is get a node from the graph and traverse to it's next connected node or as in this case neighbor.  The NullPointerException is being shown in this line :  copy.neighbors.add(copy_neighbor);   StackTrace  java.lang.NullPointerException at line 55, Solution.cloneGraph at line 102, __Driver__.main


What is a good book to learn AP Physics C?

I am looking to learn AP Physics C (if you are not acquainted with the curriculum see ), both the mechanics part and the electricity/magnetism part. I have not had much exposure to an AP-style physics curriculum for AP Physics 1 or 2 (before C). Ideally this book would be some sort of AP-preparation book, but I am not taking a course and most of the books I have seen which are designed as "AP-prep" are meant to be supplements to an actual course. Ideally this book would also be comprehensive, easy to follow, and it would explain the intuition (if there is any) behind concepts. A book which I found to be the perfect example of this (at least for me) was Morris Tenenbaum's and Henry Pollard's book, Ordinary Differential Equations (maybe you have read it).


What is the hausdorff dimension of the set of all transcendental numbers?

There is already a question about the: And there is also a question about: I really have nothing to give details on. I just curiously thought about this question and found that there are already questions like these. So,What is the hausdroff dimension of the set of all transcendental numbers?


How to understand ssh-keygen and ssh-copy-id?

As far as my understanding, machine(A) ssh-keygen generates a key, and ssh-copy-id gives this key to another machine (B), is it?   But when this is done, to test whether this is done or not is using the ssh like: root@A: ssh root@B  if login on B without password, then this works.   I am confused about this. A gives a key to B, why can A login on B without password? It should go like this, login on B, B ssh A without password.  Is my understanding wrong?


Why doesn't WhatsApp encryption multiply file size

WhatsApp uses and end-to-end encryption, on both personal and group chats. According to my understanding, that means every message I send to a group  is encrypted on my Device for every group member separately and is sent separately to everyone  If I understood properly, this is why WhatsApp group chats are limited to 256 members.  And here comes my question:  Why doesn't sending large files on WhatsApp groups require much data and takes much time?  If a group contains hundreds of people, sending a small movie has to cost hundreds of megabytes, but actually it doesn't!


What if we jump into center of the Earth?

What if we dug a tunnel through the center of the earth connecting the two ends (like two poles). Suppose we have these condition in our tunnel.  1:There is no heat at all.  2:The tunnel be vacuumed (there is no air resistance in it).  Questions 1:What if we jump through this tunnel what would happen then?  2:Can we reach the other end of the earth?  3:If yes, How long it would take to reach the other end point?  4:Can we survive through the journey (if the above conditions are applied)?  5:If there is air at the center what would be the pressure at center?


What to use instead of `buffer` for 1GB buffer?

seems to be old-ish and have hard-coded values preventing it to cache large amount of data.  $ buffer -m 1G max_shmem 1 too low    // it doesn't even understand gigabytes $ buffer -m 1000M Cannot handle that many blocks, aborting! $ buffer -m 1000M -s 1m blocksize 1048576 out of range   What do use instead?


Ubuntu 16.04 and Eclipse Mars menu problem

My OS is Ubuntu 16.04. I downloaded Eclipse Version: Mars.2 Release (4.5.2) and I had a problem with the main menu not showing. I solved it by running Eclipse with UBUNTU_MENUPROXY=0 and the menu is visible but now I have another problem. Some of the options in the menu don't work. For example the Window->Preferences only shows the General page and I can't select any other option.     Is there a solution for this problem?


I have a module file which fetch data from a link. I have to run this module as a cron everyday. How can I do it?


Is there a way to rotate mouse movement with 45 degrees to the right?

Recently I got an ergonomic mouse (Delux M618 ). Trouble is due to the shape, the way my hand feels most comfortable holding it makes the mouse cursor go diagonally when I move the mouse up-down.  I've found a mouse direction altering solution however they strictly invert the axis; ex:  - this also doesn't work with multiple monitors which is a critical issue  Does anyone know a way to adjust mouse movement by angle?  Running on Windows 8.1.


iOS 8 Custom Keyboard: Decimal Pad with Done Button

I am developing iOS application on Swift and I want to add a done button to the Decimal Pad Keyboard Type. Do I need to create an Application Extension for Custom Keyboard  to recreate Decimal Pad with a done button or is there another way. I only need this keyboard to be accessible within my app. Thanks.


Windows folder is 40Gb. Is it a normal size? Can I reduce it?

I recently installed Win 7 Ultimate SP1 and then installed all available important updates. My Windows folder is very big now.     I made sure I have this update , runned Disk Cleanup and checked all that was possible to delete. I also cleaned System Restore with Disk Cleanup tool. Tried to run vsp1cln.exe and compcln.exe, but they were not found on my computer. Then tried DISM /online /Cleanup-Image /SpSuperseded command.   After all my Windows folder is 41,261,065,219 bytes. Winsxs is 13,338,604,038 bytes.    Is this a normal size for Windows folder? Is there any way to make it smaller?


Notifications by email with incorrect dates of last inbox check

I got a notification email that stated:  The following items were added to your inbox since you last checked it on 2015-04-19:   I know that is not true given that I have been checking it all throughout the year.   Here is the screenshot of  before clicking on the red "2" here:    So I am considering this as a bug, as the expected behavior is that notifications are sent, but not with the incorrect dates as to when I have checked the inbox.  Here are some of the email headers from the message. See the Date field for when this was received:  From: Stack Exchange <do-not-reply@stackexchange.com> To: do-not-reply@stackexchange.com Reply-To: do-not-reply@stackexchange.com Subject: 2 new items in your Stack Exchange inbox Date: Sun, 04 Dec 2016 03:12:49 +0000 Message-ID: <2.615c3af0158722959802@NY-WEB05>   Here is a screenshot of the gmail interface view of the message:


Continuous weighted random distribution, biased toward one end

I am currently contributing to a particle system for our game and developing some emitter shapes.  My uniform random distribution along a line or along a rectangular area works fine - no problem.  But now I would like to have something like a 1 dimensional gradient in this distribution. This would mean for example lower values are more common than higher values.  I don't know what would be appropriate mathematical terms for this problem, so my search skills are rather useless with this one. I need something that is computationally simple, as the particle system needs to be efficient.


A picture from windows 10 lock screen. I would like to know where it is!

I have been scouring the internet to find where this place is! I havent had much luck.


Connect two computers with SSH in a home LAN

I have two ubuntu computer shared the same wifi and desire to reach another from one's terminal.  First create an user on the second computer named "Second" and hostname "Algorithms"    Then tried to reach it from the other with SSH,  but get error report as   $ ssh second@Algorithms   ssh: Could not resolve hostname algorithms: nodename nor servname provided, or not known   The solution I tried is based on   What's the problem with my experiment?


How can i check if user is logged in for the first time on site?  If it is, i want to show him a message...  Can someone help me?  Thank you!


How to prove that $\lim\limits_{h \to 0} \frac{a^h - 1}{h} = \ln a$

In order to find the derivative of a exponential function, on its general form $a^x$ by the definition, I used limits.  $\begin{align*} \frac{d}{dx} a^x & = \lim_{h \to 0} \left [ \frac{a^{x+h}-a^x}{h} \right ]\\  \\ & =\lim_{h \to 0} \left [ \frac{a^x \cdot a^h-a^x}{h} \right ] \\  \\  &=\lim_{h \to 0} \left [ \frac{a^x \cdot (a^h-1)}{h} \right ] \\  \\ &=a^x \cdot \lim_{h \to 0} \left [\frac {a^h-1}{h} \right ] \end{align*}$  I know that this last limit is equal to $\ln(a)$ but how can I prove it by using basic Algebra and Exponential and Logarithms properties? Thanks


deductive system where the axioms are all the propositions that are not tautology

let D be a deductive system. The system's axiom set, A, includes all propositions that are not tautology, and the only rule of inference is $\frac{\alpha \vee \beta}{\alpha \wedge \beta}$. I need to answer:  Show with induction on the proof that $ \vdash \alpha \Longrightarrow \nvDash \alpha $, i.e if $ \alpha $ can be proven from the empty set, then exists a model $ M $ such that for every $ \varphi \in A $, $ M(\varphi)=T $ and $ M(\alpha)=F$. Is the system strongly sound? Is $X\nvDash \alpha \Longrightarrow X\vdash \alpha$? Prove that the empty set isn't consistent in D    I've already asked about this part of the question here but I still have a problem with it, because every axiom, $a\in A$,  $\vdash a$ and $A \models a$, in contradiction to what I'm supposed to prove here. Moreover because the axiom set includes all what isn't tautology it also includes all that is contradiction, which means that there is no model $ M $ such that for every $ \varphi \in A $, $ M(\varphi)=T $ which means for every proposition $\psi$, $A\Longrightarrow \psi$. This one was fairly easy base on (1) the system isn't sound so it can't be strongly sound. I'm not even sure how to approach this, I don't even have an intuition whether this is correct or not. Assuming this is wrong, I need to find a set $X$ and proposition $\alpha$ such that $X\nvDash \alpha$ but $\alpha$ cannot be proven from $X$, and if it's correct I need to show that for every set, $X$, and every proposition $\alpha$ such that $X\nvDash \alpha$, $\alpha$ can be proven from $X$ On the surface this looks pretty easy, both $(\varphi \wedge \psi)$ and $\neg(\varphi \wedge \psi)$ are axioms, as they aren't tautology, hence $\vdash (\varphi \wedge \psi)$ and $\vdash \neg (\varphi \wedge \psi)$ and the empty set isn't consistent but this seems too easy, like I'm missing something.   EDIT: I might have come up with a solution for (3), if $X\nvDash \alpha$ it means that $\alpha$ isn't a tautology and if it isn't a tautology it is an axiom in D and therefore can be proven from $X$


Automatic coloring of cell background according to their numerical values

Assume that we have a table that has values out of a wide spectrum---positive, negative, large and small.  I am interested to know if it is possible to automatically put color on each cell based on its numerical value in a pattern similar to, say, geographic maps (hypsometric tints) or temperature. For example, lower values will start with blue and gradually for higher values you move to another spectrum, say red. It could also be that we start with different shades of the same color.   Here is a simple example of a table that we could try to fix according to what I mentioned before:  \documentclass[11pt,a4paper]{article} \usepackage{amsmath} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{graphicx}  \begin{document}  \begin{tabular}{l|cccc}     \hline      & A & B & C & D \\ \hline     Alpha & 0.05 & -0.1 & 2.5 & -4 \\      Beta & 7.5 & -25 & 8 & 9.5  \\      Gamma & 200 & 300 & -271 & 68 \\      Delta & 3.14 & 2.71 & 1.41 & -0.008 \\      \hline  \end{tabular}   \end{document}


Arriving at a different port of entry in the same state in USA?

I am a girl in my early twenties traveling to USA from India and in my visa application I have provided the contact address for a relative in San Francisco, and their invitation letter. I would like to visit LA first. Will I face problems during immigration if I land in LA (with an immediate on wards ticket to SF)? I dont plan to get on the flight from LA to SFO.  Initially I was planning to fly to SFO from India and then fly to LA immediately after completing immigration at SFO airport.


Hi I have this click function to show a :before and for some reason it wont show it ? Here is my code thank you! Also the .cart-toggle:before class is display:none; so it can show.  $( ".cart-toggle" ).click(function() {   $( ".cart-toggle:before" ).show( "slow", function() {     // Animation complete.   }); });   Thank you !


I played Guild Wars (GW1) a long time ago, and I have all the expansions.  Yesterday, I bought Guild Wars 2 (GW2), and linked my two accounts. I went to the Hall of Monuments with my PJ, and I saw that I have a lot more to earn.  So my question is: If I start to play GW2, and install GW1 again, and I get all the items in the hall, will the rewards earned in Hall of Monuments be rewarded in GW2, or once I start to play will I only have the rewards that I have right now?  Here is my Hall's current state:


Proof that a limit point compact metric space is compact.

If $(X,d)$ is limit point compact, show it is compact.  I have found multiple proofs of this that first show that limit point compact implies sequential compact, which in turn implies compactness. I was wondering if there is a direct proof showing that limit point compactness implies compactness in a metric space.


Do not allow me protect closed questions

Since I've a database systems examination in less than 3 hours (from now), I have been browsing Stack Exchange network for questions with normalisation and related tags. Most of the questions are now closed as  or others from the list.  Since, these questions are closed, no users are allowed to post answers to them (unless they are reopened). Why am I, then, allowed the option to protect such questions? Doesn't that beat the entire purpose behind "protecting" a question?


Evaluate $\int_0^{2\pi}\ln(1+a^2-2a\cos(x))dx\text{ ,with }a>0$

$$\int_0^{2\pi}\ln(1+a^2-2a\cos(x))dx,\;\;\;\;\text{with }a>0$$   How to evaluate Integral of $\ln(1+a^2-2a\cos x) dx$? where $x$ from $0$ to $2\pi$ and $a>0$, $\ln$ is the natural logarithm.


I've got a citation where the authors name includes Š. LaTeX gives an "! Package inputenc Error: Invalid UTF-8 byte sequence." on this, fine, I'm used to that, so I replace it with \v{S}. That just gives me a v in the output. But \v{z} works just fine.   MWE:  \documentclass[]{article} \usepackage[utf8]{inputenc} %Allows UTF8 input.   \begin{filecontents}{UTF8.bib} @Article{UTF8,     author ="Chen, Teng-Hao and Lee, Semin and Flood, Amar H. and Miljanić, Ognjen Š.",     title  ="How to print a crystal structure model in 3D",     journal  ="CrystEngComm",     year  ="2014", } @Article{LaTeX,     author ="Chen, Teng-Hao and Lee, Semin and Flood, Amar H. and Miljanić, Ognjen \v{S}.",     title  ="How to print a crystal structure model in 3D",     journal  ="CrystEngComm",     year  ="2014", } @article{TeachingReview,     author = "Gra{\v{z}}ulis, Saulius and Sarjeant, Amy Alexis  and Kantardjieff, Katherine A and et al..",     title = "{Crystallographic education in the 21st century}",     journal = "Journal of Applied Crystallography",     year = "2015", } \end{filecontents} \usepackage[utf8]{inputenc} \usepackage[super,sort&compress,comma]{natbib}  \usepackage[T1]{fontenc} \usepackage{natmove}  \begin{document}  Oddly Miljanić, Ognjen Š. works fine in the body of the text.\cite{UTF8}  If I encode the name in LaTeX it works in body text: Miljanić, Ognjen \v{S}.\cite{LaTeX} But REALLY oddly Gra{\v{z}}ulis, Saulius works everywhere.\cite{TeachingReview}  \bibliography{UTF8} \bibliographystyle{abbrvnat} %the RSC's .bst file \end{document}


Helicopters or dual/quadcopters stop rising after reaching some height from the ground. What causes that? And what one should do if he want to prevent this, if he want the helicopter to keep rising up?


I want to change the body's class. If I click on the red button then body's class should be bg-red. If I click on the dark button, the class should be bg-dark. using jQuery  CSS  button {  padding: 10px 30px;  border: 0;  text-align: center;  display:inline-block; } .light {  background-color:#f9f9f9;  color: #000000; } .dark {  background-color:#000000;  color: #ffffff; } .red {  background-color:#ff0000;  color: #ffffff; }   HTML  <body class="bg-dark">     <button type="submit" class="light">Light</lbutton>     <button type="submit" class="dark">Dark</button>     <button type="submit" class="red">Red</button> </body>


Is there any substantial disadvantage to booking two one-way tickets, versus a round trip ticket?  Booking vacation travel with family of four for winter, from Northeast US to Mexico.  Round trip is pricy and no preferred travel times.  Two one ways is slightly cheaper with much preferred timing.      Different airlines there and back, both reputable national US carriers.


I have a bike with 27 1 1/4 rims. I plan to buy  a pair of Kenda K161 (27 1 3/8) because the roads get really slippery during the winter. Will these tires fit on my rims? I aldo don't want to buy a new 200c wheelset because it's expensive. Another option is DIY studded tires but buying these tires seems the cheapest option. There is a similar question  but the answer isn't really conclusive.


I wonder if anyone would be able to help by giving me a few scenarios/tasks to complete on SQL Server 2012/16 please?  I am learning SQL Server to move from a desktop role to a junior DBA. I have my own lab at home, but only has adventureworks running on a single SQL instance. I can write basic/intermediate queries with inner joins, aggregates etc. What I'm looking for is some basic DBA tasks to practice with. Unfortunately, the interwebs is full of tutorials on how to write SQL, but I can't find much on then putting it into real life use.   Any help would be GREATLY appreciated!   Happy New Year!!


Controlling a Solenoid With Raspbery Pi GPIO Output Using a Transistor

I'm trying to control a solenoid using the RasPi 2's GPIO pins. Since the solenoid needs more power than the RasPi can provide, I'm using a 9V battery to provide the power.  I started with just wiring the circuit and checking if it works by connecting and disconnecting the 3v3 output to the board.  First, here's the wiring I'm currently using:    The diode accross the solenoid inputs is a standard flyback diode, and the resistor is a 1kOhm resistor.  Apparently the RasPi GPIO output pins produce 3.3V at a maximum draw of 16mA.  The inductor represents my solendid, which I got from . As far as I can tell, it requires 12V / 1A to operate, but connecting the 9V battery straight to it (skipping the transistor) works nicely enough. Even the RasPi 5V output provides a weak activation.  However, when going through the transistor, the solenoid does not activate properly. I have noticed that when the base pin is on though, it will "hold" the end position if pushed manually, just not push towards there by itself. It does not do this if the base pin is not connected.  I tried using a BC547 NPN transistor, then I figured the output current was not enough, so I switched to a BC639 (which should have up to 1-1.5A current output), but that didn't help either.  My question is, what transistor should I use? Am I doing anything else wrong? I've seen other people use a TP120, which seems to have an even higher output current.  Since I'm setting up a circuit with 24 of these, I'd like to know for sure before ordering another batch of transistors.


Other terms/ phrases for "hit two birds with one stone"

I'm trying to find a more pleasant way to express this phrase. Hitting two birds with one stone is a disturbing way to express what I'm trying to say, in my opinion.


How do I prove that $[\frac{x}{n}]+[\frac{x+1}{n}]+[\frac{x+2}{n}]....+[\frac{x+n-1}{n}]=[x]$  How to start?  thanks


What does "restricted \write18 enabled" mean and why does TexLive keep reporting it?

I've installed a backported version of TL2012 on Ubuntu 12.04, and every time I start pdftex, xetex, luatex, pdflatex, xelatex, or lualatex, I get the statement restricted \write18 enabled. entering extended mode. I don't recall seeing this in Miktex so I wonder whether I did something wrong during the installation. Interestingly, I don't get the message when I run tex.  First of all, what does it mean? Second, is it a normal message for Tex Live (2012)? Finally, if it is an error, how can I fix it?


friend function in class templates and error LNK2019

I'm trying to overload operator << in my template class and I get error where i want to   NSizeNatural<30> a(101); cout << a;   Without this whole program compiles  Error:  error LNK2019: unresolved external symbol "class   std::basic_ostream<char,struct std::char_traits<char> > & __cdecl operator<<<30,unsigned int,unsigned __int64,10>(class std::basic_ostream<char,struct std::char_traits<char> > &,class NSizeNatural<30,unsigned int,unsigned __int64,10> const &)" (??$?6$0BO@I_K$09@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@std@@AAV01@ABV?    $NSizeNatural@$0BO@I_K$09@@@Z) referenced in function _main   My Numbers.h file :  template<int size, typename basic_type = unsigned int, typename long_type = unsigned long long, long_type base = bases(DEC)>  class NSizeNatural {        // this is how I decelerate friend function        friend ostream& operator<<(ostream& str, const NSizeNatural<size, basic_type, long_type, base> & n); }   In  Numbers.cpp file :  template<int size, typename basic_type, typename long_type, long_type base> std::ostream& operator<<(std::ostream& out, const NSizeNatural<size, basic_type,   long_type, base> &y) {    // For now i want to have my code compile-able     return out << "gg";  }    I have no idea how to do it correctly. And where is a bug ...


Quantum teleportation of atomic states that involve energy

With quantum computing the concern is with information, and when quantum teleportation appears, the states being transferred are often spin states.  However, there is an energy difference, even if quite small, between spin up and spin down for a bound state.  If we quantum teleport such a state, are we locally violating conservation of energy?    I'm especially interested in theory papers which have considered this issue.


Is there something I can do to keep ice-cream soft?

I have bought a electric ice-cream churner, I have tried so many different flavours, different recipes, used alcohols. Have read previous questions and a don't believe that leaving ice-cream out to thaw -scoop then refreeze is the only answer.How do the commercial companies keep them soft. I generally find the next day it is fairly reasonable to scoop, but day after day -the longer it stays the harder it becomes.


How to get image size (height & width) using JavaScript?

Are there any JavaScript or jQuery APIs or methods to get the dimensions of an image on the page?


Why do methods in java create local instances of certain variables but not others?

I struggled coming up with a title for this post but I would love to find a simple explanation why the running the following program gives output of 6,5,5 instead of 5,5,5:  public class TestMethod { public static void main(String[] args) {      IntegerObject aInt = new IntegerObject(5);     objectIncrease(aInt);     System.out.println(aInt.x);      int bInt = 5;     increase(bInt);     System.out.println(bInt);      Integer cInt = new Integer(5);     increase(cInt);     System.out.println(cInt); }  public static void objectIncrease(IntegerObject x){     x.increment(); }  public static void increase(int x){     ++x; }}   IntegerObject is just another class that I created to demonstrate my point.  Why does the increase(int x) method create a local instance of the int x but the objectIncrease(IntegerObject x) method does not create a local instance of the integerObject x?


The flagging history page displays a sidebar that shows the numbers of each type. My feature request is to allow clicking those numbers to show the actual flags that are waiting for review etc.  It would make it much easier than skimming down the page looking for the flags still in review.


Is it a faux pas to not have your phd supervisor write a letter of recommendation as a post doc?

Here is the current situation I face:  I am currently a postdoc but have begun to apply for jobs as a faculty member for the 2019 academic year. My issue is in securing letters of recommendation.   My PhD supervisor is currently going through chemotherapy and I do not want to worry them with a letter of recommendation on my account. My supervisor seems to be taking a small break from academia during treatment.   My question is, for search committees, if my letters of recommendation include my postdoctoral supervisor but not my phd supervisor, will that be considered a faux pas?


One subchapter does not appear in table fo contents

In my .pdf output document the last of my subchapters does not appear in the table of contents. All the chapters are in different .tex files, which are included into a main file.  All of them are correctly listed in the table of contents, just not the last one.  It is listed in the contents which I can navigate to using Adobe Acrobat.  Here is what the build output says:  As you can see it shows additional output for the subchapter 2.4.2 which is not listed in the table of contents. For every other chapter there is no such output.  pdflatex.exe> (C:\ST\Papers/atl.tex [9]) pdflatex.exe> (C:\ST\Papers/comm.tex pdflatex.exe> ("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\ae\omsaer.fd") [10]) pdflatex.exe> (C:\ST\Papers/sparx.tex) [11 pdflatex.exe> \@writefile{toc}{\contentsline {subsection}{\numberline {2.4.2}Sparx Systems En pdflatex.exe> terprise Architect}{11}{subsection.2.4.2}} pdflatex.exe> \newlabel{ch:RelatedWork:sec:Commercial:subsec:EA}{{2.4.2}{11}{Sparx Systems En pdflatex.exe> terprise Architect}{subsection.2.4.2}{}} pdflatex.exe> ] (C:\ST\conclusion.tex   I already googled for the \@writefile{toc} line, but could not find any help online so far.


What is the standard scientific conference poster size and quality?

What is an ideal poster size for scientific conference? Should it be printed on paper or flex or photo paper?


How to get the parameters in hook_menu function correct?

I'm developing my first custom module and I need some help with it.  When a user is clicking on the following   Export to Word   then the user should recieve a word document from his node.  I used the hooks_menu. I do not know why. So based on examples it is like this:  function foo_menu() {   $items = array();   $items['exportoword/%'] = array(     'title' => 'Export to Word',     'type' => MENU_CALLBACK,     'page callback' => 'convert_to_word',     'access arguments' => array('access content'),   );   return $items; }   And the of course the function itself.  function convert_to_word ($args = 'all') {  // HOW TO GET THESE argument here? // NodeId           567 // Pathtoxml        /xmlcv // Pathtotemplate   internal.xsl // FileToSave       filename.docx  // Get the NodeID XML from /xmlcv/576 $xml = new DOMDocument; $xml-> file_get_contents( $pathtoxml & '/' &$nodeid );  // Load XSL file from the template location $xsl = new DOMDocument; $xsl->load($pathtotemplate);  // Configure the transformer $proc = new XSLTProcessor;  // Attach the xsl rules $proc->importStyleSheet($xsl);  // Process it $proc->transformToXML($xml);  // Document is now in XHTMl. Somehow convert to .docx   // No clue yet...  // shell converting or just rename the file and push back to customer? //  $output = shell_exec('pandoc -s -S README -o example29.docx'); // Save it to a file on the server or do I return the file?   file_put_contents($FileToSave, $proc);  return 'success   How to get the arguments as parameters in the convert_to_word function?


Removing Unwanted Wine icon from Launcher

I recently tried to install the Logitech Gaming Software (version 9.02.65) in my Ubuntu 18.04 environment. Since Logitech only provides this program for Windows and Mac, I wanted to install it on Ubuntu using Wine 4.0. However this didn't work out so well (in fact the GUI was completely unusable) so I decided to remove the Logitech Software and put it inside a Windows Virtual Machine.  I am now however left with an unwanted (and unusable) Logitech Gaming Software Link in my Ubuntu Launcher. The Link is not situated in /usr/share/applications nor is it in ~/.local/share/applications.  My question: Where could the Logitech Gaming shortcut be situated and more importantly, how can I remove it from the launcher?


Prove independence of two random variables.

Let two random variables $\xi_1$ and $\xi_2$ be given. They are independent and have a standard normal distribution. Proove that $\frac{\xi_1^2 - \xi_2^2}{\sqrt{\xi_1^2+\xi_2^2}}$ and $\frac{2\xi_1\xi_2}{\sqrt{\xi_1^2+\xi_2^2}}$ are independent.  I was given a little hint that I need to think about the angles and may be it's necessary to go to the polar coordinate system.  Please help to prove it or give me a small hint)


I have roughly 7 columns on each line, I want to print two specific columns then the remaining columns after the last specified one, example:  awk -F: {' print $2 ":" $6 '} a.txt   would print columns 2 and 6 from a.txt. How would I then go onto print the remaining columns after $6?  So example of input/output would be:      column2:column6:column7:column8:column9...


Is using treated wood safe for smoking meat?

I have some broken hickory drum sticks that I was going to throw out; but could these be useful for smoking meat? I would assume the wood is treated.


The Jacobi identity of a Lie algebra says that $ad: \mathfrak g \to End(\mathfrak g)$ is a derivation. I am a bit emberassed but what is the easieast way to see that for every $X \in \mathfrak g$, $ad_X: \mathfrak g \to \mathfrak g, Y \mapsto [X,Y]$ is a Lie homomorphism, i.e., $[ad_X Y, ad_X Z] = ad_X([Y,Z])$ ?  Edit: The identity in the above line is wrong. It is $ad_X$ a derivation (endomorphism satisfying the product rule), not a Lie homomorphism (respecting the Lie bracket). I was a bit confused here, sorry.


Intensity of electric field and electric potential

I know that the vector of the intensity of the electric field has the opposite direction of the gradient of the electric potential. But what baffles me is that the magnitude of the intensity and the electric potential both get smaller with distance.  Is that because we consider the charge creating the field to be positive? If so, if it's negative charge creating the field the potential should get bigger with distance and the intensity gets smaller?  P.S. sorry if my question doesn't use the right terminology. also for not being styled right.


Preventive measures from mono-TeXLive coming poly-TeXLive 2017 system with this Vanilla + these PATHs?

I installed the new TeXLive as instructed by the linked thread  designed for older versions but should be accurate also for 2017.  I have the following in my $HOME/.bashrc because instructions (+ David) after tlmgr successful installation say so to add them there.  This thread answer  proposes to run tlmgr path add after the successful installation, but no, do not do it if you have these PATHs - it will result only in errors.  My $HOME/.bashrc  export PATH=/usr/local/texlive/2017/bin/x86_64-linux:$PATH     export INFOPATH=$INFOPATH:/usr/local/texlive/2017/texmf-dist/doc/info export MANPATH=$MANPATH:/usr/local/texlive/2017/texmf-dist/doc/man   However, I have noticed that over years my mono-TeXLive system becomes poly-TeXLive system because of various reasons, leading eventually to conflicts.  So I am possibly doing something systematically wrong why apt starts to think that it needs to install second TeXLive in my system for masi and sudo.  I would like to understand which measures there are to prevent it because they have been insufficient for me.   OS: Debian 8.7 TeXLive: 2017


I now that: $$\lim_{x\to 0}\frac{\sin x}{x}=1,$$ but I didnt now how to prove that:$$\lim_{x\to 0}\frac{1-\cos x}{x^2}$$  Please help me. Thanky very much for your help.


Given the set $A=\{1,2,\dotsc,14\}$, find all subsets of $7$ elements that sum to a multiple of $7$.

I would appreciate if somebody could help me with the following problem.     Given the set $A=\{1,2,\dotsc,14\}$, calculate the number of distinct sets $M \subset A$ such that $|M| = 7$ and such that the sum of the elements of $M$ is a multiple of $7$.


How does the activity on SE-sites compare to previous months/years?

There has been some turmoil lately, and many highly active users, moderators and community moderators have stepped down.   I'm wondering how/if this has affected the activity on various SE-sites (and SO in particular). What has happened to the question/day rate, answers/question, votes/post, number of users answering questions etc.  Is there any available information regarding this? Are there any clear trends? Does it at all affect the overall network activity?


4-Momentum conservation for particle annihilation

Disclaimer: this is a homework question, so I am happy with just a hint or the expressions needed to proceed with my understanding.  I am working on the momentum conservation of a particle/anti-particle annihilation process, and I have been asked to show that the annihilation of a particle with a finite mass and its anti-particle cannot lead to the emission of only one photon.   I understand why this happens: the conservation of momentum. However, I would like show this in a more sophisticated 4-momentum proof...how would I go about showing that momentum is conserved for two photons but it is not conserved when the annihilation process creates just one photon...?  This may be a duplicate of:


How much do you control a 'Find Steed' mount when you are unmounted?

There have been  asked about the specifics of mounted combat, especially as a paladin.  and are mostly based on the rules we have in PHB p198 and on Jeremy Crawford's tweets:        The mount summoned by the find steed spell serves the summoner. It isn't an independent creature.       While ridden, the steed follows the normal mounted combat rules (PH, 198). Unridden, it has normal action options.    From what I gather from this, a mount summoned from the '' spell is intelligent and loyal enough to obey your orders without question while you are mounted on it, but is not considered an 'Intelligent creature', which could use any type of action while you are mounted, but may go against your orders. This is called an 'independent creature' in the PHB. While mounted, the non-independent creature has only the Dash, Disengage and Dodge actions, along with moving.  I have an issue with the accepted answer for this , which says the following:        The mount is "unusually intelligent": without direction it will use its movement etc. in an "unusually intelligent" way. With direction it will probably do what you telepathically say but it is an independent creature and, at the DM's behest, may do something different subject to its "unusual loyalty".   When you mount your mount you choose if you will control it or if, as it is "unusually intelligent", you will allow it to act independently as per the rules for . It all cases that I can think of, allowing it to be independent is the superior option.      To me this goes against Jeremy Crawford's tweets : the mount is not an independent creature and cannot be used as such.  Therefore, how exactly would an unmounted paladin direct, say, a summoned warhorse, during combat? Would he fully control the creature, through telepathy, allowing for attacks and trampling charges? How much does the DM has a say in whether or not the creature chooses to obey or not?


Computer name keeps changing OSX 10.10 (14A389)

Since I upgraded to Yosemite 10.10 (14A389) my computer name keeps changing adding a (2) and (3) and so forth.  Any ideas how to fix this?


Proof of "every convex function is continuous"

A real valued function $f$ defined in $(a,b)$ is said to be convex if    $$f(\lambda x+(1-\lambda)y)\le \lambda f(x)+(1-\lambda)f(y)$$    whenever $a < x < b,\; a < y < b,\; 0< \lambda <1$.   Prove that every convex function is continuous.     Usually it uses the fact: If $a < s < t < u < b$ then $$\frac{f(t)-f(s)}{t-s}\le \frac{f(u)-f(s)}{u-s}\le\frac{f(u)-f(t)}{u-t}.$$    I wonder whether any other version of this proof exists or not?


Can an astronaut in free space turn his head without moving the rest of his body in opposite direction?

Can an astronaut in free space turn his head without moving (turning) the rest of his body (and also not moving hands or legs) in opposite direction?


I am trying to evaluate $$P=\frac\pi2\sum_{n\geq1}\frac{{2n\choose n}}{4^n n^2}$$ I used the beta function to show that  $$P=\int_0^1\frac{\mathrm{Li}_2(x^2)}{\sqrt{1-x^2}}dx$$ IBP: $$P=\sin^{-1}(x)\mathrm{Li}_2(x^2)\big|_0^1+2\int_0^1\frac{\ln(1-x^2)}{x}\sin^{-1}(x)dx$$ Which is $$P=\frac{\pi^3}{12}+4\int_0^{\pi/2}x\cot(x)\ln(\cos x)dx$$ Which I'm not sure how to handle. I will continue working on this integral and update on my progress.


Target question not shown in duplicate notice on Android Chrome

My recently closed question isn't showing the duplicate target:    Other duplicate questions seem to be fine (both mine and others).


Are there any provision available in SSMS to align the SQL code. Arrange the SQL SP scripts in a readable format. Whenever I align the SP scripts and run a ALTER PROC. The scripts got misaligned when i retrieve the SP code using sp_helptext.  Like how we align the C# OR .aspx codes in Visual Studio using the shortcut key Ctrl +KD, Any option available in SSMS?


UK visa refusal because of my economic ties in the Philippines

I need advice. I want to apply for a one-month UK tourist visa. I’m from the Philippines, a single parent. I have a long-time boyfriend from the UK and he came to visit me twice a year for 5 years already. We also visited some Asian countries together. I’m not employed, I own a house but I don’t own the land because the government allowed me to build my house on this land. I stopped working abroad because he wants me to visit his country and to meet her parents as well... I’m doing an apparel online business, and I own a tricycle, which I’m using for private service for students in my place.  Apart from that, my boyfriend supports me and my son's needs. Which documents do I need to apply for a visa? I was refused a year ago, they questioned my economic ties in the Philippines.


\overbrace and \underbrace with square bracket

I'm trying to put a nice square bracket over a complex text, it should look like an \overline but with ending like  \ulcorner and \urcorner. The presence of \overrightarrow and \overleftarrow makes me believe that is possible to decorate the end of the \overline bar.  I know the existence of \overbrace, but I need a square bracket; moreover, \overbrace takes too much vertical space


Why is a suspicious program draining my battery with GPS usage?

Phone : nexus 5 version 2013 Android version : 6.0 Kernel version : 3.4.0-g2aa165e Build number : MRA58N   For the last few days, 10118 has been draining my phone's battery. It drains battery by using GPS. I typed 'ps' in a terminal emulator, and there was no application with PID 10118. I don't know what exactly 10118 is. My guess is that it's one of recently installed weather apps.  How can I fix this?    Screenshots (click images for larger variants)


Schengen Visa Refusal: lack of evidence and high risk applicant

I am from Pakistan and applied for tourist visa to the Netherlands for just 15 days.The objection is that I do not have strong ties with my country. How can I satisfy the embassy and get visa?  Reasons are that I have not strong ties with home country and chances of illegal immigration.


Contour integral of $\displaystyle\oint_{c} \frac{e^{ix}}{1+z^{2}} dz$

I want to find $\displaystyle\int_{-\infty}^{\infty} \frac{\cos x}{x^{2} + a^{2}}\ dx$ using $$\oint_{c} \frac{e^{ix}}{1+z^2} \cdot d z$$ over the upper half of a large semicircle enclosing $z=i$  (not $\oint_{c} \frac{e^{iz}}{1+z^{2}} dz$) For very large semicircle,  the above integral   reduces to $$\oint \frac{e^{i x}}{1+z^{2}} d z=\int_{-\infty}^{\infty} \frac{e^{i x}}{1+x^{2}}dx=\int_{-\infty}^{\infty} \frac{\cos x d x}{1+x^{2}}+i \int_{-\infty}^{\infty} \frac{\sin x}{1+x^{2}} d x$$ So we have $$\oint \frac{e^{i x}}{1+z^{2}} d z=\int_{-\infty}^{\infty} \frac{\cos x}{1+x^{2}} d x+i\int_{-\infty}^{\infty} \frac{\sin x}{1+x^{2}} d x$$ Also by residue theorem $$\oint \frac{e^{i x}}{1+z^{2}} d z=2 \pi i b_{1}$$  and then  $$b_{1}=\lim _{z \rightarrow i} \frac{e^{i x}(z-i)}{1+z^{2}}=\frac{1}{2 i}$$ ( as $z$--> $i$ , the real part $x$--> $0$ )  Therefore we have$$\int_{-\infty}^{\infty} \frac{\cos x}{1+x^{2}} d x+\int_{-\infty}^{\infty} \frac{\sin x}{1+x^{2}} d x=\frac{2 \pi i}{2 i}$$ And hence $$\int_{-\infty}^{\infty} \frac{\cos x}{1+x^{2}} d x=\pi$$  which is incorrect. Why am I getting wrong result. I suspect the above highlighted portion. Can anyone please help me. Thank you so much


How do I activate windows 8.1? (clean install on a pre-installed laptop)

I used the media creation tool kit to create a windows 8.1 pro boot dvd from Microsoft's website.  I booted off of it, wiped my drive and partitions, recreated the partitions, and proceeded with the install.  I have an Asus Q400A...I called Microsoft support and the guy told me that my product key was an OEM key good for 3 computers and for windows 8!  (To get through the 8.1 install I had used a generic key.)  How am I supposed to activate Windows now? I have a key, but it is OEM, and I think when I wiped the partition it got rid of any recovery partition that came with the Asus laptop.  I called Asus and he told me that I would have to pay them and send it in. I really do NOT want to do this.  Any suggestions? I just wanted a fresh install (I had already backed up my files on an external drive) AND I wanted that fresh install to NOT include asus bloatware.  Any suggestions on where to go from here?   Thank you!


After asking a question, it receives a couple of points but has no responses or answers. What is the best practice for proceeding? What is the preferred waiting period before proceeding?


DigitalOcean: public keys get replaced by an obscure key on every reboot

Whenever I reboot my droplet, the keys in the 'authorized_keys' file under /root/.ssh get deleted and a strange, UNKNOWN key, which I never inserted by any method, nor have I seen even in DO control panel, shows there already present. What is peculiar is that in the end of the key, where comment is written, "motherfucker" is written in these letters: "mdrfckr"  I've tried deleting all keys from this file and from my DO control panel and then inserting fresh keys thru DO control panel (thinking that perhaps DO control panel takes precedence and resets the contents of this authorized_keys file at every reboot). But DO control panel keys are there as expected, but they don't seem to have any effect in my logging efforts.  Due to this, every time my droplet reboots, I've to delete this key and insert 2 keys from myself, one ppk key for ftp, and another openssh key for bash terminal. After inserting them, I'm able to work/login normally.  Pls help. Lest there might be some intrusion into my droplet. (DO hasn't replied to my ticket yet, nor do I expect a fast reply from them ever. even their first reply doesn't contain anything useful, and is there just for the sake of that they replied).


I want applescript to input into microsoft excel "No, (tab, tab again), Yes". I can't seem to make this work. I would preferably like it to start whenever I press a hotkey or something, but having to swipe over and activate the script should be ok.  Thanks, Nick


How to move everything but the last files?

How can I move everything but the last n files, from dir1 to dir2?.   I currently do this, setting the time as an approximate for n, in my case n=2 each 10 minutes.  find /dir1/ -name '*.txt*' -mmin +10 -type f -exec mv "{}" /dir2/ \;   A similar command, could work, but i am not certain, could somebody confirm how should adapt this?  ls -1tr | head -n -2 | xargs -d '\n' mv -f --


I want to find all $ a \in \mathbb N $ such that $2^a − 1 \equiv 0 \pmod 3$  and $ 4x^2 + 1 \equiv 0 \pmod {\frac{2^a -1}{3}}$ has a solution. I know the approach is to first prove that $a$ should be a power of 2. But I am not able to solve this question.


Can I manually put an external hard disk to sleep?

Is it possible to manually put an external hard disk to sleep? Right now, I've already got "Put the hard disks to sleep when possible" checkmarked in the Energy Saver preference pane, and so they should sleep after 10 minutes of inactivity, but I'm wondering if it's also possible to do this manually whenever I want.  I just bought an external hard drive and it's already spinning constantly, compared to my current external which is completely quiet, so I'm wondering if I can put it to sleep when I need to to stop it from spinning all the time.


What is the format specifier for binary in C?

I have looked all over the place, but I have not found an answer to my question. First of all, I know that the symbol for decimal is %d, the symbol for octal is %o, and the symbol for hexadecimal is %x. What I cannot find, however, is the symbol for binary. I would appreciate any help.


The task is to calculate the following integral:  $$\int_{1/3}^{3}{\frac{\tan^{-1}x}{x^{2}-x+1}dx}$$  However the answer me currently getting seems to be too large and odd, any ideas of more efficient solution? P.S I was using universal substitution for rational trigonometric equations


Is $F = G\dfrac{{m_1}{m_2}}{r^2}$ really true?

My book (Concepts of Physics by H.C. Verma) writes:  It has been reported () that the force between two masses may be better represented by $$F = \frac{G_{\infty} m_{1} m_{2}}{r^2} \left[1 + \left(1 + \frac{r}{\lambda} \right) \alpha e^{-\frac{r}{\lambda}}\right]$$ where $\alpha \approx - 0.007$ and $\lambda \approx 200~\mathrm{m}$.  What is this? Such a horrendous formula! So, what about Newton's? And what's the difference between $G$ & $G_{\infty}$?


Whenever i create a css file either by web->css or by javafx project i get the same error      Multiple markers at this line     - Syntax error on token "Invalid Character", interface expected     - Syntax error, insert "InterfaceBody" to complete CompilationUnit   i searched for the solutions but they are generally like create a new css file by web->css but that didn't help me. i further researched and i found that there is no output file for css in bin.Now i don't know what to do.Can anyone help me? here is my code(eclipse Neon):     package application;     import javafx.application.Application;    import javafx.fxml.FXMLLoader;    import javafx.stage.Stage;    import javafx.scene.Parent;    import javafx.scene.Scene;   public class Main extends Application { @Override public void start(Stage primaryStage) {     try {         System.out.println("aaaa");         Parent root=FXMLLoader.load(getClass().getResource("/application/Main.fxml"));         Scene scene = new Scene(root);         scene.getStylesheets().add(getClass().getResource("application.css").toExternalForm());         primaryStage.setScene(scene);         primaryStage.show();         primaryStage.setTitle("pvrock");     } catch(Exception e) {         e.printStackTrace();     } }  public static void main(String[] args) {     launch(args); } }   application.css  #label{      -fx-font-size:30px;   }   Main.fxml      <?xml version="1.0" encoding="UTF-8"?>      <?import javafx.scene.control.Button?>     <?import javafx.scene.control.Label?>     <?import javafx.scene.layout.AnchorPane?>     <?import javafx.scene.text.Font?>        <AnchorPane prefHeight="300" prefWidth="400" xmlns:fx="http://javafx.com/fxml/1" xmlns="http://javafx.com/javafx/8.0.60" fx:controller="application.MainController">        <children>           <Button fx:id="btn1" layoutX="169.0" layoutY="198.0" mnemonicParsing="false" onAction="#f1" prefHeight="23.0" prefWidth="62.0" text="Click me">      <font>         <Font size="10.0" />      </font>   </Button>   <Label fx:id="label" layoutX="146.0" layoutY="112.0" prefHeight="78.0" prefWidth="120.0" />        </children>     </AnchorPane>   MainController.java      package application;      import java.util.Random;      import javafx.event.ActionEvent;     import javafx.fxml.FXML;     import javafx.scene.control.Label;  public class MainController { @FXML private Label label;  public void f1(ActionEvent event){     Random rand=new Random();     int num=rand.nextInt(50)+1;     System.out.println(num);     label.setText(Integer.toString(num));  }  }   screenshot of errors:


Prevent SQL Injection on user input SQL?

I'm making school web application which will be for testing users SQL knowledge and they have to enter SQL queries in form textarea and execute it on server mySQL. the problem that occurred to me is that I can't do prepared statements or binding or white-list on unknown dynamic queries(entered by user) and this makes the application SQL injection vulnerable.  How can I prevent SQL Injection on this type of queries(allowed will be SELECT, DELETE, INSERT, UPDATE) without affecting the final compare result?  Maybe I'm missing some PHP function which can do that? or I have to create a SQL parser which will check user queries for possible SQL injections? I'm not trying to do anything fancy, I just need basic protection for my application.  I use CodeIgniter as Framework, but I don't think this will change anything.  How can I use PDO, statements,whitelists and other techniques, when user can enter queries like   select * from user where some_column = some_value (this is just example)   or query like  select * from user LEFT JOIN ..... having something > 5 ORDER by some_column   I can't predict their input and all possible combinations can contain injection vulnerability.  I receive on my end $_POST['SQL_user_query'] which contains string of SQL query, I can't use on it prepared statement.  EDIT: what i want is that is to prevent the users to do destructive things with my database and gain information about the tables, because after they submit the query the web application also will show the result from the query under the  input textarea and if they make injection that can show sensitive information.


PKEXEC: No display name and no $DISPLAY environment variable

I've installed XAMPP but I haven't got desktop entry so I created one. I'm using pkexec because it requests authorization. The problem is when I run my new desktop file nothing happens after I enter password. Here's the file:  [Desktop Entry] Name=Xampp GenericName=Localhost Server Exec=pkexec /opt/lampp/manager-linux-x64.run Terminal=false Icon=/opt/lampp/XAMPP.png Type=Application Categories=Programming;Development;   When I execute Exec line in terminal, this is the error I get after entering password:   What is this about?


My daughter is staying with Swedish relatives before a school study abroad trip.  I want to send a few gifts with her for them.  So many sites say to bring local food, but I read that you can't bring food into Sweden except from EU nations.     I need ideas for boys who are 17 & 20.  Would they like tshirts from American universities? Couple in their 70s who just downsized. Couple in their 40s.  (This type of question was asked on this site just last summer, but food was the main answer.)


List of favorite questions in the Stack Exchange Android app

I have just installed the Stack Exchange app for Android. It looks pretty good so far. But what would be really great is possibility to bookmark questions for a later review.  I noticed a "favorite" button near a question, so this would work as a bookmarking, but currently I can't review favorite questions in the app.


How to load WCF Service bindings for a Visual Studio 2010 Addin?

My Questions is:    I want to call WCF Service methods via Visual Studio Addin and the addin/or Visual Studio host is looking int the wrong place for configurations ( or maybe its looking at the right place but the config is at the wrong place)?   What is the best practice to do this?   I am developing an Visual Studio 2010 Addin that needs to call a WCF service to get data and do some processing.   I have successfully added the WCF Service reference and created client as follows:  WcfServiceClient client = new WcfServiceClient()   When the control reached the above line in my code, i get the following error:     Could not find default endpoint element that references contract 'WcfService.IWcfService' in the ServiceModel client configuration section. This might be because no configuration file was found for your application, or because no endpoint element matching this contract could be found in the client element.   Now the endpoint and binding information is there in the app.config file. What is happening here is:  When Visual Studio exe (devenv.exe) loads the plugin and executes the part of code where it has to create a WCF Service client, it attempts to load  devenv.exe.config  instead of MyAddin.dll.config file  The solution seems to be: Copy and paste WCF Service binding and service model client data from app.config to devenv.exe.config and maybe it will work then.  Best practice advice please?  Thanks  Steve


biblatex: \autocite(s) separate entries by a dot instead of semicolon

I'm using the biblatex package with \usepackage[backend=bibtex,style=verbose-trad2]{biblatex}  and the command \autocite{ref1,ref2} correctly produces footnotes with reference1; reference2. However, I would like the two references to be separated by a dot like $\bullet$, instead of semicolon ; Is that possible?


Word for caring about the appearance of a matter but not its spirit

"To care all about the appearance of a matter or a law, without paying attention to its meaning/spirit and essence"  Actually, I look for a suitable word for to express such meaning, and place it in this text:    The Pharisee Jews were so/very/too ................ . That is to say, they were paying attention to the appearance of religious orders, but they didn't care about the spirit of those orders at all. Jesus told them: "You argue about the uncleanness of a dish with one another, but you do not argue about what is earned through usury or a forbidden and unclean way, that you eat in the same dish?! You're okay with usury, but you judge on trivial matters, such as the egg that a chicken laid on Saturday (Jewish holiday)?!"  The words I have found so far are:   Formalistic    and   Superficial observer   Also im not sure about to choose among these:  1. Appearance of religious orders  or  2. Outward of religious orders    Please leave me any kind of improvements and changes you think works within the whole text.


Prove that limit of $\frac{1^p + 2^p + \ldots + n^p}{n^{p+1}}$ is equal to $\frac{1}{p+1}$

I stumbled upon an interesting limit of series and I was wondering how could it be solved...  $$\lim_{n\to \infty} \frac{1^p + 2^p + \ldots + n^p}{n^{p+1}} = \frac{1}{p+1}$$  I tried to divide it into smaller sections ($\frac{1^p}{n^{p+1}}$, $\frac{2^p}{n^{p+1}}$, ..., $\frac{1}{n^p}$), factoring the numerator, but nothing seemed to be the way to go...  I also tried using the squeeze theorem - finding two series with the limit of ${\frac{1}{p+1}}$ but I had no luck with this either.  Any ideas?


Grammar: Participle clause after preposition

I have been studying the book named Grammar and Vocabulary for Advanced by Martin Hewings and Simon Haines. There is a exercise sentence like this "With the wind reaching hurricane force, ships have been advised to head for land." As I cannot rewrite the sentence, I'm confused. Could you rewrite the sentence above and clarify it for me please? Thank you!


Performance wise which one is best in below two cases, for example:  Version 1:   int value1 = rs.getInt(1); String value2 =  rs.getString(2);   Version 2:  int value1 = rs.getInt("VALUE1"); String value2 = rs.getString("VALUE2");   Which one is best to use? In many places i added the code like Step 1 way. I want to know is it really make sense.


How to have a seperate power supply of same value to power microcontroller and motor?

I was creating a project which include the micro controller(ATmega328) and the 5VDC motor pump. so i made the circuit shown. motor is actuated by relay. the moment motor is 'ON' the micro controller gets reset(brownout). How do i modify the circuit to have a better performance. and is there any way that i can isolate the power supplies to controller and motor for same DC jack.


Do I need to check the integrity of a Ubuntu install?

I want to install Ubuntu, and I'm switching from Windows 10. I've heard that some people will check the integrity of the ISO image. Should I do this and if so, why?


How to remove duplicate elements in ArrayList

I noticed that i return duplicate rows in my listview constructed from my arrayList. I would like to check if the elements exist in the arraylist and if so, ignore that set. The unique value to check would be my id, denoted by KEY_SID.  Here's my code:     public ArrayList<SaleModel> loadSalesFromSQLite() {         ArrayList<SaleModel> sales = new ArrayList<>();         hp = new HashMap();         SQLiteDatabase db = this.getReadableDatabase();         Cursor res = db.rawQuery("SELECT  * FROM " + TABLE_SALES + " ORDER BY datetime(created_at) DESC", null);         res.moveToFirst();         while (!res.isAfterLast()) {             SaleModel l_sales = new SaleModel();              l_sales.setId(res.getString(res                     .getColumnIndex(KEY_SID)));             l_sales.setCode(res.getString(res                     .getColumnIndex(KEY_CODE)));             l_sales.setAttendant_id(res.getString(res                     .getColumnIndex(KEY_ATTENDANT_ID)));             l_sales.setAttendant_name(res.getString(res                     .getColumnIndex(KEY_ATTENDANT_NAME)));             l_sales.setProduct_id(res.getString(res                     .getColumnIndex(KEY_PRODUCT_ID)));             l_sales.setPrice(res.getString(res                     .getColumnIndex(KEY_PRICE)));             l_sales.setCustomer_id(res.getString(res                     .getColumnIndex(KEY_CUSTOMER_ID)));             l_sales.setCustomer_first_name(res.getString(res                     .getColumnIndex(KEY_CUSTOMER_FIRST_NAME)));             l_sales.setCustomer_last_name(res.getString(res                     .getColumnIndex(KEY_CUSTOMER_LAST_NAME)));             l_sales.setCustomer_image(res.getString(res                     .getColumnIndex(KEY_CUSTOMER_IMAGE)));             l_sales.setUid(res.getString(res                     .getColumnIndex(KEY_UID)));             l_sales.setQuantity(res.getString(res                     .getColumnIndex(KEY_QUANTITY)));             l_sales.setP_name(res.getString(res                     .getColumnIndex(KEY_PRODUCT_NAME)));             l_sales.setP_image(res.getString(res                     .getColumnIndex(KEY_PRODUCT_IMAGE)));             l_sales.setCreated_at(res.getString(res                     .getColumnIndex(KEY_PRODUCT_CREATED)));             l_sales.setSvg(res.getString(res                     .getColumnIndex(KEY_SVG)));             l_sales.setOfflineTag(res.getString(res                     .getColumnIndex(KEY_OFFLINETAG)));              sales.add(l_sales);             res.moveToNext();         }         Log.d(TAG, "Fetching sales from Sqlite: ");         res.close();         return sales;     }     Before i return sales arrayList, i would like to check for duplicates there, remove them, the return the arrayList without duplicates. Any suggestions?


Problem Installing Xubuntu 12.04 Audio-Video codecs

I used Crouton to install Xubuntu 12.04.4 LTS with the XFCE environment on my HP Chromebook 11. I've gotten it all fully installed and everything; the only thing I'm doing now is the basic setup things, like adding codecs and other things like LibreOffice, VLC, Firefox, Ubuntu Software Center, etc. This information I got from 2 sources:      .   I'm currently on the same step at both URLs, which is #6 on Link 1 and #8 on Link 2.  Per the articles, which both said the same thing, I typed in   sudo apt-get install xubuntu-restricted-extras libavcodec-extra and it didn't do   anything. It just kept on saying the same thing:  Reading package lists... Done Building dependency tree Reading state information... Done E: Unable to locate package libavcodec-extra   I've spend the last hour or so scouring the internet for a solution, for a hint even at what is going on. I don't want to do a clean reinstall, for two reasons: 1) it's takes  like 1.5h just to get the croot fully installed, and 2) everything but this out of what I've done so far (up to #6 at Link 1 & up to #8 at Link 2) works except the audio. I've already installed flash, so YouTube works fine. It's just I can't hear any audio.  Please help?  Thanks in advance. I appreciate all the great help I've been getting from AskUbuntu lately. You all are great.


How can I pxe install ubuntu server offline without archive mirror?

I am trying to install ubuntu 18.04 server on a segregated network not connected to the internet, I will connect to a public network later to download packages. When installing, Ubuntu forces me to pick a mirror and download archive components. Which will never work as I am offline. I just need to install the OS right now and download other components later. When installing RHEL or CentOS, I don't have to download components during install. How can I disable this? or is there a different image I need to use? I am using this image located here:  EDIT: I should have mentioned this is a PXE install via UEFI (Not BIOS). The path of install should be  Boot VM to PXE network to get DHCP from PXE server Install OS with PXE DHCP address (Which will never have public internet access) Change port network / vlan to production network post install Configure an IP address post install  Do I need to adjust my PXE append statement? Is there a way to bypass the installer forcing me to perform an install from the ubuntu archive? Workaround: Well, I needed to add a secondary network interface onto the production network for internet access. Now the system has two network interfaces, one of which I would need to remove post install. This works for a virtual network, but defiantly does not work for our bare metal systems. Why must I be connected to the internet?! Is there anyway around this? I have seen guides that you can create a custom image with packages already installed. But those guides are not very clear on how to create an image, also not clear on if those images will work for PXE install. Note: I appreciate people linking me to this post  but like I said in the comment, this did not work. I tried downloading the image, and still, the installer forces me to provide an archive address. This is after trying to give a bogus ip address. There is no way around this.


problem based on transfinite number concept (Is aleph null itself a set?)

Is transfinite number (aleph null, continuum etc.) itself a set, or it is generalization of numbers in a correlation sense to compare the size of infinite set in terms of number of elements in $1-1$ correspondence. Can we call aleph null itself a set, as some books write aleph null as set of all sets equivalent to set of natural number.


How can we find which process is using a particular port?

Given a port number how can we find which process is using it?


I need to display math in my report, but is it possible to remove the vertical space around align*?  A little example is the following (where I just want the align* to have the same vertical space as a \\  \documentclass[10pt,danish,a4paper,oneside,fleqn]{report}  \usepackage[english]{babel} \usepackage{amsmath}  \begin{document}  ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss \begin{align*}   A{\cap}B\ & =\ {\left\{{b,d,e}\right\}}{\;}{\cap}{\;}{\left\{{a,b,f,g}\right\}}   \\   \nonumber\ & =\ {\left\{{b}\right\}} \end{align*} ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss \\ ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss  \end{document}


Global variable in main with concatenation?

I realize the following will not work but is there an equivalent?   const char *foo = "foo"; static char *end = sprintf ("%s_bar", foo);   What I want to do is concatenate strings and then make that concatenated string a static variable so that it becomes a global variable. Also I like not having to assign memory to a char. I need this to go in main() because I need to use a function (sprintf) to merge two strings.


What would happen if the Earth were hollow?

This is a question of my exam. What would a person experienced if he were put in any point inside the Earth that is hollow (all its mass is concentrated in the surface). Finding the gravitational field intensity, it turns out to be 0. I interpret it as if the person didn't experience any acceleration; as a result, He should stand still there where he was put in.   That's what I get to conclude. But, what do you think?