Duplicate question was also asked by me and the current question has different code  I have a PIC32 starter kit and I am making I2C communication with DS1307 RTC. I have used the functions for I2C Communiation described in this  page no- 221. I am using MPLAB 8 with watch window opened and added all the register of I2C in watch window, so that when I debug my code, I can see which register has what value. Following is my code:  #include <plib.h>  #define SYSTEM_FREQUENCY            72000000L #pragma config FNOSC = PRIPLL       //Primary Osc w/PLL (XT+,HS+,EC+PLL) #pragma config POSCMOD = HS         //HS osc mode  #pragma config FPLLMUL = MUL_18     //PLL Multiplier 18x Multiplier  #pragma config FPLLIDIV = DIV_2     //PLL Input Divider 2x Divider  #pragma config FPBDIV = DIV_1       //Peripheral Clock Divisor: Pb_Clk is Sys_Clk/2 #pragma config FPLLODIV = DIV_1     //System PLL Output Clock Divider: PLL Divide by 1 #pragma config FWDTEN = OFF         //WatchDog Timer  #define CCLK  (60000000) #define PBCLK (CCLK/8)  #define Fsck 375000 #define BRG_VAL (PBCLK/2/Fsck)  int main() {   mOSCSetPBDIV (OSC_PB_DIV_8);    OpenI2C1( I2C_EN, BRG_VAL );     //*********INIT I2C************//    StartI2C1();   IdleI2C1();    //This function generates Wait condition until I2C bus is Idle.   MasterWriteI2C1(0xD0);  //Address of DS1307   MasterWriteI2C1(0x07);   MasterWriteI2C1(0x00);   AckI2C1();       StopI2C1();   IdleI2C1();   //*********INIT I2C END**********//     //**********SET DATE**********//     int i=5, j =5, k =5;   StartI2C1();   IdleI2C1();   MasterWriteI2C1(0xD0);   MasterWriteI2C1(0x04);   i = MasterWriteI2C1(0x19);   j = MasterWriteI2C1(0x10);   k = MasterWriteI2C1(0x09);   AckI2C1();           StopI2C1();   IdleI2C1();   //*********SET DATE END*********//     //**********GET DATE************//   if(I2C1STATbits.RBF == 1)   //if data is available   {    StartI2C1();    IdleI2C1();    MasterWriteI2C1(0xD0);    AckI2C1();       IdleI2C1();    StopI2C1();    IdleI2C1();     unsigned char val1 = 5;    unsigned char val2 = 5;    unsigned char val3 = 5;    StartI2C1();                     MasterWriteI2C1(0xD1);          val1 = MasterReadI2C1();    val2 = MasterReadI2C1();    val3 = MasterReadI2C1();    AckI2C1();        StopI2C1();    IdleI2C1(); } if(I2C1STATbits.RBF == 0)    //if data is not available {  } return 0; }   For the time being I am just trying to set date and read it back.  1) My first problem is that, when I start debugging, in INIT I2C after IdleI2C1();     I2C1STAT   (register which gives the status of I2C ) gives value 0x400 which means 10th bit is 1 and if we look into the bits of this register then it says:  bit 10:   BCL: Master Bus Collision Detect bit   Cleared when the I2C module is disabled (ON = 0).   1 =A bus collision has been detected during a master operation   0 =No collision has been detected   So this means that collision has been detected. But i havent send anything then why it is saying that collision has been detected.?  2) MasterWrite() function is running properly, because when ever this command is executed, i can see the change in I2C1TRN register(this displays the transmitted data) and the values of i j k changes to 0 because MasterWrite() returns 0 whenever the data is transmitted successfully. But when my control reaches the GetDate it doesnt enter because no data is available. So my second question is that when my data is transmitted successfully, why I am not getting any data back??  Any Pic experts please help me with I2C communication. Thanks!

I am interfacing DS1307 RTC with PIC32MX795F512L. I am using I2C1 for DS1307 RTC and then using UART2 to send the RTC value to the terminal. I have written the code but don't know why I am not getting data.   In my code I am using   OpenI2C2 to open the i2c channel. StartI2C2() to start the communication StopI2C2() to stop the communication MasterWriteI2C() to write the data MasterReadI2C() to read the data   These are included in plib.h file.  Updated CODE:  OpenI2C2(I2C_EN, 163); // I2C channel Configuration  StartI2C2();             IdleI2C2();              n = MasterWriteI2C2(0xD0);  //device address IdleI2C2();               MasterWriteI2C2(0x07);       IdleI2C2(); MasterWriteI2C2(0x00); IdleI2C2(); StopI2C2();  StartI2C2();             IdleI2C2();              MasterWriteI2C2(0xD0);   IdleI2C2();  MasterWriteI2C2(0x01); IdleI2C2();  MasterWriteI2C2(0b00010011); IdleI2C2();  StopI2C2();   StartI2C2(); IdleI2C2(); MasterWriteI2C2(0xD0); IdleI2C2(); MasterWriteI2C2(0x01); IdleI2C2(); StopI2C2();  StartI2C2(); IdleI2C2(); MasterWriteI2C2(0xD1); IdleI2C2(); **res = MasterReadI2C2();** IdleI2C2(); NotAckI2C2(); IdleI2C2(); StopI2C2();   I am using 163 ((33000000/2/100000)-2)as BRG value for I2C communication. I am debugging the code and can see all the values in I2C registers are correct but at res = MasterReadI2C2(), nothing shows up in I2C2RCV register which holds  the received value and even nothing showing up in the res variable. I also used a variable n to check if the values are actually transmitting or not. So I received 0x00 as the value of n and according to document, 0 means transmission successful.   I don't know where I am missing the point.


We know that C store enum types internally as int, which means that the size of the enum is 4 bytes in 32/64 bit machine. But considering int is signed and range from −2,147,483,648 to 2,147,483,647, we certainly don't need that many available values. We can use unsigned short (max 65,535) or even unsigned char (max 255) suffices. So my questions are: Q1-why C don't make enum type store unsigned short/char internally? Q2-Why we need to use typedef to declare an enum e.g typedef enum { N_LEAF, N_INTERNAL } nodetype_t;  but we don't need to use typedef in struct declaration e.g struct node_s {    char c;    int i[2]; };  Why we can't make enum declaration the same as struct as: enum { N_LEAF, N_INTERNAL } nodetype_t;

I'm creating a set of enum values, but I need each enum value to be 64 bits wide. If I recall correctly, an enum is generally the same size as an int; but I thought I read somewhere that (at least in GCC) the compiler can make the enum any width they need to be to hold their values. So, is it possible to have an enum that is 64 bits wide?


I'm searching for a fantasy novel I read years ago - in the early 2000s, though it might have been published earlier. The main thing I remember is the main character (female I think) had to wear spider silk clothing because she had super-sensitive skin. More, even normal spider silk wasn't smooth enough because she could be the legs of the spiders that use to skitter across the silk. This might of been a magical sense or it must have just been really sensitive skin. It had to be special smoothed.  I think but am not sure it was a sequel to an earlier fantasy series, but I didn't read that series.

This is a series I read partially something like 15 years ago (I think). It is set in a universe with magic of some sort - I think the magic was derived from geological processes (?). One of the things I remember - which was the reason I abandoned the series - was that it grew ever more gory; when I stopped reading, one of the main protagonists was flayed alive.   I only remember fragments - there were hints that the universe had been magically split into three or four parts, three relatively normal parts and The Void. I remember there was a powerful person/ruler called Tensor, and a kind of monstrous race with powerful magic, called 'Lorsk', which originated in the void and had evolved from humans that had been trapped there.  I'm a bit ambivalent about reading the series again - it seemed to be a never-ending death spiral of soap operatic proportions, but I'd like to see if my impression from then was actually right.


I have installed Skype 8 in Ubuntu 17.10, in that the screen sharing option is not working. The option itself is not available in the "+ option" during the call.  It was working fine in Ubuntu 17.04

Last time I decided to use Ubuntu 17.10. When I installed Skype from official site of Skype (I downloaded the .deb package) I can do almost everything without one important feature for me. I can't share my screen while I am talking with somebody. On Windows that was working perfectly, on Ubuntu I don't even see such a option.  My friend has the same version of Ubuntu, GNOME and Skype. He can use that feature. I can't and I can't figure out why.


I am a macOS user and installed Ubuntu and dual boot using reFind. I can automatically log into my Ubuntu account but I can’t do actions that require administrative authentication because I forgot my password. Is there a way to reset the password through terminal without actually knowing it? If not, some other posts said to reboot and press shift, Followed by some other steps. but this command won’t work for me. What would be the command if I am using reFind to boot Ubuntu? Thank you

I'm working on a Ubuntu system, and my client has completely forgotten his administrative password. He doesn't even remember entering one; however it is there.  I've tried the suggestions on the website, and I have been unsuccessful in deleting the password so that I can download applets required for running some files. Is there a solution?


I'm looking for a way to force any program on Windows 7 to run with no admin privileges. If the program actually needs admin privileges, it may throw errors or crash. This is acceptable.  What I'm specifically looking to prevent is programs that ask for admin privileges to run but actually would run fine in normal privilege mode.  I scoured the Internet with over 20 searches and all I found was inconclusive garbage about program manifests (and absolutely no help or instructions on how to change the manifest to remove admin privilege requests).  So here are the rules for answers in this question:   Solution must remove the UAC "shield" marker from the program icon. The program must not attempt to gain elevated privileges for any reason. No disabling or attempting to circumvent UAC. If a program with the admin privilege requests removed needs to do anything that requires admin privileges, it is allowed to crash or throw an error. I would rather have a program crash or throw errors than to give the program elevated privileges that it doesn't need.   As a side note I would like to say that Windows Vista/7 UAC is defective by design and doesn't promote safer computer use, because it is too restrictive for a normal user account and programs are allowed to request admin privileges even if those aren't needed.  This only encourages average/non-advanced users to do stupid stuff like running everything as administrator or disabling UAC which puts their computers at even more risk.   The proper solution would be a complete rework of UAC "admin privileges" definition defining "admin privileged" as being only stuff that can actually damage your computer, such as boot sector changes, BIOS changes, operating system/Windows folder changes, startup program changes, etc. There is no valid reason for demanding admin privileges just so something can be added to Program Files.  I much prefer the Linux approach where you run a program, and if it crashes or breaks, then run it with sudo.    NOTE: I already found this   and none of the solutions were useful. That question just turned into unconclusive chatter and inaccurate/incorrect "solutions".

My account in Windows 7 is an administrator account. When I open the Run box (WinKey + R), I am warned, "This task will be created with administrative privileges."    Is there any way to run programs as myself, but without administrative privileges when logged in as an administrator?


