How do I view all of the entries in man?

Question: How am I supposed to explore all of the commands available in my terminal? I'd like to be able to browse all commands/documentation that is currently documented within the man command, how do I do that?
Comment: Does this answer your question? [How do you output a list of all man pages in a particular section?](https://unix.stackexchange.com/questions/44329/how-do-you-output-a-list-of-all-man-pages-in-a-particular-section) ... just omit the section filter.
Comment: Maybe the task of "exploring all the commands available" is not really feasible in a systematic way. In most cases, you will stumble across a task to accomplish and then search for a way so solve it, e.g. by using `apropos ` to look for any man page relating to the "keyword" you are looking for (or searching here/on the web if that fails). If you really want to browse the entire documentation, you might want to look at the `info` system (if it is installed - you didn't specify your OS flavour and version). Simply type `info` on the console, it will give you a linked menu.
Comment: @jsotola what in particular am I supposed to be looking at? The `/usr/share/man` directory? One of the global variables?
Comment: On Linux Mint, this does it: `( cd /usr/share/man && find 2>/dev/null man{1..7} -type f -name '*.gz' | awk '-F[.]' '{ print $1 }' | sort )`. I get 4000 man pages listed.
Comment: how do I find a list of all sections?
Comment: look at the end of the *man* page
Comment: for example, run `man man`, then scroll down to bottom of the page and look at the `see also` section .... is that what you are looking for?
Comment: The 'see also' section requires a jumping off point, of which I have none, I need like a table of contents kind of thing
Comment: I find it difficult to accept the newbie statement " a jumping off point, of which I have none" from somebody who asks on another forum "How to define a custom key equivalence predicate for an std::unordered_set".
Comment: @Paul_Pedant The reason I asked this is because I installed the gnu gmp library yesterday and wanted to read the documentation for it, but didn't know what any of the function names were, how am I supposed to find them without the internet?
Answer:
I get 4000 man pages listed

That is half of the problem. OP wants not only:
]# apropos -s1
apropos what?
]# apropos -s1 -w \*

which gives a good flat list of commands. But what about builtins, coreutils, sbin?
And it is not the commands alone he wants:
"all commands/documentation"
A lot of important info is in other sections: 4, 5, 7 or 8.
There is no starting point. There is no "User's Manual" with a list of commands. The manual is a list of commands, and the commands also are only building blocks. echo and gcc are side by side with a lot of explanations. But to find out what they are for is not so easy for a newbie. (my role model newbie is just an interested 13 year old boy - or girl)

The way linux distributions are made the packages should be the main structuring names: they naturally group some commands together. And packages always have a good description.
This is some man-files from systemd not beginning with "systemd-"
systemd /usr/share/man/man5/udev.conf.5.gz
systemd /usr/share/man/man5/user-runtime-dir@.service.5.gz
systemd /usr/share/man/man5/user.conf.d.5.gz
systemd /usr/share/man/man5/user@.service.5.gz
systemd /usr/share/man/man5/vconsole.conf.5.gz
systemd /usr/share/man/man7/
systemd /usr/share/man/man7/bootup.7.gz
systemd /usr/share/man/man7/daemon.7.gz
systemd /usr/share/man/man7/file-hierarchy.7.gz
systemd /usr/share/man/man7/hwdb.7.gz
systemd /usr/share/man/man7/kernel-command-line.7.gz
systemd /usr/share/man/man7/sd-boot.7.gz
systemd /usr/share/man/man7/udev.7.gz
systemd /usr/share/man/man8/
systemd /usr/share/man/man8/kernel-install.8.gz

and the man1 part:
systemd /usr/share/man/man1/
systemd /usr/share/man/man1/bootctl.1.gz
systemd /usr/share/man/man1/busctl.1.gz
systemd /usr/share/man/man1/coredumpctl.1.gz
systemd /usr/share/man/man1/hostnamectl.1.gz
systemd /usr/share/man/man1/init.1.gz
systemd /usr/share/man/man1/journalctl.1.gz
systemd /usr/share/man/man1/localectl.1.gz
systemd /usr/share/man/man1/loginctl.1.gz
systemd /usr/share/man/man1/machinectl.1.gz
systemd /usr/share/man/man1/networkctl.1.gz
systemd /usr/share/man/man1/portablectl.1.gz
systemd /usr/share/man/man1/resolvectl.1.gz
systemd /usr/share/man/man1/systemctl.1.gz
systemd /usr/share/man/man1/timedatectl.1.gz

This is a compact overview indepndent of the contents.
Other important packages are coreutils, util-linux, shell(s), editor(s).
If I want to find out about other commands related to ps, I can look at other commands from it's package (excerpt):
procps-ng /usr/share/man/man1/ps.1.gz
procps-ng /usr/share/man/man1/pwdx.1.gz
procps-ng /usr/share/man/man1/slabtop.1.gz
procps-ng /usr/share/man/man1/tload.1.gz
procps-ng /usr/share/man/man1/top.1.gz

And the description is "Utilities for monitoring your system and its processes" which gives the whole gang a meaningful title.
20 packages with 20 man pages each (average) is much better than 4000 man pages en bloque.

... and with syscalls
I did/am doing something similar with syscall-definitions I found (with find/grep).

The find -exec grep is (slightly formatted on two lines):
]# dlist='kernel mm fs block net ipc security'
]# find $dlist -name '*.c' -exec grep '^SYSCALL_DEFINE[0-6]' {} +

The $dlist is optional, but the full Giga (drivers/ !) will stir up the SSD for a few seconds the first time.
And by redirecting to some file by appending > /tmp/SYSC_06 I get a list which I can grep, sort and group by dir, filename and number of arguments. Some simple examples follow:

]# grep '(.*write.*,' SYSC_06

