Can a new unseasoned carbon steel wok be seasoned after one use (used it for steaming)? It now has some rust on it. Can it be salvaged?

Hello Seasoned Advice: I cannot find an answer on any previous posts here relating to woks about what to do if the wok is Already Rusted. I found this wok in my husband's house when I moved in - he has no idea where it came from or how long it's been there.  I have no information about this wok, other than that the faded manufacturer's label indicates it was made in Taiwan, presumably by an Asian cooking supply house - has Chinese (?) characters above, then in English: "Seven S---G Co., Ltd" (the --- indicates where the label is faded and illegible) with an address, international phone number and fax number. It is black, has a welded, hollow steel handle with a hole through it for hanging, and looks to be a commercial, or restaurant-grade wok of carbon steel, well used. It was stored in an under-counter cabinet next to a leaky sink, so I have no doubt about where the original rust came from. Has about 10 small pits on the bottom and almost half of the entire upper right side of the circumference of the wok is almost one continuous thin (not pitted) area of rust.  Previously, I had spent the better part of a day alternately: scrubbing the rust (with coarse salt and fine salt), wiping with vegetable oil and heating over a high gas flame -then repeating this process 3 or 4 times until I was sure there was no rust or moisture remaining (although it is still pitted in some places at the bottom), and then another thin coat of oil to seal against moisture, heated again, then wiped. It worked very well for a couple of weeks, but as I don't currently cook Asian-style on a regular basis, after a few weeks of disuse it turned rusty again, almost worse than when I found it.   Should I be using steel wool to scrub the rust down to bare steel first, or just the salt? Using a different oil? (WD-40?  Just Kidding). Oven vs Gas burner heating?  How should I be storing this? (I have limited space-so most of my equipment is hanging on the walls or on a steel kitchen shelving rack, so I don't think air-flow is an issue.)  As this looks like a relatively decent piece of equipment, I want to do more Asian style cooking and be able to use it on a more regular basis. Is this wok salvageable? I would hate to have to put it on the curb and spend the money for a new restaurant-quality wok.  Thanks in advance for any guidance. P.S., I have pics, but due to a software issue with my camera, I am unable to post at the moment - will try to send pics if I get an answer to this question.


I was about to make an edit to a page, noticed it had a pending edit that did the same thing and approved it.   However, for it to be visible, it requires another approval.    What is the logic behind the difference in requirements for different ways for me to change the content of a question?  Also, after I approve an edit, I don't seem to be able to edit the question directly any longer -- at least not until after the edit is approved.

Possible Duplicate:            The original poster didn't code-format his crontab. (Oh the pain!)  Another user edited. Very helpful. But he didn't have the reputation to make the edit complete on his own. I tried to confirm his edit. I do have the reputation to make edits on my own. But at least two votes are required to confirm his edit?  Seems silly. If I have the reputation to make edits all on my own, why does anyone else have to look over my shoulder when I'm given a "confirm edits" or "reject edits" button?  Thanks.


I am developing a code from the link : . I have the below code  <apex:page controller="FindNearbyController" docType="html-5.0" >      <!-- JavaScript to get the user's current location, and pre-fill          the currentPosition form field. -->     <script type="text/javascript">         // Get location, fill in search field         function setUserLocation() {             if (navigator.geolocation) {                 navigator.geolocation.getCurrentPosition(function(loc){                     var latlon = loc.coords.latitude + "," + loc.coords.longitude;                     var el = document.querySelector("input.currentPosition");                     el.value = latlon;                 });             }         }         // Only set the user location once the page is ready         var readyStateCheckInterval = setInterval(function() {             if (document.readyState === "interactive") {                 clearInterval(readyStateCheckInterval);                 setUserLocation();             }         }, 10);     </script>      <apex:pageBlock >         <!-- Form field to send currentPosition in request. You can make it              an <apex:inputHidden> field to hide it. -->         <apex:pageBlockSection >             <apex:form >                 <apex:outputLabel for="currentPosition">Find Nearby</apex:outputLabel>                  <apex:input size="30"                       html-placeholder="Attempting to obtain your position..."                      id="currentPosition" styleClass="currentPosition"                       value="{!currentPosition}" />                 <apex:commandButton action="{!findNearby}" value="Go!"/>             </apex:form>         </apex:pageBlockSection>          <!-- Map of the results -->         <apex:pageBlockSection rendered="{!resultsAvailable}" title="Locations">             <apex:map width="600px" height="400px">                 <apex:repeat value="{!locations}" var="pos">                     <apex:mapMarker position="{!pos}"/>                 </apex:repeat>             </apex:map>         </apex:pageBlockSection>      </apex:pageBlock>  </apex:page>   In my developer console, code dont know what is <apex:map. Could you please let me know what is the issue ?  The error message,  Unknown component apex:map in FindNearbyControllerVFPage at line 41 column 52     As per the link :  .   <apex:map> components are not supported in Developer Edition. So you should be trying to run this in Sandbox of supported Production org (Enterprise, Unlimited, etc).   Why there is a restriction of using the API ? How developer will developed the code ?

I'm creating a new page and when I try to save the page, I'm getting the error message on this line.... <apex:map.... the error is not clear and I have no idea what is causing this error.  {!Account.BillingStreet},{!Account.BillingCity},{!Account.BillingState}">     Error: Unknown component apex:map in mymap at line 13 column 141   <apex:page standardController="Account">    <!-- This page must be accessed with an Account Id in the URL. For example:         https://<salesforceInstance>/apex/NearbyContacts?id=001D000000JRBet ->    <apex:pageBlock >     <apex:pageBlockSection title="Contacts For {! Account.Name }">       <apex:dataList value="{! Account.Contacts }" var="contact">        <apex:outputText value="{! contact.Name }" />      </apex:dataList>     <apex:map width="600px" height="400px" mapType="roadmap" center="{!Account.BillingStreet},{!Account.BillingCity},{!Account.BillingState}">         <apex:repeat value="{! Account.Contacts }" var="contact">     <apex:mapMarker title="{! contact.Name }"        position="{!contact.MailingStreet},{!contact.MailingCity},{!contact.MailingState}"     />     </apex:repeat>    </apex:map>      </apex:pageBlockSection>   </apex:pageBlock>  </apex:page>


I have a vector class that I need to iterate through.  The class contains a list variable.  I need to iterate through the class.  Im not sure how I would do this.  I need to use __iter__ and its suggested that I use yield, here is the result that I want:  [x*2 for x in Vector([3,3.25,"foo"])] [6, 6.5, 'foofoo']   Iter should return an object that can iterate over the elements of the vector. How would I go about doing this I never used __iter__ before.

How would one create an iterative function (or iterator object) in python?


I have two lists as shown below (of equal length)  cities = ['New York','Tokyo','Moscow','London'] altitudes = ['13000','12000','11000','9000']   I want to construct a dictionary as follows  mydict = {x : y for x in cities and y in altitudes}   My python interpreter says invalid syntax. why is this invalid? How would I do this?

Imagine that you have the following list. keys = ['name', 'age', 'food'] values = ['Monty', 42, 'spam']  What is the simplest way to produce the following dictionary? a_dict = {'name': 'Monty', 'age': 42, 'food': 'spam'}


Hello everyone I have wrote a query which will give me employee in and out time for a range of time, as my tables have many in and out time I wanted to get only last in or out time based on timestamp here is query for this  select fullname,direction,to_char(((TO_DATE('19700101','yyyymmdd') + (tstamp/24/60/60) + 6/24)), 'dd-mm-yyyy  hh12:mi:ss PM') as Time, gate,lane,employment.employeeid,NATIONALID,departmentname,designation.designationname from eofficeuat.entrylog_cpa join eofficeuat.employee on entrylog_cpa.hrrecordid=employee.hrrecordid join eofficeuat.employment on employee.hrrecordid=employment.hrrecordid join eofficeuat.designation on employment.designationid=designation.designationid join eofficeuat.department on employment.departmentid=department.departmentid where department.departmentname = 'SECURITY' and tstamp >= 1568764800 and tstamp < (select (sysdate - date '1970-01-01') * 86400000 from dual) /*and tstamp in (select max(tstamp) from eofficeuat.entrylog_cpa)*/ /*and rownum >= (select count(tstamp) from eofficeuat.entrylog_cpa)*/ and fullname='A.K.M.TOWHID SARKER' order by fullname asc;   this query give this result    full name            direction   time  ---------            ---------   ----  A.K.M.TOWHID SARKER  out         18-09-2019  01:41:35 PM  A.K.M.TOWHID SARKER  out         18-09-2019  01:29:08 PM   but I only want last row from this result. can you please help how can i do this?

Is there a way to make an Oracle query behave like it contains a MySQL limit clause? In MySQL, I can do this: select *  from sometable order by name limit 20,10  to get the 21st to the 30th rows (skip the first 20, give the next 10). The rows are selected after the order by, so it really starts on the 20th name alphabetically. In Oracle, the only thing people mention is the rownum pseudo-column, but it is evaluated before order by, which means this: select *  from sometable where rownum <= 10 order by name  will return a random set of ten rows ordered by name, which is not usually what I want. It also doesn't allow for specifying an offset.


Here there was a problem, I can understand if I install Ubuntu on a tablet, if so, in what way? And how Manuals

With the announcement of the Ubuntu Phone OS I'd like to know what phone (and tablet) models are supported at this time.  Note from foss & Oli: We are making this the master question for all future "Will this work on <insert random tablet/phone/device here>?!" questions


All of the document presets for print are defaulted to using points. I’ve always worked in inches. Is it more common to work in points? What are the advantages?  Edit: To clarify, I’m not asking about working with fonts. I’m asking about document layout. I read the answer to the other question, but it doesn’t help me understand the reason for working entirely in points.

I'm in the UK, which uses metric units for pretty much everything now except road distances and beer (obviously best kept apart).  Page sizes have been metric here and in most of the rest of the world for many years.  Can anyone suggest any reasons why printed type is still always measured in points, e.g 11pt (= 11/72 inch) rather than say millimetres?  In counterpoint, does anyone use anything else?    Edit: Obviously points have worked fine for centuries. But there would seem to be significant advantages measuring type in the same metric units as you measure the page it's placed on, especially if setting up a grid.    Edit: Wikipedia has a page on , and there's a bit more context on use in Germany and Japan on the main  page.


In SG-1, we see/hear planet designations like P3X-421.   Do these designations follow any sort of system, or is it all "writer discretion"?   If there is a system to these designations, what is it (either in-universe or out-of-universe)?

The SGC gives planets in the Milky Way  (there are around 200 of them).  But one starts with a K:    which occurred in Season 8, episode 3.  Yes, this planet is very cold, but does that explain why it is named uniquely?   It seems they are named before they are even visited, so that doesn't make sense.


I got this jquery code where i clone some textfields everytime i click "btn_add", and i need the onchange function i wrote at the end to id_usd_value there works for every new clones i add but it's not working :          Any idea how ??, thanks for your help !

I have a bit of code where I am looping through all the select boxes on a page and binding a .hover event to them to do a bit of twiddling with their width on mouse on/off.  This happens on page ready and works just fine.  The problem I have is that any select boxes I add via Ajax or DOM after the initial loop won't have the event bound.  I have found this plugin (), but before I add another 5k to my pages with a plugin, I want to see if anyone knows a way to do this, either with jQuery directly or by another option.


Remark: The problem is the , but without the usual probabilistic frame (the ogre chooses as he pleases). Also, the strategy is symmetric and the dwarves don't have a sense of time. The link above does not give a solution for these hypothesis.  In more detail, the problem goes as follows: $100$ immortal dwarves are captured by an immortal ogre in order for him to play a game. The dwarves are in separate cells and never communicate, and each day the ogre chooses arbitrarily one dwarf and brings him to a room with a lightbulb which is either on or off. The dwarf can leave it as it is or switch it.  On the first day, the dwarve decide on a strategy, and the lightbulb is off.  The dwarves are able to go out if one day one of them can say that all $100$ dwarves have been taken to the lightbulb (and be right about it).     Two important hypothesis:         the choice of the ogre is arbitrary (not random, arbitrary), but the game isn't unfair so he promises that he plans to take each dwarf an infinite number of times to the lightbulb room,   the dwarves have no sense of time (so in particular they cannot know how many dwarves went to the room before them, or if the ogre took them to the room several times in a row). Equivalently, we could say the ogre takes a dwarf to the room whenever he wants.      $ $  Question: before the game, all $100$ dwarves meet one (last?) time to decide on a strategy.    A. Can they find  a winning strategy? B. [Contains hint for 1...] Can they find a winning symmetric strategy (i.e. each dwarf has the same action policy) ?     I don't have an answer for B. I am putting this question here since I think some (very simple) combinatorics may be needed to find a proof for a symmetric strategy.  Here is my answer for A: one of the dwarf is chosen as a 'leader': only him can switch on the light, and only him can speak to the ogre. So each time he switches it on (or not if it is already) and count the number of times he switched it on. All $99$ other dwarves can only switch the light off once if they find it on (and then do nothing more). Once the leader has switched the light on $100$ times (it is off at the beginning), he tells the ogre that all dwarves have seen the lightbulb. Using the fact that after any number of days, the ogre will still bring each dwarf again in the room, it is easy to show that the dwarves will win.

100 prisoners are imprisoned in solitary cells. Each cell is windowless and soundproof. There's a central living room with one light bulb; the bulb is initially off. No prisoner can see the light bulb from his or her own cell. Each day, the warden picks a prisoner equally at random, and that prisoner visits the central living room; at the end of the day the prisoner is returned to his cell. While in the living room, the prisoner can toggle the bulb if he or she wishes. Also, the prisoner has the option of asserting the claim that all 100 prisoners have been to the living room. If this assertion is false (that is, some prisoners still haven't been to the living room), all 100 prisoners will be shot for their stupidity. However, if it is indeed true, all prisoners are set free and inducted into MENSA, since the world can always use more smart people. Thus, the assertion should only be made if the prisoner is 100% certain of its validity.  Before this whole procedure begins, the prisoners are allowed to get together in the courtyard to discuss a plan. What is the optimal plan they can agree on, so that eventually, someone will make a correct assertion?    I was wondering does anyone know the solution for the 4,000 days solution. Also, anyone got any ideas on how to solve this?   Just wanted to know if anyone got any ideas how to solve this.  is offering prize money for a proof of a optimal solution for it. I suppose to make it clear the people want a plan that would mean on average it would take least amount of time to free the prisoner. The point is the average run time is as low as possible.