I've just installed ubuntu 16.04 on my laptop, but my wireless card doesn't work. What can i do to fix it?  lspci -vvnn | grep -A 9 Network   03:00.0 Network controller [0280]: Broadcom Corporation BCM43142 802.11b/g/n [14e4:4365] (rev 01) Subsystem: Lite-On Communications Inc BCM43142 802.11b/g/n [11ad:6675] Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx- Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx- Latency: 0, Cache Line Size: 64 bytes Interrupt: pin A routed to IRQ 255 Region 0: Memory at f7800000 (64-bit, non-prefetchable) [size=32K] Capabilities: <access denied> Kernel modules: bcma, wl

I'm having serious problems installing the Broadcom drivers for Ubuntu. It worked perfectly on my previous version, but now, it is impossible.   What are the steps to install Broadcom wireless drivers for a BCM43xx card?  I'm a user with no advance knowledge in Linux, so I would need clear explanations on how to make, compile, etc.    lspci -vnn | grep Network showed:   Broadcom Corporation BCM4322 802.11a/b/g/n Wireless LAN Controller [14e4:432b]      iwconfig showed:  lo        no wireless extensions. eth0      no wireless extensions.   NOTE: Answer below is updated every time new information is added and confirmed working.


I have about 100-1000 points in a 2D coordinate system. When the user zooms out I need to cluster nearby points to show fewer larger points, preferably centered around the middle point of each cluster.  I suspect that there exists some nifty mathematical trick to make this efficient.

I'm looking into clustering points on a map (latitude/longitude). Are there any recommendations as to a suitable algorithm that is fast and scalable?  More specifically, I have a series of latitude/longitude coordinates and a map viewport. I'm trying to cluster the points that are close together in order to remove clutter.  I already have a solution to the problem (), only I am wondering if there is any formal algorithm that solves the problem efficiently.


In the following text of Pamela by Samuel Richardson, well is capitalised — possibly to denote speech, where inverted commas have been neglected. As GEdgar points out, this is not an isolated case. I wonder why only, but there may be no explanation:      He took my hand, in a kind of good-humoured mockery, and said, Well urged, my pretty preacher! When my Lincolnshire chaplain dies, I'll put thee on a gown and cassock, and thou'lt make a good figure in his place.—I wish, said I, a little vexed at his jeer. Well, well, Pamela, said he, no more of this unfashionable jargon.

It seems to have been common practice in the 17th and 18th centuries in English-language sources to capitalise the first letters of nouns, as in  At which Time he prov'd himself the Noah's Dove, that finding himself no Rest anywhere, was receiv'd again into his own Ark, and brought a peaceable Olive-Leaf in his mouth. —  (1685)  Most original sources I can find on the web have used modern rules for capitalisation, so I have a few questions:  Was the practice used for all nouns (Note mouth isn't capitalised in my quotation above.)? When did this practice begin? When and why did it end?


Let $X$ be a compact topological space and $K$ be a compact subset of $X$. I want to prove that $K$ is a closed subset of $X$, or not. I tried to show that the complement of $K$ in $X$, is open. But, I am not able prove that. I also tried to show that $K$ contains all its limit points. If $K$ is not closed in $X$, please give an example.

I feel really ignorant in asking this question but I am really just don't understand how a compact set can be considered closed.      By definition of a compact set it means that given an open cover we can find a finite subcover the covers the topological space.    I think the word "open cover" is bothering me because if it is an open cover doesn't that mean it consists of open sets in the topology? If that is the case how can we have a "closed compact set"?   I know a topology can be defined with the notion of closed sets rather than open sets but I guess I am just really confused by this terminology. Please any explanation would be helpful to help clear up this confusion. Thank you!


I want to run gradient boosting regression on a dataset whose rows are not independent. Specifically, the rows are clustered, and you could consider the clustering variable to be a random effect.    What is the effect of ignoring the random effect, i.e. simply running the classifier on the target and the other features? What open source packages are available that can account for clustered data for gradient boosting? Any caveats to using the procedures from 2?   Edit: I saw . I will now restrict my question to GBMs.

I'll explain my problem with an example.  Suppose you want to predict the income of an individual given some attributes: {Age, Gender, Country, Region, City}. You have a training dataset like so  train <- data.frame(CountryID=c(1,1,1,1, 2,2,2,2, 3,3,3,3),               RegionID=c(1,1,1,2, 3,3,4,4, 5,5,5,5),               CityID=c(1,1,2,3, 4,5,6,6, 7,7,7,8),               Age=c(23,48,62,63, 25,41,45,19, 37,41,31,50),               Gender=factor(c("M","F","M","F", "M","F","M","F", "F","F","F","M")),              Income=c(31,42,71,65, 50,51,101,38, 47,50,55,23)) train    CountryID RegionID CityID Age Gender Income 1          1        1      1  23      M     31 2          1        1      1  48      F     42 3          1        1      2  62      M     71 4          1        2      3  63      F     65 5          2        3      4  25      M     50 6          2        3      5  41      F     51 7          2        4      6  45      M    101 8          2        4      6  19      F     38 9          3        5      7  37      F     47 10         3        5      7  41      F     50 11         3        5      7  31      F     55 12         3        5      8  50      M     23   Now suppose I want to predict the income of a new person who lives in City 7.  My training set has a whopping 3 samples with people in City 7 (assume this is a lot) so I can probably use the average income in City 7 to predict the income of this new individual.  Now suppose I want to predict the income of a new person who lives in City 2. My training set only has 1 sample with City 2 so the average income in City 2 probably isn't a reliable predictor.  But I can probably use the average income in Region 1.  Extrapolating this idea a bit, I can transform my training dataset as      Age Gender CountrySamples CountryIncome RegionSamples RegionIncome CitySamples CityIncome  1:  23      M              4         52.25             3        48.00           2    36.5000  2:  48      F              4         52.25             3        48.00           2    36.5000  3:  62      M              4         52.25             3        48.00           1    71.0000  4:  63      F              4         52.25             1        65.00           1    65.0000  5:  25      M              4         60.00             2        50.50           1    50.0000  6:  41      F              4         60.00             2        50.50           1    51.0000  7:  45      M              4         60.00             2        69.50           2    69.5000  8:  19      F              4         60.00             2        69.50           2    69.5000  9:  37      F              4         43.75             4        43.75           3    50.6667 10:  41      F              4         43.75             4        43.75           3    50.6667 11:  31      F              4         43.75             4        43.75           3    50.6667 12:  50      M              4         43.75             4        43.75           1    23.0000   So, the goal is to somehow combine the average CityIncome, RegionIncome, and CountryIncome while using the number of training samples for each to give a weight/credibility to each value. (Ideally, still including information from Age and Gender.)  What are tips for solving this type of problem? I prefer to use tree based models like random forest or gradient boosting, but I'm having trouble getting these to perform well.  UPDATE  For anyone willing to take a stab at this problem, I've generated sample data to test your proposed solution .


I have structure:        .itemWrapper{         position: relative;         width: 100%;         display: inline-block;         height: 20%;     }     .itemNumber{         position: relative;         float:left;         height: 100%;         width: 20%;     }     .itemName{         height: 100%;         width: 20%;         position: relative;         float:left     }

2

 name </div<
     I need to center the text inside .itemNumber and .itemName vertically, how can I do that? I know about line-height trick, however the height of the container is in %, what is the way to do it?

I have a div with two images and an h1. All of them need to be vertically aligned within the div, next to each other. One of the images needs to be absolute positioned within the div. What is the CSS needed for this to work on all common browsers?

testing...


