I have a very big text file, about 80GB, and I need to cut a part form it that lies between two given lines. The part I need is not big, and I have not enough space left on the hard drive to do things like:  head -n 10000000 filename > auxiliary_part tail -n 1000 auxiliary_part > needed_part   How do I do that?

What's a good way of extracting say, lines 20 -45 out of a huge text file. Non-interactively of course!


I'm using Service Broker to [maybe] monitor my database events, so I have my activation sp in some user database and it should react on some events by sending e-mail to admin. But it fails with the error     The EXECUTE permission was denied on the object 'sp_send_dbmail',   database 'msdb', schema 'dbo   while trying to use sp_send_dbmail.  How can I manage the permissions in my case?

When I am only trying to create a table my "DBA" gave reader, writer, "ddladmin" to the database and I am getting this error when trying to create a basic table:     The EXECUTE permission was denied on the object 'sp_send_dbmail', database 'msdb', schema 'dbo'   Can somebody please let me know the answer.


I tried following commands but its not working, my system is 14e4:4315. can someone help please. Thanks!  lspci -nn | grep 0280 The pipe symbol | is on the right side of my US keyboard on the same key with '\'. Is this your device?  Broadcom Corporation BCM4360 802.11ac Wireless Network Adapter [14e4:43a0] (rev 03) If so, then bcmwl-kernel-source is correct for your device. If you still have the install DVD or USB, then you can find it and its prerequisite there. Navigate to pool > restricted > b > bcmwl and drag and drop the deb file to your desktop. Now navigate to pool > main > d > dkms and drag and drop dkms to your desktop. Now install both with:  cd ~/Desktop sudo dpkg -i *.deb Load the driver:  sudo modprobe 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.


My question is why don't enter into if when acc.getUsername equals "stringExample"? When I print acc.getUsername() this line ealier it shows its equals but dont go into if, why?  @RequestMapping(value = "/login", method = RequestMethod.POST)     public ModelAndView checker(@ModelAttribute(value="acc") Account acc) {          System.out.println(acc.getUsername());         if(acc.getUsername() == "stringExample"){             System.out.println("aaa");         }          ModelAndView model2 = new ModelAndView("index.jsp");         return model2;     }

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


