Moving swapfile.sys from Linux

Question: I have two operating systems installed (windows 8 & mint) and I am trying to shrink the original windows partition, but there is the swapfile.sys permanent file in the way. So I was wondering, is it possible to log into the Linux side, then access the swapfile.sys and move it when it is not open?
Answer: You can moveswapfile.sys by disabling paging file and then creating a symbolic link at C:\swapfile.sys (assuming C: is your system drive). Whole procedure can be performed in Windows environment.
The following steps will disable swapfile.sys (tested on Windows 8 and Windows 8.1 Preview):

Disable page files on all drives (through Control Panel -> System and Security -> System -> Advanced system setting
-> Advanced -> Performance Options -> Advanced -> Virtual memory).
Restart your computer.
swapfile.sys should be gone now. If it's still present, it may be deleted manually.

Afterwards enter following command in command line (requires administrative privileges):

mklink C:\swapfile.sys "<NEW LOCATION>:\swapfile.sys"

If new location path doesn't contain spaces, quotes can be omitted. Note that in Windows PowerShell (which is promoted in Windows 8.1) mklink command is not accessible. You should call regular command line by typing cmd and then proceed in the same window.
After that you can enable pagefile and newly created swapfile.sys will be located wherever the symbolic link points to. The symbolic link itself occupies minimal possible disk space.
Answer: This is the new pagefile for "Windows Store Apps". I've searched for a way to move it for, but never found a way. You can only stop the creation if you disable the pagefile completely.
Comment: The pagefile has been completely removed and is not imposing on my drive. I am logged in on Linux now, and perusing the Windows partition. If I move/delete the file from this side, will it break Windows?
Comment: When turning off the pagefile and do a reboot, the file should be gone. So I have no idea why you still see it from Linux.
Comment: So its a cache which is supposed to be deleted. So I can delete it, and when I go into Windows, will it mind that the file is missing, and if it creates a new file, will it be in the same location?
Comment: I have no idea if it will be created again. I think so, because the normal pagefile.sys is created again.
Comment: ah cool, i'll have a go later, and i'll let you know if its ok or not incase anyone else has a similar issue
Answer: There is also an undocumented registry value which controls where swapfile.sys is stored:

Registry key: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management
Value name: SwapFile
Type: REG_MULTI_SZ

Its value should be a single string with this format: <path> <min_size> <max_size>. For instance, to move the swapfile to d:\swapfile.sys with a minimum size of 100 MB and a maximum size of 600 MB, you set the entry to d:\swapfile.sys 100 600:
reg add "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management" /v "SwapFile" /t REG_MULTI_SZ /d "d:\swapfile.sys 100 600"

The syntax is the same as for the PagingFiles value in the same registry key which controls the locations and sizes of the pagefile.sys files. In theory, setting 0 for both min and max sizes should let Windows manage the size of swapfile.sys automatically like this is the case for the pagefile.sys files. But this does not seem to work, so you have to set the size manually in the registry value. Using 0 for both sizes actually prevents the file from being created.
By default, the minimum size is set to 256 MB and the maximum size is set to 150% of the total RAM or 10% of the hard drive total space (whichever is the minimum). For small drives, minimum size is set to 16 MB instead and maximum size to the same value if disk size is smaller or equal to 16 GB, or 256 MB if disk size is smaller or equal to 32 GB.
Compared to the mklink method, changing the value in the registry should make it possible to preserve the settings between major Windows (10) updates.

Moving swapfile.sys from Linux


What's the best approach to migrate a CGI to a Framework?

Question: i have a big web application running in perl CGI. It's running ok, it's well written, but as it was done in the past, all the html are defined hardcoded in the CGI calls, so as you could imagine, it's hard to mantain, improve and etc. So now i would like to start to add some templating and integrate with a framework (catalyst or CGI::application). My question is: Somebody here has an experience like that? There is any things that i must pay attention for? I'm aware that with both frameworks i can run native CGI scripts, so it's good because i can run both (CGI native ad "frameworked" code) together without any trauma. Any tips?
Answer: Write tests first (for example with Test::WWW::Mechanize). Then when you change things you always know if something breaks, and what it is that breaks.
Then extract HTML into templates, and commonly used subs into modules. After that it's a piece of cake to switch to a framework.
In general, go step by step so that you always have a working application.
Answer: Extricate the HTML from the processing logic in the CGI script. Identify all code that affects the HTML output, as these are candidates for becoming template variables. Separate that into a HTML file, with the identified parts marked with template variables. Eventually you will be able to refactor the page such that all processing is done at the start of the code and the HTML template just called up at the end of all processing.
Answer: In this kind of situation, rewriting from scratch basically, the old code is useful for A) testing, and B) design details.  Ideally you'd make a set of tests, for all the basic functionality that you want to replicate, or at least tests that parse the final result pages so you can see the new code is returning the same information for the same inputs.
Design details within the code might be useless, depending on how much the framework handles automatically.  If you have a good set of tests, and a straightforward conversion works well, you're done.  If the behavior of the new doesn't match the old, you probably need to dig deeper into the "why?" and that'll probably be something odd looking, that doesn't make sense at first glance.
One thing to remember to do first is, find out if anyone has made something similar in the framework you're using.  You could save yourself a LOT of time and money.
Comment: Rewrite from the scratch is not an option for a system with more than 5k lines. But anyway, thanks for your inputs!
Answer: Here is how I did it using Python instead of Perl, but that should not matter:

Separated out HTML and code into distinct files. I used a template engine for that.
Created functions from the code which rendered a template with a set of parameters.
Organized the functions (which I termed views, inspired by Django) in a sensible way. (Admin views, User views, etc.) The views all follow the same calling convention!
Refactored out the database and request stuff so that the views would only contain view specific code (read: Handling GET, POST requests, etc. but nothing low-level!). Relied heavily on existing libraries for that.

I am here at the moment. :-) The next obvious step is of course:

Write a dispatcher which maps URLs to your views. This will also lead to nicer URLs and nicer 404- and error handling of course.
Answer: One of the assumptions that frameworks make is that the urls map to the code. For example in a framework you'll often see the following:
http://app.com/docs/list
http://app.com/docs/view/123

Usually though the old CGI scripts don't work like that, you're more likely to have something like:
http://app.com/docs.cgi?action=view&id=123

To take advantage of the framework you may well need to change all the urls. Whether you can do this, and how you keep old links working, may well form a large part of your decision.
Also frameworks provide support for some sort of ORM (object relational mapper) which abstracts the database calls and lets you only deal with objects. For Catalyst this is usually DBIx::Class. You should evaluate what the cost of switching to this will be.
You'll probably find that you want to do a complete rewrite, with the old code as a reference platform. This may be much less work than you expect. However start with a few toy sites to get a feel for whichever framework/orm/template you decide to go with.


Bind Tree View Control in ASP.NET 3.5 with Remote PC