I want to add defer in Javascript in a WordPress Plugin, how can I add that?  /* Init AddToAny when an AddToAny WordPress Widget is selectively refreshed for customizer preview. */ jQuery( function() {     // Short-circuit selective refresh events if not in customizer preview or pre-4.5.     if ( 'undefined' === typeof wp || ! wp.customize || ! wp.customize.selectiveRefresh ) {         return;     }      function addtoany_init() {         if ( window.a2a ) {             a2a.init_all( 'page' );         }     }      // Init AddToAny when a partial is rendered.     wp.customize.selectiveRefresh.bind( 'partial-content-rendered', function( placement ) {         if ( placement.container ) {             addtoany_init();         }     } ); } );

I couldn't add defer tag in plugin javascripts. Google developer pagespeed test suggests me to add defer tag in contact form 7 javascripts.   This is how contact form 7 includes javascript in header.  add_action( 'wp_enqueue_scripts', 'wpcf7_enqueue_scripts' );  function wpcf7_enqueue_scripts() {     // jquery.form.js originally bundled with WordPress is out of date and deprecated     // so we need to deregister it and re-register the latest one     wp_deregister_script( 'jquery-form' );     wp_register_script( 'jquery-form', wpcf7_plugin_url( 'jquery.form.js' ),         array( 'jquery' ), '2.52', true );      $in_footer = true;     if ( 'header' === WPCF7_LOAD_JS )         $in_footer = false;      wp_enqueue_script( 'contact-form-7', wpcf7_plugin_url( 'scripts.js' ),         array( 'jquery', 'jquery-form' ), WPCF7_VERSION, $in_footer );      do_action( 'wpcf7_enqueue_scripts' ); }   Now how to add defer="defer" tag in the above code?


I think I get why the two parentheses/fractions here are not the same size:  \left(\frac{3}{p}\right)\left(\frac{p}{3}\right)   Screenshot from Mathjax website:    Presumably something about the baseline being different for p and for 3.  But at the same time, it just looks bad.  Notice that \frac{3}{p}\frac{p}{3} or (\frac{3}{p})(\frac{p}{3}) look better, but I need parentheses here and I'd prefer them to cover the whole fraction (actually, Legendre symbol).  Can anyone think of a better way to do this?

I'm trying to show the product of two Legendre symbols. When I compile the following  \documentclass{article} \begin{document} $$\left(\frac{x}{p}\right) \left(\frac{x}{p}\right)$$ \end{document}   it yields     as expected. However, when I switch the variables, i.e.  \documentclass{article} \begin{document} $$\left(\frac{x}{p}\right)\left(\frac{p}{x}\right)$$ \end{document}   it yields     How do I resolve this? Why do the values within the fractions matter?


Looks like the hardware is Realtek Semiconductor RTL8821CE.   There's no wifi icon at top but a question mark instead.   I see       no wifi adapter found, make sure you have a wifi adapter plugged and   turned on   when I click wifi in settings.

We just bought a Lenovo  (which is supposed to have the Intel 8265 for wireless). This laptop was bought in part because it is certified to run Ubuntu and as such to me at least it would make sense for things to work out of the box... but no such luck.  First, I installed Ubuntu 17.10 and after installation realised Wi-Fi was not working. I also tried Ubuntu 16.04 from a USB drive since that is the version of Ubuntu it is certified for, but no luck there either.  The wireless chip is not detected by lshw (or even lspci by the looks of it), ip link does not show a wireless interface, and the iwlwifi kernel module is not loaded at boot (I can load this myself using modprobe iwlwifi but this does not make Wi-Fi work). I think it is a combined Wi-Fi/Bluetooth chip, and Bluetooth does appear to work (or at least Bluetooth shows up in Gnome and rfkill list).  modinfo iwlwifi | grep 8265 shows me a file ending in -34 is supposedly loaded but only a file ending in -33 (and some other lower numbers) is present in /lib/firmware, if that helps).  I have also installed the Linux 4.14.9 kernel in an attempt to get things to work, but this did not resolve the issue either.  Further information  root@ThinkPad-E570:~# modinfo iwlwifi | grep 8265 firmware:       iwlwifi-8265-34.ucode root@ThinkPad-E570:~# rfkill list all 0: tpacpi_bluetooth_sw: Bluetooth     Soft blocked: no     Hard blocked: no 1: hci0: Bluetooth     Soft blocked: no     Hard blocked: no root@ThinkPad-E570:~# dmesg | grep iwl root@ThinkPad-E570:~# lspci -nnk | grep 0280 -A3 05:00.0 Network controller [0280]: Realtek Semiconductor Co., Ltd. Device [10ec:c821]     Subsystem: Lenovo Device [17aa:c024]   Update  I just noticed that the laptop does not have an Intel wireless chip at all, but in fact has a Realtek one... which means that the  of the shop I bought this laptop at were not accurate... Sigh. Same problem stands, however, just with a crappier wireless chip.


I couldn't find that information anywhere. Lot says you can't get a shallow DoF with a tiny sensor. So, anyone has got an FZ300, Can you?  mattdm, that question was about all p&s's in common, I posted this question because I saw a video which was shot by this camera, that had a lot of shallow DoF shots. So I need to know if this camera can shoot photos with a shallow DoF at any focal length.

I have a compact digital camera, and in macro mode I can manage to achieve a blurred background, if the background is far enough away. Can this be done when taking non-macro pictures, and if not, is there a way to simulate it?  When I shoot portraits with my brother's DSLR, it is quite easy to fade out the background. But with my point and shoot camera, I haven't been able to take such photos.   I choose a large aperture for my camera but it still doesn't work. I know that standing further and zooming will result in a smaller depth of field, but it doesn't seem to be enough to get the really nice "bokeh" look. I've tried macro mode, and that will work if the subject is close enough and the background far enough away, but how can it be done with non-macro pictures?   Why are DSLR cameras are so much better in this area? What are the general recommendations to do this using a compact or super-zoom camera?


Why do they all answer their own private wannabe version of the question? How do we fix it?     Q: How do I make A work with B?      A: Why don't you use C instead of B?      Comment: Why don't you try to answer   the question? If you have no idea,   just shut up.   Maybe people shouldn't be allowed to answer questions too quickly. When they hit 'post' they should be drawn back to the question, the browser would hang and they would be forced to stare at the question for 30 secs again.  I think having stronger reputation loss for downvotes, as discussed elsewhere, might help.  I think too many people just shoot answers looking for easy reputation, backed by the strong unbalance between up- and downvotes.

If someone asks how to do XYZ, and you think doing XYZ at all is a Bad Idea™, is it valid to post an answer saying so? You aren't answering the question, but instead, arguing the question's validity.  You could do this in a comment, but I don't think comments carry enough weight on occasion.  For example, I came across this today ; for those not wanting to link away:     I would like to build a wiki based website about professors, so that students can share information and check the reputation of the professor before working for him.   and I really wanted to post an answer that said, "I think this is a very bad idea". (In fact I did anyway, despite awareness that it could get myself flamed.)  Was I wrong? What should I have done instead?


I'm looking for a LaTeX editor for Mac OS X that supports larger projects, so should have some form of outline view showing the logical structure of a larger project that extends across many files.  Is this possible with TeXShop?  If not can you recommend another editor, that is free?

What editors/IDEs are available for easing the process of writing TeX/LaTeX documents? Please state some useful features like code completion, spell checking, building final DVI or PDF files, etc.  This question is undergoing a systematic refurbishment, see  on Meta. If you’d like to see another editor feature covered here or to take care of an editor that’s not covered yet, share your ideas in that meta question.  List of editors Links to answers.


I am a scientist and new to this group so apologies in advance if this has been covered before. In my work, I use experiments to calculate the slope and intercept of experimental data from a simple regression model: $$y=\beta_0+\beta_1x+\epsilon$$ The OLS estimators from this model: intercept ($\hat{\beta}_0^{OLS}$) and slope ($\hat{\beta}_1^{OLS}$) are then used as parameters in other functions to calculate other variables. Because these OLS estimators are correlated, I also need to know the covariance $\mathrm{Cov} (\hat{\beta}_0^{OLS},\hat{\beta}_1^{OLS})$ between them in the corresponding error propagation calculations in order to calculate the uncertainty of these other variables. I have discovered the discussion in this group on , which has been helpful, but I have some additional questions: (1) In the posting above, @RichardHardy states that the correlation between the two estimators is: $$\mathrm{Corr} (\hat{\beta}_0^{OLS},\hat{\beta}_1^{OLS})=\frac{-\sum^n_{i=1}x_i}{\sqrt[]{n}\sum^n_{i=1}x_i^2}$$ Is there a published reference for the derivation of this expression?  I would like to know how this is derived (for myself), and as this will eventually be used in publishing the research, I would like to ensure there is a proper and valid reference for it. (2) To determine $\mathrm{Cov} (\hat{\beta}_0^{OLS},\hat{\beta}_1^{OLS})$, am I correct in assuming that: $$\mathrm{Corr} (\hat{\beta}_0^{OLS},\hat{\beta}_1^{OLS})=\frac{\mathrm{Cov} (\hat{\beta}_0^{OLS},\hat{\beta}_1^{OLS})}{\sigma_{\hat{\beta}_0^{OLS}}\sigma_{\hat{\beta}_1^{OLS}}}$$ If this is not correct, could someone point me to a reference which will allow me to derive $\mathrm{Cov} (\hat{\beta}_0^{OLS},\hat{\beta}_1^{OLS})$?  Thanks in advance for any help or advice.

I am reading a book on linear regression and have some trouble understanding the variance-covariance matrix of $\mathbf{b}$:    The diagonal items are easy enough, but the off-diagonal ones are a bit more difficult, what puzzles me is that  $$ \sigma(b_0, b_1) = E(b_0 b_1) - E(b_0)E(b_1) = E(b_0 b_1) - \beta_0 \beta_1 $$  but there is no trace of $\beta_0$ and $\beta_1$ here.


So im new to coding, just wanted to create a login validation using Resultset interface but keep getting NullPointerException.  public static void main(String[] args) {     Connection con = null;     PreparedStatement pstmt=null;     ResultSet rs=null;     int id;     String name;      String qry="select name from jejw5.test where id=? and name=?";     Scanner sc=new Scanner(System.in);     System.out.println("Enter your id");     id=sc.nextInt();     System.out.println("Enter your name");     name=sc.next();     try {         Class.forName("com.mysql.jdbc.Driver");         con=DriverManager.getConnection("jdbc:mysql://localhost:3306?user=root&password=Eagle");         System.out.println("connection established");         pstmt=con.prepareStatement(qry);         pstmt.setInt(1, id);         pstmt.setString(2, name);         if(rs.next()) {             int skill=rs.getInt(1);             System.out.println(skill);         }         else{             System.out.println("invalid user/PW");         }      } catch (ClassNotFoundException | SQLException e) {         e.printStackTrace();     }     finally {         if (rs != null) {             try {                 rs.close();             } catch (SQLException e) {                 e.printStackTrace();             }         }         if (pstmt != null) {             try {                 pstmt.close();             } catch (SQLException e) {                 e.printStackTrace();             }         }         if (con != null) {             try {                 con.close();             } catch (SQLException e) {                 e.printStackTrace();             }         }     }  }   }  Exception- Exception in thread "main" java.lang.NullPointerException     at org.rjn.Login.main(Login.java:32)  warning- variable rs can only be null at this location.

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


I have windows xp and it has started responding very slowly, so was thinking if the various software I've installed might be affecting its speed.  PS: Even if I run one program/software at a time the same thing happens

I have always heard that it's a bad idea to install lots of software on a Windows machine, and new software should always be tested in a virtual machine so as to not permanently affect the operating system. But does the actual act of installing a piece of software really slow down the Windows OS? Or is it more due to the programs themselves running a bunch of background services?  To rephrase my question, if I were to continuously install software but then remove it later, would Windows still slow down?


i want to ask if i can create and use a array of functions in C. Assuming i have multiple functions with the same type, it is possible to create a array which holds them? Like:  int vectFunc[]={ sum(), substract(), divide() multiply() }

How should I use array of function pointers in C?  How can I initialize them?


Can someone please explain this limit:   $$lim_{j\rightarrow\infty} \frac{j^{j}}{(j+1)^{j}}=\frac{1}{e}?$$  I got it from this series:   $$\sum_1^{\infty}\frac{j!}{j^j}.$$

Find the limit of: $$\lim_{n\to\infty}\left(\frac{n}{n+1}\right)^n$$   I'm pretty sure it goes to zero since $(n+1)^n > n^n$ but when I input large numbers it goes to $0.36$.  Also, when factoring: $$n^{1/n}\left(\frac{1}{1+\frac1n}\right)^n$$ it looks like it goes to $1$.   So how can I find this limit?


I am a French citizen. My sister booked a flight on easyjet to Poland for both of us, and she used my maiden name only as my surname.  However, on my passport, the surname reads like this : maiden_name ép. marital_name.  Is it ok or do I have to make the change on my booking ?

I have two names as my given name in the passport and I typically just use this as my first and last name. However, my passport has a surname too which I almost never use. Due to this, I mistakenly provided my given name as first and last name.   As per the passport,  Surname : AAAA Given name(s) : BBBB CCCC   In the ticket, First name : BBBB Last name : CCCC  The credit card I've used to make this booking has my name as BBBB CCCC.  Will this create a problem at the travel time?  Update : the airline says that they can't update the name in the ticket. They are saying that since they have made a remark of the passport details boarding will not be a problem but I might face problems at immigration. Do they check name details in itenerary to exactly match passport at the time of immigration? Is that true in your experience?  Update : Travelled without any problem, neither at boarding gate, immigration nor after arrival at border police control.


I came across this account and noticed that it has got a reputation of exactly 101 points on more than 20 Stack Exchange platforms even without posting any question or answer (see image below). At first I thought it's due to the first days of SE when there hasn't been such strict reputation gaining rules as today. But then I saw that this is even true for accounts that have been created only half a year ago.        So, am I missing something here like "Take this online introduction tour and gain 101 points"? I'm asking because for me it takes quite a long time to gain enough repution to become a productive member (voting, commenting, editing,..) on SE. Especially when joining a new platform.    DISCLAIMER: I don't demand anything I'm just wondering. ;)

I was just awarded +100 reputation on all of my Stack Exchange accounts.  What is this bonus for? It simply says "Association Bonus" on my reputation overview.  Also:   What privileges does the association bonus grant users? Can I lose the association bonus? Does it make my reputation 101 everywhere? Can I earn the association bonus on sites I haven't joined yet? Does it matter which site I earn the 200 reputation on? Will I get an association bonus every time my reputation on a site crosses 200 points? Does the association bonus allow me to answer protected questions? Does the association bonus count towards the reputation cap? Can I get the association bonus if I only have a profile on one site? What else is there to know about the association bonus?