public ListViewNF(IContainer container) {     container.Add(this);      InitializeComponent();      //Activate double buffering     this.SetStyle(ControlStyles.OptimizedDoubleBuffer |     ControlStyles.AllPaintingInWmPaint, true);       //Enable the OnNotifyMessage event so we get a chance to filter out       // Windows messages before they get to the form's WndProc      this.SetStyle(ControlStyles.EnableNotifyMessage, true); }  protected override void OnNotifyMessage(Message m) {     //Filter out the WM_ERASEBKGND message     if (m.Msg != 0x14)     {         base.OnNotifyMessage(m);     } }   In the Load event:  private void Form1_Load(object sender, EventArgs e) {     ListViewNF nf = new ListViewNF(); }   I'm getting error on the line inside the ListViewNF:  InitializeComponent();      Severity   Code    Description Project File    Line    Suppression State   Error   CS0120  An object reference is required for the non-static field, method, or property 'Form1.InitializeComponent()'   I tried to remove this line to avoid errors but it didn't fix the flickering. I also tried adding listView1, beginupdate and endupdate:  listView1.BeginUpdate(); foreach (ListViewItem li in listView1.Items) {     if (li.SubItems[2].Text == lastUrl)     {         li.SubItems[0].Text = "Downloaded";         li.SubItems.Add("Color");         li.SubItems[0].ForeColor = Color.Green;         li.UseItemStyleForSubItems = false;     } } listView1.EndUpdate();   I tried this before adding the ListViewNF method. So far nothing helped with the flickering. Any suggestions?

All I want is to update an ListViewItem's text whithout seeing any flickering.  This is my code for updating (called several times):  listView.BeginUpdate(); listViewItem.SubItems[0].Text = state.ToString();    // update the state listViewItem.SubItems[1].Text = progress.ToString(); // update the progress listView.EndUpdate();   I've seen some solutions that involve overriding the component's WndProc():  protected override void WndProc(ref Message m) {     if (m.Msg == (int)WM.WM_ERASEBKGND)     {         m.Msg = (int)IntPtr.Zero;     }     base.WndProc(ref m); }   They say it solves the problem, but in my case It didn't. I believe this is because I'm using icons on every item.


Context: I'm trying to make a few modifications for a game called Grand Theft Auto V.  I'm using GET_ENTITY_COORDS function to get the coordinates of a entity in the game:  static Inline struct Vector3 GET_ENTITY_COORDS(Entity entity, BOOL alive) {     args[0] = entity;     args[1] = alive;     invokeNative(0x3FEF770D40960D5A);     struct Vector3 vector3 = { *(float*)&rets[0], *(float*)&rets[1], *(float*)&rets[2] };     return vector3; }   This should return xPos, yPos and zPos.    Now this is the code what I currently are struggling with:  #include "gta.h"  void invokeNative_s(u64 hash) {     struct Native_s** g_Natives = (struct Native_s**)NativeTableAddress;     struct Native_s* Natives = g_Natives[hash & 0xFF];     while (Natives != 0) {         for (unsigned int i = 0; i < Natives->NativeCount; i++) {             if (Natives->NativeHashes[i] == hash) {                 ((void(*)(struct NativeArg_s*))Natives->NativeFunctions[i])((struct NativeArg_s*)FreeSpaceAddress);                 return;             }         }         Natives = Natives->LastNativeTable;     } }  struct gtaVars_s {     BOOL init;     int frameCount; };  static struct gtaVars_s *gtaVars = (struct gtaVars_s*)FreeSpaceAddress+0x100;  BOOL nativeHook() {     if (!gtaVars->init) {         nativeArg->ArgValues = args;         nativeArg->ReturnValue = rets;         gtaVars->frameCount = 0;         gtaVars->init = TRUE;     }      int newFrameCount = GET_FRAME_COUNT();     if (gtaVars->frameCount < newFrameCount) {         gtaVars->frameCount = newFrameCount;          Ped pedID = PLAYER_PED_ID();         Player playerID = PLAYER_ID();          /* define player coords */         Vector3 playerCoords = GET_ENTITY_COORDS(pedID, 1);         char waterRadius = 10;          SET_SUPER_JUMP_THIS_FRAME(playerID);         SET_PLAYER_INVINCIBLE(playerID, TRUE);          if (IS_CONTROL_JUST_PRESSED(0, Button_Tpad)) {             // teleport to beach             SET_ENTITY_COORDS(pedID, -1374.881, -1398.835, 6.141, FALSE, FALSE, FALSE, TRUE);              // set water             MODIFY_WATER(playerCoords.x, playerCoords.y, waterRadius, 10);             MODIFY_WATER(playerCoords.x+2, playerCoords.y, waterRadius, 10);             MODIFY_WATER(playerCoords.x, playerCoords.y+2, waterRadius, 10);             MODIFY_WATER(playerCoords.x+2, playerCoords.y+2, waterRadius, 10);             MODIFY_WATER(playerCoords.x+4, playerCoords.y, waterRadius, 10);             MODIFY_WATER(playerCoords.x, playerCoords.y+4, waterRadius, 10);             MODIFY_WATER(playerCoords.x+4, playerCoords.y+4, waterRadius, 10);             MODIFY_WATER(playerCoords.x+6, playerCoords.y, waterRadius, 10);             MODIFY_WATER(playerCoords.x, playerCoords.y+6, waterRadius, 10);             MODIFY_WATER(playerCoords.x+6, playerCoords.y+6, waterRadius, 10);             MODIFY_WATER(playerCoords.x+8, playerCoords.y, waterRadius, 10);             MODIFY_WATER(playerCoords.x, playerCoords.y+8, waterRadius, 10);             MODIFY_WATER(playerCoords.x+8, playerCoords.y+8, waterRadius, 10);         }     }      return TRUE; }   But I'm getting multiple errors from the GET_ENTITY_COORDS function even though I have defined the function above in my script:  source/gta.c:42:3: error: unknown type name ‘Vector3’    Vector3 playerCoords = GET_ENTITY_COORDS(pedID, 1);    ^ source/gta.c:42:26: error: incompatible types when initializing type ‘int’ using type ‘struct Vector3’    Vector3 playerCoords = GET_ENTITY_COORDS(pedID, 1);                           ^ source/gta.c:53:29: error: request for member ‘x’ in something not a structure or union   Does anybody know what the cause of this error is, and how I can fix it? I would appreciate it a lot since I'm struggling with this for quite some days and would love to see it resolved, thank you in advance.

I have seen many programs consisting of structures like the one below  typedef struct  {     int i;     char k; } elem;  elem user;   Why is it needed so often? Any specific reason or applicable area?


I created a input field in HTML, passed the value into PHP. When user provides a name with ' (single quotation) in it my script is breaking. Upon debugging I found out PHP was issue. Can any one show me how to accept ' (single quotation) and " (double quotation)  Below is my code:     HTML:   Name: <input type="text" name="v1" id="text_input" size="30" required/>

      PHP:   $v1_name = $_POST["v1"];   FYI: Its not sql injection. I need to send that quote as string.

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


Posting it again, but with more information. I want to disable Hyperlink and convert the link to text in SharePoint.  I`m using Jquery and below is the code. the code works fine for the first time, but if you click on any other section wherein we want the link to work and comeback to the page. Then the link that was disabled via Jquery even start functioning again.  <script src="//code.jquery.com/jquery-1.10.2.js"></script>  <script>  $(function() {  $('.ms-vb').removeAttr("href"); // disable all links in a document $('a').removeAttr("href");   });  </script>   Any suggestion on how the link doesn't function even if the page is refreshed or so.

I want to disable the hyperlink for a specific class part of Site Feeds in SharePoint 2013.  I`m using Jquery to do the same, but it is not working for me. Code for reference  <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.3/jquery.min.js"></script> <script type="text/javascript">     var location= $('.ms-microfeed-userName ms-textLarge ms-subtleLink').attr("href");  $(".ms-microfeed-userName ms-textLarge ms-subtleLink").removeAttr('href');  $('ul').addClass('expanded');  $('ul.expanded').fadeIn(300);  $(".ms-microfeed-userName ms-textLarge ms-subtleLink").attr("href", location);    </script>


This is my first question here, so please bear with me.  I am working on a regression model to estimate the long term value of users of a certain website. For example, I would like to estimate the value of user $A$ after $180$ days, given their revenue data up to day $30$. To be more specific, denote by $x_{ij}$ the average daily amount of money spent by user $A_i$ up to day $j$. The problem can then be rephrased to predicting $y_i := x_{i, 180}$ from $(x_{i1}, \ldots, x_{i,30})$. After applying some inverse trigonometric transformation to the data to reduce its range, I have tried a few classifiers (linear regression, k-nearest neighbours, random forests) that perform reasonably well, though I feel that my procedure is not optimal.  As you might have guessed, the data is very skewed towards non-paying users. Actually, only 1%-1.5% of the users are paying users, which means that roughly $99$ out of $100$ rows in my dataset consist of all zeroes. How should I deal with this situation?  Option 1: Should I include the non-paying users when training the classifiers? In that case, even a sample of the data would have to be huge to actually include a reasonable amount of paying users (e.g., ~ $100000$ data points would contain ~ $1000$ paying users). More importantly, many models could be biased towards zero, given the disproportionate amount of zero observations. Last but not least, training the model becomes (perhaps unnecessarily) costly.  Option 2: Disregard non-paying users altogether and train the classifier only on paying users. However, I'm unsure whether the regressor would be artificially biased towards nonzero values. This is certainly the case for users having $x_{ij} = 0$ for $j=1, \ldots, 30$, as the prediction will be some nonzero $y'_i$, while the true value $y_i$ is almost surely $0$.  Option 3: Some combination of the above two. Something that comes to mind is to first address the binary nature of the data (paying vs. non-paying) by straight up estimating $y'_i = 0$ for users $A_i$ that are non-paying up to day $30$. On the other hand, if $x_{i,30} > 0$, we predict $y_i$ using a classifier trained only on users that have already paid at day $30$.  Any suggestions about what option above is most suitable? More generally, does anybody have some insight into how this type of problem is usually tackled? Thank you for your time.

I'm currently trying to apply a linear model (family = gaussian) to an indicator of biodiversity that cannot take values lower than zero, is zero-inflated and is continuous. Values range from 0 to a little over 0.25. As a consequence, there is quite an obvious pattern in the residuals of the model that I haven't managed to get rid of:   Does anyone have any ideas on how to solve this?


$$ f(x) :=\text{continuous and 1st order differentiable function} $$ $$ \lim_{ x \to \infty}f'(x)=a $$ What I want to prove is the below statement. $$ \lim_{ x \to \infty}\left( f(x+1)-f(x) \right) =a  $$ I guess that using mean value theorem is the key to deduce it however I've been stuck from here. Can anyone give me some hint(s)? so that I can deduce it in my own.

I've been stuck on this question for a long time now and was wondering if anyone could show me how it's done. So far I have done the following: Since $\lim_{x\to \infty}f'(x)=M$ then $\forall \epsilon ,\exists A >0$  s.t. if $x>A$ then $|f'(x)-M|<\epsilon$. So we have that $M-\epsilon<f'(x)<M+\epsilon$. By MVT on $[x,x+1]$ for $x>A$, $\exists c\in (x,x+1)$ s.t. ${f(x+1)-f(x)\over 1}=f'(c)$. Therefore, $M-\epsilon<f(x+1)-f(x)<M+\epsilon$. However, I do not know what to do after this.


Why is the verb when paying for a service subscribe, but the noun form is subscription?  Is there a rule that changes "b" to "p"?

I've just wondered by it is "description", but "to describe". It looks as if "to descripe" would be a more consistant choice. Is there any other explanation besides "this is how it is written for years"?  edit: Or alternatively "to describe" and "describtion".


A conversation this week at work reminded me of , and the question was asked if instead, you could rent instead of buying?  (Politics and amendments aside, whether guns are good or bad, just whether it's possible, legally)

Looking to find out if it is legal to borrow or rent a gun from an individual(s) or company to use to either visit the various gun ranges or wildlife hunting in Florida.  I have a shotgun licence in the UK for hunting etc... but looking to do something similar in Florida without falling foul of any gun carrying laws in transit to any gun range or hunting area?  I know various friends in the US that would lend the guns while there but are they required to be with me while attending any event? Basically not looking to be tethered to any third party...


Show that $\binom{n}{3} = \binom{n-1}{2} + \binom{n-1}{3}$  My solution   Formula: $\binom{n}{k} = \frac{n!}{k!(n-k)!}$  $LHS = \binom{n}{3} = \frac{n!}{3*2(n-3)!} = \frac{n(n-1)!}{3*2(n-3)(n-4)!} = $  $ = \frac{(n-1)!}{3*2(n-4)!}*\frac{n}{n-3} = \binom{n-1}{3} * \frac{n}{n-3} $  So i got one term right. Anyone know how i could continue from here? :)

I'm trying to prove that ${n \choose r}$ is equal to ${{n-1} \choose {r-1}}+{{n-1} \choose r}$ when $1\leq r\leq n$.  I suppose I could use the counting rules in probability, perhaps combination= ${{n} \choose {r}}=\frac{n!}{r!(n-r!)}$.  I want to see an actual proof behind this equation.  Does anyone have any ideas?


I have an ODS file with a long list of names and amounts in columns A and B. Many of the names are duplicates. For example  John  | 10 Bill  | 2 Susan | 3 Frank | 4 Sally | 10 John  | 2 Susan | 2 John  | 3   Is there any automated way to combine all of the values so I get another list of names and amounts in columns C and D, without any duplicate names and a single sum of all of each person's entry? For example  John  | 15 Bill  | 2 Susan | 5 Sally | 10

I have a simple spreadsheet like this:  Invoice_Number     Invoice_Date      Invoice_Amt 1000               1/1/12            1 1001               1/1/12            2 1002               1/2/12            3 1003               1/3/12            4   How can I get LibreOffice Calc to create a sum of the amounts for each date?  I have a feeling it has do with outlining and grouping, but I can't get the incantation right.


Level 10 Circle of the Moon Druid has two uses of wild shape. At level 2 a player gets "combat wild shape" so you can choose to use your bonus action to transform.   Combat starts, your first turn you bonus action wild shape into a giant eagle (80 fly speed) and fly up into the air 160 feet (dash action). Round 2, you move yourself over an unsuspecting enemy, maybe you even use your action to dash higher. Let's say at this point you are 300 feet above an enemy (and you have keen sight so you can definitely see him.) Time for bonus action wild shape into an orca (8-12k pounds).  Xanathar's says when you fall, you instantly descend 500ft. So you can easily drop down on an enemy before he can react. Besides, you are now a huge beast and hard to avoid. Max damage = 20d6 (200ft)  How would you rule on a target enemy taking damage vs. how much damage do you take?

If a character who was under the effect of a growth potion (double their height and eight times their weight) and weighed 2,400 lbs. was able to use Dimension Door to teleport 400 feet or more into the air, directly above a Huge-sized monster, and fell on it, how much damage would the falling creature - and the monster - take?  I would assume both would take the 20d6 max for the falling over 200 feet, but is there a estimation on additional damage for the falling creature's size?  According to the splat calculator, at 500 feet you'd be falling at 196 km/hr, and it would expend 1.6 million joules of energy, the equivalent of over 3,000 mid-sized cars hitting an object at 60 km/hr.  A 2,400-lb. barbarian falling 500 feet is like dropping a mid-sized Toyota Corolla off a 50 story building onto a monster - it should do some damage.


I am trying to move a file into a folder in Ubuntu using a terminal. But I have no idea how to do this. Any Suggestions?

I want to move one file to a folder using terminal. How do I do this?


I'm very new to Blender and am having a bit of trouble. After I Shift + A > Mesh > Cylinder, I want to pull up this menu:    How would I do this, please? It doesn't just pop up after I add in the cylinder. Thanks.

When you add a new object into the blender scene, normally on the tool shelf a window will become available where you can put in the objects size or number of vertices etc.  These options:   For what-ever reason, when I now add an object I am no longer seeing that area where I can alter the measurements. Currently I want to use the Spin function but I need to alter it but I have no way of effecting how the spin operates. Does anyone know what I have done or how to fix it?


I am working on downloading the essential libraries to run dnn experiments   Everything was fine until I reboot   I ran Ubuntu-driver devices  And it is up to date   Any ideas how to get the GUI back ??  Thanks

How to switch between virtual console and GUI in Ubuntu? I wanted to see what key functions would allow me to switch between the two.


I am having trouble with using date as a variable in a bash script. I will admit that I have zero experience writing anything – in bash or otherwise – but I’ve been tasked with figuring this out. I have seen some other posts on here that come close to what I am looking for, but I haven’t been able to figure it out yet.  I need to move hundreds of log files from one directory to an archive directory named with the year and month (numerically) of last month, eg., 2016-07. I want the script to look in the archive directory to see if the directory for last month is there and, if not, create it and then move the logs into it. I’m using RHEL 5.11.  From the command prompt this gives me what I need:  date +%Y-%m –d “last month”   Which returns: 2016-07  I just can't get it work as a variable. I've tried the following (amongst other things):  last_month=date +%Y-%m -d "last month" last month=(date +%Y-%m -d "last month")

I want to assign the result of an expression (i.e., the output from a command) to a variable and then manipulate it – for example, concatenate it with a string, then echo it.  Here's what I've got: #!/bin/bash cd ~/Desktop; thefile= ls -t -U | grep -m 1 "Screen Shot"; echo "Most recent screenshot is: "$thefile;  But that outputs: Screen Shot 2011-07-03 at 1.55.43 PM.png Most recent screenshot is:   So, it looks like that isn't getting assigned to $thefile, and is being printed as it's executed. What am I missing?


Assume that there is a attack going on, with 3 P.E.K.K.As and an Archer Queen. Now, I planed to throw a healer in the middle of the Archer Queen and a P.E.K.K.A locked on two air defences, what are the chances that healer targets Archer Queen and left the P.E.K.K.A (If the other P.E.K.K.As are locked in the core )??  EDIT- I have seen  but it have'nt helped as my question is different, as if the healer is thrown at a distance that the Archer Queen and P.E.K.K.A are at same distance which will healer heal first?? (I probably want the healer to target the Archer Queen).

I've been using healers lately, which I haven't really utilized much before. I've noticed that they will sometimes switch targets, even when their original target still lives.   What conditions are needed for healers to switch targets?


I bought a Dell Inspiron 14 3442 laptop pre-installed with Ubuntu 12.04 LTS , however I am having issues with the WiFi connection. I receive the error message: Has closed the connection every time that I attempt to activate the network. Wired and bluetooth connections are working perfectly but issue is solely with wireless.  My wireless network card is a Qualcomm Atheros QCA95665 / AR9565.  $ lspci -nnk | grep -iA2 net 06:00.0 Network controller [0280]: Qualcomm Atheros QCA9565 / AR9565 Wireless Network Adapter [168c:0036] (rev 01)     Subsystem: Dell Device [1028:020c]     Kernel modules: ath9k 07:00.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL8101E/RTL8102E PCI Express Fast Ethernet controller [10ec:8136] (rev 07)     Subsystem: Dell Device [1028:0651]     Kernel driver in use: r8169   And the output of modinfo ath9k are:  filename:       /lib/modules/3.5.0-60-generic/updates/dkms/ath9k.ko license:        Dual BSD/GPL description:    Support for Atheros 802.11n wireless LAN cards. author:         Atheros Communications srcversion:     BC752C884CE7A724FD00A1C alias:          platform:qca955x_wmac alias:          platform:ar934x_wmac alias:          platform:ar933x_wmac alias:          platform:ath9k alias:          pci:v0000168Cd00000036sv*sd*bc*sc*i* alias:          pci:v0000168Cd00000037sv*sd*bc*sc*i* alias:          pci:v0000168Cd00000034sv*sd*bc*sc*i* alias:          pci:v0000168Cd00000033sv*sd*bc*sc*i* alias:          pci:v0000168Cd00000032sv*sd*bc*sc*i* alias:          pci:v0000168Cd00000030sv*sd*bc*sc*i* alias:          pci:v0000168Cd0000002Esv*sd*bc*sc*i* alias:          pci:v0000168Cd0000002Dsv*sd*bc*sc*i* alias:          pci:v0000168Cd0000002Csv*sd*bc*sc*i* alias:          pci:v0000168Cd0000002Bsv*sd*bc*sc*i* alias:          pci:v0000168Cd0000002Asv*sd*bc*sc*i* alias:          pci:v0000168Cd00000029sv*sd*bc*sc*i* alias:          pci:v0000168Cd00000027sv*sd*bc*sc*i* alias:          pci:v0000168Cd00000024sv*sd*bc*sc*i* alias:          pci:v0000168Cd00000023sv*sd*bc*sc*i* depends:        ath9k_hw,ath9k_common,mac80211,ath,compat,cfg80211 vermagic:       3.5.0-60-generic SMP mod_unload modversions  parm:           debug:Debugging mask (uint) parm:           nohwcrypt:Disable hardware encryption (int) parm:           blink:Enable LED blink on activity (int) parm:           btcoex_enable:Enable wifi-BT coexistence (int) parm:           enable_diversity:Enable Antenna diversity for AR9565 (int)

I purchased an HP laptop with the Qualcomm Atheros AR9565 (QCWB335) wireless adapter. I understand that this adapter is currently not supported on Ubuntu 12.04 and there is no way to get wireless access.  I installed compat-wireless-3.6.6-1 ath9k driver and it didn't work, lshw -C network still showed *-network UNCLAIMED after reset.  How can I figure out when Ubuntu will have driver for AR9565? Is there a workaround to get wireless working somehow?


So I bought an Arduino today, my high school grades were terrible but I decided to dive into electronic engineering anyway.  I am a total noob so please forgive me. So Ohm's law states v = R * I, therefore V/R=I. If I have 3.3 V output from an Arduino that shall give me 0.1 amp. and 10 ohm resistor will produce a current of 0.33 amp.   "Any electrical device used on a house wiring circuit can, under certain conditions, transmit a fatal current. While any amount of current over 10 milliamps (0.01 amp) is capable of producing painful to severe shock, currents between 100 and 200 mA (0.1 to 0.2 amp) are lethal."  Why am I still alive?  Part 2.  Scenario: I connected a 33 ohm resistor to 3.3 V Arduino output, according to a plan that shall produce 0.1 amp, but my multimeter reads 0.01 amps.  Again please forgive me, it is my first day of electronic engineering.

While playing with mosquito racket in my home, I unscrewed the racket and touched the 2 wires with my hands. I felt that my bones were dislocated, I got shocked, but I am not dead.  My calculations say that I should die:  the output voltage is 5 kV to 10 kV, my body resistance is approx. 50 kΩ, the current through my body is 0.1 A if 5 kV to 0.2 A if 10 kV.  According to the table at  I should die; I tried this many times but I am still alive.  I think my interpretation regarding current, voltage and my body resistance is wrong (if right I would be dead by now) - please tell me why I am not dead?


After install Lubuntu 16.04 show the following message during the boot:  lvmetad is not active yet; using direct activation during sysinit /dev/mapper/lubuntu--vg-root: clean, 121574/7168000 files, 1115621/2865544 blocks   I wait 1 hour but don't show the login screen.  I can login using Crtl+alt+F2, return "Welcome to Ubuntu 16.04 LTS" in a screen like terminal... but I dont know how continue to can use the computer or fix the problem... Some suggestion?

After upgrade to Ubuntu 16.04, it is showing the following message during the boot:  lvmetad is not active yet; using direct activation during sysinit  lvmetad is not active yet; using direct activation during sysinit  /dev/mapper/server--vg-root: clean xxx/xxx files, xxx/xxx blocks   The Xs refers to a big sequence of numbers. After this message appears, the login screen is shown and I can log in to the system.  How can I solve this problem?


Is there way to create a dynamic dependent picklist that can get the value from Salesforce metadata?  My workaround for now is to setup a hard-coded.

It's possible to define dependent picklist in the setup and the are supported out-of-the-box in Visualforce.  Are they also supported in Lightning natively? Is it on the roadmap to support them soon? If not: is there a best practice or a easily reusable workaround available right now?


I am using this code to extract the genres from list of dictionaries.  dict=[{'genres': ['Thriller'], 'year': '2014'}, {'genres': ['Animation','Drama'], 'year': '2014'}] test=[i["genres"] for i in dict] test [['Thriller'], ['Animation', 'Drama']]   I want to remove the inner list and create single list.  Expected output:['Thriller', 'Animation', 'Drama']

Is there a simple way to flatten a list of iterables with a list comprehension, or failing that, what would you all consider to be the best way to flatten a shallow list like this, balancing performance and readability?  I tried to flatten such a list with a nested list comprehension, like this:  [image for image in menuitem for menuitem in list_of_menuitems]   But I get in trouble of the NameError variety there, because the name 'menuitem' is not defined.  After googling and looking around on Stack Overflow, I got the desired results with a reduce statement:  reduce(list.__add__, map(lambda x: list(x), list_of_menuitems))   But this method is fairly unreadable because I need that list(x) call there because x is a Django QuerySet object.  Conclusion:   Thanks to everyone who contributed to this question.  Here is a summary of what I learned.  I'm also making this a community wiki in case others want to add to or correct these observations.  My original reduce statement is redundant and is better written this way:  >>> reduce(list.__add__, (list(mi) for mi in list_of_menuitems))   This is the correct syntax for a nested list comprehension (Brilliant summary !):  >>> [image for mi in list_of_menuitems for image in mi]   But neither of these methods are as efficient as using itertools.chain:  >>> from itertools import chain >>> list(chain(*list_of_menuitems))   And as @cdleary notes, it's probably better style to avoid * operator magic by using chain.from_iterable like so:  >>> chain = itertools.chain.from_iterable([[1,2],[3],[5,89],[],[6]]) >>> print(list(chain)) >>> [1, 2, 3, 5, 89, 6]


Let $I\subset \mathbb{R}$ be open interval ,let $f:I\to \mathbb{R}$ be differentiable on $I,$ suppose $f''(a)$ exist at $a \in I$.  show that $$f''(a)=\lim _{h\to 0}\frac{f(a+h)+f(a-h)-2f(a)}{h^2}$$  how can we approach this .i was thinking of MVT.  applying MVT on $[a,a+h]$, we have $$f(a+h)-f(a)=hf'(\alpha_1)$$, where $\alpha_1\in(a,a+h)$  similarly $$f(a)-f(a-h)=hf'(\alpha_2)$$ where $\alpha_2\in(a-h,a)$  subtracting these we get  $$\frac{f(a+h)+f(a-h)-2f(a)}{h^2}=\frac{(f'(\alpha_1)-f'(\alpha_2))}{h}$$  now taking limit $h \to0$ both side, can we somehow  connect right hand side to $f''(a)$   any hint?? or some other method .i have seen this question already on stackexchange ,but most of them are using taylor expension up to 2nd order, but we are given  function is  twice differentiable at $x=a$,we donot know about twice differentiability at other points,so how can we use taylor expansion in this case???

Let $f:U\longrightarrow \mathbb{R}$ where $U\subset\mathbb{R}$ open set and $f$ twice-differentiable in $a\in U$.  How to prove that $$f''(a)=\lim_{h \to 0}\frac{f(a+2h)-2f(a+h)+f(a)}{h^2}$$   without using Taylor or L'Hopital's rule.   Any hints would be appreciated.


I use Stack Exchange site through my phone (iPhone) way more frequently than I do through the desktop website. When I do that, I really wish that typing the @ symbol would offer the same auto-completion of names that it triggers on the desktop site.  Is anyone working on getting that feature working? If not, I'd like to ask that you prioritize it.

Currently there is no comment button or @ autocompletion when writing a comment in reply to another comment on Stack Exchange for mobile Chrome  on Android. It would be a good time saver to have this feature.


I want to merge my sda7 with the unallocated space. However, I am not sure how to do it.  This is the Memory allocated in my device.   Thanks in Advance.

Till today I was using ubuntu 13.04 in my windows7/ubuntu dual boot. Just now I have upgraded to ubuntu 14.04. My software updater showed an updates available message. I proceeded with  Install Now . Soon I got the following window.    Then I tried sudo apt-get clean as recommended. Nothing happened! Not even a window opened. Teach me deleting the temporary packages.   Deleting temporary files may not be highly helpful in case of further updates and installs for I don't have too much space left in my /. I wanna extend my / partition with the help of the unallocated space in my HD. The following is my Gparted window.       I got an answer . But it wasn't useful for me. I had two choices. But the answer wasn't working for both my chioces.  Choice 1: I may use the 4.25 GiB unallocated space to extend my /dev/sda10. To do so, I must need to move my linux-swap partition. But my Resize/Move option is disabled for the linux-swap partition. Choice 1 failed!   Choice 2: I may use the 14.35 GiB unallocated space instead. In this case I must move more than one partition. /dev/sda4  partition is the first on the list. Even that partition has the same problem. Resize/Move option is disabled. Choice 2 failed!  I am out of choices now.  What shall I do? Help me to extend my / with Gparted.


I want to present an algorithm with the package algorithm2e. It mostly works fine, only the position of the line numbers are wrong. The numbers are printed within the margin of the page.   I figured out, that it is an interaction with the fontenc package. But I need fontenc and I am looking for a solution. In the pictures you can the the problem and how ist should be. Is there a solution?  You find the code below as well as pictures. Because the document's language is German, I need all included packages...  \documentclass[a4paper,parskip=half]{scrbook} \usepackage[ngerman]{babel}          \usepackage[utf8x]{inputenc}          \usepackage[T1]{fontenc}             \usepackage[vlined,ruled,linesnumbered]{algorithm2e}   \begin{document} I am the text and I decide the width of the page. Nothing should be wider than me, especially not the line numbers.       \begin{algorithm}      \SetAlgoLined      \KwIn{this text}      \KwOut{how to write algorithm with \LaTeX2e }       initialization\;      \While{not at end of this document}{        read current section\;        \eIf{understand}{          go to next section\;          current section becomes this one\;          }{          go back to the beginning of current section\;          }        }      \caption{How to write algorithm}    \end{algorithm} \end{document}   This is generated with the code above    This is generated with the code above, but with deleted fontenc package

I have a problem with scrarticle (and its option parskip=half), fontenc and algorithm2e:  \documentclass[parskip=half]{scrartcl} \usepackage{fontenc} \usepackage[boxed]{algorithm2e}  \begin{document} \begin{algorithm}     \KwData{test} \end{algorithm} \end{document}   If you compile this document (with pdflatex), then there is no padding between the text and the frame of the algorithm. If you remove parskip=half or \usepackage{fontenc} (or both), then everything is fine.  What is happening here? Did I do anything wrong? How to fix this problem?


I understand the geometric meaning of cross product but not getting with what dot product of two vectors actually implies geometrically.

I know how to calculate the dot product of two vectors alright. However, it is not clear to me what, exactly, does the dot product represent.  The product of two numbers, $2$ and $3$, we say that it is $2$ added to itself $3$ times or something like that.  But when it comes to vectors $\vec{a} \cdot \vec{b}$, I'm not sure what to say. "It is $\vec{a}$ added to itself $\vec{b}$ times" which doesn't make much sense to me.


I have at Ubuntu 12.04 swap size the same as my RAM - 1Gb.  I want to increase this a little bit, till 3Gb. Increase 2Gb of swap size.  I read  but I can't understand how to keep having this swap capacity that I have and add additional space?  Here you can see my disk structure with gparter:    I hope someone can help me increase swap size.

I have, by default, 250MB of swap space in Ubuntu, and I want to expand it to a larger size. I need 800MB, which I think will be enough to open several applications without having to hit the current limit of swap. I hope someone can help me.


I am an Indian citizen currently in Norway and I have a residence permit. I have to travel to Switzerland but I do not have my passport with me as it is gone to another embassy for visa stamping.  Can I travel to Switzerland without my passport? I am not sure what they will ask me at Zurich airport and also when I return to Oslo.

I am currently located in the Netherlands and have lived here for 4 years. I have a working visa for the Netherlands and would like to go on vacation to another country in Europe. I however do currently not have my passport as i sent it to an embassy for a visa application. Will I still be able to travel inside of Europe without a passport if I have my residency ID?  I have a resident permit, not a true Dutch ID. And I own a passport that is currently in transit.  I have called with the KLM and the service employee's conclusion was that I do need to carry my passport with me when i am going to fly, so it seems all I can do is wait and hope my passport is returned to me in the next few days as the amsterdam US consulate (who currently holds my passport) is incredibly difficult to contact for urgent matters.


Imagine a class which can be constructed only with the new operator. Is it possible to achieve this in the c++17 standard without deleting its destructor?  class Foo {     Foo(){}     ~Foo(){}     // delete non-dynamic constructor...? }  // ... Foo A; // compiling error Foo* B = new Foo(); // ok

Is it possible to prevent stack allocation of an object and only allow it to be instiated with 'new' on the heap?


I recently noticed that I have ground wires attached to metal water pipes in my home, as shown in the following image.    The area marked A is where the water service enters the home with that blue handled valve being the main shut off.  The area marked B shows two exposed wires (assumed grounds) that are secured to the pipe which is the water heater's outgoing pipe.   Am I incorrect in thinking that the grounds should be secured to the other pipe, the one that brings water service into the home?

indicates that the water pipes should bonded to the electrical ground even if a grounding rod is used. How would one normally tell if that is the case? Is that bonding required to be accessible, or can it be hidden behind walls or buried? Where in the water system would it normally be bonded (e.g., before the main water shutoff, after, at the hot water tank)?  I recently had my electrical panel relocated and replaced, and don't recall seeing anything running from the panel to a water pipe - in the old panel or new. The electrician put in an intersystem bonding bridge, so the new ground rod, ground from the panel, and ground from the cable service are connected to it. I suppose that's where the bond from the water pipe would go?


As per my information I am eligible for badges Enlightened (first to answer and accepted with score of 10 or more) and Guru (accepted answer and score of 40 or more), also a few badges from answer section on Stack Overflow, but I have not been awarded by those badges.  May I know why I haven't received these badges?

Formerly List of all badges with full descriptions.  What are badge name's requirements? Why didn't I get badge name ? Which badges can I earn multiple times?    Jump to:                    Note: Some badges are awarded based on score. The term score means the total number of upvotes minus the total number of downvotes.  Any badge with a *** next to it is one of 20 badges that count towards the  displayed on a moderator candidate in an election. The candidate score is a total of 40 points: the first 20 are awarded based on the user's rep divided by 1000 and rounded down; the second 20 represents the total number of unique badges earned of the 20 that count. Note that if the same badge is earned multiple times, it will only count once towards the candidate score.  Any badge with a "(retired)" next to it is no longer awarded, but is retained by users who previously earned them. See  for more info on what it means for a badge to be retired.       Visit the  of the  on any site to see a complete list of badges that you can filter by earned, unearned, or type.


I'm creating a method to handle file exceptions.  I have listed all files in a directory and search for subdirectories and list all files in those subdirectories too on the C:\Users\ folder  listBox1.Items.AddRange(Directory.GetFiles("C:\\Users\\", "*", SearchOption.AllDirectories));   Some files are protected by windows, and when you run a command for those files it gives me an exception.  If there is any possible, How can I save the files that returned the exception to another listbox when the exception happens and continue listing the files to first listbox?

I am trying to display a list of all files found in the selected directory (and optionally any subdirectories). The problem I am having is that when the GetFiles() method comes across a folder that it cannot access, it throws an exception and the process stops.  How do I ignore this exception (and ignore the protected folder/file) and continue adding accessible files to the list?  try {     if (cbSubFolders.Checked == false)     {         string[] files = Directory.GetFiles(folderBrowserDialog1.SelectedPath);         foreach (string fileName in files)             ProcessFile(fileName);     }     else     {         string[] files = Directory.GetFiles(folderBrowserDialog1.SelectedPath, "*.*", SearchOption.AllDirectories);         foreach (string fileName in files)             ProcessFile(fileName);     }     lblNumberOfFilesDisplay.Enabled = true; } catch (UnauthorizedAccessException) { } finally {}


How can I make it so that a certain field on the user profile/account is only editable by an admin?  I added the "file" field to accounts, but I want admin's to be the only ones to be able to populate the field.  I dont think there are permissions for this.

What is the best way to create a piece of content with multiple fields... allowing users to edit the content as a whole yet blocking the ability to edit.  The setup I have is a piece of content that has 3 fields: Body, PDF, SWF... and a "Selector" (List Text) that's tied via dependancy. So the user chooses BODY, PDF or SWF and that's what available to edit and shown on the page when live.  What I want to do is add a PHP field... that's either:     greyed out (unable to edit) if your not admin...   doesn't show up in the Drop Down list... Can't select it if you can't see it Shows up on the drop down, but the field doesn't show up in the editor without permissions.   I hope I'm making sense... I can provide an example if needed.


I am citing a lot of articles from the same research groups, but with tiny changes to the author lists. To differentiate between these references, biblatex chooses to spell out the authors in my in-text references to avoid ambiguity. However, I would rather like to have biblatex add a letter behind the year.  In short, this:  Some claim (Firstauthor et al 2015a; Firstauthor et al 2015b).   instead of this:  Some claim (Firstauthor & Secondauthor 2015; Firstauthor & Randomauthor 2015).   Is this easily fixed?

I'm wondering how biblatex efforts to make citations unique works.  Consider an example:  \documentclass{article}  \usepackage{filecontents} \begin{filecontents}{file.bib}  @ARTICLE{ex1,    author = {{Ď{}urech}, J. and {Vokrouhlický{}}, D. and {Kaasalainen}, M. and      {Weissman}, P. and {Lowry}, S.~C. and {Beshore}, E. and {Higgins}, D. and      {Krugly}, Y.~N. and {Shevchenko}, V.~G. and {Gaftonyuk}, N.~M. and      {Choi}, Y.-J. and {Kowalski}, R.~A. and {Larson}, S. and {Warner}, B.~D. and      {Marshalkina}, A.~L. and {Ibrahimov}, M.~A. and {Molotov}, I.~E. and      {Michalowski}, T. and {Kitazato}, K.},     title = {{New photometric observations of asteroids (1862) Apollo and (25143) Itokawa - an analysis of YORP effect}},   journal = {Astronomy and Astrophysics},      year = 2008,     month = sep,    volume = 488,     pages = {345-350}, issn = {1432-0746}, }  @ARTICLE{ex2,    author = {{Ď{}urech}, J. and {Vokrouhlický{}}, D. and {Kaasalainen}, M. and      {Higgins}, D. and {Krugly}, Y.~N. and {Gaftonyuk}, N.~M. and      {Shevchenko}, V.~G. and {Chiorny}, V.~G. and {Hamanowa}, H. and      {Hamanowa}, H. and {Reddy}, V. and {Dyvig}, R.~R.},     title = {{Detection of the YORP effect in asteroid (1620) Geographos}},   journal = {Astronomy and Astrophysics},      year = 2008,     month = oct,    volume = 489,     pages = {L25-L28}, issn = {1432-0746}, } \end{filecontents}  \usepackage{csquotes}  \usepackage[ maxcitenames=2,  style=authoryear, firstinits=true, backend=biber, dashed=false, ]{biblatex}  \addbibresource{file.bib}  \begin{document} \cite{ex1}, \cite{ex2} \printbibliography \end{document}   There are two articles with same year and also same first three authors. Biblatex solves this with printing 4 names in citation to make the two entries unique, this is despite the fact, that the maxcitenames=2.  This looks awful to me and I wanted to distinguish these two entries in sense: Ďurech et al. (2008a) and Ďurech et al. (2008b)  I know that in this case it should be possible to distinguish them using different month, but let's pretend that we don't know it or it is also the same..  I was not successful with uniquelist and uniquename options as biblatex will add name to make it unique, not only initials or something like this...  Is there any possibility to say biblatex to look only at first n authors and then (if they are the same) use a,b after year to make entries unique, instead of adding names?  Or something other what would do what I want?  Thanks,    Edit:  cslstr have already solved my original question, however I had addition issue to making the solution work.  I'm now a little like Alice in Wonderland. I have tried this solution with both uniquelist/name=false - it didn't worked. Then I made a little trick to solve this. I added braces around initial of the first author in one of the two entries - this made bibblatex to think they are different authors and made what I wanted. After your reply I thought that the place in biblatex preamble does matter and used it as you do - it woks. But then I tried to use it at the end of biblatex preamble as I have used it before I wrote at this forum - it also works.  How is it possible? I'm sure I was only adding and removing the two options in preamble of biblatex and also the braces, and sure I'm using it now exactly the same way - didn't work yesterday, works now.


I get a null pointer exception when a call a method on a custom class. When i call my Map constructor on my driver i get a NPE error. I initialize my 2D array field in Map.java  public class Map { private Field[][] gameMap; private int row, col; private int rowPlayer, colPlayer;  public Map(){      gameMap = new Field[10][20];      rowPlayer = 0;      colPlayer = 0;      gameMap[rowPlayer][colPlayer].setPlayerLoc(); //NPE happens here  }  }   Here is Field.java  public class Field { private int playerLoc; private char fieldType; private int plantedDay, readyDay; private char typeOfCrop; public Field(){     fieldType = 'u';     playerLoc = 0;     plantedDay = 0; } public void setFieldUntilled(){     fieldType = 'u'; } public void setFieldTilled(){     fieldType = 't'; } public void setPlayerLoc(){     playerLoc = 1; } public void removePlayerLoc(){     playerLoc = 0; } public int getPlayerLoc(){     return playerLoc; } public void setPlantDay(int Day){     plantedDay = Day; } public void setReadyDay(int x){     readyDay = x; } }   I would like to know how to fix it and why the NPE happens. Thank you!

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?


int main(void){ char* line = "CCCCCCC\nC+\nC++"; char* line2 = "a\nb\nc"; //char* pattern = ".\\+\\+"; //int n= strlengp(line); printf("%s\n", line); printf("%s\n", line2); fputs(line, stdout);   This code correctly prints: CCCCCCC  C+  C++  a  b  c  Now my issue is this, I am working on  rgrep function implemented without string.h. Below is the main from the code im working on, which I am not to modify.  int main(int argc, char **argv) {    if (argc != 2) {         fprintf(stderr, "Usage: %s <PATTERN>\n", argv[0]);         return 2;     }      /* we're not going to worry about long lines */     char buf[MAXSIZE];      while (!feof(stdin) && !ferror(stdin)) {         if (!fgets(buf, sizeof(buf), stdin)) {             break;        }        if (rgrep_matches(buf, argv[1])) {            fputs(buf, stdout);            fflush(stdout);        }    }      if(ferror(stdin)) {        perror(argv[0]);        return 1;    }     return 0; }  int rgrep_matches(char *line, char *pattern){    printf("%s", line);    return 0; }   Now when I run the above code on  test test file containing the same strings as the above code "CCCCCCC\nC+\nC++","a\nb\nc".  Whys does the above code output:  CCCCCCC\nC+\nC++  a\nb\nc  Clearly ignoring the '\n'.  When the test code built in a different file posted at the top of the page prints:  CCCCCCC  C+  C++  a  b  c  What is going on here?

The following code receives seg fault on line 2:  char *str = "string"; str[0] = 'z';  // could be also written as *str = 'z' printf("%s\n", str);   While this works perfectly well:  char str[] = "string"; str[0] = 'z'; printf("%s\n", str);   Tested with MSVC and GCC.


I'd created a homebrew ooze monster with the same Split reaction that Black Puddings have. A PC cast Hold Monster on it before it was hit with any attack that would split it, so what would happen after it was cut in half? Would one of the halves still have the Hold spell on it, both of them or neither?

I don't really see an area in the MM, PHB, or DMG that specifies what happens to effects that are active on a creature that then splits.  A case came up where my party was being attacked by an Ochre Jelly, our Hunter cast Hunter's Mark on it. I can't find anything specifying that Hunter's Mark isn't allowed on more than one creature, and I can't find anything stating that the Split reaction changes effects on a monster.   Is there a RAW solution to this issue, or a common way to handle this that is obvious?


I find out  which is a command to colorize the usual cat command. Is there a way to pipe this in less mantaining colors?  If I do ccat config.json | less there's no color!  Thanks in advance.

I've been using git diff, which produces colored output. However, I now find I need to use ordinary diff for something, and it's producing a lot of output that is hard to read because of the lack of colors. How do I make diff produce a readable, colored output? Ideally while piping it to less, for easy review of large files.


I would like for example to remove php and all it's components and extensions as seen in this picture, but instead of removing every software one by one, is there anyway safe I can remove them all using a single command?

I need to upgrade php from 5.3 to 5.4. I've installed it with rpm. I want clean install: delete all 5.3 packages, and install all necessary 5.4. Here is the command to see all installed packages:  rpm -qa |grep php   It prints out a list of packages, and I want to remove all them with:  rpm -e *pakage.name*   Can I iterate over all matches in grep results and use each match in:   rpm -e *grep.match*


I have installed Ubuntu 12.04 on my Dell 4020 laptop using Windows installer for Ubuntu. But my WiFi device is not working. What should I do?  $ lspci | grep -i net  07:00.0 Network controller: Broadcom Corporation Device 4365 (rev 01) 09:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8101E/RTL8102E PCI Express Fast Ethernet controller (rev 05)

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.


How can I open my Downloads folder in one click? Downloads are my most important folder because that's where the new files go. Yet, it is the only folder I can't make an alias for, meaning I can open it in a single click from my dock or home screen. What success looks like: Opening the Downloads folder in one click (A keyboard shortcut would be fine too). Here's what hasn't been working:  Using spotlight to search for my Downloads (slow) -right clicking Downloads in my dock and then opening the folder from there (2 clicks)  Since I open my Downloads folder so many times per day, I really want a way to open it in one click. Note: Somebody already came up with a neat solution , but it unfortunately brings ALL finder windows that might be open to the front, which is not really wanted behavior.

When I click on the Documents or Downloads folder in the Dock, a Grid comes up.  Is there a way to get it to just open in the Finder?  Instead of having to click on Documents and then click on Open in Finder.


I have 12.5, and I want to convert it to 13. How can I do this in Python 3?  The task was like this - "Given the meal price (base cost of a meal), tip percent (the percentage of the meal price being added as tip), and tax percent (the percentage of the meal price being added as tax) for a meal, find and print the meal's total cost"  I solved the problem in Python 3 and in 3 test cases, it shows that my code is working. but in 1 case it is not.  Where,  Sample input:  12.00  20  8  Expected output:  13  And my output was 12.5  How on earth I can take 12.5 as 13?  mealcost = float(input())  tippercent = float(input())  taxpercent = float(input())    tippercent = mealcost * (tippercent / 100)   taxpercent = mealcost * (taxpercent / 100)   totalcost = float( mealcost + tippercent + taxpercent)   print(totalcost)

The documentation for the  function states that you pass it a number, and the positions past the decimal to round. Thus it should do this:  n = 5.59 round(n, 1) # 5.6   But, in actuality, good old floating point weirdness creeps in and you get:  5.5999999999999996   For the purposes of UI, I need to display 5.6. I poked around the Internet and found some  that this is dependent on my implementation of Python. Unfortunately, this occurs on both my Windows dev machine and each Linux server I've tried. .  Short of creating my own round library, is there any way around this?


(I'm very inexperienced with servers)  After getting frustrated with some permission issues on my AWS EC2 instance I decided I would do the command:  chmod -R 777 /   I thought that would change the permissions of the folder I was in, but it seems to have affected every file on my server instance. As a result, I can no longer SSH into the server. It simply says connection failed.  The only image of the server I took was from way too long ago and doesn't have the files I want.  Is there a way I can simply download the files I want from the AWS console, and then from there just upload them to a new instance?  Edit  The reason that I can no longer login is because the key pair (as well as several other files) cannot be found with the new 777 permissions, thus preventing me from logging in.  This is however, not my question. My question is how to get these files.

This is a  about File Permission and Why 777 is "destructive".   I'm not asking how to fix this problem, as there are a ton of references of that already on Server Fault (reinstall OS). Why does it do anything destructive at all?  If you've ever ran this command you pretty much immediately destroy your operating system. I'm not clear why removing restrictions has any impact on existing processes. For example, if I don't have read access to something and after a quick mistype in the terminal suddenly I now have access well... why does that cause Linux to break?


Using the Atlas plugin for qGIS how do I set the coverage so that it will only highlight the feature(s) I want but still show the surrounding features as grayed out areas?  This would have been easy if I don't need to work with several thousand features.  I am not asking just how to mask neighboring features. I am asking how to to make Atlas dynamically mask neighboring features of the POI.  The idea is similar to this map .

I have an area which is divided into several zones the borders of which I have defined as separate layers.  The layers are defined by sql queries on a postgis table of line segments joined with a table that says which segments are part of which zone boundaries.  What I want to do is produce a set of maps where each map is a zoom to layer extent for each zone and which has standard header, legend and scale (which will preferably vary with the zone but could be fixed across all maps).  My first attempt was to get a new composer for each map -- that worked but was rather tedious.  Next I tried producing one map and printing it and then deleting the map frame and going into qgis to zoom to the next layer extent and make the boundary visible then hopping back into the composer to load it in.  This worked more or less.  Map was fine, legend was OK because it was the same for all the maps and the zone name was easy to edit but the scale needed to be deleted and set up again for each map.  Next I looked at Atlas Generation.  The manual seems to assume that you know how it works and all you need is a reminder about the details (like so many software manuals ;)  It seems to assume that you have something that you are iterating over but I can't see how to make it work -- there is nothing to iterate over to get the layers.  Any suggestions welcome!!  :)  Russell


Am making an android app. I need to make the user be able to upload an image of a button that is pre-configured in size. So they would essentially be only changing the design.  My questions:  1. Should I limit the size and reject any image that is not of exact size in pixels (807x185) - OR - not reject anything but make the user at fault if the button looks bad/distorted? (basically do I make the button and the image the same exact size or mold and fit the image into the 807x185 button frame no matter if it's smaller or bigger) 2. How should I tell the user about this limitation?

I'm not a fan of allowing any outside logos into an app but it is a Client requirement. The requirement is that a user can upload their logo and it will replace the app logo in a space that is 120px - 160px width. There are several problems to try to prevent when allowing the user to upload a logo:   poor quality image that is pixelated when uploaded wrong size image that will be distorted when displayed unvectored text in logo font images ( which can't be prevented ) wrong aspect ratio logos   I'd like to know what the best parameters to set for an uploaded logo.  We can do a check with the code for the px width and height. But the code can not check if the text has been vectorized.  Any insights would be nice in this problem. Thanks in advance.


I'm a web designer with few years of experience, done lots of various projects. I've got some straight graphic design experience as well, but never been expanding some territories. People who like my designs often ask for other things, like logo design for example. As far as i can easly find out a concept i find a big gap that comes from my lack of decent drawing skills.  So, the question is, is there any systematic way, or some great course, that helps learning drawing? I usually find out a simple answer - just draw stuff, but as I'm very busy man, i can  save around 20-30 minutes a day to practice, but i could really use some path, that would help me working out on my technical skills.  Thanks

I want to begin with drawing but I have literally no experience. I wonder if there are high quality video tutorials, like www.digitaltutors.com just for drawing?  I want to start with hard surface objects.  Also would you recommend me to begin with a pencil or with a tablet?


I am trying to get my Windows 10 to detect my 2nd hard drive. For reference, I have an Alienware M17xR3 with 2 hard drives. The main hard drive is C:\ and the one I am trying to detect is B:\.  I found a way to do it , but this led to the screenshot below. I can't sit here and click Continue for every single file that it can't find. Can someone help me find a workaround?

I have an external hard drive, changed some security settings of files, and now I am not able to access them in my other system. I am an admin in this system.  Is there any tool that can reset all of the security settings of all contents to default?


How to install pgfplots in Ubuntu 12.04.3 LTS from Terminal?    I have the following:   a@a-Compaq-Presario-C700-Notebook-PC:~$ pdflatex --version  pdfTeX 3.1415926-1.40.10-2.2 (TeX Live 2009/Debian) kpathsea version 5.0.0 Copyright 2009 Peter Breitenlohner (eTeX)/Han The Thanh (pdfTeX). There is NO warranty.  Redistribution of this software is covered by the terms of both the pdfTeX copyright and the Lesser GNU General Public License. For more information about these matters, see the file named COPYING and the pdfTeX source. Primary author of pdfTeX: Peter Breitenlohner (eTeX)/Han The Thanh (pdfTeX). Compiled with libpng 1.2.46; using libpng 1.2.46 Compiled with zlib 1.2.3.4; using zlib 1.2.3.4 Compiled with poppler version 0.18.2  a@a-Compaq-Presario-C700-Notebook-PC:~$    My texlive version has no problem.   a@a-Compaq-Presario-C700-Notebook-PC:~$ sudo apt-get install texlive Reading package lists... Done Building dependency tree        Reading state information... Done texlive is already the newest version. The following packages were automatically installed and are no longer required:   linux-headers-3.2.0-29-generic linux-headers-3.2.0-29   linux-headers-3.2.0-29-generic-pae Use 'apt-get autoremove' to remove them. 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

Debian and Ubuntu have very good texlive packaging. But I'd like to use tlmgr to have a more fine-grained control about upgrades and which packages I want to be installed.   So how do I install "vanilla" TeXLive on Debian/Ubuntu?   Also how do I make dpkg aware that I have TeXLive installed?


Is $f_d(X, Y) =X^d+Y^d+1$ is irreducible as a polynomial over complex numbers for $d>1$ and $d$ natural? If not, there exists a irreducible polynomial of any degree? Because that is what I'm looking for...

I am trying to show that $X^n-Y^m$ is irreducible in $\Bbb{C}[X,Y]$ iff $\gcd(n,m)=1$ where $n,m$ are positive integers.    I showed that if $\gcd(n,m)$ is not $1$, then $X^n-Y^m$ is reducible. How to show the other direction. Please help.


Background  I am a professional scientist (biologist), statistician and a computer programmer, but an amateur physicist so pardon me if this question appears silly. In order to understand general relativity (a truly inspiring theory, btw), I would like to create a computer simulation of the solar system using gravity as defined by the general relativity theory (not Newtonian gravity). I am thinking about following steps for the process:   Introduce the XYZ locations, masses, and tangential velocities for celestial bodies Calculate the curvature of spacetime introduced by these celestial bodies at time t0. Remove the curvature caused by each celestial body for their own path, but include all other curvatures. Increase time to t1, iterate the new position of celestial bodies based on conditions set in step 1 and 3 (and those in general relativity). Calculate steps 2 and 3 for the new position. Repeat 4. Etc.   Question   After using half a day online, I am still unsure whether  (EFEs) let me derive the new XYZ locations in step 4. Does General relativity let me do calculations outlined above using computational power in a modern laptop?    My background in physics and maths fails me here (this is part of the fun in learning something new). If doing the above is theoretically possible and not too computationally intensive, figuring out how to do each step is just details. I might ask such details in separate questions, but here I am after whether my understanding is completely off (never worked with partial differential equations before).

I am new to general relativity but have a background in computer science.  Why is it so hard to do n-body simulations in GR?  For example, there could be a program which takes the properties (mass, position, velocity, etc.) of each particle as input and numerically integrates the evolution of the system using discrete but very small time steps.  If we throw enough memory and computing power at it, we can get arbitrarily close to the 'real' solution.  I assume the entire histories of the worldlines would need to be known, in order to calculate things like gravitational waves.  I have downloaded programs which show the evolution of the Schrodinger equation, so I am surprised they are so hard to find for GR.  Some responses I've heard elsewhere are 'the equations are nonlinear,' but from what I hear numerical algorithms are great for these types of problems.  What types of numerical algorithms are out there for GR?


I am new to Linux and I am trying to get started without spending any money.   I have a 10 years old dell inspiron 1545 and want to turn it into a Linux machine. (Obviously the hard drive could die any time, but whatever).  What is the minimum hardware requirement (CPU, RAM, Hard-disk) for running Ubuntu 16.04?

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.


Is it possible to get the name of an author from a citation? I do not want to change my bibliography style and only want to do this sometimes.  Example:   @article{doe2014lorem,   title={Lorem Ipsum},   author={John Doe},   journal={The Journal} }   And then I would like a command to print "John Doe", for instance printauthor{doe2014lorem}, which would then print "John Doe".

How can I cite an authors full name (= first name + last name) in biblatex?  @book{Gladwell2005,     author = {Gladwell, Malcolm},     address = {New York, NY},     publisher = {Back Bay Books},     title = {Blink: The Power of Thinking Without Thinking},     year = {2005}, }   I would then like to cite the book with Malcolm Gladwell's full name. So what I'm looking for is some sort of \citefullauthorname macro.


I have tried calling Epson support, to no avail. I keep getting disconnected. The printer just keeps cycling off and then turning itself on. It acts like it is scanning something and then stops. about 2 minutes later it turns itself off and starts the cycle all over again. I have just unplugged it.

When I press the power button on my Epson WorkForce WF-3520 printer, it starts up normally, but shuts down within 30 seconds. Ten seconds later, it starts itself and the stop/start cycle is repeated again and again. This has only started happening today (6th December 2016).


Is it possible to return zero if a value is less than zero without using a case statement?  e.g. Max(a, 0) <-- 'Max' doesn't exist.  I would like my code to be as succinct as possible.

I want to write a query like this:  SELECT o.OrderId, MAX(o.NegotiatedPrice, o.SuggestedPrice) FROM Order o   But this isn't how the MAX function works, right?  It is an aggregate function so it expects a single parameter and then returns the MAX of all rows.     Does anyone know how to do it my way?


Am I the only one who hasn't got a look back video at all? Every time I click the link for it, it just brings up photos for me. I'm kinda getting annoyed because everyone else is getting one and I'm the only one so far who seems to be having this problem.   Anyone any ideas on what I can do or if there is anything I can do?

I didn't get a Facebook look back movie. I've been on Facebook since it was “thefacebook” in 2005 and I've shared my little heart out.   Anybody know if the automated video is linked to security settings or other things that might be locking me out?   I get the lame collage of 6 pictures that were all posted in the last week. No, thanks. I'd rather have a movie.


Please find attached screenshot related to problem i started facing during boot of Ubuntu 18.04. This occurred while i restarted after Mandatory upgrade command in order of prerequisite for Ubuntu 20.04 upgrade. However i also added few PPA apt repository related to graphics and battery. Not sure of the cause. I am using Ubuntu from last 10 years. Never faced an issue like this. I have already changed my grub from "quiet splash" to "" to see the message log during startup. What is the solution required over here ?

I have an Acer Aspire One netbook with an Intel Atom CPU and 1GB of RAM. I've been using Ubuntu and a few other distros on it with no problem for two years now. I have used both Ubuntu/Lubuntu/Xubuntu 14.04, 14.10, 15.04 and 15.10 flawlessly, with casual distro changes (Arch Linux, openSUSE, Linux Mint, elementaryOS, Debian). No problems at all. But today I decided to move back to Xubuntu, so I grabbed the "mini" installation ISO from ubuntu.com, wiped out the Debian Jessie partition and installed the system there. After the installation was completed, I installed the "xubuntu-core" metapackage and rebooted. But the system got to a "Started Update UTMP about System Runlevel Changes." message and sits there, with a blinking cursor. I could access other TTYs by pressing Ctrl+Alt+Fx and even startxfce4 (as root), but that issue was really annoying me. So I downloaded a Lubuntu 16.04 ISO from lubuntu.net and went to install it. As I didn't have a DVD or USB drive available, I put it in a backup partition and booted the Lubuntu installation media with GRUB2, using set root=(hd0,msdos4) loopback loop /lubuntu-16.04-desktop-i386.iso linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=/lubuntu-16.04-desktop-i386.iso config noprompt noeject initrd (loop)/casper/initrd.lz boot  But it also got stuck in the exact same message. The difference is that now I can't change TTY, but I think it's because it's a live media. Some people suggested it may be a graphics driver problem, but I'm not sure. I also saw a similar problem with some Mageia folks. Can someone help me?


could .bash_profile in theory be slammed onto iCloud Drive and symlinked from there? I'd love to use the same .bash_profile on every computar.  Why this isn't the same as Dropbox - this, if answered, would allow for a person to install a new computer, run a command (doing a symlink to .bash_profile from a specific place on the iCloud Drive), and have all their aliases + etc  without having to install a separate application like Dropbox.

I'd like to move my .bash_profile to Dropbox to have my custom Terminal functions available on all my Macs. Is this possible and are there possible implications?  For example I have a command for doing a git add and commit in one go:  function gax() {     git add .     git commit -m "$1" }   I've been unable to find any information about this.


Let $F : \mathbb R\to\mathbb R$ be a distribution function (increasing right continuous), and $m_F : M_F\to[0,\infty]$ the Lebesgue-Stieltjes measure generated by $F$.   In most cases I've come across there are sets in $M_F$ that are not Borel sets.      Is the general statement "For every choice of $F$, $M_F$ contains a set which isn't a Borel set" a theorem?

Let $F: \mathbb{R} \to \mathbb{R}$ be any increasing, right-continuous function. Then we define the Lebesgue-Stieltjes measure associated to $F$ to be the unique measure $\mu_F$ on $(\mathbb{R},\mathcal{B}_\mathbb{R})$ such that $\mu_F((a.b])=F(b)-F(a)$ for all $a, b$.  We wish to show that the completion of $\mathcal{B}_\mathbb{R}$ with respect to $\mu_F$, denoted by $M_F$, is strictly larger than $\mathcal{B}_\mathbb{R}$.  Since $\text{card}(\mathcal{B}_\mathbb{R})=\mathfrak{c}$, it will suffice to exhibit a set $K$ in $M_F$ such that $\mu_F(K)=0$ and $\text{card}(K)=\mathfrak{c}$, for then $\text{card}(M_F)>\mathfrak{c}$.


In Captain America: The First Avenger, Bucky dies before coming back as The Winter Soldier in Captain America: The Winter Soldier.  Why was he chosen to become The Winter Soldier and how was he resurrected after his death?

When you think about it, not a lot of the story on how they kept Bucky alive makes sense. He was shot out of a speeding train and fell to unknown depths, only to be found by Strategic Science Reserve and kept alive by Zola, an enemy they captured. What was their thought process, "Hey, we found Cap's friend. Let's let the enemy that we're holding prisoner tinker with him."?  I'm ignoring the fact that he's been frozen and brought back over and over (makes way more sense then Captain being frozen alive and remaining in a coma state, with no nutrients for his body, until he's found), I'm more curious that they even got him to that point.


Proof:  The power series $$\sum_{n=0}^\infty a_nz^n$$ which converges for any $ z \in   \Bbb N$, then the series converges absolutely for ay $z_0$ s.t. $|z_0|<|z|$.   Let $z_\alpha \in \Bbb C$, $\forall$ $z_\alpha$, $\exists z \in \Bbb N$ s.t. $|z_\alpha|<|z|$. Since the series converges for any $z \in \Bbb N$, using the proposition above, the series converges absolutely for any $z_\alpha \in \Bbb C$.  Question.   I am not totally sure about my proof, is correct or not? If not, how can i improved it?

PROBLEM  Prove that a power series $\sum_{n=0}^{\infty}{{a_n}{z^n}}$ which converges for any $z \in \mathbb{N}$, converges for any $z \in \mathbb{C}$.  MY ATTEMPT  Since the power series $$\sum_{n=0}^{\infty}{{a_n}{z^n}}$$ converges for any $z \in \mathbb{N}$, then $$\sum_{n=0}^{\infty}{{a_n}{z^n}}$$ can be considered (?) to be a polynomial in $\mathbb{C}$.  Hence, $$\sum_{n=0}^{\infty}{{a_n}{z^n}}$$ is entire, and therefore continuous in $\mathbb{C}$ (since differentiability implies continuity).  It follows that $$\sum_{n=0}^{\infty}{{a_n}{z^n}}$$ converges for any $z \in \mathbb{C}$.  QUESTION     I am aware that, while I may have (some) ideas for a (general) proof, admittedly there are several grey areas (i.e., gaps) that need to be filled.  Would you be kind enough as to fill in these gaps, by providing useful hints?


I have been doing photography with my mobile camera. I want to step up to the next level. I am confused between Nikon B700 (bridge camera) which has really good features and 60x zoom and Canon 1300d (DSLR). I want to cover most types of photography.

I am thinking of buying a camera to learn photography. Most of the time I'll be shooting portraits and landscapes. But I am not sure where I should start. Most of my friends tell me that I should get an entry level DSLR, but I am not sure if I have the persistence and enthusiasm to carry it all day in a backpack. But the camera on my cellphone doesn't seem to be enough to begin with.  So what I want is some expert advice (preferably with professional experience). Can most compact fixed-lens or mirrorless cameras fit the situations I mentioned? Or do I really need to go to a DSLR to get a tool to learn photography?


says:      Your game statistics are replaced by the statistics of the beast, but you retain your alignment, personality, and Intelligence, Wisdom, and Charisma scores. You also retain all of your skill and saving throw proficiencies, in addition to gaining those of the creature.   Does this actually make you a Beast creature with new statistics that are better than the original? That is to ask: can someone else now  or  into your form and gain those better statistics?  I know how I'd likely rule, but I was curious about RAW.

After my group's last session, it was pointed out that Polymorph does not require the caster to have ever seen the creature they are attempting to transform the person into. This has spawned a conversation between our Wizard and Druid.  Polymorph states:     The new form can be any beast whose challenge rating is equal to or   less than the target's (or the target's level, if it doesn't have a   challenge rating).   There is, as far as I can tell, no other restrictions. It must be a beast, and it must be CR lower than or equal to the character's level. You need not have any knowledge of the creature, other than knowing it exists at all.  Druid's Wild Shape states:     Starting at 2nd level, you can use your action to magically assume the   shape of a beast that you have seen before.   So, the Wizard and Druid player in the party began thinking this over. Wild Shape only requires that the druid has seen the animal before, but Polymorph has no such restriction.  The DM has been enforcing the "must have seen it before" rule on the Druid's wild shapes, but now the druid is coming up on 9th level and will be able to shift into CR3 beasts. Issue being, he hasn't ever seen one.  As far as I can tell, there is nothing stopping the wizard from polymorphing a willing ally into a beast that the druid hasn't seen before, which would enable the druid to then wild shape into it as long as the level requirement is met. Is there any rule preventing this, or any other reason why it wouldn't work?


Where to get Ubuntu Linux kernel source package from? Not a Debian package. Is there any repository which has tar/bz2 package of complete kernel sources of every version release.

I am following  to learn to compile the kernel. I used   apt-get source linux-image-$(uname -r)   to download the source code of the Linux kernel I am curretly using.  After running the above command, the following files (and directories) were downloaded.  user $ ls -l total 130972 drwxrwxr-x 27 sps sps      4096 Oct 16 03:10 linux-lts-vivid-3.19.0 -rw-rw-r--  1 sps sps  10980684 Oct  5 10:54 linux-lts-vivid_3.19.0-30.34~14.04.1.diff.gz -rw-rw-r--  1 sps sps      7396 Oct  5 10:54 linux-lts-vivid_3.19.0-30.34~14.04.1.dsc -rw-rw-r--  1 sps sps 123115155 May  6 21:35 linux-lts-vivid_3.19.0.orig.tar.gz user $    In the  page it is mentioned:     Building the kernel is quite easy. Change your working directory to the root of the kernel source tree and then type the following commands:   But I am not sure which is the "root of the kernel source tree".   Is it the current directory (where I ran apt-get source ... and where I have the above listed files)?  Or, is it the directory:  drwxrwxr-x 27 sps sps      4096 Oct 16 03:10 linux-lts-vivid-3.19.0   or, should I extract the tarball   -rw-rw-r--  1 sps sps 123115155 May  6 21:35 linux-lts-vivid_3.19.0.orig.tar.gz   Output for uname -r:  user $ uname -r 3.19.0-30-generic user $


There was a short that I read in an anthology, when I was on my anthology kick about 8-15 years ago. I am fairly positive that the story was from pre-1995, if that helps anyone. I know it wasn't a novella, but it wasn't a short-short if I recall that too.  The premise:  A group of super-bright scientists are selected to go on a (experimental?) space craft from Earth.  The details I'm firm on:   One of the astronauts was a young chinese man who recreated the iching as a set of tokens and used them to setup a form of horoscope since the constellations didn't match the familiar ones anymore.   The details I'm pretty sure about:   They end up diverting from their pre-assigned flight path and flying into space forever. They all went mad. That the young chinese man was indeed a young Chinese male. He may have been a she, and she may have been from another oriental country, but I know it was about the iChing. That always stuck out to me.

The story in question featured, as the vague title suggests, a "space mission" that is really a cover for forcing a bunch of really smart people to be in close proximity to each other for long enough that they can truly evolve their collective intelligence. I recall them developing new maths and, e..g, "farseeing" and eventually figuring out that while there was no planet at the end of their journey as they were told, they were able to construct one for themselves.


What happens if your US visa expires without travelling? Indeed, I have already travelled to the United States before. But with another visa (this unused B1/B2), some family restrictions, my wife's death, prevented me from travelling during the two years of validity of my visa. Would it be a problem to get another visa now?

I was going to the USA for a medical observership program; my university was covering all my fees. I got a B1/B2 visa, good for 3 months, which included the details of where I was going and when. Because of some problems, I couldn't go, and didn't use the visa. Will that fact complicate my ability to get a tourism visa in the future?


My laptop has two GPUs: an integrated intel and a Radeon HD 8550M. The latter is from . According to the manual of the open source Radeon driver, these series are supported by the driver. I want to use the Radeon GPU, but the integrated GPU is being used by ubuntu and the applications, and I don't know how to activate the Radeon. Thanks.

I saw many saying that the latest version of Ubuntu 16.04 includes an opensource driver for ATI. I have an HP laptop with AMD 6770m + Intel HD 3000 hybrid graphics and wants to install Kubuntu on it. I created a bootable USB drive of Kubuntu 16.04 and booted from it just to check everything works perfectly (I don't want to install it separately and ruin bootloader as of now). But my laptop is getting too hot and the battery is not lasting for more than 30 mins. Also the brightness control is not working at all and it stays high always.   How can I get hybrid graphics on Kubuntu/Ubuntu working well? I am ready to turn off the ATI card since I am not going to play any games on Linux. I just need the Intel graphics + Cool Laptop + Good battery Life + Brightness control.  My BIOS setting for switchable graphics mode is FIXED. Do I need to change it to DYNAMIC?  UPDATE  I wasn't able to make things work in 16.04 so installed 14.04 LTS along with the AMD Catalyst driver. Now everything works perfectly fine. Below are the steps.   Clean install Ubuntu 14.04 LTS Install the fglrx catalyst drivers using “Additional Drivers” window. This will enable us to switch graphics Restart Ubuntu FAN Noise Fix - Refer this  and install i8kutils Brightness Control - Check this     is the official documentation for AMD/Intel hybrid graphics


Hell, i want to achieve this result of the rocket exhaust as shown below. this is from space x starship animation.  i tried volumetrics but didnt get quite the result. a glare and a blur got me close but not there yet. the photo show some volumetrics were used because the light is jagged.  am i missing something? is this achievable in blender and how.  thank you.

I was wondering how I could create this effect in blender for an animation:      How can I make this bloom effect?


At times questions are asked without any proper responses that are useful to the person who posts questions, even though there might be few upvoted answers. These generally get pushed back quickly given the frequency of new questions. This would cause the question to escape the view of the right person capable of answering it.  Some people would be motivated to answer unanswered questions. Some might skip going through the question if they see enough number of votes on the already answered question. Or might not make past the first few pages of the unanswered questions.  Is there a proper way to bump up the question without breaking any rules?  From :     Edit your question to provide   status and progress updates. Document   your own continued efforts to answer   your question. This will naturally   bump your question and get more people interested in it.    What does the bump here mean? Does editing the question push it up the stack in the relevant tags? Make it move to the first pages?

What can cause a question to be "bumped" to the first page in the Active tab of a Stack Exchange site? (Changing the "Last Active" date.)  .


I want it to capitalize the first letter of an expanded acronym used at the start of a sentence, like:  Application programming interfaces (APIs) are ...   I tried to define a new command \Acp for that purpose:  \usepackage[smaller,nohyperlinks]{acronym} \acro{API}{application programming interface} \newcommand{\Acp}[1]{\MakeUppercase\expandafter\acp{#1}}   However when I use it, it doesn't work as desired:  \Acp{API} are ...   produces  application programming interfaces (APIs) are ...   Unfortunately I can not use the glossaries package which accomplishes exactly that due to interpackate-incompatibilities.    I had a similar desire in the list of acronyms where I also wanted to capitalize all first letters. There I redefined a different command as suggested in :  \makeatletter \patchcmd{\AC@@acro}{] #3}{] \MakeUppercase #3}{}{} \patchcmd{\AC@@acro}{] #3}{] \MakeUppercase #3}{}{} \makeatother   That works.

I'm using the acronym package in my document and in several instances I want to start a sentence with the expanded acronym. Is there any way of telling the package to capitalise the first letter?  For example:  \acrodef{TLA}{three-letter acronym} \acrodefplural{TLA}{three-letter acronyms} ...end of one sentence. \aclp{TLA} are acronyms with three letters...   This will yield:     ...end of one sentence. three-letter acronyms are acronyms with three letters...


I have a class that looks like this:  #!/usr/bin/env python class Foo:     def __init__(self, x):         self.x = x     def bar(self):         self.bar1_out = self.x + 5         self.bar2_out = self.x + 1         return (self.bar1_out,self.bar2_out)     def qux(self,myvalue = None):         first, second = myvalue or self.bar()         return first + 3, second + 6  def main():     """docstring for main"""     f = Foo(5)      mbr_out1, mbr_out2 = f.bar()     print mbr_out1, "\t", mbr_out2      mqx_out1, mqx_out2 = f.qux()     print mqx_out1, "\t", mqx_out2      qout1, qout2 = f.qux((1))     print qout1, "\t", qout2  if __name__ == '__main__':     main()   I saw some implementation that suggest using super      def __init__(self, x):         super(Foo,self).__init__()         self.x = x     def bar(self)         #etc.   My questions are:   What's the use of super(Foo,self).__init__() How does it differ from self.x=x How can I make my code top above produce the same result by using super()

I'm trying to understand the use of super(). From the looks of it, both child classes can be created, just fine.   I'm curious to know about the actual difference between the following 2 child classes.  class Base(object):     def __init__(self):         print "Base created"  class ChildA(Base):     def __init__(self):         Base.__init__(self)  class ChildB(Base):     def __init__(self):         super(ChildB, self).__init__()  ChildA()  ChildB()


I have been doing the following for a project and could not find the problem with it. I have been trying to find all the mp3 files available in my computer, the code works fine till the if condition if(extension == "mp3")  On debugging I found that the if condition does not execute even when the condition is true.  public class AudioService {      File[] audioFiles;     File[] roots = File.listRoots();     ArrayList<AudioFile> audios = new ArrayList<AudioFile>();         int idIterator = 0;      public List<AudioFile> getLocalAudioFiles() {         for (int i = 0; i < roots.length; i++) {             searchDir(roots[i]);         }         return audios;     }      public void searchDir(File directory) {         File[] filesList = directory.listFiles();         for (int i = 0; i < filesList.length; i++) {             AudioFile af = new AudioFile();             if (filesList[i].isDirectory()) {                 searchDir(filesList[i]);             } else {                 int dotLast = filesList[i].getName().lastIndexOf('.');                 String extension = filesList[i].getName().substring(dotLast+1);                 if(extension == "mp3") {                     idIterator++;                     af.id = idIterator;                     af.name = filesList[i].getName();                     af.path = filesList[i].getPath();                     af.type = extension;                     audios.add(af);                 }             }         }     }      public static void main(String args[]) {         List<AudioFile> af;         AudioService as = new AudioService();         af = as.getLocalAudioFiles();     } }   I don't know where I went wrong, Need some help here. Thanks in Advance.

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


I am taking a class in statistics which uses The Elements of Statistical Learning: Data Mining, Inference, and Prediction as a textbook. However, I find this book very terse.   Could anyone please recommend a book which has similar topic coverage but contains more examples and detailed explanations and does not omit mathematical derivations.  P.S. I found Introduction to Statistical Learning as a good introductory level book. It was easy to read and provided a good overview of ML methods. However, I would like to see more rigorous explanations and mathematical derivations of the methods.

I find resources like the  and  incredibly useful. They obviously serve well as references but also help me to organize my thoughts on a subject and get the lay of the land.   Q: Does anything like these resources exist for machine learning methods?  I'm imagining a reference card which for each ML method would include:   General properties When the method works well When the method does poorly From which or to which other methods the method generalizes. Has it been mostly superseded? Seminal papers on the method Open problems associated with the method Computational intensity   All these things can be found with some minimal digging through textbooks I'm sure. It would just be really convenient to have them on a few pages.


so basically this is my code:  Random randomgenerator = new Random();         int[] arr = new int[8];      for (int i = 0; i < arr.length; i++) {         arr[i] = randomgenerator.nextInt(100);     }      System.out.println(arr); }   }  and this is what appears in the console :   [I@106d69c  I really need help with this, I am probably doing some terrible mistake because I am new to Java coding.

In Java, arrays don't override toString(), so if you try to print one directly, you get the className + '@' + the hex of the  of the array, as defined by Object.toString():  int[] intArray = new int[] {1, 2, 3, 4, 5}; System.out.println(intArray);     // prints something like '[I@3343c8b3'   But usually, we'd actually want something more like [1, 2, 3, 4, 5]. What's the simplest way of doing that? Here are some example inputs and outputs:  // Array of primitives: int[] intArray = new int[] {1, 2, 3, 4, 5}; //output: [1, 2, 3, 4, 5]  // Array of object references: String[] strArray = new String[] {"John", "Mary", "Bob"}; //output: [John, Mary, Bob]


Is it wrong to have 'the' in front of the word 'better'?  Can someone help me sort this confusion out?  Case in point: "Ella is the better of the two sisters" vs "Ella is the best of the two sisters".  Grammarbook.com says that the former is correct and I agree. But a friend brought up an interesting point stating that one should never use 'the' in front of the comparative degree. But how about sentences like :   Who is the better of the two? This is the better option. Be the better person.   As far as my knowledge goes I do not see anything grammatically incorrect in these sentences/questions and I believe the choice of words in this scenario depends on the context.  Am I correct?

I used the book "Grammar and Style" and one example confused me:      He was the better/ best of two players.    The answer was the better but learners wonder how is it true since we use best after the definite article, the.   Was the answer given above correct?


In D&D 5e we have surprise round effective until it is ended. On that first round characters that are not surprised can act as in normal round. Those unaware of them (thus surprised) grant them advantage on attack rolls.  Then they become aware of the combatants? The case I was thinking of is when PCs are having surprise round, and their enemies (Monsters) are unaware of them (Stealth vs Perception). And PCs (all) have higher Initiative than all Monsters.   After first round, do Monsters stay Unaware of hat hit them until their first turn, or immediately become aware with a start of the second round, even though they will act after the PCs?  Does attack on the first (surprise) round break "unawareness" of the monster and it is aware of the PC on the second round even though it acts later due to lower initiative?

I am trying to figure out if the surprised state ends on a creature after the first attack of a surprise round, or if the surprised state (which I would then see almost as an unofficial condition) ends only after the first round of combat.  In the second case, I would believe that a character (having the rogue's Assassinate ability) attacking a surprised creature AND having multiple attacks would score a critical hit on all hits.  Example: Does a Monk 5/Rogue 3 surprising a creature get automatic critical hits on all hits if he does 2 attacks (with extra attack) and additional unarmed strike(s)?  Or does the critical hit only affect the first hit? However, that would surprise me as the rules mention any hit is a critical hit.


I have the list which looks something of this sort. I wanted to know if there is any quick way to create sub list out of this?   list = [1,2,3,4,5,6,7,8,.....]   What is the best way in python to split list into this sublist?   1. [(1, 2), (3, 4), (5, 6), ...] 2. [(1, 2, 3), (4, 5, 6), ...] 3. [(1,2,3,4),(5,6,7,8), ....]

I have a list of arbitrary length, and I need to split it up into equal size chunks and operate on it. There are some obvious ways to do this, like keeping a counter and two lists, and when the second list fills up, add it to the first list and empty the second list for the next round of data, but this is potentially extremely expensive.  I was wondering if anyone had a good solution to this for lists of any length, e.g. using generators.  I was looking for something useful in itertools but I couldn't find anything obviously useful. Might've missed it, though.  Related question:


I need to parse json from String builder, but I get this error:  Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'int org.json.JSONArray.length()' on a null object reference   I don't know why stringBuilder.toString() give me the array with objects!  Here is my code:  try {     // HttpResponse is an interface just like HttpPost.     //Therefore we can't initialize them     HttpResponse httpResponse = httpClient.execute(httpPost);      // According to the JAVA API, InputStream constructor do nothing.     //So we can't initialize InputStream although it is not an interface     InputStream inputStream = httpResponse.getEntity().getContent();      InputStreamReader inputStreamReader = new InputStreamReader(inputStream);      BufferedReader bufferedReader = new BufferedReader(inputStreamReader);      StringBuilder stringBuilder = new StringBuilder();      String bufferedStrChunk = null;      while((bufferedStrChunk = bufferedReader.readLine()) != null){         stringBuilder.append(bufferedStrChunk);     }      // return stringBuilder.toString();     System.out.println("EHEH"+stringBuilder.toString());       JSONArray mainObject = null;     try {         mainObject = new JSONArray(stringBuilder.toString());     } catch (JSONException e) {         e.printStackTrace();     }      for (int i = 0; i < mainObject.length(); i++) {         JSONObject object = null;         try {             object = mainObject.getJSONObject(i);         } catch (JSONException e) {             e.printStackTrace();         }         try {             Video video=new Video();             String url = object.getString("url");              String titolo = object.getString("titolo");             String sottotitolo = object.getString("sottotitolo");             String data = object.getString("date");             //video.setId(idd4);             System.out.println("CAZZO:"+video.getId());             video.setPic(url);             video.setTitolo(titolo);             video.setSottotitolo(sottotitolo);             video.setData(data);              videoList.add(video);         } catch (JSONException e) {             e.printStackTrace();         }     }   Can someone help me?  JSON RESPONSE:

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?