ExecuteError: ERROR 000358 - Using a variable within arcpy.Select_analysis()

I have looked at  and while it is very similar to the question I'm asking I ran into the same issue after implementing its syntax. I feel like I'm still missing something related to how to implement the correct syntax for the below.  where_query = '"field_name" <= ' "{0}.format(year_range)"   I'm trying to make what into a geoprocessing tool that can be reused in ArcMap, but I'm receiving the following error. It looks like an issue with the way that I'm formatting the where_query variable, but I can't seem to get it right.  Traceback (most recent call last):   File "C:\ArcPy\mean_center_drift.py", line 19, in <module>     arcpy.Select_analysis(in_feature, year_out_name, where_query)   File "c:\program files (x86)\arcgis\desktop10.3\arcpy\arcpy\analysis.py", line 84, in Select     raise e ExecuteError: ERROR 000358: Invalid expression 1 Failed to execute (Select).   and here is the code in its current form.  import os import arcpy  in_feature  = arcpy.GetParameterAsText(0) out_features  = arcpy.GetParameterAsText(1) origin_year = arcpy.GetParameterAsText(2) field_name = arcpy.GetParameterAsText(3)  for x in range(10, 140, 10):     year_range = int(origin_year) + x     where_query = '"field_name" <= ' "{0}.format(year_range)"      year_out_name = os.path.join(out_features, "Years_{0}".format(x))     mean_out_name = os.path.join(out_features, "Mean_{0}".format(x))      arcpy.Select_analysis(in_feature, year_out_name, where_query)      arcpy.MeanCenter_stats(year_out_name, mean_out_name, "#", "#", "#")


Wine error, packages being held, help please :S

I am getting this error:  The following packages have unmet dependencies: udev : Depends: libudev1 (= 204-5ubuntu20.2) but 204-5ubuntu20.4 is to be installed E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.   Then I've tried to apt-get dist-upgrade and I a similar error:  The following packages have been kept back: libudev1 udev 0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.   What should I do? I am Using ubuntu 14.04 64 bits. The output of sudo apt-get -f install is:  Reading package lists... Done Building dependency tree Reading state information... Done 0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.   Using ubuntu 14.04 I really need help guys, sry for double posting


How to print a collection of characters next to each other

I have this code where given an integer n, I want to print out all integers in the interval [1→n] that divide n, separated with spaces. I wrote this code:  n = int(input('Enter number:'))  for i in range(1, n+1):     if (n%i==0):         print (i)   I get this as the answer:   Enter number:8   1  2  4  8   But I want my answer next to each other, separated using spaces (so: 1 2 4 8). How do I do this?