Prove that      If $f$ is a monotone function which defined on interval, then $f$ is measurable.    Proof: If $f$ is increasing and define on interval, then the set $A=\left\{x:f(x)>a\right\}$ will be an interval for all a, and it's measurable since each interval is measurable.   Does this an accepted proof? Need I to show that A is an interval? If yes; how can I prove that?

Problem. Let $f: \mathbf{R} \rightarrow \mathbf{R}$ be a monotone increasing function. Show that $f$ is measurable.      Solution. We know that the set of discontinuites of any monotone increasing function $f$ is measure zero (since it is at most countable). We define a continuous function $g$ such that $g(x)=f(x)$ except the discontinuous points of $g$. Then $g(x)=f(x)$ almost everywhere. Note that any continuous function $g: \mathbf{R}\rightarrow \mathbf{R}$ is measurable. Also note that if $g$ is measurable and $f=g$ almost everywhere, then $f$ is measurable. Hence we conclude that $f$ is measurable.    Is my solution correct? Thanks.


I'm on a PC, my friend is on a PS3, can we play together that way? I have my own steam account and have portal 2 for the PC on steam, she has it on her PS3. Does it still work? She has it on PS3, I have it on my PC. If she links a steam account to her PS3 and I friend her, can we play co-op on portal 2?

The PS3 version of Portal 2 comes with a code to link it to a Steam account. Apparently this allows you to play on both the PC and PS3 with one purchase.  Can this be used to play co-op between the two platforms?


I have learned that when we are using which if a word like in or for comes at the end of the which clause, we have to move those extra words to in front of the which  like this:     The case for which the saint died was very religious.    What I am trying to ask is, does the same go with all the wh-words (what, when, who, how, etc.)?   There were some results with whom:      We have clients for whom we provide only one small service.    If yes, please provide me with some example sentences. If not, please explain why only which is used for that type of case. Also, I am sorry for misusing any grammatical term if there was any.

Like many others, I commonly find myself ending a sentence with a preposition.  Yes, it makes me cringe.  I usually rewrite the sentence, but sometimes (in emails) I just live with it.  To, with... you know who you are.  Should I keep fighting myself on this one, or is it okay in some circumstances?


In a mail from my professor, I read      you need to specify all the fields.    Here, he gave us a form with about 25 fields. He asked us to fill out the fields.  I'm skeptical about the usage of the in his statement. I assume that it's used when we are particular about a single object, not for a group of objects (plural).   I smell something odd with professor's sentence. Am I right?

I came across people using all the in sentences instead of all.     Select the type of user to view all the users of that type. All the   users of the selected role are displayed.   I usually strike out the after all. Is there any justification that I can give my team on why the seems out of place in the above example? Are there any rules of grammar for or against using the article after all?


Would the phrase read "Run, Joey, run!"...or does the placement of the vocative commas make absolutely no sense?

According to some grammars[1][2] and CMS...  "Interjections and vocative should be separated from the rest of the sentence by commas".  The vocative case [1] is used to indicate direct address (i.e., to show when you are talking to somebody or something directly). Nouns in the vocative case are set off using commas. CMS 6.38  As direct address (i.e. vocative case), the parenthetical element should be set off using commas (CMS 6.30). An absolute phrase is always treated as a parenthetical element, as is an interjection.  So,      Hello, world!   That is a very classical way to hello the world.  But, languages change. I am not sure, but today, I feel that it is very uncommon helloing someone with an interjection, providing a small pause and clarifying who is helloed. I have an impression that usually people use hello as a ("kind of") verb, not an interjection.   Question: Is that just a personal (bad) impression or some linguistic has already studied that phenomenon?     [1] - Nelson, Gerald C., Director Survey of English Usage Sidney Greenbaum, and Sidney Greenbaum. An Introduction to English Grammar. Routledge, 2013. [2] - Advanced Grammar in Use with Answers: A Self-Study Reference and Practice Book for Advanced Learners of English. 3 edition. Cambridge University Press, 2013. CMS - Chicago Manual of Style


I made a stupid edit on another guy's question and can't revert it (yet). Maybe my stupidity will be catched by the peer reviewers, maybe not. In the first case, I stole a bit of the precious time of the peer reviewers, in the second case, it will be super annoying and embarrassing, as I would have to explain why my edit was wrong in the first place. But right now my hands are tied!  Is there no way to just delete one's edits from the peer review queue?  Because there should be!

Edits made by users who do not have edit privileges are placed in a queue until it is peer reviewed.  E.g., I edited someone else's answer. but changed my mind. If I'd edited my own question/answer, there would be a "Rollback" button, but there's no such button in the scenario I'm describing (at least none that I can see).  This is more relevant today because users can only have at most five edits waiting in the queue, and allowing one to cancel an edit would permit them to free up one of their five pending edits for something else.  Is there a way to remove one's edit from the peer review queue?


I'm a student of physics. There is an identity in tensor calculus involving Kronecker deltas ans Levi-Civita pseudo tensors is given by $$\epsilon_{ijk}\epsilon_{klm}=\delta_{il}\delta_{jm}-\delta_{im}\delta_{jl}$$ which is extensively used in physics in deriving various identities. I have neither found a proof of this in physics textbooks nor in Wikipedia. In particular, how does the above formula follow from the definition of $\epsilon_{ijk}$ tensor$$\epsilon_{ijk} =   \begin{cases}          +1 & \text{ for even permutations }, \\          -1 & \text{ for odd permutations } ,\\     \;\;\,0 & \text{ for repetition of indices }, \end{cases}$$ This is the only definition of I'm familiar with.

In order to prove the following identity: $$\sum_{k}\epsilon_{ijk}\epsilon_{lmk}=\delta_{il}\delta_{jm}-\delta_{im}\delta_{jl}$$ Instead of checking this by brute force, Landau writes thr product of Levi-Civita symbols as: $$\epsilon_{ijk}\epsilon_{lmn}=\det\left|    \begin{array}{cccc}       \delta_{il}   & \delta_{im}  & \delta_{in}   \\       \delta_{jl}   & \delta_{jm}  & \delta_{jn}   \\       \delta_{kl}   & \delta_{km}  & \delta_{kn}       \end{array} \right| $$  The proof that the equalty holds is quite straightforward if you consider what values the indices can take. But I've been told that there's a much more profound and elegant demonstration based on the representation of the symmetric group.  Does anybody know this approach based on group theory?


I'm working on a story set in the Revolution/Early America era, and the family in the story is an upperclass family, with a mansion in the south.   I've heard Drawing room, Parlor, Sitting room, and many others to describe a living room, but I'm not sure the right one to use without saying 'living room' which is what I want to avoid.   Can anyone help?

Each of these terms seem to be used to designate a room, in a private house or in the front of a public facility, where one can sit and relax and talk. But, are there any differences to them – or do they mean just about the same and, as such, can be used interchangeably?  Also, are any of these terms more typical of an English variety than of another?  Aside from that, what's the difference between a drawing room, a sitting room, a lounge (room), and a parlor, to designate a generally cozy room in a private house or a restaurant where guests can be entertained, or withdraw to after a meal to sit and relax and talk (and drink too!). Is one of these terms more typical of an English variety than of another?  Lastly, can "living room', "sitting room", "front room", "lounge (room)", and "parlor" be used interchangeably to designate a room in a home used by the members of a household for leisure activities or to entertain guests, etc., and are any of these terms more typical of an English variety than of another?


Let $f$ be an analytic  function,$f:\Bbb D\to\Bbb D$, where $\Bbb D$ is open unit disc with center at origin and of radius $1$. If $f(0)=0, f’(0)=0$, then possible value of $f(\frac{1}{2})$ can be $1.$ $\frac{1}{4}.$ $2.$ $\frac{-1}{4}.$ $3.$ $\frac{1}{3}.$ $4.$ $\frac{-1}{3}.$ I tried by taking $f(z)=\pm z^2$ so that first two options are correct one . But I don’t know exact theory of question . Seems to be a question of Schwartz lemma, but unable to apply . Please help . Thank you .

Let $f:\mathbb{D} \rightarrow \mathbb{D}$ be analytic such that $f(0)=0$ and $f'(0)=0$. Then which of the following are possible values of $f(1/2)=$  i. $\dfrac{1}{4}$   ii.$\dfrac{-1}{4}$   iii.$\dfrac{1}{3}$   iv.$\dfrac{-1}{3}$  By Schwarz lemma, all the options are correct. But does $f'(0)=0$ shorten the possible value list?


So I made some models in Blender and I want to upload them to CGTrader, however, I don't know how to zip them all up in a folder/archive. The farthest I've got is a .blend file zipped in an archive. I want to see all the textures listed in a folder and not just a single .blend file. Thnaks in advance!

I'm working on an animated short. I am trying to send my final results to a render farm because I don't have the processing power to render it on my computer. Each shot is in a separate linked .blend file, and the render service cannot see the linked data.  Note : All paths are relative and File->External Data->Pack All Into .blend doesn't do it  Is there a way to send a linked file as its own isolated .blend, with its own path data?


For some reason I'm not getting any good result trying to make sharp cut on subdivided object Here's the situation. Shape is otherwise round but the edge should be without smoothing

How can I use the subdivision surface modifier to create more high poly meshes without ruining sharp edges? For example this mesh  The sphere should be subdivided but the rim of the cylinder should stay the same because it is a sharp edge. This is the result of the subdevision  How can I get sharp edges to not be affected by the sub surf mod?


Define the function $f:\mathbb{R}\to\mathbb{R}$ as follow:  $f(x)=\chi_{(0,\infty)}\exp(-1/x)$  In other words: $f(x)=0$ if $x\le 0$, and $f(x)=\exp(-1/x)$ if $x>0$.  Show that $f\in C^{\infty}$.    So I think I want to show the nth derivative $f^{(n)}$ is continuously differentiable for all $n$. I might want to proceed by induction. The only point we need to worry about is when $x=0$, since for $x$ outside of its neighbor, $f$ clearly satisfy the property. So I want to show $f^{n}(0)$ exists for all $n$. That's it, $\lim_{d\to0}\frac{f^{n-1}(d)-f^{n-1}(0)}{d}=0$. Maybe I can find a closed-form for the nth derivative at $0$??

So taking the derivative of the latter half we get  $$\left(\frac{2}{x^{3}}\right)e^{\frac{-1}{x^{2}}}$$ by chain rule. Im not sure how to find the derivative at x=0, and show that it equals 0 as it only produces more '1/0' expressions. Additionally I assume to show it is not analytic at $x_0=0$, we use the taylor series for $e^{x}$ which is $$1+x+\frac{x^2}{2}+\cdots+\frac{x^{n}}{n!}$$ Where we substitute $\frac{-1}{x^{2}}$ for x to get  $$e^{\frac{-1}{x^{2}}}=1-\frac{1}{x^{2}}+\frac{1}{x^{4}2!}-\frac{1}{x^{6}3!}\cdots$$ So when we plug in x=0 this is invalid and thus is not analytic.  Is my latter attempt sufficient or do I need to add more? And how do I reach the conclusion that the function is differentiable at x=0.