So, the question is as follows: Prove that $\left|\sin 1\right| + \left|\sin 2\right| + \left|\sin 3\right| +\cdots+ \left|\sin 3n\right| > 8n/5.$ I have tried quite a few approaches, including using the Taylor expansion or the A.M-G.M inequality, but to no avail. It would be of great help if this problem could be proven. Edit: Angles are in radians, $n$ is a natural number.

I want to show for $x\in\mathbb{R}$, the following inequality holds. $$ \left|\sin x\right|+\left|\sin (x+1)\right|+\left|\sin (x+2)\right|>8/5. $$ This trigonometric inequality has been verified by Mathematica using the Plot commend. However, using the sum formula for the sine function seems doesn't work, and I cannot give a rigorous proof of it. Any suggestion, idea, or comment is welcome, thanks!


Prove that if $p$ and $p+2$ are both prime integers greater than $3$, then $6$ is a factor of $p+1$.  Computing a few primes greater than $3$ modulo $6$ shows the following pattern $5,1,5,\dots$ Thus $$\begin{cases}p\equiv1,5 \pmod{6} \\ p+2 \equiv3,7 \equiv3,1 \pmod{6}\end{cases}$$ Also $p+1 \equiv 2,6 \equiv2,0 \pmod{6}$. I'm not sure how to continue from here... I would like to use modular arithmetic to show this. Is it necessary to remember that every prime can be written as $6n+1$ or $6n+5$ here?

Is it possible to have twin primes whose center is not divisible by 6?


I'am a newbie in Python, however I'am fondling a code, which is more of encapsulation methods/functions in a class. The IDE underlined my code and gave me the option to make my method static, which I did. Notably they gave me the same output as my normal code.  My Normal Code  class firstClass():     def method1(self):         print "My first method defined in a Class"      def method2(self, somestring):         print "My second method in a Class: " + somestring   def main(c=firstClass()):     c.method1()     c.method2("somestring")   if __name__ == '__main__':     main()   My IDE-Edited code   class firstClass():     @staticmethod  # What is the meaning of this line really?     def method1():         print "My first method defined in a Class"      @staticmethod     def method2(somestring):         print "My second method in a Class" + somestring, "\n"   def main(c=firstClass()):     c.method1()     c.method2("somestring")   if __name__ == '__main__':     main()   I figured out that when IDE-Edited the method to static, it did pass in @staticmethod before my method as well as removed the self argument passed into the method. But I do not understand what a static method is all about in Python. What does it mean to make a method static in Python?

What is the difference between a function decorated with  and one decorated with ?


I keep reading "do not just caulk over bad grout", "do it the right way", "take out the grout is the only way to do it"... do it "right", yes. But I need to caulk it.  We havent used the shower in years, after learning it had not been properly renovated, with the intention of tearing the entire thing out ... but what if I am 35 weeks pregnant, on bed rest and am sick of my husband not getting on top of this one thing I wanted done before baby (to take a shower in my master bathroom). Why? Because my MIL will be staying with us and using the only other bathroom in the house and I dont want to share a bathroom with my MIL right after delivery.  Can I just caulk this kind of problem for a short while, somehow? A month maybe? The owners before us did a bad job on it and it is falling apart at the edges and corners. So we have not used it in years. Once I can get around after delivery - this reno project is getting DONE! In the meantime I want to be able to take a shower in my own room. Its a bathroom on 1st floor, with a cement floor. I dislike the entire thing. We want to just put in a fiberglass tub/shower but my husband has not given a lick about doing it before baby. And I am on bedrest. So, its been a sore situation as normally I am the one to initiate these projects. The whole house has been a project so it has just been frustrating.

We have an older shower, with 1x1 tiles on the floor. Some of these, the grout has started to crack, and we want to prevent water damage. However, we've exhausted our renovation budget for the year, and won't be able to do a shower replacement until sometime late next year.  As a temporary hack, could we apply a thin layer of caulk to these grout lines? Would this help?


For SERP results, is it a good idea to have the modification date shown instead of keeping the creation date? (i.e. making it look like there is fresh content)  I tend to make changes to my old posts once in a while and I'm wondering whether I should make sure that the modification date gets shown. Will that help drive more clicks to my website?  Note that I'm more thinking about the date shown near the author name at the top of an article. Dates hidden in the header in meta tags and such are probably never shown in the SERP anyway.

My sites has some old tutorials, which I am planning to update according to the latest version and change the publish date so that visitors can see it as a fresh tutorial.  I am just concerned whether it will do any harm to the tutorial SEO or otherwise have any benefit or not. Any suggestions/feedback is appreciated.


I didn't see any discussion alike and hence would like to check it out in case it is being discussed in the background by the fathers of the site.  Many pro's and con's, personally I dislike it (real questions, no real answers, no order, tons of noice), but the way that things go, there has been a massive adoption for this chatting programs that are being pushed in with a "productivity" sales pitch.  Question is in the umbrella of the existing chat system that is used by SE, there is no reference in this question to -entertainment, fun or alike, hence do not consider it duplicate of

Stuff like polls, recommendations based on subjective constraints, puzzles, webcomics etc. do not belong on the serious main SE sites, where professionals should be considered at work and having just a few spare minutes ("code's compiling") to answer questions, so they should not be distracted by such things. However, I'd also like to have a home for these things still using the SE engine. For the reason I mentioned before, this needs to be a separate place though. Let's call it four.[sitename-here].com.


I am following  in which there is some commands:  deb [arch=i386,amd64,armel,armhf] http://http.kali.org/kali kali-dev main contrib non-free deb [arch=i386,amd64,armel,armhf] http://http.kali.org/kali kali-dev main/debian-installer deb-src http://http.kali.org/kali kali-dev main contrib non-free deb [arch=i386,amd64,armel,armhf] http://http.kali.org/kali kali main contrib non-free deb [arch=i386,amd64,armel,armhf] http://http.kali.org/kali kali main/debian-installer deb-src http://http.kali.org/kali kali main contrib non-free deb http://repo.kali.org/kali kali-bleeding-edge main ## Security updates deb http://security.kali.org/kali-security kali/updates main contrib non-free   to be written in leafpad to install clamav and other softwares.  but I want to know how to open leafpad as root in terminal writing above commands and saving it.  Any Help? Sory for the bad English.  I am trying to install clamAV using commands still there is problem.

I want to change files with KomodoEdit that need sudo permissions. I can't start KomodoEdit with sudo, though (for whatever reason). Can I somehow grant Komodo permission to edit those files (in particular I am talking about apache2 files and /etc/hosts)?


How can I read the contents of a particular file in an archive without extracting the .zip it is contained within? I'm using the Linux command line.  An earlier  asks about viewing the directory of the archive. But for me it is not enough to see just a list of the files in the archive, I need to see the contents of a file in the archive.

How can I view the list of files in a ZIP archive without decompressing it?


