Word for content that sounds useful but is devoid of value

Question: I'm looking for a word or expression that describes a text, a presentation, or a speech that sounds meaningful and attractive, but in fact, it is devoid of any real value and does not lead the reader or listener anywhere.
Comment: Does this answer your question? [What is a term or idiom for "blah blah blah" talk?](https://english.stackexchange.com/questions/316399/what-is-a-term-or-idiom-for-blah-blah-blah-talk) ('I am thinking about those situations in which people want to express their ideas on facts about politics, economics, religions etc, but they have no real information about what they are talking about so they often repeat phrases they heard on TV programmes or comment using set phrases like: "that's the way things are".')
Comment: If you google "hot air", you will get a ton of words for that.
Comment: FWiW,  I think of hot air as being all talk no action.  I think of empty platitudes as being more along OP's lines.
Comment: There will always be some people who think instances of ***circumlocution, prolixity, periphrasis,...*** are "impressive" even if the actual semantic content is low or non-existent. But nobody is impressed with ***garrulousness,  logorrhea, long-windedness***.
Comment: Welcome! There are many possible words, phrases, and idioms for this concept; at present, the question is so broad as to be closed as "opinion-based." Please use the "Edit" button to try to narrow down the context in which you would use it, or any more shades of meaning you can offer (is the lack of content meaning intentional and deceptive? Accidental?). Also, please provide a sample sentence that shows how this word or phrase might fit into a sentence; that will yield better answers.
Comment: George Orwell described it as "purple passages" in his essay "Why I Write" (1946). Another word for purple passages is "purple prose", where the words are excessively complicated and even perhaps attractive, but offer very little meaning or value to the text.
Answer: window dressing (n.)

Something used to create a deceptively favorable or attractive
impression m-w

An adroit but superficial or actually misleading presentation of
something, designed to create a favorable impression.
Many businessmen suspect that government policies and systems to curb smuggling and undervaluation practices are mere window dressing to improve the tarnished image of the corruption-infested customs offices.Lexico

In the long term, we will find out who has invested seriously in these
issues and who has merely used the principles of ethics sustainability
and love as a  window-dressing to communicate attractive content
that lacks substance. A. Alessandri and A. Aleo; Engaging the
Heart in Business (2020)

Mission statements that lack substance are easily dismissed as
window-dressing. Once it's drafted, review your mission statement critically for the "fluff factor."  CCPS; Guidelines for Integrating
Process Safety Management, Environment, Safety, Health, and
Quality

These policies are mere window-dressing, empty pages designed to
please outside authorities that often lack meaning for the people
inside the organization. Robert Mendonsa; Working Choices
(2000)
Answer: Via Miriam-Webster bunkum, bunk.

insincere or foolish talk

On May 11 1820, US Representative Felix Walker gave "a speech for Buncombe" (Buncombe County in his constituency).  It is 4,901 florid words that by general acclaim "sounds meaningful or attractive but ... devoid of real value and does not lead the reader or listener anywhere".
I now quote the entire speech of United States Representative Felix Walker, (found on wikisource) given to Congress on May 11 1820, as the entirety of this speech establishes the exact platonic ideal of "bunk", in a text-conversion safe format.
This speech is ostensibly about the Missouri Compromise.

Missouri Question -- SPEECH of MR. WALKER, OF N.C.

In the House of Representatives of the U. States, on the amendment proposed, requiring the restriction of slaves in Missouri, as a condition of her admission into the Union.

Mr. Speaker, I should not have risen on this question did I not believe that we are about to be plunged into a dangerous and conflicting policy wherein some of our best interests and dearest rights are deeply involved. In giving my views on this subject, I find I have to encounter difficulties that I cannot avoid. It has undergone such a luminous discussion, so as almost to preclude further investigation, and anything more that could be said appears like beating the air or speaking to the wind. I have been looking out for some unbeaten path, some untroden ground, wherein I might pursue the principle without a commentary on those who have gone before me, but find it scarcely attainable; as believing it will materially affect the interests of that portion of the community I represent, I feel it a duty incumbent upon me to resist the proposition, and state my objections to its adoption, under a conviction that the principle is incompatible with the true policy of this country.

Sir, the amendment proposed in the bill, to restrict and prevent slaves from being taken into the Missouri, is perhaps one of the most momentous & important questions that ever was or can be presented for legislation, as it has a tendency in its consequences to affect the vital interests of the people of the whole United States, and unhinge that policy which has so long and so firmly bound us together, and on the decision of which the peace and safety of the union measurably depends. (or it has become so) Not from its intrinsic merit or moral excellence as is presented, but by adoption, it was generated and created with us; we gave it birth, it drew the first breath in this House, and here it began its existence, and had the gentleman from New York, Mr. Taylor, suffered it to rest in its native cradle, we should not have heard the unpleasant voice vibrate and echo round these walls, and the sound go to every state in the Union--we should have remained in quietness and at peace one with another.

In taking a view of the situation of the American people, we must acknowledge that the hand that placed and planted us in this western hemisphere, in our present attitude, is divine. Severed, as it were, from the discordant and conflicting politics of foreign powers, holding in our hands the olive branch of peace, possessing the happy privilege of self government, in the exercise of religious liberty and rights of conscious; surrounded with national blessings and embracing domestic happiness, respect abroad, union and tranquility at home, and rapidly advancing to the highest grade of national prosperity: and while in the possession and enjoyment of all these highly favored privileges, we refuse to be quieted, we will, we must have something to excite us. Like the troubled ocean, we cannot rest; and we have truly arrived at the principle in this phantom of the mind, this creature of imagination, this particle of discord--the amendment proposed in the bill. Sir many are the evils of life incident to man, but that which exceeds all others and most to be dreaded and avoided, is family feuds and quarrels, contentions and convulsions within; if the enemy is without, we can unite and repel him, but when he is withing you walls, and man's foes are those of his own household, it enters into the vitals of national and domestic security: a horrid picture, friend against friend, brother against brother, father and son at variance. And we have the word of truth for it, that a house divided against itself cannot stand. On this question the Constitution has been the ark of safety, the sanctuary in which every gentleman has taken refuge, on both sides: to prove the purity of his doctrine, every nerve has been touched, every cord has been unstrung of that instrument; the mysteries it contains, both positive and incidental, has been brought to light and clearly explained, and to my mind it appears evident that the constitution is a compact made between the states, as a covenant of peace and union, and authorises no restriction to be laid on a free people in forming a constitution and state government for themselves, such as is contemplated by the amendment to bill on your table, for the people of Missouri. This principle is as clear as the light, and we cannot deny it. But, sir, I yield the constitutional and legal points to the combatants in argument who have preceded me, and proceed to examine and sustain the principle of free government on moral and political ground, and state my reasons why I am decidedly opposed to the restriction in the amendment proposed to the bill. Sir, slavery is the theme of declamation, as if the slave holding states were contaminated with a leprosy, which infects the whole republic; a contagion that will overspread the western hemisphere. Sir, that slavery is an evil we all admit with one breath, and that little or nothing can be said in favor of the principle, but something may be said in mitigation of damages, as it respects us in the present existing state of things. Sir, it is not our original sin; it was placed on us by our ancestors, and now, and at this time, beyond our reach to remedy; we are not in possession of the means commensurate to effect the object of emancipation in this our day. But gentlemen seem to think that because our fathers eat sour grapes our children's teeth are set on edge, and that we so joined to our idols that we cannot give up, or part with our darling sin and the sin of our fathers, in retaining our slaves in bondage. But, Mr. Speaker, bad as the cause is, and however blackened by description, I must enter a plea for our ancestors and tread lightly on the ashes of the dead. They did not make war on any free people, and subject to bondage any free nation, and bring them into a state of slavery and vassalage. No, sir, they purchased them with their money when brought from Africa, from a country where they were slaves by their own policy, and in a much worse condition that with their new American masters. We have a right to assert this doctrine, by the best historical evidence now to be collected. Sir, slavery is an evil, I repeat, but is no new invented criminal practice, it is an old offender; it was in this country in an early period of its settlement, and has descended down to us to the present time, and were we to attempt to trace the original, we me must retrograde far back into the old world, to a distant period when Nimrod the mighty hunter began the chase, and his prey was man; and from that era down to the present, throughout all ages and among all nations, civilized or uncivilized. With Jews and Christians, Greeks and Romans, Turks and infidels, slavery or something amounting to slavery in principle and practice, has had an existence in the world, and still it was and still remains to be an evil. And yet gentlemen seem to treat the subject as a new measure, as if we were just commencing and about to colonise a new country with slaves west of the Mississippi, similar to the first introduction of them into this country.

On this ground they have taken a formidable stand, and impenetrable fortress, which they conceive to be invincible; they have sounded the tocsin of alarm, and are determined to arrest the progress in making the Mississippi the Rubicon of the West, over which the unhallowed foot of an African slave shall ever pollute the sacred soil. But Mr. Speaker, I can speak for one, and almost pledge myself for every gentleman, on the same side, that were we, at this time, free from that fatal incumbrance, and now about to adopt such a policy, would renounce the principal, an reject it with abhorrence and flee from it as the law of a serpent. But, sir, gentlemen who advocate this restrictive doctrine, seem to have overlooked their own object in espousing the cause, as they suppose, of oppressed humanity. While they are loosening the cords and knocking of the fetters from the slave, they are fastening a more galling and infamous chain on their masters and the free people of the South--and while they are endeavoring to find an expedient to restore the privation of natural liberty to the slave, are attempting to fix an odium, an ignominious restriction, on the slave-holding states, in the privation of political toleration in denying the the free exercise of their constitutional and natural rights, in emigrating to the West with their slave property. Sir, the purchase of Louisiana was the purchase of the whole states, the slave-holding states contributed their full share of funds for that purchase, which constitutes them equal proprietors of the soil, and therefore entitled to equal rights of inheritance; but, sir, if your amendment is adopted, it will curtail them in those rights, and give a decided preference to the states in the East and North over those of the South, it is a long known and well established principle, which all experience proves, that interest in the most powerful incentive to the actions and pursuits of mankind; and it is a well known fact, that banking system has been carried to a vast extent in the states to the North & East; they abound in banks, & where there are banks it must be believed there is money, and money may be had: wealthy individuals, corporations, associate companies, may unite together and form a combination, and procure such sums of money, as will answer their purpose from the banks, and with a strong monied interest proceed to the Missouri, or some parts West of the Mississippi, and purchase a principality of land, while the Southern states have no such resources; and it is also evident that countless multitudes of emigrants from Europe are every year pouring in the populous cities i the East, they mush have land to cultivate, and not the means to purchase--and from the good news of a land flowing with milk and honey to the West, they will naturally proceed down the waters of the Mississippi as adventurers, and necessarily become tributaries to those who hold the lands, and then and there will be landlord and tenant, a name that sounds not much better than master and servant in a republican government; while the citizens of the South must halt at the banks of the Mississippi with his slave property; hitherto may he come, but no further; and your country will be overspread with foreigners, in exclusion of your own citizens. This one, among many others, affords a clear demonstration of the advantages in favor of the eastern section of the Union, over that of the south.

Sir, do, we not profess to maintain and guarantee to each other a government of equality? For this we struggled, fought and bled, in the revolution--and to that invaluable principle of our policy, I have always given my support, and under such a government I wish to live and die, and to leave it as an inheritance to my children. Sir, there never was, nor never will be a government, without some imperfections--something interwoven in our policy that we could wish was not there, but cannot be removed. Now the true principle is, the evil that we cannot prevent, and the good in which we all are partakers; let it be universal between state and state, citizen and citizen, mingle the bowl, everyone his draught, share and share and share alike, each their portion equally distributed of both the good and evil, and not by any discriminating policy, give a preponderance of power or interest to any one section of the Union, in preference to another.

Sir, let it be remembered, that we came here to legislate for freemen, not for slaves; we hold our seats by their suffrage, we preside over the destinies of the nation, their dearests interests are in our hands, and they look to us for the security and protection of their rights, and to them we are responsible for our conduct as their legislators. Let us not forget the duties of our high station and the trust reposed in us, by legislating on the principle of slavery, which is altogether an abstract proposition, slaves being the property of the citizen as much as any other he possesses; and we have no legitimate power to intermeddle with any man's property, or direct what he will do with it, where he will carry it, or how he will dispose of it.

Sir, by attempting to cure one evil absolutely incurable, let us be aware we don bring on ourselves a complication of evils more dangerous and fatal than all the slaves and slavery that ever did or ever will exist in the United States, by introducing a doctrine that will have a tendency to lessen the confidence between the states, and violate that harmony and union which from the beginning and at this time binds us together. Sir, we are not, nor can we be, united by the coarser ties of human laws, or by measures of rigorous and rigid policy, but by the silver cords and mutual embraces of interest, friendship, and affection, adopt a policy that will tend to weaken or dissolve those solid (?) relations; you destroy the intercourse between the states, and sap the foundations of your republic. But, Mr. Speaker, I will attempt to shew that we who are against this restrictive policy, are serving the best interests of our country, and promoting the means of the comfort and happyness of both the white and the black, the bound and free people: First we are contending for general and universal equality of rights and privileges inherent in our government, in which every citizen is, and ought to be n equal participant, such as free access to all the profits and emoluments arising under the general government, without distinction or discrimination. Our legislative course ought to be directed to that radical point--the first principle and lasting basis of all republics--Any innovation or departure from that rule is dangerous, and sometimes fatal: we know not where it may end--it may slide us into aristocracy, or drive us into despotism, and in the result demolish our fair fabric. In republics, reforms for the better have generally originated in the people they have always held a jealous control over the different branches of government, and kept within sight of their liberties, and have often administered correctives in cases of excess.

But, sir, a departure from republican institutions has always began in their councils and their cabinets, in some abuse of delegated powers; where too high a tone or too much apathy has been the result of their deliberations. Let us in the present instance avoid and disavow the dangerous policy of assuming greater powers in our legislative capacity than is given us by the constitution or the people; and legislate to some practical effect, by a strict adherence to the rule we are preserving, and serving the best interest of a free people. And as it regards the slaves, if the proposed amendment prevails it can have no good effect on their condition, but entirely the reverse; it will neither increase or diminish their population, the numbers will be same on either side of the Mississippi; in that point of view it will neither make one hair white or black, if motives of charity and benevolence toward the oppressed people be the motives of gentlemen in bringing forward this restrictive measure, they do greatly err; not being acquainted with the habits and customs of the Southern states. Relative to the situation of their slaves, it must be admitted that where slaves are numerous, they do not fare so well, the means of subsistence are scanty, and improvident, and not easily obtained even by those who wish to supply the slaves with sufficiency; but the further to the west the rich and more prolific and fertile the soil, and more plenty the provision, and within the reach of the hungry and naked. But, sir, by this restriction you are riveting their chains more severe than at present, by denying them a passage over the Mississippi, where they may better their condition by changing a bad master, and with certainty going into a new country where they will more easily and conveniently obtain food and raiment; the only inheritance, the sum total of their happiness and comfort in this life. In this view of the subject it is evident the restriction operates more sever on the slave than his master, and prevents the future comforts of those unfortunate people, as well as abridges the liberty of the master, the free citizen, in removing with his slave property to a better soil, where the condition of both may be improved.--Thus, sir, I have attempted to show that we, who are walking in the good old way of general equality and universal privilege, aside from all political distinctions, are promoting the best interests of both bond and free.

Sir, the proposed amendment announces a doctrine I did not ever expect to hear promulgated on the floor of the Representatives of a free people, as that of proscription, and if it prevails will give a vital stab to the feelings and interests of the people of the southern States, and will prostrate the dearest pledge of our country's pride by this act of of discrimination in prohibiting the citizens of the south from an equal interest and participation with their fellow citizens of the east and north, i the solid west of the Mississippi; they must, they will feel the sting of degradation in the attempt to defranchise them of their rights--making them subservient to the strong powers of the Eastern States, and in a political sense, as hewers of wood and drawers of water.

Their sensibilities are awake, they are feeling alive to every, the least approach of any incroachment on their national rights or abridgement of their liberties; touch them in that tender, that exquisite part, they will bleed--they cannot, they will not tamely submit to any subjected measure of policy; they will rally round the tree of liberty, growing in our happy soil, whose branches extends and overspreads our continent, under whose shadow we sit with delight; it is of so nice so delicate a texture, break a twigg it will wither; strike the root it will perish forever, and can only live, grow and flourish while we unite to preserve it. If it is true, and I believe it will be found to be true, that whatsoever we sow we shall reap; let us pause, and beware that we do not sow the seeds of discord among our brethren--it will be a root of bitterness that will spring up and fasten on the vitals of our republic; will eat like a canker and bring forth the poisonous fruits of discontent, contention, confusion, and universal discord, and perhaps in the last resort end so dissolution or separation, which is more to be dreaded than all the evils that can be placed upon us by the united world. Sir, it is our duty as legislators to adapt our measures of policy to the habits and customs and event to the feelings and prejudices of each other, in the different sections of the Union, a due deference to such views--would prevent a multitude of evils. Gentlemen who support this restrictive system seem to have no correct views of the economy and usages of the people of the southern states in relation to the ir slaves; they have drawn a horrid picture of whips and scorpions, they suppose we have no further regard for them than for the fruits of their labor; this mistaken opinion is, for the lack of better acquaintance, which if they did know our manners and customs the would form very different conclusions: our slaves are our friends as well as our property--they were born in our houses, and raised in our families, and consequently we feel a sympathy for them and they for us; they are immediately under our care and protection, and we will not suffer them to be ill treated by any--will redress their injuries and protect their persons form abuse; an in many instances so strong is the attachment of the slave to his master; that had they the offer of emancipation they would not go, nor could we drive them from our walls. Their lives are also regarded and protected from the laws, particularly I know in the state from whence I come the life of a slave is as sacred as that of his master; and the punishment is death to kill a slave as well as a freeman; so it is evident their condition is not so intolerable as is represented by those gentlemen who have undertaken to draw the picture. On other advantage I will mention, that the slave has, to which every one who owns a slave is a witness: their cares are less, and their wants are fewer than the master, in their situation they fulfil and finish the circle of life in as much satisfaction as any people, and perhaps with more contentment than if they were free. Sir, would it not be an act of cruelly to compel the citizens of the south, who was disposed to remove to the Missouri to sell his slaves born in his house and brought up in his family, and mutually attached by all the sympathies of natural affection, such as a man feels for those of his own household: And to disunite and separate families, by parting with his slaves contrary to the will of both, and violate the most tender sensibilities of the human heart in order to purify and entitle him to an inheritance, and give him a passport as a citizen, worthy to reside on the west of the Mississippi; he had better be an alien at once. Sir, when I meet my fellow citizen from the east and north, I wish and feel to give my hand as a brother, without reserve as children of the same great family, united in the sympathies of mutual affection and reciprocal interest and equal participants in all the rights, benefits and privileges that government bestows. But, Sir, if your Restrictive System prevails, it will weaken that tender relation, we shall view each other with watchful eyes and cold hearts, and with a jealousy that will tend to annihilate those friendly and brotherly affections we now feel and entertain for each other, and at last be driven to relinquish the pledge of union that so long and so happily has continued to bind us together to the present day. This will be the impression made on the public mind of the people of the Southern States: if you force upon us this rigorous and excessive measure, you will shoot an arrow you cannot recal, and inflict a wound you may never be able to heal, if you do not prevent it, by a more accommodating policy.

One remark I will make, which may serve to awaken us--and for aught we know be the immediate effects of this present discussion; gentlemen seem to addressing the language of charity and benevolence, and appear to take a great interest in the deplorable situation of our slave property, perhaps they know not what they do, among men of every class, there are always some restless and interprising spirits, not contented in any situation of life; the news of this tumultuous debate, will reach our homes before we can arrive--and should some of our slaves from the impression made upon their minds from what they hear, raise an insurrection and commit murder on our families and neighbors, what would be the feelings of gentlemen, and how would they reconcile themselves to the awful catastrophe, who are so loudly sounding the alarm on this floor.

So, we are now about to give birth and bring into the union the first state West of the Mississippi; common observations and all experience proves that the infant born natural, free, and unfettered, and without impediment always brings into the world the best constitution, and is best prepared to grow and arrive at maturity, without the aid of so many nurses, to bring it to perfection; and if you will suffer the people of Missouri to organise their own government to whom the power properly and constitutionally belong,s they will exercise that right according to their own views and opinions, and will form a constitution and state government for themselves and adopt the policy best suited to their interests and feelings, and assume the attitude of state sovereignty inherent in them as a free people. Sir, the people of Missouri are competent judges of their political rights and will most assuredly claim and contend for them, in equality with other states in the union; we must regard the voice of the people, it is a sovereign voice that will be heard , a voice that we must all obey, and is a fact you will find to be true, that the further west from you metropolis, the greater the enthusiasm for liberty: the people of Missouri will cheerfully yield to your constitutional powers, but beyond that will not go, nor can you compel them. Sir, precedents we find has almost become the law of the land, and generally governed our decisions in every case where they have been cited, and we must expect that the terms on which we admit this new state into the union will be the model for all new states, that will be formed in that extensive territory west of the Mississippi to the pacific ocean, and as we are now about to establish and identify a policy that will govern future legislature and future generations, which exceedingly increases our responsibility on the decision of this momentous question, and while in the progress of our deliberations, let us be cautious, consider and solemnly pause before we determine, and not participate ourselves into the gulph stream of danger and difficultly, from whence we may never be able to return to peaceful shades of love and union; which if you adopt this restriction without any modification I am made to fear will be our critical situation and the consequences yet unknown.

Sir, some of the present generation has witnessed and felt the horrors of two wars; the first Revolutionary war, which happily terminated in our emancipation from the old world, and gave us an eminent station among the nations of the earth, in forming the greatest republic now in existence, and the best that ever did exist, which by our wisdom and united councils, under the auspices of Diving Providence, we have been enable to preserve and progress to that degree of eminence and prosperity on which we now stand, and we fondly hoped would continue inviolable while time would last. But now, for the first time, we begin to see a storm gathering, a cloud arising, which if it should increase and break, and discharge its baleful contents, will shake it to the base, and desolate our homes and our prospects. Sir, if we pursue these restrictive measures, this degrading policy, unqualified, what will the people of Missouri say, or what can they calculate on us as their representatives. They will say, and most assuredly conclude, that we have exceeded our constitutional powers and become the dictators, if not their tyrants, while acting in our legislative capacity. We have lately emerged from a cruel and desolating war, that exhausted both blood and treasure--but it was a war in which we all united against our common foe and wherein we acquired national honor, and, I believe, national prosperity will be the increase; but sir, both these wars bear no proportion to the calamities we must expect to suffer, and the difficulties we must encounter, should we ever be so unfortunate as to draw our swords against each other; which heaven forbid.--We shall then experience horrors and distresses never before witnessed in our (as yet happy) country; and which I fondly hope we never may; but still there may be danger, and it is our duty to avoid every appearance of that much to be dreaded and worst of evils, disunion, and not in any instance move toward any point that would tend to lead to that fatal experiment. Sir in the last war we lost our thousands, but if you will force upon us this restriction, you may, in the end, in the course of your mistaken policy, which if persisted in, go on with increasing rapidity, at at last compel us take leave of each other, and lead to an event that may prostrate the lives of the ten thousands of your choice citizens and fatally terminate in the dissolution of our confederated government.
Comment: Please edit your post to follow our [Help Center's guidelines on how to reference other sites](https://english.stackexchange.com/help/referencing). It is not sufficient to include merely a link, because the source of the quotation must be able to survive a a plain-text (or plain-paper) transformation intact without loss of information explaining who said it and where it's from.
Comment: After sleeping on it, I have agreed with the suggestion to include the entire speech after the feedback, as the entire speech establishes what exactly "bunk" entails
Answer: Technobabble sounds useful but obscures its lack of sense behind scientific-sounding words spoken confidently. Oxford English Dictionary, under "techno-, comb. form":

technobabble n.
colloquial (originally U.S.)
incomprehensible or pretentious technical jargon; cf. psychobabble n.
1981   Wall St. Jrnl. 15 Oct. 28/5   Mr. Haig seems to have somehow sprung free of the technobabble of Mr. McNamara's Defense Department.
2004   Times Lit. Suppl. 4 June 21/2   He is aware..that one can take the love for technobabble too far.

The term is often used to refer to such talk in fictional universes like Star Trek, where characters may talk about changing shield frequencies to compensate, reversing polarity, graviton pulse, and so on, terms loosely understood beyond the contingencies of plot. But the term is also more widely applied to describe empty language around technological fads in general:

First, crypto boosters are very good at technobabble — using arcane terminology to convince themselves and others that they're offering a revolutionary new technology, even though blockchain is actually pretty elderly by infotech standards and has yet to find any compelling uses. (Paul Krugman, "Technobabble, Libertarian Derp and Bitcoin," New York Times, 20 May 2021.)

Be a wise consumer and shop around. There is no accreditation for Internet trainers so there are no accepted seals of approval. Avoid trainers who drone on in technobabble -- you'll leave knowing less than when you started, Lipow warns. (Lois Kazakoff, "Finding Your Way in Cyberspace," San Francisco Chronicle, 21 Nov 1995. B4.)


When selecting USA checkbox would states be disabled?

Question: The behavior is if you select a state it selects all the cities in that dropdown. But in this scenario if user selects USA shouldn't all the states be disabled/gray rather than selecting all the states? I say this because if all the states/cities are chosen and they change there mind they would have to unselect them all.
Comment: Would not deselecting "USA" deselect all states and cities? However I think when selecting "USA", selecting all states and cities is overwhelming.
Answer: Would not deselecting "USA" deselect all states and cities?
However, when selecting "USA", selecting all states and cities is overwhelming.
Rather than automatically select sub options, provide a note stating how many states and cities, or cities if selecting a state, are selected:
Comment: Thanks. That is something I could try. I also feel selecting all regions would be overwhelming but... I could see using your idea and all regions are selected. Then if they deselect a region (like mid-atlantic) USA would display that updated number. (11 Regions, 84 cities selected). I am trying to prepare for all stakeholder questions. This is useful.
Comment: Yes. I also suggest you provide a "deep dive" option for users that need to increase the complexity of their selections. Use the drop down for the majority of searches and provide a more complex search for the few who need it—they are motivated to work with a more complex interface.
Answer: At a certain level of complexity, it becomes difficult for the user to control what they want to select in a single dropdown. If there are potentially thousands of choices at the city level, a multiselect dropdown wouldn't be the correct pattern.
The right pattern depends on your use cases. What is your user trying to accomplish? Do they want to select a combination of large regions and one-off cities? Do they want to search for particular cities and only target those? Are they working more with an exclusion pattern (select all cities EXCEPT Dallas, which will have its own unique criteria)?
I would suggest you write out your user stories and design optimal workflows vs. trying to find a single component that can accommodate all items.
Answer: No, they should be enabled.
What you're using here is a tree view pattern.

A tree view widget presents a hierarchical list. Any item in the
hierarchy may have child items, and items that have children may be
expanded or collapsed to show or hide the children. For example, in a
file system navigator that uses a tree view to display folders and
files, an item representing a folder can be expanded to reveal the
contents of the folder, which may be files, folders, or both.
This is a very common pattern (just take a look at your own operating system's file manager) that most users will recognize at first glance.

The idea is that you can quickly select and deselect items or groups of items with minimal effort, while easily understanding what happens to the selection
So the convention is to use a sign, check mark or similar for each individual item selected or for each group for which all items are selected.
However, if not all elements of a group are selected, a square is usually displayed in the checkbox (see image below)

Now, to address your specific example, let us look at some use cases:

I want to select all cities in the USA: then I select the USA check box
I want to select a region: I select only one region without selecting USA. Then USA will show a square.
I want to select a city within a region group: I open this region and select a city. Now both the region dropdown menu and USA should show a square
I want to select most of the US, but not all of the region: then I probably select the US and then look for a few entries that do not match my criteria. Squares are displayed for both the USA and some other groups.

The important thing is: users can use this flow in increasing (they start adding selected items) or decreasing (they select everything and then filter the items they do not want) ways. To do this, the elements must always be enabled so that users can interact in any way they want.
Comment: Hey Devin this is really useful thank you. Makes sense.


SVM training and testing error interpretation

Question: I am new to machine learning and I just used SVM for the first time to analyze my dataset... Now I have created a figure that displays the training and testing error of the model as a function of variable test/train set size.. I need to say something useful about this graph but I do not understand how the training error is defined and how this correlated to the testing error.. Can somebody clearify this for me?   (And is it right this thing is called a learning curve?)
Answer: A learning curve is a plot of the training and cross-validation (test, in your case) error as a function of the number of training points. not the share of data points used for training. So it show how train/test errors evolve as the total data set increases. See here for examples and more detail.
The 'train error' would be the error (according to your loss function) achieved for the training set, and the 'test error' means the same for the test set. See here for more detail.
If I interpret your chart correctly, then the fraction of data you are using to test your model increases to 90%, while the error decreases for the 'test' data, while it increases for the (simultaneously shrinking) train set.
In other words, as you are training your SVM model using fewer and fewer data, the 'train error' increases, which makes sense. It is a bit odd that the test error would be decreasing as you reduce the size of the train set, so perhaps I am misinterpreting your chart?
Comment: @zthomas.nc - see updated link in answer.
Comment: Thank you a lot Stefan! I think you are right. It is odd that the test error line decreases upon increasing the test data size.. Is it possible that the model is less well trained on less training data and therefore has poor predicting quality? Or is it not true that the test error is defined as the ability to predict the label of test data?
Comment: If the increasing share for 'testing' means that you are reducing 'training' at the same time, then one would expect the test error to increase because it does indeed measure the error in predicting the test label. That error should of course increase rather than decrease for a poorly trained model.
Comment: Is it possible that at 0.9 overfitting occurs? Since the training error is low and the test error is enormous?
Comment: Exactly, overfitting means that the training error becomes very low as the model fits 'too well' on the know, data, but fits poorly on unknown data.
Comment: @Stefan - Your first link is broken


How to use a OpenVPN network interface without redirecting everything over it?

Question: I am using an OpenVPN server I have no control over that has provided me with a client configuration to use. When I use the provided configuration, everything works as expected - all the network traffic on my local machine gets redirected through the VPN connection.
I want to figure out how to use the tunnel network interface without redirecting all traffic through it.
My setup
I have a software that performs a series of tasks and supports specifying the exact network interface to perform those tasks on. I want to be able to specify the tun01 OpenVPN interface on this software without affecting anything else on the machine.
Moreover, I need to be able to set up multiple VPNs over different network interfaces - tun01, tun02, tun03 etc. - so I can run my software doing simultaneous, separate tasks over each interface.
The problem
Right now I'm setting up all the separate network interfaces, but only the first OpenVPN to start up is actually working. My hunch is that the following OpenVPN clients I start are trying to tunnel through the first one instead of using my regular connection.
Basically, I need to either make the default state for my network to NOT tunnel through the OpenVPN so I can select the actual network interface I need to use manually, or find a way to make the OpenVPN client to ignore previous active VPN connections.
What I've tried already
My best attempt so far was to include pull-filter ignore redirect-gateway in my configuration file in hopes of not getting the routes installed and then using the tun01 interface directly, but when I tried doing that, the connection on my software did not use the VPN, instead using my regular connection.
Answer:
My best attempt so far was to include pull-filter ignore redirect-gateway in my configuration file in hopes of not getting the routes installed and then using the tun01 interface directly, but when I tried doing that, the connection on my software did not use the VPN, instead using my regular connection.

Yes, what did you expect? The configuration you got uses pull, which pulls a default route (among other things). You blocked getting the default route, so your default route is not modified. If you don't want the default route the server sends, then you have to add routing entries for those addresses to want to direct to the VPN server.


can states interpret an international law however they want?

Question: can they even interpret it to effectively negate the rule of not using domestic law as a justification for non fullfilment of obligations by interpreting the treaty in a way that suits them ?
Comment: The body text of this question isn't reading clearly.with triple negatives, etc.
Comment: fully sovereign country @Trish
Comment: State as in member of a federal country or state as in fully sovereign country?
Comment: You seem to be wanting to know about a specific case based on your "can they even...": please provide as much detail as possible, rather than leaving us to guess.
Answer: There is a lot behind the word "can" in your question. If you are simply asking whether states have the sovereign power to interpret international law however they want, then sure. But they might be wrong (thereby leaving themselves in violation of the treaty they are failing to implement), and if they are intentionally doing so to avoid fulfilment of international obligations, then this is itself a violation of international law. States must take actions in good faith towards implementing treaties in their domestic law. See Articles 26 and 27 of the Vienna Convention.
See also: What gives rise to binding obligations at international law?
Answer: A nation can interpret its treaty obligations however it wants. If it is wrong in its interpretation, the nation might be sued which could end up being somehow penalized for a wrongful action based on an incorrect interpretation. Whether they can get away with it depends on who is going to enforce that law.
Comment: "Whether they can get away with it depends on who is going to enforce that law": in much of international law, the answer to that question is "nobody."
Comment: @phoog actually the answer is "anybody who wants that law." For example, see military and economical support to Ukraine.
Comment: @SJuan76 if I understand your comment correctly it's analogous to claiming that Alice giving Bob a big stick to use in defending himself against Carol's punches somehow constitutes Alice enforcing the law that prohibits assault and battery.  It's not the same thing.


What are the taxation rules for US non-resident aliens with respect to qualified dividends?

Question: Are the rules different for qualified versus non-qualified dividends? Assuming no DTAA exists between the US and the country of residence.
Answer: Like all US taxation of NRAs, it depends substantially on whether the income is considered 'effectively connected' with a US 'trade or business', which in turn can depend on numerous, sometimes complicated factors you don't specify. See pub 519 (also available in PDF at https://www.irs.gov/publications).
If dividend income is effectively connected, you report it in the main section (p1/2) of 1040nr on line 10a,b and compute tax on effectively connected income in mostly the same way as 'residents' (1040 filers) do, using either Schedule D worksheet or Qualified Dividends and Capital Gains Worksheet either of which does apply lower rates (depending on bracket) to qualified dividends (and also to long-term capital gains, if those are US taxed at all).
If dividend income is not effectively connected (but is US source), you report it in schedule NEC (p4) of 1040nr on line 1a-c and it is taxed at a flat rate, 30% if no treaty rate applies, regardless of whether it would be qualified under the 'resident' system.
Answer: While the other answer stated that "[qualified and non-qualified NEC dividend] is taxed at a flat rate, 30% if no treaty rate applies", Portfolio Interest (as defined in 26 USC § 871(h)(2)) and Qualified Interest Income (as defined in 26 USC § 871(k)(1)) are withheld at flat rate, but not taxed (i.e. refundable through 1040NR).
In the case of securities, certain ETF holding treasury or corporate debt fall into Portfolio Interest or Qualified Interest Income (Not to be confused with Qualified Dividend). The 1042-S issued by the broker would tell you how much is withheld, how much is taxed, and the exemption reason, and you may have to obtain refund through 1040NR on your own.
To determine whether your broker has correctly classified the ETFs as Qualified Interest Income, the issuers of the ETF publishes the percentage of dividend that is QII on an annual basis. For example: https://www.ishares.com/us/literature/tax-information/qualified-interest-income-qii-percentages-2019.pdf


Is or was a great movie

Question: I went to see the movie Black Panther this morning. At night, my friend asked me about the movie. Should I say "The movie was great." or "The movie is great."?
Comment: It's not exactly the same as *I told him my name was Unni,* but the same general principle applies that the choice of tense depends on the temporal perspective of the speaker (time of speaking, or *time being spoken **of***).
Comment: So if i say movie was great, does it mean the movie is not great now? :( @fumblefingers
Comment: Not at all! You could in theory contrive a context like *When I saw the movie 40 years ago it was great. But times have changed, and everyone today agrees it's an absolutely appalling piece of racist claptrap.* But mostly we assume a good movie is, was, and always will be a good movie, so it doesn't matter if you give your opinion of it relative to what you thought *when you saw it*, or *what you think "now".*
Answer: You could use either. In practice, you would probably match the tense of the question.

Friend: Did you enjoy yourself last night?
  You: Yes, I saw Black Panther, and it was great.
Friend: What do you think about Black Panther
  You: It's a great movie.

If you are talking about the movie say "It is great". If you are talking about your night out say "It was great".
Comment: Yes, although I'd say rather match the tense to what you've got in mind: If you elect to give your opinion of the movie say "It is great". If you choose to
 comment about your night out say "It was great".

Is or was a great movie


Injective dimension of the Jacobson radical and global dimension

Question: Given a finite dimensional algebra $A$ with Jacobson radical $J$.
Is the global dimension of $A$ equal to the injective dimension of $J$?
Together with Xiao-Wu Chen and Srikanth Iyengar we proved this now more generally for any semi-perfect noetherian ring $A$.
Answer: Here a proof that works for a large class of algebra including all algebras of finite global dimension in case I made no mistake. We assume for simplicity that the algebras are given by quiver and relations (which is no loss of generality in case the field is algebraically closed) and the algebra is not semi-simple or local (in which case it is trivial that the global dimension equals the injective dimension of the Jacobson radical).
I use the well known lemma that in a short exact sequence $0 \rightarrow X \rightarrow Y \rightarrow Z \rightarrow 0$ one has $pd(X) \leq max(pd(Y),pd(Z)-1)$. Dualising that should give that $injdim(Z) \leq max( injdim(Y), injdim(X)-1)$.

Lemma: Let $A$ be a general algebra, then the injective dimension of $J/J^2$ equals the global dimension of $A$ when $J$ denotes the Jacobson radical of $A$.

Proof: Note that $J/J^2$ is a direct sum of simple modules. Let $S$ be a simple module that is not injective corresponding to the point $i$. Then there is an arrow starting at a point $j$ to $i$ or else $S$ would be injective, since $S$ is the socle of $D(Ae_i)$, which has a vector space basis corresponding to all paths that end at $i$ in the algebra.
Now $S$ is a direct summand of $J/J^2$ since $e_j J/J^2 e_i \neq 0$ and $J/J^2$ is semisimple. But the global dimension of an algebra equals the supremum of the injective dimension of simple modules. Thus there is a simple non-injective module with injective dimension equal to the global dimension that is a summand of $J/J^2$, showing that $J/J^2$ has injective dimension equal to the global dimension.

proposition: Let $A$ be an algebra with finite global dimension or such that the injective dimension of $J$ is larger than or equal to the injective dimension of $J^2$ minus one. Then the injective dimension of $J$ is equal to the global dimension of $A$.

proof: We have the short exact sequence $0 \rightarrow J^2 \rightarrow J \rightarrow J/J^2 \rightarrow 0$, which gives that $injdim(J/J^2) \leq max(injdim(J),injdim(J^2)-1)$, which shows that the injective dimension of $J$ is at least the injective dimension of $J/J^2$ in case of our second assumption.
Assume now that the global dimension is finite. Then $J/J^2$ has injective dimension equal to the global dimension and thus also $J$ has then injective dimension equal to the global dimension $n$ since $injdim(J^2)-1 \leq n-1$ and the above inequality.
In case the global dimension is infinite, we use the second assumption to see that the injective dimension of $J$ is also infinite.
Maybe someone sees how to remove in a nice way the assumption that the algebra is a quiver algebra for the lemma or how to prove $injdim(J^2)-1 \leq injdim(J)$ (or the weaker statement that the infinity of $injdim(J^2)$ implies that $injdim(J)$ is also infinite)?
edit: probably one can remove the assumption to have quiver algebras by noting that $e_j J/J^2 e_i \neq 0$ iff $Ext^1(S_i  , S_j) \neq 0$. So $S_i$ being a non-injective module is equivalent to $Ext^1(S_i, A/J)$ nonzero which is equivalent to $e_j J/J^2 e_i \neq 0$ for some $j$. So the proof should work in fact for any Artin algebra with the above assumptions. I have to find a reference for $e_j J/J^2 e_i \neq 0$ iff $Ext^1(S_i  , S_j) \neq 0$ for Artin algebras, is there any? (or even for general finite dimensional algebras)
Answer: Here a proof for Nakayama algebras of 1. I wonder whether one can modify this to get a proof for a larger class of algebras:
First note that 1. is trivially true for selfinjective algebras and thus we can assume the algebra to be nonselfinjective.
Let $A$ be a (nonselfinjective) Nakayama algebra with global dimension $g$. Let $P$ be an indecomposable projective module with injective dimension g. Then $P$ is not injective and thus there is an embedding $P \rightarrow I$ where $I$ is the injective envelope of $P$. But $I$ is projective, since Nakayama algebras are QF-3. Let $I=e_i A$. Then we can write $P=e_i J^k$ for some $k$. But with $e_i J^k$, all the modules $e_i J^l $ for $l=0,1,2,...k$ are also projective. Thus we can write P as the radical of the projective module $e_i J^{k-1}$. Therefore, there exists a direct summand of the Jacobson radical with injective dimension $g$ and thus the injective dimension of the Jacobson radical is itself equal to $g$.


jquery .load() not working in IE/Safari

Question: i've got some strange problem when using jquery .load() on my website:
While there is no problem in Chrome/FF/Opera the script just wont work in IE/Safari. It looks like those browsers don't find the php-Script on the Server.
And now its gettin strange: Calling the Script by full qualified path it is suddenly working in IE/Safari but no more in Chrome/FF/Opera.
Here is what I'm doing:
$(document).ready(function(){
  $('#mainnavi li.sub-li>a, #mainnavi li.top-li>a').mouseover(function(){
    $('#nav_info').empty().show();
    var curSite = $(this).attr('rel');
    $('#nav_info').load('/navInfoContent.php', {pageID: curSite});
  });

The navInfoContent.php is just some SQL-Query and than echoing HTML-Code
echo ('
$variable
')

like this but in correct syntax.
As said, when I change to
load('http://www.mydomain.de/navInfoContent.php', {pageID: curSite})

it's suddenly working in IE/Safari, but no more in Chrome/FF/Opera. I've allready tried the solution by adding some random stuff to the URL in order to prevent IE from caching, but that didn't help.
Answer: First of all, make sure you have the last version of jquery...
.
2nd: define you function in $(document).ready() only when you need. ONLY
Usually, the problem is ready() event.
Comment: THX alot for your tips. Sadly even with jquery1.8.2 and without ready() it still isn't working in IE/Safari

jquery .load() not working in IE/Safari


For which deity is the Gayatri Mantra? Why do we chant it, and what exactly does it mean or signify?

Question: To which deity is the Gayatri Mantra addressed? What exactly does it mean or signify? Why should we chant the Gayatri Mantra ?
Comment: We have almost forgotten the deity.
Comment: This is a very good question. I had this interpretation - that this activates certain nadis or chakras using certain syllable japa and this leads to activation of the sattvik nature of the person chanting.
Comment: To Savitar, the golden (hiraṇyaya), the golden handed (Híraṇya-pāṇi), the golden haired (hiraṇyákéşa), the golden tongued (Híraṇyajihva), the darkness conqueror (tamo-jíte), the solar diety of the Vedic Arya-s.
Answer: Swami Chinmayananda in his book Meditation and Life, Chapter 18 writes,

This mantra is dedicated to the Lord Savitṛ  . That Savitṛ represents
Lord Sun is the accepted version, although some scholars protest
against this interpretation. The sun gives all illumination to the
world, and any prayer for light should certainly be addressed to the
source of all light in the material world – the sun. In the
Bhagavad-gītā Lord Kṛṣṇa says, "The light that pervades the sun and
the moon is all My light." Thus, Savitr, the Lord of Gāyatrī, is
nothing other than the Light of Consciousness, the Infinite, the
Absolute. 'We meditate upon the auspicious, godly light of the Lord
Sun. May that heavenly light illumine the thought flow in our
intellect'. In our own inner life, the sun represents the illuminator
of all experiences, the Ᾱtman. This pure Consciousness in us, around
which the matter envelopments function – just as the entire solar
system revolves around the sun – is being invoked to shine more fully
in our intellect. If the sun were not there, physical life on earth
would be impossible. Without Ᾱtman, the matter envelopments would
become inert. In chanting the Gāyatrī mantra, the devotee is actually
praying for spiritual unfoldment – 'May my intellect be steady without
agitations; may it be clean without the dirt of passions. May the
light of Consciousness come to shine forth its radiance through my
intellect. Thus, may my perception of the world be clear, my
discrimination subtle, my judgements correct and quick, my
comprehension of situations precise and wise'.

He continues to explain the reason, why to chant Gayatri Mantra,

The Taittirīya Ᾱraṇyaka explains in story form the reason for the
daily chanting of the Gāyatrī and the offering poured toward the sun.
On an island called Arunam lived a tribe of devils called Mandehas.
Every morning these devils conquered all space and almost reached the
sun, threatening to destroy him. But the water thrown by the Gāyatrī
japists was lightning-strong striking the devils and forcing them to
retreat to their islands. The story is symbolic of events in one's
mind. Mind (manas) and body (deha) are the sources of our activities. With their likes, dislikes,
emotions, appetites, passions, and cravings, they bring out our
passionate animal instincts, which try to conquer and destroy the
spiritual essence – Brahman or the sun – in us. The essential
brilliance of the human intellect is clouded by these passions. The
Gāyatrī japa, with the force of lightning, descends upon them and
dissipates them.
Comment: These Mandehas cloud my mind, until I consciously "see" Surya/ and behind him Savitr. Then the light is cast।
Comment: The fire that is the Gayatri, grows in  beautiful hymn of the godly Vishwamitra Gathinah. Hoping that a question on that will add veneration.


Diagram generator to enhance the Q&A editor?

Question: On our sibling site Raspberry Pi Stack Exchange the Q&A editor has a build-in schematic drawing tool. Inspired by "How do I add a schematic to my question?" - Raspberry Pi Meta Stack Exchange I would like to ask here on Network Engineering Meta: Are we in need of a network specific drawing tool to enhance the editor?
Comment: I'm not really for or against this (if any suitable plugin would exist), but to make this a bit easier I've made two possible answers, so people can indicate their opinion just by upvoting.
Answer: Yes, a plugin for adding diagrams would be useful (if possible and available).
Answer: No, there are plenty of tools around for people to create their diagrams.
Comment: Serious question... Is there a negative side effect of a tool like this? I'm struggling to think a reason people would vote no to this addition.
Comment: One can be that there is no need for this site to do everything, it can be enough for people if it does one thing really well, which is be a Q&A platform. Too many additional features can make things confusing and bloated, and it could be a waste of time getting it to work if nobody will be using it. Depending on what tool is offered (if any is available) there could be consequences in who owns rights to generated images, or who is able to modify them.


Why can't Maven find my SNAPSHOT artifact when I can download it manually just fine?

Question: I have the world's simplest Maven/Jenkins/Nexus setup.
Maven runs via Jenkins dozens of times a day and deploys SNAPSHOTs to our Nexus repository just fine.
Every once in a blue moon, with seemingly no cause, running another Maven job that requires resolution of SNAPSHOTs will fail.  It fails in these rare cases with Maven telling me that it cannot any longer find the SNAPSHOTs that it uploaded in many cases several hours before.
If I point my web browser at the very repository location that Maven is using I can find them just fine.
Immediately before these errors, I always see (as I do in success cases) a bunch of maven-metadata.xml files being downloaded.  Presumably these files tell Maven something about how to take, e.g. 1.009-SNAPSHOT and turn it into 1.009-somehugetimestamphere.
(I have never found any documentation of this file, and it does not seem to mark any of the filenames contained therein as "latest" or anything similar.  In fact I cannot see how it is of any use at all, but clearly it must be.)
(I also see various references to resolver-status.properties in the debug output, which seems to be another undocumented file written to the local repository that tracks something having to do with resolution, but I confess I don't know what.)
My broad question is: how exactly does Maven go about downloading and resolving and checking SNAPSHOTs?  Assuming that the repository information is valid (after all, this job works 90% of the time and fails 10% of the time with no changes), what steps does Maven take with a given repository to find the proper SNAPSHOT?
EDIT: Found some documentation: http://maven.apache.org/ref/3.0.4/maven-repository-metadata/repository-metadata.html although it doesn't explain why none of the maven-metadata.xml files I find in my Nexus 2.0 installation have the <latest/> element in them.  Nor does it detail how these files are used.
My posting on the users list brought a response that some of this might be a Nexus problem, in that it may or may not be generating these maven-metadata.xml files properly.
Answer: I ran into a very similar problem the other day with a Nexus server proxying another repository. In my case, changing the Expiration Settings in Nexus fixed the problem. I reduced the "Artifact Max Age" and "Metadata Max Age" from 1 day to 1 minute.
Comment: Just curious, could you update the question with whatever you found as the root cause?
Comment: Thank you; that is helpful, but was not the root issue.


How do I drywall a corner with a lally column?

Question: I'm finishing my basement and I've come across this lally column which is supporting a steel beam.  I want to frame an external corner for this interior wall at this "corner" but the distance from where the back of the drywall would be to the column (especially on the right side) is really small, like maybe 0.5"?   Since I can't fit a 1x1" there, how do I frame this corner?
Answer: Here is my suggestion. It is only part of the post in the drawing, but it is the same all the way up, the scrap pieces of plywood are about 1 ft apart 3 or 4" wide, can be wider, can be solid, done that too. Makes for a really strong corner for corner bead. If you don't use 1/2" plywood and need to use 1/4" it will still be really strong. Using a full piece of plywood makes a straight corner really easy. It is what I do, I shown pieces so the method of construction is seen. I have also used 1X and had good results too, I use glue to help hold it....
Comment: That's a great drawing, worth a thousand words and an up vote.
Comment: Awesome drawing (what was it done in?).  One question - since this is a basement floor, are there any problems with having the plywood directly touching the floor?
Comment: I made the drawing using Trimble Sketchup, it used to be Google Sketchup. It is a free download and free to use. After I made the 3D drawing I set the best position, I exported it to a 2D drawing, which makes it a .PNG file, and I posted that. All kinds of tutorials on Youtube.
Comment: I forgot to mention about the plywood. On any surface in a basement I hold it up a bit, 1/2" is good for the plywood, but DO hold up the drywall 1". Cut off some of the tapered edge if need be. It really makes setting base difficult to set plumb, unless a shim is set at the bottom.
Comment: So basically just move the bottom part for the plywood and 2x2's up about 1/2"?
Comment: @Jack I couldn't figure out how to direct message you so here you go - Your answer was really helpful.  Any chance you could look at my other question http://diy.stackexchange.com/questions/81383/how-to-build-a-wall-under-duct-work?  Also, are you still in the DC area or are in you WA state?
Comment: I was in the DC area up till a year ago, in WA state now... I will look at it. Yes, no need for it to touch the floor, you can layout a few pencil lines on the concrete floor that show the wall extension where it is to go and sight the corner from that.
Answer: Use plywood as the corner material for both sides. The corner can be built on site and installed when complete. Strengthen the corner with brackets installed on the inside and construction adhesive. You'll need nailers on each end of the attachment walls.    You could also just extend the drywall without framing since the distance past the framing is minimal (glue the two pieces were they meet at the corner).
Answer: Don't frame it, just wrap the ends of the walls with drywall to behind the column & paint the column to match or contrast. Or, you can make it decorative & give yourself room to boot. Screw a 2x8 & 2x10 into a corner with corner bead (guessing what it is to each end stud), then screw those flats to the wall end stud faces (only half the width of those studs so drywall can lay & screw)...Bumps-out just the corner (2" with drywall, if desired). It would look great & you can corner bead the bump-out to get all 3 corners sharp.
Option 1 leaves the column accessible, but possibly difficult to mud & corner-bead. Option 2 could be removable with just screws at the very top & bottom...if desired. Pre-drill both the lumber corner & the wall studs so you don't split that 3/4" you'd screw Option 2 into.
Comment: @2LeftThumbs I do now.
Comment: Do you have an image of what you're talking about?  Seems like seeing the column would be really ugly


Problem welding vertices/edges

Question:
As you can see in the gif, my problem is that that one of the vertices is loose while the other is connected, the loose vertex is located on the edge. My question is, how can i weld the vertex of the loose mesh to the edge ?
The blendfile:
Comment: Try **TinyCAD** add on for this task.
Answer: If i understood the question vertex is not join.
Select the edge and subdivide once to get a single vertex
Select the verts and press G twice so that it slide on the edge.
Activate snap transform (shift+tab) and snap both the verts and remove doubles.

Problem welding vertices/edges


Which Stack Exchange site is suitable for home theater questions?

Question: This question got sort of halfway to answering my question, but there have been a lot of changes to the Stack Exchange network in the past 2 years and some of the links referred to in there no longer work. Basically I want a place to ask questions like, say, "What remote should I buy if I have components x, y, z? or "How do I optimize my living room setup?" Does Stack Exchange have a site for that?
Answer: There is no such site yet, but Home Theater is a proposed site on area 51, so if this important to you, commit to it...
Comment: That's fine: if a niche is too small, we don't need a separate site for it. But, obviously, **we still need a place to ask and answer those questions**. Right now, home theatre questions are deleted as off-topic from every stackexchange site, and the proposal to have a home theatre site has been deleted. That's pretty useless, if you think about it.
Comment: @CeesTimmerman HT&A is also dead :/
Comment: HT is dead. Long live [HT&A](http://area51.stackexchange.com/proposals/59720/home-theater-audio).
Comment: Both deleted. Utterly useless. Come on, StackExchange...
Comment: @MGOwen - sites fail because they don't have a community behind them.


How to backup GPG?

Question: What are the critical files I need to backup from GPG? I guess my private key would qualify of course, but what else?
Answer: The most critical are your secret/private keys:
gpg --export-secret-keys > secret-backup.gpg

secret-backup.gpg is then the file to keep safe.
Otherwise the ~/.gnupg/ directory contain all private and public keys(secring.gpg and pubring.gpg respectively) as well as configuration and trustdb which could be convenient to have stored.
Comment: If a public key was lost, would the private key be useless?
Comment: @Buttons840 The public key is a subset of the private key so you should be able to extract the public key from the private.
Comment: Recent versions of GnuPG do not have pubring.gpg, but pubring.kbx and private keys are in a separate directory.
Comment: Use `gpg --import ~/secret-backup.gpg` to restore the exported private keys.
Answer: First of all, before we begin, in the commands below, firstname.lastname@example.com should be replaced with the specific identifier of your GPG key. You can use your email address associated with the key, the long form of the key ID, or the short form.
Indeed, your private key is critical, but other files are also important.
1. Export keys and ownertrust:
These commands are intended to export your keys and trust level. Public and private keys are used for encryption/decryption, and the trust level determines how much you trust other keys in your keyring.
Run the following commands in your command line (Command Prompt for Windows, Terminal for macOS and Linux). Replace "email@example.com" with your GPG key ID:
gpg --export --armor email@example.com > firstname.lastname@example.com
gpg --export-secret-keys --armor firstname.lastname@example.com > firstname.lastname@example.com
gpg --export-secret-subkeys --armor email@example.com > firstname.lastname@example.com_priv.asc
gpg --export-ownertrust > ownertrust.txt

2. Import keys and ownertrust:
If you need to restore your keys and trust level (e.g., after reinstalling the system or on a new computer), use the following commands:
gpg --import firstname.lastname@example.com
gpg --import email@example.com
gpg --import firstname.lastname@example.com_priv.asc
gpg --import-ownertrust ownertrust.txt

3. Ultimately trust the imported key:
This step is needed to set the ultimate trust level for your keys. Run the following command, then type trust, then 5 (which means "ultimate trust") and hit Enter:
gpg --edit-key email@example.com
gpg> trust
Your decision? 5

Note: If you're operating on Windows, you might need to install GPG4Win first. If you're on macOS, you may need to install GPG Suite.
Update 2023.07.21
An essential point I'd like to address is related to suggestions about backing up the entire ~/.gnupg/ directory. This practice might seem straightforward and quick, but it comes with its pitfalls.
Yes, the ~/.gnupg/ directory does contain all your private and public keys, as well as the trust database and other useful data. However, it also includes your key revocation certificates (~/.gnupg/openpgp-revocs.d/), which are not advisable to include in your backup. This is because if your backup gets stolen or lost, a malicious actor could revoke your keys, rendering them unusable.
Moreover, the ~/.gnupg/ directory may contain temporary files and other less critical data that you might not need during restoration, and it might unnecessarily increase the size of your backup.
On the other hand, exporting keys and trust level, as I explained above, allows for more controlled and secure data management. This approach minimizes risks and makes the process more reliable and predictable.
So, while copying the entire ~/.gnupg/ directory might seem like a quick solution, it may not be the best option in terms of data security and management.
Answer: The easiest way would be to grab the entire GnuPG directory - usually ~/.gnupg/, it contains all private keys you have, as well as the public keyring and other useful data (trustdb, etc.)
Comment: Isn't it also the safest way? Because the private keys are still encrypted.
Comment: I have some weird files in my directory that does not want to be copied over scp
Comment: Don't copy them. They're sockets, not files.
Comment: (Just dropping this here: [why does gpg-agent create several sockets?](https://unix.stackexchange.com/questions/605445/why-does-gpg-agent-create-several-sockets))
Answer: In addition to @serghei's answer, check the documentation of gnupg.
It says that you should backup:

~/.gnupg/gpg.conf (standard configuration file)
~/.gnupg/pubring.gpg (legacy public keyring)
~/.gnupg/pubring.kbx (new public keyring using keybox format)
~/.gnupg/openpgp-revocs.d/ (revocation certificates)

It suggests also to backup the ownertrust
gpg --export-ownertrust > otrust.txt

Of course, you should backup your secret keys as well. If I understand correctly, the quickest way would be using tar to backup the whole ~/.gnupg except revocation certificates ~/.gnupg/openpgp-revocs.d/.  You may consider to print revocation certificates as a QR code (qrencode) or instead, print out secret keys with the utility paperkey (see reference). Remember that if you keep your private keys and revocation certificates in one device, an attacker can revoke your public key and issue a new one claiming to be you.
Reference: An Advanced Introduction to GnuPG, Neal H. Walfiel section 6.3.8 (creating a backup).
Comment: @JellyFilledNuts It may contain other people's public key, thus not part of the secret ones you own. See [the documentation](https://www.gnupg.org/gph/en/manual/x56.html). In that perspective, it's not dramatic to lose them, just not very handy.
Comment: I see, that makes sense. Thanks. I did not think about that aspect because so far I'm using GPG only for signing commits and encrypting stuff
Comment: Why do we have to backup the public keyring? Aren't the public keys part of the secret keys? So exporting the secret keys + owner trust should be enough
Answer: You definitely want to backup your private key and the revocation file you created.
Comment: You need to create it (if you didn't already). It is used to revoke your key if you loose your private key.
Comment: where is the "revocation certificate" ?
Answer: You may also want to back up any keys you've signed or ones you don't feel like re-downloading off the key servers.
At a minimum, all you need is your complete key.
Comment: ...and any revocation certificates you created.

How to backup GPG?


Does marinating break down proteins the way brining does?

Question: Brining makes meat tender because the salt (and some sugar) breaks down proteins. Shouldn't a salty/sugary marinade do the same thing?
Answer: Brining does not technically "break down" proteins in meat. At least not the way marinating does.
Brining actually involves osmosis which carries salt and sugar inside the cell walls. This denatures the proteins causing them to unravel and interact with one another. This forms a matrix which traps moisture in the meat.
Marinating on the other hand actually does "break down" the proteins using acidity. The acid literally does consume the proteins and break down the texture of the meat. If the marinade has salt in it, then osmosis will occur as well and the marinade is also serving as a brine.
So, to answer your question: Yes, a salty marinade will brine your meat, but the protein breakdown that occurs is due to the acidity of the marinade.
Comment: Marinating doesn't tenderize either. Harold says on page 155: "The acid in marinades does weaken muscle tissue and increase its ability to retain moisture. But marinades penetrate slowly, and can give the meat surface an overly sour flavor". Alton Brown in "I'm just here for the food" pp 182 says: "Sure, acidic liquids... can dissolve proteins... but the effect is localized to the surface of the food..." He goes on to say that the reason it seems to tenderize is because the strong flavors stimulate saliva.
Answer: The point of brining is not tenderization- It's juiciness and flavor.
When brining, initially dissolved substances inside the meat cells leave into the brine. When the solution reaches equilibrium they start to move back and forth, in and out of the meat. Any flavors in the brine move into the meat as well. The salt denatures enough protein to lock some of the water inside the meat causing more water to get pulled in. After a little while the meat is super charged with water that won't even cook out.
In order to work, the solution has to have relatively a lot of salt in it. But even then, the salt is not able to break up the collagen fibers that make meat tough- it takes heat and time for that to happen.
In order to get the super-charged-juiciness with a marinade it would have to have a lot of salt and water- more than marinades usually do. And then you would have made yourself a brine.
Comment: @user1575 - I wouldn't say that you *should* make a brine. It depends what you are trying to do. If the goal is extra moisture- like when roasting a turkey- then definitely brine. If the goal is a quick boost of flavor then a marinade is good. If you are trying to tenderize a tough piece of meat there are other methods of course: papain, smoking, braising, etc.
Comment: So really I should make a brine, then add something flavorful.


Classifying land use in polygons using aerial imagery

Question: I am trying to use the shapefile here: https://environment.data.gov.uk/DefraDataDownload/?mapService=EA/HistoricLandfill&Mode=spatial  to work out how much of the sites are covered in trees. I have managed to load the shapefile and aerial images (World Imagery basemap) and clip the map to just show the imagery within the polygons. Now I would like to classify how much of each polygon is covered with trees however the classification tool is greyed out (I think because it is not a raster file). Is there any way around this? I am using ArcMap 10.1.
Comment: Do you have any prior experience with image classification?
Comment: You will likely not be able to use imagery located in a service for classification. If you can find suitable imagery, given your question, I would not recommend classification at the polygon unit level. Perform a pixel level classification using supervised or unsupervised and then summarize the results to your polygon units. Else-wise you will be forced to classify each polygon as forest/non-forest and not be able to get at proportion of forest in each polygon. From where it sounds like you are at, please seek help from somebody versed in image classification.
Comment: Unfortunately not, although I have done quite a bit of reading/googling I can't seem to get to the stage that will allow me to use this tool. Any help would be massively appreciated.
Answer: Without access to your data it is difficult to speculate what the issue is. May be it's the format of the data or may be it's something completely different such as a daft file name that is invalid? If you have no prior experience to image classification then I would recommend you start playing with the isocluster tool (unsupervised). This is one of the easier tools to get to grips with as you basically chuck the raster at it and say how many classes you want. There are more superior techniques but if this tool throws an error it should at least help you track down the source of the problem...


Step-by-step guide for running PHP/MySQL on IIS 7.5

Question: Any complete guide for setting/running PHP/MySQL on IIS 7.5?
Answer: Setting up MySQL should be pretty easy - run through the windows installer and it should be painless.
Setting up PHP correctly in IIS is another matter though.  I found this guide to be extremely helpful.
You can use the web platform installer for PHP to get up and running quickly, but my experience has been that it falls seriously short, especially if you need to support multiple PHP versions or different php.ini settings for different sites.
Answer: A plugin to setup PHP in IIS: http://phpmanager.codeplex.com/


Which Capacitor I need?

Question: I am using SIM800L. It requires 2 amp current spike(very shortly). As it requires just 4Volts, I am powering it through Arduino. To sustain load spike of 2 amps, which cap should I use?
Answer: If we go to the Cap equations, we have the relation between the capacity and the current

If we resolve C, then we have:
This means that, the capacitance will be = C = I*t/(ΔV). If you have 2A peak, and following the SIM800L the time of the burst is about 600uS, and the maximum voltage drop from 4V is 1V, looks like the min voltage for SIM800 is 3V, then you have you will need 1200uF, but this is not taking in account the ESR of the capacitor..., so this is conservative calculation, and only taking in account that the capacitor is the only which is giving this current.
That is why, super-caps are used in this applications, or stronger power supplies.
Answer: According to Sim800l or Sim800C Datasheet page21 you will need a capacitor of the following value.
100uF tantalum capacitor here
33pF ceramic capacitor
10pF ceramic capacitor
And if you are using battery with less C rating then I recommend a large 1000uF electrolyte capacitor also so it can provide burst current that Sim800l requires.
And also make shure all capacitors are as close as possible to vcc pin of Sim800l.

Which Capacitor I need?


Asymptotics for $p$-series with $p=1/2$

Question: Reading solutions to a practice exam, and I come across this:
$$
O\left(\sum_{d \leq \sqrt{x}} {1 \over \sqrt{d}}\right)
 = O\left(x^{1/4}\right).
$$
There are $O(\sqrt{x})$ terms in the sum, which are bounded between $x^{-1/4}$ and $1$. It looks like using the number of terms and the lower bound would give this estimate, but I don't see how that's valid.
Comment: Hint: Approximate the sum from above and below by a suitable integral (the function will be $\frac{1}{\sqrt{t}}$).
Answer: By comparison to integrals,
$$
2\sqrt{n+1}-2=\int_1^{n+1}\frac{\mathrm{d}x}{\sqrt{x}}\le\sum_{k=1}^n\frac1{\sqrt{k}}\le\int_0^n\frac{\mathrm{d}x}{\sqrt{x}}=2\sqrt{n}
$$
So
$$
\sum_{k=1}^n\frac1{\sqrt{k}}=O(\sqrt{n})
$$
plug in $n=\sqrt{d}$.
Comment: @Daniel: yes. The constant grows like $\frac1{1-p}$, so as $p\to1$, the constant gets very big.
Comment: If I wanted to generalize this to other $p \in (0,1)$, the result is $\sum_{k=1}^n k^{-p} = O(n^{1-p})$, right?

Asymptotics for $p$-series with $p=1/2$


Is it possible to hack facetime call?

Question: Me and my girlfriend are using facetime regularly for talking. I'm worried if anyone can hack our Facetime calls and record our videos? Is it possible? How safe is Facetime?
Comment: First tell us how you making the call. Are you on safe (private) internet or in Starbucks.
Comment: Hi Thanks for the comment.. We make calls in our mobile data connection and sometimes in home wifi..
Comment: I think w have enough answers here. If the "anyone can hack" has more  specifics then this would be an excellent candidate for further answers. Also the edit should have one clear question, not three.
Answer: FaceTime is quite secure. In Feb 2014, Apple published a white paper on the security used in various iOS services, which finally brought to light some of the features that others had previously inferred or guessed at. The section for FaceTime states:

FaceTime is Apple's video and audio calling service. Similar to iMessage, FaceTime calls also use the Apple Push Notification Service to establish an initial connection to the user's registered devices. The audio/video contents of FaceTime calls are protected by end-to-end encryption, so no one but the sender and receiver can access them. Apple cannot decrypt the data.
FaceTime uses Internet Connectivity Establishment (ICE) to establish a peer-to-peer connection between devices. Using Session Initiation Protocol (SIP) messages, the devices verify their identity certificates and establish a shared secret for each session. The nonces supplied by each device are combined to salt keys for each of the media channels, which are streamed via Secure Real Time Protocol (SRTP) using AES-256 encryption.
Answer: FaceTime calls are encrypted sufficiently for most anyone's needs. FaceTime's encrypted stream acts underneath any other WiFi encryption that might also be present. If you feel that end-to-end data streams encrypted with unique keys for each recipient is safe, then I'd say have fun with FaceTime.
Someone with special skills, tools and time could probably crack it, but you probably don't have a high enough profile to be worth the time/effort.
Comment: Even if one COULD pull it off, what über top secret information would someone find over a FaceTime call? I couldn't find a less professional way to transmit sensitive data. I lied, snap chat might be a bit worse.
Comment: @shnan If this answer solved your question, click the checkmark next to it.
Comment: I would add that everyone should assume anyone that operates your network can and will record all of the packets - so the fact that you are communicating with another device - for how long and what volume of data is being transmitted is able to be captured, logged and analyzed at a later date. Whether someone is motivated to try to crack the encryption keys used depends on whether you and your girlfriend are otherwise famous or of interest to people that want to know what you are saying or showing.
Comment: I'm the type of person who hacks network systems just for the lolz, regardless of how insignificant they are :P A lot of people seem to freak out about the security of their data, when in reality, they're insignificant enough to be safe lol
Comment: Agreed that the fear of being insecure pales in comparison with the risks in many cases. It would be interesting to see what was necessary for a successful MITM attack on FaceTime given how Apple has engineered the certificate end points. For most, I'd say securing their phone physically would be worth more attention that whether someone can eaves drop on a FaceTime call.
Comment: Hi thanks for the comment.. You clarified some of doubts.. Much appreciated..
Answer: As far as I have read, you should assume your Facetime traffic is completely unencrypted. There have been assertions by Apple of encryption (the ZDNet article linked above), but they talked about using WPA2. WPA2 has nothing to do with encrypting the voice/video traffic. WPA2 is about making wireless connections to an access point private. Your Facetime traffic is sent to the AP, then to your router, then to your ISP's router then all over the place before it gets to your gf's home network or cellular provider/device. I should note that I have not done a protocol analysis of the Facetime protocol; I'm going by the published statements.
Saying that WPA2 answers the question is like being confident in transporting large sums of money to the bank using an armored truck only between the loading dock and the edge of the parking lot and then putting the money into a Corolla and driving it the rest of the way to its destination.
Comment: This is incorrect. The article from ZDNet quotes an Apple rep:

"In addition to your existing infrastructure each FaceTime session is encrypted end to end with unique session keys."

ZD's remarks about the devices themselves being HIPAA compliant themselves relate to the level of security the users chose for their wireless infrastructure and do not pertain to Facetime itself. The article is vague when identifying that as the actual topic, since the conversation was spurred from FaceTime security.

Is it possible to hack facetime call?


PWM or Phase Control Dimming?

Question: I want to dim a lamp around 70W or more using arduino. I have found two ways for doing that. The first one is to make a circuit that "cuts" the sine wave and produce the dimming effect (link). The other way is to make a circuit that uses a PWM pin to dim a lamp (link). So what is the best solution and why? In my opinion the one with the PWM pin is better because it uses only 2 cables to send signal to the circuit and it is much easier in coding.
Comment: Cutting the sine wave is a form of PWM. It just happens to be synchronized with the existing waveform.
Comment: Heah but my questinon is more like "what are the advantages and disadvantages of each solution"
Answer: Phase control for AC Mains dimming is old but proven technology.  This is, of course, PWM control that just happens to be synchronized with the incoming AC Mains waveform.
That said, you can try using a non-synchronized PWM but you need to be aware that you may run into frequency beating problems. That is: if your PWM frequency is not harmonically related to the Ac Mains frequency, you may see the difference in frequency as a low-frequency beat.  This will cause the lamp brightness to vary at a periodic rate.
I honestly don't know how well non-synchronized PWM will work. I hope that you try it and let us know how well it works.
Comment: What do you mean by saying beating problems?
Answer: In terms of a solution to controlling a lamp with arduino, I would recommend buying a proper module to do this for you rather than constructing your own mains powered circuit, both for safety reasons and for saving you time. But below are a few comments on PWM vs phase control.
One of the benefits of phase controlled switching is to do with EMC (electro-magnetic [noise] compliance) and filtering. Only the leading edge (turn-on) needs to be filtered and it is easy to do this with a inductor. The trailing edge (turn off) does not need to be filtered because this doesn't happen until the current is very small.
When there are trailing edges (turn off) with current still flowing, an inductor filtering on its own will only cause greater voltage spikes which is not good. So for PWM which has current flowing during on-to-off transitions a more complex filter network is required to prevent high voltage spikes and to prevent excessive current slew rates to limit EMC noise.
PWM introduces many times more switching transitions which increases the attenuation requirements of filtering - because noise power is related to the number of transitions. The fact that the PWM frequency is higher and pushes the noise into higher frequencies benefits the filter circuitry, as a filter with a higher cut-off frequency can be constructed with smaller inductance and/or capacitance values. But on the other hand greater attenuation is required due to the increased noise power due to the increase in switching transitions.
The main complications for software control of phase angle control is: #1 synchronising the software to the AC waveform (aka zero-crossing detection); #2 translating a power level in percent into a phase angle. This is going to be load dependant, but assuming a simple resistive load the power is roughly something like 1-cos(2angle[deg]). so angle[deg] = 0.5arccos(1-(power[%]/100)). - don't quote me on it though! You can probably approximate this by using a small lookup table and interpolate values.
There are alternative phase control circuits that use analogue means for working out the switching angle. They could save you needing an additional microcontroller input for zero-crossing detection. you would need to provide an isolated analogue voltage to such circuit which you could do via an opto-isolator using PWM and an RC filter - sorry I haven't provided any examples of this.
The downside of phase angle control is that it causes more harmonic distortion on the power line and has lower power factor - so it introduces more noise onto the mains supply. If you've ever used audio gear near dimmer switches you will know what I mean by more noise.
I am not sure about the circuits you referenced, the phase angle circuit looks like it is missing key features such as filtering components. Also I'm not sure the PCB design has implemented mains voltage safety requirements such as creepage and clearance distances - I would be cautious using this circuit with mains voltages.

PWM or Phase Control Dimming?


How to remove spaces in only the top row in excel?

Question: I want to clean up some data that's having trouble importing into Arc.  I want to know a way to clear spaces in only the top row in excel.  Sometimes there is one hidden before or after the row name and it causes Arc to import them incorrectly.  It will return an invalid SQL statement when it tries to draw in Arc.  I'm using ArcGIS 10.2.2.
Comment: If you are dealing with a lot of messy data have you seen what was called Google refine? Have a look [here](http://openrefine.org/).
Comment: Save as CSV, then nothing is hidden and all formulas are calculated, edit in notepad (or your choice of text editor) which will do find & replace but it's just as easy to do the top line manually. After you're done import to personal geodatabase or file geodatabase format, Excel can have hiccups in ArcMap.
Answer: You can use the Replace function detailed in this guide:

Remove all spaces with the Replace function
Sometimes, we want to remove all spaces between character and numbers
  in a range, we can use Replace function to solve it.

Highlight the range that you want to remove all spaces.
Click Home > Find & Select > Replace…, the Find and Replace dialog box will pop out.
In the Find what box, press the space bar once, don't input anything in the Replace with box, then click Replace All. There will
  be a prompt message telling you how many spaces have been removed. See
  screenshot:


converting lines to json in bash

Question: I would like to convert a list into JSON array.  I'm looking at jq for this but the examples are mostly about parsing JSON (not creating it).  It would be nice to know proper escaping will occur.  My list is single line elements so the new line will probably be the best delimiter.
Comment: BTW, the -1 wasn't me, but if I had to guess as to why it's there, it's probably the "please do my work for me" scent this (otherwise useful and worthy, hence my answer) question gives off. Showing your work and issues you've hit trying to solve this yourself would avoid that.
Comment: thank you, yes I did google around.  I was looking for a small one-liner maybe something I missed in the `jq` man pages.  Thanks for the feedback, that up-vote was me.
Answer: I was also trying to convert a bunch of lines into a JSON array, and was at a standstill until I realized that -s was the only way I could handle more than one line at a time in the jq expression, even if that meant I'd have to parse the newlines manually.
jq -R -s -c 'split("\n")' < just_lines.txt

-R to read raw input
-s to read all input as a single string
-c to not pretty print the output

Easy peasy.
Edit: I'm on jq ≥ 1.4, which is apparently when the split built-in was introduced.
Comment: I like this answer except that for a multi-line output that has a trailing newline(\n), the `split` built-in function will yield an extra empty string item in the array :( Anyway to fix that?
Comment: My current hack is to repipe it into `jq` to use its slicing feature ¯\_(ツ)_/¯
`echo $(jq -R -s -c 'split("\n")' < urls.txt) | jq '.[:-1]'`
Comment: Consider `'split("\n") | map(select(length > 0))'` to remove empty lines, too.
Comment: Unfortunately, the `jq` documentation doesn't say when each built-in function was introduced, nor does `jq --version` tell me what version I've got, but it's at least 1.4, installed with `brew install jq --HEAD`. Good point, though, I'll edit the answer.
Comment: Looks easy .. I can't verify though.  I get an error on ubuntu jq version 1.3 `error: split is not defined`
Comment: @Devy one way could be to remove the trailing newline before processing. But how do I remove the string quotes that arise after this command?
Comment: How do you reverse this to original?
Comment: @user31986 `... | jq -r '.[]'` will dump a JSON array of strings to newline-separated lines, without quotes (because `-r`).
Comment: `cat lines.txt | jq -s -R 'split("\n")[:-1]'`
Answer: --raw-input, then --slurp
Just summarizing what the others have said in a hopefully quicker to understand form:
cat /etc/hosts  | jq  --raw-input .  | jq --slurp .

will return you:
[
  "fe00::0 ip6-localnet",
  "ff00::0 ip6-mcastprefix",
  "ff02::1 ip6-allnodes",
  "ff02::2 ip6-allrouters"
]

Explanation
 --raw-input/-R:

       Don´t parse the input as JSON. Instead, each line of text is passed
       to  the  filter  as  a  string.  If combined with --slurp, then the
       entire input is passed to the filter as a single long string.

 --slurp/-s:

       Instead of running the filter for each JSON object  in  the  input,
       read  the entire input stream into a large array and run the filter
       just once.

Answer:
You can also use jq -R . to format each line as a JSON string and then jq -s (--slurp) to create an array for the input lines after parsing them as JSON:
$ printf %s\\n aa bb|jq -R .|jq -s .
[
  "aa",
  "bb"
]

The method in chbrown's answer adds an empty element to the end if the input ends with a linefeed, but you can use printf %s "$(cat)" to remove trailing linefeeds:
$ printf %s\\n aa bb|jq -R -s 'split("\n")'
[
  "aa",
  "bb",
  ""
]
$ printf %s\\n aa bb|printf %s "$(cat)"|jq -R -s 'split("\n")'
[
  "aa",
  "bb"
]

If the input lines don't contain ASCII control characters (which have to be escaped in strings in valid JSON), you can use sed:
$ printf %s\\n aa bb|sed 's/["\]/\\&/g;s/.*/"&"/;1s/^/[/;$s/$/]/;$!s/$/,/'
["aa",
"bb"]

Comment: Rather than slurping the inputs in a separate call, just throw the raw inputs into an array.  `jq -Rn '[inputs]' input.json`.  These are both equivalent: `jq -s '.' input.json` and `jq -n '[inputs]' input.json`
Comment: When pipeing from `jq` to `jq` pretty printing is not necessary: `jq -cR . | jq -s .`
Answer: Update: If your jq has inputs you can simply write:
jq -nR [inputs] /etc/hosts

to produce a JSON array of strings.  This avoids having to read the text file as a whole.
Comment: Adding `-n` makes it not skip the first line – it avoids consuming the first input separately.
Comment: This also gets around the issue with an empty element if the input ends with a newline character.
Answer: I found in the man page for jq and through experimentation what seems to me to be a simpler answer.
$ cat test_file.txt | jq -Rsc '. / "\n" - [""]'
["aa","bb"]

The -R is to read without trying to parse json, the -s says to read all of the input as one string, and the -c is for one-line output - not necessary, but it's what I was looking for.
Then in the string I pass to jq, the '.' says take the input as it is. The '/ \n' says to divide the string (split it) on newlines. The '- [""]' says to remove from the resulting array any empty strings (resulting from an extra newline at the end).
It's one line and without any complicated constructs, using just simple built in jq features.

converting lines to json in bash