Here i am creating dynamic radio buttons, text area and click events but my   click events for add and remove button is not working for the dynamically created button. I tried using on click event of jquery but it is not working as expecte. How to add .on jquery function in my scenario i tried using :  $("#TextBoxesGroup").on("click", ".abc", (function () {  //some script });   but when i click on the new dynamic add button which i created it is not at all adding another block  <!DOCTYPE html>

   Textbox #1 : <input type='textbox' id='textbox1' >    <input type="radio" name="gender" value="male"> Male    <input type="radio" name="gender" value="female"> Female
    <textarea id="textbox" rows="4" cols="50"></textarea>     <input type='button' class="abc" value='Add Button' id='addButton'>     <input type='button' value='Remove Button' id='removeButton'>     <input type='button' value='Get TextBox Value' id='getButtonValue'>


Ansible shell module not respecting command switch

So I got the following task: - name: "Use echo."   shell: echo -e "First Line\n " > "/tmp/{{ ansible_date_time.date }}_test.txt"   delegate_to: localhost   become: 'no'   changed_when: 'false'   run_once: 'yes'  When looking at the resulting file I get: -e First Line <newline printed properly>  What I want is: First Line <newline printed properly>  I basically tried every form of quoting, so what am I missing?


How to make sure an application keeps running on Linux

I'm trying to ensure a script remains running on a development server. It collates stats and provides a web service so it's supposed to persist, yet a few times a day, it dies off for unknown reasons. When we notice we just launch it again, but it's a pain in the rear and some users don't have permission (or the knowhow) to launch it up.  The programmer in me wants to spend a few hours getting to the bottom of the problem but the busy person in me thinks there must be an easy way to detect if an app is not running, and launch it again.  I know I could cron-script ps through grep:  ps -A | grep appname   But again, that's another hour of my life wasted on doing something that must already exist... Is there not a pre-made app that I can pass an executable (optionally with arguments) and that will keep a process running indefinitely?  In case it makes any difference, it's Ubuntu.


Using xcolor package and inserting figures

I have a report with figures. The code that I'm using is very basic and looks like this:  \begin{figure} \centering  \includegraphics[scale=0.5]{Figures/pic} \caption{Title} \label{fig:name} \end{figure}   Everything works fine, but as soon as I add \usepackage[table,xcdraw]{xcolor} to my preamble, I get the following error:  ! Too many }'s. \color@endbox ->\color@endgroup \egroup l.38 \end{figure} You've closed more groups than you opened. Such booboos are generally harmless, so keep going. ! LaTeX Error: \begin{document} ended by \end{figure}.   I haven't used xcolor in my document yet, but I plan to use it later for highlighting text. What can I do about this error?  Here's the rest of my preamble in case you need to know the details:  \documentclass[12pt]{report} \usepackage{jrl_thesis} \usepackage{fancyhdr} \usepackage{natbib} \usepackage{graphicx} \usepackage{setspace} % this package defines the spacing of your thesis and should be included \usepackage{float} \usepackage{geometry} \usepackage{array} \usepackage[english]{babel} \usepackage{amsmath} \usepackage{amssymb} \usepackage{amsthm} \usepackage{multirow} \usepackage{algorithmicx} \usepackage{algpseudocode} \newtheorem{thm}{Theorem} \newtheorem{lma}{Lemma} \usepackage{mathtools} \setcounter{tocdepth}{5} \usepackage{pbox} \usepackage[hidelinks]{hyperref} \usepackage{longtable} \usepackage[table,xcdraw]{xcolor} \addtolength{\voffset}{0.15in} \addtolength{\marginparsep}{-10pt} \addtolength{\textheight}{0.25in} \setlength{\footskip}{0.75in}


Hidden text feature using  . Where is this documented?

When you go over the text below with mouse it appears. I saw this in a question somewhere and am wondering where on meta-so or so it is documented.        This is very cool but where is it documented?


PHP save XML's Tag Value to PHP variable

Hi after this lines of codes: $client = new SoapClient("http://rscnagahrd/OracleWS/Oracle.asmx?WSDL"); $result = $client->getFoods(); $objResult = simplexml_load_string($result->getFoodsResult->any);  I want to extract the values from $objResult's Tags to a PHP Variable.  When I var_dump($objResult);  I get:  object(SimpleXMLElement)#4 (1) {  ["NewDataSet"]=> object(SimpleXMLElement)#5 (1) {      ["Table"]=> array(4) {          [0]=> object(SimpleXMLElement)#6 (4) {              ["FOOD_ID"]=> string(1) "1"              ["FOOD_NAME"]=> string(6) "Burger"              ["FOOD_DESC"]=> string(15) "100% Beef Patty"              ["FOOD_PRICE"]=> string(2) "25"          }          [1]=> object(SimpleXMLElement)#7 (4) {              ["FOOD_ID"]=> string(1) "2"              ["FOOD_NAME"]=> string(4) "Coke"              ["FOOD_DESC"]=> string(6) "Drinks"              ["FOOD_PRICE"]=> string(2) "10"          }          [2]=> object(SimpleXMLElement)#8 (4) {              ["FOOD_ID"]=> string(1) "3"              ["FOOD_NAME"]=> string(5) "Pepsi"              ["FOOD_DESC"]=> string(6) "Drinks"              ["FOOD_PRICE"]=> string(2) "10"          }          [3]=> object(SimpleXMLElement)#9 (4) {              ["FOOD_ID"]=> string(1) "4"              ["FOOD_NAME"]=> string(12) "French Fries"              ["FOOD_DESC"]=> string(16) "Made from France"              ["FOOD_PRICE"]=> string(2) "15"          }      }  }    }  I want to for example store all items with TAG "FOOD_NAME" be assigned to a PHP variable   $foodname(0)


How can I get this pregnant woman to work?

I have this really intelligent pregnant women stuck in the living quaters... I can't make her work  Anyone have any Solutions to this problem?


The question is to find out $2005^{2007^{2009}}\bmod 7$ or the remainder when $2005^{2007^{2009}}$ is divided by $7$. My steps $: \\ 2005\equiv3\pmod 7\\ 2005^3\equiv3^3\equiv-1\pmod7\\ 2005^{2007}\equiv-1^{669}\equiv-1\pmod7$  How do I proceed? Please help!!!


Is there an efficient method of converting an integer into the written numbers, for example:  string Written = IntegerToWritten(21);   would return "Twenty One".  Is there any way of doing this that doesn't involve a massive look-up table?


If $\int_{0}^{x}f(t)dt\rightarrow \infty$ as $|x|\rightarrow \infty\;,$ Then every line $y=mx$ Intersect $ y^2+\int_{0}^{x}f(t)dt=2$

If $f$ is a continuous function with $\displaystyle \int_{0}^{x}f(t)dt\rightarrow \infty$ as $|x|\rightarrow \infty\;,$ Then show that every line $y=mx$ Intersect the curve $\displaystyle y^2+\int_{0}^{x}f(t)dt=2$  $\bf{My\; Try::}$ Put $y=mx$ in $$\displaystyle y^2+\int_{0}^{x}f(t)dt=2\;,$$ We get $$\displaystyle m^2x^2+y^2+\int_{0}^{x}f(t)dt=2.$$ We can write it as $$\displaystyle 2\int_{0}^{x}2m^2tdt+\int_{0}^{x}f(t)dt=2$$ So $$\displaystyle \int_{0}^{x}\left[2m^2t+f(t)\right]dt-2 =0$$ Now Let $$g(x) = \displaystyle \int_{0}^{x}\left[2m^2t+f(t)\right]dt-2.\;,$$ When $x\rightarrow \infty\;,$ Then $g(x)\rightarrow \infty.$ (Where $g(x)$ is an Continuous function.) Now I did not Understand How can i solve that, Help me Thanks


My app crashes when using the internet, but only on Pie

My app crashes when I do any networking activities (specifically, reading text through an InputStream), but only on Android Pie. I've tried it using emulators running various API versions, but this only happens on API 28. I have also tried this on an actual phone running Pie, and it crashes there as well. The app runs fine on all other Android versions afaik.  The logcat shows this:  2018-12-09 14:59:16.917 6864-6925/<package> E/AndroidRuntime: FATAL EXCEPTION: Thread-4     Process: <package>, PID: 6864     java.lang.NullPointerException         at java.io.Reader.<init>(Reader.java:78)         at java.io.InputStreamReader.<init>(InputStreamReader.java:72)         at <package>.<Activity class>.<method>(<Activity class>.java:304)   The statement that the stack trace leads to in my code is:  BufferedReader br = new BufferedReader(new InputStreamReader(text));  where text = con.getInputStream(); up above, which when I debugged, was returning null. con is a URLConnection that opens a connection to a particular URL. The value of con seems alright and is identical to con values on different API versions.   So, the culprit seems to be text = con.getInputStream(); which is returning normally on API 27 and below, but is returning null on Pie.  Any idea what could be causing this? Let me know if there's any more information I could provide.


Can a monk use Flurry of Blows without meeting the requirements of the Martial Arts feature?

The  feature gives a monk the ability to use Dexterity instead of Strength with unarmed strikes and monk weapons. It also gives the monk the ability to make an additional unarmed strike as a bonus action. A monk must be unarmed or wielding only monk weapons to use Martial Arts.  The  feature gives a monk the ability to spend one Ki point to use Flurry of Blows, which lets the monk make two additional uarmed strikes as a bonus action.  If a monk is wielding a weapon that is not a monk weapon (ignoring the question of whether it is wise for the monk to do this), can s/he still spend a Ki point to make two additional unarmed strikes as a bonus action? If so, must the unarmed strikes use Strength rather than Dexterity? I believe that the answer to both is yes, but am I missing something?


What is the difference between .pem, .csr, .key and .crt and other such file extensions?

I'm new to SSL / TLS and I want to work with the OpenSSL toolkit.  I don't know what .pem and .csr stands for?  I do know that .key is the private key and .crt is the public key.


#include <string.h> #include <iostream> using namespace std;  class String {     public:         /* Parameterized Constructor */         String(const char* i_ac)         {             cout<<"Parameterized Constructor";             if(i_ac)             {                 data = new char [strlen(i_ac) + 1];                 strcpy(data,i_ac);             }             else             {                 data = new char[1];                 *data = '\0';             }         }         //Parametrized constructor ends.          /*Copy Constructor */         String ( String& objTemp )         {             cout<<"Copy Constructor";             data = new char[strlen(objTemp.data) + 1];             strcpy(data,objTemp.data);          }          /*Overloaded Assignment Operator */         String operator=(String& objTemp)         {             if(this == &objTemp)             return objTemp;             //Delete Existing data             delete[] data;             data = new char[strlen(objTemp.data)+ 1];             strcpy(data,objTemp.data);             return *this;         }          friend ostream& operator<<(ostream& out, String& s1);      private :         char* data; };  ostream& operator<<(ostream& o1, String& s1) {     o1<<s1.data;     return o1; }  int main() {     String s1("Hello");     cout<<"s1"<<s1;     String s2 = s1;     cout<<"\ns2"<<s2;     String s3(); //doubt     cout<<"\ns3"<<s3; }   On calling String s3(), no constructor is called (I know since I print inside each constructor). However, printing s3 on the following line outputs a 1.  Why isn't a constructor called? How can I make sure one is called?


Difference and compatibility between AVR xxxA and xxx/xxxV series

This is kind of two questions(difference & compatibility), but since an extensive answer to the latter will probably include an answer to the former, I think it's okay.  Anyway, on to the question: I've made a certain device prototype on a solderless breadboard using an ATTiny13A-PU (the PDIP8 one) and would now like to make an actual PCB with the SMD (-SU/-SSU) version of it (since the device is supposed to be watch-sized). However, the place I usually order my parts from only has the SMD version of ATTiny13V in stock. So, I'd like to know how those two are different and whether my code (in C) for the former will be compatible with the latter and whether that's true for other AVRs as well (for example, '2313A vs '2313/'2313V).   As for my own research, the summary sections of the respective datasheets don't seem to reflect any major differences and I'm not inclined to scan and the whole thing. The other thing I noted is that avr-gcc does not consider the '13 & '13A the same MCU, so there definitely are some differences, I just can't figure out what they are. (while avrdude does, but AFAIK it only handles the uploading, not the code).  edit/clarification: This question is mostly about differences in and portability of code for the A vs. non-A series (which do exist, according to avr-gcc). Listing other differences is, of course, welcome, but secondary.


Verb agreement for something that was discussed in the past, while the issue still exists in the present

How do you write something that was discussed in the past, while the issue still exists in the present?        The discussion resulted in the committee members highlighting crucial areas that need to be addressed.   The discussion resulted in the committee members highlighting crucial areas that needed to be addressed.      ......................     1'. The discussion resulted in the committee members highlighting crucial areas that need to be addressed if one is to achieve the desired outcome.      2'. The discussion resulted in the committee members highlighting   crucial areas that needed to be addressed if one were to   achieve the desired outcome.


Allow authors to self-answer their own protected questions even if they don't have enough reputation

I'm asking this question because of :  For the purposes of your reputation "on this site", Stack Exchange has calculated the following:  Registered an account: 1 rep earned (total earned: 1, total rep: 1) Association bonus: 0 rep earned (total earned: 1, total rep: 101) Question upvotes: 40 rep earned (total earned: 41, total rep: 141) Suggested edits: 2 rep earned (total earned: 43, total rep: 143) Bounty offered: -100 rep earned (total earned: -57, total rep: 43)   I have known that association bonus is ignored, and just knew that bounty is also considered in the calculation; I don't have any problems with that. One thing that strikes me is, the poster is the author of the question. In this case, I think it's an edge case since the author also put a bounty, making their earned rep without the bonus go negative. (This might be discussed further, since  ). However, what if a new user (1 rep) asks a question, then for some reason beyond their control, their question gets protected? In this case, the author cannot self-answer their own question because of the minimum required reputation. If it is, then honestly, I feel bad for the author if they get penalized for something that wasn't their fault. Some may argue that this will defeat one of the objectives of protecting questions (from ):  Some questions are protected because they are expected to attract either spam or users -- often new users -- who may mistake the site as a traditional forum, posting "noisy" answers such as "thank you", "this worked for me", or "I'm also having the same problem".  (Emphasis mine) Honestly, I haven't thought that this might be a big issue (I observed many NAAs from random users, but from authors themselves, I found it rarer, as authors are prompted to edit or comment before they can self-answer). I could think of a new feature request to put answer-ban on particular question and by particular user, but that might be not feasible due to bigger change that might be too complex. If any of you have better suggestion about this, then feel free to chime in! I think this is similar to , but that question focuses more on the former 8-hour restriction for new users to self-answer.


How to use command on output of processed tail -f?

So I monitor some logs (/var/log/apache2/error.log) with the command tail -f, and only print the errors (grep ':error'). I combined both of these in a script (namely, watch_error_log.)  NB: I am part of the adm group.  So far so good.  But when I attempt more useful tricks, it won't work, such as :  $ while read APACHE_DEBUG_LOG; do echo "$APACHE_DEBUG_LOG"; done < <(watch_error_log) or $ watch_error_log | while read DEBUG_LOG_APACHE; do echo "$DEBUG_LOG_APACHE"; done;   Of course, my goal is not to ECHO the output. But If echo won't work, I know it is not because of the other program I want to use.  Why doesn't it work, and how can I make this work ?  After reading , I tried to add --line-buffered and everything's good.


Is there a mirror symbol for the $\neg$ symbol, or a symbol like $\vdash$ without the bottom part of the vertical line? I couldn't find it. Thanks.


In .NET why is String.Empty read only instead of a constant? I'm just wondering if anyone knows what the reasoning was behind that decision.


Operating System Not Found attempting to dual boot in Legacy

I'm seeing tons of similar questions but never this scenario, or at least not with a solution...  I have an Acer Aspire laptop, no optical drive, with Windows 10 installed. BIOS is set to Legacy boot, and Windows works perfectly.  I downloaded Ubuntu 15.10 x64 and put it on a USB stick after using DISKPART to prepare the drive. I want to dual-boot Windows and Ubuntu.  When I boot from USB in Legacy, I get "Operating System Not Found". I've tried changing USB ports and drives, using both FAT32 and NTFS when formatting, never makes a difference.  I change BIOS to use UEFI instead of Legacy, and the USB drive boots perfectly and starts installation. In the installation process, it tells me that installing Ubuntu in UEFI will hose my other operating system. I think it'll let me do a full wipe of the hard disk and install, but I want to keep my Windows partition.  I'm assuming that if I can just get the USB drive to boot in Legacy mode, everything will be fine, but I can't figure out how to do that. Otherwise, if I could change my Windows partition so that it's UEFI instead of Legacy, I assume that would work too.  Any way you can think of to do either of these, or any other solution?  EDIT  I wouldn't consider it a duplicate of the other question because I'm hoping to stay in Legacy mode so I can keep my Windows installation - that question is for a UEFI installation.


I want to setup my local development machine so that any requests for *.local are redirected to localhost. The idea is that as I develop multiple sites, I can just add vhosts to Apache called site1.local, site2.local etc, and have them all resolve to localhost, while Apache serves a different site accordingly.  I am on Windows XP.  I tried adding   127.0.0.1       *.local   to my c:\windows\system32\drivers\etc\hosts file, also tried:  127.0.0.1       .local   Neither of which seem to work.  I know I can set them up on different port numbers, but that is a pain since it is hard to remember which port is which.  I don't want to have to setup a local DNS server or anything hard, any suggestions?


Enable Bitlocker encryption on Windows 10 Home

Since this method does not work:  How do you encrypt a Windows 10 Home drive without unplugging it (the disk) and encrypting it on a separate Windows 10 Pro machine? And without resorting to installing a 3rd-party drive encryption software which is the usual recommendation for Windows 10 home machines.


Sequence: select site in drawer, select "tags", select one tag, select question. So I read question. Than I press Back. I'm expecting return to messages list, but I get list of tags.   App Version: 1.0.89 Device Manufacturer: LGE Device Model: Nexus 5X   OS Version: 7.1.1 (3425388)


Should I be at all concerned with seemingly arbitrary mass upvoting?

Every once in awhile, I'll see something like this:    Now, none of the questions are bad per se, but some of them aren't great either. A couple had unformatted code, and after years of using the site, are questions that I just wouldn't expect to be upvoted. It looks like someone just rolled a die and upvoted an arbitrary series of questions.   Is this something I should be at all concerned about? Should I flag any of them? My main concern is that if someone's sock-puppeting, mass up voting posts around their own could take the attention off of their post.


i recently installed Android Studio using this method ""   something wrong happened during the installation when i open the app it gave me an error loading the virtual phone inside the application i want to fully remove android studio and REinstall it again , I tried deleting the /android-studio folder along with the hidden /.android  I have tried   sudo apt-get remove android-studio  it says failed to locate the package .   i have tried all the methods here , i don't know maybe i did something wrong or i just jumped a step i don't know ! i'm trying to learn Linux but oh my god   unstoppable problems


How do you install mods for Euro Truck Simulator 2?

I have downloaded some new mods for the game (like trucks and skins for the trucks) and I have put them into the mod folder. They don't seem to work, though.  How do you install mods for this game?


Given: K and T are sub-sets of Linear Space V  and also $Sp(K) + Sp(T)$ is a direct sum, and $Sp(K \cup T) = Sp(K) \oplus Sp(T)$  I need to do show that $ K \cup T$ isn't necessary independent.  I said that: $ V = R^2, $ $K = \{(1,0),(0,1)\}$ ,$ T = \{(1,1)\}$  From here I can say that $Sp(K) + Sp(T)$ is a direct sum because their sum is V and their intersection is zero. and also, $Sp(K \cup T) = Sp(K) \oplus Sp(T)$ because their sum is $Sp(K \cup T)$ and their intersection is zero.  From here we see that $K \cup T = \{(1,0),(0,1),(1,1)\}$ but $(1,1)$ is dependent by $(1,0) $and $(0,1)$ which makes it not necessary independent.  The question is, did I prove it right, maybe my sub-sets are wrong and I need other ones? Or just adding $(0,0)$ to K and T is enough to show that there isn't necessary independence(which is a another solution)?


How to update YouTube video with an edited version?

I often need to edit my video and update the new version on YouTube, but on the same address.  It seems not possible, so is there a way maybe to create some automatic redirection feature from old to new address?


A rank-one matrix is the product of two vectors

Let $A$ be an $n\times m$  matrix. Prove that $\operatorname{rank} (A) = 1$ if and only if there exist column vectors $v \in \mathbb{R}^n$ and $w \in \mathbb{R}^m$ such that $A=vw^t$.    Progress: I'm going back and forth between using the definitions of rank: $\operatorname{rank} (A) = \dim(\operatorname{col}(A)) = \dim(\operatorname{row}(A))$ or using the rank theorem that says $ \operatorname{rank}(A)+\operatorname{nullity}(A) = m$. So in the second case I have to prove that $\operatorname{nullity}(A)=m$-1


How to Compile and Install qTox from GitHub on Ubuntu 18.04

I tried to look at similar threads. I don't understand the answers. How do I simply install this?  The recommended way would be to build from source, download  and run simple_make.sh  I don't understand how to run make.sh, where to direct it at etc. This OS is so darn difficult to use.


How to copy a folder to multiple folders using command line?

I want to copy a specific folder from one point to another and I have more the 300 destination folder where I want to copy that specific folder. Can anybody assist me with a proper solution?  shell script suggestion would be great.


Why default constructor call is required for an instance variable initialization from a parameterized constructor?

I have defined two constructors in my code  public SAPRoleImpl() {     dateParser=new SimpleDateFormat(MIDDAY_DATE_FORMAT);     dateParser.setTimeZone(TimeZone.getTimeZone("GMT"));     Calendar c=Calendar.getInstance(TimeZone.getTimeZone("GMT"));     c.set(Calendar.HOUR_OF_DAY,12);     c.set(Calendar.MINUTE,0);     c.set(Calendar.SECOND,0);     c.set(Calendar.MILLISECOND,0);     setStartDate(c.getTime()); }  public SAPRoleImpl(String formattedRole) {     this();     ... }   When I execute the below code:  public static void main(String[] args) {     SAPRoleImpl sapRole = new SAPRoleImpl("abc|abcdesc||");     System.out.println(sapRole); }   It gives this output  :abc|20170127||   This is as expected. But when I want an output of only  abc|||   i.e no start date is to be initialized, I tried this code:  public SAPRoleImpl() { }  public SAPRoleImpl(String formattedRole) {     this();     ... }   This led to a NullPointerException. Probably, It seems that the startdate is null but I am not able to understand the reason behind the same.      Can any one please help me to understand?


I'm looking for mathematics books, courses + exercises for high school level. My daughter was high school certificated but she has stopped her studies for 5 years. She would like to be involved in new educational program but she needs to restore her mathematic capabilities.  Could you help me to identify which mathematics books can help her?  Thanks a lot for your reply,  FR.


Prove $\mid$x-1$\mid$+$\mid$x+5$\mid$ $\ge$ 6 for all real numbers

I need to prove it with proof by cases. I graphed it out and it seems that I need to put into 2 cases which is when x$>$1 and x$>$-5. But this where my problem is, how do plug that back into the statement? Would it just be calculating (x-1)+(x+5)?


ID for Contact portion of Person Account

Is it possible to get the ID of a Contact which is part of a Person Account?  I have a custom object which has a custom field referencing the Person Account, though it seems to be referencing the Contact directly. I have created a button which I am using to pass the ID into a Visualforce Page.  With the Insert Field drop-down on the create/edit button page I can put in {!Account.Id} or {!Contact.Id} but neither of these work. The Account ID is placed in the URL but is not the correct ID and the Contact ID is blank, which I assume is because the button is on a Person Account page and not a Contact Page.


Adam lay ybounden. Any ys around these days?

Thanks for pointing out the similar question. Great, but note that I'm trying to find ...  • is there any SPECIFIC examples/evidence around of yword yusage TODAY?  • other than jokey usage, is there any fresh and real usage?  • nobody has explained, simply what period was it popular? (if at all - or was it just an artifact or something?)  • and indeed, what ywere the Top Three Yword greatest hits?  Cheers!    I made an ybounden the other day,    and it brought to mind the questions:  These days, are there any words which use the y- prefix?  What is the origin of this prefix?  In what period was it popular?   What were, at that time, other popular words with the y- prefix?  Is it perhaps today still popular in other (European?) languages - which?  Is the whole thing just a typo/artifact? What's the deal?  But mostly ........ are there any ywords popular today?


How to expand the size of the root partition

I want to expand the root partition by 10 GB, how can I do this?


Capture characters from standard input without waiting for enter to be pressed

I can never remember how I do this because it comes up so infrequently for me. But in C or C++, what is the best way to read a character from standard input without waiting for a newline (press enter).  Also ideally it wouldn't echo the input character to the screen. I just want to capture keystrokes with out effecting the console screen.


ExpandableListView null object Reference

I have an ExpandableListView in my Fragment that shows some data. I call the Fragment when i press an icon.   public void searchClick(){         Fragment frag = new Results();          FragmentTransaction ft  = getSupportFragmentManager().beginTransaction();          ft.replace(R.id.FragFaecher,frag).commit();            displayList();       }   displayList() then should populate the List and show it  public void displayList(){         populateList();          expList = (ExpandableListView) findViewById(R.id.expList);         listAdapter = new ExpListAdapter(MainActivity.this,parentList);         expList.setAdapter(listAdapter);      }   In FragmentClass the Layout with the ExpandableListView is inflated within the fragment_results Layout  public View onCreateView(LayoutInflater inflater, ViewGroup container,                              Bundle savedInstanceState) {        View rootView = inflater.inflate(R.layout.fragment_results, container, false);           return rootView;     }    fragment layout:    <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"         android:layout_width="match_parent" android:layout_height="match_parent"         android:id="@+id/results"         android:paddingBottom="@dimen/activity_vertical_margin"         android:paddingLeft="@dimen/activity_horizontal_margin"         android:paddingRight="@dimen/activity_horizontal_margin"         android:paddingTop="@dimen/activity_vertical_margin"         android:background="?android:colorBackground"         android:clickable="true">          <ExpandableListView             android:layout_width="wrap_content"             android:layout_height="match_parent"             android:background="?android:colorBackground"             android:childDivider="#000000"             android:id="@+id/expList" />       </RelativeLayout>   I suppose the problem is, that the displayList() method tries to find a View that is not yet created. I tried to return a boolean when the View was created, but that did not work. Is there any other possible way to prevent this from happening?


I have been reading about bluetooth earbuds a lot but can't get my head around few things so asking them here. I got my new Soundcore Liberty Air 2 Pro wireless earbuds couple of days ago and connected them to my Android phone and they sound amazing both for music and calls. Problem starts when I connect them to my work PC for zoom conference calls. From what I understand, the only way to use them for calls is to use HSP/HFP profile and they sound awful with that. My questions:  Is there any workaround/hack to make them sound better for zoom voice calls? I have updated my BT and all other drivers on PC.  Since these earbuds have ANC, how does that function on HFP profile? I tried couple other earbuds and notice that anything with ANC sounds worse and very loud when using HFP on Win 10.. why is that?  Is HFP a Win 10 limitation since Android voice calls sound amazing? What is Android using then and is there any way to use that on Win 10?   Thanks!


How to show that $S^2$ is a symplectic manifold? What is the symplectic structure on $S^2$?


I want to use the \ast asterisk in my document. However in the PDF there is no more space after the occurrence of the star, and LaTeX wants to cram all the following text in one line which obviously isn't working. It is not only the subsequent space, it is all the spaces in the rest of the document which get ignored. So this leads to the error -Overfull \hbox The issue seems to have something to do with "Math Mode" because all LaTeX commands after the \ast will get the Warning: Command xy invalid in math mode  Is \asteating spaces?  \documentclass[a4paper,12pt,ngerman]{article} \usepackage[utf8]{inputenc} \usepackage[ngerman]{babel} \usepackage{textcomp}  \begin{document}  text text text John Doe (\ast 1958) text text text text text text text text text text text text text text text text text text text text text text text text text text  text text text text text text text text text  \end{document}


Is a limited space-time hierarchy theorem correct?

Is a limited (deterministic) space-time hierarchy theorem correct? For example, we have a limitation of $O(n^2)$  space then: can we find problems that can be solved in $O(n^k)$ time and $O(n^2)$ space, but that have no algorithms that run in time $O(n^{k-1})$ and $O(n^2)$ space?


how to pass parameter to shell script to use as part of variable filename

I am trying to programmatically call from my java program a shell script that in turn executes a command depending of the parameter sent.  the command to be executed inside the connectvpn.sh shell script is:  echo myrootpassword | sudo -S /usr/local/Cellar/openvpn/2.3.8/sbin/openvpn --config /usr/local/etc/openvpn/1.opvn   or  echo myrootpassword | sudo -S /usr/local/Cellar/openvpn/2.3.8/sbin/openvpn --config /usr/local/etc/openvpn/2.opvn   and so on from a long list, where the filename number I want to be variable depending on the value of the parameter received  So I want my java program to be able to use always the same shell script but use different .ovpn file depending on the parameter sent.  I believe that on my java program I have to call it something like this:  server_number = 1;      ProcessBuilder pb = new ProcessBuilder("./connectvpn.sh", server_number); Process proc = pb.start();   What would go in the shell script so that the filename called is variable and for the example shown it uses 1 but other times it uses whatever number is sent as parameter?  Thank you very much!


What would be the easiest way to UV map a complex object?

I'm attempting to make a texture for a model i've been working on, so i've been trying to get a decent UV map, However whenever I do it usually ends up either very distorted or a lot of unrecognizable pieces or several different UV maps. What are some easier ways of unwrapping/UV Mapping?


Equivalent RSA modulus for NIST P-192 and P-521 elliptic curves

At www.keylength.com, I found the following table of ECC field size and the corresponding RSA modulus recommended by NIST.   ECC Modulus  RSA Prime Size  160             1024  224             2048  256             3072  384             7680  512             15360  But NIST proposed P-192, P-224, P-256, P-384, P-521 curves. May I know what is equivalent RSA modulus for P-192 and P-521 curves?


From trajectory of GPS points to multiline segment?

Given a trajectory as a sequence of GPS points I would like to create a smooth linestring representing a path where a car drove. The data is stored in postgresql: the input trajectory in a table, where each row represents an individual GPS point, the output in a table, where each row represents the whole smooth tragectory. All points are stored in WGS84.  My approach for this would be the following:   implement everything in C++ retrieve the whole trajectory from the DB, convert it to UTM32N (as this is where the trajectories are coming from), flatten the points with the help of GDAL library compute a some sort of approximate spline linearize the approximate spline transform it back to WGS84 send the data back to Postgres   What would be the best tools/libraries to use for approximate splines and linearization?   Java/C++/Postgis solutions are preferable, as currently we are using only these subsystems.  I suppose this is a very common task people need to do in gis environment, however I haven't found close matches to similar questions on gis stackexchange.  An alternative would be to:   collect all points into linestring ST_LineToCurve  apply Bezier smoothening to the curve ST_CurveToLine


How to add shapefile as layer to map using Python and ArcPy?

I am working on an application and I am a beginner in Python :(  I want to add a shapefile, the execution is successful and everything but no result appears on ArcMap, here is the code I use:  import arcpy  try:      mxd = arcpy.mapping.MapDocument("CURRENT")      df = arcpy.mapping.ListDataFrames(mxd)[0]       newlayer1 = arcpy.mapping.Layer(E:\DATA SF\SFcircuit\shape_zizo\batiment.shp")     print newlayer1     arcpy.mapping.AddLayer(df, newlayer1, "TOP")        arcpy.RefreshActiveView()     arcpy.RefreshTOC()      # save the map to persist the added layer     mxd.save()    except Exception as ex:     print ex.args[0]


If I evaluate a surface $f$$($$x$$)$, that is subjected to a constraint $g$$($$x$$)$, for it's maximum and minimum values using Lagrange Multipliers then how do I know that the solution that is found is maximum or minimum. For example $f$$($$x$$)$= $x^2$+$y^2$+$z^2$ and $g$$($$x$$)$=$x^3$$y^2$$z$=  $6$$\sqrt{3}$ The solution using Lagrange multiplier is ($\sqrt{3}$,$\sqrt{2}$,$1$) But is this point a maxima or minima?


A vector space over $R$ is not a countable union of proper subspaces

I was looking for alternate proofs of the theorem that "a vector space $V$ of dimension greater than $1$ over an infinite field $\mathbf{F}$ is not a union of fewer than $|\mathbf{F}|$ proper subspaces" and possible generalizations.  A simple measure-theoretic proof over $\mathbb{R}$ is as follows: By countable additivity the sum of the measures of any collection of subspaces is zero since the measure of each subspace is zero, which is a contradiction.  I would like to look at proofs over arbitrary infinite fields and would like to know if similar statements hold for say modules (finitely generated or otherwise) over infinite rings.


Now I'm abroad, and my girlfriend is still in my country, her birthday was two days ago and I said " If I were there, I would do everything I could to pamper you" Is that the correct usage of If I were or I should have said If I was? Thanks in advance


I know nothing, and the related answers I read are not intelligible to me. Do I have to be Linux literate before I try to install Ubuntu? Sounds like a ton of work and time. Is it possible otherwise? This is what I tried: I downloaded, from ubuntu.com, version 20.04. When I looked into downloads, I found version 18 something! Even so, I clicked right on it to run it; I thought it is the way to install it, as I have done before with other things. The prompt didn't show me any software/program with which to run/open it. I have downloaded Rufus, as one tutorial indicated. What do I do? Thank you in advance.


While Loop If Statement Check won't read my scanner input?

when I input any number into my scanner, it returns the else statement ALWAYS, and i'm stuck in an infinite loop. Can anyone help me out? I need to make the storyChoice variable String, and not Int because I plan on adding more else if statements that require the user input to be a string.       String storyChoice = keybd.next();       //This loop checks the scanner to see if the user has inputted an      //appropriate answer, as soon as the user inputs an appropriate answer     //The while loop terminates.      while(storyChoice != "1"|| storyChoice != "2" || storyChoice != "3")      {         if(storyChoice == "1")         {             Sword story = new Sword();             story.intro();             break;          }         else if (storyChoice == "2")         {             System.out.println("Not coded yet, so stay tuned!");              break;         }         else if(storyChoice == "3")         {             System.out.println("Not coded yet, so stay tuned!");              break;         }         else         {             System.out.println("Please choose an appropriate answer");              storyChoice = keybd.next();          }     }   Thank you.


Is it possible to prove that $\text{tr}(AB)=\text{tr}(BA)$ without using matrices?

Is it possible to prove that $\text{tr}(AB)=\text{tr}(BA)$ without using matrices or having to choose a particular base ?  Such a proof should probably use a non matricial definition of traces. One could say for example that $\text{tr}(A)$ is the linear coefficient of the characteristic polynomial $\det(A-X\text{Id})$. In case the latter doesn't satisfy everyone, here is a definition of trace suggested in Halmos's Finite Dimensional Vector Spaces. Let $E$ be a $n$-dimensional vector space over some field $k$. We recall that the space $W$ of alternating $n$-linear forms $\omega: E^{n}\rightarrow k$ is one dimensional over $k$. Given an endomorphism $f$ of $E$ we can define the linear application \begin{align*} \bar{f}:\quad W &\rightarrow W \\ \omega(x_{1},x_{2},...) &\mapsto  \sum_{i} \omega(x_{1},...,x_{i-1},f(x_{i}),x_{i+1},..) \end{align*} Since $W$ is one dimensional $\bar{f}=\lambda Id$. We set $\text{tr}(f)=\lambda$.  The analog definition of the determinant easily yields $\det(AB)=\det(A)\det(B)=\det(BA)$, but this no longer works here. One could fix a base $e_{1},e_{2},..,e_{n}$  and do the calculations but this would kind of beat the point, since it is essentially the same as computing with matrices.


No wifi adapter found lenovo ideapad-130-15IKB

Recently, I updated my ubuntu, and when restarting my computer, I noticed that my wi-fi was not working. I entered to my settings menu, I found no wifi adapter found. I encountered before this problem and corrected it. When typing the command uname -r I noticed that my kernel was upgraded to 5.3.0-28-generic. when typing lspci -knn | grep Net -A3; rfkill list I get this :  02:00.0 Network controller [0280]: Realtek Semiconductor Co., Ltd. RTL8821CE 802.11ac PCIe Wireless Network Adapter [10ec:c821]     Subsystem: Lenovo RTL8821CE 802.11ac PCIe Wireless Network Adapter [17aa:c024]     Kernel modules: wl 0: ideapad_wlan: Wireless LAN     Soft blocked: no     Hard blocked: no 1: ideapad_bluetooth: Bluetooth     Soft blocked: yes     Hard blocked: no 2: hci0: Bluetooth     Soft blocked: yes     Hard blocked: no   How could I possibly correct this?


How to create a bootable USB with Windows?

How would I go about creating a CentOS 7 bootable USB drive with Windows? I've read  and it says that Unetbootin and Universal USB installer won't work for CentOS 7. In addition, I've already tried dd for Windows, and that didn't work properly either - booting from the USB drive resulted in a "Machine Check Error".


Equation for testing if a point is inside a circle

If you have  a circle with center (center_x, center_y) and radius radius, how do you test if a given point with coordinates (x, y) is inside the circle?


Using JQuery UI datepicker inside UpdatePanel

I'm trying to use UpdatePanel control and Jquery UI for date picker. But if date picker control (TextBox) is inside UpdatePanel's ContentTemplate, then date picker does not works.  Here is the code:   <script src="Scripts/jquery-1.4.1.js" type="text/javascript"></script>     <script src="Scripts/jqueryui/js/jquery-ui-1.8.8.custom.min.js" type="text/javascript"></script>         <script language="javascript" type="text/javascript">          $(function () {             var dates = $(" #txtDatePicker").datepicker(             {                 firstDay: 1,                 maxDate: '-1y',                 minDate: '-1y',                 dateFormat: 'dd/mm/yy',                 changeMonth: true,                 changeYear: true,                 showAnim: "drop",                 onSelect: function (selectedDate) {                     var option = this.id == "txtDatePicker" ? "minDate" : "maxDate",                     instance = $(this).data("datepicker");                     date = $.datepicker.parseDate(                         instance.settings.dateFormat ||                         $.datepicker._defaults.dateFormat,                         selectedDate, instance.settings);                     dates.not(this).datepicker("option", option, date);                 }             }             );         });       </script>       <asp:UpdatePanel ID="UpdatePanel1" runat="server">     <ContentTemplate>     <asp:TextBox ID="txtDatePicker" runat="server"></asp:TextBox>     </ContentTemplate>     <Triggers>         <asp:AsyncPostBackTrigger ControlID="btnSomeButton" EventName="Click" />     </Triggers> </asp:UpdatePanel>   Is there any way to use JQuery UI datepicker inside UpdatePanel content?


Strange spacing when putting a math macro before a binary operation

I found there to be very odd spacing when using a math macro just before a binary operation. Here is a minimal example:  \documentclass[11pt]{article} \usepackage{amsmath} \DeclareMathOperator{\id}{id} \begin{document}  $x\otimes \id$  $\id \otimes x$  \end{document}   produces    I am aware that sometimes a macro "eats up" the space after it, requiring that we put it in braces or put a \ after it, but I wouldn't have expected the space after the operation to be what is affected. Can someone explain what is going on, and how I could set this up differently so that the spacing will turn out correctly?


The question about the correct use of there is vs there are pops up quite often.  However I couldn't find any reference to a case similar to the one below. My wife is writing a crochet pattern with the following sentence:  Count the stitches all around - make sure there is an odd number of stitches.  Word's grammar correction tool suggests: make sure there are an odd number of stitches.  I myself find the "there are" version more pleasing to the ear. However I think my wife is correct in stating that the subject should be considered to be odd number of stitches and not just stitches.  Which is correct?


How can I upgrade my Ubuntu 10.10 to 12.04?

I currently have an Acer Aspire dualbooting with Windows 7 and Ubuntu 10.10. I would like to have the advantage of Long Term Support that 12.04 provides and would like to upgrade the Ubuntu 10.10. My computer's memory is partitioned so that it is roughly 90gb for windows, 90 for ubuntu, and the rest(roughly 120gb) i use as a sort of "Shared space" so I can save and access files from both OS. I just want to know how to do the upgrade without ruining this set-up.


Providing fake info during domain registration - does it matter?

As you are all most likely aware already all domain registrars ask for your personal information.   Such personal information includes:   Forename and surname Address information Email address Telephone number   Personal information via WHOIS  Depending on the domain type such as  or  this information may become immediately available after the registration of the domain via a simple whois. If you do not want that (and in most cases you certainly don't) they offer a service where you can remove this information from the whois service but of course hiding your personal information adds yearly costs to the domain  purchase.  What happens if I use fake details when registering a domain?


I have used this code to generate root, if output is not integer it should return -1.  #include <stdio.h> #include <math.h> int main(){     long int n=0;     long int num,p,reti;     double ret;     scanf("%ld",&n);     while(n!=0){         scanf("%ld %ld",&p,&num);         ret=pow(num,(double)1/p);         reti=(int)ret;         printf("%lf %lf\n",ret,(double)reti);         if(ret!=(double)reti){             reti=-1;         }         printf("%ld\n",reti);         n=n-1;      }     return 0;  }   but if I give input as  1 5  3125   it should give 5, but it is giving -1.


The meaning of notation $\subset\subset$ in complex analysis

I have read the book Function Theory of Several Complex Variables of Krantz. But there is a notation the meaning of which I don't know. The notation is $\subset\subset$. For example, "let $\Omega\subset\subset \mathbb{R}^{n}$ be a connected open set".    Can somebody give me a definition?


How do I get the location consent prompt back

I have a Samsung Galaxy S3 and I do not mind when the location consent screen pops up when I turn on GPS, in fact I prefer it As I always choose disagree  The one that says "allow google's location service to collect anonymous data... etc "  Yesterday I hit agree and now the prompt does not come on when I turn on GPS. In the past, if I went to location services and turned off high accuracy mode (GPS Only) it would bring back the prompt so I could disagree again.  Does anyone know how to get this prompt back (Get the dialog box back). I have tried resetting app preferences to default, disabling google app services, google play services, clearing the cache, opening location services and selecting GPS ONLY then re-enabling the google app and google apps, but nothing has worked..  I do NOT want to share anonymous information with google so I need this prompt back. Also - Is there a way to get Location Services to default to GPS only instead of High Accuracy?  This is the opposite of THIS problem


Can I apply for a Schengen visa at a consulate of a country I don't really intend to visit? Is such visa shopping acceptable?

We are proposing to visit Italy at the end of May. However the appointment with Italy is not possible till the end of May for the visa interview. We are getting an appointment from the French embassy for a visa. If we get the visa through the French embassy, can we go to Italy without touching France?  We do not intend to visit France at all.  From Italy we propose to go to the UK.


Explain the formula of energy in signal processing

Please, give me intuitive understanding of this formula ():      So t is time, x(t) - signal function, integral is sum of this function on the whole x-axis, but:   why we need square ?  what does mean dt (why not dx) ?


Acquia Desktop & MAMP: No Drupal site found, only 'drush' cache was cleared

Usually I use MAMP for my local development server which already has all of my shortcuts and stuff configured the way I like it.   A client was on Acquia Cloud and to prevent conflicts with other developers we are all using the Acquia Dev Desktop for local. Acquia Dev Desktop comes with Drush within its own package.  When running my drush cc all I was getting the following error:  No Drupal site found, only 'drush' cache was cleared  After running drush status I noticed that Drush was trying to use my MAMP version of drush and thus resulting in no site found.


There is so much (that) is at stake for many.   Can we omit 'that' in this sentence?


This is a program to copy string1 to string2 from K&R book.  #include <stdio.h> void strcpy_m(char *t1, char *t2);  int main() {     char *s1 = "this is 1st";     char *s2 = "this is second";     strcpy_m(s1, s2);     printf("%s\t%s\n",s1, s2);     return 0; }  void strcpy_m(char *t1, char *t2) { while((*t2 = *t1) != '\0'){     t2++;     t1++;    } }   On executing this program I got segmentation fault. What is the reason?


In init method in a class I want to read keys as self.key from a dict kwarg and assign values to them. Look at code to understand.  class Abc:     def __init__(self,**kwarg):         for key,value in kwarg.items():             self.key = value obj = class(name = 'josh', age = 23, country = 'UK') print(dir(obj))   obj has only key attribute. I get it why it has key. But I don't know how to read keys to self.key? I think you can get the question. What I except is obj must have name, age, country attributes


Blender Python Property change event - Execute function?

i am wondering if it is possible, to execute a function if the user changes a custom property of an object?  For example, i create a custom property "MyInt" for every selectable object in the scene. This property defines the rotation of the object from the center point. If the user now changes the property i want the object to spin around the center. For that reason i would like to know if it is possible to react to a "property-change" event and move the object accordingly to the property value?  My code:  import bpy from bpy.props import *  bpy.types.Object.MyInt = FloatProperty(     name="Rotation in °",     min = -180.0, max= 180.0,     default = 0)  class Panel(bpy.types.Panel):     bl_label = "Object Rotation"     bl_space_type = "PROPERTIES"     bl_region_type = "WINDOW"     bl_context = "render"      def draw(self,context):         layout = self.layout         col = layout.column()         col.prop(context.active_object, "MyInt")         return  def register():     bpy.utils.register_module(__name__) def unregister():     bpy.utils.unregister_module(__name__) if __name__ == '__main__':     register()


Where does my mass go when i lose weight?

Presuming conservation of mass to be true, mass has to go somewhere if i lose weight. Doing workout i burn my fat to do some work but then where does that fat go?


How do you set password-hash for OpenLDAP?

I have the following version on Ubuntu 12.04:  OpenLDAP: slapd  (Sep 19 2013 22:49:31) $ buildd@batsu:/build/buildd/openldap-2.4.28/debian/build/servers/slapd   OpenLDAP now offers SSHA as the default hash. I want to use a different hash. Yet, old tutorials are based on editing /etc/ldap/slapd.conf which is gone in newer version of OpenLDAP. Which file should I change?


So, we know why Dana and Louis act so , but that leads me to ask, was Louis Tully ever stalked in the same way Dana was? Perhaps not having Zool fry his eggs for him, but was there a little more investigation prior to possession?  I know this information isn't in the first film, but is it ever mentioned in interviews, comments try, novelisations etc.?


How do I mark text as never to be emphasized?

An \emph inside another cancels the emphasis.  But what if I want to make sure something is never emphasized, even if the surrounding emphasis is removed?  \textrm doesn't turn off ItalicFeatures defined for the font family.


I am trying to open a TTY by Ctrl+Alt+F1 combination, but instead, I see the Ubuntu login screen, like if I have just logged out.  It is a problem for me as I'd like to run twm instead of Gnome, but I just can't access the tty. SOLVED: Ctrl+Alt+F5 was the combination I needed to access terminal "out of" X.


How to debug this C code for a stack implementation?

I am new at C programming. I wrote some code for a stack exercise. The question is: one of the result is wrong, but when I debug step by step, the number changed abruptly. Could you help me solve this?  // @name mystack.c // Created by lilei on 2017/3/10. // #include "mystack.h" #include <malloc.h> #include <stdio.h>  Stack createStack(){     Stack stack = (Stack)malloc(sizeof(Stack));     stack->top = -1;     return stack; }  int isFull(Stack s){     if (s->top == MAXSIZE-1){         return 1;     } else{         return 0;     } }  int push(Stack s, ElementType item){     if(!isFull(s)){         s->top++;         s->data[s->top] = item;         return 1;     } else{         printf("full!");         return 0;     } }   int isEmpty (Stack s){     if(s->top == -1){         return 1;     } else{     return 0;     } }  ElementType pop(Stack s){ if(!isEmpty(s)){     ElementType e = s->data[s->top];     s->top--;     return e; } }  void myPrintf(Stack s){     int len = s->top;      printf("The data are ");    while(len >= 0){         printf("%d ", s->data[len]);         len--;     }     printf("\n"); }  int main(){     Stack s = createStack();     for(int i = 0; i < 7; i++){         push(s, i*2);     }     myPrintf(s);      printf("isEmpty:%d, isFull:%d\n, pop one:%d", isEmpty(s), isFull(s), pop(s)); }   The result is


I'm currently creating a database and I'm facing a little issue. I want to add a column containing the date. So I create it like this :   create table comments (     id serial not null,     id_user integer not null,     content text not null,     id_thread integer not null,     date date default now() );   The problem is that the date is just like this : 14-06-2017 and I want to have the hour of the creation.  How I can do that ?  Thanks in advance


javascript extends class get all the properties

How can I get all the properties from extends class? class Fish {   constructor(name) {     this.name ="this is the name"   } }  class Trout extends Fish {   constructor(name, length) {     super(name)     this.length = "10cm"   } }  let newFish =new Trout() console.log (newFish.name) console.log (newFish.length)  Is there any way to get in a loop to get name,length,etc what every set it in the extends classes? console.log(newFish[0]) something like that


Can a keeper pick up the ball after receiving the ball with his feet?

Say the attacker is actively pressing the keeper. I have seen in situations keepers picking up the ball but I am not sure of the exact rules.


Why is the Star Trek 2009 reboot called a reboot?

Doctor Who (2005) isn't called a reboot. It is called a continuation of the old series. This was made possible by that regeneration ju-ju and stuff.  On the other hand, Star Trek 2009 reincarnation is often called a reboot. Nobody dared call it continuation. I don't think I need to do citation because it's common.  Now, if we actually go into the details:   The new universe contains two Spock. One is from the original timeline. The Spock Prime even gives data from the original timeline like trans-warp equation, Khan etc. We see other past data from before the timeline diverged. For example, Scott told that he transwarped Admiral Archer's dog. "Archer's dog" existed in Star Trek: Enterprise TV series.   So, why didn't the legacy survive in-universe? Why isn't it considered a continuation of the old Star Trek TV shows and movies?  Or, is the reboot word used by mistaken fans and media only?  Update: After the release of Star Trek: Beyond (2016), this is no longer a confusion as the movie showed a photo from original timeline.


Simple way to limit decimal places to two places

public static void main(String[] args) {//begin main     Scanner worksheet = new Scanner(System.in);        {         double radi;         double area;         double circum;         double pie = 3.14;          System.out.println("Enter the radius: ");         radi = worksheet.nextDouble();//enter 1.2           area = pie * radi * radi;   Area comes out as 4.521599999999999, but I want it to be 4.52.          System.out.println("The area is:" + area);          circum=2*pie*radi;   circum comes out as 7.536. want it to be 7.53          System.out.println("The circumference is:"+circum);      }   How can I truncate the value to 2 decimal places without a method.


What is the difference between "trans" and "inter" prefixes? For example what how does "trans-disciplinary" differ from "inter-disciplinary"?


A characterisation of quadratic extensions contained in cyclic extensions of degree 4

Let $D$ be a squarefree integer. I am trying to prove that $\mathbb Q[\sqrt D]$ is contained in a Galois extension of $\mathbb Q$ with Galois group $\mathbb Z/4$ if and only if $D$ is the sum of two squares, $D = a^2 + b^2$ with $a,b\in \mathbb Q$.   The hint in the exercise in Dummit and Foote suggests considering the extension $\mathbb Q[\sqrt{s + s\sqrt D}]$ for the forward direction. However, I am unsure how to show that this extension is Galois, much less that its Galois group is cyclic of order 4.   For the reverse direction, I expressed the given Galois extension as $\mathbb Q[\sqrt{a+b\sqrt D}]$ for some $a,b\in \mathbb Q$. I showed that this extension has $\mathbb Q[\sqrt{c^2 - d^2 D}]$ as a subfield for some $c,d \in \mathbb Q$. From this, I deduced that the $\sqrt D$ and $\sqrt{c^2 - d^2 D}$ generate the same extension, so $\sqrt D = x \sqrt{c^2 - d^2 D}$ for some $x$, and hence that $D = \frac{x^2 c^2}{1 + x^2 d^2} $. It seems that there should be a way to decompose this as a sum of two squares, but I did not see how.   I did not tag this as homework as I am studying it independently.


I need an adjustment layer which will invert in the same way as when you select some text in a text layer

so there are some idiosyncrasies with the method they use to invert that part of the image which I can't figure out. It could be that they just invert the luminosity but I don't know how i would do that in a dynamic way.


Getting ThunderBird installed on Ubuntu 14.04

OK I'm new to linux, and so there's a learning curve. But, although I worked for years with unix ksh production scripts and user support, at the moment I need to take another break.  I first installed 14.04 64-bit last week and just yesterday got past numerous stop/startovers to a system that seems(!) to work OK with one additional app installed. So now I'm encouraged. Breakthrough. Learned some things. Surely a popular package like TB won't be a problem. Not so, but far otherwise....   from Mozilla doesn't do much after a download. It points to another page for installing onto 10.10, but that page assumes that a version of TB is already installed.  For using a package manager, the page above simply refers you to the documentation of the Linux distribution you're using. I used a PPA for java yesterday for my other app.  Is that the same thing? Where is doc that explains them and how to use them on 14.04? Web search hits return all kinds of commentary, but there are 47 ways to do everything (a good thing, but...), not all of the doc is complete (assumes other knowledge), and some refers to older versions (10, 12, etc.). It makes sense to me that this function would work the same across versions, but what I assume/makes sense to me isn't always right.  For installing outside a package manager, it gives a link to a list of the libraries needed -- but no indication how to get them. Apparently I need those, because I downloaded TB per those instructions, ran ~/thunderbird/thunderbird, and nothing happened. I don't see an icon for it, either, which it seems is done by a package manager and which might be obtainable by other means -- but at this point I just want to get it working at all. The directory and files are there, but...nothing. Thought TB might be popular enough to be part of ubuntu. I'm not interested in any of the numerous apps in Launchpad, but I didn't see it there or in the Software Center.  Then this morning, looking for more info with yet more search strings, I see a comment that TB is "stock in 14.04" (not just "Lucid Lynx"?) and to wait a few days for a "push" from Canonical. That sounds promising, but what does that mean in practice? Is it available somewhere in the 14.04 (64-bit) that I just installed?   What do I need to do next? I only have the native 14.04 (64-bit) installed plus one other app. Not interested in Launchpad, if that matters.


What would be the roots of the derivative of this polynomial

I got this $$ f=a(x-1)(x-2)...(x-101) $$ knowing a and that $1 ,2 \ldots ,101$ are it's roots ... I need the roots of $f'$ , how should I do it ? More specifc how can I derivate a polynomial like that, is there a formula or something ?


When I open Google Chrome on Windows 10, it crashes the system almost instantly, why?

TL;DR  When I open Google Chrome on Windows 10, it crashes the system almost instantly.  In detail: My laptop stops responding (freezes) and I can hear louder cooling (supposedly higher CPU usage due to system dump generation). Then, I long press the power button.  All other installed browsers (Edge, Internet Explorer, Firefox) work OK.  How can I debug this?  Long version  I haven't used Windows in a month or so.  I work on Linux, but I have a Windows 10 too for Blu-ray playback mostly.  Current Windows 10 version:  1709 (OS Build 16299.248)   I have just manually installed the latest update from :  windows10.0-kb4058258-x64_69f87cf7f2ea83509d5e61ba2d525a103a6d64f9.msu   The installation was successful, although the problem persists.  I have also manually downloaded an updated version of Google Chrome and successfully installed it:  64.0.3282.140 (Official Build) (64-bit)   I have also disabled Fast startup by setting the following registry key to 0:  Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Power\HiberbootEnabled   And checked the file system with:  chkdsk c: /f   How can I debug this?    EDIT1:    I tried Anonymous mode, the same result. Strange is, after some boot, it does not crash. I'm confused and irritated.    EDIT2:  I have just turned on  not only for services but for everything:    It didn't have any effect, just tried it. Leaving it enabled.    EDIT3:  I cannot switch user profile, as it crashes instantly my OS. Though, I tried Anonymous mode, with the same result.    EDIT4:  I ran these commands with all good results, no corruption detected and such, from PowerShell:  DISM.exe /Online /Cleanup-Image /ScanHealth DISM.exe /Online /Cleanup-Image /CheckHealth DISM.exe /Online /Cleanup-Image /RestoreHealth   Afterward, I have scanned the OS with SFC utility for any violations. Again, no result.  C:\WINDOWS\system32> sfc /scannow Beginning system scan.  This process will take some time. Beginning verification phase of system scan. Verification 100% complete. Windows Resource Protection did not find any integrity violations.   EDIT5:  As of this moment, I am scanning my system with , which I had installed since the system has been started using time-to-time, I have an SSD and a HDD, I will report back.  EDIT6:  I am still in progress with , but I have finished scan with , with no results, tracks only. I had this software installed since the same time I use Windows 10 with  too.  EDIT7:   did not find any malware. I am now up to running  over night in safe mode. Will get back to you tomorrow with results.  EDIT8:   did find 11 instances of malicious files. Removed 7 of them. Currently I'm looking for a good AntiVirus and AntiSpyware software, maybe better than  to run in trial mode or freeware tool to remove this mess.  EDIT9:  I have found several high quality solutions like , which I have just purchased. Many others are running.    As you can see, my CPU has a lot to do right now, I will get back.


Last week, I tried to suggest an edit for a question on a Stack Exchange site on which I did not have an account. I say "tried," because the button for "improve this question" was missing. I , but I don't see that anything happened.  Today, it happened again. And now I have pictures:      For comparison, this is what you're supposed to see.      However, not every question on History is affected:      I'm using Chrome 56 and Windows 10 (no available updates for either). The issue persisted when I opened the page in incognito mode, and also when I opened it in Firefox.  This is only the second time I've noticed it, but this bug seems to like beta sites.    PS Will someone with a History account and sufficient rep please fix the their/there error in the first sentence of the last paragraph? Thanks.


How can I get ubuntu 18.04 to use my high resolution video card

I have a higher resolution card but Ubuntu will only use the lower res imbedded on the MB. The higher res one is a Nvidia GeForce windows ver 340.52


After deleting a post on Stack Overflow, why am I still able to see it? It is just flagged as Deleted. Will that post be visible to others, or just to me? Also, does that mean that the post will be deleted after certain period of time, or there is some other reason why it’s still there?


why is the for loop inside the if statement not executing?

Is the statement if how_many == int: not valid? The code after that block is not executing.  from random import randint  print('Code Generator') print()  def generator():     how_many = int(input('How many digits? '))     print('Code is: ', end='')     if how_many == int:         for number in range(how_many):         number = randint(0, 9)         print(number, end=' ')    else:         print('Enter a number')         generator()     print()    again = input('Again?(Y/N): ')    if again.upper() == 'Y':        generator()    else:        print('Goodbye!')        exit()  generator()


How to gather byte occurrence statistics in binary file?

I'd like to know the equivalent of   cat inputfile | sed 's/\(.\)/\1\n/g' | sort | uniq -c   presented in  for production of character usage statistics in text files for binary files counting simple bytes instead of characters, i.e. output should be in the form of   18383 57 12543 44 11555 127  8393 0   It doesn't matter if the command takes as long as the referenced one for characters.  If I apply the command for characters to binary files the output contains statistics for arbitrary long sequences of unprintable characters (I don't seek explanation for that).


I have some yeast listed as yeast for pizza. It says not recommended for bread making. Will it work for bread or angel biscuits?


Do I need a transit visa for Don Mueang Airport(DMK), Bangkok

I am an Indian citizen travelling from Chengdu, China to Mumbai, India on Thai Lion Air.  My itinerary is as follows:   Flight SL933 - Chengdu(CTU) to Don Mueang(DMK) - Depart at 03:35 and arrive at 05:50 on November 1 Flight SL218 - Don Mueang(DMK) to Mumbai(BOM) - Depart at 02:25 and arrive at 05:40 on November 2   I have a 20h35m layover at Bangkok's Don Mueang airport (DMK). Do I need a transit visa for Bangkok? The entire itinerary is on a single ticket.


Has a movie from a movie series ever been removed/retconned due to fan/general outcry?

A petition to strike the events of  from the main Star Wars timeline that is going around online has made me wonder if there has ever been a retcon/removal of a movie from a movie series or just renunciation of a movie by those with creative control due to backlash, as opposed to the director(s) just deciding to go a new direction/starting fresh. Google just produces said petition when searching (please note this is not for or against Star Wars).  Addendum, by removal I am referring to the events in the movie no longer being recognized in the universe.


Arabic and Latin characters are rendered wrong on iOS app

The 1 from “1 hour ago” should not render in the middle of his name.   App Version: 1.6.6.2 Device: iPhone 6s OS Version: Version 11.0 (Build 15A5341f) (Beta 5)


Will apt-get dist-upgrade upgrade my system to a newer version?

I am using Ubuntu 12.04 right now. If I use the command sudo apt-get dist-upgrade will that upgrade my Ubuntu to 12.10? Does that mean I won't be using the LTS version after that? I don't want to use Ubuntu 12.10 because I've already tried it and it's very heavy for my netbook.


How to deal with users posting religious threats?

Just a few minutes ago, a particular user created two accounts and posted threatening posts against a certain religion. In such cases, what should be the action taken because the user can just keep creating accounts and keep posting such things because flagging is not going to help either.  Here is a fully censored snapshot of a particular who just happened to do that.


I would like to buy a game (well several copies of it really) for some of my friends for Christmas. Is there any way to do this? Would I have to rely on the publisher, or is there some way to "gift" apps from the market?


Is there a word describing a functionally obsolete design choice?

I'm looking for a word that would describe something like a modern phone that retains a rotary dial.  The dial's design was originally functional, but phone's function doesn't rely on the dial any more - it's just an aesthetic choice.


All numbers of form $10^{k} + 1$ are composite for $k{\gt}2$ proof

I have observed that all numbers of the form $10^{k} + 1$ are composite for $k{\gt}2$, and am trying to prove the same.   Progress  For odd $k$ , it is fairly obvious, as we get 11 as a divisor.  I am having difficulty with $k$ even. Have no clue how to approach. Would prefer a non-inductive approach, if possible  Developments  Thanks to crostul, we can say it is composite for $k$ having an odd divisor. Hence, it only remains to prove it for $k = 2^n$


Installing two versions of Windows 7 on different partitions

I have a Compaq 620 with 4 partitions on the hard drive. The primary partition has Windows 7 installed on it.  I want to dual boot this computer with Windows 7 (Korean version) installed on the other partition. How should I go about doing this?  I do not want the Korean version to interact in any way with the English version. I also don't want to mess anything up so I thought I should ask here first. Please let me know how I should go about doing this, where things might go wrong, and how I can avoid them. Thank you


Is there a word for lowering the importance of something by summarizing it?

Often times someone will tell a long winded story, and then someone will reply with something like "So basically you just had a bad day."  Another, I think better example is when someone will talk a lot about existentialism, and then someone else will reply with "So basically 'to be or not to be, that is the question.'"  Or another example, someone will talk about Cuban-American relations after the cold war, and someone will reply with "So basically America plugged their ears and pretended Cuba didn't exist."  I don't think the word 'oversimplify' is good enough, because it can actually increase the importance of something. For example "So basically if you don't recycle, everyone will die of global warming."


If there exists a monic polynomial $p(x)\in R[x]$ of degree $\geq 1$ such that the ideal $(p(x))$ is maximal, then $R$ is a field.

Let $R$ be a commutative ring with identity. Show that if there exists a monic polynomial $p(x)\in R[x]$ of degree $\geq 1$ such that the ideal $(p(x))\subset R[x]$ is maximal, then $R$ is a field.  My attempt: I understand that since $(p(x))$ is a maximal ideal, then $R[x]/(p(x))$ is a field. I also understand that $p(x)$ must be irreducible, else if $p(x)=g(x)h(x)$ then the ideal $(p(x))$ could not be maximal as it is contained in $(g(x))$.  Working with this, I want to show that for every element $x\in R$, there exists some $y$ such that $xy=1$. I'm thinking I can use a map from $R$ to $R[x]/(p(x))$ and somehow show that the product $xy$ gets mapped to the identity. I'm not at all sure about this though, is this a good direction?  Any help appreciated!


How do I install ISO file in Ubuntu virtualbox with 64 bit? I have the ISO file yosemite.


I overheard someone at work describing a task as "quite critical", and then describe another task as (direct quote) "über critical". Forgetting for a minute the colloquial nature of the conversation, is it acceptable in English to use the word critical with a magnitude or degree?  In short, can something be more critical than something else? Or are things simply critical, or not critical?


Independent Events Conceptual Meaning - probability theory

When I check for definition of independent events I get the following definitions  Type 1  ()  When two events are said to be independent of each other, what this means is that the probability that one event occurs in no way affects the probability of the other event occurring.  Type 2    $P(A \cap B) = P(A)P(B)$   Then it follows some useful information such as ()   a) Do not say that two events are independent if one has no influence on the other    b) No circumstances say that A and B are independent if $ A \cap B  = \phi $ (this is the statement that A and B are disjoint, which is quite a different thing!)  b) Also, do not ever say that P(A ∩ B) = P(A) · P(B) unless you have some good reason for assuming that A and B are independent (either because this is given in the question, or as in the next-but-one paragraph).  Example  Consider example where events are not independent     My conclusion is that $P(A/B) \ne P(A)$ and $P(B/A) \ne P(B)$ . It says given   precondition of   event B has an effect on  P(A) ($P(A/B) \ne P(A)$) and given precondition of   event A has an effect on  P(B) ($P(B/A) \ne P(B)$) . So  these are  dependent events    My conclusion is that $P(A/C) = P(A)$ and $P(C/A) = P(C)$ . It says given the precondition of an event C has no effect on  P(A) ($P(A/C) = P(A)$) and an event A has no effect on  P(C) ($P(C/A) = P(C)$). So  these independent events    Doubt  1) Mathematically we can say whether two events are independent by formulas such as $P(A/C) = P(A)$ and $P(C/A) = P(C)$ or $P(A\cap C) = P(A)P(C)$ . But is it possible to show  meaning using Venn diagrams as we show $P(A \cup B )$ etc.?  Can we make some statements about the participating event sets if know prior two events are independent. I am looking for  getting a conceptual meaning derived from the formula with visual identification from Venn diagram if possible   2) But if you check the definitions I got from two sources as mentioned above as type 1 and type 2, type 1 says      When two events are said to be independent of each other, what this means is that the probability that one event occurs in no way affects the probability of the other event occurring.      and type 2 says      Do not say that two events are independent if one has no influence on the other.No circumstances say that A and B are independent if $ A \cap B  = \phi $ (this is the statement that A and B are disjoint, which is quite a different thing!)      What is the difference between influence of events on other and affecting other event as mentioned above? What is meaning of two independent events which never affects each other but influence each other? I am looking for a precise conceptual definition or identification method for independent events


Will I be able to burn Win10 install media for a clean install?

I received my Win10 upgrade notification. I am using a questionable (as in I torrented the software) Win8.1Pro license in VirtualBox on my Dell running Ubuntu 14.04. I'd like to be able to burn an install DVD or USB thumb drive of the Win10 OS to accomplish a clean install of Win10 on my Dell and then reinstall Ubuntu as a dual boot machine (ftw). Does anyone know if it is possible to burn media or make an install USB drive using VirtualBox? BTW my Dell came with a Win7 Pro sticker which is an OEM license but I am unable to find any media to reinstall Win7 and upgrade from there. Thoughts?


Object.ReferenceEquals prints true for two different objects

How is the below code is printing true?  string x = new string(new char[0]); string y = new string(new char[0]); Console.WriteLine(object.ReferenceEquals(x,y));   I expected this to print False, because I expected two separate objects to be constructed and then their references compared.


jQuery Datatable can't edit newly made row

I'm currently using jQuery datatables to make the table I am displaying. Currently I have it set up so when I select a row in the table, the text in that row appears in a textbox in another panel. I can then type in something else and press "Save" and it changes the text in that row. My current issue is when I add a new row via a button, I cant edit the text in the new row, I can select it however...  Example: I have 3 rows, I select Test1 and I can successfully change the text. Then I click Add Row and then I select the new row and attempt to change the text in that row, it changes the previously selected row's text (a row that was in the table upon load).  How can I fix this issue? I've looked into cell.data, cell.edit but that's for the Editor which I'm not currently using for various reasons.  Table:

                             Name

                             All

                             Test1

                             Test2

                     <button type="submit" class="btn btn-sm btn-primary m-r-5" id="addbtn" >New Group</button>

 //Text box
                 Group Name:
                         <input type="text" id="groupname" class="form-control" value="Name"/>

   Code for making the selected row's text appear in textbox:  (function () {        var table = document.querySelector('#data-table');       var textbox = document.querySelector('#groupname');        table.addEventListener('click', onTableClick);        function onTableClick (e) {         var tr = e.target.parentElement;          var data = [];         for (var td of tr.children) {           data.push(td.innerHTML);         }         textbox.value = data[0];       }     })();   Changing the selected row's text:      var row = null;      $("#data-table tr td").click(function() {       $("#groupname").val($(this).text());       row = $(this);           $("#saverow").click(function() {           if (row != null) {             row.text($("#groupname").val());           }         });     });   Add row:  $("#addbtn").click( function() {     var t = $('#data-table').DataTable();  $('#data-table').dataTable();     t.row.add( [         "New Group"      ] ).draw( false ); });


I wonder if the set of all characteristic function on a set A is similar to its power set P(A)

Recently I studied something known as characteristic function (Indicator function), after going through it deeply I want know if the set of all characteristic functions on A will be similar to its power set P(A)?


I have  double a= = 13; double b = 6; double c = a/b;   I want to make sure it returns in three decimals. I tried   Math.round(c); //gives me an error instead.


Installing Ubuntu on another Hard Drive Disk (F:)

I want to install Ubuntu side by side on my Windows XP.But instead of placing it on HDD C: drive, i want to place it on a slave HDD (which would be drive F:).I already tested on a virtual machine in placing on a second HDD but it doesn't appear to work. How should i proceed?


I have an annoying issue, it's as if linux thinks I'm pressing the Fn key every second. doesn't happen in windows though. Its preventing me from logging into arch. I can enter my LUKS password fine, then after that I just get these ^@^@^@^@^@^@ characters repeating every second. Its the same characters that show when I press my Fn button. IDK what to do. It even does it with my laptop keyboard disabled. I have windows 10 and Arch installed on a Lenovo Flex 3. Anyone have any ideas? Just started doing this out of the blue. Its also really hard to search for.  I tried chrooting into Arch with the USB, but I cant even enter my LUKS password because of the repeating characters. They also show up in Vim.


Removing headers but keeping page numbers in the same time

I wrote my diploma in LaTeX using Lyx, but now I have big problem to fit the output to universities' standards.  I need to remove Part/Section... title from header, I found that using:   \pagestyle{empty}   does the job, but it also removes page numbers, and I spent more than an hour trying to fit them together, especially that in some pages I need no page numbers, while in others has to start from some number, so I'm using:  \setcounter{page}{3}   which also conflicts with the first command.  Any help will be highly appreciated, because I need to print it today, thank you in advance.


What invisible flicker do different types of light bulbs have?

What waveform does the light coming off different types of artificial light sources have and (of course) what are the underlying physical reason for them?    I was inspired to ask this question because of several things I have been hearing lately.  Firstly, there was a recent TED talk about how .  Researchers have been working on the problem for a little while now and they've made a fairly impressive product, but it was only recently made possible by the LED technology, which has such a fast response that it can easily compare to the transfer rates of electric information condiuits that we normally use.  My understanding is that incandescent bulbs flicker because they have 60 Hz AC power being pulsed through them.  In fact, I think 60 Hz was chosen in the first place because it was a threshold that was unnoticeable to humans.  Looking at a  demonstrates that it has a very significant lag time responding to both the normal electrical phasor and being turned off.  In other words, it flickers but it doesn't go dark at any point in the AC waveform.  Looking for more information, however, I was a little disappointed, since nothing seemed to give a graph of lumens emitted over time for all different kinds of bulbs.  Of course, there isn't just one relevant time scale.  A light could flicker with 60 Hz and also flicker with 2000 Hz (I just made that up).  I'm interested in the complete picture of what lights exhibit what patterns.


How do I restore `tar.gz` among the archive creation list?

Prior to Ubuntu 18.04, the compress dialog window listed a dozen file formats to choose from:    In the new version, the dialog window offers only 3 options:    This is somewhat limited in my opinion. I am used to compress my packages in the tar.gz format, and I like have all of them with the same extension.   I know one can manually open the archive manager window, drag-and-drop a directory into it and then create an archive to get a tar.gz package. Alternatively, I can use the terminal. But both of these approaches are somewhat sub-optimal and less immediate than the previous one.  Q: is there any way to restore the old compress dialog window in Ubuntu 18.04?


Don't mark migrations as "rejected" if they were closed long after migration

A question was asked on Site A, where it collected answers before being migrated to Site B.  On Site B it collected more answers and lived happily for a time.  More than two years later, it was closed.  Because it had been migrated originally, the closure was treated as a rejected migration.  This meant that answers that were migrated from Site A were locked and deleted on Site B's copy of the question, and the migrated question became eligible for automatic deletion as a rejected migration. If the closure happens soon after the migration, this is OK -- when a migration is rejected, the affected answers are undeleted on the originating site.  Nothing is lost and no answers are duplicated.  However, if it's been more than 30 days since the question was migrated, this presents a problem. Migration stubs are deleted after 30 days, so there was no (undeleted) question on Site A to host those answers. The result is that they were deleted on both sites.  Closing the question caused content to be lost.  Now you might argue that hey, it was closed, so how valuable could the question and its answers be (regardless of voting)?  But we have logic that isn't "delete all the things", so regardless of how you feel about keeping closed questions, this behavior violated user expectations.  When a non-migrated ("native") question is closed, nothing happens to its answers. This question had been on Site B long enough to be treated as a "native" question.  Also, site scopes and the definition of what constitutes a good, on-topic question do change over time. A question that was perfectly on-topic on the destination site at the time of migration may be considered off-topic later, and leaving those questions open presents the usual problem, but closing them doesn't necessarily mean that the migration shouldn't have taken place.  Migration is often  anyway, but so long as we're stuck with it, there should be a statute of limitations on migration rejections.  If the receiving site doesn't close it within 30 days -- the time that, on the original site, we've decided it's not coming back -- then it should stop being treated as a migration.  Site A is done with it; it should henceforth be treated the same way as if it had been asked on Site B in the first place.  Specifically, if it's closed it's just...closed.  Not sent back.  Not left around with deleted/locked answers.  Not annotated as a rejected migration.  Just closed.  For reference: .  Also, another example: before meta sites existed, it was common for people to post meta questions on Stack Overflow itself. Then, many of these were migrated to then-MSO (now MSE). Later on, many of these were closed as pertaining to only a specific site in the SE network, which has caused the old content to be deleted. Even though rejected migrations on meta sites do not cause answers to be deleted, the migrated question is still eligible for automatic deletion as a rejected migration, regardless of score.  () that had +31 score at the time of deletion.


I like to make command-line bash variables for testing or for other purposes. I give them generic names like a, b, var1... Sometimes I may forget which variables I've already used. Anyway, is there a single command to clear all bash variables? Now after running such a command, I want all bash variables that were defined by the user to become undefined. When echo $undefinedvariable is run, the result is a blank line. All built-in variables like $USER or $SHELL should remain untouched by this command.


Results Random Forest Regression Optimization

I'm going to optimize the hyperparameters of a Random Forest Regressor using scikit-learn and GridSearchCV, with the following code: from sklearn.model_selection import GridSearchCV param_grid = {     'bootstrap': [True],     'max_depth': [30,40,50,60,79],     'min_samples_leaf': [5,10,15,20],     'min_samples_split': [10,12,14,16,20],     'n_estimators': [80,100,110,120] }  rf = RandomForestRegressor()  grid_search = GridSearchCV(estimator = rf, param_grid = param_grid,                            cv = 10, n_jobs = -1, verbose = 2) grid_search.fit(X_train, y_train) def evaluate(model, test_features, test_labels):     predictions = model.predict(test_features)     errors = abs(predictions - test_labels)     mape = 100 * np.mean(errors / test_labels)     accuracy = 100 - mape     print('Model Performance')     print('Average Error: {:0.4f} degrees.'.format(np.mean(errors)))     print('Accuracy = {:0.2f}%.'.format(accuracy))          return accuracy      print (grid_search.best_params_)  best_grid = grid_search.best_estimator_ grid_accuracy = evaluate(best_grid, X_test, y_test) print (grid_accuracy)  The performances after the optimization decrease in terms of RMSE. Basically, just using the standard library call the RMSE is lower than the RMSE with hyperparameters optimization. is it possible?


Can you help me to prove that $$|x-y|\leq |x|+|y|$$ I get a proff of this equality, but it's very short and I don't know if it's correct.


Null Pointer Exception when setText - TextView

I have a fragment in MainActivity and try to setText in fragment, but when I try to do it I get Null Pointer Exception. I checked spelling but it seems okay. I debug app and check these variables but it doesnt seem they are null.    The exception appear in first line of clearText() method.   @Override     public View onCreateView(LayoutInflater inflater, ViewGroup container,                              Bundle savedInstanceState) {         v = inflater.inflate(R.layout.fragment_sun, container, false);          sunRiseTime = v.findViewById(R.id.sunRiseTime);         sunRiseAzimuth = v.findViewById(R.id.sunRiseAzimuth);         sunSetTime = v.findViewById(R.id.sunSetTime);         sunSetAzimuth = v.findViewById(R.id.sunSetAzimuth);         duskTime = v.findViewById(R.id.duskTime);         dawnTime = v.findViewById(R.id.dawnTime);          return v;     }  private void clearText(){         sunSetTime.setText("");         sunSetAzimuth.setText("");         sunRiseTime.setText("");         sunRiseAzimuth.setText("");         duskTime.setText("");         dawnTime.setText("");     }   The error  Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.TextView.setText(java.lang.CharSequence)' on a null object reference                                                        at com.example.mariusz.astroweather.SunFragment.clearText(SunFragment.java:99)


Expression comprehension in function argument

Why is this code  sum(x for x in range(10))   valid? Why encasing x for x in range(10) in square brackets is not necessary?


Bag-of-Words for Text Classification: Why not just use word frequencies instead of TFIDF?

A common approach to text classification is to train a classifier off of a 'bag-of-words'. The user takes the text to be classified and counts the frequencies of the words in each object, followed by some sort of trimming to keep the resulting matrix of a manageable size.  Often, I see users construct their feature vector using TFIDF.  In other words, the text frequencies noted above are down-weighted by the frequency of the words in corpus.  I see why TFIDF would be useful for selecting the 'most distinguishing' words of a given document for, say, display to a human analyst.  But in the case of text categorization using standard supervised ML techniques, why bother downweighting by the frequency of documents in the corpus?  Will not the learner itself decide the importance to assign to each word/combination of words?  I'd be grateful for your thoughts on what value the IDF adds, if any.


How bad it is using the same IV twice with AES/GCM?

I understand that initialization vectors (IV) should not be used twice when using AES/GCM. I am using a counter as an initialization vector. Every time I send out a new packet (I am developing an UDP based protocol that needs packet encryption) I increment the counter and use it as IV.   However, since I will generally need that protocol to transfer files and to send  for very very extended periods of time, in principle for very large files it is conceivable to send more than $2^{32}$ packets, or over the years it is conceivable to send out $2^{32}$ keepalives. To keep the IVs always unique, I would probably need to use a 64 bits integer, but that is 4 bytes more of overhead per packet, that can sum up to quite large quantities which I would like to avoid if not strictly necessary.  So I wonder: how bad it is to reuse the IVs with AES/GCM? Can I have an idea of how dangerous that can be? I mean: if as soon as I repeat an IV once I get immediately so easily exposed to an attack that I could just give out my key publicly, then I have to take countermeasures. However, if that becomes dangerous only when I use the same IV a lot of times, that is completely another thing.


Why time is not like other dimensions is a real amount? In relativity time axis is $i*c*t$, where $i$ is the imaginary unit and $c$ is light speed in free space. Did science or philosophy reached to any answer of this weird property of time? And does this property have anything to do with the uni direction through time axis?


Active to Passive voice: "Go to School Now"

How would you convert the imperative sentence: "Go to school now." to the passive voice?  While discussing it in class, our teacher gave the following solution: "You are ordered to go to school now."  However, I felt that this must be wrong, since the sentence is still in the active voice. It seems to be in the passive voice with reference to the verb 'order', but we need to convert the sentence with respect to the verb 'go'.  I thought of a solution: "Let you be gone to school now." or "Be gone to school now."  Are any of them correct? And if not, how would you convert the sentence into passive voice?    Edit:  Just realised that 'go' is an intratransitive verb. Does that mean that there won't be a passive version of it? As mentioned :     You CAN'T. You can only turn into passive verbs those verbs who can have the "direct object".   For example:   I eat (what do you eat?) an apple   I see (what do you see?) a bird   I read (what do you read?) a poem        But if you say : I go, you can't ask "what do you go", because it doesn't make any sense! And that's why you can't write that in passive voice.     Edit II:  How about "Let the school be gone to by you."?


Undesirable highlighting of a keyword name (dh) occuring within an identifier (0dh)

I'm using the x86masm dialect of Assembler and register names are emphasized even when they occur inside of a label or a hexadecimal number. For example, dh is register, but 0dh is a number, yet the dh part of it is emphasized. I haven't had this problem in listings with any other languages, so I'm assuming it's a problem with the language definition. Is there simple way to redefine the language so that this doesn't happen?    \documentclass[12pt]{article} \usepackage{courier, listings}  \lstset{   language={[x86masm]Assembler},   basicstyle=\ttfamily\small,   frame=single }  \begin{document} \begin{lstlisting} cmp al, 0dh ; dh = register, 0dh = number je somewhere \end{lstlisting}  \end{document}


I want to prepare my CV using LATEX. Please provide some sample (latex source) so that I could see how does that actually render as PDF after compiling. Also, share some references for the packages/commands generally found useful for building a CV.  Any other relevant suggestions are also welcome.


Compute the sum of the series $\sum_{n=1}^{\infty} \frac{1}{n \cdot 2^n}$

What would be the sum of the following series?  $$\sum_{n=1}^{\infty} \frac{1}{n \cdot 2^n}$$  Thanks


I would like to generate camera shake in either a render or in BGE.  How can I accomplish this?


For any matrix $A$, let $A^T$ denote its transpose matrix. What is the minimum value of $\mathrm{trace}(AA^T)$ for an $n \times n$ non-singular matrix $A$ with integer entries?


I want to repair my computer mouse cable which has become disconnected from the PCB. The wire is insulated with enamel and I have to remove it before soldering it back onto the board.  How should I remove the enamel?