Why is this the case? If I remove the local variable within the for loop scope, it will print task 10 for all tasks, instead of 1-10.   class Program     {          public static void DoWork(int i)         {             Console.WriteLine("Task {0} starting", i);             Thread.Sleep(2000);             Console.WriteLine("Task {0} finished", i);          }           static void Main(string[] args)         {             Task[] Tasks = new Task[10];              for (int i = 0; i < 10; i++)             {                 int taskNum = i; // make a local copy of the loop counter so                                   // that correct task number is passed into                                   // the lambda expression                 Tasks[i] = Task.Run(() => DoWork(taskNum));             }             Task.WaitAll(Tasks);             Console.WriteLine("Finished processing. Press a key to end.");             Console.ReadKey();         }       }

I met an interesting issue about C#. I have code like below.  List<Func<int>> actions = new List<Func<int>>();  int variable = 0; while (variable < 5) {     actions.Add(() => variable * 2);     ++ variable; }  foreach (var act in actions) {     Console.WriteLine(act.Invoke()); }   I expect it to output 0, 2, 4, 6, 8. However, it actually outputs five 10s.  It seems that it is due to all actions referring to one captured variable. As a result, when they get invoked, they all have same output.  Is there a way to work round this limit to have each action instance have its own captured variable?


I want to do the integral sign over the sign gamma (integrating around a path gamma)

I know what my symbol or character looks like, but I don't know what the command is or which math alphabet it came from. How do I go about finding this out?


I'm reading The Art of Electronics(3rd), and I'm just stuck with exercise 1.19. Here is the question:     Explain why L∝n² for an inductor consisting of a coil of n turns of   wire, maintaining fixed diameter and length as n is varied.   I'm not expecting a long complete mathematical explaination, because the book only gives me a little information, claiming that that should be enough.  My idea: I∝1/n(because practically a wire does have some resistance), and V∝n. As a result, L=V/I∝n². But I also notice that an ideal wire shouldn't have any resistance. So I'm confused now…

We start from the   $$ \mathbf{\nabla} \times \mathbf{B} = \mu \mathbf{J} + \overbrace{\mu \epsilon \dfrac{\partial \mathbf{E}}{\partial t}}^0. $$  We take surface integration of both sides, for the surface (\$s\$) inside the mean path (\$c\$) of the core.  $$ \int_s \left( \mathbf{\nabla} \times \mathbf{B} \right) \cdot d\mathbf{s} = \mu \int_s \mathbf{J} \cdot d\mathbf{s} $$  We use the  to rewrite the left hand side; where \$c\$ is in the same direction with the magnetic flux \$\Phi\$.  $$ \oint_c \mathbf{B} \cdot d \mathbf{\ell} = \mu N I $$  (The integral on the left hand side results \$NI\$, because there are \$N\$ different wires on the winding.)  The magnetic field density inside these kind of cores are considered to be uniform. So, we can write  $$ B \ell_c \overset\sim= \mu NI \implies B = \dfrac{\mu NI}{\ell_c}; $$  where \$\ell_c\$ is the mean path lenght of the core.  We can find magnetic flux from the magnetic flux density we have found by using the cross sectional area of the core \$A_c\$.  $$ \Phi = BA_c = \dfrac{\mu NIA_c}{\ell_c} $$  By definition, inductance is the amount of magnetic flux generated per applied current, that is  $$ L \overset\triangle= \dfrac{\Phi}{I}. $$  So, we find inductance of the system as  $$ \boxed{ L = \dfrac{\Phi}{I} = \dfrac{\dfrac{\mu NIA_c}{\ell_c}}{I} = \dfrac{\mu NA_c}{\ell_c} }. $$  But, all other sources () give inductance of an inductor like this as  $$ L = \dfrac{\mu N^2A_c}{\ell_c}. $$  What is the mistake I did in my derivation? Please explain in detail.


The device is show as following in devices in BIOS: SCU device 1 WDC WD 500... Model is Lenovo ThinkStation S30. What are the alternative software/method? There are several unlock software but I don't feel like paying for it.

I got a brand new Windows 7 machine, installed the operating system, created one account and forgot its password. What can I do?  There is no external CD, the operating system is loaded from somewhere inside the machine.  I already tried to remember passwords and tried all candidates with all possible combinations of caps lock, num lock etc.


How do I copy all the folder, subfolders and files permissions (recursively) from /www_03062018 to my new /www ?  I came across .  chmod --reference=RFile file   Which didn't help much, it did apply a change for the main folder /www but didn't apply on its subfolders and files.    I have tried:   chmod -R --reference=/www_03062018 /www   and it didn't work.   My situation:   I have 2 folders on my Ubuntu machine: /www and /www_03062018.   /www is a "git clone" from the production machine.   /www_03062018 is my old directory that i used to work on and upload files via FTP.   I started to use GIT and when I clone a directory its folder ownerships and file accesses settings don't get cloned along with it.

I've already copied terabytes of files with rsync but I forgot to use --archive to preserve files' special attributes.  I tried executing rsync again this time with --archive but it was way slower than what I expected. Is there any easy way to do this faster by just copying metadata recursively?


How can I download and install the Roboto Mono font on Ubuntu?  This is the font I am referring to:    It is a monospaced version of the Roboto fonts.  The above page does not have a download link, and the fonts-roboto package only contains the proportional Roboto fonts, so I cannot use ...

Question says it all. I need them to be available in gimp.


There is no return for the humans. I seem to remember that the humans and aliens find a way to get on, or I could be wrong. A small house in the Camargue of France is the link between the present and the past.

Please help me identify this book series:  In the future, humanity has started to develop psychic powers by encouraging breeding of genetic traits. Humans find a way to travel back to a specific time in the past, and everyone is really excited. Then, the travelers discover that time (possibly different place as well?) is already ruled by aliens, and the humans get enslaved.  The aliens and humans have different kinds of psychic powers, like farseers, psychokinetic powers, mind readers, and so on, and are very powerful. There is one human whose psychic abilities were limited in the future, but in the past he becomes one of the most powerful psychics.  There is a big war pitting all the psychics against each other.  The aliens might be some sort of proto-humans. I vaguely remember them looking like humans, but bigger. Please help!


I am trying to create a JavaScript function that will make my side navigation menu close when a user taps outside it. Here is the code that am trying to implement after fetching the navigation.  var sidenav = document.getElementById("Mynav"); window.onclick = function(event) {   if (event.target == sidenav) {     sidenav.style.display = "none";   } };   The other sidenav functionalities are okay. But I suspect this equity JavaScript module (==), am not sure if it should be (!=). Any help will be great appreciated.

I have some HTML menus, which I show completely when a user clicks on the head of these menus. I would like to hide these elements when the user clicks outside the menus' area.  Is something like this possible with jQuery?  $("#menuscontainer").clickOutsideThisElement(function() {     // Hide the menus });


Once you apply spin to a bezier curve with a set amount of set amount of steps, is it possible to go back after switching over to object mode and increase/decrease the amount of steps?

When you first add a cylinder, you have the option to change the number of vertices, etc, but once you do anything else in blender, it seems you no longer can edit those parameters.   Is there a setting anywhere or an add-on that allows these parameters to be edited later on? If not, how easy would such an addon/feature be to create for anyone reading this?


Prove that if $f$ is a differentiable function and $f'(x)$ is monotone, then $f'(x)$ is continuous.   my work:  If $f'(x)$ is monotone, then it can only have jump discontinuities. If in addition to this the range of $f'(x)$ is an interval, then it is continuous. We may assume WLOG that $f'(x)$ is monotone increasing. Since $f$ is differentiable, if $f'(a)<L<f'(b),$ for some $a,b,L\in\mathbb{R},$ then $\exists c (a<c<b\wedge f'(c)=L).$ Let $x_0\in\mathbb{R}.$ Pick $a\in\mathbb{R}$ such that $a<x.$ Then $f'(a)<f'(x_0).$ Thus, by the least upper bound principle, $f'$ has a supremum, say $L.$ Let $\epsilon >0.$ We know that $L-\epsilon$ is not a supremum of $f',$ so by definition, $\exists x_1\in (a,x_0)$ such that $f'(x_1)>L-\epsilon.$ Since $f'$ is monotone increasing, we have $L-\epsilon<f'(x_1)<f'(x) \leq L$ for $x_1,x\in (a,x_0), x_1<x.$ Then $L-f'(x)< L-(L-\epsilon) = \epsilon.$ Thus, $|L-f'(x)|<\epsilon,$ so $\lim\limits_{x\to x_0^-} f'(x) = f'(x_0).$ Similarly, using $\inf f'$ instead of $\sup f'$ and choosing another interval $(x_0,b),$ we can show that $\lim\limits_{x\to x_0^+}f'(x)=f'(x_0).$ Thus, $f'(x)$ is continuous on $x_0,$ so it is continuous.  However, can I even guarantee the existence of $a$ and $b$ using the fact that $f'(x)$ only has jump discontinuities?  I suppose I could use another approach involving the Darboux Theorem.

Assume that $f:[a,b] \to \mathbb R$ is a function.    Prove the following statement :       If $f$ is differentiable on $[a,b]$ and $f'$ is monotonic on $[a,b]$,   then $f'$ is continuous on $[a,b]$.     Note 1 : We've learned a theorem in the class which says :       If $I$ is an open interval and $f:I\to\mathbb R$ is monotonic, then   $f$ is continuous on $I$.   So, here i can say that $f'$ is continuous on $(a,b)$. But my problem is how to prove that $f'$ is also continuous at the end points $a$,$b$.    Note 2 : There's a similar question  but please pay attention that my question is asking about when $f$ is defined on a closed interval.


So I've successfully created my report and I've been trying to get an int variable as a parameter into my query, but I keep on getting this error:  Exception in thread "AWT-EventQueue-0" java.lang.NoClassDefFoundError: org/apache/commons/collections/map/ReferenceMap   The code I have to deliver the parameter is this:  private void report(){     try {         Connection con = DriverManager.getConnection("jdbc:mysql://localhost:3306/DB?autoReconnect=true&useSSL=false", "root", "root");          Map parameter = new HashMap();          parameter.put("ID", last_Report);          String path = System.getProperty("user.dir") + "/src/Reports/Report1.jrxml";          JasperReport content = JasperCompileManager.compileReport(path);          JasperPrint printRep = JasperFillManager.fillReport(content, parameter, con);          JasperViewer.viewReport(printRep);      } catch (JRException ex) {         Logger.getLogger(App.class.getName()).log(Level.SEVERE, null, ex);     } catch (SQLException ex) {         Logger.getLogger(App.class.getName()).log(Level.SEVERE, null, ex);     } }   I already checked if the last_Report variable has a proper value, and it does have an int, and when I print the Map, I get this: [{ID=25}].  I have my parameter declared here:  <parameter name="ID" class="java.lang.Integer">     <defaultValueExpression><![CDATA[]]></defaultValueExpression> </parameter>   And this is my query:  Select * from Reports where reports_ID = $P{ID};   Edit: I removed and re added all the libraries, and now I'm getting this:  Exception in thread "AWT-EventQueue-0" java.lang.NoClassDefFoundError: org/apache/commons/digester/Digester   Libraries I currently have:   mysql-connector-java-5.1.45-bin.jar commons-beanutils-1.9.3.jar commons-collections4-4.1.jar commons-digester3-3.2.jar commons-logging-1.2.jar itext7-7.0.2.zip jfreechart-1.0.19-demo.jar jxl.jar poi-3.17.jar jasperreports-6.5.1.jar jasperreports-fonts-6.5.1.jar jasperreports-javaflow-6.5.1.jar

I am getting a NoClassDefFoundError when I run my Java application.  What is typically the cause of this?


Let $\lim_{n\to\infty}a_n$ = a, $\lim_{n\to\infty}b_n$ = b. We need to find $\lim_{n\to\infty}\frac{a_nb_1+a_{n-1}b_2+...+a_1b_1}{n}$.  As far as I get it, the answer is $ab$.  I've tried this to prove it: as both $a_n$ and $b_n$ have a limit, they also both have a supremum. Let $C_1$ and $C_2$ be the supremua. Then by the properties of supremum for any given $е$ there are $k, l$ such that  $$\frac{a_nb_1+a_{n-1}b_2+...+a_1b_n}{n}<C_1C_2<(a_k+e)(b_l+e)$$ And I feel like there is some tiny step from here to the solution as the above is more or less $ab$, but I just can't get there. Would you mind giving some hints?

When $\lim_{n\to\infty} x_n = a$, and $\lim_{n\to\infty} y_n = b$, find the limit, $$\lim_{n\to\infty} \frac{x_1 y_n + x_2 y_{n-1} + \cdots + x_n y_1}{n}.$$ Thank you for your help in advance.


I was in terminal today and noticed this:    Jeremys-Iphone: I have no idea who Jeremy is or have a friend named Jeremy.   Do you know what this means, and how this might have happened?  Thanks!

My computer name in System Preferences > Sharing is set to "archos", but is showing as "iphone" on Terminal. It just started doing this after I loaded Xcode for doing iPhone development: Last login: Mon Nov  7 14:46:55 on ttys001 iphone:~ travis$   Any ideas what could be causing this?


I want get the the position (screen coordinates) of all divs in an iframe using javascript. No jQuery.  I can get all the divs in an array like this:  var arr = window.frames[0].document.getElementsByTagName("div");   Then i tried to do:  var arr = window.frames[0].document.getElementsByTagName("div").x;   But it didn't work. Console logs undefined. Any ideas?

I want to know how to get the X and Y position of HTML elements such as img and div in JavaScript relative to the browser window.


In Drupal 7 I could remove tabs using hook_menu_alter() like below:  /** * Implementation of hook_menu_alter */ function MY_MODULE_menu_alter(&$items) {     $items['user/register']['type'] = MENU_CALLBACK;   $items['user/login']['type'] = MENU_CALLBACK;   $items['user/password']['type'] = MENU_CALLBACK;   }   This hook has been removed from D8 and is now handled by altering routes. However, I cannot figure out how to remove the these tabs from the user login page. The following page gave examples of altering a menu item's title and permissions, but I haven't been able to find any clues to remove a tab from a page.

I want to change the menu type in Drupal 8. In Drupal 7 we can achieve this using   function module_menu_alter(&$items) {   $items['admin/config/people/ip-blocking/default'] = array(     'title' => 'Block IP Address',     'type' => MENU_DEFAULT_LOCAL_TASK,   ); }   Similarly I want to change the menu type in Drupal 8. How can I do it. Thank You.


I am trying to find the following limit.  $\lim_{n\to\infty}\sqrt n \int_0^1 \frac{1}{(1+x^2)^n}dx$  I have tried methods like Taylor Expansion and Reduction formula to solve the inner integral but that is not working. I also tried L'Hospital Rule. I just multiplied and divided by $\sqrt \frac1n$ and because both the numerator and denominator are of the form 0 I thought it will be alright to apply the rule. Am I wrong in doing that? Also it didn't work out as after taking derivative the term still seems to be of the form $\frac00$.   I am also not sure as the question asks for a range for the limit and the answer given is $\frac12 < L < 2$. How can I approach this problem?

$$  \lim_{n\to\infty} n^{1/2} \int_{0}^{1} \frac{1}{(1+x^2)^n}\mathrm{d}x=0 $$  Is my answer correct? But I am not sure of method by which I have done.


I am using the template of the my department. Here is the part of the latex code:  ... \chapter{Conclusion} \input{conclusion.tex} % References in Bibtex format goes into below indicated file with .bib extension \bibliography{thesis_references} % You can use full name of authors, however most likely some of the Bibtex entries you will find, will use abbreviated first names % If you don't want to correct each of them by hand, you can use abbreviated style for all of the references  \bibliographystyle{abbrv} \appendix % % If you are a Ph.D. Student you need to insert a CV at the end of you thesis % Check vita.tex for a simple CV template in Latex \input{vita.tex} \end{document}   I added the all chapters creating the different .tex files and using the input comment.  I don't want to change the template dramatically but need to add references. How can I fix the problem? Thanks

As you can see in  article on Wikipedia, there is a distinction made between notes, citations and references. I would like to have a section called citations at the end of my document which I can refer to like this[2]  [2] Lasker (1934), p. 73  which is to be found in my references under "Lasker, Emanuel (1934). Lasker's Chess Primer. London: Billings (1988 reprint). ISBN 0-7134-6241-8". Ideally, I would like this citation to contain a hyperlink to this reference (although this is not done in the document). Any good way to do this or something similar?


I consider myself a good programmer and want to answer questions on Stack Overflow.  But, all valid answers are posted within five minutes of questions being posted. I admire the enthusiasm of the strong Stack Overflow community.  But I am wondering, how do I score points when valid answers are already posted?

From "6 Simple Tips to Get Stackoverflow Reputation Fast" at codexon.com:   Be the First to Answer. Even at the cost of quality. Use Downvotes and Comments Strategically Use obnoxious in-your-face formatting and lists. Be Aware of the 200 rep/day Limit Edit, But Don’t Edit Too Much Associate your other accounts   Courtesy of . Agree? Disagree? Walnuts? Cantaloupe?


I have added myself to the sudo group. Yet when I try to perform A Sudo command, the error that says user not in sudoers group still pops up. Please help!

I clean-installed Ubuntu 11.10 today, and then installed VirtualBox.  This required me to add myself to the vboxusers group, and since 11.10 seems to no longer have a graphical app to add users to a group, I ran the following command:  sudo usermod -G vboxusers stephane   This is a problem.  I now see what I should have run instead is:  sudo usermod -aG vboxusers stephane   The end result is I'm no longer in the groups I should be in.  Including whatever group is required to run "sudo".  When I run any command as sudo now, I get the following:  $ sudo ls [sudo] password for stephane:  stephane is not in the sudoers file.  This incident will be reported.   Is there a way to fix this, or do I need to re-install from scratch again?


I do not know if it should be asked here, but I've always wondered what "meta" means for this forum. Why not "para" from "paranormal", for example?  I participate on a lot of StackExchange (SE) forums and I saw some Meta forums associated with them.  My question is just about the significance of the term "meta" for these associated forums.  Is it about the transcendence of subjects of questions made on Meta forums in relation to normal forums? Is the subject beyond the scope of subjects from normal forum? So is it like "hiper"?

I have just installed the Stack Exchange Android app, and have been creating accounts on different sites on Stack Exchange.  I noticed that from the main sites, I can reach a "meta site". What is this meta site?  Note: this question is about per-site meta, not Meta Stack Exchange which is covered aleady in .


If $A$ is a  square matrix of size $n$  with complex entries and is nilpotent , then I can show that all the eigenvalues of $A^k$ , for any $k$ , is $0$ , so $Tr(A^k)=0 , \forall k \ge 1$ . Now conversely if $A $ is a square matrix of size $n$ with complex entries such that $Tr(A^k)=0 , \forall k \ge 1$ , then is it true that $A$ is nilpotent ?

Let $A$ be an $n\times n$ complex nilpotent matrix. Then we know that because all eigenvalues of $A$ must be $0$, it follows that $\text{tr}(A^n)=0$ for all positive integers $n$.  What I would like to show is the converse, that is,      if $\text{tr}(A^n)=0$ for all positive integers $n$, then $A$ is nilpotent.   I tried to show that $0$ must be an eigenvalue of $A$, then try to show that all other eigenvalues must be equal to 0. However, I am stuck at the point where I need to show that $\det(A)=0$.  May I know of the approach to show that $A$ is nilpotent?


I have a code in c language and i have a function returning int value. In case of a not fullfiled condition however I need a variable from that function to give me the value N/A (not the big number which it initializes at the beginning). Any tip how to do that? Thanks a lot...

I wrote a function in C that converts a string to an integer and returns the integer. When I call the function I also want it to let me know if the string is not a valid number. In the past I returned -1 when this error occurred, because I didn't need to convert strings to negative numbers. But now I want it to convert strings to negative numbers, so what is the best way to report the error?  In case I wasn't clear about this: I don't want this function to report the error to the user, I want it to report the error to the code that called the function. ("Report" might be the wrong word to use...)  Here's the code:  s32 intval(const char *string) {     bool negative = false;     u32 current_char = 0;      if (string[0] == '-') {         negative = true;         current_char = 1;     }      s32 num = 0;     while (string[current_char]) {         if (string[current_char] < '0' || string[current_char] > '9') {             // Return an error here.. but how?         }          num *= 10;         num += string[current_char] - '0';         current_char++;     }      if (negative) {         num = -num;     }      return num; }


So, I'm very new to blender. I am trying to do a batch scripting project for a friend, so I'm just trying to learn the scripting/console environment. I already know python pretty well.  I found out you can press SHIFT+F4 to open the console... but after that, how do I close it? I want to see the changes I've made from the console on the scene in blender, but I can't find a way to go back to the default starting view--with the cube and the lamp and stuff. Pressing SHIFT+F4 again doesn't seem to help... I'm on a Lenovo thinkpad so I actually have to press SHIFT+FN+F4, if that makes any difference.

I accidentally opened too many menus (or windows) and I want to reset them to default.  It is really annoying, and effecting my animation.  Thanks


Is there an uncountable family of infinite parts of $\mathbb N$ with   two to two intersection finite?   If the two to two intersections are empty, it is false; if not $\mathbb N$ would be uncountable.   What about this case?

Can a countable set contain uncountably many infinite subsets such that the intersection of any two such distinct subsets is finite?


My laptop's processor is a Intel Core-i3 (2.00 Ghz), 4 GB ram and 1TB HDD. I want to dual boot Ubuntu 16.04 LTS with my currently installed windows 10.   Will it slow down my laptop?  Will the both OS use the full 4 GB ram each?

I am going to install Ubuntu to dual boot with Windows 8 soon, but one of my friends warned me that partitioning my hard drive will slow my computer down. I run on a 500GB HDD and 8GB of ram if that helps at all. Is that true if I do it?


Installing Ubuntu 10.10 I get the GRUB2 boot manager. By default is does instant booting of the first entry, i.e. you have to hold the Shift key while booting when you want to enter the menu.   How can I disable this behavior? I mean, how can I configure GRUB2 such that it always displays its menu and uses perhaps a timeout of 5 seconds for the first entry?

After trying (and failing) to install better ATI drivers in 11.10, I've somehow lost my grub menu at boot time.  The screen does change to the familiar purple colour, but instead of a list of boot options it's just blank solid colour, and then disappears quickly and boots into the default entry normally.    How can I get the bootloader back?  I've tried sudo update-grub and also various different combinations of resolutions and colour depths in startupmanager application with no success (640x480, 1024x768, 1600x1200, 16 bits, 8 bits, 10 second delay, 7 second delay, 2 second delay...)   edit:   I have already tried holding down Shift during bootup and it does not seem to change the behaviour.  I get the message "GRUB Loading" in the terminal, but then the place where the grub menu normally appears I get a solid blank magenta screen for a while.  Here are the contents of /etc/default/grub  # If you change this file, run 'update-grub' afterwards to update # /boot/grub/grub.cfg. # For full documentation of the options in this file, see: #   info -f grub -n 'Simple configuration'  GRUB_DEFAULT=0 GRUB_HIDDEN_TIMEOUT=0 GRUB_HIDDEN_TIMEOUT_QUIET=true GRUB_TIMEOUT=10 GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian` GRUB_CMDLINE_LINUX_DEFAULT="quiet splash" GRUB_CMDLINE_LINUX=" vga=798 splash"  # Uncomment to enable BadRAM filtering, modify to suit your needs # This works with Linux (no patch required) and with any kernel that obtains # the memory map information from GRUB (GNU Mach, kernel of FreeBSD ...) #GRUB_BADRAM="0x01234567,0xfefefefe,0x89abcdef,0xefefefef"  # Uncomment to disable graphical terminal (grub-pc only) #GRUB_TERMINAL=console  # The resolution used on graphical terminal # note that you can use only modes which your graphic card supports via VBE # you can see them in real GRUB with the command `vbeinfo' #GRUB_GFXMODE=640x480  # Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux #GRUB_DISABLE_LINUX_UUID=true  # Uncomment to disable generation of recovery mode menu entries #GRUB_DISABLE_RECOVERY="true"  # Uncomment to get a beep at grub start #GRUB_INIT_TUNE="480 440 1"


In this sentence should I use Apostrophe as s's or s'? I am always confused with what exactly the rule behind s' and s's. The sentence is:     Hours later Fadnavis's resignation, the the NCP-Congress leaders combined met Governor and staked claim to form the Government.   Fadnavis is the name of the Chief Minister (for your understanding)

What is the possessive of a noun ending in ‑s?  Are these both right, or is the second one wrong?   the boys' books the boss' car


Let $a_0,\ldots, a_n$ be real numbers such that $\displaystyle \sum_{k=0}^n \frac{a_k}{k+1} = 0$. Prove that there exists a real number $x$ for which $\displaystyle \sum_{k=0}^n a_kx^k = 0$.   Attempt  We have $\dfrac{a_0}{1}+\dfrac{a_1}{2}+\cdots+\dfrac{a_n}{n+1} = 0$, so to relate that to $a_0 + a_1x+\cdots+a_nx^n$ we get a common denominator $(n+1)!$ so that $a_0(n+1)!+a_1\dfrac{(n+1)!}{2}+\cdots+a_n\dfrac{(n+1)!}{n+1}=0$. Then how do I transform this so I have $x,x^2,\ldots,x^k$ multiplying the terms?

Knowing that $$ \frac{a_0}{1} + \frac{a_1}{2} + \frac{a_2}{3} +\cdots + \frac{a_n}{n+1} =0$$ Prove that  $$ a_0 + a_1x + a_2x^2 + \cdots + a_nx^n = 0$$ has at least one real solution.  I suspect that it's proven with the intermediate value theorem. But can't find two numbers that satisfy it.


Basically,  but for Australia.  When I visited Alice Springs, while I was able to meet and exchange pleasantries a bit with Aborigines, virtually all of the staff I interacted with were white or Asian, except for a couple of the staff at the Alice Springs Desert Park.  Are there parts of Australia where a reasonable proportion of employees at ordinary shops, accommodation etc. are Aboriginal or Torres Strait Islander, are viable tourist destinations, and are legally open to outsiders?

I am wondering if it's possible for a traveller in Australia to immerse in aboriginal culture, or Torres Strait Islander culture.  By "immerse" I mean stay in a traditional aboriginal area where people speak the language on an everyday basis and generally live to some degree or other in a traditional way. Maybe including staying with a family and being taught some traditional skills or otherwise participating in daily life.  I'm from Australia and work in tourism and I think it's safe to say most Aussies would have no idea if you can do this. But it's a big country and we're pretty ignorant of our native culture.  For me the language aspect is important. I do know the most actively maintained indigenous languages in Australia are in Central Australia (Pitjantjara, Arrernte, Warlpiri) and Torres Strait (Kala Lagaw Ya). I also believe that traditional culture and language is practiced in Arnhem Land by the Yolngu people. But I have no idea about the state of tourism in those areas.


So today my Server got hacked. But just a non sudoer user.   Nov 26 10:44:18 Ubuntu-1604-xenial-64-minimal sshd[27188]: Accepted publickey for ... from hackerIP port 26394 ssh2: RSA SHA256:...   He started a screen and scanned networks nothing more. History is empty. He connected with some publickey tho I never added any keys. I know I should use ssh-keys instead of password. But my root never got compromised. What I noticed in auth.log is this  Nov 26 19:01:01 Ubuntu-1604-xenial-64-minimal CRON[12360]: pam_unix(cron:session): session opened for user ... by (uid=0) Nov 26 19:01:01 Ubuntu-1604-xenial-64-minimal CRON[12360]: pam_unix(cron:session): session closed for user ... Nov 26 19:02:01 Ubuntu-1604-xenial-64-minimal CRON[12368]: pam_unix(cron:session): session opened for user ... by (uid=0) Nov 26 19:02:01 Ubuntu-1604-xenial-64-minimal CRON[12368]: pam_unix(cron:session): session closed for user ...   I do not know if I am posting it in the wrong section to be honest. I basically just want to know where to find the ssh-keys because my key folder is empty. How to disable remote login for that specific user (so that I only can connect over root and use 'su' command to login). And what to do with pam_unix.   Edit: Firtsly thanks for the huge help. I could undone everything the attacker did. And I disabled ssh-key login in sshd config so only passwords are valid. Failed2Ban is running as well and I am managing auth.log everyday manually.

I have testuser and I want that user to be able log-in locally, but not via ssh. How can I implement that?


A friend of mine asked me for help with a math problem and I struggled with this for over an hour. I told him sorry, and I felt bad. It's been bugging me now for hours. I don't even so much care for the answer of A, I just want to know how it should be done.

I've been solving this for days but I still I couldn't solve this. Can I know how to solve $x$ ?


I want to start my service via Alarm manager. i wrote below code. this code works good when my application to be in background or foreground but when i kill my application (I mean swiping application from recent apps) the program get an error. I don't know what is my problem and how can solve this.  Error:  Caused by: java.lang.NullPointerException at com.company.test.helper.ServiceSchedular.startService(ServiceSchedular.java:74)   I have a class that extends from Application like below:  public class KITILApplication extends Application{  private static Context context; @Override public void onCreate() {     // TODO Auto-generated method stub     super.onCreate();     ACRA.init(this);     ORMDroidApplication.initialize(this);     KITILApplication.context=getApplicationContext(); }  public static Context getappContext(){     return KITILApplication.context; } }   and my ServiceSchedularService for scheduling alarms for starting service is in below:  public class ServiceSchedular {      //Called from my main activity      private ServiceSchedular() {         alarmManager = (AlarmManager) KITILApplication.getappContext().getSystemService(Context.ALARM_SERVICE);      }      private static void startService(Date startDate) {     uniqueIdForStart = (int) Calendar.getInstance().getTimeInMillis();     //PlEASE NOTICE: I checked my application via both of startintent(comment startIntent and startIntent)     Intent startIntent = new Intent(KITILApplication.getappContext(), LocationService.class);     //Intent startIntent = new Intent("com.company.test.START_SERVICE");     PendingIntent startPendingIntent = PendingIntent.getService(KITILApplication.getappContext(), uniqueIdForStart, startIntent, PendingIntent.FLAG_UPDATE_CURRENT);     //I get error from below line !! Line = 74     alarmManager.set(AlarmManager.RTC_WAKEUP, millisToStartDate, startPendingIntent);     stopService(startDate); }    public static void checkNextPeriod() {       .        .          startService(new Date(millisDate));  }  }   I have a broadcastReciever that called checkNextPeriod and in checkNextPeriod, i called startService method.  AndroidManifest.xml:  <service android:name=".Service.LocationService">         <intent-filter>             <action android:name="com.company.test.START_SERVICE"></action>         </intent-filter>     </service>   I don't know my problem is for alarmManager object or intent object or application context or another thing. Please help me.

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


I'm fairly new on using LaTex, so maybe this is a really simple question to answer. I've rewritten the whole question due to the comments made.  What I'm trying to do is to declare my own command that is just like \footcite but that exclude the year.  The problem is that I in some citation don't want the year to be printed, just the author. So in general the command \footcite works perfectly with verbose-ibid, but for some specific citations the year shouldn't be printed.  Here is an example of my LaTex code (which I hope is MWA):      \documentclass{book}    \usepackage[utf8]{inputenc}     \usepackage[swedish]{babel}     \usepackage[style=verbose-ibid, backend=biber, labeldate, isbn=false, url=false, sorting=nyt, hyperref=true, pagetracker=true]{biblatex}  \usepackage{filecontents} \begin{filecontents*}{\jobname.bib}     @book{200910rp162,     Address = {Stockholm},     Author = {Prop.{ }2009/10:162},     Title = {Ers{"a}ttning vid expropritaion},     Year = {2010},     Keywords = {offentligttryck},     }     @book{Babcock1931rev,     Address = {Ann Arbor},     Author = {Babcock, Frederick M.},     Publisher = {University of Michigan, School of Business Administration, Bureau of Business Research},     Title = {Real estate valuation : a statement of the appraisal problem and a discussion of the principles involved in the development ...},     Year = {1931},      keywords={litteratur}, } \end{filecontents*} \addbibresource{\jobname.bib}  \DeclareNameAlias{default}{last-first} \renewbibmacro*{cite:short}{%   \printnames{labelname}%   \setunit*{\nameyeardelim}%   \iffieldundef{labelyear}     {}     {\printtext[parens]{\printtext[bibhyperlink]{%        \printfield{labelyear}%        \printfield{extrayear}}}}} \begin{document}  Some text that I have a citation on.\footcite[s. 12]{200910rp162}  And some other text I cite on another page.\footcite[s. 15]{200910rp162}  Text.\footcite[s. 12]{Babcock1931rev}  Text2.\footcite[s. 15]{200910rp162}   \end{document}   In my presented example footnote 1-3 is good. It's the 4th that is wrong, I don't want it to display the year (2010) for that specific source. But for "normal" literature I want it just like how \footcite works.     Edit: Regarding the comment. I'm writing a book about Swedish Law, and it's customary to cite Government bills that precede a new law by the name of the bill, e.g. Prop 2009/10:162 and a page reference. That's why I put the name of the bill as author in my .bib. And I also put the { } so that it comes out as Prop. 2009/10:162, otherwise LaTex treats the 2009/10:162 as surname and put it first. For all my "normal" citations I perfectly happy :). It's just for this "Prop-citations" I'm struggling.  I tried to make my own command with:      \DeclareCiteCommand{\footciteauthor}[\mkbibfootnote]   {\usebibmacro{prenote}}   {\usebibmacro{citeindex}%    \usebibmacro{citeauthor}}   {\multicitedelim}   {\usebibmacro{cite:postnote}}   But it didn't work. I also tried the tips with shorthand. It works okay, but then the "ibid-tracker" doesn't work.  Final edit: I manage to make my own solution, that I don't think is the best one, but at least it works for now. This is what I did (I reckon that it could be interesting if someone else has the same problem). First I took away all Year-entries in the .bib for the sources that I don't want year to be showed. Then I added this to my preamble:  \renewbibmacro*{date+extrayear}{%     \iffieldundef{year}       {\printtext{}}       {\printtext[parens]{\printdateextra}}}%  \DeclareNameAlias{default}{last-first} \renewbibmacro*{cite:short}{%   \printnames{labelname}%   \setunit*{\nameyeardelim}%   \iffieldundef{year}     {\printtext{}}     {\printtext[parens]{\printtext[bibhyperlink]{%        \printfield{labelyear}%        \printfield{extrayear}}}}}   Sorry for long post :)

I am using biblatex/biber with several bibliographies for my book, and the misc-type, which is also a single bibliography (as a chapter), for legal documents. These documents often do not have a proper date or rather the date is part of the title. However, Latex gives me a "n.d." output, and I am wondering what I can do for it to not give a "n.d." when there is no year given?    To make clear, the reason for why I don't want to use the "year" field is that I deal with very different kinds of documents, which may either have no date or the date is in the title, because of which I prefer to simply "hard-copy" the whole thing in the "howpublished"-section and need to suppress the year, if none is provided.  MWE:  \usepackage[autocite=footnote, language=german, style=authoryear-ibid, sorting=nyt, backend=biber]{biblatex} \usepackage[bottom]{footmisc} \bibliography{lit.bib} \makeindex \begin{document}  Test\autocite[2]{draftnotice}.  \printbibliography[title={EU Legal Documents}, type=misc1]  \end{document}   My lit.bib is as follows:  @misc1{draftnotice,     Author = {{COMMUNICATION FROM THE COMMISSION}},     Howpublished = {Draft Commission Notice of 2014 on the notion of State aid pursuant to Article 107 (1) TFEU}}   Check out my MWE on overleaf


For example, if I want to have an image with all the tables and relationships in my organisation, I would have to manually look for every object/field/relationship and build it myself in an external tool (like Draw.io).  Is there a tool to do this automatically?

I wonder if there is the ability to print / export the schema builder?  If so, where can I find? If not, would be a great idea to implement this feature for future releases.


I have two classes A and B, where I would like to access the private members of B from A.   class A; // Forward declaration      class B {     friend class A; // A is a friend of B      A a; // error: 'B::a' uses undefined class 'A' private:     int i; };  class A {  public:     B *m_b;      A(B *i_b) : m_b(i_b) {}; // legal access due to friendship };   However, I do not understand why I get the following error: 'B::a' uses undefined class 'A'

I am looking for the definition of when I am allowed to do forward declaration of a class in another class's header file:  Am I allowed to do it for a base class, for a class held as a member, for a class passed to member function by reference, etc. ?


I reported my missing passport 20 days ago. My visa is expiring in 10 days. What should I do? How much money will the Indian embassy need for an emergency certificate ?

I'm from India had come to Malaysia in visiting visa near my friend to meet in between in emergency he went to India and I stay in Lodge for 6 days and I lost my passport and in 2 days my visiting visa will expire 30days and I had not complained yet to police station in fear. How can I get back to my hometown in India?


In the following portion of code I make sure that, when the server returns an error message, the client shows it on the screen and, consequently, does not perform the operations within the if. The problem takes place when the server returns "Value not found". The client doesn't seem to recognize the returned string and remains in an infinite wait. I've already tried the .contains and .matches functions, but they don't work. Only comparing the length of the received string leads to the desired result. ReceivedName = sIN.readLine(); System.out.println(ReceivedName); if (ReceivedName.length() > 3) {          //ReceivedName = "N/D"; doesn't work.     ReceivedSurname = sIN.readLine();     System.out.println(ReceivedSurname); } else   continue;  The server performs these operations instead: if (!found) {    NameToSend = "N/D";    sOUT.println(NameToSend);    sOUT.flush();    continue; }

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 doing some tutorials on programming, and I am on the classic "write a program that returns true if and only if the input is a prime number". The solution is straightforward: for every number $d$ between $2$ and $N-1$ test if $d$ is a divisor of $N$. The first optimization is to reduce the testing interval to $[2, \sqrt{N}]$. The next optimization is to reduce the testing interval by eliminating the even numbers in it (plus a particular test for 2). Now becomes the next optimizations: what if I eliminate the multiples of 3 too? With the due adjustings, it reduces the interval to 1/3 of its original size. (It is just Inclusion-Exclusion from Combinatorics.) We can do this further for the next primes. Summing up, after $k$ interactions the set is reduced to $\prod_{1 \leq i \leq k}\left( 1-\frac{1}{p_i} \right)$ of its original size. Therefore, my question is: What is the  $\lim_{n \rightarrow \infty} \prod_{1 \leq i \leq n}\left( 1-\frac{1}{p_i} \right)$? Probably the limit has no known "closed form", but it would be cool to know it to at least some decimal places. After all, it can be useful to establish a point when the optimization efforts supersede the gains.

I found$\ \prod_{i=1}^\infty \frac{p_i}{p_i-1}\approx 11.0453$ on . Moreover, writing a paper, should one provide a proof or it is trivial? Thanks in advance.


i just started using blender recently and wanted to render an animation made with my gpu cos it was taking ages with the cpu. I went to user prefrences to enable the gpu but the cuda option wasnt there for me to click.(i have a Intel(R) HD Graphics 3000 gpu if that matters) also im using cycles

Why is it that Blender will only allow me to render with a CPU (GPU choice is unavailable)? Or is it until I acquire a graphics card that is specially built for such a task?  The images below show a Dell System Diagnostics (Video calibration) and GPU-Z results.      Platform: Dell Inspiron 3521 notebook with Core i3 Intel HD Graphics 4000


I am trying to achieve graphics similar to that in this image:   Currently, I'm using pst-asr, which seems like a good tool for the job, however, after scouring the documentation, I'm still not sure how to get past the basic parser. Any help is appreciated!

This is what I want to achieve    and this:    But all I've been able to make with tikz-qtree is the following:  \documentclass[12pt,a4]{article} \usepackage[utf8]{inputenc} \usepackage{tipa,tikz,tikz-qtree} \begin{document}  \begin{tikzpicture} [baseline] \tikzset{frontier/.style={distance from root=90pt}} \Tree [.$\sigma$ [.O [ p ] ] [.R [.$\mu$ a ] [.$\mu$ : ] ] ] \end{tikzpicture} \begin{tikzpicture} [baseline] \tikzset{frontier/.style={distance from root=90pt}} \Tree [.$\sigma$ [.O [ p ] ] [.R [.$\mu$ a ]  ] ] \end{tikzpicture}   And this:  \begin{tikzpicture}[baseline] \tikzset{frontier/.style={distance from root=90pt}} \Tree [.$\sigma$ [.O [ l ] ] [.R [.$\mu$ a ] [.$\mu$ l ] ] ] \end{tikzpicture} \begin{tikzpicture} [baseline] \tikzset{frontier/.style={distance from root=90pt}} \Tree [.$\sigma$ [.O [ : ] ] [.R [.$\mu$ a ] [ l ] ] ] \end{tikzpicture} \end{document}   Which renders:    and    The important part here is the linking from the leaves to more than one parent (it would be nice if I had the option of making the line dashed too). Now, pst-asr doesn't quite achieve what I want it to. It's important that I have the moras ('mu's). (Also it's a pstricks package, which means I must typeset it in DVIPSPDF.) I have tried a bit of the forest-package (especially forest-GP1), but I can't make that work as I want either. Lastly, some have recommended xyling, but I find that package very difficult to use.  Any recommendations?  Thanks.


I'm getting constantly interrupted by the same error, "There was a problem connecting to the server "admin's MacBook". The server may not exist or it is unavailable at this time.  Check the server name or IP address, check your network connection, and then try again."  The server in question is my older Macbook.  A few days ago I needed to copy iSync from the old MB to my newer MBP so I established a bluetooth file sharing link.  When I was done I turned file sharing off again and shutdown the old Macbook.  Apparently my MBP (the newer one) is still constantly trying to contact the old MB.  How can I get it to forget that that machine was ever connected?  Here's the error dialog:    So far I tried following:     System Preferences Network  Deleted BT connections  Then Open the Sharing and Disable Sharing       Restart MBP   without success.  It would appear that the problem is related to having installed iSync under Mountain Lion.  Here is a copy of the console log at the moment that the error dialog pops up:  8/7/13 11:36:43.623 AM iSync[18691]: ApplePersistence=NO 8/7/13 11:37:13.632 AM iSync[18691]: [0x10010ba70] |Server|Warning| failed to connect to the server: NSPortTimeoutException connection timeout: did not receive reply 8/7/13 11:37:13.909 AM NetAuthAgent[18695]: ApplePersistence=NO 8/7/13 11:37:15.984 AM SyncServer[18693]: [0x7fd9d340bea0] |DataManager|Warning| Client com.apple.iSyncDU.IMEI356495004217990 image file path /Volumes/Applications/iSync.app/Contents/PlugIns/ApplePhoneConduit.syncdevice/Contents/PlugIns/PhoneModelsSync.phoneplugin/Contents/Resources/MOTV535.tiff does not exist. 8/7/13 11:37:43.786 AM iSync[18691]: [0x10010ba70] |Server|Warning| failed to connect to the server: NSPortTimeoutException connection timeout: did not receive reply 8/7/13 11:37:49.170 AM SyncServer[18693]: [0x7fd9d340bea0] |DataManager|Warning| Client com.apple.iSyncDU.IMEI356495004217990 sync alert tool path /Volumes/Applications/iSync.app/Contents/MacOS/sync-tool does not exist. 8/7/13 11:38:13.939 AM iSync[18691]: [0x10010ba70] |Server|Warning| failed to connect to the server: NSPortTimeoutException connection timeout: did not receive reply 8/7/13 11:38:21.018 AM SyncServer[18693]: [0x7fd9d340bea0] |DataManager|Warning| Client com.apple.iSyncDU.IMEI356495004217990 formatter bundle path /Volumes/Applications/iSync.app/Contents/PlugIns/ApplePhoneConduit.syncdevice/Contents/Resources/Formatter.bundle does not exist.   Now I suspect that because I simply copied over iSync, it's still configured for the other machine, which it cannot find.  Simply deleting iSync did not do the job.  launchd must still be configured to run whatever backup daemon got installed when I ran iSync.

After logging on, I see this dialog box pop up. Whenever I dismiss it, it reappears 30 seconds later. (Stealing focus at the same time! Grrrr!)    "Slate" is my old iMac, which is sitting on the desk next to me, turned off. How can I stop my new Mac from constantly trying to connect to my old one? Both are running 10.7.1.


I have a simple C# Console Application and I want to execute a function when the user is closing the Console Application. So I need an event probably, which fires a function on pressing Ctrl + C, clicking the close button or writing something into the console to shut down. I tried every single code snippet on Stackoverflow and other pages but none of them worked on all cases. One solution worked for everything during debugging the Application in Visual Studio, however on running the compiled exe File in a Console Prompt, it didn't work on Ctrl + C and clicking the close button. Can anyone help me?  Here's my code in the Main class:  using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Threading;  namespace BankClient {     class Program     {         private static DB _db;         private static string _notUpdatedUsersCsvFilePath;          static void Main(string[] args)         {             BankServer server = new BankServer();             _db = new DB();             _notUpdatedUsersCsvFilePath = "not_updated_users.csv";              if (File.Exists(_notUpdatedUsersCsvFilePath))             {                 string[] lines = File.ReadAllLines(_notUpdatedUsersCsvFilePath);                  if (lines.Length > 0)                 {                     Console.WriteLine($"Es sind noch unbearbeitete Einträge von Kunden vorhanden, welche nicht in der Datenbank aktualisiert werden konnten:");                     foreach (string l in lines)                     {                         Console.WriteLine($"{l.Split(';').First().Trim()} {l.Split(';').Last().Trim()}");                     }                     Console.WriteLine();                 }             }               Console.WriteLine("Fetching DB...");             if (_db.fetchDB()) Console.WriteLine("Fetched DB successfully.");             else             {                 Console.WriteLine("An error occured whilst fetching DB!");                 Console.ReadLine();                 return;             }              Console.WriteLine();             foreach (Kunde k in _db.Kunden)             {                 Console.WriteLine($"- {k.Vorname} {k.Nachname} ({k.Id}) -> Kontostand: {k.Kontostand}");             }              Console.WriteLine();              Kunde kunde = _db.Kunden.Find(k => k.Id == 1);              if (kunde == null)             {                 Console.ReadLine();                 return;             }              kunde.Kontostand += 100;             kunde.ChangeMade = true;              Console.WriteLine($"{kunde.Vorname} {kunde.Nachname} ({kunde.Id}) -> Kontostand: {kunde.Kontostand}");              Console.ReadLine();              onClosing();         }          private static bool onClosing()         {             bool error = false;              Console.WriteLine("Stopping application...");             Console.WriteLine("Updating DB...");              Dictionary<bool, string> tmpDB = _db.saveDB();              if (tmpDB.ContainsKey(true))             {                 Console.WriteLine("Updated DB successfully.");             }             else             {                 error = true;                 Console.WriteLine(tmpDB[false]);                  foreach (Kunde k in _db.Kunden)                 {                     if (k.ErrorMessage != null)                     {                         File.AppendAllText(_notUpdatedUsersCsvFilePath, $"[{DateTime.Now}];" + $"{{id: {k.Id}, vorname: \"{k.Vorname}\", nachname: \"{k.Nachname}\", kontostand: {k.Kontostand.ToString().Replace(',', '.')}, filiale: {k.Filiale}, status: {k.Status}, errorMessage: \"{k.ErrorMessage}\"}}" + Environment.NewLine);                     }                 }             }              if (!error)             {                 Thread.Sleep(5000);                 Environment.Exit(-1);                 return true;             }              Thread.Sleep(10000);             return false;         }     } }   Best regards, Steven

I have a console application that contains quite a lot of threads.  There are threads that monitor certain conditions and terminate the program if they are true.  This termination can happen at any time.  I need an event that can be triggered when the program is closing so that I can cleanup all of the other threads and close all file handles and connections properly.  I'm not sure if there is one already built into the .NET framework, so I'm asking before I write my own.  I was wondering if there was an event along the lines of:  MyConsoleProgram.OnExit += CleanupBeforeExit;


#include <stdio.h>  void test(int *arr, int n) {     for(int i = 0; i < n; ++i)         printf("%d ", *(arr + i));     printf("\n"); }  int main(void) {      int a[10] = { 1,2,3,4,5,6,7,8,9,10};      test(a,10);      return 0; }   this gives the correct answer which is "1 2 3 4 5 6 7 8 9 10" but when I change first argument's type in test function to *arr[] it gives   1 3 5 7 9 0 0 965108401 262144 404875544    looks like i += 2 happens in for loop.  The changed code is below  #include <stdio.h>  void test(int *arr[], int n) {     for(int i = 0; i < n; ++i)         printf("%d ", *(arr + i));     printf("\n"); }  int main(void) {      int a[10] = { 1,2,3,4,5,6,7,8,9,10};      test(a,10);      return 0; }   What *arr[] actually is?

I know references are syntactic sugar, so code is easier to read and write. But what is the difference between a pointer variable and a reference variable?


The following code works fine  \begin{theorem}[Euler] Blah \end{theorem}   But whenever I try to use square brackets in the description I get an error.  \begin{theorem}[The set $[0, 1]$ is compact] Blah \end{theorem}   Can anybody tell me how to avoid the error, please?

I accidentally discovered () that a closing square bracket within an optional argument delimited by [ ] can cause problems.  Here is example code illustrating the issue:  \documentclass{article}   \begin{document}  \tableofcontents  \section[Square brackets ([ and ])]{Square brackets: [ and ]} % bad: the TOC now has "Square brackets ([ and", and the actual title is a mere ")".  Some text.  \section[{Square brackets ([ and ])}]{Square brackets: [ and ]} % good (works as originally intended)  Some text.  \end{document}   The text to be used as the optional (as well as the non-optional) argument contains a ], and this character is not supposed to function as the optional argument terminator but as a matching square bracket/parenthesis. Perhaps this is as it should be, but the question is how to best circumvent any potential problems. Enclosing this in a group works, but I don't know whether doing this has other side effects (perhaps not here in the case of \section but hopefully someone else has a better example of where grouping could lead to a problem). There is no (obvious) way other than writing [{ }] because [ and ] are not normally escaped. That [ and ] are normal characters and bear syntactic function (as optional argument delimiters) creates this potentially problematic situation.  Is simply enclosing the entire optional argument in a group ({ }) a good solution? Are there other/better ways?