mm/process_vm_access.c:SYSCALL_DEFINE6(process_vm_writev, pid_t, pid,
fs/read_write.c:SYSCALL_DEFINE3(write, unsigned int, fd, const char __user *, buf,
fs/read_write.c:SYSCALL_DEFINE4(pwrite64, unsigned int, fd, const char __user *, buf,
fs/read_write.c:SYSCALL_DEFINE3(writev, unsigned long, fd, const struct iovec __user *, vec,
fs/read_write.c:SYSCALL_DEFINE5(pwritev, unsigned long, fd, const struct iovec __user *, vec,
fs/read_write.c:SYSCALL_DEFINE6(pwritev2, unsigned long, fd, const struct iovec __user *, vec,

]# grep sync SYSC_06

mm/msync.c:SYSCALL_DEFINE3(msync, unsigned long, start, size_t, len, int, flags)
fs/sync.c:SYSCALL_DEFINE0(sync)
fs/sync.c:SYSCALL_DEFINE1(syncfs, int, fd)
fs/sync.c:SYSCALL_DEFINE1(fsync, unsigned int, fd)
fs/sync.c:SYSCALL_DEFINE1(fdatasync, unsigned int, fd)
fs/sync.c:SYSCALL_DEFINE4(sync_file_range, int, fd, loff_t, offset, loff_t, nbytes,
fs/sync.c:SYSCALL_DEFINE4(sync_file_range2, int, fd, unsigned int, flags,

This would be even more synoptical:
fs/sync.c: sync()
fs/sync.c: syncfs(fd)

"SEE ALSO" is useful, but I want to "SEE ALL" in logical groups
man futex has:

SEE ALSO: get_robust_list(2), restart_syscall(2), ...

But I get:
]# grep futex SYSC_06

kernel/futex.c:SYSCALL_DEFINE2(set_robust_list, struct robust_list_head __user *, head,
kernel/futex.c:SYSCALL_DEFINE3(get_robust_list, int, pid,
kernel/futex.c:SYSCALL_DEFINE6(futex, u32 __user *, uaddr, int, op, u32, val,

(the lines are incomplete...but see above...the search is also not precise. )
restart_syscall() is for "internal use only" - quite a false trail.

Or all the syscalls with 6 arguments, minimally formatted:
]# grep FINE6 SYSC_06 |sed -n 's/(/\t\t/p'

kernel/futex.c:SYSCALL_DEFINE6          futex, u32 __user *, uaddr, int, op, u32, val,
kernel/fork.c:SYSCALL_DEFINE6           clone, unsigned long, clone_flags, unsigned long, newsp,
mm/nommu.c:SYSCALL_DEFINE6              mmap_pgoff, unsigned long, addr, unsigned long, len,
mm/mempolicy.c:SYSCALL_DEFINE6          mbind, unsigned long, start, unsigned long, len,
mm/mmap.c:SYSCALL_DEFINE6               mmap_pgoff, unsigned long, addr, unsigned long, len,
mm/process_vm_access.c:SYSCALL_DEFINE6          process_vm_readv, pid_t, pid, const struct iovec __user *, lvec,
mm/process_vm_access.c:SYSCALL_DEFINE6          process_vm_writev, pid_t, pid,
mm/migrate.c:SYSCALL_DEFINE6            move_pages, pid_t, pid, unsigned long, nr_pages,
fs/eventpoll.c:SYSCALL_DEFINE6          epoll_pwait, int, epfd, struct epoll_event __user *, events,
fs/read_write.c:SYSCALL_DEFINE6         preadv2, unsigned long, fd, const struct iovec __user *, vec,
fs/read_write.c:SYSCALL_DEFINE6         pwritev2, unsigned long, fd, const struct iovec __user *, vec,
fs/read_write.c:SYSCALL_DEFINE6         copy_file_range, int, fd_in, loff_t __user *, off_in,
fs/splice.c:SYSCALL_DEFINE6             splice, int, fd_in, loff_t __user *, off_in,
fs/select.c:SYSCALL_DEFINE6             pselect6, int, n, fd_set __user *, inp, fd_set __user *, outp,
fs/aio.c:SYSCALL_DEFINE6                io_pgetevents,
net/socket.c:SYSCALL_DEFINE6            sendto, int, fd, void __user *, buff, size_t, len,
net/socket.c:SYSCALL_DEFINE6            recvfrom, int, fd, void __user *, ubuf, size_t, size,
ipc/syscall.c:SYSCALL_DEFINE6           ipc, unsigned int, call, int, first, unsigned long, second,

Comment: running `apropos -s1 -w\*` returns `apropos: invalid option -- '*'`
Comment: @iggy12345: very true: both `-w \*` and `-w '*'` work, but both need a space.
Comment: ... My honest error (didn't run _that_ command so I could copypaste ;) - shows what tricks you need to get _all_ entries. Thank you! I corrected.
Comment: It's all good. These are great, thank you! But one more thing, when I run `grep '(.*write.*,' SYSC_06` It says that there is no file or directory `SYSC_06`?
Comment: `find kernel mm fs block net ipc security -name '*.c' -exec egrep '^SYSC.*NE[0-6]' {} +` gives the output from the top of a linux source tree. (I list the dirs to leave out `drivers`). It works because of the SYSCALL_DEFINEx() macros which are easy to find and grep (when you drop the second line...). The list can be processed in many ways so I stored these 386 lines on my tmpfs. I was concentrating on finding good examples. I will add some few words. Thank you for your interest!
Answer: Why do you want to see "all manual pages"? As others have stated, on a typical desktop installation is its literally thousands. You can check the "user commands" in section 1 of the manual (sometimes also section l, for local additions/extraofficial commands), but those are at least several hundreds (here I've got 4365!).
Want to learn how to use the command line effectively? Check out a tutorial on your shell (presumably bash), there are many on the use of the command line, check out the Unix command line cheat sheet for the basic commands. Note that shells have rudimentary programming facilities, and a lot of gotchas that will bite you badly some day when writing more ambitious scripts. Use the programming facilities for one-shot throwaway commands (loop over al files called *.pdf and so), if your scripts grow/get used frequently, consider rewriting them in a sane scripting language (like Python). Learn how to use a "command line" text editor well, standard is vi (in Linux commonly really vim, a much extended version), but there are emacs fanatics... Many of the bog standard Unix commands (grep, more/less, sed) use more or less the same search machinery that vi uses, so it is a wise investment to learn how to use it (and if you someday find yourself stranded in a strange Unix system, vi will be available). Many commands pipe their voluminous output through your pager (more or less). There are commands to mangle text files (cat, cut, join, sort, split, head, tail).
For more specialized tasks, you'll have to see what is available (first look around with apropos to see if some manual page mentions the search term, and might be relevant), search on the 'net for the task in your distribution, and in desperate cases ask around here. There will typically a bewildering variety of programs for a given task... and the selection will have to be personal (preferences, availability, standard or not, ease of use, ...).
Comment: Sometimes you just want to be able to peruse a list of commands and see what's out there, instead of spending time on Reddit, or here, it'd be nice to just browse through the man pages and learn something new. I won't always have access to the internet, which is why I restricted my question.
Comment: @iggy12345, nothing bad with that (I must confess I've done that on occasion too). But there is *much* (as a I said, some 4000 commands here on my workstation; I do have some rather exotic tools installed, true, but perhaps a few dozen of them if so many). Better get a solid (enough) understanding of the workings of your shell, the existence of the text mangling commands, an editor, and you are set. *Do* learn how to find what is useful for a given task, that is critical. Nobody can know all of the 1000 "most used" commands. Not really.
Answer: I don't have GMP installed, but I suspect the package does not contain man pages for it.
I'm not clear why you require man pages without using the internet, which you clearly have access to. The GMP project documentation is at :
https://gmplib.org/manual

There is a 150-page PDF at:
gmplib.org/gmp-man-6.2.0.pdf


What do we exactly mean by a "topological object" in physics?

Question: I have been working on topological defects like monopoles, etc. for some time. One think that I have not been able to understand is the physical meaning of the  phrase "topological object". I have tried to find answers in many books on topological defects, gauge field theories, etc. but most of these books start with some Lagrangian and start talking about kinks and stuff like that. I have not been able to get a clear picture of what a topological object is physically? Is it just a mathematical construct or has some deep physical meaning (I am sure it has one) ? What is the difference between a topological object and a non-topological one. I understand that, in topology, we study properties under continuous deformations, stretching, twisting, etc.....so there is a context here but I do not understand its significance in physics. I need a very clear physical picture of this...I wouldn't mind some math though.
Comment: I don't think "topological object" is really well-defined. It mostly refers to field configurations, such as those kink and monopole fields, that are classified by some sort of topological invariant. What that invariant is, and what you actually want to call "topological object", varies from application to application.
Comment: @FraSchelle Why did you not put you comments in the form of an answer? It zertainly looks like one.
Answer: I think the broadest definition of a topological object would go as any object whose relevant characteristics do not depend on any metric. Instead it can depend on topological properties such as dimensionality, boundaries, compactedness, connectedness (connected or disjoint components), Connectivity (simply connected vs multiply connected), orientability (e.g. Mobius band vs sphere) and so on. That is a quite abstract definition and definitely would imply different interpretations depending on the context. The term topological object can refer either to a mathematical term entering the theory at a fundamental level (e.g. the topological theta term) or to physical object which is the "output" of a theory.
In the context of field theory (which I believe is the one you are interested in) topological objects are finite (energy density) solutions to non-linear (classical) field equations whose stability is guaranteed by some conserved topological charge or invariant. They are extended solutions, in the sense they are localized in a finite region of space and apart from that they behave like particles.
In this sense, topological objects are not a mere mathematical construction. They arise naturally in some theories, for instance non-linear and vacuum degenerate theories, and play important roles in areas such as field theory, condensed matter physics and astrophysics/cosmology.
The difference between a topological solution (object) and a non-topological one regards the mechanism that gives stability to each solution. For example, there are solutions to non-linear field equations (such as the KdV equation) that are also stable extended solutions however they are non-topological. Their stability comes from Noether Theorem and is not related to any topological property of the field.
Now it comes to the point where we should understand the relation between topological invariants and fields. In other words, how can the topology of the fields (continuous deformations) infer about its stability?
To have a grasp of the answer of the above question, consider the simplest topological solution in relativistic field theory, a kink in the $\phi^4$ theory in $1+1$ spacetime. The figure below shows the potential $V(\varphi)$, the static field configuration $\varphi(x)$ and the energy density $\epsilon(x)$ of a topological solution on that theory

If this solution were unstable then it would decay into the vacuum, that is the field configuration would be continuously deformed (topology showing up) into a straight line either either on $+v$ or on $-v$. But since to move any infinitesimal piece of the field from $-v$ to $+v$ one has to go through a finite energy barrier (the bump in the potential) and the energy cost for doing this to the entire field configuration is infinite. No non-singular transformation can deform this topological solution into the vacuum so it is stable.
How can we translate physical argument into the so-called topological invariants? Topological solutions in field theory are normally classified according to the homotopy classes of the vacuum manifold (the set of field expectation values that vanishes the scalar potential). In the case of kinks one is interested in $π_0(\mathcal M)$, the set set of path components of $\mathcal M$. This object simply says whether the vacuum manifold is connected or not, or in another words if the vacuum is made of disjoint parts. Note from our example that this is exactly what is going to be relevant for the stability of the solution. The vacuum manifold has two disjoint pieces, $\pm v$, and the fact that the scalar field asymptotically interpolates these two points is what is preventing it to decay into the trivial solution.
Other topological solutions have a similar description. For vortices (flux tubes or cosmic strings) we are interested in the fundamental group $\pi_1(\mathcal M)$ which classifies $\mathcal M$ accordingly how closed paths can or cannot be continuously shrank to a point. For monopoles (or hedgehogs) the relevant topological feature is how closed surfaces can be shrank to a point so the homotopy group characterizing these solutions is the second homotopy group $\pi_2(\mathcal M)$. The fact that for each type of solution there is a respective homotopy group classifying it is associated to the spacetime dimension and how the scalar field (Higgs) provides a map between spatial infinity and the vacuum manifold.
In other areas, there might be some differences when referring to a "topological object". For instance I hear condensed matter people saying that term when referring to some material itself, such as a topological insulator. However, topology enters in this case also in a similar way to the one described above. One studies how certain maps (from the first Brillouin zone to the some energy manifold) are continuously deformed.
Answer: A topological defect is a solution of your equation of motion (i.e. an eigenstate of your Hamiltonian say) which is stable under perturbation theory. The precise definition nevertheless requires a specific condition, and there is no global mathematical definition as far as I know (see the review by Mermin 1979 who tries to give some). For instance, a domain wall is a configuration of the electron spin which is stable under application of a small magnetic field, or small deformation of the lattice if you put your electrons on a lattice. The difficulty is usually in defining what small means.
Also, note a topological object (as the ones defined in quantum field theories) is usually a classical object. I like the presentation given by Rubakov in Classical theory of gauge field, which shows clearly what a zero-energy mode is in term of perturbation. As for their deep physical meaning, well, they are solution of your equation of motion (say the Schrödinger equation if you wish), so they are usual modes to that respect, but they live in between different vacuum, i.e. they link the different degenerate vacua (also called ground state). That's why they require ground state degeneracy
A simple example (at least for me who works on superconductivity) is the Ginzburg-Landau model. When uncharged, it exhibits the phase-slip solitons as an example of topological object (see also Coleman book Aspect of symmetry for a nice introduction + on the subject), see e.g. an answer of mine : physics.stackexchange.com/a/112206/16689 . When the condensate is charged (i.e. you have a covariant derivative) there is also vortex solutions which are stable (see Rubakov's book cited above)
Answer: The broad meaning is: an object which depends on global properties of the system, rather than depending on the metric or other local properties. Therefore these objects are described via topological concepts like homotopy group, fundamental group and so on.
Comment: Actually, by *broad meaning*, you focused on the meaning in general relativity only.


In making a cookie dough I forgot to add the salt. Is there a way to still add the salt?

Question: I forgot to add the salt ingredient to a cookie dough that is already mixed. Is there still a way to add the salt?
Answer: At this point, I recommend skipping it. In the long run, it's not likely to "ruin" your cookies. It's usually just there for a bit of flavor enhancement, not likely for any chemical reason. There may be some slight difference in the importance of the salt depending on the type of cookie you're making, though. Something like a sugar cookie or chocolate chip isn't likely to need it much. A peanut butter cookie, though, the salt does a lot for the flavoring but if you use salted peanuts/peanut butter, there's probably already a good amount of salt in the ingredients, so you'll still probably be OK.
Mixing the salt with the flour is an important step in making sure it's distributed evenly. Once the dough is complete, getting the salt mixed in well would likely overwork the dough and give you tough cookies and even then, you may end up with salty pockets and some parts that are unsalted.
Comment: There's also a fair bit of salt in regular butter. Some recipes call for unsalted butter so you can control the salt more precisely, but most butter is salted and that will provide enough salt to keep the cookies from being totally bland.

Personally, I like the salt ;-)
Comment: I always use unsalted butter in cookies, so I didn't even think of that. I only buy salted butter during the summer for corn.
Answer: Many cookie doughs are pretty tolerant of over-mixing. You can just throw in the salt and give it a spin in the mixer. The salt won't be perfectly evenly distributed, but it should be good enough.
In fact... it's becoming trendy to put salt on top of things rather than mixing it all in. (Cf salted caramels). You use bigger salt crystals, to add crunch and textural contrast. It dissolves in your mouth, making for an interesting contrast of flavors.
So, if you've got some kosher salt or other fancy salt on hand, you could just bake them and sprinkle the salt on while they're still warm. (Use about 1.5-2x as much of a big fluffy salt as you would with ordinary table salt. Or just use plain table salt, if that's what you've got.) I often do this with bar cookies, sprinkling the salt right before they go in the oven.
Comment: plus one for sprinkling it over the top - it will likely end up in each bite, which is probably good-enough for most recipes.


How do you get better at sight reading?

Question: This is really confusing. Sight reading basically is recognizing the notes. How do you actually "improve" on something like that? Can someone please give me advice on how to improve? I have a MTAC (Music Teacher's Association of California) test in two days! I'm really nervous, I need help! I personally is really bad at reading notes. Please help.
Comment: Practice every day. Just like word reading.
Comment: Is this a test to become an accredited music teacher? If so, strategies for improving sight-reading should have been well covered by now. It's a skill that takes a lot of time, regularly trying to read, on a daily basis, like so many other skills. Sorry, it won't suddenly improve for tomorrow, whatever happens.
Comment: Any way it's too late now to start with training ...
Comment: https://www.musictheory.net/lessons
Answer: Sight reading is "basically recognizing the notes", but in two dimensions: pitch and rhythm.
If you're really talking about "sight" reading (being able to read something in real time that you haven't seen before) you want to isolate those two skills.
Get some snare drum music.  Everything is written in the third space of the staff, so it isolates the rhythm.  Choose any pitch on your instrument and play the written rhythms.  Do a different exercise each time you practice - you want it to always be something you haven't seen before!
One you're competent in reading rhythms, then you add melody. Again the key is to play things you haven't seen before.
It takes time to learn to read "at sight" - for a melody it takes the average person a couple of years to do it well.  For harmony (reading vertical chords at sight) add another couple of years.
Because you need new music every time you practice, you'll need access to lots of music.  When I was really working on improving my sight reading the resources were a little more limited, so I made do with what I had - I would take music that I'd already played and repurpose it by playing the measures in reverse order, or by reading down columns of measures.  Fake books are good for practice, since they usually have 200+ different tunes.  And you can practice sight reading from music written for any instrument that uses your clef - if you're playing clarinet, you can read violin music, or oboe music, or flute music... anything in G clef that doesn't exceed your range.  You don't need to worry about it being for a transposing instrument unless you're going to play with someone else, so that can increase the amount of music available.
Answer: It looks as you are an absolute beginner:
Maybe it will help you when you know what the clefs are meaning: Violine clef is developped of G, the
Bass clef was originally an F.
https://www.letsplaykidsmusic.com/understanding-clefs-stave-easy-music-theory/
also the sharps and flats can give you some indications ... you must know where they are placed and which tones are altered by them and also know the spelling. You will not learn it in 2 days by reading and memorizing.
Draw a grandstaff with distance of lines and transcribe/write any sheetmusic instead of the dots right the name of the notes across and between the lines. Measure the time and count how many notes/min you could copy. So you can measure your improvement.
Start with children songs and well know pieces. Google the title and look up images or sheet music.
Reading the rhythm will be a quite different problem ...
https://www.musictheory.net/exercises
Comment: Trouble with starting with well-known pieces is that if someone's good with their ear, they'll tend to play by ear rather than read the dots.
Comment: @Tim, I was assuming that OP has no idea of sheet music at all - as he asks how to improve his sight reading in 2 days for a test.

How do you get better at sight reading?


Can a job reject a British citizen if they have dual nationality?

Question: I have recently been offered a job with a government organisation in the UK. I was hired through a job agency, and one of the requirements is to be a UK national which I am. I got offered the job, and the past weeks have been a mess of getting security clearance. (I lived in multiple countries in the past making police checks for each of them very difficult). Now all of a sudden I received a phone call saying they've retracted the offer because I have also Italian citizenship. This is very shocking as I filled a form stating clearly i was a dual citizen before even attending the interview for the job itself. Can they do this?
Comment: Somewhat unprofessional I believe, but yes, they can do this
Comment: Maybe it was not a key factor but one of the factors, last one. Did you get your clearance score ? Maybe dual citizenship bough your score lower than needed and the explanation stated that information
Comment: If I remember correctly, national security clearances in the UK are processed by the United Kingdom Security Vetting agency which provides only a yes/no answer to your potential employer, so although they may have collected the completed forms from you and sent them to UKSV they won't know the exact reason your clearance was denied. Certainly I wouldn't expect your job agency to be told that. I think it is likely they are assuming your Italian citizenship is the reason.
Answer: In general your citizenship should not be a factor in job recruitment. But in a government job requiring security clearance your citizenship is absolutely a factor they can take into consideration.
One of the things that a secure government job requires is that your primary allegiance be to the UK. Let's say in the course of your job you find something that the UK government does not want the Italian government to know. The need to know that you will absolutely consider it your duty NOT to tell the Italian government about it - and also that the Italian government cannot put pressure on you to tell them.
So the second part is why they didn't tell you this when you applied. Being a dual citizen does not exclude you 100% - and it's also possible that the people interviewing you did not know whether being dual citizen would exclude you.
Comment: You can probably thank Brexit for that retraction.  A dual citizenship within the EU is routine, but if the UK does go ahead and secede, that puts a security clearance in a whole different light
Comment: Being a dual or multi-national _may_ be a bar to a position which requires access to "Five Eyes" data, or whatever the UK has which might be equivalent to the US version of "No Foreigners". To the best of my knowledge, my father remained a dual national, despite working on _really classified stuff_. But it also explains why he wasn't at all keen on my getting Canadian citizenship through him.

TL;DR - Positions requiring clearances can be challenging.
Comment: @GeorgeM And given the general state of Brexit preparations, it's quite possible that their policy on dual EU citizens changed between when OP applied and when their clearance got rejected.
Comment: If the policy relates to Brexit it will probably change again in a few weeks.
Comment: @DJClayworth - It will probably also change tommorow.
Answer: Usually these jobs have a clause in the contract that denial of the government security clearance can terminate the contract.
Most of the time companies are aware of the common  requirements of a security clearance, e.g. only nationals of countries x, y, z, so they hire accordingly.
Nonetheless there can be issues, which the company doesn't know, but causes the government agency to deny the clearance.
Therefore they have this clause in their contracts.
So unfortunately this is bad luck, but there isn't really anything you can do about it.


counting sets of numbers in a long list

Question: As I am new to python programming, I am having difficulty writing a python program. I am trying to count a set of seven objects(?) of three numbered digits and tabs within a long list. Then I need to find which set of numbers (in multiples of three's) have the maximum number along the list. The numbers are separated by a tab and the set of numbers are in seven's.  For example:
['128','130','140','145','','','','283','379','','','','','','175','183','187','','','',''etc.]

The first set of numbers and tabs in the list are 128, 130, 140, 145, tab, tab, tab. The second set of numbers and tabs in the list are 283, 379, tab, tab, tab, tab, tab. Finally, the third set of numbers in the list are 175, 183, 187, tab, tab, tab, tab.
I would like to count the three number digits in the seven sets of numbers and tabs, and then have a maximum output number of which set shows the most three digit numbers.  For example:
['128','130','140','145','','','','283','379','','','','','','175','183','187','','','','']
this first set = 4                this second set = 2        this third set = 3

In this example the final output number should be 4, because the first set of seven object revealed the most 3 digit numbers.  Here is my what I currently have.
#!/usr/bin/env python

allele = '128   130 140 145             283 379                     175 183 187
elementlist=allele.split('\t')
string= str(elementlist)
type = string.replace('\t','0')

print type

I would appreciate any thoughts or concerns.
Answer: Just a sketch:
>>> L = ['128','130','140','145','','','','283','379','','','','','','175','183','187','','','','']

Subgroups:
>>> L1 = [L[i : i+7] for i in range(0, len(L), 7)]
>>> L1
[['128', '130', '140', '145', '', '', ''],
 ['283', '379', '', '', '', '', ''],
 ['175', '183', '187', '', '', '', '']]

Elements in a subgroup:
>>> L2 = [sum(x.isdigit() for x in SL) for SL in L1]
>>> L2
[4, 2, 3]

Maximum:
>>> max(L2)
4

Answer: If all you need is the longest segment, you might want to keep just a reference to the starting point and length of the longest segment, because that way you'd avoid copying a lot of elements that you don't need in memory.  This is quite useful for very large data structures.   In that case, you might want to use something like this:
def longest_segment(target_list, empty_element):
 longest_start = longest_len = 0
 current_start = current_len = 0
 i=0
 for element in target_list:
   if element == empty_element:
      current_start = -1
      current_len   = 0
   else:
      if(current_start == -1):
        current_start = i
      current_len = current_len + 1
   if( current_len > longest_len ):
      longest_start = current_start
      longest_len   = current_len
   i = i + 1
 return longest_start,longest_len

Usage example:
L = ['128','130','140','145','','','','283','379',
 '','','','','','175','183','187','','','','']

#The function supports a generic empty element so you could use other separators, like tab
start, size = longest_segment(L,'')

print ("The longest segment starts at:\t" ,start)
print ("The longest segment has length:\t",size )

#Up to this moment,  there is no need to copy or keep more elements in memory.
print ("The longest segment is:\t", L[start:start + size])

counting sets of numbers in a long list


Browse to updaload image from modal dialog

Question: I know modal over a modal  is not good UX. But I have a modal window and I am going to place a file upload(browse) component to upload a image for user. I am not really sure, will that break any UX by opening up the second dialog (window) to browse a file? Any suggestions, should I do or do not? Appreciate your comments.
NOTE: This is not the modal over another modal, it is modal over a system file upload popup.
Comment: Please check this thread. http://ux.stackexchange.com/q/46261/97647 I hope it answers you well
Comment: Thanks for all  your answers/comments, my situation is different. Its not that I have two modals, it is just one modal and system popup. The link says modal over a modal which is different and I understand that too.
Comment: It's essentially the same thing, @NPN. That system prompt is modal in nature.
Answer: I think that will not going to be a problem if you are not going more than 2 model windows in single page.  As far as your page concern, you will be having one model window and another possibly system file browser window.  We can have it from my perception.
Comment: My concern is, Does user feel system popup as a modal or not in this situation?
Comment: As far as my understanding, user would not confuse the system window (i.e. file browser window) with custom model popup windows.  This is not only my gut feeling, I have had real time user experience in this scenarios.


Set format of data read through serial port?

Question: while reading a data through the serial port.I want to know that the data which is coming through the port in which format it is ? wheathr ASCII, Decimal or Hexa or in Bytes it is,
plz any boby give the hint
Answer: Use a terminal program like HyperTerminal or TeraTerm to see the output from the serial device. You can use these software to establish a connection from your PC to the device, then check the output on your screen to determine the data format.
Also check the manufacturer manual, they typically will details about the data format and also the serial port connection details (baud rate etc).
Answer: ByteSize is simply the number of bits the device manufacturer has chosen to use per BYTE of data the device outputs. Typically they use 7 or 8: the range itself is limited to 5,6,7 or 8.
So there will be this BYTE stream irrespective of ASCII, HEX format. For example you can have both ASCII or HEX format using any of the 5,6,7 or 8 bits per BYTE.
Which is why one should look at the manufacturer manuals or try the hyperterminal to see that data format.
Answer: It depends upon how you are configuring serial port to connect the device:
data length (Bytesize) is one of the property to decide data to receive and ofcourse how the device is transferring
DCB structure looks like following:
DWORD BaudRate: Speed
BYTE StopBits:
0,1,2 = 1, 1.5, 2 (default = 0)
BYTE Parity:
0-4= no, odd, even, mark, space (default = 0)
BYTE ByteSize:
Number of bits/byte, 4-8 (default = 8)
Last one decides the data stream and all other decides the connectivity..


Phase Delayed Double Slit Experiment

Question: Lets say we have a double slit setup where a plane wave hits 2 narrow slits and travels down a small channel. One of the channels has a dielectric which will slow down the light passing through it. The dielectric's refractive index is continuous so that all the light is transmitted and none is reflected. The light passing through the dielectric gets a phase delay of $2\pi n$ where n is a positive integer greater than the distance between the slits divided by the wavelength of light used plus 1. If we send through one photon at a time, will there be no interference pattern? If we sent one wave front through the double slit, the waves coming out of either slit wouldn't be able to interfere with each other due to them never overlapping due to their phase delay. I suppose it could be possible that there could be multiple photons in one wave front and that it could also be possible that one photon's wave function could be spread out over multiple wave fronts. I guess that kind of complicates things. I'm guessing that if we send a continuous plane wave through we'll see a diffraction pattern as normal. Though if we knew how many photons were entering both slits combined over time and the amount of photons hitting our screen over time, we may be able to determine how many of the photons passed through each slit. I don't know if that knowledge would interfere with a diffraction pattern's formation though. Any help would be appreciated.
Comment: The nature of Fourier optics means that you *can't* have a single oscilation of a wave with a well defined frequency (classical framing). Or that a wave-packet particle thingy (pop-sci photon) with a well defined frequency is stretched-out across many wavelength of longitudinal distance (semi-quantum framing). Which makes the notion *"we delay the light on one path so it can't interfere with itself"* rather tricker than it seems at first. I suspect we can construct a varient of the energy-time HUP to cover this case.
Comment: *Aside:* Fourier optics is almost entirely neglected in pop-sci treatments, and is given too short shrift in most undegraduate treatments. Which is a shame because it, well, illuminates many imporatnt issues.
Comment: Diffraction patterns come from the slit and spreads across the whole screen. If you have a double slit each one spreads out across the same screen. You cannot have photons diffracting at the edges of the two slits and then travel through two different mediums on their way  to all parts of the same screen.
Comment: @dmckee Ah, thanks for bringing that point up. I was just thinking of the wave function like an electromagnetic plane wave. I guess that got me kind of confused.
Answer: It appears that you're thinking of a photon as if it were a tiny particle-- but it's not.  It is a wave, extended in width, height, and length.  Its length depends on the coherence length of the source.  Actually, the coherence length of the source is the effective length of the photons.  When each individual photon goes through the double slit interferometer, it is a wave going through both slits.  But when it is detected at downstream, it's found to be at a random point location with a likelihood proportional to the intensity of the wave.
In the experiment you described, you are delaying the wave at one slit by some amount.  As long as that amount is less than the coherence length of the source (i.e., the length of the wave packet), it is still possible to get unterference where the two parts of the wave overlap.
Comment: I consider a photon to be a very small particle, too.
Comment: At the moment/location of detection, a photon can be considered a particle for most purposes.  But between emission and detection, it is best described as a wave.
Comment: I consider it to be a tiny particle all time. The wave I see as the equivalent of the wave function of the electron.
Comment: @S.McGrew There is no proof of waves. Besides you can describe a particle but you cannot describe a light wave without resorting to billions of photons.

Phase Delayed Double Slit Experiment


Updating a SharePoint list via an Access query and VBA code exhausts system resources

Question: My apologies: I asked this on StackOverflow already but have received no responses. I am hoping that reposting on a site more oriented to SharePoint might lead to more insight.
For reasons beyond my control we are using Access 2010 to update linked SharePoint lists to keep them synchronized to our CMDB (we are using SharePoint 2010 as well). We obtain reports from the CMDB in CSV format, and link them to Access as well. We then use a combination of Access VBA and predefined queryies to add new data, or update or soft delete existing data. One list in particular is causing problems. Specifically, inserts/soft deletes seem to work, but Access exhausts resources and crashes when running the update query. Pulling up the resource monitor shows that memory usage constantly increases as the application runs, and Access finally fails when ~ 1.6 GB or RAM has been allocated to it (on a 4 GB machine with a 6 GB swap file, Windows 7 64 bit, but 32 bit Access).
I use two queries in addition to the VBA code. One query retrieves a result set that allows me to determine which row in the SharePoint list is to be updated (if any), while the other identifies which columns from the report update corresponding columns in the SharePoint list, the join condition between the linked report and the corresponding list, and the row in SP to be updated, identified by by its composite key. I then iterate over the first result set, pausing .1 seconds between each row, and applying the appropriate parameters to the update query. Fairly standard stuff, I think.
We have to use this approach (or one substantially similar) due to the fact that the SharePoint list has associated workflows. We found that if we wrote our SQL to perform  standard set-type updates, the updates occurred too quickly, overloading Sharepoint's workflow engine and causing the workflows to fail, thus the need for the .1 second delay within the VBA loop.
NOTE: I receive no hint of any issue or error up to the point where Access crashes, and SharePoint is being updated - again until Access crashes due to system resource exhaustion.
I've tried a number of alternate techniques:

Using a recordset edit/update sequence rather than the query/exec
shown below. That consumes memory even more quickly, and spikes the
CPU to 26% vs. 12%.
As shown in the VBA code below, I've tried closing and reopening the queries every
100 rows, as well as using transactions. Neither technique results in
an improvement.
I've tried disabling then re-enabling Access' SharePoint caching
mechanism, with no success.
I've tried using parameterized queries. This technique does not work
as we must update a number of memo fields, and query parameters max
out at 255 characters.
Running a database compact/repair does not release allocated memory.

This is the VBA code to execute the queries:
 Private Sub runUpdt()
   Dim oQdfUpdt As DAO.QueryDef
   Dim oRs As DAO.Recordset
   Dim oWrkSpc As DAO.Workspace
   Dim strmsg As String

   On Error GoTo Handler

   logMsg "Entering method runUpdt in class clsAppFsFin"
   Debug.Print "Entering method runUpdt in class clsAppFsFin", Now()

   Set oRs = CurrentDb.QueryDefs("slctAppFsFinRowsForUpdt").OpenRecordset(dbOpenDynaset, dbReadOnly)
   Set oQdfUpdt = CurrentDb.QueryDefs("updtAppFsFin")
   Set oWrkSpc = DBEngine.Workspaces(0)

   Do While (Not oRs.EOF)
      oWrkSpc.BeginTrans

      If (isUpdated(oRs)) Then
         oQdfUpdt.Parameters("CHGTXT") = "System Change"
         oQdfUpdt.Parameters("ID") = oRs.Fields("RYCID")
         oQdfUpdt.Execute

         ' inserts a row into the flg_is_updt table
         oFlgUpdt.insFlgIsUpdt oRs.Fields("RYAID")
      ElseIf (oRs.Fields("SPCTX") <> "System NoChange") Then
         oQdfUpdt.Parameters("CHGTXT") = "System NoChange"
         oQdfUpdt.Parameters("ID") = oRs.Fields("RYCID")
         oQdfUpdt.Execute

         ' inserts a row into the flg_is_updt table
         oFlgUpdt.insFlgIsUpdt oRs.Fields("RYAID")
      End If

      oWrkSpc.CommitTrans

      ' At 100-row intervals, print out a progress report, then close and re-open the recordset
      ' and reposition to the last row processed using FindFirst
      If (oRs.RecordCount Mod 100 = 0) Then
         strmsg = "Updated " & oRs.RecordCount & " rows. Class: clsAppFsFin, Method: runUpdt."
         Debug.Print strmsg, Now()
         logMsg strmsg

         Dim curFSCID As String

         curFSCID = oRs.Fields("RYCID")
         oRs.Close
         Set oRs = Nothing

         oQdfUpdt.Close
         Set oQdfUpdt = Nothing

         Set oRs = CurrentDb.QueryDefs("slctAppFsFinRowsForUpdt").OpenRecordset(dbOpenDynaset, dbReadOnly)
         Set oQdfUpdt = CurrentDb.QueryDefs("updtAppFsFin")

         oRs.FindFirst "RYCID = '" & curFSCID & "'"
      End If

      ' sleep .1 seconds to avoid overloading the upstream workflow
      Sleep SLEEPTIMEINMILLIS
      oRs.MoveNext
   Loop

   strmsg = "Final update count: " & oRs.RecordCount & " rows. Class: clsAppFsFin, Method: runUpdt."
   logMsg strmsg
   Debug.Print strmsg, Now()

   oRs.Close
   oQdfUpdt.Close

   Set oRs = Nothing
   Set oQdfUpdt = Nothing

   Debug.Print "Exiting method runUpdt in class clsAppFsFin", Now()
   logMsg "Exiting method runUpdt in class clsAppFsFin"
   Exit Sub
Handler:
   oWrkSpc.Rollback

   Debug.Print Err.Number, Err.Description
   logError Err.Number, Err.Description
End Sub

Here are the select and update queries executed by the VBA code
Select query:
SELECT          APFF.[App ID]               AS SPAID,
                APFF.Server                 AS SPHST,
                APFF.Directory              AS SPDIR,
                RAppAH.AppID                AS RYAID,
                RAppAH.Host                 AS RYHST,
                RAppAH.ID                   AS RYCID
                <
                 snip
                >
FROM           (AppCert
INNER JOIN      AppFileSystemFin            AS APFF
ON              AppCert.[App ID]             = APFF.[App ID])
LEFT JOIN       RAppAH
ON              APFF.FSCID                   = RAppAH.FSCID
WHERE           APFF.FSCID                   = [RAppAH].[FSCID]
           AND  AppCert.State                = "8 - Complete"
           AND  RAppAH.FSCID                IS NOT NULL
           AND  APFF.[Change In SoR - Text] <> "System Remove"
ORDER BY        APFF.ID;

Update query:
UPDATE     AppFileSystemFin
INNER JOIN RAppAH
ON         AppFileSystemFin.ID        = RAppAH.ID
SET        AppFileSystemFin.Server    = [RAppAH].[Host],
           AppFileSystemFin.Directory = [RAppAH].[Directory],
           <
            snip
           >
WHERE      AppFileSystemFin.ID        = [ID];

Answer: The issue is now resolved. In the update query shown above:
WHERE AppFileSystemFin.ID = [ID];

This line does not refer to SharePoint's system-generated ID column. Instead, it refers to an internally generated key field that we had to use in order to be able to perform SQL join operations between lists.
The query has been updated to use SharePoint's generated ID column instead. This minor update resolves the memory allocation issue and in turn, allows updates to proceed more quickly - now requiring only about a third of the previous runtime to complete execution.


Using Time Capsule to Access Internet

Question: I have a 2008 Mac Pro and it has no wifi card in it. I have a time capsule. Can I connect the time capsule to my router via wifi and use an Ethernet cable from the time capsule to my Mac Pro to access the Internet?
Comment: So, to clarify, you want to go Internet <- ISP Modem <- Wireless Router <- Time Capsule <- Mac Pro. Correct?
Answer: This depends on the type of WIFI network that is being produced by your WIFI router, as to whether the TC can extend it or not.  Basically, the best way to find out is to experiment on your TC - fire up your Airport Utility, and in the Wireless configuration option, look to see if it will let you extend rather than create a wireless network, and then see if will find your existing network.
EDIT: I should add that the brand of wireless router is a primary consideration as well. Many brands don't play well with TC, AE, or any other Apple networking gear.
Answer: I tried to clarify your topology in comments above. I presume you want a wireless bridge between your router and the TC. The answer to that question, as stuffe suggests above, is to try it. However, I would suggest using the wireless router to control your traffic, and putting the TC in bridge mode. If possible, I would connect the TC to the router via Ethernet cable, even if the wireless bridge is possible.

Using Time Capsule to Access Internet


How I can access to the webcamm in cn1 windows desktop build?

Question: anyone knows how to use my webcam when I capture a photo. I build my app for windows desktop in codenameone. I have a pro account and I need it for a proyect.
Answer: The desktop build just uses Java SE which is packaged with the app. Unfortunately JavaSE or JavaFX don't provide webcam access out of the box and the solutions that allow this are pretty complex.
You can use native interfaces which in the JavaSE port just invoke plain Java and try to make use of a project like this: https://github.com/sarxos/webcam-capture/
Alternatively, HTML5 does have camera capture builtin so we support this in the JavaScript port see: https://www.codenameone.com/demos-Camera.html


PHP Curl: Getting a directory listing and downloading directories connecting to HTTP

Question: I'm fairly new to CURL and I was able to fetch individual files like this:
$c_session = curl_init();

curl_setopt ($c_session, CURLOPT_RETURNTRANSFER, 1);
curl_setopt ($c_session, CURLOPT_URL, $uri);
curl_setopt ($c_session, CURLOPT_TIMEOUT, '12');

$content = curl_exec($c_session);
curl_close ($c_session);

Now I need to be able to list directories and download them using CURL. The catch is I need to connect to an HTTP server and not an FTP one.
Answer: I don't think there is a native directory listing function in HTTP. The closest you'll get is the DirectoryListing that Apache and other Web servers may produce when accessing a folder URL. But that is HTML and you'll have to parse it first.
Better use FTP or if you can, have a server side script generate a simple list that you can download, parse and process.
Comment: Can't use FTP. The server-side script idea sounds promising.
Answer: You're going to have to parse a list generated by the server, whether that is by DirectoryListing as above, or another server-side script that generates a list of links.
You'll then parse the HTML and pull out of all the a href tags.
If you're relying on the output of another script (Directorylisting), you may need to run the HTML through tidy to produce XHTML, then pass that into simplexml.  You can then write an xpath query like '//a' and retrieve all the attributes.
$list = array();
$x = new SimpleXMLElement($stringfromcurl);
foreach ($x->xpath('//a') as $node) {
    curl_fetch_href($x['href']);
}

Or... generate the list yourself as something a little easier to parse, then do the same sort of deal.
This is the equivalent of doing something like wget -r -l1
Answer: When you go to a host/path/ If there is no index.html many servers will list the names and links to files. Not all servers are configured to show empty directories. If the server you are connecting to is , you need to screen scrape the generated directory listing.
Take a look at the simple_html_dom parsing library for this.
Answer: Is the server using WebDAV?  If so, you may be able to find a library for PHP that can allow you to do this.  Chances are slim, however, especially if you're trying to get stuff from a public-facing web server.


Analyze Android Memory Usage.

Question: Task Manager is showing a RAM usage of 10MB when my application is running. I wanted to analyze it, but when I create a hprof dump it only a shows a total of 2MB. Can anybody point me in the right direction to where the other 8MB come from?
Comment: Duplicate of [this question](http://stackoverflow.com/questions/7613910/android-memory-usage-and-heap-usage)
Answer: You can use DDMS for more accurate results.
This difference might come from different queries. There is a difference between used and reserved (but free) memory. Maybe the TaskManager (which I wouldn't trust too much) shows the empty space and hprof also the reserved.

Analyze Android Memory Usage.


Outlook for Mac 16.71 - Missing Clear conversations feature

Question: I recently switched from HP Zbook running Windows 10 with Outlook 2016 to Apple Macbook Pro (M1 pro) running Ventura with Outlook 2016. My work email account is an office 365 account.
There was a nifty little feature in Outlook for windows where I can clean up redundant messages on a mail thread. It is as explained here - https://support.microsoft.com/en-us/office/use-conversation-clean-up-to-delete-redundant-messages-70179d54-fa57-48ce-95fd-416d72e5ccd4
This feature seems to be missing in my Outlook for macOS. I can only arrange emails by Conversations, but unable to delete the redundant messages as there is no option provided. Is this known limitation? I checked Apple's mail app documentation, and this also does not have the feature to clear redundant messages in a conversation.
I would be grateful for

An answer if this is indeed a limitation in Outlook for macOS
An alternative app suggestion where this feature is available.

Have a nice day!
Answer: So based on https://www.groovypost.com/howto/quickly-clean-up-your-microsoft-outlook-inbox/ this is apparently not possible in macOS. That answers #1 of my question.


Computer monitor resolution for small font

Question: I wonder if someone can help me. I work on a computer program with a very small font and there is no way to change it. I have a 15 inch laptop connected to a 21 inch monitor. I am using a resolution of 1280 x 720, but the monitor's native resolution is 1920 x 1080 x 60. The computer belongs to the company I work for and this is how the laptop resolution was set up. I tried using the monitor's native resolution but things do not fit on the screen so I have the 1280 x 720 resolution. I have extreme eyestrain. I do wear computer glasses. My question is would getting a different monitor help me see better and if so, what size monitor and resolution would be best? Do I have to buy a monitor that has the same resolution as the laptop?  Any information would be greatly appreciated. Thanks, Eleanor
Comment: Are you using Windows? If so there is the magnification tool built in that may help you out
Comment: I do use windows but do not really know how to use the magnification tool and am not sure if it works but thanks for your advice.
Comment: Otherwise you could bring it a step lower which is probably 640x480 but this makes it kind of unusable
Comment: I'm somewhat unclear about _"I tried using the monitor's native resolution but things do not fit on the screen"_. But according to you, the monitor's native resolution is larger, so it should have _more_ space for things, not less?
Comment: I cannot remember if they did not fit or were stretched out so I will have to try it again, but do not think it is a good thing.
Comment: When I use the larger resolution the text is very small almost impossible to use. I know that a bigger resolution makes the text smaller so should I get a new monitor with a smaller resolution? Does the monitor resolution need to be the same as the laptop or at least one that the laptop supports? Thanks
Answer: Simple solution
On reflection, the problem is probably NOT so much  the screen size but the difference in resolution of your laptop and external monitor. I postulate you are using these in "mirror " mode - ie same picture on both, and because of the different resolutions it looks blurry on the monitor.
The cheap solution is to expand your monitor onto the large screen rather then duplicate the screen, so each screen runs at its native resolution.
**Old answer **
(technically a better answer but probably does not solve your actual problem)
What you have written about "using the monitors native resolution but things not fitting on the screen" does not really add up. If the native resolution is 1920*1080 that will show MORE on the screen then running in 1280*720.
There are 5 factors (some are actually a restatement of the same thing) to understand to solving your question -

(All else being equal) The higher the resolution, the smaller the dots on the screen, the smaller images/txt will look.
Running at native resolution will provide the sharpest/clearest images because there us no scaling to distort the image.
For a given resolution, a larger monitor will display the same image/amount of information, so the information will look bigger.
Some OS's / programs have an idea of "DPI" (dots per inch). If available to you, The lower you set this number, the larger/more readable things will appear.
Screen sizes are measured diagonally.

So, putting this altogether you probably want to get a larger screen - at a guess 27/28 inches - with a native resolution of 1920*1080.
Answer: I hope I'm not misundertsanding the problem, but one solution you can try is right-clicking on your screen and go into display settings.  Depending on what build/OS version you are using somewhere there will be an option to change the size of texts, apps, and other items in the first window that opensFirst window, or by navigating from there to Advanced display settings>bottom of first windowAdvanced sizing of text and other items>second windowset a custom scaling levelthird window, and then change the drop down menu.Custom sizing options The first method will change instantly, the other one you'll have to sign out and back in to see it. Normally the default is 100%, but I have seen some where the default is 150%.  Increasing the percentage changes the size without changing the resolution.  I'd try it with both resolutions you've mentioned to se if they help.


Illuminated cloud create scratch org from file

Question: How I can use scratch-def.json for creating new org without using DX CLI?
Answer: Go to "Manage Connections" from the IC toolbar (it's a on the drop-down that says "Open Connection"). Click on the DX Icon in the top-left to start creating a scratch org.
On the new scratch org dialog, there's a folder icon next to the field for Org Name. You can use that to pick an existing scratch-def.json. The the dialog will be populated with the setting from that file.
This is particularly useful when your scratch org has expired on an existing project.
Comment: That's good feedback. If the discoverability of that feature is low, I can change it to something more obvious, perhaps a hyperlink like **Load scratch org definition**. I'm certainly open to feedback on how it could be improved.


How can a user recover a mistyped email account?

Question: I have a website where users login with their email address and password.
They also can update their account details like first and last name, location and email address. If they make a typo while updating their email, what's the best way to let them recover their account?
Comment: I guess there is a confirmation email, so until that email is confirmed the email address won't update; is this correct?
Comment: @Alvaro Well at this point, there isn't. Let's say there is. The confirmation email might be sent to someone else. What if that person clicks the confirmation link? I guess it's a good idea the password is needed too to confirm the email address?
Answer: Typically two confirmation emails should be sent:
One email should be sent to your old email address ("You asked us to change your email address") which would allow you to revert the change if it wasn't you that did it, or you changed your mind, or you made a typo.
One email should be sent to the new email address asking you to authenticate with your password.
The account change should not happen until the authentication has happened with the new email and the password. Until then, the old email address is still registered on the account.
On your site it would be advisable to put a banner e.g. 'A confirmation email has been sent to firstname.lastname@example.com (change this)' so that users can see the new address clearly, and let the user correct the new email address in the event a typo has been made. If the new email address is updated to something new again, then authentication via the incorrect intermediate address should not be allowed. The banner would remain until the authentication has been made from the new email or reverted via the old email, or cancelled on the site.
[Disclaimer: I'm not a security expert!]
Comment: I implemented this in my website and it works great! This solution gives a better security to my users for not losing their account. Thanks Roger!
Comment: It also provides better security for people who are not users. You'd be surprised how many people in the world who share my last name sign up for stuff with my e-mail address (which is my last name at a very large e-mail provider). Some of them probably just don't have an e-mail, others probably forgot that the address they wanted was already taken and they picked a different name.
Comment: (Related: I get a lot of spam from web sites aforementioned people have signed me up for, and I hate those sites for not properly checking whether someone actually owns an address before letting people associate an account with it)


IIS/SMTP on Windows Server 2012 - Emails stuck in Queue folder

Question: I have installed IIS 6 on a Windows Server 2012.
I've configured the Virtual SMTP using my Gmail account. It is a quite classic scenario well described also on Technet docs, there are plenty of discussion also here on ServerFault.
I have also logged in to my Gmail account from this server to allow unsafe application. Another important thing is that I don't have two factor authentication enabled on Gmail.
SMTP configuration is:
Outbound Security
Basic Authentication with my Gmail account
TLS checked
Outbound Connection
TCP Port: 587
Advanced
FQDN: servername.local
Smart host: smtp.gmail.com
I've "Limit number of connection" property not checked under "General" tab.
Then I have created a small <code>.txt</code> file with a simple email, copied it to Pickup folder. The SMTP service works fine, but the email remains stuck in Queue folder.
So I've checked the Windows Event Viewer (Application and System logs), but I did not find useful information.
Also enabled the SMTP log, but no problems are reported.
Any suggestion?
Answer: Issue was my Azure firewall. I had some outgoing firewall rules on my VNET that once removed the emails went out.


How can one calculate the estimated RSA key life based on Moore's law?

Question: How can someone estimate the number of years needed to factor an RSA key based on the advancement of technology if followed Moore's law?
Comment: An estimation based on Moore's law and current integer factorization is not a realistic estimate (and probably it will state something like thousands of years for RSA 2048). The reason is that having a more powerful computer does not matter much, when compared to finding a more efficient factoring algorithm. The general number sieve is the best algorithm we know, but a better algorithm might be found in the near future (or not). Also, there are approaches to optimize various aspects of the GNS, like polynomial selecation, which might speed up the process compared to today's method.
Answer: It is hard. Main problem is that RSA key breaking relies on integer factorization, for which the most efficient (known) algorithms use CPU but also RAM, with constraints on parallel computation. Moore's law is already a crude approximation of how CPU power evolves over time for a given budget; it fails to take into account memory size and latency (two distinct things).
In fact, Moore's law, as expressed by Gordon Moore, is about transistor density, which does not equate with performance; and Moore himself changed it occasionally. The version that was fashionable about 12 years ago was: "every three years, one can put four times as many transistors in a given area, and clock that twice faster". This translates to an increase in computational power of 1 bit per year when breaking symmetric algorithms with FPGA or ASIC; but for general purpose computers, this is more like a double in power every 18 months, because register size does not increase as fast, and even when registers grow, the data elements we put in them do not. Also, over the last decade, clock rate of CPU has more or less stabilized, so Moore's law can be maintained only through parallelism -- multiple cores. But not all algorithms are amenable to easy parallelism, in particular the big matrix reduction which is the last step of General Number Field Sieve, the current best algorithm for breaking RSA. That matrix reduction appears to be the bottleneck for keys longer than the current record (768 bits).
Read section 6 of this report for a discussion and pointers on the subject. All see this site for estimates computed by various organizations, and even more pointers.
Answer: Start with this formula: http://en.wikipedia.org/wiki/Integer_factorization#Difficulty_and_complexity
and either invert the formula or use newtons approximation.
as for the offset to work on:
http://en.wikipedia.org/wiki/RSA_numbers
the number RSA 1024 appears to not have been factorized, but many companies already moved on to 2048 or even 4096.
Comment: Unfortunately this answer links to a [Wikipedia page with an _incorrect_ formula](https://en.wikipedia.org/w/index.php?title=Integer_factorization&oldid=577587220#Difficulty_and_complexity): it confuses the number of bits of a number and its natural logarithm; and it misses an $o(1)$ term. The correct formula is [here](https://en.wikipedia.org/w/index.php?title=General_number_field_sieve&oldid=567539277).
Answer: Additionally the discussion on this topic from the NIST standards is very beneficial. They explain thoroughly the means by which they establish their standards and the manner in which it is possible to abstract a more general notion of security and compare strengths of symmetric and asymmetric cryptosystems reliably. Here is the link.


how to get an event's completion time in jquery

Question: hi i am using jquery .
i have a check box click event
jQuery('.btn-check-box').click(function () {

    //code goes here .
});

the problem is the click event takes considerable time to complete.some times the browser gets stuck.
so i want to change the code inside the function and reduce the completion time .
now i want to get my current click event completion time .
then make changes to the code and again check the completion time .
so i can optimize my code according to the completion time .
is there any way to check an events completion time .
please help.
thanks in advance.
Comment: can't you do something like `finishtime-starttime`?
Answer: Pass event as argument.
var createdTime;
jQuery('.btn-check-box').click(function(e){
  createdTime = e.timeStamp;
}).done(function(){ calculate time difference });

if you will use console.log(e) then it will show you that jQuery already passing timestamp when event is triggered.
so now you need to find a way when even is getting done so .done() jQuery method will help you.
In side .done() you can also get same e.timestamp and do some math on to get your desired out put in second, minutes or anything.
Answer: Like SrinivasR said, finish time - start time.
jQuery('.btn-check-box').click(function () {
    var t0 = (new Date()).getTime();
    //code goes here
    console.log("Event took",(new Date()).getTime() - t0, "ms to complete.");
});

Answer: Try the following for your code
jQuery('.btn-check-box').click(function () {
var secondStart = new Date().getTime() / 1000;
    // Your code goes here .
var secondEnd = new Date().getTime() / 1000;
var totalTime = secondEnd - secondStart;
console.log('Executing took' +totalTime +'seconds' )
});


MATLAB,Signal Processing

Question: Is it possible to convert a PDF to .mat file for processing in MATLAB? I have ECG signal in PDF format.I want to process it in MATLAB
Comment: 1. This question is off-topic. 2. Dig into the PDF and see how the ECG signal is represented in the PDF. There is a slim chance that it is in a vectorized format that can be transformed back into raw data.
Answer: Find a PDF renderer such as Ghostscript, and use it to render the signal into an image. Then use one of the various File Exchange contributions to "digitize" the image. Search for tag:digitize inside the File Exchange.
You might get lucky and all the needed coordinates might happen to appear in sequential text form inside the PDF, but most of the time when they appear at all they tend to appear in some messy order, and it would be common for them not to appear at all in text form.
Answer: In MATLAB, probably no.
I have used a Python module, which one I don't recall, but there are more than you can shake a stick at on PyPi with the obvious 'pdf' as the search, which can analyse, parse, extract etc data from pdf files.
If you know Python, go there. If you don't know Python, it's worth learning at least the basics, for the wealth of tools there are on PyPi.
BTW, once you get to use Python, you'll find that when you add Numpy and MatPlotLib, you get an environment every bit as powerful as MATLAB, but arrays start from 0, and 1D vectors are just that, you don't need to distinguish between row and column vectors unless you want to ;-)
Once you have the data in Python, it's trivial to look up the .mat file format and create the appropriate file, or just make txt or csv and import into MATLAB.
Answer: According to
https://www.researchgate.net/publication/51840764_A_Review_on_Digital_ECG_Formats_and_the_Relationships_Between_Them
ECG has a wide range of possible output formats.
Actually the PDF format is quite new compared to DICOM or XML, that can be readily imported into MATLAB and then generate a .mat file.

MATLAB,Signal Processing


How do you go from the Talmud to Halacha Lemaasah?

Question: What is the process involved for figuring out the halacha of today based on something written in the Talmud?
Basically, what does a modern day posek do starting from the Talmud to reach a halacha he can put in a sefer, such as mishna berurah.
Aside from the arguments within the Talmud, there are also arguments between rishonim and acharonim. That being the case, it's not so clear how to actually arrive at any given halacha lemaaseh.
Comment: While agreeing with all that is mentioned here there is nothing like putting it into practice. One should choose a small self-contained gemoro it doesnt matter where, and try and learn it with all rishonim. The mesivta gemoro is useful for this. Then if on orach chaim follow the mishne berura. Hebrewbooks.org has all the seforim he had (and more). Use them all and then go to the mishne berura. The new MB also includes everyone else as well like the Aruch Hashulchan. If done properly, that would be called real learning. Otherwise it is just 'reading'.
Answer: I'm going to disregard your second paragraph, since a "modern-day" posek (your example was of the Mishna Berurah) doesn't go from the Talmud directly into halakha lema'aseh, but is already familiar with a great wealth of material that both predates the former and spans the two. For regular people, like ourselves, who want to gain a deeper understanding of the relationship between Talmudic dicta and contemporary halakhot, there are ways in which one can do this.
Let's assume that you are commencing with an individual sugya. The chances are that any Shas that you are using is going to have a useful index called Eyn Mishpat, which was compiled by a 16th century scholar named R' Yehoshua Boaz Barukh (known as the "Shiltei haGibborim"). That provides references to passages in the Rambam's Mishne Torah, R' Moshe of Coucy's Sefer Mitzvot Gadol ("SMaG") and R' Yaakov ben Asher's Arba'ah Turim. The latter work employs the same numbering system as R' Yosef Caro's Shulchan Arukh, giving you references to that corpus as well.
How you proceed from there is up to you. Personally, I prefer to use the Arba'ah Turim, since the commentaries of R' Yosef Caro ("Bet Yosef") and R' Moshe Isserles ("Darkhei Moshe") will give you a wealth of information that you can then follow up separately. Furthermore, since it employs the same numbering system as the Shulchan Arukh, you can proceed next to the Arukh haShulchan (by R' Yehiel Michel Epstein, a 19th-20th century scholar) and find references there to an abundance of material published after the 16th century. Similarly, if the material that you are looking at is in Orach Chayim, you can check the Mishna Berurah for the author's Be'ur Halakha, which is similar in scope.
If your interest leans more towards the Rishonim and the earlier period of Acharonim, I would advise checking the Mordekhai and (if what you are looking at is one of the masekhtas in which it appears), the Shittah Mequbetzet. The former was by the students of R' Mordechai ben Hillel (13th c.), and the latter by R' Bezalel Ashkenazi (16th c.). Where the former is a source for a large number of statements by Rishonim not recorded elsewhere, so too is the latter for early generations of Acharonim. Even more easily, you can follow Eyn Mishpat to the Rambam and check the commentaries there (Kesef Mishna, Hagahot Maimoniyot, etc).
Answer: From the Gemara, one would learn the relevant Rishonim, Achronim, Teshuvah literature, and later Halakhic works... there's quite a lot to go through on any given 'sugyah' (Talmudic topic).
Regarding the choice that a posek is faced with when there are differing opinions on the matter, there are a few general rules aptly referred to as 'kelalei hapsak' (general rules of paskening) which are scattered throughout the Gemara and Rishonim (like any halakha) and have been collected by certain Achronim, such as by the Peri Megadim, Knesses Hagedolah, and the Maharit Algazi, and more recently, Rav Ovadia and Rav Yitzchak Yosef (in the introductions to Yalkut Yosef, and in a major three volume work called 'Ein Yitzchak').
These rules are varied and detailed, but some major ones are: following the majority (not necessary a quantitative majority; some 'greater' earlier poskim might outweigh numerous others), following the Shulchan Aruch and Rama, and following well established customs. Different poskim will give different weights to these considerations, for example, Rav Ovadia Yosef gives much stronger weight to the Shulchan Aruch. Of course, there's also the question of what makes the most sense. Rav Moshe Feinstein was wont to argue on earlier poskim becuase he thought he had a better explanation of a Gemara than they did, for example. These 'shikulim' (measuring/weighing) aren't clear cut and different people feel differently about these rules, which is why we follow poskim (as opposed to making our own decisions) in the first place; only someone with the appropriate breadth and depth of knowledge can be assumed to have the proper instincts about when and how to apply these rules.
Answer: The Chacham must first know the "borders" of the halacha to determine what is permitted or forbidden. In cases of doubt, the Chacham may rule according to the clalim; a major one being that in cases of doubt regarding a Torah law, be stringent, while in cases of Rabbinic law, be lenient. These clalim serve as keys to learning the final ruling in most sugyas and were taught by Ravina and Rav Ashi, the redactors of the Talmud Bavli.
To further clarify, the Chacham may learn how the Rishonim understood or learned the final ruling of the Gemara and make his way towards the Acharonim to further strengthen his own conclusion or reject it for that of one of their conclusions, if his da'at accepts it.
The fundamental key in paskening is that the Chacham absolutely believes that the conclusion he is holding is the correct ruling and he is able to explain why in a clear and concise manner, without a doubt. The more he is sure, the stronger he will be.
However, most of us nowadays, don't have the yishuv hada'at or harchavat halev to "stand the Din on it's feet", unfortunately, due to the times after the Second Beit Hamikdash; so we rely on the rulings of the Shulchan Aruch and the poskim that came before us to decide halacha l'ma'aseh, generally. Even so, the Chachamim of each generation have the ability from Shamayim to guide the Jewish people through their times. One who doesn't accept this, without having the proper level of scholarship to disagree on issues of halacha, borders on heresy and apikorsut.
So nowadays, almost no one is moreh halacha from the Talmud alone because it requires a high level of peace and scholarship that is almost unavailable due to the times(with the latter being available, baruch HaShem!); you get to halacha l'ma'aseh by having the simple explanation of the Talmud's conclusions and then referring to the Shulchan Aruch and it's commentators, with the fundamental key of believing that the conclusion you are holding is the true one and fits the case at hand, according to the rules of hora'ah.


SharePoint Extranet Site Without Using FBA

Question: How to create Extranet site on SharePoint 2010 standard edition but without using FBA. Without FBA can we enable the Intranet site as Extranet for external vendor purpose
Comment: what authentication method you want to use for extranet user?
Answer: You have to follow these steps:

extend the web application to extranet zone
Configure the authentication i.e Anonymous
Create the DNS entry
Configure the AAM and IIS bindings and Loadbalancer(if any).
You also need to Configure the SSL if required.


QGIS to Web Categorized Symbol issues

Question: I am exporting my QGIS project with categorized information but for some unknown reasons, the layer only shows when you zoom in to a larger extent and not when you zoom out or zoom to the whole extent. Other non categorized layers works perfectly fine both symbols and text. I am using OpenLayers which I would like to stick to. The categorized symbols works fine with leaflet but I do not want to use reaflet for other reasons-reaflet also give text issues.
Comment: I am using 2.8, & it was the polygon shapefile I had an issue with. I managed to get it to work by filling in columns with no values, the points appears but somehow disappears as you zoom in & out but not that bad. I notice the plugin does not support well exporting data stored in PostGis, you have to export to .shp which works fine.
Comment: Which version of qgis2web are you using, and is your layer points? The most recent version (3.1.1) has a fix for OpenLayers points disappearing.
Answer: I noticed the reason why QGIS to web was not rendering the map was due to unspecified value within the attribute table. As soon as I fixed the attribute and have values in all columns, it works just fine

QGIS to Web Categorized Symbol issues


Monogame [Linux] cannot resize screen

Question: While working on a Monogame project on Linux (Arch to be exact), I found that I could not change the screen height away from the default 800 px, while I could easily, perfectly change the width to whatever I want. Has anyone ever had this issue, and is there a fix for it? I am going to try the solution that @Jon explained in this post, but I doubt it will work since this seems to be a Linux-only problem. I have installed the latest version of OpenTK and built the latest build of Monogame as of a few days ago, and have looked through the source for the Monogame OpenTKGameWindow and GraphicsDevice classes, as well as the GraphicsDeviceManager. I don't see the issue in any of those, but I might be missing something.
Comment: I don't know if you've seen this - https://github.com/mono/MonoGame/issues/628
Comment: I kept reading and now see you've made posts on it. :)
Comment: Yeah, I saw. I also posted my own issue, but no one there could figure out why it was happening. I have a suspicion that the problem is in OpenTK somewhere.
Answer: It seems that my bug report on Github has been responded to. If this is being read before the next official version is released, this fix will most likely contained in the development branch of the repository on Github. All that you have to do is pull down the repo and dependencies from Github and then build Monogame using Protobuild (this requires Mono to be installed to compile the framework). After that, you can link the generated library files to your Monogame project and then it should work fine.
Links to Github:
Issue: https://github.com/mono/MonoGame/issues/3254
Pull Request w/ fix: https://github.com/mono/MonoGame/pull/3315
Answer: I thinks this is the same bug I found when experimenting with MonoGame to decide if I will use C#/MonoGame rather than C++/Various Libraries.
I suggest the following work around: try to change the resolution more than once. The property AllowUserResizing must be set to true before doing the change of resolution. And you must call ApplyChanges(). All of this came from the bug report.
I made a ResolutionChanger class that automates all that. The class has an update() method that should be called each frame. This update method will check the current resolution to see if it is the same as the last requested resolution, if it is not the same, the change is assumed as failed and the class will continue trying to change the resolution until it see that the current resolution is the same as the requested resolution.
Note that I had some success with this approach but I observed that some times the game starts with the default resolution, switch to full screen and back to windowed fixs
 it but I don't remember now if that worked 100% of the time.
I don't know if this will work for you, but you can try.
How to use (in your main game class extending Game):
In the constructor create a ResolutionChanger instance:
public MyGame ()
{
    graphics = new GraphicsDeviceManager (this);
    Content.RootDirectory = "Content";
    this.IsFixedTimeStep = true;
    screen = new VirtualScreen(graphics, Window, 1366, 768);
    resolution = new ResolutionChanger(graphics, Window);
    //(...) More code
}

In the Initialize() method:
protected override void Initialize ()
{
    resolution.DesiredWidth = 1280;
    resolution.DesiredHeight = 720;

    base.Initialize ();
}

In the Update() method:
protected override void Update (GameTime gameTime)
{
    //(...) your code

    // Switch fullscreen with Enter key. Change it if you do not like it
    if (Keyboard.GetState().IsKeyDown(Keys.LeftAlt) && Keyboard.GetState().IsKeyDown(Keys.Enter))
    {
        resolution.FullScreen = !resolution.FullScreen;
    }

    // This will change the back buffer bounds and game window bounds if required
    resolution.Update(false);

    //(...) your code

    base.Update (gameTime);
}

Here is the code for the ResolutionChanger class:
using System;
using System.Collections.Generic;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;

namespace MonoGameTest
{
    public class ResolutionChanger
    {
        private int mDesiredWidth;
        private int mDesiredHeight;
        private bool mFullScreen;
        private Rectangle mLastWindowedBounds;
        private GraphicsDeviceManager mGraphics;
        private GameWindow mWindow;

        public ResolutionChanger (GraphicsDeviceManager graphics, GameWindow window)
        {
            mLastWindowedBounds = window.ClientBounds;
            mDesiredHeight = 640;
            mDesiredWidth = 480;
            mGraphics = graphics;
            mWindow = window;
        }

        public void Update (bool force)
        {
            if (mGraphics.GraphicsDevice.PresentationParameters.BackBufferWidth != mDesiredWidth ||
                mGraphics.GraphicsDevice.PresentationParameters.BackBufferHeight != mDesiredHeight ||
                force)
            {
                bool setUserResizing = mWindow.AllowUserResizing;

                if (!mGraphics.IsFullScreen && !setUserResizing)
                {
                    mWindow.AllowUserResizing = true;
                }

                mLastWindowedBounds = mWindow.ClientBounds;
                mGraphics.PreferredBackBufferWidth = mDesiredWidth;
                mGraphics.PreferredBackBufferHeight = mDesiredHeight;
                mGraphics.ApplyChanges();

                if (!mGraphics.IsFullScreen && !setUserResizing)
                {
                    mWindow.AllowUserResizing = false;
                }

                Console.WriteLine("ResolutionChanger: a change in resolution took place");
            }

            if (mFullScreen != mGraphics.IsFullScreen)
            {
                mGraphics.IsFullScreen = mFullScreen;

                if (!mGraphics.IsFullScreen)
                {
                    mDesiredWidth = mLastWindowedBounds.Width;
                    mDesiredHeight = mLastWindowedBounds.Height;
                    Update(false);

                    //var form = (System.Windows.Forms.Form)System.Windows.Forms.Control.FromHandle(mWindow.Handle);
                    //form.Location = new System.Drawing.Point(mLastWindowedBounds.X, mLastWindowedBounds.Y);
                }

                Console.WriteLine("ResolutionChanger: Full Screen state changed");
            }
        }

        public int DesiredWidth
        {
            get {
                return mDesiredWidth;
            }

            set {
                mDesiredWidth = value;
            }
        }

        public int DesiredHeight
        {
            get {
                return mDesiredHeight;
            }

            set {
                mDesiredHeight = value;
            }
        }

        public bool FullScreen
        {
            get {
                return mFullScreen;
            }

            set {
                mFullScreen = value;
                if (mFullScreen)
                {
                    mDesiredWidth = mGraphics.GraphicsDevice.DisplayMode.Width;
                    mDesiredHeight = mGraphics.GraphicsDevice.DisplayMode.Height;
                }
            }
        }

    }
}

Comment: I'l try to implement this, then get back to you. I'm pretty sure that I tried something similar to this though.

Monogame [Linux] cannot resize screen


Read/Write capability in BCS

Question: Can someone tell me what exactly does "Read/Write Capability" means in Business Connectivity Services for SharePoint 2010?
I read it somewhere that this is a new feature in 2010 which was not present in 2007. But as far as I know, BCS was present in 2007 so I wonder how can BCS work without Read capability at least in 2007 because it doesn't look like a new feature to me.
Answer: In SharePoint 2007 there is a service named as Business Data Catalog which could be used to only read external systems.
However in SharePoint 2010 its re-designed as well as re-named as Business Connectivity Service or just BCS which comes with full read/write capability while interacting with external contents.
Here's an MSDN article for if you want to find out more about there differences.
If you are still confused then provide reference to where you have read that BDC provides read and write capabilities.
Comment: It is mentioned in one of the slide available on Microsoft website. Screenshot http://i.imgur.com/GrSdWYq.jpg
Comment: @FrankMartin I am pretty sure this slide is for SharePoint 2010 not 2007 as its referencing BCS not BDC.
Comment: Yeah I mixed up the BCS part with 2007.

Read/Write capability in BCS


What are the pros and cons to updating iOS with a full install via iTunes versus a delta update via the Settings app?

Question: I can think of a few reasons to do it each way, but I'd like a complete list of them.
Answer: Advantages of full install via iTunes:

Device will be synced and backed up automatically during the update process
If at location without Wi-Fi access (and without an unlimited data plan), won't use up (large?) portion of the monthly quota
Device will be charging during the update

Disadvantages of full install:

Tethered to computer for the duration of the update (unless using Wi-Fi Sync)
Full update could be significantly slower due to the large upgrade file download

Advantages of delta update via Settings:

Convenient - no need to be tethered to a computer while updating
Delta updates are smaller - with potentially shorter total update time

Disadvantages of delta update:

Users might not back up devices if prior to running the delta update - a potential issue if the update fails
Update process might use significant portion of the device's charge on the battery, running risk of corruption if the battery dies during the update
If device isn't at 50% power, the device can't be updated via the update process unless plugged in (per this article):

To install these updates, however, you need to have at least 50
  percent battery life on your device, or have it plugged into a power
  source.

I'm sure this list isn't comprehensive, but it contains most of the issues that I can think of.
Comment: The backup is, to me, the important piece of doing it via iTunes. And, I have a 64 gig iPad with a lot of ripped movies on it so backing everything up, installing the new iOS version, then restoring takes some time. A cable has been a reliable way to do it.
Comment: @Richard, agreed - I always do a backup prior to an update, whether or not I run the full install or the delta. Would hate to reinstall from a very old (or no) backup.
Answer: I agree guys I keep making the mistake with 64Gb Iphone 5 and Ipad Mini. I see the update in the setting and run off and do the update over wifi relying on my back up in the cloud. I forget if it fails the full backup over the air is very laborious, if it even works (especially beta) or it will be very very slow. I too would recommend full back up to your local computer via itunes and then diasble wifi/cellular and do the back up over cable through iTunes. I just need to follow my own advice...


LINQ InsertOnSubmit Required Fields needed for debugging

Question: I've been using the ADO.NET Strogly-Typed DataSet model for about 2 years now for handling CRUD and stored procedure executions. This past year I built my first MVC app and I really enjoyed the ease and flexibility of LINQ. Perhaps the biggest selling point for me was that with LINQ I didn't have to create "Insert" stored procedures that would return the SCOPE_IDENTITY anymore (The auto-generated insert statements in the DataSet model were not capable of this without modification).
Currently, I'm using LINQ with ASP.NET 3.5 WebForms. My inserts are looking like this:
<code>ProductsDataContext dc = new ProductsDataContext();
product p = new product
{
        Title = "New Product",
        Price = 59.99,
        Archived = false
};

dc.products.InsertOnSubmit(p);
dc.SubmitChanges();

int productId = p.Id;
</code>
So, this product example is pretty basic, right, and in the future, I'll probably be adding more fields to the database such as "InStock", "Quantity", etc... The way I understand it, I will need to add those fields to the database table and then delete and re-add the tables to the LINQ to SQL Class design view in order to refresh the DataContext. Does that sound right?
The problem is that any new fields that are non-null are NOT caught by the ASP.NET build processes. For example, if I added a non-null field of "Quantity" to the database, the code above would still build. In the DataSet model, the stored procedure method would accept a certain amount of parameters and would warn me that my Insert would fail if I didn't include a quantity value. The same goes for LINQ stored procedure methods, however, to my knowledge, LINQ doesn't offer a way to auto generate the insert statements and that means I'm back to where I started.
The bottom line is if I used insert statements like the one above and I add a non-null field to my database, it would break my app in about 10-20 places and there would be no way for me to detect it. Is my only option to do a solution-side search for the keyword "products.InsertOnSubmit" and make sure the new field is getting assigned?
Is there a better way?
Thanks!
Answer: Create a NON-Null field, with a default value of whatever. This way the old rows will have a default value you know of, letting you go back and add values to the table.


Change/update the default user profile photo/thumbnail folder location

Question: I'm having a hell of a time tracking where i can change/update the default user profile photo/thumbnail folder location. I keep reading and have tested that you can create a new volume for assets. My interest is is being able to locate and change the default folder location. Any advice?
Answer: In Craft 3 the place that users photos get stored in are proper Asset Volumes, meaning they can be stored in a folder on the local file system, or on S3, Google Cloud, or any other place that a plugin provides a Volume for.
Once you create a Volume for user photos, go to Settings->Users->Settings in the Control Panel and you can choose that Volume under the "User Photo Volume" settings.
Comment: Thanks Brad! Yeah, I got it squared away last night. Such a simple adjustment that I kept overlooking due to other tasks I wanted to complete for my initial base build of Craft 3. Thank you so much for responding! Eddie
Answer: I am only able to speak about Craft 2x, as I am not familiar at all with how Craft 3 handles profile images.
Here is where Craft 2x stores any uploaded profile image:
<code>/craft/storage/userphotos/
</code>
It is kind of a special asset source that isn't accessible like you would find an asset field that you create is. You can render the image, but as far as I know, you are not able to change it's location.
Hope this helps!


Why don't serine and threonine have a 3rd pKa

Question: Serine and threonine both have an extra OH functional group and hence they should be able to dissociate when the pH gets high enough. However multiple amino acid pH charts do not show the 3rd pKa of these 2 amino acids. Why is this so?
Answer: Serine and threonine have extremely high 3rd pKa values
Serine and threonine have a stable OH group, making it unlikely to dissociate except at extremely high pH values. To put things in perspective, physiological pH (the standard pH of the body) is about 7.4. The C-terminus is generally deprotonated at a pH of 1-3, so it's always deprotonated in physiological conditions. The N-terminus is generally deprotonated at basic conditions of 9-11, so it's unlikely to be deprotonated in the body. However, the pkR (side chain pka) for serine is 13, which makes it physiologically irrelevant. Thus, it is not found on amino acid tables together with other pka values.
For more on pKa values of amino acids, see here.
What makes the pKa of serine/threonine so high?
Other amino acids, glutamic acid and aspartic acid specifically, also have side-chain OH groups. These are stabilized by resonance from the carbonyl carbon. When deprotonated, the negative charge spreads out uniformly over both oxygen atoms. The same holds true for the C-terminus of every amino acid. They are stable in anionic form at low pH because of their strong resonance. However, serine and threonine, which have no resonance, don't have stable conjugate anions at low pH and therefore have high pKa values.