Question: I am making a ASP.NET Web Application in 3.5. Is it possible to have a Tree View control that binds with a remote PC (via IP, something like //10.227.124.53/SharePath/Documents) and shows the files and folders?
Answer: To my knowledge that method is not possible.  I am doing the exact same thing. I use a wcf service on the remote machine and call functions to build the tree on demand as the user expands the tree. It works well and you won't have any user permissions issues either what means it will just work.


Is there a Arduino UI library that provides dialog box and button functionality at a minimum?

Question: I have been looking at the Arduino TFT Library and it supports all the bits and pieces for making a simple display, but I am looking for something a little higher level that has primitive dialog box and button capability, and presumably, the ability to layer the display so I can push and pop display elements.  Is there a higher level GUI library for Arduino TFT displays?
Comment: a quick search found this ...https://youtu.be/UEKrithNr1g
Answer: Take a look at this library. Will this do all that you want?
https://github.com/AndreiDegtiarev/AWind
I have not tried it yet but I would like to.
Edit:
I just remembered this https://github.com/ImpulseAdventure/GUIslice
https://github.com/ImpulseAdventure/GUIslice/wiki
A lightweight GUI framework for embedded displays
The library supports creation of multiple pages of buttons, text, images, checkboxes, sliders and other graphics primitives. New UI / widget types can be created easily.
It works with many existing TFT libraries. There also is a drag & drop builder application.  https://github.com/ImpulseAdventure/GUIslice-Builder


German Magazine Client not paying (US Freelance Illustrator)

Question: I've been doing work for a few years for a German Magazine. They have always paid late. Recently I started following up requesting they pay me what they owe me, wiring all late payments (currently over $8K). They are ghosting me. I emailed the publisher, accounting person and art director. What recourse do I have?
Answer: As a US citizen or business you have practically zero ability to forcibly collect from an international client. You would have to use laws local to the client for any collection. And, adhere to any stipulations regarding foreign demands. It's nowhere near as simple as simply filing suit or hiring a collection agency.
You can try some international B2B collection agencies (simply Google that). They typically cost much more than local collection agencies, but that's probably your best shot.
Typical collection recourse offered in one's own country never travels/works across borders. Laws vary from country to country and a German business is not obligated to adhere to US laws regarding collection. The best you could hope for is some German law which you could possibly use to aide collection. For example, the UK has some decent laws regarding collection if you can prove the debt. I do not know if Germany has similar laws. This is where the international B2B collection agencies come it, being familiar with laws in various countries and what can or can't be used for collection.
This is a major reason I always demand payment up front from any international client.


Gauge connections and Lie algebras?

Question: I'm probably missing something obvious, but I've been wondering what the motivation is for requiring the components $A_\mu$ in a local trivialization of a gauge connection on a smooth principal $G$-bundle to lie in $\mathfrak{g}$, the Lie algebra of $G$. I can see that this gives a couple of nice properties; for example, in a local trivialization it ensures that under a gauge transformation $A'_\mu=gA_\mu g^{-1}+g\partial_\mu g$ lies in $\mathfrak{g}$, and that the  curvature form $F=dA+A\wedge A$ lies in $\mathfrak{g}$ (since $\mathfrak{g}$ is closed under the Lie bracket). But is there a more intrinsic or geometric reason that $A_\mu$ must be in $\mathfrak{g}$? Thanks.
Comment: This follows from the definition of a connection on a principal G-bundle.
Comment: Yes, but I guess I'm asking what the reason/motivation is for including it in the definition.
Answer: First, I never liked working with principal bundles; vector bundles seem easier and more natural to me. Second, I never like thinking about abstract principal $G$-bundles. I prefer fixing a representation of $G$ and viewing the principal $G$ bundle as a reduced frame bundle associated with a vector bundle.
So let $E$ be a rank $k$ vector bundle and $F$ the bundle of arbitrary frames in $E$ (this is a principal $GL(k)$-bundle). Then $GL(k)$ acts on the right on $F$. Given a subgroup $G$ in $GL(k)$, let $F_G$ be a subbundle of $F$ such that if $f \in F_G$, then so is $f\cdot g$ for each $g \in G$.
The primary example is $E = T_*M$ and $F_G$ is the bundle of orthonormal bases of the tangent space with respect to a Riemannian metric.
What is the critical property we want a $G$-connection to satisfy? Well, any connection allows you to parallel translate an arbitrary frame $f \in F$ along a curve. We'd like the $G$-connection to be such that if $f \in F_G$, then the parallel translation remains in $F_G$. This leads to the right definition of a $G$-connection.
Comment: Note that we also want $F_G$ to be $G$-equivariant, since rotating a thing (internally) and parallel transporting a thing should commute.  You only get this if $A$ transforms like $g^{-1} A g + g^{-1} dg$ under change of gauge / gluing maps.
Comment: Exactly what I was looking for. Thanks!
Answer: As Mariano points out in his comment, this follows from the definition of a connection on a principle $G$-bundle $\pi: P \to M$.
At every $p \in P$, the kernel of $\pi_* : T_pP \to T_{\pi(p)}M$ defines the vertical subspace of $T_pP$.  Let's call it $V_p$.  It is spanned by the fundamental vector fields of the $G$-action on $P$.  Since this action is free, the fibres are principal homogeneous spaces and hence $V_p$ is isomorphic to the Lie algebra $\mathfrak{g}$.  A connection (à la Ehresmann) is an equivariant choice of horizontal subspace $H_p$ complementary to $V_p$.  Hence it can be defined as the kernel of a 1-form $\theta$ with values in the adjoint representation of $G$ (from equivariance of the horizontal subspace).
The gauge field in your question is then the pullback via a local section of that connection 1-form.  Hence locally it is a 1-form on $M$ with values in the Lie algebra $\mathfrak{g}$.
So the reason the gauge field is $\mathfrak{g}$-valued is the equivariance of the of the connection (in the sense of Ehresmann).
If you then ask why one imposes equivariance, one answer is that it is the natural condition in this context, but perhaps someone else has a more convincing reason.
Comment: I think the connection form $\theta$ does not libe in the bundle of the adjoint representation of $G:$ To see this, note that the vertical bundle $V=\ker d\pi$ I canonically isomorphic to $M\times g.$ A (gerneralized connection is (as you said) an complementary bundle $H\subset TP$ of $V.$ Thus, any complementary bundle is the kernel of the corresponding projection onto $V,$ forgetting about the $M$ part gives you a well-defined 1-form $\theta$ on $P$ with values in $g.$
Answer: I'm not sure about the mathematical origins, but the original physical motivation was Yang and Mills's attempt to deal with the approximate SU(2)-symmetry of nucleons (protons and neutrons). The big step was (as I understand it) when Gell-Mann (and Ne'eman, independently at about the same time) realized that a diagram labeling experimentally observed particles was the weight diagram for SU(3). He made some predictions at a conference:

following the presentation on Strong
  interactions of strange particles by
  G. A. Snow, both Ne'eman and Gell-Mann
  raised their hands to ask for
  permission to speak. The chairman
  called Gell-Mann, who was the more
  eminent physicist of both, and
  Gell-Mann announced that "[...] we
  should look for the last particle
  called, say, Ω-, with S=-3, I=0.
  [Here, I is isospin.] At 1685 MeV it
  would be metastable and should decay
  by weak interaction [...]"

and the rest was the eightfold way.
Of course, principal $G$-bundles and the connections on them had been around for quite some time before (Simons famously pointed this fact out to Yang later on).
Answer: I always find it helpful to think about Cartan geometries first - they are less "abstract" than principal bundles and shed new light on things like Riemannian geometry.
For a nice introduction see
http://www.emis.de/journals/SIGMA/2009/080/sigma09-080.pdf
(look for the hamster on page 4!)
or the following nice book
http://www.amazon.com/Differential-Geometry-Generalization-Erlangen-Mathematics/dp/0387947329

Gauge connections and Lie algebras?


Libreoffice Writer (soffice.bin) uses too much memory

Question: As the title clearly describes, the process of Libreoffice Writer - soffice.bin - uses too much memory (1.22GiB) despite that there is only one document which is open & contains 13 pages. The size of the document is 78.7 KB.
Seems like a memory leak. Are there anyone who face this issue? If so, any workarounds are appreciated.
Here is the proof of this issue:

ps. My OS is Using 14.04.
Answer: The memory that is listed in your table is very likely the virtual memory of the soffice.bin.
If you run top, you can see the virtual memory use (VIRT) and the resident set size (RSS) of system processes. The resident set size is the non-swapped physical memory used by each process, minus a small amount of overhead. So it will give you a decent idea of actual memory usage.
VIRT or VSZ (Virtual Set Size) is the memory size assigned to a process during the initial execution. The Virtual Set Size memory is simply a number of how much memory a process has available for its execution.
If you don't have top installed, you can run:
ps ax -o rss,vsize,command|sort -nr|head -n 10

this will give you the 10 most memory hungry processes. The first column printed is RSS and the second column is VIRT. If soffice.bin is in the list, it's VIRT should match what is in your table.
References:
- http://www.unixlore.net/articles/quick-easy-way-monitor-process-memory-usage.html
- https://serverfault.com/q/48582
- https://linuxconfig.org/ps-output-difference-between-vsz-vs-rss-memory-usage
- man ps


What's the purpose of the celestial bodies?

Question: The purpose of that which is beyond the Earth's atmosphere is what I would like to be expounded. I'm familiar with Genesis chapter 1, (please hold your applause), and the reasons given there. But more specifically I want to know about the purpose (or role in the scheme of creation) of such celestial bodies as planets, asteroids, meteors, and others, like galaxies, black holes, supernovas, et cetera.
Answer: Two points.
First, we must realize, as was pointed out by Rav Saadya Gaon in his Emunos Vedeyos (end of first section), that the question is not as great as it seems at first since there is no toil involved in God creating anything large or small. The size or complexity is no difference to the One of infinite wisdom. There only remains the question that if God did something it must have had a reason. While this is true, you don't have to find a tremendous reason to justify a giant creation, as long as there is some reason.
On to the next point. In Isaiah 40:26 the prophet says, 'Lift high your eyes and see: Who created these? He who sends out their host by count, Who calls them each by name: Because of His great might and vast power, Not one fails to appear.'
We find terms such as צבא השמים (such as Nechemiah 9:6) referring to the starts and planets. This all suggests that their actual purpose is to serve as honor guards of the Creator.
Had the sky been empty, we would look up at night and see plain black. This would make the world feel very small. Now that we have stars all around, this gives us a depth perspective. Now when we look up we see vastness. This can be compared to a vast army marching before and beside a king which is an honor to the king, and brings out his might and dominion.
When Isaiah says 'Who calls them each by name', this can be referring to the fact that no two areas of the sky look alike. There are no repeating patterns. And so, being unique is having their own identity, or name. This as well serves to amplify the feeling of greatness and magnitude of the creation, since rather than just being large it is plenty.
When we managed to venture into space, or send our cameras there, rather than demystifying the wonder, it only deepened. The picture we now see are truly beautiful, revealing systems inside systems.
Answer: I 100% support HaLeiVi's answer. As with everything Hashem does, there is an infinite amount to be said about it and I look forward to other answers too. This answer seeks to bring more to the table in answering this great question.
Firstly, some quick reasons for the stars:

To calculate when the night begins (such as for when Shabbat goes out)
To recognise Him (Yishayahu 40:26)
To influence events
So that He should be praised
To enable free will, as it adds to the plausibility that Hashem does not exist, and the world is an accident, and we are not the centrepiece of His creation (chas veshalom)
An expression of love and compassion from Hashem

I'd like to focus on that last point in this answer:
When Hashem made the moon smaller1, He committed His first "negative" action. This was the start of the concept of "necessary evil". For some reason, suffering and death is necessary. We don't see the good in it, how it connects us to Hashem's Essence, but everything that Hashem does is good and taking us to that great day, so there is a purpose behind these things and we look forward to the day when Hashem raises us up to a point where we can only see the good. Until then, Hashem asks us to bring a korban, on His behalf2,3.
pp. 32 of Heaven Exposed by Rabbi Tzvi Freeman (can read the whole thing here):

"I have another mitzvah for you. It has to do with the new moon. When
it comes to that time, at the beginning of each month, I want you to
bring a sin offering for Me"
"A sin offering for Who?" Moses asked.
"For Me. Because I have diminished the light of the moon. And because
there is suffering and oppression in My world. And darkness."
"But God," Moses asked. "Why don't You just do away with the
suffering?"
"That's your job, Moses...Until then, atone for Me."

Rashi, on Bereshit 1:16 brings the midrash on the purpose of the stars:

ואת הכוכבים. עַל יְדֵי שֶׁמִּעֵט אֶת הַלְּבָנָה הִרְבָּה צְבָאָיהָ לְהָפִיס דַּעְתָּהּ:
and the stars: Because He diminished the moon, He increased its hosts, to appease it. - [from Gen. Rabbah 46:4 and Chullin 60b] i.e.,
The stars serve as the entourage of the moon. When it comes out, they
accompany it, and when it sets, they too set. [Gen. Rabbah ad loc.]

What we see from this, is that Hashem created the stars in an act of compassion and kindness. This whole project He started is a difficult one, that involves a lot of darkness. Hashem does not enjoy or even want us to suffer. It's a "necessary evil", and in an act of appeasement, in order to illuminate the world (literally, and metaphorically), He created galaxies. Whenever we see them, we remember that He hasn't forgotten us, despite all this darkness4:

אָמַר לָהּ הַקָּדוֹשׁ בָּרוּךְ הוּא: בִּתִּי, שְׁנֵים עָשָׂר מַזָּלוֹת
בָּרָאתִי בָּרָקִיעַ, וְעַל כׇּל מַזָּל וּמַזָּל בָּרָאתִי לוֹ
שְׁלֹשִׁים חַיִל, וְעַל כׇּל חַיִל וְחַיִל בָּרָאתִי לוֹ שְׁלֹשִׁים
לִגְיוֹן, וְעַל כׇּל לִגְיוֹן וְלִגְיוֹן בָּרָאתִי לוֹ שְׁלֹשִׁים
רַהֲטוֹן, וְעַל כׇּל רַהֲטוֹן וְרַהֲטוֹן בָּרָאתִי לוֹ שְׁלֹשִׁים
קְרָטוֹן, וְעַל כׇּל קְרָטוֹן וּקְרָטוֹן בָּרָאתִי לוֹ שְׁלֹשִׁים
גַּסְטְרָא, וְעַל כׇּל גַּסְטְרָא וְגַסְטְרָא תָּלִיתִי בּוֹ שְׁלֹשׁ
מֵאוֹת וְשִׁשִּׁים וַחֲמִשָּׁה אַלְפֵי רִבּוֹא כּוֹכָבִים כְּנֶגֶד
יְמוֹת הַחַמָּה. וְכוּלָּן לֹא בָּרָאתִי אֶלָּא בִּשְׁבִילֵךְ, וְאַתְּ
אָמַרְתְּ ״עֲזַבְתַּנִי״ וּ״שְׁכַחְתַּנִי״?!   The Holy One, Blessed
be He, said to Israel: My daughter, I created twelve constellations in
the firmament, and for each and every constellation I have created
thirty armies, and for each and every army I have created thirty
legions [ligyon], and for each and every legion I have created thirty
infantry division leaders [rahaton], and for each and every infantry
division leader I have created thirty military camp leaders [karton],
and for each and every military camp leader I have created thirty
leaders of forts [gastera], and on each and every leader of a fort I
have hung three hundred and sixty-five thousand stars corresponding to
the days of the solar year. And all of them I have created only for
your sake; and you said the Lord has forsaken me and the Lord has
forgotten me?

As we can see, when we claim Hashem has forgotten us, He brings up the stars!
The opposite is also true. We are the stars in Hashem's night sky, so to speak.
May this answer be L'illui Nishmat Ben Chafetz and Boruch Taub z"l of Cleveland.

I once heard a beautiful quote from a Rabbi5: "darkness reveals the beauty of the night". Only when it is dark can we see the stars. When we see them, we see their beauty. As HaLeiVi wrote, the more we discover, the more amazing and beautiful the universe becomes. This is supposed to remind us that Hashem's plan is perfect. It may seem dark, and oppressive, and difficult, but we have to have emuna (ve'emunatecha baleilot) that He knows what He is doing, and the purpose everything serves is not just worth it, but it's the most amazing unfathomable goodness, a true Godly beauty, we can't ever imagine!

1 - https://www.sefaria.org/Chullin.60b.2
2 - See Rashi on Bamidbar 28:15
3 - Likutei Sichot, vol. 30, pp. 8-15. Sicha, Hoshanah Rabbah 5743
4 - https://www.sefaria.org/Berakhot.32b.16
5 - Rabbi Manis Friedman
Answer: One reason for their existence would be to serve as a channel of communication to bring blessings or curses. See that there is a consensus in the scientific community that correlates human events with the influence of the environment, for example the French revolution was only possible due to social disturbances caused by famine which in turn was caused by climate change, particularly a cold wave that harmed other than crops in Europe, the outbreak of the Black Death is also linked to altered weather patterns. So theologically you can understand that these changes caused by these celestial objects like the sun, moon and even the movement of the Earth serve as a mystical channel to bring good or bad things depending on human behavior and nations as a whole, in the Bible we see God more judging nations than individuals themselves.

What’s the purpose of the celestial bodies?


Declarative Workflow : Get User properties

Question: I am using SharePoint 2013. I am reading a row in a SP list based on a field value I need to send to the Manager of that particular item. In the list there is a field as "Manager" which is People type column.
I am using Visual studio to create my declarative workflow (wf is SP 2013). How can I do this using the actions which are available when creating a workflow.
1) I am currently using a "HttpSend" Control where it sends a REST call and gets the value in the item for the 'People' field as:
_api/web/lists/GetByTitle('MyList')/items?$select=Manager&$filter=Id eq '1'

2) Then assign the returned value to a variable using "GetDynamicValueProperties" Control as below
d/results(0)/ManagerId