What is the best and what is acceptable from the following sentences?  If one finds oneself in a situation where one's own life is at stake, one should think of oneself first. If one finds himself in a sitation where his own life is at stake, he should think of himself first. If one finds themselves in a situation where their own life is at stake, one should think of themselves first.

Mindfulness allows one to cope with their daily challenges.   Is "one" correct with "their" here?  I want to know if it is okay to user their (instead of he or she) when using 'one' as a pronoun.


I always had a question in my mind; ever since I have started coding, Stack Overflow has turned out to be a good solution finder for me.    When was Stack Overflow first released?   Who was the first one to register to the site?   I have seen that the site was under maintenance a few days ago, so I thought it's time for me to end the surprise I have been keeping in my mind and shoot.


For example : To build a kernel we can use make it will take more than one hour , to accelerate the process we can use make -j4 all this may finish almost four times as quickly.  Generally : How to force an application to use a specific nombre nof cpu ?

How can I set the processor affinity of a process on Linux?


Why is "having" written? And not "to have"  I was so close to having a perfect activity week on my Apple Watch.

What is the difference between these two:     Suzuki was nearly close to go out of business just after the World War period.   Vs.     Suzuki was nearly close to going out of business just after the World War period.(from a video)   When talking about the past, do these two sentences different from each other? Like, if you use verbing(going) with infinitive(to) in the past, does it mean that there is another event happening? Or none.