Let $n$ be an odd number. Prove that $n$ is a prime number $ \iff$ $\frac{T_n(x)}{x}$ is irreducible on $Q[x]$ We have that  $ $ $T_n(x)$ is Chebyshev polynominal please help me :((

Let $T(n,x)$ be the nth Chebyshev polynomial of the first kind and let $U(n-1,x)$ the $(n-1)$th Chebyshev polynomial of the second kind. Would any one kindly help show that   1) $n$ is prime iff $T(n,x)$ is irreducible in $\mathbb{Z}[x]$.  2) $n$ is prime iff $U(n-1,x)$, expressed in powers of $(x^2-1)$, is irreducible in $\mathbb{Z}[x]$.   Many Thanks!!    No "ordering" is implied here. The wording of the question was done in similar fashion  as any question in any math/research question. I do not see how a person who is asking for help would be ordering people to help.   Any way back to the topic,  For the first part of the question, I noticed that if n is prime, then T(n,x) satisfies  Eisenstein's Irreducibility Criterion. But I am not sure how to show if T(n,x) is irreducible then n is prime.


Example:     From this angle the bridge looked just like a garden path—due to the   grass and flowers growing along it and that seemed (to be) connected   to the land ahead.   Should I use to be here? Why or why not?

The baby seems happy/comfortable. The baby seems to be happy/comfortable.   Are these both correct? If both are correct, what are the differences between them?


Hi I am looking at buying a used Canon 5d Mk1. I currently have a Canon 50d I know there is a megapixel difference and I need some advice on if I should upgrade to the 5d mk1 or stick with the 50d? 50d is crop sensor but has more megapixels than the 5d MK1.

Are more megapixels good?  Are more megapixels bad?  Do more megapixels increase detail? Do they make my images sharper? On the other side, is there a point that is too much? Do megapixels cause increased noise and other problems? How does print and viewing size come into it?  Widespread Internet-forum wisdom used to be that 6 megapixels was the sweet spot — below that just wasn't enough, but above that, there wasn't much benefit. File sizes got larger, but detail was lost to noise and other problems. The arguments are that cramming too many pixels into a small sensor makes each pixel too small to provide any real benefit, and that higher-megapixel sensors outresolve cheap lenses anyway. (Substitute something like 12 instead of 6 if we're discussing APS-C DSLRs, or 24 for full-frame.)  By 2011,  was in the range of 12-18 megapixels. In 2016 most were are in the 16-24 megapixel range. Certainly none are at 6 anymore; even smartphones come with 8 megapixel cameras. Does this offer any real improvement over that old "sweet spot"? Has technology improved to the point where the "wisdom" needs to be updated, or are we all suffering for marketing? Or have we gone past the sweet spot in some ways, but it's okay because of previously-un-argued points. (For example: more noise, sure, but more detail as well.)  Within the 16-24 megapixel common-today range, for the same sensor size, is there any actual benefit to the higher end? How do megapixels directly affect image quality with today's technology? What are the benefits and when do they apply? What are the drawbacks, and when do they apply? How should I adjust my technique (and expectations) based on my camera's megapixel count?


So the title of the presentation is too long and it doesn't fit in the footline of each frame, so it looks cut off. I'm using the Copenhagen theme.  I need to cover it, or at least put a [...] at the end of the title in the footline.

In a beamer presentation the title is long but ok for the first slide. The problem is that when the title appears below on each slide it is very long and I would like to use here some sort of running or shorter title, how can this be done?


I am getting an error when I attempt to compile my document, this has appeared since I added a few more references to Mendeley and auto generated the bib files. I get the above error pointing to the entries for the recently added reference in the .bbl file.  I tried removing the offending reference, however there are three causing problems it seems, and I do need these references.    However I have tried the suggested solution and hasn't worked for me. Everything is uptodate.  I include biblatex with these settings,  \usepackage[     natbib=true,     hyperref=true,     backend=bibtex,     backref=true,     url=false,     arxiv=false,     isbn=false,     doi=false,     maxcitenames=3,     maxbibnames=100,     style=numeric-comp,     sorting=none ]{biblatex}   A MWE follows:      \documentclass[11pt,twoside,a4paper]{article} % for the MSc in Informatics  \usepackage{microtype} \usepackage{textcomp,gensymb} \usepackage{array} \usepackage{titlesec}   \usepackage[english]{babel} \usepackage{lastpage} \usepackage{xifthen} \usepackage{lipsum} \usepackage{hyperref} \usepackage{listings} \usepackage{amsmath} \usepackage{tikz} \usepackage{booktabs,siunitx} \usepackage[nottoc,numbib]{tocbibind}  \makeatletter \def\blx@maxline{77} \makeatother  \usepackage[natbib=true,hyperref=true,backend=bibtex,backref=true,url=false,arxiv=false,isbn=false,doi=false,maxcitenames=3,maxbibnames=100,style=numeric-comp,sorting=none]{biblatex}  \addbibresource{Thesis-Weblinks.bib}  % redefine headings \titleformat{\chapter}[hang]{\LARGE\bfseries\sffamily}{\thechapter\hspace{1em}}{0pt}{}  %% Information about the title, etc. \title{MSc thesis \\ Your title here} \author{A name \\ }   \begin{document}  an example \citet{Media2016}  \maketitle   \printbibliography  \end{document}   And the bib file:  Automatically generated by Mendeley Desktop 1.16.1 Any changes to this file will be lost if it is regenerated by Mendeley.  BibTeX export options can be customized via Options -> BibTeX in Mendeley Desktop  @misc{Media2016, author = {Media, Common Sense}, keywords = {CSMMinecraft}, mendeley-tags = {CSMMinecraft}, title = {{Common Sense Media}}, url = {https://www.commonsensemedia.org/game-reviews/minecraft/user-reviews/child https://www.commonsensemedia.org/game-reviews/wii-sports https://www.commonsensemedia.org/}, urldate = {2016-08-09}, year = {2016} }

Currently having problems with compiling my Master's thesis after downloading the newest version of TeXStudio and MiKTeX. The error message is as follows:  Use of \blx@bbl@verbadd@i doesn't match its definition. \verb   The only other place I found a similar question regarding this error message was found here:   I am not sure how this applies to my problem, but from what I understand this is due to some problem in an external file. If you need the bibliography-entry, I can provide you with that on short notice, though it is rather long (which is why I didn't include it here in the first place).  I am using Mendeley Desktop v1.16.1 to automatically generate my BibTeX database.   I am using biblatex as follows:  \usepackage[backend = bibtex,         style = numeric-comp,         sorting = none,         natbib = true,         doi = false,         isbn = true,         hyperref = true]{biblatex}   I also have some code to change how the bibliography output, but I doubt it is causing the problem, as commenting it out did not help.  Hope anyone knows what causes my problem and how to fix it.  Thanks.


I would like to propose that new users not be able to delete their own questions too soon after receiving an answer. If we're going to prohibit a user from deleting their own question with an up-voted answer (as described by ), it seems that we have to give the community a chance to actually see the answer and vote.  This question () is not a great example (because it's not a great question, a little too localized), but I not only posted an answer, but did at least two additional substantial iterations of the answer as the user added additional constraints (as the question evolved from "how do I draw semi-circles" to "how do I do that in drawRect" to "how do I do that with CoreGraphics"). But as soon as I answered all of his follow-up questions, he promptly deleted the original question, probably less than two hours after he posted the original question and certainly before many people had a chance to see (much less vote on) my answer.  But I'm not looking for feedback on that particular question (while I have sinking suspicion that I just did someone's homework, but it's not clear that question is truly worthy of undeleting). I'm wondering about the broader practice. It strikes me that if up-voting is going to be a criterion for prohibiting deletion, then we have to have a window that lets the community see the answer and vote. Perhaps only let the user "vote" for the deletion of their question within the first few hours (if there is an answer).  It's just frustrating to invest so much time helping someone out, only to have it deleted with not so much as a "by your leave." (I was thinking of a more colorful metaphor, but I'll leave it there.)

Currently, authors can't  their own question   if it has multiple answers if it has a single answer with one or more upvotes, even if it has a negative score if it has an answer with an awarded bounty   I ask that another criterion be added, to prevent authors from deleting their question within 24 hours of an answer being posted.  It happened to me, , that a relevant question of reasonable quality was asked, some time consuming research went into creating an answer, and as soon as that answer was posted, the OP immediately deleted the question. This happens often with questions asked for work purposes, and .  This behavior is hard to provide feedback on, or to moderate for multiple reasons:   The community loses content (the question and the answer) without having a realistic time zone independent chance to notice or vote on it. There is no natural way to contact the OP without spamming unrelated questions. There is no way to flag the behavior as deleted questions are not flaggable by ordinary mortals The current UI does not discourage this behavior in any way, so it may not even be intentional.   Also, per Tim Post at the :     We have things in place specifically to stop people from potentially wasting their time by answering questions. You can't delete your own question if it has multiple answers, or a single answer with a score of one or higher. That generally stops it, what remains is the edge case of great answers not getting a chance to see votes before being removed.   Addressing the edge case is very simple, however.  I believe that even a relatively short protection period is sufficient to ensure an upvote on any high quality answer; but, more importantly, habitual or intentional answer snatching will become less practical, and honest question posters will better understand the public purpose of the site.  (While this does make it a little harder to delete one's own question after the OP genuinely changed their mind, there is a plenty of better ways of stopping to make a fool of oneself: improving one's question through edits, self-answering it, asking the answer owner for cooperation on deletion, waiting a day before deletion, flagging the question for closure, or requesting to be dissociated from the post.)


I am attempting to add a node to the end of my linked list, i get a null pointer exception when i get to the else statement and try to set problem.rear.next to the new node I am adding. For some reason when i attempt to set the rear.next pointer to a new node the exception pops up.  To clarify,  The BigIntegerList is a linked list of nodes which are also linked lists that represent a Big integer by linking individual integers together. The big integer list defines a "start" and "rear" node, The BigInteger node defines "x" for the data and "next" for a pointer to the next node in the list.   Also,  problem.n represents the number of BigIntegers to be read in, the method reads from a text file, the first number read states how many big integers are going to be read followed by the actual BigIntegers  Any ideas welcome as I am very stuck....  BigIntegerList problem;    LinkedList x;    BigIntegerNode curr;     problem = new BigIntegerList();    //get value of first line stating #of bigInts to read in    problem.n = LinkedList.readInteger(in);    //read big ints from text file based on first number passed, n    for(int i=0; i<problem.n;i++)    {      x = new LinkedList();      x.readBigInteger(in);      //case that the list is empty      if(problem.n<1)      {        problem.start = new BigIntegerNode(x,null);        problem.rear = problem.start;      //list is not empty, add nodes to rear      }else      {        curr = new BigIntegerNode(x,null);        problem.rear.next = curr; -----> this is where i get a nullpointer....        problem.rear = curr;      }    }    return problem;

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


