Iterations of Dantzig-Wolfe Decomposition for a Simple Linear Programming problem

Question: This arises from an engineering problem I am working on. Let $\mathbf{c}_i,\mathbf{a}_i,\mathbf{b}_i\in \mathbb{R}^{d}$ be a given set (collection) of vectors where $i\in\{1,\dots,n\}$. Define the polyhedrons (indexed over $i$)
$$
\mathcal{Q}_i\,=\,\{\mathbf{x}_i\in\mathbb{R}^d ~\lvert~ \mathbf{b}_i^T\mathbf{x}_i\leq 0,~\mathbf{e}^T\mathbf{x}_i-1\leq 0,~\mathbf{x}_i\geq 0 \}
$$
where $\mathbf{e}$ is the all-ones vector of appropriate dimension. Now, consider the optimization problem
\begin{align}
\max_{\mathbf{x}_i} ~&\sum_{i=1}^{n}\mathbf{c}_i^T\mathbf{x}_i ~\\
~~&\sum_{i=1}^{n}\mathbf{a}_i^T\mathbf{x}_i~\leq~0 \\
~~&\mathbf{x}_i\in\mathcal{Q}_i~,~~\forall i \in \{1,\dots,n\}
\end{align}
You can see that this can be converted to the standard input form for the Dantzig-Wolfe Decomposition (DWD). However, I am curious to know given the even more specialized structure of this problem, can we specialize the iterations of the DWD?
Comment: Can you say anything more about $c$, $a$, and $b$?  Also, do you mean instead that $x_i\in\mathbb{R}^d$?
Comment: Corrected the dimensionality. $\mathbf{c} _i$ are element wise positive. Can't assume anything more.
Answer: You could specialize Dantzig-Wolfe by solving the subproblems (one per $i$) with an oracle other than LP.  If the constraint $\mathbf{b}_i^\top \mathbf{x}_i \le 0$ weren't there, you could enumerate the resulting $d+1$ extreme points implied by $\mathbf{e}_i^\top \mathbf{x}_i \le 1$.  You can also solve the subproblems in parallel, but I think it will be tough to beat just solving the original problem with a traditional LP algorithm like dual simplex or interior point.  Dantzig-Wolfe is generally much more useful for MILP than for LP.
Comment: Assume that the problem is easily solvable without the coupling constraint. Then, is there a easy way out?
Comment: Without the coupling constraint, the problem decomposes into $n$ disjoint $2$-constraint LPs, which should be easy even without a specialized solver. It is unclear whether it is easy enough to overcome the fact that you have to do this many times in the course of DWD. How big are $n$ and $d$? How long does it take to solve the original problem directly with an LP solver?


ROS2 Humble Executable not found

Question: I am trying to make a turtlesim script in python,
first of all what is difference between "source .../install/setup.bash" ( this works)
and  "source /opt/ros/humble/setup.bash" ( this doesn't work, it shows package not found)
after this when I am running the python script
( I have included Shebang line "#!/usr/bin/env python3")it is showing no executable found, even after execution permission ( chmod +x <script_name>.py)
Comment: In the future, make sure to tell us which Operating System and version you are using. But even without that info, @JRTG 's answer is still the right one.
Answer: I suggest to install according to the official install instructions, and then to follow the tutorials.
They explain how to create a package, source the ROS install and your own package, etc.

ROS2 Humble Executable not found


Leaving Israel to US

Question: I'm a dual national Belgian/Israeli and I'm entering the US with my Belgium passport and ESTA visa, do I need a visa for Israelis to leave Israel, or is showing my Israeli passport enough?
Comment: You will just have to show his ETSA / EU passport at the Checkin counter if you will be asked ( probably ). as for immigration - you must do it with the Israeli passport by law .
Answer: As an Israeli citizen, you don't need a visa to leave Israel. As long as you don't have a "stay of exit" order1 (צו עיכוב יציאה מהארץ) against you, you are free to leave the country.
The only thing is that upon entering or leaving Israel you are required to present your Israeli passport and not a foreign one.
1 - A.K.A. Departure Prohibition Order

Leaving Israel to US


Name of a movie about a witch and two twin girls?

Question: When I was in kindergarten we watched a slightly disturbing movie about an introvert witch and two twin girls about 11. I can't remember much except that the mom constantly told the girls that the witch didn't like company, but they didn't listen and went to the witch's house, but for some reason the parents came with them but were very nervous. And at one part, the girls made a promise to the witch that involved the phrase, "Cross my heart and hope to die, stick a needle in my eye." If it helps, I remember the witch always wore black, and I remember one scene where the two girls were skipping across a bridge but stopped to look at the witch's house.
Comment: Hello, thank you for your question and welcome to the SF & Fantasy Stack Exchange. Could you please elaborate a bit? For instance, when were you in kindergarten? If a correct answer is given, you can accept it as correct by clicking the check mark next to it. Enjoy your stay here!
Answer: Sounds like you're thinking of Double, Double, Toil and Trouble.

This is a screen shot of a quote taken from IMDB - does it match your "Cross my heart and hope to die, stick a needle in my eye"
Outside of that quote, it features twin girls (Mary-Kate and Ashley Olsen), albeit younger than your description (they would have been about 6-7 years old at the time of filming). The witches involved are their Great Aunts Agatha and Sophia, another set of twins. The parents approach Aunt Agatha for a loan, which might account for their nervousness. Sophia has not been seen in years, which could be interpreted as that she was a shut-in, similar to your commentary about being introverted.
Comment: Thank you for your answer, but could you please elaborate a bit? A link is welcomed but we do like our answers to be self-contained, so could you please explain _why_ you think this is the correct answer? What aspects match the question, what points stand out that the OP _didn't_ mention but would recognise immediately if it were the correct answer?


Type-C Male to 2x Type-C Female for mobile

Question: I'm looking for small Type-C Male to 2x Type-C Female cable for smartphone (with the possibility of charging). But I really haven't even seen any. Is there an opportunity to find any, do they exist?
Comment: To help your search: what you are asking for is a "USB Type-C hub with charging pass-through". However, they are very new and complex devices, and I doubt you will find one that looks like a "cable" rather than a box (though improvements in the technology in future years might change that).
Answer: I think what you are looking for is called "USB Type-C splitter".
It seems that those things do exist, they are just not common yet and I'm not sure if you would be able to use both of the ports for data transmission, but at least you should be able to listen to music over type-c headphones and charge at the same time, as per the item description.
https://www.amazon.com/MChoice-Capsule-Modeling-Headphone-Splitter/dp/B07H151Y8X
https://ru.aliexpress.com/item/2-1-C-USB-3-1-AUX/32917688534.html
Comment: Unfortunately it's not what I'm looking for. I don't need 3.5mm audio jack, I need two type c ports.
Comment: Did you even look at those products? Those are what you specified: one Type-C male to 2 **physical** Type-C female, with one used for charging and other for Type-C data connection, technically it is a **cable**, since it doesn't have any active circuitry and is made by routing VCC and data lines to two different Type-C ports. If you are looking for a small Type-C **hub** that can transmit data over both ports you should specify it in your question.


What do Adi Shankara thinks about Bhagavad Gita?

Question: I would like to know what do adi shankar thinks about Gita in general. About its philosophy,  depth and loftiness
Thanks
Comment: You can read his commentary on Bhagavad Gītā.
Comment: Adi Shankara has written most number of commentary that covers very wide range of texts - Bhagavad Gita, Brahma Sutra, Yoga Sutras of Patanjali, tantras, etc.
Answer: Sri Adi Shankara has written a commentary on the Bhagavad Gita. The commentary, along with translation, may be found here.
In his introduction to the commentary on Gita, Shankara states this -

The Lord is in eternal possession of knowledge, Lordliness, executive power, strength, energy and splendour. He has under His control His all-pervasive Maya (Illusive Power) or material Nature, whose essence is the three constituents. 4 Thus, though unborn, immutable, Lord of beings, and, in essence, eternally pure, conscious and free, He appears, by virtue of His Maya, to be embodied and born as man, for ensuring the welfare of the world. Though he has no private end of His own to promote, in order to further the well-being of all living beings, He imparted to Arjuna, submerged in a sea of grief and delusion, the two-fold Vedic law of righteousness; for, when espoused and practised by men rich in excellences, it is bound to flourish. The Vedic Dharma, as it was imparted by the Lord, has been set forth by the omniscient and venerable Vedavyasa in seven hundred verses, celebrated as the Gita.

This science of the Gita is the quintessence of all that goes under the name of the Vedas, but its sense is difficult to grasp. Many have striven to elucidate its words, their imports, and their totality as a reasoned treatise. Men in general, however, have got it as a mass of self-contradictory ideas. Noting this predicament, I shall set forth its contents, briefly explicating the text with due discrimination.

Succinctly, the purpose of the science of the Gita is to set forth the summum bonum, which consists in the total cessation of the transmigratory life and its causes. This is brought about by the law of implementation of Self-knowledge, preceded by the renunciation of all works. Pointing to this sense of the Gita —the law of life which it inculcates—the Lord Himself has declared: "This Dharma is indeed adequate to lead one to the status of Brahman" (MB. Asva. ]6. 2). The same context says: "Neither pursuing Dharma nor Adharma, neither good nor evil" (Ibid. I9. 7); "Whoever is quiescent, firmly seated, silent, not thinking any thought" (Ibid. I9, | ); also, "Knowledge marked by renunciation" (Ibid. 43. 25). In the Gita itself, at the end, Arjuna is bidden: "Giving up all disciplines, seek refuge in Me alone" (I8. 66).