Can I boot Ubuntu 13 64-bit with the ISO installed on a USB flash drive (16GB)?  If so, how?  Thanks so much for your help!

I'd like to fully install Ubuntu 12.10 onto a 16GB USB 3.0 flash drive, not create a LiveUSB, but to treat the flash drive as an external hard drive.   I've read it's possible and I know my computer can boot from it. However, it doesn't work when I try. I've booted a LiveUSB from another flash drive and installed Ubuntu onto the 16GB one. It finished successfully, but when I try to boot from it and it takes me straight to Windows 8 instead. I feel I've done something when installing the boot loader.  It'd be great if I had some step-by-step instructions for:     how many partitions to make,  what kind,  how big, and  where to install the boot loader.


First time poster and a programming newbie so go easy on me! Just working on a little challenge given to me that required a method to check if a substring (aSub) could be found within a string (aString). This is what I wrote but it always returns false unless aSub == aString, then it will return true. I'm sure this will be a facepalm to a lot of you but I lack the experience to see exactly where the fault is! Thanks guys!  /**  *   */ public boolean stringChecker(String aString, String aSub) {    boolean foundIt = false;    int beginIndex = 0;    int endIndex = aSub.length();     while((foundIt == false) && (endIndex <= aString.length()))    {       if(aSub != aString.substring(beginIndex, endIndex))       {          beginIndex = beginIndex + 1;          endIndex = endIndex + 1;       }       else       {          foundIt = true;       }    }    return foundIt; }

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 came across the following sentence in this [link] ().   "As an example of domestic violence, she referred to his beating her up".  Could someone help me understand why it's "his beating her up" and not "him beating her up"?  I was not able to find similar examples online ...  Thank you!

