Besides traveling at the speed of light, how can we be sure that it is possible to have energy and momentum without mass?

Question: How can we be sure that it is possible to have energy and momentum without mass? If something were to continually lose energy, would it not also lose a corresponding amount of mass? I understand that photons are predicted to have no mass because they travel at the speed of light, but is there another reason this is believed?
Answer: Photons are not " predicted" to have no mass, they have no rest mass, a photon with not light speed does not exist. You can measure its momentum $p=\frac{hf}{c}$ and thereby its mass . A particle with rest mass≠0 can never reach the speed c, approaching c its mass increases. If a particle losses energy it also looses mass, but you have to experiment with very fast particles to measure it, so you will not see it in cars which loose speed.
But to understand all this you have to study relativity.
Answer: You cannot separate the idea of having energy and momentum without mass from the idea of moving at the speed of light. I.e. there is no "besides". The basic equation that relates energy, momentum, and mass is: $$m^2 c^2 = E^2/c^2 -p^2$$ From this equation, in the special case that $p=0$ we get the famous $E=mc^2$. And in the special case that $m=0$ we get the usual photon relationship between momentum and energy $E=pc$. Since the velocity is always given by $$v=\frac{pc^2}{E}$$ for a massless particle we always get $v=c$. There is no way to separate $m=0$ from $v=c$, one implies the other.
Comment: By "besides," I mean "what is another reason?" I put that "besides" in the question as an attempt to keep people from answering like you did, because I'm already aware of the thing you stated. What is another reason we believe it is possible to have energy and momentum without mass?
Comment: There is no other reason, they are inseparable.
Comment: Alright. Fair enough. I thought there was no other reason to believe it, but just wanted to make sure. I guess it's a good thing there's no other reason. Thanks.
Answer: How about this: even in classical electrodynamics (no quantum, no relativity) electromagnetic waves carry momentum. Waves can't have mass because they are not objects. And electromagnetic waves are disturbances in a medium that isn't made of stuff with mass.
And it has to be that way for conservation of momentum to be compatible with electrodynamics. Recall the basic picture of radiation: accelerating charges produce electromagnetic fields, which travel at a finite speed until they meet other charges and cause them to accelerate.
If the waves don't carry momentum then momentum appears to disappear from the first charge, then reappear in the second charge later. Conservation of momentum can only be true at every stage in this process if the wave itself has momentum.
So even with just classical electrodynamics you have to extend the concept of momentum to things beyond particles with mass. That means it should not be surprising to find other surprising kinds of particles with momentum.


How aren't Qualia and Experience the same thing (examples.)

Question: I'm both, trying to find if this thought process is valid (reach correct conclusions in the questions) and also how are the standard interpretations different (which it seems they are.)
Definitions
Experience

Understood as a conscious event in the widest sense, experience involves a subject to which various items are presented. In this sense, seeing a yellow bird on a branch presents the subject with the objects "bird" and "branch", the relation between them and the property "yellow". Unreal items may be included as well, which happens when experiencing hallucinations or dreams.

So I'm does not only including sensory perceptions but also dreams. I'm also including feelings and thoughts.
This may be one of the reasons why my interpretations of these terms don't quite match others'; some may not count that we 'experience' a thought or a dream, even though it's a perception, but not a sensory perception.
Wikipedia
The next paragraph is optional but gives more examples apart from the ones I wrote myself later on.

A great variety of types of experiences is discussed in the academic literature. Perceptual experiences, for example, represent the external world through stimuli registered and transmitted by the senses. The experience of episodic memory, on the other hand, involves reliving a past event one experienced before. In imaginative experience, objects are presented without aiming to show how things actually are. The experience of thinking involves mental representations and the processing of information, in which ideas or propositions are entertained, judged or connected. Pleasure refers to experience that feels good. It is closely related to emotional experience, which has additionally evaluative, physiological and behavioral components. Moods are similar to emotions, with one key difference being that they lack a specific object found in emotions. Conscious desires involve the experience of wanting something. They play a central role in the experience of agency, in which intentions are formed, courses of action are planned, and decisions are taken and realized. Non-ordinary experience refers to rare experiences that significantly differ from the experience in the ordinary waking state, like religious experiences, out-of-body experiences or near-death experiences.

Qualia
Each of the named items is a composition of Qualia: a bird's location, shape, colour (brightness, hue, saturation..), even any meaning that I'm attaching to it. Also, any thought would be a Qualia, and also an experience (or part of the experience.) For Qualia (see link at the top for more info) I mean the subjective or qualitative properties of experiences. which are, in turn, all we experience.
So both what one would call "external stimuli perceptions" which come from external objects, and the internal experiences like a thought, an illusion, a dream
Since all we experience is from a subject's perspective, and are qualities, it follows that they are the same thing.
For the so called 'objective' properties, are actually subjective (they are composed of Qualia, or subjective properties.)
Some more examples
If we are hungry that's a feeling, but that's the experience, it's not an addition to it.
When someone is dreaming, again, that's the person's experience. (as one finds in the Wikipedia Definition.)
There is no red without "no-redness" experience such that we can separate what a qualia is from what non-qualia experience is. Two people may have a different experience, but not the same experience and different qualia. That's a contradiction in terms.
The reasons why they will have a different experience (or qualia) is simply that they are structural items, and hence slightly - but not completely - different.
Problems

Is experience a collection of integrated Qualia, and  if we remove these, there is nothing left ? Can we remove the redness and leave the red ?
Is this not the typical way those terms are seen ? Can you explain how are these two concepts not the same compared to the way most philosophers would interpret them ?