Hi i have a problem trying to install ubuntu. The machine is a CX Ultrabook model CX.21903W Intel I5 with 500GB hard disk, 8 GB ram and 32 GB SSD.   From , and according to the steps guide:   We create a partition from Win8 (70 GB) using the win8 program. Confirm-SecureBootUEFI=True. From Win8, shift + Restart and from special menu we selected the UEFI Firmware Setting. From BIOS Option:   Option 1) Disable Secure Boot. Option 2) Disable UEFI (Not Available) from Option 1: Three  ways is available.  With Secure Boot enable -> We can't  even boot ubuntu. A red windows saying Soft unproper signed.   With Secure Boot disable -> and this config in boot device order:  1 - UEFI: USB 2 - Windows Boot Manger 3 - Others   with CSM (Compatibility Support Module): enable -> GRUB appears and selecting try Ubuntu then a black windows appears and nothing happens. The same result if install ubuntu is selected. With Secure Boot disable -> and this config in boot device order:   1 - USB (No UEFI) 2 - Windows Boot Manger 3 - Others   with CSM (Compatibility Support Module): enable -> GRUB appears and selecting try Ubuntu, -> Ubuntu boots and we can even install it.  Rebooting and just changing the boot order as  1 - Ubuntu [] 2 - Windows Boot Manger 3 - Others then nothings happens. Booting from LiveUSB again and, as per instructed, making Boot-Repair (A warning windows: Ubuntu is working in legacy mode.). Saving changes and rebooting, Grub works but selecting Ubuntu, a black windows appears and nothing happens. Selecting Win8, Win8 boots and works.   Up until now we are unable to install Ubuntu.  Any suggestion will be welcomed.  Kind regards and thanks in advance.

I'm absolutely new to Linux. I would like to know how to install Ubuntu alongside the pre-installed Windows 8+ OS.  Should I do it with Wubi, or through the Live USB/DVD?  What steps do I need to take to correctly install Ubuntu?


Before wordpress.stackexchange.com/ was created, a lot of WordPress questions were asked on SO. Are these going to be migrated, or are they going to stay in SO?     A good example is this question:         Also, if a question is migrated to another site, what happens to the reputation gained from it?

I have    under my belt in SO, long before  was born. My question is - should we migrate old questions like these to their respective, more fitting, SE site?  Pros for this are:   viewers of, in this example, TeX SE would probably search their website and not SO for questions. Another When I want to lookup and old question that I ask, I have only one place to look in.


I generally have an doubt about QGIS. Is it possible to Trace the feature in QGIS?  As in the case like ArcGIS for Desktop which has a tool called "Trace" in its Editor Toolbar? If yes, how we can do  it?

Is there any tool in QGIS that traces a line like the trace tool (Editor Toolbar) in ArcGIS? I want to draw a line and trace this line back so that I get the beginning and the end of the line at the same position. Any suggestions?


I would like to know whether the private static final long serialVersionUID actually matters when creating a custom exception. What does it do? How much do I need it? Can I just do public class MyException extends RuntimeException {     public MyException () { super(); } }  or do I need the serial version UID? Or the argumented constructor?

Eclipse issues warnings when a serialVersionUID is missing.       The serializable class Foo does not declare a static final   serialVersionUID field of type long   What is serialVersionUID and why is it important?  Please show an example where missing serialVersionUID will cause a problem.


Let $f:[0,1] \to R$ be differentiable. $f(0) = 0$ and $|f'(x)| \leq |f(x)|, \forall x \in (0,1).$ Prove that f is the $0$ function. I can see why it's true. I can think of various counterexamples where this will not be true if $f$ is not the $0$ function. However, I'm having trouble putting together a good proof for this. Can anyone get me started on it? I think if I can get going in the right direction I'll be good to go.

I've been stuck on this one for a while. Comes from an analysis qual question.  Let f be a function that is continuous on $\left[0,1\right]$ and differentiable on $(0,1)$. Show that if $f(0)=0$ and $|f'(x)| \leq |f(x)|$ for all $x \in (0,1)$, then $f(x)=0$ for all $x \in \left[0,1\right]$.  What I've tried doing so far is see if there was anything I could do with MVT. I didn't really see anything to do with definitions either..to which I have a feeling I'll be playing around with them. Drawing a picture was a little difficult with these conditions as well  Any hints/suggestions?


How can I search for a specific string (function name or a variable name) in my files which are in various directories under cPanel file manager?  I am a beginner. So please be extra wordy with your explanation :)  I have seen other state something about grep, but I do not have linux or any special software. If someone could tell me what I need to get started would be greatly appreciated.

How can I search for a specific string (function name or a variable name) in my files which are in various directories under cPanel file manager?  I have been using a library directory and functions on that directory are used in various apps and pages. Now, I am in a situation to change something in the library file, for which I need to know the impact on files which use this library file functions.  How to search / find / grep through the files hosted?


My knowledge of computer hardware is fairly extensive, however it is apparent that this is not the case when considering types of operating systems. I've gone by the rule of thumb for years that if a machine is over 4GB, install a 64bit version in order to use all that memory, and the opposite for choosing 32bit operating systems.  In my latest purchase of a processor, I've noticed explicit detail highlighting the processors' architecture; "32bit" or "64bit". I know this has relevance to how many bytes can be stored in registers for memory addressing, but does this play part in when considering an OS, too?   For example, if your CPU is 64bit but you have 2GB memory, shall you choose the 32bit version of an OS? According to , the answer is yes. Can someone please explain this to me, if you have the time?  I would like to know the affects of installing a 32bit system on a 64bit system with 2GB, and what role the capacity of memory really has when choosing 32/64bit hardware and software.  Edit I've correct a mistake in paragraph 3 of the question.  Edit v2 Whilst, indeed, this is a duplicate, I did search for similar questions and that question linked above was not in the results. I blame the searching algorithm, not my now perceived laziness.

What are the differences between 32-bit and 64-bit systems?  If you have used both of them, what kind of sharp differences have you experienced?   Would it be a problem to use 32-bit programs on 64-bit systems in some cases?


Can someone let me know how to use command line to find files systemwide (from root) that are created within a specific date range?  Many thanks

How can I list recursively all files that were changed between 22.12.2011 and 24.12.2011?


I wish to go from Dresden, Germany, to Moscow, Russia, via Poland and Belarus. Do I need, and how do I get a transit visa for Belarus?

I am a U.S. citizen living in Russia with a multi-entry student visa. I noticed that on my migration card it lists the Russian Federation as well as the Republic of Belarus. Do I need to get another visa if I want to visit Belarus, or is what I already have sufficient?


I am wondering the reason of the introduction of Lebesgue measurable function after Borel measurable function.

I'm having difficult time in understanding the difference between the Borel measure and Lebesgue measure. Which are the exact differences? Can anyone explain this using an example?


In the following sentence which is correct, and why?  As homeschool moms, we know there (don't/doesn't) seem to be enough hours in the day to tackle all that we want to teach our girls.

As an example, consider the two sentences:     There don't seem to be any doctors here.   and     There doesn't seem to be any doctors here.   To my ear, the first sounds great, and the second is painfully awkward.  So which is correct, grammatically? I've found lots of disagreement on this around the Web, with various sources citing different ways of treating the word "any" (as singular, always, or as either depending on to what it refers). No consensus, however, could I locate.


I'm doing a data analysis on data with more than 100 dimensions.  After that different ML-Algorithms like NN are applied to it.  When I do a PCA in the first place to reduce dimensionality to somewhat like 3-10, I persistently get better results (as in less miss-predictions) than without it.  My thought was that PCA should just speed up NN, etc, but not make them better?  Is this improvement realistic or did I make a mistake with my PCA?    This is how I´m doing it concretely:  Data; % training input Test_Data; % test input pca_size = 3; % pca size  %Scaling and Centering of Data Scaled = (Data - mean(Data))./std(Data);  coeff = pca(Scaled);  Data_Reduced = Data * coeff(:, 1:pca_size); Test_Data_Reduced = Test_Data * coeff(:, 1:pca_size);

Suppose I am running a regression $Y \sim X$. Why by selecting top $k$ principle components of $X$, does the model retain its predictive power on $Y$?   I understand that from dimensionality-reduction/feature-selection point of view, if $v_1, v_2, ... v_k$ are the eigenvectors of covariance matrix of $X$ with top $k$ eigenvalues, then $Xv_1, Xv_2 ... Xv_k$ are top $k$ principal components with maximum variances. We can thereby reduce the number of features to $k$ and retain most of the predictive power, as I understand it.   But why do top $k$ components retain the predictive power on $Y$?   If we talk about a general OLS $Y \sim Z$, there is no reason to suggest that if feature $Z_i$ has maximum variance, then $Z_i$ has the most predictive power on $Y$.   Update after seeing comments: I guess I have seen tons of examples of using PCA for dimensionality reduction. I have been assuming that means the dimensions we are left with have the most predictive power. Otherwise what's the point of dimensionality reduction?


How can I show that at each connected graph(there is a path from any point to any other point in the graph),there is a vertex,so that if we delete this vertex and the edges that conclude to it,the graph remains connected?

I have not done much proofs before this and need some guidance. I know that for a simple graph such as this :  node - node - node -node   Removing the first and last vertex will not disconnect the graph. So far, I can think of two cases: Where there are leaves, or nodes with degree of 1. Where there are no leaves, which means all nodes have degrees 2 or more.   In the first case, removing the leaf will not disconnect the graph. In the second case, removing any should not disconnect the graph. Problem is, I don't know how to formulate this into a good proof.


I have a web page built with materialize css library. This is the screenshot:  As you can see, the footer doesn't go at bottom, but remains attached to the last item (step 5). I didn't modify any file from materialize library. How can fix?

I have a simple 2-column layout with a footer that clears both the right and left div in my markup.  My problem is that I can't get the footer to stay at the bottom of the page in all browsers.  It works if the content pushes the footer down, but that's not always the case.


Some people are really good at conversations and they can run a conversation perfectly without having to reach for words. They always find the right words to say in any situation and as a result, people enjoy their conversations. What is that person called in English?

I am looking for an adjective/noun for someone who is able to speak/ makes speeches very well and uses words effectively to influence/impress people.


I run Ubuntu 14.04.3 LTS and Windows 8.1 in dual boot. Now I am getting the option to upgrade to Windows 10 but I fear that if I upgrade, it will delete Ubuntu from my system.  How can I upgrade to Windows 10 without losing Ubuntu? I have important data and it will take a lot of time to transfer my data to hard disk.  If there is a possible way to transfer my data from Ubuntu to Windows, it will also help me.