I assume that the following sentences are grammatically correct:   He resents your being more popular than he is. Most of the members paid their dues without my asking them. They objected to the youngest girl's being given the command position. What do you think about his buying such an expensive car? We were all sorry about Jane's losing her parents like that.   I'm still getting used to this possessive gerund structure. It sounded so weird to me at first. Is the structure used in both formal and informal contexts? Are there any alternative structures that result in the same meaning and are more frequently used? (Examples taken from )


I have an iframe in a Lightning component that points to a Visualforce page, but I don't know what the relative path is in Salesforce from Lightning components to Visualforce pages. I currently have this set-up so it's relative to my code in SFDX project:    <iframe src="../../pages/ReCaptcha.page" height="110px" width="304px" frameborder="0" style="border: 0;" />   Of course, that's not the actual location of the Visualforce page in Salesforce. How can I get that?

Where can I get the URL for adding a VF page through iframe to a custom lightning component?  1 I create a VF page.  2 I know that I can display it in lightning using the following approach   <iframe src="{!'myURL'}" width="100%" height="300px;" frameBorder="0"/>  Where can I get myURL?


Well, I don't know how but today suddenly my first (and new) android phone (Moto E) got "sick" and everything on both the sides of the interface switched places. It is like reflection about vertical axis. I mean everything looks fine except that,...   operations for which I previously used my Right-Hand, Right-Thumb, etc., I now have to use my Left-Hand, Left-Thumb etc.  Things that were displayed Left aligned previously, are now being displayed Right-aligned. Text Alignment changed. The swipe that worked rightward previously is now changed to Leftward. Swapped direction of swipe. the signs that were previously on Top-Right (battery, time etc.), now have swapped their positions with signs on top-left (notifications and stuff). Memory status that increased rightward, is increasing leftward.   And I am also seeing occasional glitches in the graphics here and there. One of such is that only half of the context menu appear within ES file browser, when mobile is held horizontally. It seems that it is because its shape is not getting updated while the interface turns 90 degrees.  Is it due to some virus? I recently allowed app form unknown resources to install adobe flash (that didn't work, btw). I also have changed my runtime from Dalvik to ART.  Please tell me how to fix this...Thnk you!  Edit: I changed from Dalvik to ART 4 days ago and till today morning, everything was fabulous. Today I updated chrome and installed pocketbook app. And out of nowhere doom struck my humble mobile. Also "Mirroring" is indeed there but only of the relative position of elements.