For example, is the difference just that Experience is what we seem to agree as if it were 'out there and public', and can point to, like "that's a tomato", and qualia are somewhat "private" ? However, is this really fair definition (isn't a silly mistake) ?
For there is only the private in this sense (qualia), since we are all objects that process a stimuli and get a disproportionate effect in return - which I don't know if it's explained - i.e the experience.
Comment: You are routinely overestimating the self-explanatory power of your one-liners, and of mind-reading over the internet. There is a reason philosophers write long texts to fix their terms. So put an effort into it and find one if you want substantive answers.
Comment: "Experience" is a very vague colloquial word, "qualia" is a more precisely delineated term, at least, as used in philosophy. Whether two people can have the same experience and different qualia simply depends on how "experience" is meant by the speaker. They can mean some empirical event, or qualia, or anything in between, or some mixture thereof. Explaining colloquial shades of meaning and uses of "experience" is not really a question for this SE.
Comment: Then pick some text by a philosopher where both are used in a way that interests you, and link or quote it. At least, then there will be something firm to go on. At present, it is very nebulous which concepts you want "explained" exactly.
Answer: Disclaimer: I just made up these definitions. I don't know if they're standard in any field.
Here's a guess: "experience" is just general term describing our subjective... experience. "qualia" are smaller units of that experience. For example, I can see the color red and hear a high pitched noise at the same time. I would be experiencing at least two qualia. And at a later time maybe I'll see the color blue and smell pie. Experience can refer broadly to the subjective experience that can encompasses many qualia at one time and extends over different times.
So our experience is made up of lots of different qualia and each quale is a little bit of experience. So they're closely related but technically different.
However, the word "experience" could be used in practice to refer to smaller bite-size pieces of experience that could be considered to be qualia. So in practice there may be a lot of overlap between the two words.
Comment: @MahNeh No, I haven't read that
Comment: Yes, as the first question says: "isn't experience a bunch of qualia..." Maybe you add, that it's integrated as well. But the point of the question is: can you find a qualia that's not part of experience ? i.e we can not have the same experience and different qualia so imho the same explanations that are valid for explaining experience, are valid to explain qualia (that's my main thought behind, which seems to be not popular.)
Comment: Yeah, my (naive) understanding is that experience is the sum of the qualia that make it up. So there is no qualia that's not a part of experience. If we have the same qualia we will have the same experience and vice versa. But again, that's my naive understanding. (Sounds like I'm in a similar place as you).
Comment: Indeed. Did you read Schroedinger's what is life ?


Google play services doesn't get installed

Question: I just wanted to upload a video on YouTube but after updating the app to the latest version , it says that it needs Google Play Services to run. I tapped different places of the screen because it sometimes works with other apps, but this case is not the same. I tried hitting the back button and it just quit. I installed that Google app several times but it doesn't get installed. What should I do?
Comment: You can download the Google Play Services APK file from APK Mirror, just read the instructions on how to find the correct version for your device:  http://www.apkmirror.com/apk/google-inc/
Answer: You can download it from here,
you need to search for your android version.
http://www.apkmirror.com/apk/google-inc/google-play-services/
you need to download for your android version>4.1/4.4/5.1/6.0
or try to reinstall YouTube
I have the same problem.
I just download play services and problem was fixed.
EDIT:they support android 2.3+ im using old android phone now,and I can confirm that they support ,also confirm that it's  working for 4.0.


Language/Framework support for Interacting With CouchDB

Question: I am interested in knowing if there are any server-side web application frameworks which integrate nicely with CouchDB? Does anyone have any experience in doing this? It seems like a dynamic language would be well-suited for playing with the JSON, but I am more interested in hearing about how it would fit in with the framework and the application's design.
Answer: Two frameworks that I would suggest for CouchDB are Ruby on Rails and Django. Both have a small file you can include that allows for easy interaction with CouchDB. For Ruby/Rails, this gives you the ability to write code that looks like this (code snippets yanked from here):
<code># Create the database
server = Couch::Server.new("localhost", "5984")
server.put("/foo/", "")

# Insert a new document into the database
doc = <<-JSON
{"type":"comment","body":"First Post!"}
JSON
server.put("/foo/document_id", doc)

# Get the document back later
res = server.get("/foo/document_id")
json = res.body
puts json
</code>
Python/Django lets you do the same with a relatively minimal amount of work (see here). Both of these aren't at the web framework level but they require a minimal amount of work to set up and are pretty easy to get going in Rails and Django. The Django approach still requires some packages to be installed so if you just can't do that for some reason the Rails approach is the way to go.
Another good how-to on Python on Django can be found here (also lifted from the CouchDB FAQ).
Comment: How would you use the django user system and authentication, authorization? - that depends on django models which depends on sql.
Answer: Depending on what you want to build CouchApp may be something to look at: It's specially designed for writing apps with CouchDB:
https://github.com/jchris/couchapp/wiki/manual
Answer: The only web framework that dedicates itself to CouchDB is currently CouchDBKit for Python.
Check out the official wiki page that lists how to get started in your language:
http://wiki.apache.org/couchdb/Basics
Pick the language and framework that suits you best and then use one of the light CouchDB libraries with it.
It seems that things are move quite quickly at the moment for CouchDB. I'm sure there will be more frameworks out there soon with CouchDB support. I'm currently looking into building one for PHP.
Answer: I have had good success with jcouchdb for Java and CouchApp for JavaScript and CouchDBKit with Python. All of these are actively developed, open source and well designed and easy to enhance if they are missing something you really need. I have submitted patches and feature enhancements for jcouchdb and couchapp both.
Answer: Actually, you don't really need such a framework. Instead, you can just write the whole web application in CouchDB. It allows you to generate HTML files, or any other XML derived format, and you can even use HTML-templates. I consider this a good choice, because JavaScript is a rich and flexible language. On the other hand you don't have the overkill of a connection between the database and your web application.
For more details, check out: http://books.couchdb.org/relax/design-documents/shows
There's also a related question: Using CouchDB to serve HTML


Is it possible to add your own WordNet to a library?

Question: I have a .txt file of a Danish WordNet. Is there any way to use this with an NLP library for Python such as NLTK? If not, how might you go about natural language processing in a language that is not supported by a given library. Also say you want to do named entity recognition in a language other than English or Dutch in a library like spaCy. Is there any way to do this?
Comment: Short answer: you can't. An API supports only what it supports (and that's one of the largest drawbacks for spaCy). The long answer is, if you really know what you're doing, I guess you potentially could edit the source yourself.
Comment: @Posh_Pumpkin, that's not correct. It's possible to extend the API since it's an open source project, see https://github.com/nltk/nltk/pull/1621 . Even for `spacy`, I believe @honnibal and @ines encourage contributions: https://github.com/explosion/spaCy/blob/master/CONTRIBUTING.md
Comment: @alvas Well, yes. Doesn't that count as editing the source? I'm pretty sure that's not exactly what the OP wants.
Comment: Firstly, it's `python`, even the `CPython` contains code written in `Python` =) I don't think any computing language/algorithm/libraries have evolved to the stage where we can put any file in and expect output without writing code or pressing buttons on a horrendous GUI ;P #nomorecomment to avoid extended discussion, use stackoverflow chat.
Comment: @alvas I don't know how any of that is even relevant here. I *did* say he can edit the source if he wants. Also sorry, don't know how to use SO chat on mobile + am not really looking forward to extending this meaningless discussion..
Answer: Is there any way to use this with an NLP library for Python such as NLTK?
You can do this with NLTK, though it's a little awkward.
You'll need to convert your WordNet corpus to the Open Multilingual Wordnet format, which is a simple tab-delimited format. Note they already have a Danish WordNet.
Then you should install the WordNet and Open Multilingual Wordnet corpora in NLTK if you haven't done so already. This will create a directory like ~/nltk_data/corpora/omw/, with a subdirectory for each language file. You'll need to add your corpus by creating a directory for it and naming your file like this:
~/nltk_data/corpora/omw/xxx/wn-data-xxx.tab

xxx can be anything, but it must be the same in both places. This filename pattern is hard-coded in NLTK here.
After that you can use your WordNet by specifying the xxx as a lang parameter. Here's an example from the documentation:
>>> wn.synset('dog.n.01').lemma_names('ita') # change 'ita' to 'xxx'
['cane', 'Canis_familiaris']

How might you go about natural language processing in a language that is not supported by a given library?
I've done this with Japanese frequently.
Some techniques look inside your tokens - that is, they check if a word is
literally "say" or "be" or something. This is common with stemmers and
lemmatizers for obvious reasons. Some systems use rules based on assumptions
about how parts of speech interact in a given language (usually English). You
might be able to translate these expectations to your language, but typically
you just can't use these.
However, many useful techniques don't look inside your tokens at all - they
just care whether two tokens are equal or not. These usually rely primarily on
features like labels or collocation data. You might need to pre-tokenize your
data, and you might want to train a generic language model on Wikipedia in the
language, but that's it. Word vectors, NER, Document Similarity are example
problems where lack of language support isn't usually an issue.
Also say you want to do named entity recognition in a language other than English or Dutch in a library like spaCy. Is there any way to do this?
SpaCy provides a means of custom labelling for NER. Using it with an
otherwise unsupported language is not documented and would be a bit tricky.
However, since you don't need a full language model for NER, you can use an NER
specific tool with labelled examples.
Here's some example training data for
CRF++ based on the CoNLL format:
He        PRP  B-NP
reckons   VBZ  B-VP
the       DT   B-NP
current   JJ   I-NP
account   NN   I-NP
deficit   NN   I-NP
will      MD   B-VP
narrow    VB   I-VP
to        TO   B-PP
only      RB   B-NP
#         #    I-NP
1.8       CD   I-NP
billion   CD   I-NP
in        IN   B-PP
September NNP  B-NP
.         .    O

He        PRP  B-NP
reckons   VBZ  B-VP
..

This kind of format is supported by several CRF or other NER tools. CRFSuite is one with a Python wrapper.
For this kind of data, the algorithm doesn't really care what's in the first column, so language support isn't an issue.
Hope that helps!


Fisheye/Wide-Angle lens Calibration in OpenCV

Question: I know the default OpenCV Calibration systems model a Pinhole camera, but I'm working with a system using extremely wide FOV lens (187-degrees).  If there any existing way to do this in OpenCV, or to work with just wide lenses?  Or will I have to rewrite all the calibration/undistort for my system?
Comment: have you tried opencv's functions?  The fact that they model a Pinhole camera means they model distortions from a pinhole camera, that an undistorted camera is a pinhole camera.  I believe that opencv can correct radial and tangential distortion, do you have other types of distortion to correct for?
Comment: I have and they seem to almost work, but some of the assumptions made aren't accurate.  For example, I can literally see behind myself with a 187 degree camera, so computing 2D->3D transforms gets more difficult as points can be in a full 180-degree area in front, and completely orthogonal to the viewing direction.
Answer: Seems there's no good OpenCV way to do this.
I wound up using OCamLib to do the actual calibration, then writing my own "undistortPoints" function (using Scaramuzza's algorithms) to undistort 2D image points into 3D unit vectors (rather than 2D points).  Unfortunately, this also breaks lots of other stuff in OpenCV because most OpenCV image processing functions expect 2D points and their own pinhole calibration model, so I've had to rebuild significant portions of the code for this.
I welcome any other insight into this.
Comment: would you mind posting / sharing your code, if you got it to work?
Comment: Yeah this sounds very interesting. Wouldn't mind seeing code as well. Thanks referencing Scaramuzza's algorithms.
Answer: There is a good reason why people don't use wide angle lenses much - when images are undistorted, the resulting image is highly non-rectangular and the quality on the edges is so bad that the image needs to be cropped back to… 90 deg FOV. So the question is, why don't just use 90 deg FOV lens on the first place? The situation gets even worse with stereo cameras and image rectification.
If you really need to have wide FOV use several cameras or rotating camera. Here are some examples: PointGrey Inc.
Answer: In order to calibrate camera with extremely wide FOV lens, you can use Omnidirectional Camera module from OpenCV Contrib.
It is important to notice that you have to rebuild your OpenCV with OpenCV contribs to use it.
Answer: OpenCV fisheye camera calibration module uses a method based on pin-hole camera model. In this model we have an angle between an optical axis of camera and ray of light from some object in front of camera. We also have an angle between optical axis and direction to point on undistorted image (corresponding to object).
If calibration was performed correctly, these 2 angles will be equal. It means that if FOV of your camera is about 180 degrees, the distanse from center of undistorted image to edge of undistorted image will be equal to infinity.
As a result OpenCV fisheye correction module (cv::fisheye) undistorts only a central part of image. More detailed explanation of this limitation I placed HERE.In my own results I got 140-150 degrees FOV in undistorted image. If FOV about 140-150 degrees is suitable for you, you can use cv::fisheye without any modification


What is the difference between "Butterschmalz" and "Butterreinfett"?

Question: Both "Butterschmalz" and "Butterreinfett", have similar meaning in Leo. I can't identify the difference.
Comment: Asked like this, this is not a question for this forum. You should first consult a reference book of merchandise knowledge where you can look up standard requirements for products to be sold under certain names, and when then there are language-related questions left, come back here to discuss them.
Comment: @ChristianGeiselmann Could you please give an example of "a reference book of merchandise knowledge"? As you can see in my question, I have already referred Leo, which is a popular multilingual dictionary.
Answer: I believe "Butterreinfett" is the technical term with specific meaning while "Butterschmalz" is a common term.
Both denote a type of clarified butter where water, milk protein and lactose have been removed by (among others) heating and  centrifugation. "Butterreinfett" has at least 99.8% of fat.
The common term, "Butterschmalz", might have been coined in order to associate it with Schmalz=lard, (which it is not).
You are more likely to find "Butterreinfett" used on a list of ingredients (e.g. of chocolate) and "Butterschmalz" more likely find as a product name in a shop.


Can an application create multiple processes?

Question: I have come to understand that a program is an executable code in the hard-drive and when this is being executed an instance of this program is loaded on to the memory called a process. My question is when a big application(program) is executing, a PC game, can multiple processes be created..i.e. there are multiple programs to support this one application(these different programs start with the application and end with it? or does each application just create a single program?
Answer: Yes.
The Chrome web browser is a good example of this. Open Chrome and you'll find dozens of chrome.exe processes. Studying the well-published documentation on how and why Google has done this with Chrome can be very informative and gives ideas why other applications may behave in similar ways.
Comment: While there are multiple instances of the chrome.exe PROCESS, they are not all performing the same operation, and they all do their different tasks in service to the same PROGRAM, the Chrome browser. The example still stands. Further, thinking a little more, every Operating System does precisely this to nearly every program running on it: using its own processes to provide required services to the applications/programs running on it.
Comment: @GRANZER, for an example of two distinct programs, consider a client-server model. I recently worked on a project where one program ("client") needed to provide data to a server program, and then get a response back.  The client program (process) would actually launch the server program/process, and then terminate that program when needed, and they both ran at the same time on the same machine. For another example, when you install some programs, you'll see command prompts popping up and going away; each of those is a program/process launched by the installer.
Comment: A process can create as many other processes as it wishes for any reason. They can work independently or together - whatever they were designed to do.
Comment: Yes of course...but in case of chrome, it is the multiple instances of the same program. My question is can there be programs which when run would start running instance of other..totoally different programs too and the output of all these programs put together gives us the output.
Comment: Exactly! But the notes I read just said that the process is an instance of a program and there can be multiple processes and went on to give the example of multiple instances of the same program being created and nothing was said about process created by totally different programs...ie one program or application creating multiple processes(and i don't mean multiple process dues to multiple instances of the same program, but due to instance of different programs being created due to runing this one program/application.) Thank you.


Our company has more than 130 customer side bugs in just one moth after release. How can I reduce it as team lead?

Question: Our company has more than 130 customer side bugs in just one moth after release. This problem exist before I join the organisation. My manager assigned me to reduce the number of bugs in production and allocated a new dedicated smoke test team under me. my team need to perform system testing in every sprint and make customer reported bug below 75. Can anyone share your ideas and experience lessons to solve this bottleneck?
Comment: This is incredibly broad. Do you have any data to help? Consider things like classifying the reported defects to understand affected parts of the system or root causes, identifying areas of poor test coverage, identifying areas with poor automated test coverage, usage information for various features. But without more data to guide your effort, it's not possible to say what the next step(s) should be.
Comment: I follow Thomas' perception - you are basically asking how to do better software engineering.
Answer: Since your team can't prevent or remove bugs, I presume you mean that your team is supposed to catch as many bugs as possible so that the number of bugs reaching customers each release drops to below 75.
It sounds to me as though your team is the first/only set of testers the organization has employed, which means you will need to be a testing advocate as well as a test team lead.
I can't give you answers, but I can offer suggestions.
Core Functionality First - tour the application, and note which functions are essential to using the software. Note how many of the customer-reported bugs fall into this region. Your team's first priority is to get the most used and essential features as solid as they can be.
Buggy Features - Go through the reported bugs, and note the features where they occur. Chances are that bugs will cluster in certain features - these are indications that your second area of focus should be these features (unless they are core functionality, in which case you are already focusing on them)
Automation - To prevent regression, once you have an idea of the core functionality and the biggest problem areas of the software, start building automated tests to cover core functionality first, then other problem areas. This will be a long term project that will ultimately act as insurance to assure the team that any breakage of existing tested features will be caught. I recommend at minimum a nightly run of test automation so that regression of existing tested features will be caught within a day of being introduced to the code. If you can run an automated smoke test with every build of the software, so much the better.
Anything Else - Once you have the core features and problem areas under control, you can start focusing on other parts of the software. This is unlikely to happen for at least a year, possibly longer, since your team is going to have to use manual and automated techniques as well as build automation until you have a stable regression test suite. They will also be retesting corrected bugs, performing exploratory and scripted testing on any new development, and - ideally - reproducing any new customer-reported bugs to add detailed reproduction information.
This is a difficult task you and your team have been given, and it will be a long-term task. I suggest that you monitor the number of bug escapes with each release, and choose milestones to celebrate. A reduction in 25 bug reports per release looks like a good starting point, but if that seems too ambitious don't be afraid to adjust it.
You should also be ready to celebrate when your team reaches the milestone you've been given. With this task, you will need milestones to mark your progress.
Answer: 1. Root Cause Analysis:

First things first, let's collect all the bugs and categorise them by type or functionality.

Are there any patterns? Maybe many bugs are just symptoms of a common issue.

Let's have a with the development team. We might find some insights while discussing the recent code changes.

2. Strengthening our QA Process:

Time to revisit our QA routine. Are there gaps that we're missing?

Perhaps, adding more testing stages, like integration or UAT might be beneficial.

Also, have we thought of automated testing tools? They could be game-changers.

3. Feedback Loop:

How about more frequent sync-ups between QA and our devs? Communication is the key.

Using tools like Jira, MS-Teams could help in getting instant feedback.

It's essential that our devs tackle these issues promptly; let's keep the backlog short.

4. Training:

Noticed some recurring coding issues? Let's make a list.

Some training sessions could help. Sharing knowledge is always good.

An external workshop now and then could bring fresh perspectives.

5. Clearer Documentation:

Let's go through our documentation. Any ambiguities or gaps?

A good documentation refresh can make a big difference.

And of course, we need to ensure the team is aligned with any changes we make.

6. Time for Retrospectives:

Monthly retrospectives sound good? Discussing highs and lows can be insightful.

We should convert our discussions into actionable steps for the next month.

Continuous improvement is the way to go.

7. Bug Prioritisation:

Let's sort and prioritise these bugs. Not all bugs are created equal.

Setting aside dedicated time for bug fixing could be a good strategy.

Testing is crucial. We can't afford to have more bugs while fixing some!

8. Bug Tracking Tools:

If we're not using a bug tracking tool, now might be the time.

A quick training to get the team onboard is a good idea.

Tracking bugs can help us stay on top of things.

9. Engage with Customers:

How about a feedback portal? Direct insights from our users can be invaluable.

Someone should definitely keep an eye on this portal regularly.

10. Phased Rollouts:

Releasing updates to smaller user batches might help.

We can gather feedback, make necessary changes, and then roll out to a bigger group.

This iterative approach might save us from many future headaches.

11. Automate Regression Testing:
Automated regression tests can ensure that new code changes don't introduce new bugs or reactivate old ones.
This automation will allow the team to focus on new features while maintaining confidence in the existing functionalities.


What is sine wave torque constant and voltage constant for electric motors

Question: I am wondering if anyone can explain to me what the sine wave torque constants and the voltage constants are and how to calculate them for a specific electric motor? Thanks!
Answer: The torque constant and the voltage constant are characteristics that apply to permanent magnet DC (PMDC) motors (with brushes and commutator) and brushless motors.  When you talk about a "sine wave torque constant" that only applies to brushless motors (I'll come back to this later).
Starting with the PMDC motor, we can model it using 3 equations:
\$T=k_T*I\$
\$E=k_E*\omega_m\$
\$V_S=E+R_a*I+V_b\$
\$k_T\$ and \$k_E\$ are the torque constant and voltage constant (sometimes called the back-emf constant), respectively.  Assuming SI units, they have units of \$Nm/A\$ and \$V/(rad/sec)\$, respectively.  \$I\$ is current DC current, \$T\$ is electromagnetic torque in \$Nm\$, \$E\$ is the back-emf, \$\omega_m\$ is the angular velocity in \$rads/sec\$, \$V_S\$ is the supply voltage, \$R_a\$ is the armature resistance and \$V_b\$ is the voltage drop of the brushes.
If you hook the PMDC motor up to another motor and back-drive your motor at a known speed (\$\omega_m\$) and measure the voltage produced across the terminals (\$E\$), then you can determine \$k_E\$ from the second equation.  You should get the same value of \$k_E\$ at various speeds.
If you assume an ideal PMDC motor, \$k_T = k_E\$, assuming SI units.  So if you find \$k_E\$ using the above method, you will get a pretty good estimate of \$k_T\$ as well.  However, you can measure \$k_T\$ by mounting the motor to a dynamometer, applying various torques to the motor from 0 to stall torque, and measuring current draw for those different torques.  You can then plot torque vs. current and find the best-fit slope of that line.  That slope is your \$k_T\$.
For 3 phase brushless motors, these 2 constants are similar in principle, but the specifics differ.  Because 3 phase brushless motors can have different shapes for their back-emf waveform and because they can be driven with different shaped currents (sinusoidal or trapezoidal) and a number of other issues, the relationship between \$k_T\$ and \$k_E\$ is complicated and changes depending on the specifics of the motor/drive combination.  The key to keeping it all straight is to remember that \$k_T\$ and \$k_E\$ in a PMDC motor assumed that the back-emf (\$E\$) was a mean, rectified DC value and \$I\$ was the DC input current.  If you keep that in mind, then the equations still hold for brushless motors per phase.  So, for example, one issue that comes up is that if you want to measure \$k_E\$, you usually can only measure the line-to-line voltage, not the phase voltage.  So brushless motor manufacturers often give you the line-to-line values for motor constants, not the phase values.  Sometimes motor manufacturers will give you the peak values for these constants, other times they will give you the RMS values for these constants. They won't always tell you which one they give you.
Sometimes you will see motor manufacturers distinguish between sine wave torque constant and square wave torque constants.  If you are using a trapezoidal drive (6 step) drive, then you should use the square wave torque constant.  If you are using a sinusoidal drive, you should use the sine wave torque constant.  The ratio between these 2 is (ideally) \$\frac{2*\sqrt3}{\pi} = 1.103\$.
You can measure \$k_E\$ and \$k_T\$ for a brushless motor in basically the same way as with a PMDC motor.  However, with a brushless motor, keep in mind you are probably measuring line-to-line voltages and make sure you keep track of whether you are measuring peak or RMS values of voltage and current.


Is it possible to do a partial transaction log backup with SQL Server 2017? I don't have enough disk space to do a full backup

Question: Inherited a database server to maintain and found that the transaction log is 92 GB.  My plan is to do the backup of that and get it brought back down to a regular size, then fix it.  The problem is I don't have enough disk space on the machine to do the backup locally, then offload.  Is there a way I can run the backup for a specified size or time period so I can do it in stages?
Answer: No, you can't do partial log backups to split this work into multiple files.
What you can do depends on your goals.

If you need to maintain the log backup chain, your only option is to provision more storage (locally, or via a network share) and do a complete log backup
If you don't need to maintain the log backup chain, and your goal is simply to get this file back to a manageable size, you have a number of options. The gist of what you need to do, though, is this:

"truncate" the transaction log (by switching to the SIMPLE recovery model, or doing a backup log TO DISK = 'NUL', or probably a number of other things)
shrink the log file to an appropriate size for your workload (using the SHRINKFILE command)
If you switched to the SIMPLE recovery model, you should switch back to FULL now*
Regardless of the approach you take to truncating above, you'll want to re-initialize the backup chain by taking a full backup and then a log backup, so that you are back in a good state, recovery-wise

*By the way, if you're intentionally not taking log backups, and don't plan to start, you should leave the database in the SIMPLE recovery model. Otherwise the log file will grow again.
Comment: @AaronBertrand That's a good point, the log backup could be tiny!
Answer: Assuming this is a standalone instance and the database isn't part of an AG, you should be able to abandon the current log chain and start over, by:

switch to simple recovery model
run CHECKPOINT; twice
DBCC SHRINKFILE(filename, 1);
ALTER DATABASE db MODIFY FILE(name = filename, size = <some appropriate size>);

I usually do this in multiple steps if I want the file to be big - e.g. first to 4GB, then to 8GB, etc.
you don't want to leave the file tiny, it just means it'll have to grow again, and log file growths are expensive and disruptive

switch back to full recovery model
take a full backup
create a schedule for taking log backups regularly enough that this doesn't happen again and you stay within RPO/RTO, but not so frequently that you have thousands of log files to manage
find some disk space where you can take backups not on this machine ... not much point of a backup if that machine goes away and takes both your database and the backups you took locally with it
read this post in full:

Why Does the Transaction Log Keep Growing or Run Out of Space?
Answer: No, there is no concept of a "partial transaction log backup".
Do you need to maintain the transaction log chain for restores, or otherwise hold on to the 92GB of transaction log backups?
If you want to just get rid of it & start over, and can confidently say "I don't need to do point in time recovery to a point in time before now!" then you can just start over.
You can effectively discard the whole thing by backing up to NUL:
BACKUP DATABASE MyDatabaseWithHugeTLog
    TO DISK = 'NUL:'; --Sends it to nowhere

Then you would be able to shrink the transaction log to make it be less huge:
USE MyDatabaseWithHugeTLog
DBCC SHRINKFILE(MyDatabaseWithHugeTLog_Log,10000);

Note, you may need to backup/shrink/backup/shrink more than once to get the log down to the desired size. Shrinking the log effectively just lops off the tail end of the file, so if there is a portion that is in-use, you may need to get that active portion to wrap around to the start to shrink to the desired size.
Then, you've ruined your ability to do point-in-time recovery, because we sent the log off to NUL. So you'll want to take a fresh full or differential backup so that you have a starting point for future restores.
BACKUP DATABASE MyDatabaseWithHugeTLog
    TO DISK \\SomeServer\MyBackupShare\MyDatabaseWithHugeTLog_YYYYMMDD_HHMISSMS;

Answer: Some great advice above, but just a quick question before you do anything drastic - is the 92GB you quoted the size of the transaction log file, or is that the amount of space that is in use within a larger file?
If only a few GB is in use within the transaction log then the transaction log backup will be a lot smaller than you might be expecting.
Also you have the option to use backup compression which will help to reduce the transaction log backup file size.
Another option could be to backup the log to Azure Blob Storage to avoid having to add an extra volume, this could even be the basis of a long term backup solution for you:
https://learn.microsoft.com/en-us/sql/relational-databases/tutorial-sql-server-backup-and-restore-to-azure-blob-storage-service?view=sql-server-ver15&tabs=SSMS
Answer: You can do the backup to a network drive.
Comment: Yeah.  If I can't do a partial backup locally, I'll end up getting a drive mounted temporarily to do this.  It's hosted on Azure so it's easy enough, but then I have to get other people involved, requests, approvals, etc.  It'll take a week+ to get done then, most likely, so was hoping to get it done in chunks.
Comment: @sdouble Don't you have some kind of operational / petty-cash budget in Azure? I doubt _every_ expense needs a weeks' worth of approvals (if it is that bad, I suggest looking for a better employer) - you can provision a new multi-terbayte VHD, mount it, do the backup, download the data, and delete the VHD all within an hour (probably!) and won't cost more than a couple bucks.


auto-login and hidden-users in lightdm

Question: I edited <code>/etc/lightdm/users.conf</code> to include users I don't want to see at login screen when booting. However, they appear in the login screen. Then I restart Ubuntu system rather than entering password. So this second time auto-login attempt is successful. The system is booting up as expected. I don't know why auto-login attempt is not working at the first attempt.
Answer: Most programs only read their configuration files when they are started or restarted. Rebooting your system forced lightdm to start again, and it then read its configuration file so your changes took effect.

auto-login and hidden-users in lightdm


What are these two "Dialup Device"s that suddenly appeared on my Macbook Pro?

Question: Today I have realized that there are two weird additions to the list of Network Devices on my Macbook Pro (High Sierra). It kind of freaks me out especially because of the weird non-latin characters associated with one of the devices.
Is it something potentially dangerous? Could it be an attempt for hacking?
Comment: That icon is used for various serial devices, including a USB-serial adapter, and I think some cellphone internet sharing
Comment: USB Serial adapter has a different icon
Answer: Most probably they appeared if you have ever connected to some other devices (other mobile phones, for instance) which shared their internet connection with you OR for charging.
Another possible reason is that someone near you has a device with the ability to create a personal Wi-Fi hotspot. Your computer is able to detect this so will add it to your list of available providers.
You can safely delete them. No, this is not dangerous and doesn't look like an attempt for hacking.
Also, check this for security: Prevent my Mac from connecting to an unsecure Wi-Fi network?
Comment: but why are they "Dialup Connection"s? I don't think anyone uses dial up in the office. The only reason I can suspect is that I had to install Windows XP as a virtual machine to my mac and that might have created some interfaces
Answer: All sorts of hardware when connected can offer to the OS a connection (android and iOS devices are most common).
It's fine to delete all network interfaces you don't think you need and then watch for them to reappear when ever you physically connect accessories.
It could be harmless or it could be nefarious - so I would investigate a bit more.
Comment: I think my issue is similar to this one here: https://discussions.apple.com/thread/8155246


Outer thigh pain

Question: After riding bike for approximately an hour one or the other of my outer upper thighs begins to experience pain from the hip to about the middle of the thigh.  The severity is directly related to the effort used to pedal. If I shift my weight on the saddle away from the painful thigh the pain is relieved. Also extending the affected leg straight as I'm riding gives temporary relief. No other discomfort is noted. Seat height and position appears correct. Could the pain I described be the result of an incorrectly sized saddle or perhaps something else?
Comment: Does this seem appropriate: [**How can I get rid of I.T. Band pain caused by cycling?**](https://bicycles.stackexchange.com/questions/222/how-can-i-get-rid-of-i-t-band-pain-caused-by-cycling)?
Answer: Are you maybe rocking sideways in the saddle? Could be because the saddle is too high, could be because you have insufficient hip stability. Weak (or underutilized) abductor muscles of the hip (especially the Gluteus Medius and Minimus) are a common ailment. But these things are hard to pin-point. I once had Iliotibial Band Syndrome (ITBS) along the outside of the thigh down to the knee from cycling and it was really due to weak Gluteus muscles.
Can you film yourself from behind and from the side at a high frame rate? It could give you some clues what's happening.

Outer thigh pain


How to distribute tension load on a three footed claw?

Question: Good day!
I am helping my little ones 6 and 7 to develop a robot that can pick up and stack cubes three high as well as gather blocks.  They came up with the design that enables them to pick up three cubes at a time when lined up and then pull up the claw, turn, drive to another cube, place the cubes on the stand still cube and release.
   Well they got the claw made with two rods connected to gears to motor and the rods reinforced, then they made insect like legs 3 - pairs of two on the rods, with gripper feet pads on the ends of the legs. All of this works as it opens and closes! The problem is that when they try to close the claw on the cubes and pick up all three cubes, the first - closest to motor feet have a nice tight grip, the second - middle feet - have a lighter grip and just barely can lift the block, and third - farthest from motor doesn't even have a grip on the blocks.
   I think it's because the second and third set of feet are farther from the motor. But how can they evenly disperse the tension load so the claw can pick up all three blocks?
I tried putting elastics on the feet for better grip and unless we put ten on each foot for the third set and maybe five on the second set it wont work.  Even though it's a quick fix I would like to help them figure it out the proper way of spreading the load so to speak.  We also tried putting a small band on the third set of legs.  The robot could still open and close and that worked for the third set but not the second.  We tried putting a band on the second and third but the legs wouldn't open anymore.  I could use a lighter band but is there another way? We only have one little motor to run it so we can't give all the leg sets it's own motor and even if we did there would be weight issues.
  THank you in advance!
Comment: Please attach a photo or your kids' CAD drawings.  While your description is good, it is ambiguous in places.
Answer: Tension distribution is easily accomplished using a simple mechanism called a whiffletree.
Classically invented to allow several horses of different strengths to pull evenly on a single load, this also allows a single motor to pull several linkages with the same amount of force.
It would also allow the mechanism to self-adjust slightly to construction inaccuracy, and also allow the gripper to better adapt to the shape of what its holding.


Prove that the integral $\int_0^1 f(t) P(t - x)dt$ is a polynomial in $x$

Question: So suppose $f$ is a generally complex, continuous function on $[0,1]$ and $P$ is a polynomial defined on the real numbers. Evidently
$$
\int_0^1 f(t)P(t - x)\,dt
$$
is a polynomial in $x$ but that this is the case is not obvious to me. How might one go about proving this? Note that $f$ is continuous and so is integrable but it may not have a nice anti-derivative.
Comment: The intuitive answer I would give a student would be that the $t$ terms disappear. Remember that definite integrals with respect to a given variable $\theta$ turn all instances of $\theta$ into constants, so all that is left is a polynomial in $x$ (and integration of a polynomial yields another polynomial). Of course, this explanation doesn't quite explain that the $t-x$ within the polynomial function leaves the function a polynomial once integrated, though this too can be reasoned by a similar thought process and the fact that integrating a polynomial yields another polynomial
Comment: Additionally, the proof by Alozizio below should help in piecing together the above logic and provides a more rigorous foundation for the claim that $x \to t-x$ doesn't change the fact we get a polynomial in $x$
Comment: @BrevanEllefsen: The intuitive answer you gave is rigorous and is almost devoid of mathematical symbols. I like such arguments because they are easier to understand and do not compromise on rigor.
Answer: $P(X)=a_0+a_1X+\cdots+a_nX^n.$
$P(t-X)=a_0+a_1(t-X)+\cdots+a_n(t-X)^n=a_0+a_1t-a_1X+a_2t^2+2a_2tX+a_2X^2+\cdots$
$\implies f(t)P(t-X)=f(t)a_0+tf(t)-a_1X+t^2f(t)a_2+2a_2tf(t)X+f(t)a_2X^2+\cdots $
The above is meant for you to visualize what is happening. When you integrate with respect to $t$, everything alongside the $X$'s will turn to constants.
Answer: Alternatively, show that $Q(x):=\int_0^1\,f(t)\,P(t-x)\,\text{d}t$ satisfies $\frac{\text{d}^k}{\text{d}x^k}\,Q(x)=0$ for some integer $k>0$.  As $P$ is a polynomial, $\frac{\partial^k}{\partial x^k}\,P(t-x)=0$ if $k:=1+\deg(P)$.  Thus, the Leibniz Integral Rule gives $$\frac{\text{d}^k}{\text{d}x^k}\,Q(x)=\int_0^1\,f(t)\,\frac{\partial^k}{\partial x^k}\,P(t-x)\,\text{d}t=0\,.$$  This result holds for any integrable function $f:[0,1]\to\mathbb{C}$.


Facebook Fan Page, share button

Question: I run a Facebook Fan Page which consists of posts directed straight from Twitter. How can I add a share button onto this posts on Facebook?
I'm not a computer know-all, so as much help is greatly appreciated.
Answer: I imagine your posts came from a blog or website correct? If yes, then you can add the like button:
https://developers.facebook.com/docs/reference/plugins/like/
If you is a new on fb social plugins, you can see what more you can do here https://developers.facebook.com/docs/

Facebook Fan Page, share button


Why didn't America "rent" parts of China?

Question: After the Opium War, Britain and France signed treaties with China that said they could establish "spheres of influence" over parts of China. Britain and France went this way, but why didn't America?
Comment: France colonized China??
Comment: I have hopefully clarified the question.
Answer: American attitudes toward China were best expressed in the Open Door Policy. This policy was, in fact, aimed at "rolling back" some of the special privileges others were trying to "rent."
American didn't want to "rent" parts of China because she didn't want other countries to "rent" (and thereby divide) China into 5-10 "special" regions.
America was on its way to becoming the world's foremost commercial force, and as such, preferred a unified, "open" China with a (theoretically) level playing field that would benefit her more than other countries.
Put another way, America preferred to have equal access to all of China, rather than special access to part of it. (But "some access is more equal than others.")
Answer: This French and British fleets were government-sponsored fleets containing official Navy ships. Their expeditions to China were conducted as part of official government policy with expansionist motives.
The large majority of American ships involved in the China trade were private merchantmen, not Navy warships. The Americans had a few isolated warships in the area, such as the USS Portsmouth, however those ships were only there to protect American vessels, not embark on an expansionist policy. They had orders to maintain American neutrality and the Americans moreover refused to make an alliance with the British and French in the wars, because we had a policy of neutrality and non-interventionism.
Comment: @Relaxed No, the US signed a neutrality treaty with China, the Treaty of Wangxia, which was a voluntary treaty. Although this guaranteed American trading rights, it was essentially a neutrality treaty and the Chinese entered into it willingly.
Comment: Suggest adding that bit about the assumption being false into your answer -- that would clarify the answer.  Not sure if these words are best, or a modification, but *The statement in the question that alleges that the United States signed a treaty allowing them to "take parts of China" is false* would fit in well your bit on the treaty the US actually had with China.
Comment: Yet the OP suggests the US did sign a treaty providing for such expansionism, what gives?
Comment: If I understand you correctly, the treaty between China and the US was very different from that between France and China? Note that I know next to nothing about the topic so I am not questioning anything... What puzzled me is that this seems to contradict the premise of the question, maybe this could be clarified in your answer?
Comment: @Relaxed The statement in the question that alleges that the United States signed a treaty allowing them to "take parts of China" is false.
Comment: Yes, I understand that now, I just suggested stating as much in your answer because that's what confused me initially.


Dimension of nullspace

Question: I can understand the dimension of column space of matrix is the no. of independent column vectors
But why is the dimension of nullspace = no. of free variables?
Answer:
For an $m \times n$ matrix, $A$, the Rank-Nullity theorem says that:
  $$ \text{column rank}(A) + \text{nullity}(A) = n.$$
  where $\text{nullity}(A)$ is the dimension of the null space of $A$.

When you find the reduced row echelon form of a matrix, the max number of independent columns (i.e. the column rank) is the number of pivot columns (columns containing a leading one for some row). Notice now that free variables correspond to the columns without pivots. So the number of free variables is $n - \text{column rank}(A)$.
So
\begin{align*}
\text{nullity}(A) &= n - \text{column rank}(A) \\
&= \text{number of free variables}.
\end{align*}
Comment: It seems weird the free variables are the dependent/non-pivot columns.
Answer: As you had mentioned, $\text{Col } A$ is the set of all linear combinations of $A$'s columns, and so the basis for the vector space $\text{Col } A$ is the set of linearly independent columns of $A$. And so, $\text{rank } A$ is the number of linearly independent columns of $A$.
Now, how about $\text{Nul } A$? $\text{Nul } A$ is the set of all solutions to the homogenous equation $A\mathbf{x} = \mathbf{0}$, and it is said to be defined implicitly, i.e. you'll have to check if a vector $\mathbf{u}$ is in $\text{Nul } A$ by checking if $A\mathbf{u}$ is indeed $\mathbf{0}$. Getting an explicit description of $\text{Nul } A$ amounts to solving for $A\mathbf{x} = \mathbf{0}$, and doing so will give you the spanning set of $\text{Nul } A$, which is automatically linearly independent. The number of vectors in this linearly independent spanning set is equal to the number of free variables in $A$. Give it a try: row reduce, say, a 3 x 4 matrix.
Also, by the rank theorem,
$$\text{rank } A + \text{nullity } A = \text{number of columns in } A$$
That is, because $\text{rank } A$ is the number of $A$'s pivot columns (i.e. the number of linearly independent columns in $A$), then $\text{nullity } A$ is the number of non-pivot columns of $A$ (i.e. the number of free variables in $A$). Hope this helps!
Answer: It is definition of dimension that dimension of every space is the number of free variable in it .e.g in a plane you need  2 free variable to define it so the dimension of plane is 2. As Ken Duna proved  we know that dimension of the image of A (the space that A can span it ) is the number of independent columns . actually is it obvious because the in $ Ax=b  $ (which x and b are vectors) you can see b is made  from linear combinations of columns of A and weights are elements of x . In the other word (b = the first columns of A times first element of x + second column of A times second element of x + ....+ last column of A times last element of x. Note that here multiplication is multiplication of vector and scalar and sum is sum of vectors) so  $$ b = \sum_{i=0}^n \alpha_i v_i $$
which $v_i$'s are columns of b and $\alpha_i$'s  are elements of vector x. knowing that b is span of columns of $A$ now we can say if  we want to solve  $b = 0$   then we should look at how many of $\alpha_i$'s are free variable e.g if all of them should be zero then dimension of nullspace is zero or if one of them is free and others determined based on that then dimension of nullspace is one .
finally consider columns of A. if all of them are linearly independent then all of the $\alpha_i$'s should be zero (dimension of null space would be zero).
if some of them are dependent(they can be created by linear combination of other columns) (e.g 3 of them are dependent) then exactly you have 3 $\alpha$ which are free then dimension of nullpace would be  3

Dimension of nullspace


Why dont we use 2d cnn filters for Nlp tasks?

Question: CNNs are used in NLP for various tasks. But I cannot find a clear understanding of why do we only use 1d filters in these networks?
Answer: Text is a 1D sequence, but is typically treated as a sequence of embedding vectors. So yes it is in some sense 2D input. But the embedding dimension doesn't really have any spatial meaning; adjacent dimensions aren't any more related than any others. There is no invariance across the embedding dimension either; the same values in one part of the embedding don't mean the same thing. So the assumptions a 2D convolution don't make sense for this type of input.
Comment: by 1D, you mean using filter (n * full embedding length) or (n * 1)? My CNN performs better when I use filter of 3*1 than 3*100 (the size of the word embedding). Do you know any papers where this issues is talked through because I feel like everybody just uses the full length of the embedding as the second dimension, but I did not see any good explanation. What if we get some information out of convolving each dimension of the embedding separately (using smaller filter) because there might be some relationship between the values of the embedding of more words in the same dimension?
Comment: Yeah I suppose I should clarify. OK, if your input is n characters x m embedding dims, then a filter of say (3 x m) makes sense and that is "2D". (3 x 1) also sort of makes sense - you learn about how each embedding dim changes over a window of time, but I doubt that's as useful. I don't see that anything else makes much sense as it would be pretending that adjacent dimensions have more relationship, and that it's the same relationship across the dimensions, but that isn't true.
Comment: Thanks. Could you refer me to any papers which discuss this in any way? I didn't find anything, but taking it "for granted" does not sound right.


How to see a terminal output from a previously closed terminal

Question: I connect to a remote server using SSH
I was compiling using cmake and then make, it's not common to have a progress percentage in compilation process, but this time it has. I was watching the compilation process until my internet connection failed, so puTTY closed the session and I had to connect again to my server. I though that all the progress was lost, but i first make sure by watching the processes list by ps aux command, and I noticed that the processes related to the compilation are still running:
<code>1160 tty1     Ss+    0:00 /sbin/mingetty tty1
 2265 ?        Ss     0:00 sshd: root@pts/1
 2269 pts/1    Ss     0:00 -bash
 2353 pts/1    S+     0:00 make
 2356 pts/1    S+     0:00 make -f CMakeFiles/Makefile2 all
 2952 ?        S      0:00 pickup -l -t fifo -u
 3085 ?        Ss     0:00 sshd: root@pts/0
 3089 pts/0    Ss     0:00 -bash
 3500 pts/1    S+     0:01 make -f src/compiler/CMakeFiles/hphp_analysis.dir/bui
 3509 pts/1    S+     0:00 /bin/sh -c cd /root/hiphop/hiphop-php/src/compiler &&
 3510 pts/1    S+     0:00 /usr/bin/g++44 -DNO_JEMALLOC=1 -DNO_TCMALLOC=1 -D_GNU
 3511 pts/1    R+     0:03 /usr/libexec/gcc/x86_64-redhat-linux6E/4.4.4/cc1plus
 3512 pts/0    R+     0:00 ps ax
</code>
I would like to know if is possible to watch the current progress of the compilation by watching the previously closed terminal output. Something similar like 'cat /dev/vcsa1' or something
Comment: This is off-topic for stack overflow, but you prob want this: http://www.rackaid.com/resources/linux-screen-tutorial-and-how-to/
Answer: As per the comment above, you should have used screen.
As it is, you could try to peek at the file descriptors used by sshd and the shell that you started, but I don't think this will get you very far.


Journey Builder with Salesforce Data how do you check for ischanged?

Question: I'm working in Marketing Cloud's Journey Builder using Salesforce Data.  I want the journey to execute on update of a record on a specific object (which I selected). However, I only want it to execute the journey if a specific field on the record ischanged. I'm only seeing where I can select a filter of if the field equals a value. We have stages on our object. It's possible that the stage could stay the same on subsequent updates so checking if the value equals something would possibly make the record enter the journey multiple times.  Is it possible to use Salesforce Data and check ischanged? Or would I need to revert to using data extensions/reports? I was hoping to avoid creating a journey for each stage and setting the Do not Re-enter configuration.
Answer: We do not have any standard solution for this but you can build some solution in Salesforce.In my case i have created below solution.

Clean that field and make it to blank via trigger.
Hold new value into the custom setting in salesforce for meantime.
After execute trigger(to create blank) insert new value into object field.

Salesforce Data Event journey will only trigger if it will listen to update same field from any other value to new.


Using RSA private key from PuTTY in Filezilla

Question: I have created an RSA private key using PuTTYgen. When I try to use it, I am notified that I can't use this encrypted key in Filezilla, so from the documentation I found that I need to use the Pageant tool. Now the problem is I am using Fedora (the latest version), how can I install Pageant? Is there any equivalent of Pageant out there? I am not good with Linux so I need a GUI method.
Answer: PuTTY has its own private key file format. If you want to use a key file generated by PuTTYgen, you need to convert it to the OpenSSH key format (which is the standard on Linux and other unix systems). Use the export command in PuTTYgen.
You'll get a key file, often called id_rsa (or something.id_rsa if you have several keys). Copy that file to the directory ~/.ssh on your linux machine (~ is your home directory). If you call it ~/.ssh/id_rsa, it'll be picked up automatically, otherwise you'll have to configure ssh to use the right key or to load the key into your agent, both of which are a bit more complicated (and I only know how to do these from the command line). Make sure that the permissions of the ~/.ssh directory and the id_rsa file are appropriate: ~/.ssh must be writable only by you (and should be readable only by you); ~/.ssh/id_rsa must be readable and writable only by you.
The Linux equivalent of Pageant is ssh-agent or some other keyring program, but that's not what you need here.
Comment: I did what you said when i tried to login from terminal using `ssh` it worked but `FileZilla` is not picking the key i guess. It is not simply loging in.
Comment: After generating the keys and put it in place i have used `ssh-add` to add the key to keyring and it worked after that. But i have to do this everytime i log in so is there a way i can make this happen automatically everytime i log in ?
Comment: @Deepak How do you connect to the Linux system? Through PuTTY or directly on the console? If on the console, what desktop environment (e.g. Gnome, KDE, …) do you use? (Where to do this at login time varies by distribution, and I'm not familiar with Fedora, so it may be best if you ask a new question — be sure to indicate your desktop environment.)
Comment: I am using Fedora and I am using Filezilla to sftp into the remote server. I think i will ask this as a new question.


Will my missed prayers be counted as negligence if I leave them due to lapse of time?

Question: I was 7 minutes away from sunrise when I woke up for fajr. I didn't pray due to the reason I mentioned. Also I wasn't sure about exact time of sunrise. So I finally let it go. I have set daily alarm but I don't remember if I woke up on it or due to dominant sleep I just turned it off while it was ringing. Will this be counted in my negligence?
Answer: Whenever you wake up for fajr, even if it is late you can pray as soon as possible.

'The Prophet was asked about a man who forgets prayer or sleeps and
misses it. He said: 'he performs it when he remembers it.'"
https://sunnah.com/ibnmajah:695

Another similar hadith

Abu Qatadah narrated: "They asked the Prophet about when they sIept
past the Salat. He said: 'There is no negligence in sleep, negligence
is only while one is awake. So when one of you forgets a Salat, or
sleeps through it, then let him pray it when he remembers it.'"
https://sunnah.com/tirmidhi:177
Comment: No what if sunrise is occuring? Then the qadhah salah wont even be counted


How to use commands to check for potions in 1.13+

Question: For I minecraft map I'm making I want to test whether or not a player has a specific potion in their inventory. How would one do this in 1.13+?
Comment: No, please delete the question if your original question isn't even really valid. Also, do you think it's this bug? https://bugs.mojang.com/browse/MC-149038 If yes, please state in a comment there which version you encountered this in and preferably also reproduction steps, because none are currently known.
Comment: I inteded more for it to be a self-answering question about how to check for specific potions in a player inventory, should I rewrite it into a question and answer, or just delete it anyway? Also, that does indeed sound like that bug, thx for linking, but I'm not sure if I can reproduce it.
Comment: I did some testing a filed a bug report for the probable cause of what went wrong
Comment: Re-writing it as a Q&A is of course better. Something like "how to do X **in 1.13+**", because `/testfor` no longer exists.
Answer: Using
 /data get entity @s

on oneself while having a potion on you would reveal the Inventory NBT data you need for this command. Combing this with the answer for 1.13- given here:
How to test for specific potions in inventories?
the command would be something along the lines of:
execute if entity @p[nbt={Inventory:[{id:"minecraft:potion",tag:{Potion:"minecraft:mundane"}}]}] run say hi

where 'mundane' can be changed into the name of the potion wanted, for example: awkward, water or regeneration.
By replacing 'potion' into 'splash_potion' or 'lingering_potion' all other types of potions can be reached.
The normal extend potions can be searched for by changing 'mundane' to, for example, 'long_swiftness', level II potions can be searched for by changing 'mundane' to, for example, 'strong_swiftness'.
Custom potions are more difficult to detect, and can be detected using the following command:
\execute if entity @p[nbt={Inventory:[{id:"minecraft:potion",tag:{CustomPotionEffects:[{Id:1,Amplifier:2,Duration:1400}]}}]}]

where the number after Id represents the numerical ID of the potion effect as can be found on the wiki, the amplifier is the level of the potion effect, where level 0 is a normal potion effect, and the duration is the duration in game ticks (= 20 x length in seconds). All three of these identifiers are optional and if not set will default to be true for any potion.
If multiple effects need to be detected for some reason, replace the
CustomPotionEffects:[{...}] with CustomPotionEffects:[{...},{...}]

where every {...} has one or more of the Id,Amplifier,Duration tags, as above.


Which transistor should be used as a switch for a load of 5 V, 100 mA

Question: I'm new to electronics. I want to use a transistor as a switch for a load of 5 V and around 100 mA.
And what should be the base current or voltage to activate the transistor. Please help me.
Comment: A guess that you're switching **power** on/off? That's often done with a **high-side switch**. @winny suggests a MOSfet...a high-side MOSfet switch would be a p-channel MOSfet to switch +5V DC power on/off.
Comment: Almost any MOSFET you are able to find can do it. Do a search on DigiKey, Mouser or similar. I would recommend a minimum of 2x the voltage rating and 3x the current rating unless you have knowledge about how and why.
Comment: What switching frequency are you interested in? For BJTs I think pretty much any "general purpose" transistor will work, eg, 2n3904, 2n2222, 2n4401, bc547 for NPNs or their PNP counterparts. For base current use the "1/10th forcing beta rule" described here: https://electronics.stackexchange.com/a/369591/95488
Comment: any, and the current to activate should be enough to sature the base of your transisor.
Comment: I'd use whatever random transistor I had to hand, this is not a demanding task.
Comment: Is it high side or low side switch?
Comment: it is on high side
Answer: You need to read the device datasheets to determine which transistors may be suitable. But what parameters do you look for and how should you interpret them?
There are two main things to consider:-

Voltage drop when the transistor is switched on.

If 5 V is going into the transistor 'switch' then less than 5 V will come out. You must decide how much voltage loss you can tolerate. This also determines the transistor's power dissipation when passing maximum load current, which affects how much heat sinking it may need.
For a bipolar transistor the parameter to look for is the Collector to Emitter 'Saturation Voltage', typically measured with Base current 10 times lower than Collector current (a smaller Base current may still work but the voltage drop will be higher). For a MOSFET it is RDSON, which you must multiply by Drain current to get the voltage drop.

For FETS only, the voltage required between Gate and Source to fully turn it on.

This is not the 'threshold voltage', which is the voltage where it is just on the threshold of turning on. Usually the minimum recommended Gate drive voltage is either stated in the device summary or implied in parameters that specify a particular Gate drive voltage.
You don't need to worry about turn-on voltage for bipolar transistors because it is always around 0.7 V to 0.9 V in saturation. This won't be a problem unless you are working with very low drive voltages.
The advantage of MOSFETs over bipolar transistors is that they don't need any current to keep them turned on. This makes switching high currents easier and improves circuit efficiency, especially if the typical load current is much less than its maximum value.
Notes:-

For lowest voltage drop the transistor needs to be configured in 'Common Emitter' or 'Common Source' configuration. That means to switch the 'high' side of the power supply (which is generally required when the load shares a common ground with anything else) you should use a PNP bipolar transistor or P-channel MOSFET. If the driving circuit runs at a lower voltage then you may need a level shifter or 'high side driver' to raise the drive voltage up to the power supply rail where the transistor is situated, like this:-

simulate this circuit – Schematic created using CircuitLab

Transistors have 'typical' and minimum/maximum specifications due to process variation. If you design a circuit based on 'typical' characteristics then it may or may not work depending the individual transistor you have. To guarantee that it works you must use the 'worst case' parameters, eg. minimum current gain, maximum saturation voltage, maximum Gate threshold voltage (but go with the recommended Gate drive voltage and you won't have to worry about this).

Never run any semiconductor device at or near its 'Absolute Maximum' ratings. If a transistor's maximum Collector or Drain current rating is 100 mA then it is not good enough for your application. Always calculate power dissipation using the worst case saturation voltage or RDSON, and check that it won't get too hot with practical heat sinking - not the 'infinite' heat sink (TCASE = 25 °C) and extreme junction temperature specified in the datasheet. Better to use a transistor with much higher current rating than you need, both for reliability and to simplify calculations.
Answer: I'd use a BC337 for that which can easily handle the required 100mA collector current.
There are 3 variants of the BC337 : BC337-16, BC337-25 and BC337-40.
The 3 variants differ in their DC current gain (hFE).
Which ever variant you purchase, look up its data sheet specified minimum DC current gain (hFE) and use this value to calculate the required base current using the equation below:-

The multiplier of 5 is included to ensure that there is sufficient base current to fully saturate the transistor, some people use a higher safety factor of say 10 but I've always found 5 to be high enough.
Next calculate the base resistor.

With Vcontrol asserted the base of the transistor will be at about 0.7V and so:-


My wife (EU citizen) is moving to Germany or Austria. Can I join her as a non-EU national (Serbia)?

Question: My wife is a Bulgarian citizen and she wants to move to Germany or Austria. What is the procedure in order for me to join her? Can we apply upon arrival? We both hold B2 certificates in German.
Comment: When accompanying or joining your EU-Citizen spouse, you will enjoy the same conditions as your EU-Citizen spouse.
Comment: Different states do this differently. In Baden-Württemberg the registry office will send the application for the residence card automatically to the Immigration office. In Berlin you must make the application yourself **after** registration. The actual printing of the card can take a long time, but you will recieve a confirmation of your residence status immediately.
Comment: When she takes up residence in Germany, she must register her place of residence when she gets apartment/flat. You (as a spouse of an EU-Citizen) should go with her. Depending of the state, all needed paperwork is done upon registration.
Comment: I can go 3 months with serbian citizenship as a part of the free movement agreement, and then go back... can i go with her the same time as a tourist? Together in other words ? And to wait the registration and then apply? And how much isnthe waiting part do you know ?
Answer: As long as she is entitled to free movement (e.g. working, more details here) then you are entitled to live with her. The procedure is much more flexible than it is for other foreigners or for the spouses of German citizens so you can indeed travel together and apply upon arriving.
Unlike a Serbian citizen coming on their own, the spouse of an EU citizen doesn't require to secure a long-stay visa before entering the country and can transition from a short stay to a longer period of residence, completing all required formalities without leaving the territory.
In practice, you can simply apply for the residence card at the same time as your registration or immediately afterwards (see e.g. the procedure in Berlin). Speaking German is great and will help you but it is not a requirement for the spouses of EU citizens.
I haven't done it recently but in my memory, the registration of your place of residence (Anmeldung) is processed immediately, you leave the building with the confirmation in hand. You might need a separate appointment with another office but you can use that document to apply for the residence card without any wait.
Comment: I don't know about the technical details of the German implementation, but under both the free movement directive and the Schengen visa code there is no need to speak of "transition" or "short stay."  The Serbian citizen who travels to Germany with a Bulgarian spouse is a "person enjoying freedom of movement," so resides in Germany for up to three months by right, not by virtue of the "short stay" provisions that normally apply.
Comment: @phoog Avoid the use of the term **short stay** all together, since neither of the 2 words are used in DIRECTIVE 2004/38/EC. Chapter III: **Right of Residence** ; **Article 6**: *Right of Residence upto 3 months*: 6(1) Union citizens, 6(2) family members of Union citizens ; **Article 7**: *Right of residence for more than three months* 7(1) Union citizens, 7(2) family members of Union citizens
Comment: @phoog I meant that in a very literal sense, you don't need prior permission to enter with an eye towards long-term residence, you travel with no special document and you eventually get a card (which is not necessarily called a "permit" either). I was trying to contrast both regimes in one sentence, which is why the terminology is not ideal. Upon reflection, I am not convinced that "short stay" is completely inappropriate, the provisions are very different from those of the regular Schengen regime but the directive does make a distinction.
Comment: Perhaps.  It is true that "short stay" doesn't necessarily implicate the provisions of the Schengen codes, but "transition" implies a change of status that isn't really happening from a technical point of view.  Under these circumstances, the Serbian spouse is never a "third-country national" for the purposes of the SBC, thanks to its (unfortunately somewhat counterintuitive) definition of that term.  Would you speak of a "transition" for the Bulgarian spouse if she arrives in Germany without a job, under 2004/38/EC Art. 6, but then takes employment there, remaining under Art. 7?
Comment: @phoog Since the registration of residence (where required) can be done earlier, 'transition' could be replaced with: The registration of residence (where required) should be completed within 3 months after arrival in the host Member State.


Why did Germany decide not to restore the Hohenzollern dynasty to the throne of a German Empire after the defeat of Hitler in World War Two?

Question: During World War Two, Hitler removed the Hohenzollern princes from serving in the German Army after he saw the outpouring of grief and sympathy from the German public upon the death of one of the princes while serving in the army. Was the restoration of the Hohenzollern dynasty ever contemplated by the Allied powers or the new German government at the end of the war?
Comment: "Why did Germany **decide**..?" Germany did not have much if any word in it, being under military occupation at that time, and the new form of the administration was decided by the occupying powers. This is not even about whether it was a good or a bad thing, but it was what it was.
Comment: @StefanH Prince Wilhelm Friedrich Franz Joseph Christian Olaf of Prussia (4 July 1906 – 26 May 1940)
Comment: **Comments have been [moved to chat](https://chat.stackexchange.com/rooms/145082/discussion-on-question-by-excel-r-8-why-did-germany-decide-not-to-restore-the-ho); please do not continue the discussion here.** Before posting a comment below this one, please review the [purposes of comments](/help/privileges/comment). Comments that do not request clarification or suggest improvements usually belong as an [answer](/help/how-to-answer), on [meta], or in [chat]. Comments continuing discussion may be removed.
Comment: The counter-question is "*why should* they have reinstated a monarchy they had kicked out 25 years earlier?"
Comment: Who was the prince that died in the army?
Answer: SUMMARY: Because Hohenzollern dynasty and the general conception of Prussia as a kingdom, or Germany as an empire, had already been "destroyed" in minds.
Detailed answer:
Prussia officially unified the states of Germany and created the Second Reich in 1871, after its successful war against France. This creation was sustained until 1918, when hungry Germans led a riot close to a revolution against the Empire, forcing the Emperor to abdicate and exile in the Netherlands. After a civil war, notably against the communist Spartakists, the Republic of Weimar was installed.
And this is this republic that was overthrown by Hitler in 1933 (technically, there were elections but you know the context of brutal events, lies, and violence as a pressure on the population). The name "Third Reich" was given, after the Second Reich, but Hitler's government and institutions were those of a dictatorship rather than a monarchy: especially, it relied on ideology a lot.
When in 1945 the Third Reich fell, Germany was split in two and the Allies wanted to secure the future from a new German expansion. Installing a new kingdom was certainly not a good idea in that regard. So the Soviets installed a soviet-style republic, the German Democratic Republic, and the Western allies an "Occidental-style" republic, the German Federal Republic.
Comment: You might add that in 1947 [the Allies abolished Prussia](https://en.wikipedia.org/wiki/Abolition_of_Prussia) as an entity saying it had "been a bearer of militarism and reaction in Germany" and so not a good thing, and distributed its local administrative functions among the Länder and Berlin, for those parts which had not become parts of Poland or the Soviet Union.
Comment: It might also be noteworthy that the newly created position of the [Bundespräsident](https://en.wikipedia.org/wiki/President_of_Germany) as the head of state was purposefully designed to be _much_ less powerful than previous German head of states, like the [Reichspräsident](https://en.wikipedia.org/wiki/President_of_Germany_(1919%E2%80%931945)) and the [German Emperor](https://en.wikipedia.org/wiki/German_Emperor), had been. It probably wouldn't have meshed well to install a member of the formerly ruling dynasty as such a "pared down" head of state, calling him formally king or not.
Answer: @totalMongot's third paragraph is a good start.  None of the victors wanted a recidivist Germany or even (at the time) a united Germany. Creating a new Kingdom of Germany was for that reason a non-starter.
Additionally, the US did not see any benefit for Germany of a restored Hohenzollern dynasty. The US was staunchly democratic, believed a limited republic to be the best form of government, and so (along with Britain) set up a federal republic for the parts of Germany it controlled -- pretty much the opposite of a centralized kingdom. (The USSR was also anti-monarchy, of course, for its own ideological reasons.)
Beyond that, the original question asks "Why did Germany decide not to restore..." and @Moishe Kohan correctly notes that Germany was not in a position to decide anything even if it had wanted the Hohenzollerns back.
And did any significant number of Germans even want that?
Comment: Third paragraph, but I think the OP is missing also the elements of the first and second pargaprahs: Germany after WW2 was not made an empire/monarchy ynder the hohenzollern because it had already become a republic.
A (not so correct but interesting) comparison is that Japan kept his emperor because it had not overthrown the Emperor by itself before WW2
Comment: @totalMongot Comparing Germany with Italy might be more relevant and instructive here?
Comment: Re-instating a German "Empire" post WW2 in the west (Stalin wouldn't have allowed East Germany to be part of it) would not only mean immediate trouble with East Germany, but Poland as well. Danzig&Königsberg, anybody? And more trouble certainly wasn't was anybody post WW2 was aiming for.
Answer: In addition to the other answers, it may also be of interest that even in Germany, few people would have wanted that. (The following points are mostly based on the recent book "Die Hohenzollern und die Nazis" by Stephan Malinowski (https://www.ullstein.de/werke/die-hohenzollern-und-die-nazis/hardcover/9783549100295), which extensively deals with the activities of the Hohenzollerns, in particular the  former crown prince, during the 20s and early 30s.)
In the Weimar republic, many people, in particular on the political right, rejected the republic. Additionally, there was a widespread general nostalgia for kingdom(s) and empire. However, there never was a significant political movement for a restoration of the 1871 empire, for various reasons such as

re-establishing all the (nominally more or less sovereign) states within Germany was unpopular,
even many people on the right favoured a more egalitarian society without the hereditary privileges of the aristocracy (a notion which had significant racial components in the Volksgemeinschaft),
and the natural candidates for emperor, former emperor Wilhelm (II.) and former crown prince Wilhelm, were discredited (by the flight to the Netherlands, by their general behaviour during the war and later) among conservative royalists.

So one reason for conservatives (including the Hohenzollerns)  for collaborating with the Nazis was to overthrow the republic, with the idea that the house of Hohenzollern may be restored to some kind of reformed imperial throne, but actually, that was never particularly popular even in 1930.
So after the war, a restoration was never seriously considered AFAIK. (Of course, the allies didn't want that anyway.)
Comment: There was some nostalgia for the [Bavarian monarchy](https://en.wikipedia.org/wiki/Monarchism_in_Bavaria_after_1918) post-WWII, but it never came to anything.


Collective work using a GPL library

Question: Assume I have a python script that runs a GPL library binary through command line (through os.system('GPL call') and then analyze the output (which comes from the terminal). Is that a collaborative work? If so, does the GPL library apply as the all code? Or is it considered linking?
Answer: Firstly, IANAL/IANYL, and the whole question of derivative works is still somewhat unsettled by courts around the world.
That said, the FSF addresses this issue with respect to plugins, and since copyright law makes no explicit mention of plugins as being special, the analysis can be applied to other questions of derivative works.  They write:

A main program that uses simple fork and exec to invoke plug-ins and does not establish intimate communication between them results in the plug-ins being a separate program.

though they also note that

If the main program uses fork and exec to invoke plug-ins, and they establish intimate communication by sharing complex data structures, or shipping complex data structures back and forth, that can make them one single combined program.

So if this is honest fork-and-exec, that is if your program invokes the GPL program through a system call and no additional complex, programme-specific structure is passed around the back, then the two works are separate.
Comment: @DavidSchwartz quite so, which is why I started by pointing out that *no-one* knows exactly what makes a derivative work, because the copyright treaties don't spell it out and many nations have no binding case law as yet.  That said, *when it comes to GPL interpretation* (which is what this question is about) some courts have found the FSF's views to be informative, though by no means binding.  Thus I figure that if the FSF says you're on safe ground, you *probably* are.  Better than that I think we can't do, though I'd love to read your alternative answer if you have one.
Comment: At least, the FSF thinks they're separate. The FSF has no power to dictate what is or is not a derivative work which is entirely a matter of law and can even differ between jurisdictions.
Comment: @DavidSchwartz, for this forum I think the only relevant community/jurisdiction is US-EU.
Comment: @Pacerier For what it's worth, the test under US law is whether the python script itself contains sufficient protectable expression taken from the work that is licensed under the GPL. Of course, while the test is crystal clear, exactly how you decide what constitutes protectable expression that has been taken and how much is needed to be sufficient is not clear at all.
Comment: @Pacerier Conceptually, it's no different from me writing a space novel and Disney suing me for taking too much from their Star Wars franchise. The legal question is what can be found in my novel that is protectable expression from the Star Wars franchise and once all of that is identified, is it sufficient to constitute infringement? This can include things like characters, settings, dialog, and so on -- anything copyright can protect (so not ideas or functions).

Collective work using a GPL library


I need to find the potential function of a vector field.

Question: I was given F = (y+z)i + (x+z)j + (x+y)k. I found said field to be conservative, and I integrated the x partial derivative and got f(x,y,z) = xy + xz + g(y,z). The thing is that I am trying to find g(y,z), and I ended up with something that was expressed in terms of x, y and z (I got x+z-xy-xz). I don't know what to do with this information not that I arrived at something expressed in all three variables.
Answer: You have $\frac{\partial f}{\partial x}= y+ z$ so that $f(x,y,z)= xy+ xz+ g(y,z)$.  (Since the differentiation with respect to x treat y and z as constants, the "constant of integration" might in fact be a function of y and z.  That is the "g(y, z)".)
Differentiating that with respect to y, $\frac{\partial f}{\partial y}= x+ g_y(y, z)= x+ z$ so that $g_y= z$ and $g(y, z)= yz+ h(z)$.
So f(x,y,z)= xy+ xz+ yz+ h(z).  Differentiating that with respect to z, $\frac{\partial f}{\partial z}= x+ y+ h'(z)= x+ y$ so that  h'(z)= 0. h is a constant, C so that we get f(x, y, z)= xy+ xz+ yz+ C.
Answer: So far, we have $f(x,y,z) = xy + xz + g(y,z)$. Taking $\frac{\partial f}{\partial x}$ gives us the $x$-component of $\textbf{F}$. To get the similar $y$ and $z$-components, we suspect that $g(y,z)$ should be similar to the other terms in $f(x,y,z)$ in some sense. The natural guess is $g(y,z) = yz$, since the other terms in $f(x,y,z)$ are each multiplications of two different independent variables. It can then be verified that the guess for $g$ produces the correct vector field, by computing $\nabla f$.
We now know that we have determined the potential function up to a constant, since if two scalar fields have the same gradient, then they differ by a constant.
A note of caution: sometimes the convention for what is meant by a potential function for a vector field $\mathbf{F}$, is a scalar field $f$ such that $\mathbf{F} = - \nabla f$. Beware!