I decided to upgrade my windows 8 to windows 10. During the installation process, the computer rebooted and I got into the grub console, without having my usual menu.  I was able to proceed to the installation and use windows by choosing which hdd to boot on on my bios, but after the installation I can't boot into ubuntu again. Same issue with a grub shell.  On the grub shell, I tried to use ls (hdx,y)/ to display the information about the filesystems. Only one or two were readable, while the other always responded as unknown filesystem.  I booted on a boot-repair live disc, and was able to use the boot-repair tool, but it didn't fix anything and I still have the same issue.  Here is the boot info :   What should I do to repair my grub install and be able to boot on linux?  EDIT: using fsck I got the following result :  lubuntu@lubuntu:~$ sudo e2fsck -C0 -p -f -v /dev/sdb6 e2fsck: Bad magic number in super-block while trying to open /dev/sdb6 /dev/sdb6:  The superblock could not be read or does not describe a valid ext2/ext3/ext4 filesystem.  If the device is valid and it really contains an ext2/ext3/ext4 filesystem (and not swap or ufs or something else), then the superblock is corrupt, and you might try running e2fsck with an alternate superblock:     e2fsck -b 8193 <device>  or     e2fsck -b 32768 <device>  lubuntu@lubuntu:~$    I believe /dev/sdb6 was the partition where my system was installed while /dev/sdb2 was where I had my /boot.  I'm unable to mount /dev/sdb6 on a linux livecd.


I want to rotate video that comes from android device that always display in landscape form; so how we convert into portrait form with a same quality. I am using these code but unable to find exact code.  $ ffmpeg -i $inputfile -vf "transpose=1" $outputfile $ ffmpeg -i $inputfile -acodec copy -vcodec copy -vf transpose=1 $outputfile   Not worked for me...

I have a video that was rotated 180° when recorded. Is it possible to correct this with FFmpeg?


My desktop specification is:   intel(R)Core(TM)2 Duo cpu   E7200 @ 2.53Ghz   1.99 GB RAM     I would like to know if my system is eligible for installing ubuntu operating system