I was doing some debugging on my device, and when I pulled out my lead, my whole phones layout has now been reversed.  So for example usually the clock, wifi battery symbol etc, on the top right, but now it is on the top left. The screens on my home screen have also been reversed, e.g.  At present I have   screen with some apps weather widget Main screen screen full of apps   But now it is the other way round. That is 4 and 1 have been reversed.  Also notice the buttons at the bottom have also been reversed, the back button is on the right side now instead of the left  When I drag down from top of the screen, to see notifications, the icons are on the wrong side.     Click image for larger version  I have seen this type of bug before and have no idea what has caused it. Anyone know a solution? I really don't want to have to do a factory reset. And Yes I have tried turning it off and on.  Any suggestions would be helpful!!


recently I saw a piece of code as follows :   namespace {     mutex* get_server_factory_lock() {         static mutex server_factory_lock;         return &server_factory_lock;     }      typedef std::unordered_map<string, ServerFactory*> ServerFactories;     ServerFactories* server_factories() {         static ServerFactories* factories = new ServerFactories;          // is variable factories assigned every time this function called ?          return factories;     } }  // namespace  /* static */ void ServerFactory::Register(const string& server_type,                          ServerFactory* factory) {     mutex_lock l(*get_server_factory_lock());     if (!server_factories()->insert({server_type, factory}).second) {         LOG(ERROR) << "Two server factories are being registered under "             << server_type;     } }   It seems that function server_factories() is similar to the singleton. My question is : to the best of my knowledge, factories is a static variable, and every time function server_factories() called, this static variable will be assigned a new value. But the result is not, every time server_factories() is called, it returns the same pointer. Why?  PS : with c++11 enabled when compiling.  Duplicated with

If a variable is declared as static in a function's scope it is only initialized once and retains its value between function calls. What exactly is its lifetime? When do its constructor and destructor get called?  void foo()  {      static string plonk = "When will I die?"; }


I am trying to add a missing word in another person's quote.  What is the proper way to do this?

I am currently writing an academic text and need to directly quote/cite text from a paper. What is best practice when I need to add a remark/note to the quote?  For instance, I would do it like this: The authors claim that "we do the best work ever in the area of CS (note: Computer Science)".  So in the above case the actually quoted text is "we do the best work ever in the area of CS", however, I want to add a note which explains the abbreviation "CS".  How should this be done?  Related questions:


Is infinity a real number?  If not, why not?  I want some very good arguments.   Thanks.  $$\rightarrow\leftarrow\Huge\Huge\Huge\boldsymbol\infty$$

Is infinity a number? Why or why not?  Some commentary: I've found that this is an incredibly simple question to ask — where I grew up, it was a popular argument starter in elementary school — but a difficult one to answer in an intelligent manner. I'm hoping to see a combination of strong citations and solid reasoning in the answers.


Could the ideas of category theory be applied to Physics, maybe simplifying how algebraic topology and sheaf theory and other hard-to-explain subjects are used in physics?

I know they have their adherents, but do more or less esoteric branches of mathematics such as Category Theory and/or Quantum Logic provide powerful tools for new theory development or are they just occasionally-useful presentational frameworks?  More particularly, is it worth investing the time to study these formalisms?


I have read many explanations on Threading but it is still quite hard for me to grasp. I tried it in my code and I get an error like so: "Additional information: Cross-thread operation not valid: Control 'dgvLocDatabase' accessed from a thread other than the thread it was created on". Below is the code I have created. It must add data which comes from different sources to 2 different datagridview.   private void btnCountRecord_Click(object sender, EventArgs e) {     CountRecord();      Parallel.Invoke(         GetDevData,         GetPcData         ); }    private void GetDevData() {      if (bIsConnected == false)     {         MessageBox.Show(@"Please connect the device first", @"Error");         return;     }      var sdwEnrollNumber = "";     var idwTMachineNumber = 0;     var idwEMachineNumber = 0;     var idwVerifyMode = 0;     var idwInOutMode = 0;     var idwYear = 0;     var idwMonth = 0;     var idwDay = 0;     var idwHour = 0;     var idwMinute = 0;     var idwSecond = 0;     var idwWorkcode = 0;      var idwErrorCode = 0;     var iGlCount = 0;     var iIndex = 0;      dgvDevDatabase.Rows.Clear();       axCZKEM1.EnableDevice(iMachineNumber, false); //disable the device     if (axCZKEM1.ReadGeneralLogData(iMachineNumber)) //read all the attendance records to the memory     {         lblProgressBar.Text = @"Loading data. Please wait...";         progBar.Visible = true;         progBar.Maximum = _gRecCount;         progBar.Minimum = 1;         progBar.Value = 1;         progBar.Step = 1;          while (axCZKEM1.SSR_GetGeneralLogData(iMachineNumber, out sdwEnrollNumber, out idwVerifyMode,                    out idwInOutMode, out idwYear, out idwMonth, out idwDay, out idwHour, out idwMinute, out idwSecond, ref idwWorkcode))//get records from the memory         {             iGlCount++;             var bioId = sdwEnrollNumber;             var timeLog = idwYear + "-" + idwMonth + "-" + idwDay + " " + idwHour + ":"                  + idwMinute + ":" + idwSecond;             dgvDevDatabase.Rows.Add(bioId, timeLog);             progBar.PerformStep();         }         if (progBar.Value == _gRecCount) lblProgressBar.Text = @"";     }     else     {         Cursor = Cursors.Default;         axCZKEM1.GetLastError(ref idwErrorCode);          if (idwErrorCode != 0)         {             MessageBox.Show(@"Reading data from device failed. ErrorCode: " + idwErrorCode, @"Error");         }         else         {             MessageBox.Show(@"No data from terminal to return", @"Error");         }     }     axCZKEM1.EnableDevice(iMachineNumber, true);//enable the device }  private void GetPcData()         {             var tda = new TimeLogDataAccess();             _rdr = tda.GetAllLogs();             while (_rdr.HasRows && _rdr.Read())             {                 dgvLocDatabase.Rows.Add(_rdr["bio_id"].ToString(), _rdr["time_log"].ToString());             }         }   If I remove the "GetPcData" from the Parallel.Invoke and substitute it with a Messagebox.Show("Call me too");, I don't get errors and if I just run the "GetPcData" on it's own, I don't get errors too.  So I think it's the "GetPcData" in the Parallel.Invoke that is causing the issue.   Can you please tell me what I'm doing wrong and if you can explain more to me this parallel.invoke or threading. Thank you.

I have a scenario. (Windows Forms, C#, .NET)   There is a main form which hosts some user control. The user control does some heavy data operation, such that if I directly call the UserControl_Load method the UI become nonresponsive for the duration for load method execution. To overcome this I load data on different thread (trying to change existing code as little as I can)   I used a background worker thread which will be loading the data and when done will notify the application that it has done its work.   Now came a real problem. All the UI (main form and its child usercontrols) was created on the primary main thread. In the LOAD method of the usercontrol I'm fetching data based on the values of some control (like textbox) on userControl.    The pseudocode would look like this:  CODE 1  UserContrl1_LoadDataMethod() {     if (textbox1.text == "MyName") // This gives exception     {         //Load data corresponding to "MyName".         //Populate a globale variable List<string> which will be binded to grid at some later stage.     } }   The Exception it gave was     Cross-thread operation not valid: Control accessed from a thread other than the thread it was created on.   To know more about this I did some googling and a suggestion came up like using the following code  CODE 2  UserContrl1_LoadDataMethod() {     if (InvokeRequired) // Line #1     {         this.Invoke(new MethodInvoker(UserContrl1_LoadDataMethod));         return;     }      if (textbox1.text == "MyName") // Now it wont give an exception     {     //Load data correspondin to "MyName"         //Populate a globale variable List<string> which will be binded to grid at some later stage     } }   BUT BUT BUT... it seems I'm back to square one. The Application again  become nonresponsive. It seems to be due to the execution of line #1 if condition. The loading task is again done by the parent thread and not the third that I spawned.  I don't know whether I perceived this right or wrong. I'm new to threading.  How do I resolve this and also what is the effect of execution of Line#1 if block?  The situation is this: I want to load data into a global variable based on the value of a control. I don't want to change the value of a control from the child thread. I'm not going to do it ever from a child thread.   So only accessing the value so that the corresponding data can be fetched from the database.


Is there any way to use date in format dd/MM/yy? The Google Docs support only MM/dd/yy and it cause us problems to use it (we can't sort the date column).

The input string for dates in Google Docs's spreadsheet app seems to be set to en_US, which is quite unnatural to me.  How can I change the input format?


For the spell polymorph, it says that you keep your alignment and personality. Does that mean when an evil character polymorphs into a t-rex, he will attack his friends and team?

The polymorph spell states, in part:     The target’s game statistics, including mental ability scores, are   replaced by the statistics of the chosen beast. It retains its   alignment and personality.   Does retaining its personality suffice to let it remember who its allies are?  Even if transformed into something stupid like a T-rex?  What does it even mean for a beast with Int 2 to have someone's "personality"?


The title says it all, there is a way to know how many partitions has a number? With "a way" i mean if there is any formula or polynomials to provide the number of ways to "part" a number. The question arose up after i answer the query "What are the partitions of 5?" I found seven, in fact is seven, but i would appreciate a double check

It is easy to realize that given a natural number N the number of doublets that sum N are $\frac{N+(-1)(N \pmod 2)}{2}$ , so I thought I could reach some recursive formula in the sense that found the number of doublets I could find the number of triplets and so on ...,  example: N=3 the only doublet is 2+1=3 -not said yet but 2+1, and 1+2 count as one- then I could count the number of way the number 2 can be expressed as the indicated sum and got the total number of ways 3 can be written as a sum. But this seems not so efficient, so I was wondering if there is other way to attack the problem and if there is some reference to this problem such as if it is well known its used, once I read that this have a chaotic behavior, and also read It was used in probability but don't remember where I got that information. So if you know something I would be grateful to be notice, thanks in advance.