The Vedic law of works, promoting prosperity in the world, and enjoined on the classes and life-stations, promotes the purification of the mind when it is observed with a sense of dedication to God and without expectation of rewards though normally i.e., when-done with desire for fruits, it leads its practitioners to the higher stations of heavenly beings and so forth. It also, indirectly, subserves the attainment of emancipation (when performed without desire for fruits), since such work purifies the mind and the purified mind Becomes fit for practising the discipline of knowledge which, in due course, generates the liberating knowledge itself. Keeping this idea in mind, the Lord declares in BG 5. I0 and II: "The Yogins work without attachment for purifying the mind."

The science of the Gita, thus elucidating especially the two-fold law of the Vedas, is aimed at emancipation; also, it sets forth the ultimate Truth that is synonymous with Vasudeva, the content of Supreme Brahman. Hence it is equipped with a specific goal, relation and content. Since its mastery yields all values of life, I am endeavouring to explicate it.
Answer: Enough to give Bhashya (commentary) by extracting it from Itihasa and linking them with his Upanishad and Brahma Sutras Bhashya and consequently converting it into a Rahasya literate transmitted from Guru to Sishya (student), eliminating the intent to read word to word translations.
Answer: Its importance cannot be overemphasized, even at time of life's end.
In his Bhaja Govidam Shankara recommends among other things  reading the BhagavtGita and reciting VishnusahasraNamams.
geyaM giitaa naama sahasraM
dhyeyaM shriipati ruupamajasram .
neyaM sajjana saNge chittaM
deyaM diinajanaaya cha vittam. .. (27)
O fool !, regularly recite from the Gita, meditate on Vishnu [thro' Vishnu sahasranama] in your heart, and chant His thousand glories. Take delight to be with the noble and the holy. Distribute your wealth in charity to the poor and the needy.


Why did Brihaspati establish Charvaka or materialistic philosophical Sect?

Question: Brihaspati is DevaGuru, the spiritual Guru of the Gods. More so, He is the planet of Spirituality. Brihaspati is the God of all knowledge and intellect. So Brihaspati could bring the philosophical or logical thinking sect. But Baarhaspatya thoughts just disregard Spirituality. How is this possible?
Comment: It is generally accepted that there are two brhaspatis. One is the deva guru and the other is an ordinary mortal who propounded the lokayata theory. This second "brihaspati" is also considered a legend and not an actual person. Some people may have attributed the epithet to this theorist metaphorically.
Comment: @moonstar2001 It is only accepted. What is the truth. Why is there a lot of ambiguity in our Hinduism.
Comment: The truth is that devaguru would not propound carvakism. It only seems ambiguous. And it is a not-so-subtle hint for us to dig deeper.
Comment: @moonstar2001 `It is generally accepted that there are two brhaspatis.` Any sources for this?
Comment: Brihaspati, vashishta, kashyapa etc. are often used as surnames i.e. it can also mean person belonging to that gotra, so not every scripture whose author is brihaspati is the primal brihaspati
Answer: Brihaspati created the Charvaka system to deceive the Asuras.. Here is what the seventh Prapathaka of the Maitrayaniya Upanishads says:

Brihaspati, having become Sukra, brought forth that false knowledge for the safety of Indra and for the destruction of the Asuras. By it they show that good is evil, and that evil is good. They say that we ought to ponder on the (new) law, which upsets the Veda and the other sacred books. Therefore let no one ponder on that false knowledge: it is wrong, it is, as it were, barren. Its reward lasts only as long as the pleasure lasts, as with one who has fallen from his caste. Let that false science not be attempted, for thus it is said:
(1) Widely opposed and divergent are these two, the one known as false knowledge, the other as knowledge. I (Yama) believe Nakiketas to be possessed by a desire of knowledge; even many pleasures do not move thee.
(2) He who knows at the same time both the imperfect (sacrifice, &c.) and the perfect knowledge (of the Self), he crosses death by means of the imperfect, and obtains immortality by means of the perfect knowledge.
(3) Those who are wrapped up in the midst of imperfect knowledge, fancying themselves alone wise and learned, they wander about floundering and deceived, like the blind led by the blind.

This excerpt from the Padma Purana provides more detail, in the course of a dialogue between Shiva and Parvati:

In the age of Swayambhuva (Manu) in olden times there were great demons like Namuchi, who were very powerful, very valorous, very strong and great heroes.  All of them were devoted to Vishnu, were pure, and free from all sins.  They followed the practices (laid down) in the triad of the Vedas.  All gods, being frustrated, led by Indra, and overcome by fear, approached Vishnu and sought his shelter....  [Vishnu told Shiva:] "There will be Brahmanas and great sages who have given themselves away to me.  Approaching them through devotion for me, tell the vicious ones: Kanada, Gautama, Shakti, Upamanyu, Jaimini, Kapila, Durvasa, Mrikandu, Brihaspati, Bhargava and Jamadagnya[.] ... By your power increased in viciousness infused into them they will be vicious in a moment.  There is no doubt about it.... Taking to their doctrine all the ancient demons will be averse to me in a moment." ... O sinless one, having entered through my power, Gautama and other Brahmanas I proclaimed the texts outside the Vedic fold.  Resorting to this doctrine, all the wicked demons became averse to the lord (i.e. Vishnu), and were enveloped in viciousness.... On receiving from me grants of boons, they were haughty with pride of power.  They were very much attached to objects of senses, and were full of lust and anger.  They, void of goodness and powerless, were then defeated by the hosts of gods....
I shall tell you the various texts in a sequence. By merely remembering them even the wise ones would be deluded.  First I myself proclaimed the Shaiva, Pashupata, etc.  Hear about the ones proclaimed by the Brahmanas into whom my power had entered after that: Kanada proclaimed the great Vaisheshika text. Similarly Gautama (proclaimed the doctrine of) Nyaya, and Kapila proclaimed Samkhya. Dhishana (Brihaspati) in the same way (proclaimed)the much censured Charvaka. Vishnu of the form of Buddha proclaimed the false Buddhist doctrine and those of the naked and wearing dark blue garments for the destruction of demons. The doctrine of Maya is a wicked doctrine and said to be pseudo-Buddhist.  I myself, in the form of a Brahmana proclaimed it in Kali (age).
Comment: @Rohit, yeah, Devas are the wicked people and Asuras are the benevolent ones. That must be why God helps Devas vanquish Asuras.
Comment: @Rohit., yeah there is nobody more wicked than Gods, idk why anybody worships them
Comment: @Aks All versions.
Comment: This excerpt which lists various heretical teachings and further on divides puranas and smritis as sattvic vs rajasic vs tamasic is present in all versions of padma purana or only in some versions?
Answer: Actually, No philosophy is Man created;Every philosophy is already inherently present in the nature. It just manifests according to the demand. All philosophies are describing the role of consciousness only. From Prtyabhijnahridyam of the acharya Kshemraja

The positions of the various systems of
  philosophy are only various roles of that (Consciousness
  or Self). Sutra-7

It means every philosophy manifests according to the demand. No philosophy dies nor any philosophy ever born, just appears & disappears according to demand. Demand here means consciousness. Existence of people with particular consciousness is demand in nature actually by which some particular philosophy manifest. Now, to manifest it initially a propagator is needed who is fit to propagate. Brihaspati propagated not because he actually believes the philosophy but because of demand as people with such consciousness were prevailing in that time. So philosophies are just the roles of consciousness.
From the same Shastra,
The positions of the various systems of philosophy are, so to
speak, roles assumed by the Self.

The Carvakas, for instance, maintain that the Self is
identical with the BODY characterised by consciousness.
The followers of Nyaya practically consider BUDDHI to
be the Self in the worldly condition. After liberation, they
consider Self as identical with the void.
The Mimamsakas also practically consider Buddhi to
be the Self inasmuch as they believe the I-CONSCIOUSNESS to be
the Self.
The Buddhists also consider only the functions of BUDDHI
as the Self.
Some Vedantins regard PRANA as the Self.
Some of the Vedantins and the Madhyamikas regard
'NON-BEING' as the fundamental principle.
The followers of Pancaratra believe Vasudeva to be the
highest cause.
The followers of Sankhya practically accept the position
of the Vijnanakalas.
Some Vedantins accept ISVARA as the highest principle.
The Grammarians consider PASYANTI or SADASIVA to be
the highest reality.
The Tantrikas consider the ATMAN as transcending the
universe to be the highest principle.
The Kaulas consider the UNIVERSE as the Atman principle.
The followers of Trika philosophy maintain that the
ATMAN is both immanent and transcendent.
Comment: If every idea is philosophy then what is the truth. Maybe the concept of Brahma is also a mere thought, where in reality, the material world, as we call it, is the real world.
Comment: @AnuragSingh Read the phrase in the block `roles of consciousness` suggest there is consciousness or self otherwise whose roles there would have been? So the concept of Brahman/Consciousness is not a thought. Moreover, ultimate reality can't be played with the words; it transcends everything as it is beyond comprehension.
Comment: Where in the Pratyabhijna Hridayam is that list of 1 to 13?
Comment: @KeshavSrinivasan You may find in Jaidev SIngh's translation in summary.


Are there differences in filament consumption between ABS and PLA

Question: I have been printing the same model once with Verbatim PLA and once with an ABS material from Switzerland. For both I was using two brand new 1 kg spools of filament. I was printing both at the same speed, same additions, same infill percentage, solid layers, solid wall count, etc. Literally everything the same except temperature.
Simplify3D indicated 300 g for each print, however I already realized that all of Simplify3Ds estimates for time and material are - unlike Cura - very poor. However I was still kinda surprised when I checked the two spools after printing. Originally they had the same diameter of material and same depth. After the print the ABS spool looked almost the same as before the print, in terms of diameter it shrank less than 5 mm, however the PLA roll was definitely at least 1/3 empty. The difference was also confirmed by a scale. ABS only consumed like 220 g, while PLA was using a bit over 300 g. ABS surely did not look like more than 20 %, but maybe its inner diameter is larger than the PLA spool.
Since I can order ABS considerably cheaper than PLA I was wondering if this is a common phenomenon. Googling for that leads to a million of pages outlining the differences between ABS and PLA where 999'999 of times it says that ABS is more prone to warping than PLA and the other one is about dimensional accuracy, but I could not find anything about material usage.
Comment: PLA is good for dimensional accuracy when you want things to be rigid, but it breaks easier if you bend it.  ABS and, even better, PETG work if you want objects that bend.  PETG doesn't warp as easily as ABS, but often sticks to the bed too well.
Comment: Volume: no (unless the filament diameters differ). Mass: yes.
Comment: Note that you can specify filament density in the "Other" tab in your profile if your want accurate weight estimates.
Answer: I've never actually printed anything other than PLA, but...
Searching the web for filament density, I found this article , among others, that indicate that PLA is nearly 20 % denser than ABS, on average (1.24 vs 1.04 g/cm3). This indicates that a 1 kg reel of ABS will have 20 % more volume (therefore length) than a 1 kg reel of PLA.
This does not quite explain the difference you see as 300 g vs 220 g is 36 % but maybe your measurement is off or the particular PLA mix you're using is slightly denser.
Comment: True, the volume consumption is the same, but the weight consumption is different.


Is there any tool to convert pdf to ppt/odp slides in Linux/ Ubuntu offline?

Question: I am looking for a tool that converts PDF into PPT files or supports any tweak to import PDF files into LibreOffice-impress, LibreOffice-Draw imports the PDF but that does not do the job. So far I am trying to use a workaround called pdftk+pdfchain to burst the pages of the PDF file into single page PDF files and then converting the single page PDF files into images using ImageMagic and importing them into a PPT slide.
Comment: Possibly related to http://superuser.com/questions/268244/how-to-convert-pdf-to-ppt-or-odp
Comment: as Nick Weinberg suggested, the `gs -dNOPAUSE -dBATCH -dSAFER -dGraphicsAlphaBits=4 -dTextAlphaBits=4 -sDEVICE=jpeg -r300 -sOutputFile='page-%00d.jpg' YOURFILE.pdf` command almost did the job that is to burst and then convert the pages to pictures, then just to import them to Libreoffice Impress, job done :)
Comment: Similar question on different sites: ■ [ms office - Converting PDF to Powerpoint, importing each slide as a singular picture - Ask Different](https://apple.stackexchange.com/q/366417) ■ [libreoffice - Is there any tool to convert pdf to ppt/odp slides in Linux/ Ubuntu offline? - Ask Ubuntu](https://askubuntu.com/q/797836) ■ [microsoft powerpoint - How to convert PDF to PPT or ODP? - Super User](https://superuser.com/q/268244) ■ [conversion - Export beamer slides to powerpoint/openoffice-impress/keynote editable format - TeX - LaTeX Stack Exchange](https://tex.stackexchange.com/q/21986)
Comment: This question is increasingly relevant as the Linux version of MS Teams only allows the sharing of your entire screen, and not a single window...unless you have a set of powerpoint slides, which have special support. Neither of the two answers below provide a fully scripted solution.
Comment: Pavel's gs statement ALMOST worked for me. The sOutputFile clause produced page-1.jpg through page-9.jpg, rather than page-01.jpg, etc.  This means they don't sort. Not sure why. It's pretty clear what we asked for. I'll report it as a GS bug if I can reproduce it a few times.  Meanwhile, this is a good way to learn the 'rename' command.
Comment: This did it:   `rename -v   's/page-([0-9]).jpg/page-0$1.jpg/' page*.jpg`  using the perl based rename that came with Ubuntu 23.04 (and probably both earlier and later)
Answer: Here's my take on it from personal experience.  It's a two-step process - convert the PDF into single jpegs, then import the jpegs into LibreOffice Impress.  It works best if the pages in the PDF are landscape already.
1.)  Make sure the package imagemagick is installed (apt install imagemagick).  Put your source PDF into a directory.  Then in the terminal, navigate to that directory and run:
convert filename.pdf filename.jpg
This will spit out a jpeg of each page in the PDF.  Move the PDF out of the directory to make step 2 easier.
2.)  Open Impress.  Go to Slide menu, Slide Layout -> Blank.  This will remove the "Click to add title" and stuff.  Then go to Insert -> Media -> Photo Album.  Click add.  Navigate to the directory with all your jpegs.  Select all the jpegs (if you removed the PDF from the directory in step 1, just press CTRL + A to select all of them).  Click Open.  The next options depend on what the pages in the original PDF looked like - if they were landscape, you can probably choose Fill Screen, but you'll have to see what works best for your case.
Comment: `convert -density 600 -resize 400% filename.pdf filename.png` worked for me to obtain high quality and good output resolution.
Comment: (For **ImageMagick** version **1.3.20**) If your source PDF is a multi-page document, a good **Step 1** above would be `gs -dNOPAUSE -dBATCH -dSAFER -dGraphicsAlphaBits=4 -dTextAlphaBits=4 -sDEVICE=jpeg -r300 -sOutputFile='page-%00d.jpg' YOURFILE.pdf` (as seen in a comment to the original question).
Answer: Works in LibreOffice ver. 220.127.116.11
Idea gleaned from this post.
Open a new instance of LibreOffice Impress. Hit Ctrl-o (to commence the process of opening a file). In the ensuing Open window, go to the File type drop-down menu and select PDF – Portable Document Format (Impress) (*.pdf). Then, select your PDF file of choice.
Said PDF file should then load into Impress. You can now save the presentation in whatever format is available...but, be sure to check the finished product if saving in a PowerPoint format, as the slides MAY get corrupted along the way.
Comment: With command line: `soffice --infilter=impress_pdf_import --convert-to ppt filetoconvert.pdf` to PPT OR `soffice --infilter=impress_pdf_import --convert-to odp filetoconvert.pdf` to odp format, etc. ([details of some issues with the final output here](https://tex.stackexchange.com/a/633247/262081))
Answer: Yes, there are several ways to convert pdf to ppt: online converting services, OmniFormat (very old software), etc.
Best solution i've used so many times is Able2Extract : http://www.investintech.com/products/desktop/able2extract/convertpdftopowerpoint/. Unfortunately it's proprietary software. You get free trial for like 7 days. But it's the best by far, for both Windows AND linux.


Mongodb - see when a database was dropped

Question: I want to know if there is a way to see when a database was dropped.
Is there an entry in a log file or some other way to see when this occurred
Comment: The answer can also be automatically migrated when we vote to close (migration to DBA is part of the close voting options), at which point a subsequent identical question will be closed as a dupe (or this one will) - cross posting can also lead to down votes, so while it's right to point out that it belongs on DBA, it might not be the best idea to ask the question there also in the interim
Comment: @AdamComerford For the record the key word was "instead". Nice answer BTW despite the broad details. Then again I would expect as much from you to answer covering the aspects. But really trying to keep the questions in the "domain space" where the concepts have changed from StackOverflow as a general "dumping ground". And it really should be the OP who migrates rather than leaving it to voting options when there is a clear position that the question is not really suited to the site. The answer is good. The question is just in the wrong place.
Answer: If the drop command ran slowly, then it will be recorded in the logs (by default >100ms), otherwise the only record of it will be in the oplog (assuming you are running a replica set, even a single node replica set) and that is assuming that it did not occur so far in the past that it has "fallen out" of the oplog (which is a capped collection).
NOTE: Before running queries against your oplog, be aware that any such queries will be table scans, and that running such a query will potentially be slow, especially when run on an active replica set with a large oplog.  If you have a secondary available, you may wish to use that for this type of query rather than add load to your primary.
With that said, let's show an example.  We will call the database "foo", drop it and show how you would search the oplog for evidence of the drop.  From the mongo shell your query would look like this:
use local;
db.oplog.rs.find({ns : "foo.$cmd",  "o" : { "dropDatabase" : 1 }})

And the result, if found, would look like this:
{
        "ts" : Timestamp(1412246712, 1),
        "h" : NumberLong("-6606042550253448275"),
        "v" : 2,
        "op" : "c",
        "ns" : "foo.$cmd",
        "o" : {
                "dropDatabase" : 1
        }
}

After that, the only other place to gather such evidence would be the filesystem, since the files are unlinked/deleted when the DB is dropped.  There are plenty of answers on how to do that (and the potential problems) - I've used this one successfully in the past.
Comment: In Mongo 3.0.x the oplogs look a little different, e.g. `{ "ts" : ... "op" : "c", "ns" : "dbname.$cmd", "o" : { "drop" : "collname" } }` where `dbname` is the database and `collname` is the collection name
Comment: Thanks for the heads up - this highlights the fact that the oplog format is considered internal to MongoDB and can be changed at any time without notice, so any sort of reliance on it is dubious at best. Wiredtiger (or anything besides MMAP) will also change the filesystems semantics (and I admit, I have not investigated how it behaves) so things have changed quite a bit since I wrote this answer.
Answer: If you are using MongoDB Enterprise version 2.6+, auditing will record the dropDatabase audit event in the audit log.


Reopening an incognito tab

Question: I logged in my Facebook account through the incognito tab but accidentally closed it before logging out. The session still remains logged in... Is there another option to log out from this browser without changing my Facebook password?
Comment: Go to Settings > Security. Under *Where Your're Logged in* Section, Select the session you want to end, then click *End Activity*.
Answer: If you closed a tab but still have the incognito-mode window itself opened, you can visit Facebook in another tab of the same window and log out from there.
If you closed all incognito windows, all session information in the browser has been destroyed. (That's kind of the whole point of incognito mode.) It doesn't matter whether you clicked "Log out" or not – it is practically impossible for anyone else to use that session again.
If still in doubt, you can visit Facebook's Settings → Security and remotely destroy a session from that page.

Reopening an incognito tab


Maximum diffraction order on diffraction grating

Question: So, I'm given a certain wavelength $\lambda$ and the grating costant $d$ (distance between slits). I'm asked to find the maximum order of diffraction for this set of data. In general, when light falls upon the grating with angle $\theta_i$ and escapes (I don't know the right word in English, sorry) with an angle $\theta_s$, the total optical path difference is given by
\begin{equation}
\Delta=d(\sin \theta_i+\sin \theta_s)
\end{equation}
which combined with the maximum condition for bright zones $\Delta=m\lambda$ gives
\begin{equation}
d(\sin \theta_i+\sin \theta_s) =m\lambda
\end{equation}
where $m$ is the order of the maximum. So, the problem is very easy to solve when we have normal incidence (where $\theta_i=0$), but I can't manage to solve it in general where the two angles are involved. I have been told by colleagues that the maximum order is indeed $m=d/\lambda$ but I can't understand why. Every opinion is welcome. Thanks in advance for any response.
Comment: A photon has momentum and energy. A diffraction grating imparts specific momentum changes along the surface of the grating. Propagating orders imply that energy and momentum of the outgoing photon are preserved. Balance the two, and you have your answer.
Comment: Never thought of it like that, thanks for the comment!
Answer: As a first observation, there is no maximum order. There is however a maximum propagating order, for which $\sin \theta_s = 1$. Higher orders will not propagate but exponentially decay in the propagation direction.
The maximum propagating order propagates at 90$^{\circ}$ so parallel to the grating. It has $m=d/\lambda$ for perpendicular or $m=2d/\lambda$ for maximally oblique incidence.
Comment: Thanks for the comment. Does it make any physical sense maximally oblique incidence with $\theta_s=90º$? I'm struggling to see that
Comment: It is the theoretical limit.
Comment: I supposed it. Thanks again!
Comment: If you have an optical system with lenses and for example a limited projection screen, then of course you need to use the entry and exit NA of that system. Good luck !


Is it a copyright infringement if I tell the meaning of a name in a book?

Question: I used the name Byron in my book stating it meant strong one. is that copyright infringement?
Comment: What makes you think it could be copyright infringement?
Comment: You may be interested to know that [Byron *actually* means "barn for cows".](https://nameberry.com/babyname/byron)
Answer: Copyright is legal protection of creative works. Facts are not creative works, and as such, they are not subject to copyright. The etymology of the name Byron, the altitude of Kilimanjaro, or the ways in which a strawberry plant reproduces cannot be copyrighted.
Summarizing those facts in a coherent text produces a creative work, and thus the resulting text is subject to copyright. There are also standards in academic writing about giving proper credit to the people who have researched those facts. But the facts themselves are free for anyone to state (unless they're secret or confidential), and the citations that are necessary in academic writing are not customary when making an offhand mention in a work of fiction.
Comment: While a specific term might not be copyright-able, it can still be a trademark. For example, Robert E. Howard died in 1936 and his works are public domain, free of copyright. HOWEVER, "Conan the Barbarian" is a trademark. https://trademarks.justia.com/760/97/conan-the-barbarian-76097984.html - So while you can use the character, you might still get sued by the trademark owner if you use the terms "Conan the Barbarian" in your own works. IANAL, so please hire your own legal counsel instead of trusting random strangers on the internet.
Answer: Names can not be copyrighted. You can use Lord Byron or any Byron in your story. You need to be conscientious about two things:
First names can be Trademarked — and often are for characters in Marvel publications or Disney characters. This isn't a deal-breaker but complicates publication of the piece.
If you use a real person's name and they take offense at your character AND they claim you are libeling them they can sue your publisher.  Again, not a deal-breaker. There are many people named Clark Kent in the world and they don't seem to be suing DC Comics.  It just complicates publication of your piece.
Generally speaking, as the author you should never worry about stuff like this.  It's a distraction from creating your best work.  A publisher that likes your work will rationally assess the situation and work with you to mitigate the risk if they want to publish your work.
Answer: You can't copyright a fact or a name, but if you try to use an actual character from a copyrighted work, that gets more complicated. If you write a story about Harry Potter the British teenage wizard at Hogwarts, you'll have a problem. If you write about Harry Potter the middle-aged accountant in India in 1831, you'll be fine.
If you directly quote another source explaining what a name means without attribution, that's plagiarism. If you paraphrase, there is no issue.
(I'm not getting into parody and other protected use, as I don't think that's what you're asking about)
Comment: Yes, but they cannot be copyrighted.
Comment: Names can be trademarked.


Cold Weather Trees with Buttress Roots?

Question: Are there cold-weather trees with buttress roots which would grow well in the Northeast of the US?
Answer: The Dawn Redwood (Metasequoia glyptostroboides) has buttress roots, and can survive in USDA zones 4-8.
 (image source)
 (image source)
Comment: No others come to mind. Buttress roots seem to be more of a tropical phenomenon, and certainly most descriptions that come up when googling "buttress roots" refer to rainforests and/or the tropics. They seem most necessary in areas with lots of rain, to add new support when the soil washes away.
Comment: Some beech trees have some impressive tangles of roots, although I've never heard them called buttress roots. You could have a look at some images and see if that fills the same aesthetic niche for you.
Comment: Thanks, any others offhand?  Or non-conifers in general?  Also, do you know of any databases to look up things like trees with specific types of roots (buttress/aerial/etc) for specific zones like the north east?
Comment: Maine has a ton of rain, and I'm actually planning on using these in a very large (1-2 acre) marsh filtration system for a pond to give it a deeply wetland-like-without-the-bugs look - though that's definitely the issue I've run into as well while searching - buttress and aerial roots seem mostly confined to warmer/tropical climates - I assume due to the complex topology making them prone to breakage during frosts.

Cold Weather Trees with Buttress Roots?


Changing note order for larger chords (guitar)

Question: So I understand chord inversions, but my question is this,  do the notes have to remain in relative order? with triads there are only 3 possible inversions and because there are only 3 notes you're only shifting which note goes in the base, but what about something like a Cmaj7add9? I understand inverting it like this: d c e g b ect. Ect. but what about if I'm chording on the guitar and the note order is changed completely? Random example: d e b c g. Is that still the same chord? Or do the notes have to follow this "c e g b d" order to remain a Cmaj7Add9?
Answer: Cmaj9 (no need to 'add' 9, it's a natural order) has the notes C E G B D. When played using this order, it sounds at its best. Root at the bottom, extensions spreading out uniformly, every note a third away from its next door neighbour.
Even keeping to root version, there are 24 voicings available. Changing the root note allows 120, if my sums work.And that's in close position, Some of these sound good, some awful, due to neighbouring notes not getting on well. Try (on piano, it's pretty well impossible on guitar) playing the chord as B C D E G . The interaction between the lowest 4 notes doesn't do it any favours.That's in close position. In open position, most inversions will sound acceptable, but that's a non-starter on a guitar.
But, yes, those notes, played simultaneously, will always constitute Cmaj9. You specify guitar, which throws up another problem. In order to play all of those notes, they must fall under the span of your fretting hand. Many of the voicings are impossible to fret, and there aren't many compromises. There's also one string which could double one of the notes, or be muted, as happens a lot with more complex chords.
So, in summary, the version which grew from C in thirds is probably (possibly?) the most convincing, but any inversion is still Cmaj9. But, a lot of them won't sound so good, and most of them won't be playable on guitar.
Comment: "When played using this order, it sounds at its best". does it??
Comment: @coconochao - I expected some comment ! That's most likely the form in which most players might meet it for the first time - especially on piano (not guitar), and it works well as such. Any other order, close voiced, will put notes a tone apart next to each other, which isn't the best.
Comment: That B-C-D-E-G reminds me of playing F9 as E♭-F-G-A, which is just 3 major seconds!
Answer: There are 6 voicings of the triads, 2 of each inversion.  For example (1, 3, 5) is the root inversion but you can also have (1, 5, 3).  Similarly for the others.  They are the same chord but each voicing has a unique character and in my opinion can be though of as different from a harmonic perspective.  Choice of inversion is somewhat driven by the other chords in a progression and how they harmonize a melody as they may have a "strong tendency" to lead to a voicing of another chord in the same key.  Like moving from V7 to I.  They all have that classic dim 5 resolving to a maj 3 but some combinations of chord voicing will sound stronger than others.
As for seventh chords and beyond, yes you can have inversions.  In fact there are 4 inversions of the dom 7 chord and they are described in any music theory text.  The 3rd inversion has the 7th in the bass.  To your other question, yes.  Any reordering of the notes represents the same chord.  Not all ordering will sound nice but they all represent the same chord.  On the guitar we frequently pick whatever ordering we can play.
Answer: First things first: The chord name will always be influenced by the context it is played in. There are plenty of examples of this, like diminished 7th chords and their 4 possible roots, but I think that the question here is actually more "is this still a valid voicing of the chord".
Secondly, I'd call that chord you listed Cmaj9, and most musicians agree with me, because the "add" is required only when there's a break in the order of extensions (Cmaj9 implies that the 7th is also present, and what's more, major). We don't call C-E-G-B♭ "C add dominant 7th" because it's redundant.
To get to the point, the order of the notes does not matter. Any combination of C, E, G, B, and D can be a Cmaj9 should you so desire. However, there's a subtle difference between inversions in that they contain different intervals and therefore a different feel. B-C-D-E-G is a valid voicing of the chord, for example, but it sounds way different than C-G-D-B-E. And it's not only about the distance, either. Try B-G-C-D-E and you'll see what I mean.
Related: How does one invert chords with a range larger than an octave? Is the 1st inversion of G9 B-D-F-G-A? Often times, the inversions of chords are quoted as "take the bottom note and move it up an octave". However, this falls apart with 9th chords. I think it's better to think about inversions of chords in this way: "Start at the bottom of a chord, then move every note upwards to the next highest chord tone". This works with guitar chords especially well too, as one can preserve the general sound of each set of inversions. In this way, G9's 1st inversion is actually A-D-F-G-B, preserving that major 9th interval!
Comment: Which is alright, except that the purpose of G9 is to have the 7th (F) and 9th (A) *of* the root chord G sounding. Not any other 9th interval !
Comment: My intent is that the interval of the 9th between the A and the G is the same as the 2nd in terms of function, but I wanted to keep that "larger-than-an-octave" sound of the voicing. When I referred to the major 9th interval, I meant as the range of the chord.


Ethernet cable link negotiation

Question: I just bought a SoC computer with 4 eth ports which I plan to convert into a router with Linux. I connected a CAT5 cable to both one of the eths and to my notebook, but I don't seen link on either side. My faulty memory (I'm talking about the brain here) seems to remember that NB were good at negotiating transmission including whether to use the cable straight or crossover. Is this close to reality? Can I force the NB's eth port to use it as crossover? or should I buy a crossover cable?
Comment: Have you actually configured the interfaces from linux? You need to set the interface link up before anything will happen on the network... In short you need to expand your question with a lot more info (output of `ip a`, for example, and relevant `dmesg` output)
Answer: Just about any device built in the last decade should support Auto MDI-X. If you don't have a link, I would suspect the cable first (maybe try to connect to a switch to see if you have a connection there).
Anyway, you can force MDI-X with ethtool. From the manpage:
      mdix auto|on|off
              Selects MDI-X mode for port. May be used to override the
              automatic detection feature of most adapters. An argument
              of auto means automatic detection of MDI status, on forces
              MDI-X (crossover) mode, while off means MDI (straight
              through) mode.  The driver should guarantee that this
              command takes effect immediately, and if necessary may
              reset the link to cause the change to take effect.

Answer: Answering myself, as I just found the issue: it was just a matter of running ip link <dev> up. I would feel stupid for forgetting this, but I really didn't know one has control at that level, and that if you didn't configure the interface, it doesn't try to establish link.

Ethernet cable link negotiation


Modal particles in Academic writing

Question: I've learned that modal particles (doch, schon, ja, ...) usually have little meaning in terms of adding detail and information to a sentence. They tend to make sentences more lengthy without adding much (besides impact and emphasis). If so, would it be better to avoid using them in Academic writing?
Comment: They have a hell of a meaning. Consider *Das kannst du machen.* vs *Das kannst du **ja mal** machen.* vs. *Das kannst du **doch wohl mal** machen.* (Additional particles are still possible.) The first one has no mood, the second one is a friendly suggestion and the latter is a huffish demand.
Comment: While they do have such meaning, those are mostly for emphasis and your examples seem to be expressing something personal (emotional, mood, attitude, etc) rather than factual.
Comment: What I wanted to show is sometimes all the meaning of a sentence is in the particles.
Comment: What's worse, @Jankas second example can also imply a threat, as in »Das kannst Du ja mal machen (... und sehen welche schlimmen Konsequenzen das hat!)«.
Answer: It would indeed be better to avoid them in Academic writing, since it requires a different style of writing. It's supposed to be concise, impersonal and factual. Sentences should be as short, clear and to the point as possible.
Imagine a professor reading your final assignment. They also have many other things to do (among them maybe reading others' final assignments) and write a report about it. In order to assess it, they want a clear text containing the facts of your research or other project.
From wikipedia

They are used to indicate how the speaker thinks that the content of the sentence relates to the participants' common knowledge or add mood to the meaning of the sentence.

and the German article adds

Sie dienen unter anderem dazu, die Einstellung eines Sprechers hinsichtlich der Satzaussage auszudrücken oder sie zu beurteilen.

In summary, they are not only an irrelevant addition, they are actually detrimental. The focus of your work is your work, not you and your opinion or feelings you want the reader to share. The place to add your assessment, but still in the formally correct form, is the Diskussion - but not before, so other's can form their own assessment without your guiding influence. There is no place to create a mood (you are not writing a novel). It's about facts, whether you uncovered them through research or created them (e. g. some project, maybe a program or a robot or whatever).
Avoid them as good as you can. If you feel you have to use them, take the time to reflect upon what you are trying to express and if you are maybe not in heading into a wrong direction. Then, change the approach. Reformulate it, because you can do without them, and without them, you are on the safe side.

Regarding the Diskussion, it's also still supposed to be impersonal. It's not a place to discuss how you feel about it, or the like.
Comment: +1, but modal particles aren't about feelings one has but about feelings the reader should share.

Modal particles in Academic writing


can a machine generate truly random numbers?

Question: I know that for most programs pseudo-random numbers are sufficient, but there are ways that machines can generate truly random numbers! There are devices that generate unpredictable processes. However, they tend to be biased somehow. So, is it possible to make devices that can generate unpredictable processes and also unbiased (truly random)? (Please note that I am not asking whether true randomness can be achieved by composing PRNG)
Comment: Does this answer your question? [Achieving Randomness](https://cs.stackexchange.com/questions/67766/achieving-randomness)
Comment: Duplicate of: https://cs.stackexchange.com/questions/67766/achieving-randomness https://cs.stackexchange.com/questions/13893/how-do-computers-create-randomness
Comment: The answer, by the way, is a qualified "yes", if you start with a truly stochastic process (e.g. atomic decay).
Comment: @Pseudonym I do not think this is strictly a duplicate since the other question concerns composing PRNGs while this question asks a broader question of whether true randomness is mechanically possible at all.
Answer: What is true randomness, and is it necessary? Algorithms cannot distinguish truly random bits from pseudorandom bits (by definition!), and so in practice we are only interested in generating strongly pseudorandom bits. As indicated above, true randomness ensures that even if we run the same algorithm twice, we get different results.
True randomness is required only in highly classified cryptographic applications, such as one-time pads, used for strategic communication. Although pseudorandom bits are still enough, now the bar is a lot higher, due to the importance of the data being encoded. Nevertheless, by crunching more pseudorandom and truly random (but biased and correlated) bits together, we can create highly secure one-time pads.
High-quality randomness is generated by combining physical noise and "bit crushers"; stated differently, by injecting "true" randomness into a pseudorandom number generator.
The idea is to start with a high-quality pseudorandom generator, and stick a "pipe" of low-quality true noise into it. The low-quality true noise is truly random, but not iid: it could be highly biased, there could be significant correlations, and so on. By combining it with a good "bit cruncher", the resulting stream of random bits combines the advantages of both sources: it is more unpredictable than the already highly unpredictable pseudorandom generator, and it does not suffer from the bias and correlations of the actual physical source of noise.
Is this "true randomness"? No. But computers won't be able to distinguish the difference. This is already true for high-quality pseudorandom generators, so what did we gain? Two things. First, we may think that the pseudorandom generator is strong, but perhaps it's weak; by injecting true randomness, we strengthen it. Second, even a high-quality stream of pseudorandom bits can be predicted if you know the initial seed. For this reason, when reproducibility is not required, pseudorandom generators are initialized with a seed produced from actual (although low-quality) physical randomness.
The pseudorandom generator used in Unix systems employs this methodology. It keeps an "entropy pool" — a source of true, low-quality randomness — and mixes it into a pseudorandom generator. In practice, it works quite well, although it's not completely bullet-proof. Using a dedicated physical random noise generator would result in a much enhanced stream of random bits which should be difficult to attack.


Who's wins this pot?

Question: To make a long hand short, 2 players are all in heads up,river comes Players 1 tables there cards and announces 2 pair, player 2 announce "he's out" and tables his cards face up, a player not in the hand notices players 2 had a straight and corrected him. Who should have taken the pot?
Answer: The rule in most casinos is "cards speak". If a hand is properly tabled face-up, anyone--dealer, floor, spectators--can and should assist in awarding the pot to the best hand shown.
Answer: If player two tabled cards that didn't touch the muck they have won. I'm going to go ahead and say this is a home game as a casino/card club game with a dealer it's the dealer's responsibility to determine the winning hand and award the pot.
Cards talk. When players are all-in they cannot fold. Again cards talk. They can muck their cards facedown in an all-in situation if they wish to, however once cards are tabled it doesn't matter what the player says. So yes player 2 has the best hand, player 2 is all-in so it doesn't matter he says he is out as he has tabled his cards. Player 2 wins.

Who’s wins this pot?


What Are The Implications of Dropping Windows 98 Support?

Question: Up to now in my application, I've been supporting all flavors of Windows from Windows 98 to Windows NT/2000 to XP to Vista.
But because of adding Unicode in my next version, support of Windows 98 would still be possible, but very difficult.
I know there are still some of my users running Windows 98.
What are the pros and cons of me no longer supporting Windows 98?
Answer: Dropping support for Win98 opens up a whole host of new Win32 API's that you can use in your software. This will allow you to provide a better experience for the majority of your customers on newer OS's.
Continue to provide the current version of your software for Win98 users, but make it clear that Win98 will not be supported in future versions of your software.
I think most Win98 users are starting to get the message and will be upgrading soon. Also, if they are unwilling to pay for upgrades to their computer/OS, they are unlikely to be willing to pay for upgrades to your software ;)
Answer: The impact to you and your business is going to be a function of what percentage of your users are still running Windows 98, and what percentage of your support time you're spending on them.  If those two variables are at or around the same proportion, I'd keep supporting it.
Answer: I think that Sherm hit the nail on the head here:

If you still have users running Windows 98, then one obvious drawback to dropping support is that some of those will inevitably refuse to upgrade. They'll either stick with the version of your software they already have, or switch to something else.

I would only add one thing to that -- anybody using Windows 98 probably isn't going to be so keen on upgrading anything.  In fact, it's likely that the users you've got out there who are using Win98 are using older versions of your software anyways.
In any case, the advantages for supporting a minimum of WinNT-based Windows are too numerous to list here.  The best solution here is to provide a link to the last functioning Win98-compatible version of your software to these users, but you shouldn't go out of your way to cater to people who are still keen on running a 10-year old OS.
Answer: If you still have users running Windows 98, then one obvious drawback to dropping support is that some of those will inevitably refuse to upgrade. They'll either stick with the version of your software they already have, or switch to something else.
On the other hand, the cost of developing for and supporting those users probably outweighs the additional revenue gained from it. So even though in principle you don't want any unhappy customers, in practice it may be more cost-effective to keep 99% of them happy.
Answer: The most common thing to do in your situation is to leave the customers with Windows 98 running the old version. Sometimes you just have to let go of the past.
Answer: Well, if one of your customers in running a 10-year-old OS (on presumably 10-year-old hardware), something tells me they aren't spending much updating your software.
Unless it's a private customer, paying you for custom software, I wouldn't worry about it.
And if it is a private customer asking for custom software, perhaps you should show that the prices of modern machines vs your premium for having to work with such an old system.
Answer: There are a few Unicode functions still available on Windows 98:
http://support.microsoft.com/kb/210341
Answer: Depending on your roadmap and technologies you use - it may be possible (but a bit of a pain) to branch your code. Using a decent SCM system, you could develop in your "new" branch and back-port (merge) features and bug fixes that are also relevant to the win98 branch.
It's a bit of work, but it would allow you to continue to provide new features to all customers, and not leave your win98 users out of the process.
Answer: If a customer/user is content to run on Windows 98, then, they will be content with an out of date version of your software.
Just freeze the current Win98 executable and explain in the release notes that newer features will only be available in Win2K or Vista versions.
I dont think this will upset anyone (you may know different!) and as long as you commit to fix bugs the customer should be happy.


how to retrive a qty of product from a specific cart in soap client2?

Question: please help me out. I am adding a product to a cart using cart_product.add (SOAP V1) with a qty-2. But when a retrieve a cart_product.list at that time I am not getting a qty. So how can i get the qty of product of cart?
Answer: Try to use cart.info api call it contains all information about cart and cart items.
More you cat read in manual.


How to create a link outside of the jail, but accessable within the jail?

Question: I have created a chroot jail, but now I want to be able to create a link within the jail which links outside of the jail. Is this possible?
Answer: The only method I can think of is used of a bind mount. A quick google found http://docs.1h.com/Bind_mounts
Comment: Yes, indeed: `mount --bind /old /new`
Comment: This is, pretty much the only way to do it, and it's how openvz does it.
Answer: Yes, as Christopher said, a bind mount will work.
But I think it will work only with directories and not at file level.
If you need file links you can use hard links but it will only work within a Linux ext filesystem (don't know if other fs support it)
See Here for a description of the difference between hard and soft links.


Samsung phone won't turn on

Question: A brand new Samsung phone, a 2017 A3 in this case turns off and is not turning back on.
The only workaround is to press "Power button + Volume Down Button" simultaneously for 10 seconds, but this keeps happening.
Comment: I suggest you rearrange the question and your own answer. Parts of the answer seem to belong in the question.
Answer: Problem
The phone is never actually turned off. It is just the screen that it is turned off. And it seems that there is no way to turn it on. BTW if you connect your device through abd you will verify that the device is indeed turned on.
Why it happens
It seems that a ""feature"" that Samsung haven't devoted any time to test it is causing this. The feature is called something like:

Avoid accidental screen awake when the phone is in your pockets or in your bag.

When it happens
It happens when this feature is enabled, and then you leave your phone in a relatively dark room for some time ( >30mins perhaps).
Then it looks like this feature is putting the phone into a state where key presses on the power button or the home button are ignored.
Solution

Reboot the phone

To do it hold Power Button + Volumn Down for 10 seconds, as adb reboot won't be working when the phone is in this state.

Once the device boots up disable that stupid "feature"

Samsung phone won't turn on


Different values after clipping

Question: I have a satellite image from Landsat TM. I want to clip my area so i created a polygon and thru Qgis -->  raster clipper I am trying to clip my area of interest. I noticed that the results have different values. e.g My first image has minimum 0, maximum 179 and mean 36.966. after clipping the result has values minimum 6, maximum 112 and mean 51.55. Is there something obvious that I can not see? Did the values change because the size of image is different after clipping?
Answer: When clipping the image it is likely that you removed the edge of the image. The edge of Landsat TM imagery is assigned 0 in all bands. This will result in 0 no longer being the minimum and a significant increase in the mean value across the raster. Furthermore, I would assume that you have also clipped the image to no longer include clouds, which would change the maximum value dramatically.
It would be worth checking if specific pixels have maintained their values by comparing the original with the clipped using the Identify tool, or a similar approach.
Small changes in pixel values is possible, due to potential resampling, but that depends on the exact method of clipping and resampling.
Comment: Thank you very much!I checked random pixels and the values are  the same with those from my first image. I never thought the edges would have such impact to mean and maximum. Thank you again!
Comment: @geo_dd you are welcome. Don't forget to mark the question as answered, as this helps tidy up the list of 'unanswered' questions.

Different values after clipping


Priming sugar in kegs

Question: Do you need to add priming sugar when moving beer to a keg?  Will the CO2 from the system be enough to carbonate it?
Answer: When you want to carbonate in the keg, you have both options: priming and force carbonation.
Priming is much as you would do it in the bottle. Just figure out how much carbonation you already have, how much you want and add the appropriate amount of priming sugar. The downside is that the secondary fermentation initiated by priming can take weeks to achieve proper results. Here's a good introduction to priming in kegs.
Force carbonation relies on the solubility of CO2 gas you're already using to dispense to achieve carbonation. Typically the beer would be transferred to the keg, chilled, then pressure applied. This method is very precise because the solubility of CO2 at any given temperature/pressure combination is well-known. Downside is that you pay for the CO2 you're injecting, rather than using (dirt-cheap) sugar to create it. Also, unless you agitate the beer while applying pressure, it can take many days for the gas to seep into the beer. This is why many brewers choose to use high pressure at cold temperatures for short periods of time while agitating the keg to speed up the process. This chart will give you an idea of the temperature/pressure relationship on the solubility of CO2
Comment: Is it possible to over carbonate with Forced Carbonation?  How do you determine the ideal amount of carbonation or it is just personal preference?
Comment: It's largely personal preference, but the style of beer can also dictate the carbonation. It will also depend on your serving setup, since during service the carbonation will eventually settle at the level determined by the temperature and pressure at which you serve.
Answer: You can prime the legs if you want to and some do.  Most don't however, since you have a tank of CO2 on hand anyway.  Priming also causes a buildup of sediment in the bottom of your keg, which makes it troublesome of you have to move it.

Priming sugar in kegs


What are some reputable merchant account providers for high risk payment web sites?

Question: I am helping to set up an online cigar web site.  However, it has become a real pain to take payments online since tobacco is considered a "high-risk" item and nobody will provide a merchant account to process the payments.  It looks like there are companies that specialize in high-risk merchant accounts.  I was wondering if anybody could recommend a high-risk merchant account and payment processing provider?
Comment: Have you talked to your bank about opening a merchant account with them?
Comment: Has your question been answered or do you need more information?
Comment: +1 - This has been an ongoing nightmare for the gun store I'm trying to get online. I've spoken with a bunch of merchant account providers and they're all eager to help until they find out what we want to sell online. Our provider for the brick and mortar store finally agreed to do it as long as we made certain changes, but now that we're ready to go, they're saying they can't help us. Frustrating. Of course, there's always PayPal - meh.
Comment: @boot13 try http://www.durango-direct.com/ you can get a real merchant account with them setup through authorize.net etc as a high risk retailer.
Answer: try alert pay, moneybookers, bluepay, or digital gold currency
Answer: http://www.usfsg.com/ might be able to help you. I am not affiliated with them but I know they are serious when it comes to offshore and high rish merchant accounts.
Answer: You can also use TrustWho to vet the authenticity of buyers. They reduce fraud significantly.


Whats the best program to use to make ebooks

Question: I've been using Sigil so far to make epubs but i was wondering if there's any better programs i could use, preferably free but doesn't have to be, that would be more efficient.
The bulk of the books i'll be making have a lot of footnotes, finding solutions to issues i have with Sigil is very difficult and time consuming so it would be useful to have something that's better known.
Thanks
Comment: At the moment your question seems to expect a rather opinion based answer. But that'S unfortunately not what SE sites are for. So please try to refactor your question, to make it more precisely. You could for example define your current drawbacks regarding Sigil in more details to allow others to propose a better alternative for you.
Comment: I really just want to know what other options are out there to be honest, there's no major issue I have with Sigil but I'd like to compare it against what else is out there to see if there is a more efficient way to do things, or if Sigil is the best way then it'll give me some piece of mind that I'm doing it the best way I can. I've tried using Google to find out what people are using but don't seem to be finding any names of programs that work with the actual making of epubs, only things like calibre
Answer: I don't know a lot about sigil, but I have made a book with footnotes, and I have been using an xml editor with docbook to generate an epub with  footnotes. Works well.
Unless you're already fluent in docbook, I suspect you wouldn't want to learn that.
Adobe InDesign already has a functionality to convert footnotes into epub http://helpx.adobe.com/indesign/using/export-content-epub-cc.html#reflowable_export_options Indesign is a real bear, but the monthly rental rates for the software might make it a good option for you.


zsh/oh-my-zsh: how to make tab completion add no trailing space for non-folder files?

Question: I installed zsh and oh-my-zsh.
By default, when using tab completion zsh adds a trailing space for non-folder files.
For demonstration I created the following folders/files in a folder named test_files and cded into test_files:
test_files
├── dir1
│   └── file4
├── dir2
│   └── file5
├── file1
├── file11
└── file111

First, I pressed l, s, Space, Tab, Tab, Tab, *, Enter in turn and got ls dir2/* as the 1st command. Second, I pressed l, s, Space, Tab, Tab, Tab, Tab, *, Enter in turn and got ls file1 * as the 2nd command. Please see the gif picture below:

For the 2nd command, since "file1" is not a folder, a space was added between "file1" and "*".
I don't want the space added between "file1" and "*", because when I mean to delete files staring with "file1" in their names I'll possibly press r, m, Space, -, r, f, Space, Tab, Tab, Tab, Tab, *, Enter in turn, and I think the command will be rm -rf file1*, but the command will actually be rm -rf file1 * and sometimes I may press 'y' without noticing the added space, so I may delete all the folders and files by mistake. Please see the gif picture below:

I used to delete many folders and files by mistake.
I googled many days for removing that space but have not succeed.
I found add-space from zsh document pretty looks what I want, then I tried zstyle ':completion:*' add-space false, but it seems that nonthing changed.
I tried only place the following lines in my .zshrc, it still adds that space:
autoload -U compinit && compinit
zmodload -i zsh/complist
zstyle ':completion:*' menu select
zstyle ':completion:*' add-space false

If I remove zstyle ':completion:*' menu select, the space is not added, but the cursor won't traverse the folders/files when pressing the tab key, so I want to keep menu select in configs. Please see the gif picture below:

I also tried many other configs.
Thanks in advance.
Answer: You can add * to $ZLE_REMOVE_SUFFIX_CHARS.
ZLE_REMOVE_SUFFIX_CHARS=$' \t\n;&|*'

(here appended to the value used by default when the variable is not set)
So the suffix that completion inserts, whether it's / or space be removed when typing * after the selected completion.


removal of grub boot loader from dual boot with windows 10

Question: I am not able to remove grub bootloader from dual boot windows 10. I have tried windows 10 recovery drive method, It didn't work. I have tried bootrec.exe/fixmbr also but it didn't worked even.I am still able to see grub loader in bios settings.What to do?
Comment: Any factory installed Windows 10 is in UEFI mode. Applying fixes (fixmbr) for legacy (BIOS) installation won't work. This suggests at least Windows is indeed in UEFI mode. As such all you need to do is to make Windows boot manager first priority again, at Windows setting. Otherwise please edit and update your question with hardware specs and whether or not you explicitly installed Windows 10 in legacy mode - procedures differ a lot -, in which case the fix you tried should have worked but either way off-topic.
Answer: To do so you will need a windows installation cd/dvd/liveUSB
put it in your optical drive/ USB drive and boot from it
on the installation screen where it asks you to install windows, click on Repair Your Computer on the lower left corner of your screen
Now go to command prompt (It probably will show a window saying "Trying to repair windows automatically", close it) and type bootrec. /fixmbr
after it finishes GRUB is gone and you can now boot into windows directly
you have an Ubuntu partition left in your computer, that doesn't show in "My Computer", to access that, right click on "My Computer" and Select "Manage" and go to "Disk Management"
Select the Ubuntu partition and format it to a file system that windows can use.
If this doesn't solve you problem and you've tried this then please explain your question throughly.


Use DownloadManager to download from an URL accessible through a DefaultHttpClient

Question: In my Android app I have to download files from URLs. I use the Android DownloadManager but the URLs are accessible only through a DefaultHttpClient. Infact these URLs are the result of several POST requests. I mean: I'm allowed to download the files only if I'm logged in as user. Could someone help me in managing this situation? I think that it's not possibile to use the DM to download the files by putting directly the link of the requested resource. When I have to download a file there already is an active DefaultHttpClient and I'm logged in.
The code I use is the following:
dm = (DownloadManager) getSystemService(DOWNLOAD_SERVICE);
Request request = new Request(Uri.parse(client.HttpsGet(url));
enqueue = dm.enqueue(request);

The HttpsGet is a method of my custom class HttpsClient that does a HTTP GET. In this case I obtain the file encoded in text (like if I open a pdf with notepad). If I directrly put the url of the file (without calling the HttsGet) the devices downloads a blank file.
Answer: For posterity...
I solved my problem thanks to this thread: How do download a file with login using HttpURLConnection
But I had to renounce to the DownloadManager
Hope this helps!


NDMP NAS for HP EVA4400 SAN

Question: We use EMC Celerra filer for our EMC array and it supports NDMP.n remote site we have EVA4400 HP SAN and it seems that our only option for NAS is Windows Storage Option.
What if we want to use NDMP?Surely HP should have something that match Celerra?
Answer: Data Protector supports NDMP.  I'ver never used it, but I see it in the options for types of backups you can create.
Comment: isn't that kind of, sort of, what I said?
Answer: Given NDMP was developed by NetApps and Legato, both HP competitors, and is far from a standard and is meant for NAS boxes rather then FC boxes there's no reason whatsoever for HP to support NDMP. That said HP's 'Data Protector' backup software DOES work with both NetApp AND HP EVA boxes, take a look to see if it meets your needs.
Comment: thank you chopper,

 I will have a look.
BTW, EMC is a competetor of NetApp however they did manage to get NDMP working on Celerra.

NDMP NAS for HP EVA4400 SAN


centralisers of maximal split tori

Question: Suppose that $G$ is a reductive group defined over a field $k$ which is not quasisplit. Suppose that $S$ is a maximal $k$-split torus. Let $\mathcal{L}(S)$ be the centraliser of $S$ and $\mathcal{DL}(S)$ the commutator group of $\mathcal{L}(S)$ or the anisotropic kernel. Is it correct that $\mathcal{L}(S)=\mathcal{DL}(S)\cdot S$?
Comment: No. Assume $G$ is semisimple (else silly counterexamples via non-split central tori). For a maximal $k$-torus $T\supset S$ and basis $\Delta$ of the set $\Phi$ of absolute roots, a basis of absolute roots of $Z_G(S)$ is $\Delta_0=\ker(\Delta\rightarrow{\rm{X}}(S))$. You want $\Delta_0$ of size $\dim(T)-\dim(S)$; i.e., $D:=\Delta -\Delta_0$ of size $\dim(S)$ $(\dim(T)=\#\Delta$ since $G$ is semisimple). Restriction $D\rightarrow{\rm{X}}(S)$ maps onto a basis of relative roots, so you want it *injective*; i.e., $\#D$ is the $k$-rank. False for many non-quasi-split unitary groups over fields.
Comment: I think there are also some E$_6$ counterexamples as well (over suitable fields).  For "most" types it is OK by inspection of classification theorems.
Comment: @Rupert: I added a more relevant tag.
Answer: The question needs a little more context, which I'll try to fill in.   The comments by user76758 seem to answer the question correctly in the negative, but if I have time later I'll try to add a concrete counterexample based on the Tits classification (summarized by him in lecture ntoes for the 1965 AMS summer institute at Boulder and published in Proc. Symp. Pure Math. 9).   In that classification, relevant examples require one to start with a semisimple group $G$ of rank at least 3, but one also has to work over a suitable number field or such.    Over a finite field $k$ all $G$ are quasisplit, and here one has $T = Z_G(S)$ in Borel-Tits notation, with $T$ a maximal $k$-torus containing a maximal $k$-split torus $S$.
As Tits indicates for a general connected reductive group $G$ over $k$, one has to distinguish between the semisimple anisotropic kernel $H:=(Z_G(S), Z_G(S))$ (derived group) and the reductive anisotropic kernel $Z_a  \cdot H$ (almost-direct product), where $Z_a \subset T$ is the $k$-anisotropic part of the center $Z$ of $H$.  As in the quasisplit case it's sometimes possible for $Z_a$ to be nontrivial in other cases, hence for $S$ to be properly contained in $Z$.
This is all part of the 1965 Borel-Tits structure theory (translated later into scheme language) for reductive groups over arbitrary fields.    Here $Z_G(S)$ is a Levi subgroup of a minimal $k$-parabolic subgroup, etc.  And of course the classification depends heavily on the nature of $k$, being usually incomplete when $G$ is $k$-anisotropic.
ADDED: From a quick look at the Tits classification list for simple types, it seems that counterexamples to the question asked occur (as user76758 suggested) in various cases involving outer automorphisms of the Dynkin diagrams.   There are some in types $^2\!A_n$ and $^2\!D_n$ which appear over the real numbers as well as number fields, along with a couple in type $^2\!E_6$.  In the latter case, Tits remarks that one of them occurs for a real form "which gives rise to a bounded symmetric domain".    In his notation, $r$ is the relative rank ($=\dim S$), while $n$ is the absolute rank.   Here $r$ is the number of Galois orbits in the Dynkin diagram, so you want $r$ to be strictly less than the number of simple roots in those orbits.
Concerning the Tits survey article, details (and corrections to the proof of the main  theorem) were written down in a 1976 Bonn thesis by his student Martin Selbach (published in the series Bonner Math. Schriften).
Comment: @Rupert: For any connected reductive group $H$ (such as $Z_G(S)$) and any $h \in \mathscr{D}(H)$, we know its conjugacy class in $H$ is the same as its conjugacy class in $\mathscr{D}(H)$. In what sense is your question is not an instance of that?
Comment: Thanks. Could I ask something a bit different. Let's say I had an element h in the semisimple anisotropic kernel such that its conjugacy class in the semisimple anistropic kernel is of positive dimension. Can I say that this conjugacy class is equal to the conjugacy class of $h$ in $Z_{G}(S)$?
Comment: @Eupert: Yes, the "absolute" theory pointed out by user76758 is clear, and applies to rational points over $k$ (here all semisimple, with classes of dim $>0$ unless central).  But notation gets confusing at times (different uses of $H$ for instance).

centralisers of maximal split tori


Is it possible to have a single port serve a layer 2 and 3 link simultaneously?

Question: We are moving to a new L2 fiber network and i'm having trouble figuring out how to connect the DR.  We are using a spoke and hub topology, with HQ as the hub.  The branch locations all have unique networks and my plan is to use L3 switches to route traffic between them.  The exception is our DR site.  It runs the same network as HQ and currently uses an L2 link to connect.  DR doesn't know its thousands of miles from HQ from a networking perspective. The new equipment for the fiber network only gives me one port to connect branches and DR.  Is it possible to connect to DR over an L2 link like we do now, AND to the branches over an L3 link on the same interface?  I hope this makes some sense.... Thanks for any help.
Comment: Well to give a more correct answer, a drawing would be nice with equipment placements and distance to your branches and DR.
Comment: Did any answer help you? If so, you should accept the answer so that the question doesn't keep popping up forever, looking for an answer. Alternatively, you can provide and accept your own answer.
Answer: Does the "L2 fiber network" support VLAN trunking? If so, it's probably the best solution to use multiple VLANs to separate the traffic within a single, physical link.
That way, you can run mixed L3 and L2 connections with as many or as few links as you like. Feel free to add details about your setup to your question (network layout, diagram, addresses, ...) and I'll expand the answer.
If no VLAN tagging is supported you need to set tunnels for the required, additional connections.
edit: Routed links (L3) don't require separate VLANs. Depending on security or architecture requirements, you could route all of them through a single VLAN including the untagged one. I'd use one VLAN to bunch all the router interfaces together.
Comment: Diagram added.  I believe VLAN tags will be honored, but i will have to verify.  So would each L3 network be in its own vlan?  Would the network spanning the L2 link need to be in a vlan as well?  or would it just be the native network on the link?
Answer: An 802.1q trunk would be a way to accomplish this if supported.
Comment: Generally a possible approach but you should be more specific.


Is it possible to stay in Spain after I get my PhD?

Question: I got a Ph.D. admission as an international student from Madrid University. As an Iranian, if I got admission from another country other than Spain I would choose to stay there too because of the horrible condition of my own country. I know about the rules and regulations in countries such as Canada or The United States, but I do not know if it is possible to stay in Spain after graduation and seek permanent residency. My field of study is business and management.
Answer: Yes, in general it should be possible, the most straightforward way is to be employed in highly skilled work, with this you would be able to obtain an EU Blue Card, from where a reduced period is required to apply for permanent residency (around 2 years).
You would definitely benefit from learning Spanish at least to the A2/B1 level.
Also note that moving inside the Schengen area is easy, if you find skilled work in another EU country, you can apply for a new visa in Spain and then directly move to your new EU country, there is no need to go back to your country of citizenship for this.


How do I get my cat to stop running outside?

Question: My cat always seems to run outside when given the chance. She has been doing this for about a year now and hasn't been stopping. Oh yes. She is a neutered female and we are not sure of the breed. She goes out almost every time given the chance. She doesn't go out very far, but we still worry about the animals getting her. Also, I get worried about our chickens being attacked by her. We have tried putting out food for her so she comes back, or even just shaking the food bag. She likes to play games with me. She'll come to the door, the once I open it, she runs. She plays that game a LOT. Also, we live in a house with big woods. Any ideas?
Comment: Welcome to Pets.SE! Will you please give us some details? Where do you live (house, apartment), the cat always runs, or only sometimes, how long does she spend outside, how far she goes, what does she do...
Comment: please give a bit more information about your cat,male/female,neutered/spayed,and information about things you have tried to do to keep your cat inside.
Comment: Welcome! Please give more information, as the others asked for. If a question needs to be clearified and will not be done, then it need to be deleted.
Comment: I just added more details. Thankyou, and, sorry!
Answer: Cats were never fully domesticated. They just adapted to live with humans for whatever reasons.
This means that cats are still wild at heart, and they need to manifest their wild nature occasionally. And it seems that your cat is doing just that.
Additionally, she needs to beat boredom. In the same way a child goes out to play, or you go out for shopping, the cat goes out for a run, or for an occasional mouse. Hopefully, not for one of your chicken :)
I think there is not much you can do. As long as the cat knows where she lives, and she keeps coming back, you should not worry much.
My grandparents (when they were alive) had cats (they lived in a village). Even though the cats were allowed in the house, and occasionally even invited inside the house, they were expected to live outside, and do whatever cats do.
Bottom line: a cat living outside is not the end of the world. You only need to be more careful about the pests it can bring, and the dirt she could get on her fur.

How do I get my cat to stop running outside?

That might not be possible at all, unless you force the cat to live in an enclosed case / room for the rest of her life.
Comment: @AnimalLover for an indoor only cat it do sound like she like to spend some time outdoors.
Comment: @Stephie -For the first question, my cat is indoor only.
Answer: First, you have to make up your mind (and probably get all family members on board as well). The core question is:

Do you want your cat to be an indoor cat only or are you ok with her being an indoor-outdoor cat, including accepting the risks that come with that?

Depending on that answer you need to develop an action plan.
If she's to be indoors only, you need to secure the house in a way that makes it impossible for her to escape - how exactly that may be implemented depends on the locale. Just expecting her to stay inside when facing an open door or window won't work. Unlike well-trained(!) dogs, it's almost impossible to train a cat so that she follows your commands ("stay" or "come") that reliably.
If you decide on "indoors only", note that you will likely face a phase of "I am not happy with the limitations" and her probably expressing it one way or the other. After all, she's been an indoor-outdoor cat for quite some time. You also need to make sure that she's sufficiently entertained / challenged, that means you have to spend enough time to play with and mentally challenge her - after all, she's used to a way wider place to roam and all the things a cat "does" outside, from surveying her "kingdom" to hunting and she gets a lot of sensory input.
If you decide to give her access to the outdoors, then you should take a few essential precautions: Always make sure only spayed/neutered cats roam free (no issue in your case), make sure she's up to date on her vaccinations and regularly checked/treated for parasites. Ensure she can be identified (microchipped and registered, depending on your locale perhaps also a tattoo) if she gets lost, but better avoid collar, as even the "safe" ones have a remaining tangling / strangulation risk. I would also recommend to feed her only indoors, because that's one way to ensure "at home" is a desirable place plus you can at least partially check her diet and avoid attracting other cats or even wild animals that then start unnecessary conflicts.
We can not make that decision for you, you know your environment best and can decide on the risks.
Comment: Thank you, and I will put some thought on it!