3) Then I use a "LookupSPUser" control to get user details.(What i really need is the user login name in-order to send a mail)
But the problem is I supply the Id which a got in step 2 as the principal id
I also saw in a article that you can use a REST call to people manager (_api/SP.UserProfiles.PeopleManager/GetMyProperties) but it didn't elaborate on how to get a target users details
Whats the best way to get the Login Name which corresponds to a People field in SP List item ?
Answer: to get Login name use this
_api/Web/currentuser/Title

hope it can help you


finite commutative ring with n elements and its zero divisors

Question: Is there a relation between the number of elements in a commutative ring and its zero-divisors? i mean like in $Z_n$ but in general. That in $Z_n$ the greatest common divisor between n and any zero-divisor is not 1 , is there a general relation for finite commutative rings?
Comment: What do you mean by "each zero divisor divides $n$" in $\mathbb Z_n$? I mean, that's sort of a tru-ism, since $n=0$ in $\mathbb Z_n$, but it is a bit redundant, and misleading. $4$ is a zero divisor in $\mathbb 6$, but $4$ isn't an (integer) divisor of $6$.  The number of zero divisors in $\mathbb Z_n$ is $n-\phi(n)$.
Comment: We do  know that if $n$ is not the power of a prime, then any ring of size $n$ has at least one non-trivial zero-divisor.
Comment: Probably not. For $n=p^k$, where $p$ is prime, the ring $\mathbb Z_n$ has $p^{k-1}$ zero divisors. For $(\mathbb Z_p)^k$ there are $p^k-(p-1)^k$ zero divisors, and in $\mathbb F_{p^k}$ there is only one zero divisor, $0$.
Comment: you are right i edited this part of division and as i wrote i mean the greatest common divisor between n and any zero-divisor is not 1 and i search for a relation like that but in general
Answer: In a finite ring $R$, every element $a$ is either a unit or a zero divisor. To see this, repeatedly take powers of $a$. By the pigeonhole principle, we eventually have $a^k = a^n$ for some exponents $k \neq n \le |R| + 1$, hence
$$a^k(a^{n-k} - 1) = 0.$$
So either $a^{n-k} - 1 = 0$, in which case $a$ is a unit, or not, in which case $a^k$, and hence $a$, is a zero divisor.
So counting the number of zero divisors is equivalent to counting the number of units, which is nicer. Next, every finite ring is the product of its "Sylow subrings" (not actually subrings)
$$R \cong \prod_p R_p$$
where, if $|R| = \prod_p p^{e_p}$, then $|R_p| = p^{e_p}$, and the product runs over all primes. Furthermore, we have
$$R^{\times} \cong \prod_p R_p^{\times}$$
hence
$$|R^{\times}| \cong \prod_p |R_p^{\times}|$$
(this is why it's nicer to count units), so the question reduces to the prime power case. As Thomas Andrews points out in the comments, there are various possibilities here. The maximum possible number of units (and hence the minimum possible number of zero divisors) occurs when
$$R_p \cong \mathbb{F}_{p^{e_p}}$$
is a finite field, with $p^{e_p} - 1$ units and $1$ zero divisor. On the other hand, we might have
$$R_p \cong \mathbb{F}_p^{e_p}$$
with $(p - 1)^{e_p}$ units and $p^{e_p} - (p - 1)^{e_p}$ zero divisors. I'm not sure if this is minimal (unless $p = 2$ where it clearly is).
In any case, we can at least say that if $|R| = \prod_p p^{e_p}$ then $R$ has at least
$$\prod_p p^{e_p} - \prod_p (p^{e_p} - 1)$$
zero divisors (including zero).
Edit: Okay, in fact I can prove that $R_p \cong \mathbb{F}_p^k$ has the fewest possible units for its cardinality. Recall that the Jacobson radical $J(R)$ of an artinian ring has the following properties: first, $R/J(R)$ is semisimple, and second, $1 + rx$ is invertible for every $r \in R, x \in J(R)$. In this case $R_p/J(R_p)$ must therefore be a product of finite fields of characteristic $p$, and since a unit plus an element of the Jacobson radical is still a unit, we have
$$|R_p^{\times}| = |(R_p/J(R_p)^{\times}| |J(R_p)|.$$
A product of finite fields of fixed cardinality has fewer units the more fields there are, and it's always better to decrease the size of $J(R_p)$ and increase the size of $R_p/J(R_p)$, so the product above is minimized when $J(R_p) = 0$ and $R_p$ is a product of as many fields as possible, namely $\mathbb{F}_p^{e_p}$. So, summarizing:

Claim: A finite commutative ring of order $n = \prod p^{e_p}$ has at least
$$\prod_p p^{e_p} - \prod_p (p^{e_p} - 1)$$
and at most
$$\prod_p p^{e_p} - \prod_p (p - 1)^{e_p}$$
zero divisors.
Comment: Actually I think this is true even without the assumption of commutativity. Noncommutativity just means $R_p/J(R_p)$ is now a finite product of matrix rings over finite fields but I don't think this makes a difference to either the lower or upper bounds on the number of units.


Multiple Regression - Significant model but one variable does not significantly predict the behaviour.

Question:
Multiple Regression -
Found a Significant model but one variable does not significantly predict the behaviour, how to explain this ? Also attaching correlation table.

Comment: This is answered at http://stats.stackexchange.com/questions/3549/why-is-it-possible-to-get-significant-f-statistic-p-001-but-non-significant-r, which shows that *none* of the variables need be significant individually.
Answer: The F-statistic tests that at least one variable is significant, which is evident in the t-tests for individual variables listed in the output your provided. It doesn't test whether all variables are significantly different from 0 and have no place in the model.
Other than that in linear regression you are holding other variables equal, so it is entirely possible that a variable will no longer be significant once other variables are taken into account; this has to do with multicollinearity. The correlation coefficients by themselves will not hold other values equal. The regression model is guiding you by telling you that after controlling for other variables, one of them is probably redundant.


Does Ubuntu One require administrator privileges?

Question: Ubuntu One works when I login as administrator, but cannot synchronize if I use the normal account (see also here: Ubuntu One does not sync: firewall settings?). Is that normal?
Answer: The problem has been solved. I copy here the email sent by UbuntuOne-support.
Great! Everything is now working properly with Ubuntu One. Thank you so much
for your help. I'll post your answer to the forum, in case it may help someone
else with the same problem.
Alberto

----Messaggio originale----
  Da: email@example.com
  Data: 02/11/2011 17.39
  A:
  Ogg: [Ubuntu One #7129] Confused
Hi,
  Looks like you have switched users. If you log in to Ubuntu One and sync your
  files, then log into Ubuntu One as a different user on your ocmputer and
  perform a sync without clearing out the old metadata you will get errors.
  To fix this please open a Terminal and run the following commands:
u1sdtool -q
rm -rf ~/.local/share/ubuntuone
u1sdtool -c
Let Ubuntu One run for a bit as it recreates your metadata.
Thanks,
  Duane
Answer: Nope, I don't think so. There is no "administrator" account on Linux, so to say. Only root, but you should never run X11 (the graphical environment) as root. So ... in short: NOPE. It's a simple application, which keeps your stuff synced. It's like Wuala, or Dropbox. Same thing, with Ubuntu colors.
They usually sit in the background, watch out for changes, etc. But that's easily accomplished with user rights. No need for sudo, or anything.
Comment: Thank you for your explanation. However, when I login with the first account created by Ubuntu during the installation (the one I use to update the system) Ubuntu One does its job, when I login with the account I created to do all the rest (navigate, etc.) Ubuntu One does not sync. What might the reason be?
Comment: Some scrip? Some folder or setting won't get created for the other user? I highly suspect one of the mentioned things happen ... please, report this as a bug and we'll see what Canonical says.
Comment: I changed my DNS to Google's, as you suggested here: http://askubuntu.com/questions/57633/ubuntu-one-does-not-sync-firewall-settings/72117#72117  It works fine, but nothing has changed in Ubuntu One. I'll try to report this as a bug.
Comment: Okay, please report back the bug's ID, I'm curious about this one.
Comment: Hi Shiki, the problem was solved by ubuntuone-support: it was a matter of authentication. I tried several times to copy  the answer below (answer your question), but I got an error. I'll try again later: I think someone else might encounter the same problem.


Help with identifying a serif font with slanted e

Question:
So I'm designing an Odia font based on old letterpress types from early 1900s. Matching Latin isnt exactly necessary but would be nice to have. Those old books used a variety of Latin types but I believe this one is keeping well with the classic looks. Another requirement is font should ideally be OFL licensed so I can incorporate it in my font. I have tried several of the identifier sites, but most of them barely match.
Comment: It looks a bit like [Hightower](https://fonts.adobe.com/fonts/hightower) to me, but I think you've made this question unanswerable by requiring a free font. Anyway, if you're designing your own font, what exactly do you need this for?
Comment: I could design matching Latin but the thing is my target audience don't strictly need it and it'll be nice to have but not essential. There's also the case that the Odia books back then used several different Latin fonts, so there's no issue of being 100% faithful to this one. OFL font because my font will have the same license.
Answer: The tilted 'e' suggests this is one of several types from the late nineteenth/early twentieth century influenced by the roman type of Nicolas Jenson in Venice. That was quite a large group, some were lighter in style, some more robust.
Bruce Rogers' Centaur is a typeface in this genre which has an open-source digitization called Museum. It's a lot lighter than this sample which has a pretty dark type color, but it's my closest recommendation. If you responded more to the overall look you might consider Cardo.
Comment: Thanks! I had no idea there was such a good font based on Centaur, it is indeed a bit light but there's no need to be entirely faithful to the original. Cardo has a bit sharp angle unlike my example. Horley old style or Revival 555 fit pretty well but have no OFL alternatives. So it'll either Museum or another one I found, Wollstonecraft Romance (will have to slant its 'e' myself but it fits well otherwise)


Polish transliteration of בֵּית, בֵית, הֵא, פֵּא, פֵא, רֵישׁ

Question: How would you transliterate the letter names בֵּית, בֵית, הֵא, פֵּא, פֵא, רֵישׁ in order to make it as clear as possible to an English speaker that you were using the Polish pronunciation of צירי as [aj] (so not bais, vais, hai, pai, fai, raish or bays, vays, hay, pay, fay, raysh because an English speaker would be more likely to read those with the Lithuanian [ej])?
Comment: No English speaker would be likely to read a transliteration of Hebrew with Lithuanian sounds. The versions with _ai_ would all most likely be pronounced [aɪ] by an English speaker, not [eɪ].
Comment: Maybe as _bice, vice, hy, py, fy, ryshe_ / _rishe_?
Comment: I'd like to be consistent with how I render צירי. I'm also using *y* for consonantal י and *i* for חיריק.
Comment: Then _beys, veys, hey, pey, fey, reysh_. Whats the problem?
Comment: To Yellow Sky: again, that still might look more like [ej] than [aj] to an English speaker. To Janus Bahs Jacquet: by "Lithuanian" I mean "how Lithuanian Jews traditionally pronounce Hebrew." As for *ai*, compare *aisle* vs. *maid*, *main*, *raid*, *rain*, etc.
Answer: The best solution to your problem is probably using IPA.

Polish transliteration of בֵּית, בֵית, הֵא, פֵּא, פֵא, רֵישׁ


Why does the Newton-Raphson method sometimes not converge?

Question: I'm talking about the Newton-Raphson method for finding square roots of matrices:
$$\begin{cases}
    X_{k+1} &= \frac{1}{2}\big(X_k + X_k^{-1}A\big)\\
    X_0 &= A
\end{cases}$$
as a "solution" to the equation $f(X)=X^2-A=O$.
For normal functions $f(x)=x^2-a=0$ it makes sense why sometimes the method does not converge. But I don't know how to intuitively explain or even understand why the matrix-version sometimes diverges.
For example: compared to the Denman-Beavers method, the Newton-Raphson method is pretty bad since it often does not converge.
So how do we explain these divergences?
Answer: One possible way to see what you ask:
Newton's method to solve an equation $$f(u)=0$$ is given by a minimization direction procedure to solve the problem $$\min_u\frac{1}{2}\|f(u)\|^2.$$
You can see this as the initial value problem
$$\tag{1}\frac{du}{dt}=-[Jf(u)]^{-1}u,\quad u(0)=u_0,$$ because this implies that
$$\frac{d}{dt}\left(\frac{1}{2}\|f(u)\|^2\right)=-\|f(u)\|^2\leq 0.$$
If you use Euler method to solve (1) numerically, with step size equal $1$, you find Newton's method
$$\left\{\begin{array}{rll}J{ f}({ u}_j) { w}_j&=&- { f}({ u}_j)\\ { u}_{j+1}&=&{ u}_j+{ w}_j\end{array}\right.$$
Now, if you let $$f(X)=X^2-A,$$ where $A$ and $X$ are matrix, you find that $$J{ f}({ X}_j) { W}_j=X_jW_j+W_jX_j.$$ This is, in general, not iqual to $2X_jW_j$. But it holds if you choose $X_0=A$.
You can find details on matrix derivative seraching for "(\frac{dX^2}{dX})  matrix derivative" on SearchOnMath.
Remark: If you follows a decreasing direction, you can arrive at a local minimum or a saddle point to $\frac{1}{2}\|f(u)\|^2$. And this can explain some non convergence of Newton's method to a desired root of $f(u)=0$.
On the other side, since you are doing the approximation $u_n\approx u(n)$, in which $u(t)$ is given by equation (1). You can have bad approximation, if $u_0$ is far from one root of $f(u)=0$, and "lost" the curve you intend to follows.


Changing the SQL Server Compatibility setting for individual tables/columns, which have retained older settings

Question: Is there a clear and methodological method to change the compatibility mode of a databases individual Tables & Columns?  A 3rd party database was upgraded and migrated to SQL 2005, the SQL Server Compatibility is at the correct setting, but there are tables/columns contained within the new db that have retained old compatibility settings.
Comment: I'm a bit confused by this question, since compatibility level is a database setting. Unless you mean there are columns with different collations (character encodings) that you want to change?
Comment: Can you describe exactly how you've determined that certain tables and columns have old compatibility settings?
Answer: Compatibility levels are set at the database, not at the table or column.
You might be thinking of collations, which are set at the column level.  You can't simply change the collation on those objects - you have to build new objects with the right collations and push the data into them.
You might also be thinking of deprecated datatypes like text, ntext, image, or vardecimal.  You don't have to change those yet, but you'll have to fix them before a future SQL Server version.


when the following improper integral $\int_{-\infty}^\infty \frac{e^{-at}}{1+e^t} \mathrm{d}t$ converges according to $a$?

Question: I need to study the nature of the following integral (diverges or converges) according to $a$ :
$$I_a = \int_{-\infty}^\infty \frac{e^{-at}}{1+e^t} \mathrm{d}t$$
My approach was to dominate the integrand by a Riemann function and deduce $a$ but I couldn't even think of an example, I saw some examples on the website but they were using $u$-substitution, which is not a wise solution I think.
Answer: Let's split this up into a few cases:

Case: $a<-1$. Note that for $a<-1$, the Integral diverges because $$\lim_{x\to\infty}\frac{e^{-ax}}{1+e^x}= \infty$$

Case: -1<a<0.For these values, the integral converges, which is easy to check with the substitution $$u=e^x$$ and the convergence of $$\int\limits_1^{\infty}\frac{1}{x^p}dx\text{ and }\int\limits_0^1\frac{1}{x^p}dx$$ for p>1 and p<1

Case: a>0. Very similar to the 1st case,$$\lim_{x\to -\infty}\frac{e^{-ax}}{1+e^x}=\infty$$and thus the integral diverges

Case: $a=-1$ $$\int\frac{e^x}{1+e^x}dx=\log{(e^x+1)}$$ and thus the integral also diverges for a=-1

Case: $a=0$ $$\int\frac{1}{1+e^x}dx=x-\log{(e^x+1)}$$and this also diverges.

Summary: the integral only converges for $a\in(-1,0)\subset\mathbb{R}$
Comment: it doesn't always mean that, but we can easily find a divergent lower bound. Note that $$\int\limits_0^1\frac{1}{\sqrt{x}}dx$$ converges even though the function goes to $\infty$ at $x\to 0$. Also if f is strictly increasing and positive on $(a,\infty)$ and $\lim_{x\to \infty}f(x)=\infty$, then $$\int_a^{\infty}f(x)dx$$ diverges
Comment: (+1) Does $\lim_{x\to \infty} f(x)=\infty$ means that $\int f$ diverges (I've never used this property before.)
Comment: Thanks it makes sense now !
Answer: We have
$$
\frac{e^{-at}}{1+e^t}=e^{-at}\frac{e^{-t/2}}{e^{-t/2}+e^{t/2}}=\frac{e^{-(a+1/2)t}}{2}\mathrm{sech}(t/2).
$$
Since for $|t|$ large
$$
\mathrm{sech}(t/2)\sim \frac{2}{e^{|t|/2}},
$$
we obtain
$$
\frac{e^{-at}}{1+e^t} \sim \frac{e^{-(a+1/2)t}}{e^{|t|/2}}, \quad \text{for } |t|\text{ large}.
$$
Thus, at $t\to\infty$ this behaves as
$$
\frac{e^{-at}}{1+e^t} \sim e^{-(a+1)t}
$$
which is integrable in $(0,\infty)$ for $-1<a$. Similarly, at $t\to-\infty$ this behaves as
$$
\frac{e^{-at}}{1+e^t} \sim e^{-at}
$$
which is integrable in the interval $(-\infty,0)$ for $a<0$. Therefore
$$
\frac{e^{-at}}{1+e^t}
$$
is integrable in $(-\infty,\infty)$ for $-1<a<0$.


Facing Error in parsing xml file using node js

Question: I have been trying to parse the XML file using 'xml-js'. I was getting an error of invalid XML data. I tried formatting the XML content online, after formatting I was able to parse. So I am trying to format the contents first using 'xml-formatter'. But I am getting the following error. Kindly help me to solve the above problem. Thank you.
<code>    var format = require('xml-formatter');
    var xml = await fs.readFile("Master.xml", "utf8");
    var formattedXml = format(xml);
</code>
Error
<code>Error: Failed to parse XML
at document (D:\project\node_modules\xml-parser-xo\index.js:49:19)
at parse (D:\project\node_modules\xml-parser-xo\index.js:236:12)
at format (D:\project\node_modules\xml-formatter\index.js:141:23)
at D:\projectImportRouter.js:97:28
</code>
Answer: Without seeing the XML (and without a more specific error message) it's impossible to say.
xml-js claims to be "fully XML compliant"; but if you look at its dependencies, it depends on a SAX library that acknowledges restrictions, for example in the area of DTD and entity processing. My guess would be that your XML comes in the area covered by those restrictions, and that your online formatter removed the offending constructs.
The xml-formatter package in turn depends on the xml-parser package which says upfront that it is a "Simple non-compiant XML parser" [sic], without saying what the restrictions are, so relying on it to clean up your XML is optimistic at best.
I'm afraid the standard of compliance of XML parsers in the Javascript world leaves a great deal to be desired. We took a good look around when developing Saxon-JS, and all the products we looked at were deficient.


Show that $F = \{ E \subseteq \mathbb{N}^2: \ E \ \text{is an equivalence relation on} \ \mathbb{N}\}$ is a set with cardinality of the continuum

Question: How can I show that
$$F = \{ E \subseteq \mathbb{N}^2: \ E \ \text{is an equivalence relation on} \ \mathbb{N}\}$$
is a set with cardinality of the continuum? The usual idea is to show $\vert F\rvert \leq \mathfrak{c}$ by showing $F$ is a subset of some well-known set with cardinality of the continuum, and then show $\vert F\rvert \geq \mathfrak{c}$ by finding an injection from some other well-known set with cardinality of the continuum to $F$. In this example, I don't know how to approach either of the inequalities.
Comment: Well, $F$ is subset of the power set of $\mathbb{N}^2$.
Comment: Can you think of an equivalence relation that has a cardinality that shows a potential for the desired result? That might give you a lower bound.
Answer: As noted in the comments, $F$ is a subset of $\mathcal{P}(\mathbb{N})$, and hence its cardinality is at most the continuum. To get a lower bound, consider equivalence relations on $\mathbb{N}$ which have two equivalence classes exactly. We can represent these equivalence classes by infinite binary sequences, with the $i$th term being $1$ if $i$ is in the same class as $1$ and $0$ otherwise. Can you go from here?


How do blocks signal whether it supports segwit for the 95% threshold?

Question: Ideally, I'd also like to see graphs that indicate how close we are to segwit adoption and the number of minimum blocks we are away from actual segwit adoption.
Answer: BIP141 – Deployment says:

This BIP will be deployed by "version bits" BIP9 with the name "segwit" and using bit 1.
For Bitcoin mainnet, the BIP9 starttime will be midnight 15 november 2016 UTC (Epoch timestamp 1479168000) and BIP9 timeout will be midnight 15 november 2017 UTC (Epoch timestamp 1510704000).

As we're currently on the second version of blocks, the version field will be showing 0x20000002 when signaling readiness for segwit and 0x20000000 when not. Readiness for segwit2x would show as 0x20000010 if only signaling bit 4 or 0x20000012 if signaling both bit 1 and bit 4.
BIP 9 requires 95% readiness signaled over one difficulty period (from reset to reset). Once that is achieved, SegWit will be activated on the network after the following difficulty period has passed.
It appears that Coin.Dance will show support in the linked graph, as indicated by the footnote "BIP 141 (voting starts on 2016-11-15)".
Note: In BIP9 signaling readiness only starts with the first difficulty retarget after the starttime. In the case of SegWit this is likely to be around the 19th of November.
Comment: I assume (since I do not see it yet), that the black BIP 141 line will only be visible after the next retarget?
Comment: @JanusTroelsen: Signaling only starts after the retarget, so before then the line will be at 0%. I don't have any information on what coin.dance will do regarding the line. :)
Comment: So the version would be 0x20000002 if showing support and 0x20000000 if not?
Comment: @Alberts: I've updated my answer.


Why is frequency not measured in db in bode's plot?

Question: While drawing bode's graph paper where Y axis is gain given in db while the X axis is frequency given in absolute value but scale used is log. I think the reason for log scale on X axis is to increase frequency range over which plot can be drawn. But can't same advantage be achieved if frequency is represented in db and scale used is linear for both X as well as Y axis.
Comment: The advantage of using dB is that multiplication turns into addition when converting to dB. Multiplying gains of various elements in a system is a common operation. However, multiplying frequencies is not. What is the advantage of converting frequency to dB then?
Comment: @AJN Any musician deals with multiplying frequencies; it's fundamental (heh) to the notion of a scale. However a scale already has a logarithmic base; dB is just less convenient than octave (or semitone)
Comment: You can take the log of frequency and plot it on a linear scale, or plot the absolute frequency on a log scale. Roundabouts and swings, really.
Comment: @BrianDrummond As a musician, composer, producer, and audio engineer, I never multiply frequencies unless I use a pitch shifter like a Digitech Whammy Pedal. But of course I'm constantly considering different types of gain and attenuation for signal levels. From a **musical** point of view, a pitch is a perception of frequency, and music theory is concerned with pitches, not frequencies. Even when using different tunings and temperaments, we think about frequencies a bit, but creating the correct pitch sense often requires generating the "wrong" frequencies.
Answer: Frequency is not a measure of signal amplitude or power hence, talking about "this or that" frequency in decibels makes no sense. If somebody says "increase the frequency by 3 dB"; it is meaningless because it isn't a signal or power quantity. If someone else says "increase the signal by 3 dB", we know that means the power is doubled (or the signal is increased by \$\sqrt2\$). To apply that concept to frequency is pointless and meaningless.
There is nothing intrinsic to "frequency" that makes it relatable to power or root-power (as in voltage, current or other signal levels) hence, to use it so, makes no sense. After all, we use the base 10 logarithm of a power ratio multiplied by ten to convert it to decibels and, we use the log of a voltage ratio multiplied by twenty to produce an answer in dB. Which formula would make sense for frequency?
$$20\cdot \log_{10}(\text{voltage ratio}) = 10\cdot \log_{10}(\text{power ratio})$$
The number "20" is used because volts are squared to make power hence, the logarithm of a squared voltage ratio is multiplied by "20" to make it numerically equivalent decibel power. The base factor of "10" puts power into "deci" units.
Does adding a decibel frequency ratio to another decibel frequency ratio have any actual meaning that is useful? On the other hand, with gain stages you can make a lot of sense of adding the gains in decibels to produce an overall gain value in dB. Does that make sense for frequency; no.
Comment: Describing frequency as a power of ten may not be meaningful, but describing it as a power of two would be.  If log2(f1) is one greater than log2(f2), then they represent pitches that are a musical octave apart.  If there were a prefix that meant (1/12), describing frequencies in units of 1/12 of a musical octave would for some purposes be even more useful.
Comment: That doesn't fit well with the word "deci". If deci were a twelfth then sure, it would fit with a musical semitone but, what would be its usefulness when we already have sharp or flat versions of the letters a to g that inform us of the correct pitch to play. Again, I make the reminder that frequency has no implicit relationship with power or square root of power; that's why we use decibels or bels.
Comment: The existing term "decibel" refers to log10(x)/10.  My point was that it would be useful if there were a term for a log2(x)/12 increase in frequency--perhaps something like ddo for "duodecioctave", though that would represent a curious mix of Latin fractional prefix and Italian musical terminology--not that the term "decibel" would be suitable for such a purpose.
Comment: It's called a semitone. Well that's what I think you refer to @supercat
Comment: [bonking head]Yeah, I guess if one is describing things purely in relative terms that could work, and I suppose as an absolute measure, one could kinda sorta "MIDI note number" to refer to the number of semitones above 8.175Hz.though fractional values would seem a little odd with that phrase.
Answer: We could start using dBHz and see how it feels. My guess is it won't make life any simpler or help understanding.
NOTE however : logarithmic frequency scale is already in use, and has been for a while ... a few millennia of precedence for the octave (base 2 logarithm) will make a decade-based system difficult to sell. Octaves are in reasonably common use in audio electronics thanks to their prior use in music.
Furthermore the "Bel" in decibel refers to loudness and not pitch, so its transfer to power ratios is quite logical, applying it to frequency is less so.
Comment: Agreed, and if you look at almost any Bode plot you can already see that frequency is plotted logarithmically, even if the numbers are unscaled.
Answer:
While drawing bode's graph paper where Y axis is gain given in db while the X axis is frequency given in absolute value but scale used is log.

So we are plotting log response against log frequency.

I think the reason for log scale on X axis is to increase frequency range over which plot can be drawn.

It has that effect, but that's more of a byproduct. The real reason we plot frequency on a log scale is that many things are proportional to the ratios of frequencies, like the upper and lower responses of a bandpass filter, or the stopbands of filters. A straight line on a log-log plot like Bode's means that we have a power ratio between frequency and response, the slope of the line giving us the exponent.

But can't same advantage be achieved if frequency is represented in db and scale used is linear for both X as well as Y axis.

We could theoretically do that, it's trivial in a plotting program to plot in either way, but that's not the way humans think and work. We use the two axes in different ways. We continue to use dBs with the gain response because it's easy to do and makes sense to most people. We think of the edge of the passband as 0.1dB or 1dB down, because we are interested in gain relative to a level. We want to know when the stopband has got down to -40dB. We tend not to use frequency like that.
That's all it is. We continue using these graph conventions because they make sense to the humans that use them, and there's no real reason to change.
It's worth noticing why synthesisers and counters read out in linear units, and signal sources and analysers read level in dBs. These instruments aren't forcing us to use those units. We make the instruments like that because those are the units we find most convenient to use.
Answer: Gain is relative, frequency is absolute. A dB with no reference can refer to a gain because a dB with no reference is relative. Absolute levels require a reference value to have units in dB, examples include dBm, dBu, dBFS, dB-SPL. Since gain is basically dimensionless, it can be measured in dB. But frequency has a dimension - the Hz.
Another way to look at this is why do we measure power, voltage, sound pressure, and other wave "levels" in dB tied to a reference instead of with a simple unit? Well one good reason is if we have any kind of amplifier or attenuator with a dimensionless gain or attenuation factor in dB, we can simply add or subtract the dB of gain or attenuation of the device from the absolute input level to get the absolute output level.
Also note that levels are frequently and easily changed by all sorts of signal processing devices, and frequencies are changed far less often. It could be that using dB of "shift" as a measurement for the action of a frequency shifting device could be useful, but it could also be confusing, since we've essentially standardized that referenced dB means a level or intensity, and dimensionless dB means gain or attenuation. Adding other kinds of dB into the mix without a good reason doesn't seem helpful.
Answer: Measuring frequency in dB would just create confusion.  With amplitude the absolute values are not really important -- it's the relative values that one is concerned with in the vast majority of cases.
On the other hand, with frequency it's rare to be concerned with relative values.  If you are designing an RC filter to control bandwidth, you need the absolute value of the cutoff frequency.  If you are designing an amplifier, you need the absolute lower and upper bandpass numbers, not the relative numbers.
Comment: That's not really true.  Digital filters for example are just about always designed in terms of normalized frequency (relative to FS) and it's  not unheard of elsewhere either as filter types, strategies and shapes are relative in their behavior.
Comment: Note that it's not *amplitude* that plotted in dB in the context of the question, it's ***gain***, which is dimensionless.
Answer: There are ratio-based terms which describe frequency changes by powers of two ("octaves", referring to the fact that the eighth note of common musical scales will have a frequency twice that of the first), or by one twelfth of that ("semitone", referring to the fact that while most musical intervals in a scale are 1/6 of an octave, there are two smaller intervals that are 1/12 octave).  The use of the former term is common when describing some filter or frequency-drop-off characteristics (e.g. 6dB/octave).  The term decibel is used to describe 1/10 of a power-of-ten change in power, or 1/20 of a power-of-ten change in voltage or current.  Depending upon which scaling factor seemed more appropriate for frequency, an octave would either be 3.01dB or 6.02dB, and a semitone would be 0.251dB or 0.502dB.


Which one is appropriate: "I am taking a recurring training" or "I am taking a recurrent training"

Question: I am emailing my supervisor and I want to let her now that I am taking a training that happens every week at the same time (like a series of trainings).
Comment: You are on a weekly training course. You are having a training session every Thursday afternoon.
Answer: It sounds to me like you are having "regular" training. You could also say "weekly training"
Recurring isn't quite the right word. If the training recurs, it sounds like you are being trained on the same thing.  Recurrent training similarly suggests "the same event happening over and over."  A recurrent dream is when you have the same dream repeatedly.
Answer: I would say neither.  The training is the set of classes.  The classes recur; the training doesn't.
You could say "I'm taking a recurring set of classes", or "I'm in a training course that involves a weekly set of classes".


E. coli values for [enzymes], [metabolites] and kinetic rates

Question: In my attempt to create a metabolic model of E. coli, I have found a comprehensive list of metabolic reactions and their stoichiometry. The one I am currently using is E. coli model iJO1366 (more here). What I have not yet found is a comprehensive list of kinetic rate constants associated with these reactions. I also require a data source of concentrations of these enzymes and metabolites at steady state in E. coli. Where can I find information on concentrations and rate constants?
Comment: why do you want to compile this?  Flux analysis is looking pretty useful and does not require all this data.
Comment: I found SABIO: http://sabio.h-its.org/
Answer: I would advise you to use the SMBL for iAF1260 E. Coli with a COBRA toolbox on MATLAB. It has all the constants you are looking for optimized for the steady state and have been extensively tested for simulation of single and multiple genes deletion / mutation. Even if you want to stick with your model you will be able to copy the constants from there.
However depending on what you are doing you might not be satisfied by the whole models, since the they are computationally too complicated to simulate and optimize and lead to computationally unstable results, especially when you try to simulate colony collaborative mechanisms.
Comment: Do you have any literature to support your claim of computational instability?
Comment: This is my personal experience. When you use the COBRA toolbox, you use an external module for linear optimization to get your "objective" function. When I computed the base model from iAF1260 E.Coli, it worked well, just as a system of two bacteria living together. But as soon as you started to perform single or double gene deletion analysis, your objective function maximum started to behave erratically. You could make it bit better with it by using a different external linear optimization module, but still no analysis was possible.
Comment: This work was based on [this paper](http://www.nature.com/msb/journal/v6/n1/full/msb201066.html) and I had an impression that the authors run into pretty much the same limitations: only qualitative analysis is provided with the computational model, whereas they could have gone quantitative with this model and had quantitative experimental results.


Are vacuum fluctuations that produce dark matter correlated to fluctuations that produce baryonic matter?

Question: When cosmic inflation began vacuum energy fluctuations created matter . But were the fluctuations that created dark matter dependent on the fluctuations that created matter ? Is the ratio of dark matter to baryonic matter random for galaxies for which this has been assessed?
Answer: Yes. This question was only settled in the last decade or so, but initial variations in the baryon density and in the dark matter density seem to agree at the percent level. See for example "Baryons still trace dark matter: probing CMB lensing maps for hidden isocurvature".


Magento Facebook Social Integration

Question: I want to integrate Facebook in my magento 2.3 site.
I am referring this doc .https://www.mageplaza.com/kb/how-to-integrate-facebook-with-magento.html
But as mentioned in step 2, i dont find Marketing > Social: Connect to Facebook option.
Can anybody help me with this.
Is there any updated doc?
Answer: Magento Facebook Social Integration has been deprecated. Unfortunately, the Magento Social extension has been removed by Magento.
Magento dev docs stating the removal of Magento Social Integration https://docs.magento.com/m2/ce/user_guide/marketing/social-connect-to-facebook.html.
Magento Social Link module in Marketplace is also returning 404  https://marketplace.magento.com/shopialfb-facebook-module.html.
Please find the git link for the module  https://github.com/Magestore/devops-magento-2.2.2/tree/master/vendor/shopialfb/facebook-module. If you install it manually it won't prove to be useful for you since API service is also not working.
You can look out for any other third-party modules.

https://marketplace.magento.com/ced-facebook-magento2-storefront-integration.html
https://marketplace.magento.com/mexbs-fbshop.html
Comment: do you know any third party module. I tried installing this , but this does not work. https://www.mageplaza.com/magento-2-social-login-extension/
Comment: Please try these two modules demo https://marketplace.magento.com/ced-facebook-magento2-storefront-integration.html
https://marketplace.magento.com/mexbs-fbshop.html
Comment: Is there any free one?Thanks in advance

Magento Facebook Social Integration


Checkbox on Sql Server Reporting Services Report

Question: I'm working on a report in SSRS 2005 that is a questionnaire with yes/no answers.  Trying to get a checkbox on the report.  Have tried using windings for the font and an iif statement to set the character, but that doesn't come out correctly when exporting to PDF.  I'm using local reports, not from a report server.
Answer: The easiest/simplest solution is just to use an embedded image with a expression which sets the source of the image to the checked or not checked version. This will work across export types (except text/csv).
I am assuming however you want this to be non-interactive.
Answer: I'm about to venture down this path, as well (clients that require printed forms look exactly as they always have, basically).  Did you try this suggestion?
Keith, aside from the image solution, what are the options?


2 flat rates based on category

Question: I have a magento shop that will be selling both frozen and non-frozen foods. I'm trying to figure out how to set two straight flat shipping prices. One for each.
As well as this, i need to set it so if orders are over a certain amoutn shippping is free, however i'm aware that this is done through the table shipping settings.
I've looked into different possible modules to help with this, but i can't seem to find anything to fit what i'm looking for. They all seem to relate to weight for the most part instead of category. Does anyone have any ideas or can point me in the right direction to set this up?
Answer: As always with shipping, just have a look whether web shop apps has something. I think "PRODUCT MATRIX" should do what you need. Unfortunately it is not free at all.

2 flat rates based on category


Should I center time variant predictors in repeated measures multilevel models?

Question: I have a multilevel model built coinsidering repeated measures on students.
Students performance may vary depending on study hours and tutoring hours before each exam.
Should I center the predictors around their grand mean (sample mean)?
Should/can I also center the variable representing the time of measurement?
Is it correct to say that if I center all predictors the intercept represents the performance score of a student who has mean values of predictor?
Or does it represent the average performance score of students, when predictors have mean values?
Lastly, is it ok to center both in the case that predictors are continuous and discrete variables?
Answer: You center variables in regression models for interpretive purposes. Your decision to center time varying covariates should depend on the extent to which you care about having the clearest meaning of how a time-varying covariate impacts a measurement occasion. You could argue that you should present the clearest possible model to your readers, but that's really up to you.
How time is reflected in your growth model is important because it can paint a disingenuous picture of what is really going on the an uniformed reader. More importantly, it does drastically impact how you interrupt the results. You should read this article for some guidance.
Good luck.


Need some CCFL transformer help

Question: I was wondering about these transformers. It says it requires a DC input (I think) however don't transformers need an AC input, and if so does that mean I would need to make an oscillator circuit to pulse the DC? Or can I just input AC?
Answer: 5VDC is just a misprint in the catalogue. Lower down it says:

Primary Voltages: 1 x 13V
Secondary Voltages: 1 x 1.34kV

So you should give it 12-13V AC, preferably as a sine wave, and will get just over a kilovolt on the far side. Take care to keep the two secondary outputs well away from one another and well insulated.
Comment: I don't think anyone bothers to drive CCFL light transformers with a sine wave. Square-wave or modified square-wave is much easier, and the CCFL lights don't care about waveform anyways.
Comment: Does it have a noticable effect on EMC or efficiency?
Answer: If you are worried about driving it, this diagram in a Linear technology article shows a connection method - it uses a Coiltronics CTX110092-1 which has the same coil configuration as the type you listed: -

Need some CCFL transformer help


How do I remove a board from an organization in Trello?

Question: I accidentally added one of my private boards to an organization and I wanted to undo that, without deleting the board.
Answer: Try setting your board's visibility to members and then remove the members from that board.
There is no option for removing a board from the organization, hopefully in the next build they might implement this.
Answer: Changing a board's organization is not currently possible, thought it is on the Trello Development board: https://trello.com/card/board/change-a-board-s-organization/4d5ea62fd76aa1136000000c/4ea5e29164967eb145006f32
Answer: A board administrator can now change the organization of a board by doing the following:

Open the "Profile" of the board in question
Click the "change" link in the "Organization" section.
Select the correct organization (or "None") to make it a stand-alone board.


Why was this question about jury nullification deleted by a moderator?

Question: Moderator feetwet has deleted Are jurors ever told about jury nullification in the US? If not, why not?.  This is puzzling.  Why was it deleted?
Comment: I was coming here to ask the same question. My inclination is to repost a slightly modified question along with the latest version of my answer.
Comment: @DavidSiegel indeed, your wasted effort was part of the reason I decided to ask rather than just wonder silently.  But I am also curious, because I cannot think of a reason for the deletion. Nothing in the [relevant help page](https://law.stackexchange.com/help/deleted-questions) seems to apply.
Answer: Oops: That was flagged for review, and for some reason I thought it was an answer.  I just undeleted it.  Thanks for calling it to my attention!
As a question it doesn't merit deletion, although it's pretty close to How can a jury know about jury nullification? which was closed as "too broad" (though I didn't vote on that closure), and as initially written the question might also be closed as primarily opinion-based.


Desktop indexing with KDE

Question: I have just upgraded to KDE 4.13 on Arch Linux and it has brought my system to a screeching halt. I am pretty sure it has something to do with Baloo the new desktop search indexing system. I am not sure I ever use desktop search although I use kontact and the associated programs (e.g., kmail, korganizer, and kaddressbook). What exactly does Baloo do and how does it interact with Nepomuk and Akonadi and KDE PIM/kontact and what would happen if I disable it by blacklisting my home directory?
Comment: I have KDE 4.8. I think you can disable desktop searches in "System Settings". In my system it is "Workspace Appearance and Behavior" -> "Desktop Search". It strikes me as a particularly useless feature. If I want to find a file I'd use locate. As far as I can tell, disabling this has had no effect on my system's usability whatsoever.
Comment: @FaheemMitha in 4.13 it is not that simple. I don't see the benefit, but given the problems it causes some people it seems like there might be a benefit to others. I want to know what those benefits are.
Comment: Sorry, I'm not following. You think desktop search offers some benefit? "given the problems it causes some people it seems like there might be a benefit to others"? Don't follow that at all.
Comment: @FaheemMitha the developers must see some benefit of desktop search/indexing otherwise why are they developing it.
Comment: Daniel, I think you greatly overestimate the good sense of desktop developers. In any case, standard Unix search facilities like locate work just fine.
Answer: Nepomuk is no more, Baloo completely replaces Nepomuk and offers the files indexing features previously offered by Nepomuk.
Baloo also interacts with Akonadi and offers mail indexing and all the other semantic capabilities related to Kontact apps.
The Baloo file-indexing and mail-indexing features are completely indipendent. Disabling the file indexer will not cause the mail indexer to stop. Currently (KDE SC 4.13.0) is not possible to disable the mail-indexing features without recompiling the PIM components and apps.
To disable the file indexer there are currently two methods:

add your home directory into the Baloo blacklist in System settings
add Hidden=True into ~/.kde4/share/autostart/baloo_file.desktop

the baloo_file.desktop file can be copied into your home from /usr/share/autostart/baloo_file.desktop
The first method is more user friendly but it does not always work (a bug exists in the KDE bugtracker about this issue).
In a future version a enable/disable switch will be provided to disable the file indexer in a more intuitive way.
I tried the file-indexer shorty but gave up due to slowdowns and disabled it. On the other hand, I find the email-indexing feature quite useful and not intrusive.

Desktop indexing with KDE


How should I travel to the other regions of Mira?

Question: Several of the early quests have you travel to other areas on planet Mira. Getting to Noctilum and Oblivia is fairly straight forward - they connect to Primordia over land. Sylvalum and Cauldros, on the other hand, are separated from the other areas by a large body of water. I'm still early in the game (have not started chapter 5), but side quests are directing me to Sylvalum and Cauldros. How should I get there?
Answer: You can walk or swim to every region. For example, if you go to the north-most part of Primordia, you can hop in the water and start swimming north.
Answer: Go to the northernmost tip of Primordia then start swimming towards the little peninsula off Sylvalum.
Just remember: do not go straight to the peninsula!
There are very powerful enemies on an island that will kill you if you are not over lv. 20 or higher.
Approach the peninsula from the right, going around the island.


What is the ^= operator?

Question: I just came across an answer here on SO where a code example (in what I thought was java) used an operator I have never seen before: ^=. I searched google and SO and haven't been able to find it anywhere else and when I tried to test it out using java, eclipse went crazy. Maybe it was just a typo in the answer, I'm not sure. What is this operator? Does it have a name? What language is it from or used in?
Answer: It is the C/C++/C#/Java/Javascript/Perl bitwise xor assignment operator.
Answer: This is the C/C++/C#/Java/Javascript/Perl/PHP/Pike bitwise XOR assignment operator.
An XOR (exclusive or) conditional statement evaluates to true if and only if one of the two operands involved is true.
Example:
0 ^ 0 = false
1 ^ 0 = true
0 ^ 1 = true
1 ^ 1 = false //Regular OR would evaluate this as true

In the same way that you can use += -= *= /= etc... this operator can be combined with an equals sign to perform assignment upon completion.
x += 1; //Same as x = x + 1;
t ^= f; //Same as t = t ^ f;

boolean a = false;
boolean b = true;
a ^= b; //a now evaluates to true;

See Java Operators.
Answer: It would depend on the language, but ^ is typically an exclusive-or (example languages: java, c-family); a ^= b is shorthand for a = a^b.
Comment: @csmckelvey Look att http://en.wikipedia.org/wiki/Xor The truth-table: 0 ^ 0 = 0, 0 ^ 1 = 1, 1 ^ 0 = 1, 1 ^ 1 = 0
Answer: take a look here
http://docs.oracle.com/javase/tutorial/java/nutsandbolts/operators.html
 and
 http://docs.oracle.com/javase/tutorial/java/nutsandbolts/op3.html
but it is a  Bitwise Exclusive or with assignment
Answer: In jQuery it means "starting with this"
For example
    id^='my_'
means "id starts with 'my_'"
Comment: Why write an answer about jQuery if the question is about Java? (see tags)
Comment: Yep, the text still ends like "What language is it from or used in?"
Comment: @AurelioDeRosa At the time when this answer was written, there where no tag about java, only `operators`.
Answer: In the php manual it says that ^ is the bitwise XOR operator.
Here's the link

What is the ^= operator?


Benefits of using customer supplied tenant secret in Platform encryption

Question: Shield Platform encryption provides 2 options for tenant secrets.Customer-supplied tenant secret upload(BYOK) and On-demand tenant secret generation. I am looking for advantages of BYOK over on-demand tenant secret generation. To me it seems like both are same. Either you upload a tenant secret to Salesforce or you let Salesforce generate a tenant secret. Does anyone have better ideas?
Comment: For some Financial companies have their own mechanism for hashing and creating keys and they frequently change tenant secrets for security reasons. So, it's up to their own process of regulations.
Comment: @SantanuBoral: As per this Salesforce doc,
https://help.salesforce.com/articleView?id=security_pe_key_admin_creating.htm&language=en_US&type=0

The first para itself mentions that "In either case, you manage your own tenant secret: you can rotate it, archive it, and designate other users to share responsibility for it." Hence it does not matter if tenant secret is generated by a customer or Salesforce, rotation, archiving remains same in both case. So even if salesforce generated tenant secret is used, companies can rotate it as per their policy.
Answer: The main principle behind the platform encryption key management is that a key used for encrypting/decrypting data can only be retrieved at runtime by our application via 3 mandatory pieces:
1/ The tenant secret that is under your control as a customer
2/ The salesforce secret that changes every release
3/ The special servers within our data centers that have the only HSMs that can derive the keys from these 2 secrets
Coming back to your original question, the difference between BYOK and the default is that in case of BYOK, you can use your own random number generator to provide the secret, as opposed to in the default case, we will rely on the random number generators coming with the HSM cards.
As an FYI, and under the usual safe harbor, we're looking at another version of BYOK, where as a customer, you can provide the actual encryption key, instead of only the secrets, giving even more control on the key generation.
Comment: So the only benefit is that the customer controls source of entropy. I will be interested to know the another version of BYOK. To me , a BYOK where your service will call customer's HSM for encryption key as needed gives more benefit and stronger assurance that Salesforce can never have persistent access to the key. What are your thoughts?
Answer: Absolutely, I completely agree with you.
We are expanding our BYOK capabilities in multiple steps
1/ Bring your own entropy, which is what we offer today
2/ Bring your own key
3/ Cahe only key
With 2/, you would be able to provide us the actual AES key we would be using for encrypting/decrypting the data. But your key would still be stored encrypted in our database, the same way that we store your entropy today, and we would use our HSM only for wrapping/unwrapping your key
With 3/, your key will only stay in memory and would never touch any of our system of records. We would keep it in our cache for an amount of time under your control, forcing us to go back to your HSM to fetch it again on a regular basis.
Everything is of course under the usual safe harbor, but as an FYI we are starting working on 2/ and we are in the middle of a 2-releases entire refactor of our caching strategy in preparation for 3/
Comment: This is really nice to hear. And how can i keep updated ? Anyway we can stay connected on this topic?


Photon pumping in Laser

Question: Let's consider a ring laser where the laser must pass through the gain material before it is sent toward a partially reflective surface $\ R=1-T $. The other mirrors are perfect reflectors with $\ R_1=R_2=1 $. Furthermore the output irradiance of the setup is give as $\ I_{out} = I_{sat}(\gamma - \gamma_{th})L$ where $I_{sat}$ is the saturation irradiance,  $\gamma_{th} $ is the threshold gain coefficient, and $\gamma $ is the small-signal gain coefficient. Now I am trying to understand what needs to happen in order to have the scenario when every pump event results in an output photon. That is to say a theoretical one to one correspondence, every photon I put in I will get right back. (Neglect spontaneous emission). Does this happen when $\gamma > \gamma_{th}$ ? or when they are equal?
Comment: So you mean, 100% efficiency? No cavity losses? Then, I guess your gain threshold would be zero, right?
Answer: Well this is a sort of question that goes back and forth. Since stimulated emission really is a quantum optics concept, there is never a practical case with 100% stimulation. The stimulated emission cross section is proportional to the Einstein A-coefficient which is basically a probability of absorption of a photon to achieve population inversion which in turn is required for stimulated emission in the manner of lasers. As @flippiefanus mentioned, this would be a theoretical case where the threshold would be 0 and the pump infinite.

Photon pumping in Laser


Are Muslim-Majority states required to have an Islamic Government?

Question: Are Muslims living in Muslim-majority countries required to turn their countries into Islamic governments with enforced Sharia law? Or are they allowed to have secular governments even in Muslim-majority countries?
Answer: Yes it is obligatory on Muslims to rule according to Islamic laws. This is stated with the Quran:

وأن احكم بينهم بما أنزل الله ولا تتبع أهواءهم
And judge between them by what Allah has revealed and do not follow their inclinations
— Quran 5:49

And there is a stern condemnation about those who do not judge according to Islamic rules, which means that it is obligatory command.

ومن لم يحكم بما أنزل الله فأولئك هم الكافرون
And whoever does not judge by what Allah has revealed - then it is those who are the disbelievers.
— Quran 5:44
Answer: The question seems simple, but there's a few layers to this that need to be unpacked before it can really be answered.
In general, people are judged according to their own actions:

The ruler of the state is obligated to judge according to what Allah has revealed. This has nothing to do with whether the state is Muslim-majority or not; even a Muslim ruler of a secular state would not have any authority to forbid what Allah has permitted or permit what Allah has forbidden.

The citizens of the state are not responsible for the actions of its leader. They are, however, still required to enjoin good and forbid evil, which means that when possible Muslims should warn their leaders when they do judge in ignorance of Allah's laws. The citizens are also still obligated to follow the laws of Islam: If living under an unjust leader prevents them from fulfilling their Islamic obligations they should take actions to remedy that. This doesn't necessarily mean overthrowing the government, it could simply mean practicing one's religion in secret or emigrating to a different country.

Even in a Shariah-based government, non-Muslims are not necessarily bound by the same rules as Muslims. There are multiple schools of thought in Islamic law, with many differences of opinion in interpreting and applying the Shariah, as well as how and when non-Muslims in a Muslim state are permitted to judge and rule according to their own laws.

Allah does not place burdens on anyone beyond what they can bear, and it is hardly in any individual's power to overthrow an entire existing government system and implement their own, and especially not when one is already labouring under said system.
In certain cases it may be considered a communal obligation to remove an unjust ruler who harms their own citizens in order to implement a just system. But a communal obligation requires first a strong cohesive Muslim community, not just a "Muslim majority".
Answer: A Muslim who is in charge of legislation  is not obliged to make Sharia legislation the stately law, which is applied to all people living in the territory.
This practice not to impose Islamic Sharia on all inhabitants is in line with the practice of Muhammad who allowed Jews and Christians to exerce judgement according to Halacha (Sharia on the base of Jewish fiqh)
He is obliged

not to forbid what is obligated
not to impose what is forbidden

This is expected from any Muslim, also in a state where there is no Muslim majority.
Stately law may

not forsee stately prosecution for not fulfilling what is prescribed according to Sharia.
regulate or forbid something that needs regulation in modern society where Sharia has no clear position.

Stately legislation cannot define Sharia. Sharia cannot be changed in a legislation process.
According to Sharia fiqh, Sharia fiqh has to be applied to all Muslim inhabitants. The state needs a process for the appointment of authorities who are in charge of it.
(Position according to Hanafi and Maliki fiqh)
Answer: Bangladesh is a majority muslim country - 90% - and has a secular consitution. This is in part because of a long British rule they have come to believe in the separation of powers in religion and the state. In fact, this seperation is followed education as well with a separate religious madrasah system alongside the 'secular' schooling system.
Nevertheless, there is a close relationship between Islam and the state in Bangladesh.
Comment: This does nothing to answer the question asked. This is "Muslim practice" and doesn't reflect the teaching of Islam.
Comment: @mozibur ullah  Is the practise of 21st century Bangladesh considered an evidence in the principles of Islamic jurisprudence?
Comment: @Medi1Saif: I think examples are useful. Is there a single "islamic" teaching? When I look into there are many, many factions. Mutazillites, the Falsafa, the Asharites to name just a few.
Comment: Yes there is and it is explained by UmH!
Comment: @Medi1Saif: Really, there is no mention of a "state" but of "judgement". This can mean many things.
Comment: @MoziburUllah Ridiculous to mention defunct groups like the Mutazillites.
Comment: @DavirLun: Really, friends of mine tell me when they studied law they began with Roman law. Besides, they were examples of schools of thoughts. They are used even now.