I'm thinking about installing Ubuntu Desktop, but I don't know what flavor is the best for my system. What are the minimum and recommended hardware requirements? What kind of CPU? How much memory? Should I have Hardware Acceleration? What flavor should I use?  This is an attempt of a canonical answer. My answers have the "official  requirements", the recommended are a mix of official sources and opinion based (along with the answer it's told the source). You can comment or edit if you feel that the information is obsolete or incomplete. It is a good rule of thumb that any system capable of running Windows Vista, 7, 8, x86 (Intel) OS X will almost always be a lot faster with any Ubuntu flavor even if they are lower-spec than described below.


I can run octave in the terminal by typing octave and then pressing Enter,but I can't remove octave.  I type sudo apt-get purge octave,but it say      Package 'octave' is not installed, so not removed.   I don't know why,can you guys help?  there is a question about how to completely uninstall software installed from source code,and there existed good answers to that problem.  But i also want to know why i can't uninstall by the command  sudo apt-get purge octave.  I have read that question and i learned that i can do it by the command make uninstall,but i don't know where the octave uninstall makefile is.  I think the second answer here has solved my problem and can remove install software clean.  I installed octave from source code by typing ./configure && make && make install.

I used source code to build one package such as below:  ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --libexecdir=/usr/lib --with-package-name="Myplugin" --with-package-origin="http://www.ubuntu.org/" --enable-gtk-doc --disable-static make make install   But unfortunately, i discovered that its the latest version, and has lot of bugs, so i need to remove it/uninstall it. But how can i do so? I tried make clean; make uninstall but still i see it exist:  # pkg-config --list-all | grep Myplugin myplugin-.... $ ls /usr/lib/myplugin/libXYZ.so exist....   How do you remove this now?


If I use for example 5-qubit IBM-Q quantum computer and we accept the law of quantum parallelism ($n$ qubit = $2^n$ ordinary bits), so does it mean that computational power of this computer is equal to only $2^5 = 32$ bits (transistors)? For example in last Intel core processors — hundreds of millions transistors, so is it right that ordinary processors at this time faster than 5-qubit computer for millions of times?

I am very new to quantum computing and just try to understand things from a computer scientist's perspective.  In terms of computational power, what I have understood,      100 ideal qubits ...  to [$2^n$ pieces of information]   Now Rigetti Computing has  a 128 qubit computer.   Let's imagine they indeed release it next year.  This leads me to the following thoughts, please correct me if I am wrong:   let's say hypothetically due to the noise about 28 qubits can't be taken into consideration (as used for the fault tolerance for example) that is, we could work with 100 qubits as in the example above.   Could we say then, we have an analog of  i.e. say  64 qubits go for memory and 32 qubits for the instruction set (say remaining 4 are reserved).  Does this mean then (oversimplified!):   we get 2^32 bits equivalent ~ 537 MB worth of "register bits" for CPU instructions, altogether with caches (no idea who might need that but could probably become a many-core "die" see for example ), compared to say 512KB=2^15 bits cache for one level on a classical computer and for "RAM", we get remaining 2^64 bits equivalent = 2.3 exabytes worth memory? (way more than current supercomputers have; Google had though  total disk storage of 10 exabytes in 2013)


I have a folder containing files fig-0.png, fig-1.png, ... and so on. Since there are many files, to make things convenient is is possible to write some kind of a "for" loop such that beamer makes one image per-slide?

I want to include a sequence of images in Beamer (although it can be in another type of document). Something similar to the option Photo Album in LibreOffice and MS PowerPoint.  What I did is to make a template (that I can modify):  %s \begin{frame}     \frametitle{%s}     \framesubtitle{%s}     \centering     \includegraphics[width=0.9\textwidth]{%s}  \end{frame}   And then I use a Python script to generate the code for each frame, like this:  tex_file = open(filename + '.tex', 'a+') for name in list_files:     print >> tex_file, s1 %(comment, title, subtitle, name)  tex_file.close()   After that I just use an \include in my main file to add the sequence of images.   My question: Is there a package for this task? or a better way to do it?


For $(x,y)\in \mathbb{R^{2}}$ with $(x,y)\neq (0,0)$. Let $\theta=\theta (x,y)$ be unique real number such that $-\pi<\theta\leq\pi$ and $(x,y)=(r \cos\theta , r \sin\theta)$ with $r=\sqrt{x^{2}+y^{2}}$, then function $\theta :\mathbb{R^{2}}\setminus\{(0,0)\}\to\mathbb{R}$ is   continuous bounded but not continuous.   Clearly, function $\theta$ is defined as $\theta (x,y)=\tan^{-1}\frac{y}{x}$ which is bounded. I am not able to prove that function is not continuous.

For , $(x,y)\in \mathbb R^2$ with $(x,y)\not =(0,0)$ , let $\theta=\theta(x,y)$ be the unique real number such that $-\pi<\theta \le\pi$ and $(x,y)=(r\cos \theta , r\sin \theta)$ , where $r=\sqrt{x^2+y^2}$. Then the resulting function $\theta :\mathbb R^2 \setminus\{(0,0)\}\to \mathbb R$ is (A) differentiable. (B) continuous but not differentiable. (C) bounded but not continuous. (D) neither bounded nor continuous.  Here , $\theta=\arctan\left(\frac{y}{x}\right)$. So it is differentiable in $\mathbb R^2 \setminus \{(0,0)\}$. So option (A) is correct. Am I correct ?


I have a file in this format which I want to sort  RNU2-46P    0 RNU2-2P 9 RNU2-63P    5 RNU2-36P    6 RNU2-56P    8 RNU2-17P    0   I want to sort it on column 1 and get this output  RNU2-2P 9 RNU2-17P    0 RNU2-36P    6 RNU2-46P    0 RNU2-56P    8 RNU2-63P    5   I tried the sort command but it is not sorting the way I want. Help!!  Thanks

I have a text file which is of the form -   b   SN:2 d   SN:5 f   SN:10 g   SN:11 h   SN:15 i   SA:3 j   SN:1 k   SN:4   And I want to sort by the second column, actually the numerical value in the second column.  I've tried -   $ sort -n -k2,2 file $ sort -k2.4,2.5n file   but nothing seems to work.


I get some ads that keep popping up. I got fed up of it and clicked the opt-out button next to it. That opened a tab on Chrome, and thats this:    Can anyone help me disable these ads? I don't know why these ads came in the first place.

Recently my mom's phone running Android 5.0 has been infected with a piece of adware:    At first we thought this was caused by applications, but as you can see here, only the Google/METROPCS Internet browser is running.  In the photo, there is a button that reads 'opt out'. So I clicked on it and it took me to this link at http://tracker.tpc.re/optout/mobile/:    BUT both of these options smelly fishy. For starters, the manual app is not a download link in the play store but an APK, making it seem like a virus. The second (manual) as for sensitive information, which could harm me even more.   Which one of these options do I choose? Are they legit or do I have to do get rid of it another way?


I have a pattern and a string as an input, I'm looking to find that pattern N times in the input but if doesn't work.   I tried with following pattern:      private static Pattern test = Pattern.compile("(<tag>)(.*)(</tag>)");     private static String input = "<tag>hello</tag>blablabla<tag>world</tag>";      public static void main(String[] args) {         MyClass myClass = new MyClass();         System.out.println(myClass.change(input));     }      public static String change(String text) {     StringBuilder s = new StringBuilder();      try {         Matcher m = test.matcher(text);         int pos = 0;         while (m.find()) {             s.append(text, pos, m.start());             pos = m.end();             s.append("&&" + m.group(2) + "&&");         }         s.append(text, pos, text.length());      } catch (Exception e) {         System.out.println("Exception " + e);     }     return s.toString(); }   this is what I'm getting:      &&hello</tag>blablabla<tag>world&&   and this is the result what I want:      &&hello&&blablabla&&world&&   Any idea? Thanks

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


What is the solution when we want to apply the Random Forest function in R to a predictor with more than 53 categories?  > RandomForestPrediction=function(alpha){ +   d = sort(sample(nrow(MPS), nrow(MPS)*alpha)) +   train<-MPS[d,] +   test<-MPS[-d,] +   myNtree=1000 +   myMtry=5 +   myImportance=TRUE +   mod2 = randomForest(factor(m.Decision)~.,data=train,tree=myNtree,mtry=myMtry,importance=myImportance) +   fitted=predict(mod2,test,type="response") +   return(table(fitted,test$m.Decision)) + } > RandomForestPrediction(0.7) Error in randomForest.default(m, y, ...) :  Can not handle categorical predictors with more than 53 categories.

R's randomForest package can not handle factor with more than 32 levels. When it is given more than 32 levels, it emits an error message:     Can not handle categorical predictors with more than 32 categories.   But the data I have has several factors. Some of them have 1000+ levels and some of them have 100+. It even has 'state' of united states which is 52.   So, here's my question.   Why is there such limitation? randomForest refuse to run even for the simple case.  > d <- data.frame(x=factor(1:50), y=1:50) > randomForest(y ~ x, data=d)   Error in randomForest.default(m, y, ...) :    Can not handle categorical predictors with more than 32 categories.   If it is simply due to memory limitation, how can scikit learn's randomForeestRegressor run with more than 32 levels? What is the best way to handle this problem? Suppose that I have X1, X2, ..., X50 independent variables and Y is dependent variable. And suppose that X1, X2 and X3 has more than 32 levels. What should I do?  What I'm thinking of is running clustering algorithm for each of X1, X2 and X3 where distance is defined as difference in Y. I'll run three clusterings as there are three problematic variables. And in each clustering, I wish I can find similar levels. And I'll merge them.  How does this sound?


Here is what I have tried. For reproducibility I have used [demo]. I want the plots on the right to be neatly placed and of the same height as the one on the left.   \documentclass{article} \usepackage{caption,subcaption} \usepackage[demo]{graphicx} % demo is just for the example  \begin{document} \begin{figure} \centering \begin{subfigure}[b]{.45\textwidth} \includegraphics[width=\textwidth,height=5cm]{/home/ayan/Programs/David_Parkinson/Reduced_Reshaped/Elbow.pdf} %\caption{A tall figure} \end{subfigure}\qquad \begin{subfigure}[b]{.45\textwidth}     \begin{subfigure}[b]{.45\textwidth}         \includegraphics[width=\textwidth]{/home/ayan/Programs/David_Parkinson/Reduced_Reshaped/ML_Data/BIN_1/KMeans_Cluster_1_hist.pdf}         %\caption{}\label{}     \end{subfigure}     \begin{subfigure}[b]{.45\textwidth}         \includegraphics[width=\textwidth]{/home/ayan/Programs/David_Parkinson/Reduced_Reshaped/ML_Data/BIN_1/KMeans_Cluster_1_hist.pdf}         %\caption{}\label{}     \end{subfigure}     \begin{subfigure}[b]{.45\textwidth}         \includegraphics[width=\textwidth]{/home/ayan/Programs/David_Parkinson/Reduced_Reshaped/ML_Data/BIN_1/KMeans_Cluster_1_hist.pdf}         %\caption{}\label{}     \end{subfigure}     \begin{subfigure}[b]{.45\textwidth}         \includegraphics[width=\textwidth]{/home/ayan/Programs/David_Parkinson/Reduced_Reshaped/ML_Data/BIN_1/KMeans_Cluster_1_hist.pdf}         %\caption{}\label{}     \end{subfigure} \end{subfigure}\qquad  \caption{The full caption} \end{figure} \end{document}

I need a layout similar to the following image. However I want only the 3 images on the right side to be subfigures (2a, 2b, 3c), But the big red image on the left should be numbered as Figure 1.    Currently I am using minipage and the 3 blue images are not caaptioned as subfigures.  \begin{figure} %   \centering     \begin{minipage}{0.8\textwidth}         \includegraphics[width=\textwidth]{merge-scenario}         \caption{Merge Scenario}         \label{fig:merge-scenario}     \end{minipage}%     \begin{minipage}{0.15\textwidth}         \includegraphics[width=\textwidth]{case_a}         \caption{State A}          \label{fig:case-a}         \includegraphics[width=\linewidth]{case_b}         \caption{State B}          \label{fig:case-b}         \includegraphics[width=\linewidth]{case_c}         \caption{State C}          \label{fig:case-c}     \end{minipage} \end{figure}


My laptop is Asus N56-jk, I'm an ubuntu 14.04 user, when I push the suspend button or close the lid, it just get locked or somethng like logging out, what should I do?

I'm a new Ubuntu 13.10 user. Closing the lid of my laptop does not result in the computer entering suspend mode, meaning each time I close my lid without manually suspending the computer the battery dies.  The proper settings are set in Power Management -- suspend the laptop on lid close for both AC and DC, but these do not have an effect on actual behavior.  It looks like this is a common problem for many users as far back as Ubuntu 11 -- the only solution I could find is the below. However, as a new linux user I'm not aware of how to actually execute the instructions. If someone could provide additional detail that would be tremendously helpful.  Thanks in advance.  /etc/acpi/events/lidbtn triggers /etc/acpi/lid.sh which triggers  /etc/acpi/local/lid.sh.post at the end of the script.  /etc/acpi/local/* allows you to add your own config (e.g. required for  wmii).   generate /etc/acpi/local/lid.sh.post  make it executable and add:   \#!/bin/bash  grep -q closed /proc/acpi/button/lid/*/state  if [ $? = 0 ]  then  /usr/sbin/pm-suspend  fi   wmii will now go to suspend mode when closing the lid. It'll  automatically wake up when opening the lid.     #!/bin/bash      load=$(cat /sys/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C0A:00/power_supply/BAT0/capacity)     min_load=20     if [ $load <= min_load ]; then         pm-suspend     fi


I'm continuing on my journey learning about modular arithmetic and got confused with this question:  Find the last two digits of $9^{9^{9^{…{^9}}}}$ (nine 9s). The phi function is supposed to be used in this problem and so far this is what I've got:  $9^{9^{9^{…{^9}}}} ≡ x (\text{mod } 100)$ Where $0 ≤ x ≤ 100$  $9^{9^{9^{…{^9}}}} \text{ (nine 9s) }= 9^a$ In order to know $9^a (\text{mod } 100)$, we need to know $a (\text{mod } \phi(100))$ As $\phi(100)= 40$, we get $a = b (\text{mod } 40)$  $9^{9^{9^{…{^9}}}} \text{ (eight 9s) }= 9^b$ In order to know $9^b (\text{mod } 40)$, we need to know $b (\text{mod } \phi(40))$ As $\phi(40)= 16$, we get $b = c ( \text{mod }16)$  $9^{9^{9^{…{^9}}}}\text{ (seven 9s) }= 9^c $ In order to know $9^c (mod 16)$, we need to know $c (\text{mod } phi(16))$ as $\phi(16)= 8 $ we need to find $c (\text{mod } 8)$  As $9 = 1 (\text{mod } 8)$ $c = 1 (\text{mod } 8)$  I feel like I might have made a mistake somewhere along the way because I'm having a lot of trouble stitching it all back together in order to get a value for the last two digits. Could anyone please help me with this? Thank you!

I tried to calculate the last two digits of $9^{9^9}$ using Euler's Totient theorem, what I got is that it is same as the last two digits of $9^9$.   How do I proceed further?


I asked a  and maybe because some users had their leg bitten by their dog subsequently while looking at my answer they decided to downvote it.  This makes the site look unprofessional and opinion based.

This is a follow-up from , where there is a discussion about how to handle highly voted, but closed questions.  There are a number of closed questions on Programmers (and I'm sure on other sites, too) that are really close to being good. However, in their present state, they aren't good - they are too subjective, too localized, or just not useful in their current state. However, they can be cleaned up and made into really good questions.  In the post I linked to, I not only picked out one of these questions from Programmers, but also outlined how I would make it better. It's definitely in the same spirit as the original question, but also far more useful. If I were to simply rewrite the original question, most (if not all) of the already provided answers would be invalid or just not make sense.  Currently, the only option for such a massive "reboot" of a question are for it to be reasked, either by someone else or the original asker. If the original asker fixes it, then it would invalidate answers and be up to the answerers to fix their answers or delete them. If the original asker reasks the question as a new question, they get double reputation, unless the original is deleted. If someone else asks the question in the improved manner, they get reputation for a question that isn't theirs, and the original asker gets rep for their "bad" question.  I think that diamond moderators should have the ability to reboot a question. That is, they edit the question and get edit credit, but all existing answers are removed and reputation gained for answers and the question is reset. The question is returned to the front page, like it was just asked. This could also be expanded to allow 10k+ users to vote for a reboot, proposing new wordings as well as a reopen.  Thoughts, problems?


The code  Here's a grossly simplified pseudo-code version of some C# code that I'm debugging.  // 1) Lots of files and directories are copied  // 2) Some unnecessary files are deleted  // 3) Try to delete an unnecessary directory string stubbornFolder = @"C:\...\Stubborn"; // This folder was created during step 1 above. Directory.Delete(stubbornFolder);   The problem  When it hits Directory.Delete, the following exception is thrown.  System.IO.IOException: Access to the path 'C:\...\Stubborn' is denied.   Notes   Deleting the directory "C:...\test" also works as expected. test and Stubborn both appear to have the same security settings. Both directories are completely empty. If I manually delete then re-create Stubborn using Windows Explorer (and skip over the copying code using a debugger), the deletion works as expected.   Manual deletion works even when done while the application is running.  Peeking at the access control types like suggested in  seemed to indicate that all rules were set to Allow. The unnecessary file deletion works as expected. Running the executable as an admin vs. not as an admin doesn't make any difference. There doesn't appear to be any applications that are using Stubborn as their working directory.   Help!  Any ideas on what might be causing this?

I need to delete a directory that contains read-only files.  Which approach is better:   Using DirectoryInfo.Delete(), or, ManagementObject.InvokeMethod("Delete")?    With DirectoryInfo.Delete(), I have to manually turn off the read-only attribute for each file, but ManagementObject.InvokeMethod("Delete") doesn't appear to need to.  Is there any situation where one is more preferable to the other?  Sample code (test.txt is read only).  First way:  DirectoryInfo dir = new DirectoryInfo(@"C:\Users\David\Desktop\"); dir.CreateSubdirectory("Test");  DirectoryInfo test = new DirectoryInfo(@"C:\Users\David\Desktop\Test\"); File.Copy(@"C:\Users\David\Desktop\test.txt", @"C:\Users\David\Desktop\Test\test.txt"); File.SetAttributes(@"C:\Users\David\Desktop\Test\test.txt", FileAttributes.Archive); test.Delete(true);   Second way:  DirectoryInfo dir = new DirectoryInfo(@"C:\Users\David\Desktop\"); dir.CreateSubdirectory("Test");  DirectoryInfo test = new DirectoryInfo(@"C:\Users\David\Desktop\Test\"); File.Copy(@"C:\Users\David\Desktop\test.txt", @"C:\Users\David\Desktop\Test\test.txt");  string folder = @"C:\Users\David\Desktop\Test"; string dirObject = "Win32_Directory.Name='" + folder + "'"; using (ManagementObject managementObject = new ManagementObject(dirObject)) {     managementObject.Get();     ManagementBaseObject outParams = managementObject.InvokeMethod("Delete", null,     null);     // ReturnValue should be 0, else failure     if (Convert.ToInt32(outParams.Properties["ReturnValue"].Value) != 0)     {     } }


My question is identical to this question that has already been asked back in 2011, but that does not have any answers:    I'm hoping that someone may have an answer now...  Similar to outputting the results of a command line command to a text file with the greater than sign, I would like to output the results of an AQS search to a file.  Any common parsable file format will do such as CSV or TXT.  My Win 7 AQS query is: "datecreated:4/21/2014 OR datemodified:4/21/2014" and I want to output the list of resulting files in a list file.    I am open to ideas on doing this query in a scripting language such as Powershell, Python, or even a BAT file, if anyone has such ideas.  Thanks!

In Windows 7, is there a way to get a list the files returned by the  (AQS)?  Here is an example query:  owner:bob type:image   I want the list of files returned by that query in a text document. Can I use AQS from the command line?