Functionalization of nanoparticles

Question: I want to functionalize silver nanoparticles with thiol group.
My question is "how can I find that the thiolated compound is attached to the surface of nanoparticles or not?"
Answer: If the thiolate bounds to the Au nanoparticle, both the electronic, as well as the mechanical properties of the thiolate and the Au nanoparticle change.  So you are going to monitor these changes with a spectroscopy susceptible to this, comparing the spectra of the pure starting materials with the one(s) of the decorated NP.
One of the easier available techniques is to rely on FT-IR spectroscopy, as by the established bond between the two partners, some absorption bands newly appear, and others change their position.  The former are the ones more easily taken as a quantitative reference, too (because yes, IR spectroscopy allows both qualitative, as well as quantitative characterisations, too).
In the instance of Au NP, to check for a bonding of the NPs to the mercapto decoration is possible both by IR spectroscopy, as well as by (surface enhanced) Raman spectroscopy.  In a work deploying $\omega$-mercaptoundecanoic acid (MUA) by Tripathy and  Yu, the later was the preferred check to monitor the S-Ag interaction:

(source, doi 10.1016/j.saa.2008.12.004, Spectrochimica A, 72, 2009, 841-844).
Similar as in the case of the Au NP (vide infra), the key feature is the disappearance of the S-H vibration.  To quote from the section about their characterisation by Raman spectroscopy:

The most interesting feature was the disappearance of S–H stretching
  ($\pu{2547 cm^{−1}}$) peak. The disappearance of S–H stretching indicated the covalent interaction of sulphur and silver, which is in good agreement with the FT-IR data [16]. However some of the expected peaks such as C–Sgauche stretching could not be identified which may be due to their low intensity values.

the earlier answer, erronusly about Au NP
As an example, were gold nanoparticles were decorated by dodecanthiol (DT) chains:

(source, Sharma et. al. in Indian Journal of Pure & Applied Physics
52, 2014, 93-100.)
Other than the absorption band at $694$ and $\pu{728 cm^{-1}}$, the authors equally draw attention that

the "S-H vibration band at 2576 cm−1 for pure DT is observed while it is almost absent for AuNPs. This suggests that as the thiol gets bound onto the  surface of gold, the S-H bond of thiol breaks in order to form the S-Au bond." (loc. cit., p. 97).

It may be helpful to mention that short wavelengths of light ($\pu{< 400 nm}$) may break the $\ce{Au-S}$ bond between nanoparticle, and thiol, hence if you doubt the presence of thiolate decoration on the NP, select an absorption band and monitor its attenuation while shining the short wavelength light on the sample.
And complementary to IR spectroscopy, is Raman spectroscopy.
Comment: @airhuff Sorry, this was an error by mine.  I found a work including spectra of the two worlds (IR and Raman) of Ag NPs and mercaptans and added this ahead of the section of Au NPs.  Of course the best were to have an example "same mercaptan, once to decorate AgNP, the other on AuNP" that however I did not find (yet).  On the other hand, attenuation of the SH-stretch appears to be (again) the indicator.
Comment: @Greg The error to display Au instead of Ag is on my side; by an edit I rectify for the situation. The later surfacing answer by #Vic Lineal offers a sound additional insight, appreciated by a tip to the hat (+1), too.
Comment: Nice answer. My only comment is that the OP specifically refers to Ag nanoparticles, whereas your answer exclusively discusses Au nanoparticles. How do you think the FTIR spectra in particular would compare between and Ag and Au analogs?
Comment: I find it kind of ironic that if there is a question explicitly asking about silver nanoparticles, the answer that exclusively talks about gold, gets upvoted, while the one that tells silver is different from gold, gets the downvotes. Nice answer by the way.
Answer: It's complicated, because there is no general pattern of reactivity for thiol compounds and silver nanoparticles (unlike, say, gold nanoparticles, for which the reaction with thiols is widely studied and understood). The chemistry and local structural changes are varied; cysteine for instance is known to form well-defined layers around silver nanoparticles, but unfortunately it also tends to aggregate them. Different thiols vary in the local surface chemistry they produce - some generate $\ce{Ag2S}$-like layers, and that can compromise the stability of the nanoparticles.
I'd suggest reducing the list of possibilities to the reagents you can use and then looking for literature to see how they characterise the reaction.

Functionalization of nanoparticles


Combining Different Models

Question: I have N models, each of them are used to predict on a set of data.
I am currently combining their predictions by averaging across rows.
Need suggestions on combining their predictions. End goal is to classify the samples.
Comment: Do have a look at these threads : https://stackoverflow.com/questions/46074668/what-is-the-difference-between-ensembling-and-averaging-models

https://stats.stackexchange.com/questions/255230/how-do-ensemble-methods-outperform-all-their-constituents/255233

I think it would really help if you could elaborate on what is the problem you are solving and the machine learning technique you are using to solve, in order to answer the question.
Answer: Part of the problem lies in how much data you have. To create a second level of complexity, you ideally want to use a holdout data set to decide the right combination for the model predictions. If you use the training data from the models themselves to also combine the model output, you risk over fitting your final model. If you have a small data set, trying to build an ensemble on top of it might lead to worse performance in deployment since the model is only memorizing the training data. In that case, a simple average might do you better than trying to anything more sophisticated.
But, assuming you have more data to use, or if you want to use the data you trained on anyways, you can either design a weighted average or create a second model.
If you have an idea of which model performs better, you might want to try manually assigning weights for each model's output. A simple average assigns an equal weight to each output, but you can experiment with shifting the weight around a bit.
For an example, given two models, a basic average yields
new_pred =  0.5 * mod_1  + 0.5 * mod_2

However, if you see the performance on model one does better overall, you might shift the average to
new_pred =  0.9 mod_1  + 0.1 mod_2

If instead you want to create a second model, you can try using any machine learning model suitable for classification.  I would probably stay away from larger models like Random Forests, but doing something like using the predictions as features into a Logistic Regression model can work well. But again, I would emphasize only trying to use the predictions from a holdout data set into the logistic regression model to make sure you aren't over fitting.
Answer: Is it a classification problem or a regression problem?
If you use average you assume equal weight for each model. You can use cross validation to identify what weights work best for you.

Combining Different Models


Can concentrated sulfuric acid oxidize iron(II) to iron(III)?

Question: Can concentrated (18 M) $\ce{H2SO4}$ oxidize $\ce{Fe^2+}$ to $\ce{Fe^3+}?$ Or does it actually block the oxidation? I read in some forum somewhere that in order to prevent $\ce{Fe^2+}$ from being oxidized, one should acidify the solution. I don't know if that's the reason why we added $\ce{H2SO4}$ in our $\ce{Fe^2+}$ solution. But then again, isn't iron(II) unstable in the presence of acid and water? And will it oxidize?
Comment: Welcome to our site!  Please note that Chemistry.SE is a formal place and informal language is usually frowned on, [especially the use of expletives.](https://meta.stackexchange.com/questions/22232/are-expletives-cursing-swear-words-or-vulgar-language-allowed-on-se-sites)
Comment: Please control your language. It does not contribute anything. There are good teachers and bad teachers in the whole world.
Comment: @M.Farooq Complete edits are appreciated better!
Comment: @M.Farooq I'm really sorry I'm new to this site I'll mind my wordings next time thank you so much for pointing that out
Comment: Which reaction are you talking about, i.e. what is the oxidation agent? Sulfuric acid is usually not classified as oxidizing acid (nitric acid, in contrast, is).
Answer: The explanation given to you is rather incorrect. Dilute sulfuric acid is added to iron(II) or even iron(III) salts is added to prevent hydrolysis of the salts. What happens when you don't add an acid to iron(II) solution in water. With time, you will see that a brown precipitate is forming and settling to the bottom. Iron forms hydroxides which are very quickly oxidized by dissolved oxygen (not by dilute acid) to a brown rust colored product.
As a result, the concentration is no longer the correct concentration. The same job can be done adding a small amount of HCl so there is nothing special about sulfuric acid. Chloride salts are even more prone to hydrolysis that's why iron(II) chloride or iron(III) chloride are never used for solution preparation.


Can I populate a Sharepoint calendar with an Outlook shared calendar?

Question: I haven't been able to figure out how to populate the Sharepoint calendar with the shared calendar from the Outlook 2007 accounts connected to Sharepoint.  Is this possible, or does the Sharepoint calendar have to be separate?
Answer: You can always add an overlay on the existing sharepoint calendar:
http://office.microsoft.com/en-us/sharepoint-server-help/work-with-multiple-exchange-and-sharepoint-calendars-in-one-sharepoint-calendar-HA101777171.aspx
Maybe this is a solution
Answer: I found this: http://www.dlocc.com/articles/import-outlook-calendar-to-sharepoint/comment-page-1/#comment-2569
I have to admit though, I didn't get it to work. If I add an event in Outlook it doesn't get added to the SharePoint calendar. Some comments in the blog say it works though, give it a try. If you figure it out, please let me know.
Comment: Thanks for your article.

Unfortunately, that requires the user to go and copy all the appts periodically and bring them into Sharepoint.  I'm hoping for a way to have it automatically update.  Like you said, it won't keep updating added events.
Comment: Yeah, sounds like we're having the same problem, heh.


Is Jesus Christ ever mentioned in Supernatural?

Question: From what religious perspective is Supernatural aproached? I've seen god, Lucifer, darkness (Amara), angels, demons... pretty much all levels from heaven to hell. Is Jesus ever mentioned? If he does exist in that world, how come he hasn't showed up to clean daddy's mess?
.
Comment: http://supernatural.wikia.com/wiki/Jesus_Christ
Answer: To answer your questions more or less in order.
From what religious perspective is Supernatural approached?
Simultaneously none of them and all of them. Confused? I'll explain.
The monsters that the Winchesters and other hunters face cover a wide spectrum from the Native American  Wendigo to the Japanese Shojo. Interestingly, most of the monsters they face have weaknesses based on the culture they hail from. For example, Wendigo was held back by Anasazi symbols while Shojo could only be killed by a sword blessed by a Shinto ritual.
There doesn't seem to be a one size fits all kill method (not counting the Colt) or a faith/culture that is supreme over the others (though some creatures are naturally stronger and I'm getting to that).
We also see that Pagan gods exist from many pantheons Hindu, Canaanite, Norse, Celtic and Greek to name a few.They are not simply dismissed as "monsters" posing as something more than they are but are recognized as gods. Lucifer is able to kill some of them easily but that only speaks to how much stronger he is.
Is Jesus ever mentioned?
Yes, and it seems that Christian rituals have just as much power over Christian monsters as rituals from other cultures have over their monsters. For example, in Houses of the Holy, Sam uses a Christian seance to summon the spirit of Father Gregory. Also, before the boys learned the Enochian Exorcism, they used a version of Psalm 68 from the Christian Old Testament.
But that isn't directly mentioning Jesus
You're not wrong. So let's look at some quotes that put Jesus into perspective.
From And Then There Were None

Rick: This emptiness you feel inside -- it's really a hunger for him.
Eve: You do know that Jesus was just a man.

This is important because Eve was stated to be older than the Angels, meaning she was alive when Jesus walked the Earth and presumably knew more about Him than a trucker somewhere in the Midwest.
From The Future

Dagon: You get the chance Mary of Nazareth, Part 2, Evil Jesus Edition.

Here, we have one of the most powerful demons in existence, apparently, recognizing the power that Jesus has/had and is seemingly happy that "this time" that power will be used for evil.
If he does exist in that world, how come he hasn't showed up to clean daddy's mess?
There are a couple of options here all of them are based on the fact that God/Chuck didn't fix the problems.
Option 1: Chuck is Jesus

In the Christian Trinity, The Father, The Son and the Holy Spirit are all God but are separate from one another.
Chuck is identified as God but not specifically as God the Father. It is heavily implied that Chuck is God the Father in that the angels all refer to him as such but not stated outright
The entire Trinity existed BEFORE the first angel was made. In fact, the First Council of Nicea found

that the Son was true God, coeternal with the Father

This all leads to the possibility that ANY Person of the Trinity would be recognized by the angels as their Father.
In Exodus 33:19-20, God (presumably the Father) said that nobody could see His face and live. However, when Jesus (God the Son) was born as a human, nobody died when they looked at him even when he was transfigured.
The accounts of the Transfiguration in the New Testament describe Jesus becoming a bright light. Similarly, in Don't call me Shurley, Chuck reveals who he is by becoming a bright light.

So if Chuck is Jesus, this explains pretty well why he didn't clean up the mess. It was what he wanted.
Option 2: Chuck is not Jesus
In this option, Chuck may very well be God the Father or, somehow, the entire Trinity represented as one guy (blasphemy!). In this case, you're essentially asking why God (the Son) has not come to Earth to undo what God (the Father) has done, fix what God (the Father) left broken etc.
Presumably, God has his reasons and no Person of the Trinity will act against the will of another because it is their shared will as God.
What about Joshua?
In spite of some fairly significant circumstantial evidence that Joshua is meant to be Jesus, I feel like that's a bit of a stretch considering that Joshua was killed by (an admittedly very powerful) demon indicating that he was just an angel.
It should be noted that whether or not this answer is correct depends on the Christian/Catholic Church evolving the same way in the Supernatural reality as it did in ours
Answer: Jesus is kind of mentioned in Supernatural. In the episode "Dark Side of the Moon", Sam and Dean meet an angel named Joshua in heaven. The Hebrew name for Jesus is Joshua so that leads me to think that Joshua is Jesus.
Answer: He was mentioned in A Very Supernatural Christmas:

Dean: Christmas is Jesus's birthday. Sam: No; Jesus's birthday was probably in the fall.

Edward Carrigan: All of a sudden, this Jesus character is the hot new thing in town. All of a sudden, our altars are being burned down, and we're being hunted down like common monsters.

...And Then There Were None:

Eve: What is right for me? Rick: This emptiness you feel inside -- it's really a hunger for him. Eve: You do know that Jesus was just a man. Rick: Sure, but he is also the son of God, sent here because he loves us.

Rock and a Hard Place:

Vesta: It only got pathetic when I started having to do it myself... because of the hippy from Bethlehem. Before him they practically threw virgins at me, and now...

Meta Fiction:

Gabriel: Hey what's up shorties? Remember me? The guy who died for your sins? No, not the cat with the beard and the sandals, the hot one.

Do You Believe in Miracles?:

Sam: There's a homeless encampment. The way the folks talking he's got them convinced he's some kind of new Jesus or something.

As for why he never appeared in the show, per Jensen's words:

"We're not here to tell the story of Jesus Christ. We're here to take that element and use it as inspiration for the story." —Entertainment Weekly, "The stars of Supernatural break down the moments that changed the show"


Handling Datacontext Operations in Timer_Elapsed using StructureMap

Question: Please what is the best way to wire up/use a datacontext object in a timer_elapsed event. I have a datacontext object within a timer_elapsed that runs perfectly the first time but does nothing on subsequent calls of the timer_elapsed event. I understand a new instance is created for every call of the elapsed event on a threadpool thread. How do I control this behaviour or at least get my code to run consistently. Thanks.
This is my structure map config
ForRequestedType<BulkSMSDataContext>()
            .TheDefaultIs(() => new BulkSMSDataContext())
            .CacheBy(InstanceScope.Hybrid);

This is my timer implementation
void _timerSendScheduledMessages_Elapsed(object sender, ElapsedEventArgs e)
    {
        DateTime currentUTC = DateTime.UtcNow.AddSeconds(-DateTime.UtcNow.Second).AddMilliseconds(-DateTime.UtcNow.Millisecond);

        var msgToSend = from c in _messageRepository.GetMessages(MessageTypes.Scheduled)
                        where c.Time == currentUTC
                        select c;

        foreach (var msg in msgToSend)
        {
            int scheduledMsgID = msg.MessageID;
            Response res = _messageService.Send(msg);
            _messageRepository.DeleteScheduledMessage(scheduledMsgID);
        }
    }

Answer: To better control the scope I would change the elapsed event to create a new _messageRepository each time it's called, assuming you pass the datacontext to the _messageRepository that is. Then let structuremap inject your datacontext into it.
Otherwise you end up with a poorly defined unit of work which tends to bring up scoping issues like the one you are having.
Without seeing you implementation though, hard to tell exactly.


What is the ratio of rational to irrational real numbers?

Question: There exists an infinite amount of rational and irrational numbers. But is there more irrational numbers than rational? And if so can a ratio of one to the other be calculated?
Comment: There are in a definite sense more irrationals than rationals. In fact, one could say (informally) that the ratio of irrationals to rationals is infinity. Google "irrationals uncountable".
Comment: As @DavidMitra points out, the set of rationals is countably infinite and the set of irrationals is uncountably infinite, which is a bigger 'kind' of infinity. So, it is in this sense, there are more irrationals than rationals.But about the ratio of their cardinalities, some one should clarify.
Answer: I just want to point out that, in a hard-nosed sense, the ratio of cardinalities $\# \mathbb{Q} / \# \mathbb{R}$ is not well-defined.
What should $\# \mathbb{Q} / \# \mathbb{R} = \kappa$ mean?  It should mean -- shouldn't it? -- that (i) $\# \mathbb{R} \cdot \kappa = \# \mathbb{Q}$ and (ii) $\kappa$ is the only cardinal number which makes (i) hold.
But in fact there are no cardinals $\kappa$ satisfying (i), and this only uses the fact that $0 < \# \mathbb{Q} < \# \mathbb{R}$: we have $\# \mathbb{R} \times 0 = 0 < \# \mathbb{Q}$, and if $\kappa \geq 1$, then $\# \mathbb{R} \times \kappa \geq \# \mathbb{R} > \# \mathbb{Q}$.
(Now you might think: ah, well, you're equally well saying that there's no cardinal number $\kappa$ such that $5 \cdot \kappa = 2$, which is true but only because we don't call $\frac{2}{5}$ a cardinal number.  However, extending the cardinal numbers by adding additive or multiplicative inverses doesn't work so well because the operations of infinite cardinal addition and multiplication are both $\kappa_1 + \kappa_2 = \kappa_1 * \kappa_2 = \max(\kappa_1,\kappa_2)$, which loses all information on the smaller cardinal.  Thus group completions of the relevant Semigroups will be trivial.)
It seems that the claim that (size of $\mathbb{Q}$)/(size of $\mathbb{R}$) $= 0$ is better interpreted measure-theoretically: with respect to Lebesgue measure on $\mathbb{R}$ we have $m(\mathbb{Q})/m(\mathbb{R}) = 0/\infty = 0$.
Comment: I was just sitting here at home thinking about this, and it seems very odd in my mind that, despite there being an infinite number of rationals and irrationals over any interval, we cannot precisely say that for any given number of rationals there exist specifically this number of irrationals. But that would, it seems, necessitate that we compare their positions to the immediate space around them. Therefore, given my earlier statement that there exists an infinite number of irrationals and rationals over any given interval, it should be impossible. This is an interesting question.
Answer: You could see this answer.  There are more irrationals and (depending on your definition) one could say the ratio is zero.
Comment: By "the ratio", is the ratio of cardinality of rational reals to irrational reals meant or something else?
Comment: @KannappanSampath:  Yes, the cardinality of the irrationals is larger, as you can inject the rationals into the irrationals but not the other way.  Since the irrationals are "infinitely larger" cardinality, that gives the ratio zero.
Answer: the set of all rationals can be "listed" (they are a subset of all pairs of integers) while the real numbers say between 0 and 1 cannot be listed.  say you had such a list of all real numbers between 0 and 1 written in decimal notation
$$
0.123456789...
$$
$$
0.267489022...
$$
$$
0.657748930...
$$
$$
...
$$
we can construct a number not on the list in the following way.  the first digit after the decimal choose to be something other that the first digit of the first number in the list (in the above, something other than 1).  the second digit will be something other that the second digit of the second number on the list (something other that 6 above) and in general the $n$th digit will be something other than the $n$th digit of the $n$th number on the list.  we can be sure that the number is not on the list by comparing our new number against the numbers in the list.  our new number will be different from the $n$th number on the list in the $n$ decimal digit, hence not the same number.
Comment: @TheGreatDuck tell that to Cantor.


Space opera book about a group of adventurers

Question: It consisted of three or four stories, I remember one story: on a planet where the biggest casino is located a monster appears every night, and kills(steals?) one person. In this story main character is not the leader of the group, but a guy who was locksmith and hacker and spent a lot of time in casinos when he was younger. I read this in ~2000-2005, but the book is from ~80s I think.
Comment: The setup rings a bell: what about the other characters in the group of adventurers? Any memories on the other stories?
Comment: see also https://scifi.stackexchange.com/questions/51005/a-book-featuring-the-superweapon-akka (about the first story in the series)
Comment: Very little. In first story their leader was captured by aliens and escaped something like prison. I think he also piloted some trading spaceships, but I'm not sure about this. Also aforementioned guy(locksmith) always tried to bamboozle other members because he didn't want to go back to jail, so he tried to hide after mission was complete, but I'm not sure about this also.
Answer: Three From The Legion by Jack Williamson (1979)
The third story is "One Against The Legion". In the casino space station, the villain makes good his threat to kill the top winner, each night. He uses a teleportation machine. The Legion sends their top team, including Giles Habibula, master lockpick and former con man. The casino was created by an old acquaintance of Giles, indeed many of the cheats in the gambling machine were invented by Giles.
When Giles tries to thwart the villain, the winner is kidnapped, and a large monster is left in his place.
The leader was a member of the Legion, who was framed by the villain years ago. Leader escapes prison and travels space in an attempt to clear his name.
Comment: Whoa! That is a grell!
Comment: Your answer is a little bit misleading.  Three From the Legion contains three novels and one novelette with characters from the Legion of Space series.  The copyright dates are listed as 1947, 1950, 1950, and 1967.   So One Against the Legion was first published 29 years, a generation, before 1979.


Suddenly created meshes are invisible (even though they are checked as visible), cannot create any new objects now

Question: as the title states I am suddenly unable to create any new objects, when i select a mesh from the "create" bar nothing noticeably happens, other than the object name appearing in the list in the top right hand corner of the screen, i cannot edit the object, view the object, or do anything at all to it, this happened suddenly part way through a project and has caused me to be unable to continue, it's driving me nuts and I cannot for the life of me see why this has suddenly happened, im sure i must have accidentally pressed a keyboard shortcut for something, but i do not know what, any ideas?
Comment: Are you in local mode? Press the **/** key.
Comment: can you add a snapshot or a blend file?
Comment: Try centering your view on the objects. Press 'Numbpad .' (Period).
Comment: it could also be that the far clipping plane of the viewport is cutting off objects that are beyond it.
Answer: You probably activated Local View by pressing Numpad/.
When that happens you can only see and edit the selected object.
Press Numpad/ again to exit (or press the Space Bar and type Local view)
Comment: yes this was it! thank you so much, in the end i actually exported everything as a collada and then re-imported into a new file :\ but just went back and checked and this was what had happened, thank you this will help me avoid doing the same thing in the future
Answer: Is your 3D cursor visible in the viewport? If not then the objects are probably wherever the cursor is.


Last edited by tag?

Question: I have a report area on an EE site that shows specifics about entries in a channel, and was wondering if there was a way to show who edited that entry last? I am using the {edit_date format="%m-%d-%Y} to get the date/time it was modified, but it would be nice to know which user modified the entry. We have numerous backend admins with various priv's to maintain things.
Answer: EECMS just saves the IP of who edited an entry, not his or her member_id.
You can try the Audit add-ons:

Audit Pro, which lets you archive logged data, set custom email notifications and search log entries;
Audit Tags, which lets you output Audit's logged data in your templates.

The add-on can be found on github as well.

Last edited by tag?


Automated speech to text layer subtitles in After Effects

Question: Hi I have a video in After Effects that I want to add subtitles as text layers. Previously  I have been typing them out manually. Does anyone know of a way to either automate the subtitling process or any ways to improve the efficiency.
Answer: Updating this answer to include Premiere's very effective built-in transcription service:
Your best bet now is probably to finish your video in After Effects, then import it into Premiere, and transcribe it, then add captions, and export it.
If you still want to edit the transcribed text in After Effects, you can export the subtitles from Premiere as an .SRT file, and import them into After Effects, as explained below:
Other methods:
Assuming it's a video you are happy to make public, you could publish it through youtube and gather the subtitles from there as an .srt file.
Be aware that automatically generated subs tend to have mistakes in them.
You could manually make subtitles using a free tool like Aegisub
Or you could pay a fee to a company like 3playmedia to generate the subtitles for you.
Once you have the subs as an .srt file:
Then to apply them in After Effects as burnt-in text, you could use a tool like PT_importsubtitles to convert the .srt file to timed text layers.


SMS Character Limit with AMPScript

Question: We're using AMPScript to create a send log for all email and SMS sends. In MobileConnect, I can include the AMPScript and the SMS text fine and it's reported as one send however, when using Journey Builder to create SMS content and adding the AMPScript, it reads it as SMS message text and so is being sent as 5 or 6 messages instead of one. My example SMS was recorded as three sends in the Send Log. Is this normal for Journey Builder and SMS functionality?
Comment: Are you including the ampscript directly in your message? Or are you storing it in a code snippet content block, and referencing it using e.g. contentblockbykey ampscript function?
Comment: Hi @LukasLunow Yes in this instance the AMPScript is being added directly to the SMS content. Can code snippets and reference blocks be used in SMS?
Comment: You can use the ContentBlockbykey function in a SMS message but need to be sure that you call only Code Snippets with AMPscript and/or text in them. The other content block types utilize HTML which will not render in a SMS message. This should reduce the overall number of characters in your message.
Comment: Thanks @LukasLunow this seems to have resolved the issue. It's taken the character count down from over 500 (all AMPScript) to 31 and is then tracked in the send log as one send instead of 4
Comment: Great! So I thought. I have added this as an answer to your question. Please click on the checkmark on the left side, to mark the answer as accepted. Thank you
Answer: You should place your Ampscript in a code snippet content block, and reference it in your SMS message using <code>%%=ContentBlockByKey()=%%</code> function. This will greatly reduce the character count, as the Ampscript placed in the content block will not count towards your limit.
You need to be sure that you call only Code Snippets with AMPscript and/or text in them. The other content block types utilize HTML which will not render in a SMS message.
This should resolve your issue and allow you to log it as a single message and not as multiple.

SMS Character Limit with AMPScript


Overlaying image with text and filling the text in Illustrator

Question: I got a simlar problem as this one. How do I do this if I'm using a image as the background? After I tracing and expanding the image I'll use the way described above, the one with "This is text". This doesn't work. I mean it does kind of work put the text is diveded into many little pieces. Very hard to work with.
It there any other way while doing this with an image as the background?
Comment: It's difficult to pinpoint what you're trying to do but have you tried [JohnB's solution](http://graphicdesign.stackexchange.com/a/20128/13197) (below the one you've mentioned) that uses blend modes?
Comment: I don't understand the question at all.
Answer: Interesting question - but there's an important distinction that needs to be made.  Once you trace and expand an image - as you describe - it's no longer an 'image' in the photographic/pixel-based sense.  It has been converted to a vector-based representation.
With that in mind, one solution to achieve this (without dividing the text into lots of pieces), is to use a pathfinder operation.  Here's how;
1. With your text in front of your object/image, open WINDOW > PATHFINDER.  Make sure both items are selected and ALT-click (or OPTION-click, if using a Mac), on the fourth Shape Mode, 'Exclude'.

Visually, this will look largely identical to the example you've presented in your original post.  However, because you've ALT/OPTION-clicked, this will create a compound shape - and the text can be moved about, edited and otherwise manipulated by simply drilling down to it in the layers panel.  The text has NOT been divided into any pieces, so it's extremely convenient for this kind of purpose.

If you had instead converted your text to paths and used the regular Exclude pathfinder operation (without ALT/OPTION-Clicking), you would have nothing like this kind of flexibility.
Also note that the fill and stroke attributes are applied throughout your newly-created compound shape from the front-most item (in this case, the text), which is probably what you've already noticed.
2a. Now, let's consider the same issue with an expanded image.  I don't have your bird logo or texture, so I'll just use something else.

Here, I have a text layer, as before, and an image that has been traced, expanded, united and converted into a compound path using Exclude.  Uniting and converting to a compound path is not strictly necessary - the group of paths that resulted from the image trace would have worked equally as well, but I prefer to keep things tidy.  Also, it may be necessary to remove any white or redundant fills from your group before applying either pathfinder operation, or results may not be as expected.
2b. As before, with your text in front, select both your text and your compound path or group.  ALT/OPTION-Click on Unite to create a compound shape.  You should see something like this;

2c. Now, in the example you've used, you appear to have used a texture instead of a vector-based pattern or fill.  We can simply apply a pattern swatch to the fill of our new compound shape to do this.
Here's how: place your pixel-based image into your project and drag it into your swatches panel in order to create a pattern swatch.  You can now delete or hide the placed image if you wish.

2d. With your compound shape selected and the fill color active (otherwise you'll create and apply this to a stroke ...), click on your new pattern swatch to apply it to your compound shape;

2e. You'll notice that, in my case, even though the texture is large enough to completely cover my compound shape, it repeats toward the bottom, creating an ugly break.  This is because my pattern swatch has begun its repetition at the top of my artboard - it's not centered within my compound shape.
You can fix this by selecting your compound shape, navigating to WINDOW > APPEARANCE and selecting the patterned fill.  Now click on EFFECT > DISTORT & TRANSFORM > TRANSFORM to bring up the 'Transform Effect' window.
With the 'Preview' box checked (to make your changes easier to see), make sure that the 'Transform Patterns' is selected - but 'Transform Objects' is UNchecked (otherwise you'll move the entire compound shape, which is no good for what we're trying to do).
You can now use the Move > Vertical section in order to shift the placement of your pattern fill (or horizontal, or scale, if you wish).

In this way, you'll be able to use a pixel-based pattern/image on a traced and expanded background whilst retaining fully editable text.
Hope that helps.


Why not to use curve over field of $p^m$ with $p > 2$ for ECDSA?

Question: I'm reading the ECDSA paper and they say you can only use ECDSA with odd-power fields $p$ or with binary fields $2^m$. Why not other power prime fields?
Comment: Which ECDSA paper is that? The NIST one? If so, it is likely that it restricts to $\mathbb{F}_p$ and $\mathbb{F}_{{2}^{m}}$ because those are the only standardized curves.
Comment: In view of recent cryptanalysis advances for $\mathbb F_{2^m}$ type fields, I personally would not trust anything except $\mathbb F_p$ for large $p$. Using $\mathbb F_{p^m}$ has potentially the same risk, that someone might find an index-calculus style attack that lowers the security from $\approx p^m$ to $\approx p$ (and some constants), in which case extension fields would be a waste of effort.
Comment: $\mathbb{F}_{p^m}$ can work, but it is a more brittle choice since a larger number of attacks have to be considered. It is not idiotic, but the (speed) advantages had better be worth it. As of right now, the only fields where there are considerable advantages are of the form $\mathbb{F}_{p^2}$ for large $p$.
Comment: @Bristol: Do you refer to the [work by Wenger/Wolfger](http://eprint.iacr.org/2014/368)? They use Pollard's rho. The work by Joye (et al) uses index-calculus, but is about the discrete logarithm problem in $\mathbb{F}^\times$, not in elliptic curves. What research are you referring to?
Comment: yes the NIST paper @SamuelNeves this makes sense! Any idea if $\mathbb{F}_{p^m}$ for $p > 2$ is just idiotic?
Comment: I'm late to the party, so hello from the future, old friends.
It appears that these attacks (GHS to name one), for large $p$, only become better with $n \geq 6$. E.g. Pollard's rho is still the best way to solve discrete logarithm in $E(\mathbb{F}_{p^2})$ and $E(\mathbb{F}_{p^3})$. Not mentioning the fact that, in $E(\mathbb{F}_{p^2})$ the order is not necessarily larger (see my answer), but why not.
Could anyone confirm this?
Answer: Form a mathematical point of view, one can define ECDSA over arbitrary finite fields.
Form a security point of view, the most important thing is the size of the group order.
Arithmetic is easy in the case
 $GF(p)$.
Arithmetic gets more involved for $GF(p^m), m>1$, because you have to perform polynomial divisions.
Arithmetic in $GF(2^m)$ is easy again, because the polynomial division in $GF(2^m)$ can be done by simple feedback shift registers. This makes it especially well suited for implementation in hardware.
Comment: "Arithmetic gets more involved for $GF(p^m), m>1$..."; actually, the fastest known curve with circa 128 bit security is FourQ; it has $m=2$ (and $p= 2^{127}-1$)
Comment: Exceptions prove the rule. In general, my statement is correct. And, it has surely more complicated arithmetic than standard curves.
Answer: Note that ECDLP over extension fields is not necessarily harder than ECDLP over the underlying field of prime characteristic, simply because for any power of prime $q$, $E(\mathbb{F}_{q})$ is a subgroup of $E(\mathbb{F}_{q^n})$ and, by Lagrange's theorem, $|E(\mathbb{F}_{q^n})|$ is divisible by $|E(\mathbb{F}_{q})|$. If this happens to be the largest factor, then there is no security gained when using the extended curve.
With $n = 2$, one even has that $|E(\mathbb{F}_{q^2})| = |E(\mathbb{F}_{q})|(2q + 2 - |E(\mathbb{F}_{q})|)$ (see e.g. Silverman AOE, exercise 5.13, and in general, see Weil's conjectures).
Now, it is not clear how this applies to ECDSA, since its exact security is not known, so we cannot rule out the possibility of a different way of exploiting ECDSA with the added structure.
EDIT: I should also point out that ECDSA is defined in a subgroup of prime order, and the spec requires to check that the order is prime. It is not clear if security is reduced if the order is (almost) the product of two large primes, but that would be surprising to me.


Would it be possible to build an Arch distribution that used Hard Float support and/or optimised the binaries for ARMv6?

Question: According to the Wiki, the Arch image doesn't use Hard Float support and I'm pretty sure it uses the ARMv5 instruction set. Would it be possible to build a distribution that used Hard Float and ARMv6?
Comment: I'm sensing a new project.
Comment: I asked this over at [the Forum](http://www.raspberrypi.org/phpBB3/viewtopic.php?f=53&t=10901&p=120925) too. Apparently, according to *pepedog*, >Things are happening on this front. New build system is being built, $1500 spent on this, plus need some rpi to test on and to give enthusiasm.
Answer:
UPDATE: Arch Linux ARM now natively supports armv6h so will run optimised on the Pi.  The rest of this answer still applies to other architectures.

Yes it would be possible, but you would have to recompile every piece of software for ARMv6-hard.  Arch have build systems and infrastructure to do this automatically for their supported platforms (ARMv5-soft and ARMv7-hard), so you would need to duplicate this yourself somewhere to build ARMv6-hard versions of everything.
It would be quite possible to do it on a normal desktop PC running Arch, it just takes time to get everything up and running.  You would also then need to track package updates and get your build system to pull down new versions and compile them too, so that your software doesn't get out of date.
If you (or anyone) did this, it would be useful to publish the compiled binaries on a public web site somewhere so that other people can use your new flavour of Arch without worrying about compiling it themselves.
If you did want to undertake this, you would need to familiarise yourself with:

Compiling programs from source
The Arch Build System (ABS) or the Arch User Repository (AUR)
Creating custom Pacman repositories

A good place to start would be to pick some packages off AUR and compile them into your own repository, and make sure you can sync it with pacman.  Once that's done all you would need to do is adjust the compiler flags (for ARMv6-hard) and then repeat for probably all the packages in the default [core] repo.
You could then tell pacman to reinstall every package on your Pi from your new hardfloat repo instead, reboot, and you'll then be running everything from your own hardfloat packages.
Comment: Would Gentoo be an option? portage compiles out of the box and you also can compile the hardfloat into the kernel.
Comment: @Haskeller: Yes Gentoo would no doubt work fine, but Gentoo's philosophy is to compile everything from source locally - which would be exceedingly slow and tedious on the Pi!  Of course any Linux distro can be ported to the Pi with or without hardfloat, it just depends on whether someone will put the effort in to do so, and to maintain the packages over the long term.


Price Sets for different groups

Question: I've installed the group based pricing extension and enabled it, however I can't seem to get it to kick in. The two extra fields that are supposed to show don't appear. I'm using 4.7.7 and Drupal. Has anyone managed to get this extension to work?
Answer: Do you mean this extension:
https://github.com/zengenuity/civicrm_groupprice/blob/master/info.xml
It's info.xml says it's compatible w/ 4.4 - I think that explains why you're having difficulty to get it to work on a 4.7.x
If this functionality is very important to you - the general guideline is:

contact the author of the extension
check with them on possible plans for an upgrade of the extension to a newer civicrm version
and what kind of funding it may take to get it there
Comment: Thanks Karin, i assumed as a newbie to Civi that it might work. Although enabled its doing nothing so my dilemma remains. I have a large lot of branches and each branch needs certain extra price sets over and above of the one price set we all use and I was hoping that each group would have a separate price set and other groups would not be able to see those price sets that didn't relate to them.
Comment: It's good to try - some extensions do work well on officially not supported versions - however not in this case
Comment: Let me amend my answer a bit
Comment: Awesome extension, too bad its not compatible with the latest version.

Price Sets for different groups


Creating a mount point if it does not exist

Question: When using the mount utility, if you specify a directory that does not exist, that is considered an error. Is there any option I can use so that mount points get automatically created if they don't already exist?
Comment: Strange that the mount utility doesn't do this by default. I'm sick of typing: `mkdir /media/USB`, `mount /dev/sdb1 /media/USB`; `umount /dev/sdb1`, `rmdir /media/USB`.
Comment: HERE IS THE ANSWER:  https://askubuntu.com/questions/88523/creating-a-mount-point-if-it-does-not-exist/941726#941726 - instructions for installing `pmount` to prevent this from happening.
Comment: Yep, I too wish this was a feature.
Comment: Yeah, I understand it not doing it by default, similar to "mkdir /one/two/three" won't get created if "/one/two" doesn't exist, but shouldn't there at least be an option to force it with mount?
Comment: I tried pmount, doesn't seem to work without manually running the command with the device. found this, seems to work great (16.04, headless)
https://serverfault.com/a/767079/453980 mounts on boot, and handles hot(un/)plugging
Answer: try this:
if you want to create a Mount Point called DISK1, then type the following command in the terminal :
sudo mkdir /media/DISK1

Comment: Yeah, I was hoping for an option to `mount`, but this is fine, I guess.
Comment: Pulling out the drive then reinserting it will create /media/DISK2 unless you install pmount.
Answer: No, the bare mount utility do not offer such an option.
It is done when mounting from a file manager like Nautilus, though.
Comment: how can Nautilus do it then?
Comment: @AndreaBorga it checks if the directory exists before mounting. If the mountpoint doesn't exist as a directory, creates it and then mounts.
Answer: Install the pmount utility and let it handle /media/user/ mount points automatically.  No more worries about how and where /media/user/ devices mount and by which names.
sudo apt-get update
sudo apt-get install pmount

Then whenever you insert a removable device, it will automatically be mounted under /media/username/, by name.
For example:  My USB stick is named "SYSBKP" so it automatically mounts as /media/pi/SYSBKP
It also handles unexpected ejects.  And remounts.  Silently.

Generally, it will pop up file manager to show you what you just
mounted.

Behind the scenes it makes sure the buffers are always flushed just in case the USB is pulled without warning.  No more need for sync;sync;sync like the old days.

FYI, I installed from a 14.04 LTS disk and let it upgrade me to 16.04 LTS when it offered.  On a fresh SSD drive - I let it take the entire space.
In any case, pmount is a very important piece of software to have if you use /media/username/ for removable devices.
If you don't use it, the default action is to create new mount points for each insertion, with a digit appended to the name for each one.  Even normal ejects cause this behavior.  You end up with mount points like /media/username/SYSBKP, /media/username/SYSBKP1, /media/username/SYSBKP2, etc.- and you don't know which one is the active one.
This means you can't write scripts that assume the mount point name (unless you include all the mount commands in the script).  Should you choose the wrong one it is treated as a local directory.
pmount makes sure your USB drive it has its own assigned mount point under /media/username/.  In this case, it is always /media/pi/SYSBKP
It also works when you put in another USB flash drive with the same name.  So it is not going by UUID.
I not only use this for flash drives, but also for fulll-size powered backup drives, for rsync backups, and have full confidence that the scripts will work without modification.
It is a simple, reliable solution to creating mount points.

Note that I have personally tested it with NTFS, FAT32 and the various EXT formatted drives.  If the drive contains multiple partitions it will mount regular file systems individually by name, avoiding the swap partition.  This is all visible in nautilus, and is alluded to in more detail in this Q&A:
https://raspberrypi.stackexchange.com/questions/82347/win32diskimager-not-enough-space-on-disk-size-62652416-sectors-available-623/82367#82367

I see in comments there is an issue with the NFS+ Time Machine drives.
It may or may not work automatically
How to access Time Machine Drives in Linux  (macworld.com)
EXCERPT:

It turns out Apple does a couple slick things with the file system to
  make incremental backups work, including hard linking to directories,
  which isn't allowed in Linux. So for anyone that needs to access their
  Time Machine from something other than its associated Mac, here's how
  you do it...  (see linked article for the rest)
Comment: "This is built into Ubuntu 16.04 LTS" It is? It's not in my 16.04 VM. https://packages.ubuntu.com/search?keywords=pmount says its in universe, and packages in universe are not part of the default install.
Comment: I added install instructions now, muru.  TNX
Comment: somehow even after installing pmount when i insert a time machine backup on a drive, it doesn't mount automatically. I've seen many posts reporting  that normally it auto mounts.
Comment: The issue with Time Machine is that it is HFS+ file system.  pmount will work with NTFS, FAT32, EXT2-4 for sure.  Here are instructions for using the regular `mount` command for Time Machine:  https://hints.macworld.com/article.php?story=20080623213342356
Comment: btw, uninstalling `pmount` will not solve the "sometimes it will, but sometimes it won't" problem with Time Machine drives.  I've edited the answer to include info on this issue..  Thank you, gideon, for bringing this up.


Do I need CDN if I am target to small region?

Question: I have website which is targeting to small geografical area, the bigest CDN companies don't even have CDN servers close to this area. I am wondering will I get any benefit to use CDN, becouse main server will be closer geograficaly?
Comment: Looks to me like you've pretty much answered your own question: if the CDN's USP - more servers, closer to users - isn't true for you, then they're of no business use to you except to provide redundancy.
Answer: Quite possibly you might want one anyway.
They tend to be good at not being vulnerable to DDoS, and make it more difficult to find and attack your real servers in many cases.
Not all of the Internet's topology is geographic.  If you want to use one, select one which is well-peered to ISPs which serve your target market.
Comment: For example my target country is New Zealand and closest CDN server is in Sydney thousands miles away.
Answer: This is the same for me and I use CDN because i can't provide enough hitrate on my servers, i'd like focus on development, not on server management.


Was the Force used before 100,000 BBY?

Question: In 100,000 BBY, the Ones emerged from the mist, and became the manifestations of the balance, light side and the dark side. Before that, were there primitive species who could use the Force, and did so?
Comment: Force sensitivity is not a function of civilization. Even non-sentient animals can be Force sensitive. Therefore there were beings who were Force Sensitive as long as there was sentient life in TGFFA.
Comment: It's hard enough to find "real" facts from The Old Republic and earlier. Considering that only one galaxy is in discussion for the Star Wars realm, chances are yes. If the Star Wars galaxy is part of a large super cluster, there is probably a neighboring galaxy that contained a species who could use the force. But this is pure conjecture.
Answer: We know for a fact the many races co-existed with the Celestials around 100,000 BBY and it is widely believed the first force-users were the descendants of this powerful race. According to the Killiks, a connection was present between the Celestials and the group of Force wielders known as The Ones. it was believed that the Force wielders were descendants of the Celestials. Similarly, the Gree, Kwa and the Rakata acted as servant races to the Celestials alongside the Killiks. Together, they worked to build astonishing technological projects that ranged from the assembly of star systems to the engineering of hyperspace anomalies. It is safe to assume that before 100, 000 BBY that the Celestials were the first known race to ever deal with the Force.

Was the Force used before 100,000 BBY?


Hide dashboard from non-admin users

Question: Is it possible to hide the dashboard completely from the Non-admin users and give them access to only New post and edit posts page?
Thanks.
Answer: As far as ease of use, especially for WordPress Admins not too firm in PHP, I second brasoflo's plugin recommendation (Adminimize).
For the sake of completeness, this is how it'd be done programmatically:
<code>/* Remove the "Dashboard" from the admin menu for non-admin users */
function wpse52752_remove_dashboard () {
    global $current_user, $menu, $submenu;
    get_currentuserinfo();

    if( ! in_array( 'administrator', $current_user->roles ) ) {
        reset( $menu );
        $page = key( $menu );
        while( ( __( 'Dashboard' ) != $menu[$page][0] ) && next( $menu ) ) {
            $page = key( $menu );
        }
        if( __( 'Dashboard' ) == $menu[$page][0] ) {
            unset( $menu[$page] );
        }
        reset($menu);
        $page = key($menu);
        while ( ! $current_user->has_cap( $menu[$page][1] ) && next( $menu ) ) {
            $page = key( $menu );
        }
        if ( preg_match( '#wp-admin/?(index.php)?$#', $_SERVER['REQUEST_URI'] ) &&
            ( 'index.php' != $menu[$page][2] ) ) {
                wp_redirect( get_option( 'siteurl' ) . '/wp-admin/edit.php');
        }
    }
}
add_action('admin_menu', 'wpse52752_remove_dashboard');
</code>
Answer: You can use the plugin Adminimize to do that.
It is possible to hide the Dashboard (and many other things) based on the user role. In case of hiding the Dashboard, you can define to what page the user will be redirected.
I'm not sure, but I believe you cannot modify the user roles to block the Dashboard (as even the lowest role has access to it).
But if you combine Adminimize with a Role plugin, you can achieve a very fine tuned administrative interface.
Comment: @JohannesPille - there's no a single WordPress install I've done that doesn't runs Adminimize. And cannot praise it enough :)
Answer: Those 2 pages too are a part of the dashboard! If you're giving access to edit posts, means you're giving access to the posts list. The lowest capable role, subscriber, also has access to the profile page, which is also a part of the dashboard! Your best option would be a front end post addition/profile editing form.
Comment: That depends on how you define "dashboard", a term which is sort of ambiguous, even in the WP context. It can either refer to the entire wp-admin, which appears to be how you've interpreted the question, or to the topmost admin menu page. In the latter case, the menu page can be hidden.
Answer: you can use a plugin called "User Role Editor".. You cant avoid dashboard in order to give them access to the New post.. But you can limit their role...

Hide dashboard from non-admin users


novel frustration

Question: I need help. I have written 4 novels, 3 in kit form.I will try to be brief, but this is complicated. The stories are brilliant....and in current form unreadable.I am a conflicted writer hampered by the fact that I cannot type.I am both a manic writer,and also lazy.Once I get a thought,the whole novel pops into my head from beginning to end.At times I have written 16 pages or more at a sitting,not being disturbed in the least by screaming grandchildren,or blaring T V sets,then gone months without writing a thing.I NEVER get writers block,my problem is quite the opposite.When the creative juices are flowing I don t stop to correct the obvious spelling mistakes or malaprop (everything is handwritten)the upshot is that I write partial chapters,then jump to others and return later The results can be chaotic.Though I have improved considerably in my early
Comment: Is there a question in there?
Comment: What's "kit form"?
Comment: sorry, have trouble  navigating sites, half my question was missing, didn t know there was a space limit. Kit is where all the information is there in chapter form, but needs to be assembled
Comment: Welcome to Writers. While I sympathize with your issue, you might be better off asking this on a discussion forum, where people can talk about an issue and try to help. This is a Q&A site, where questions need to be answerable, meaning there can be a single answer. We've also decided as a community that questions asking what to write are off-topic. Have closed this for now, but if you have any clear, specific questions about writing, please feel free to ask them. You can also have a look at our site tour to get a feel for how this all works.
Comment: couched in gentle kindness,you fool no one,you are a snob of the worst kind.I would have had more respect for you had you said .....Please leave ,this is an exclusive club and your ilk are unwelcome. Very well ,I will go .If you are the type that has to get the last word in,I won t be here to see it,but if it will make you feel better,you can further excoriate me by leaving as nasty a message as you would like at email@example.com
Answer: I had the same problem.
You have to fight your laziness, to stop procrastinating, because all the creativ part of this work (the inspiration, the story "popping out", the ideas, the plan, some brilliant dialog fragments) is the good part, the exciting part.
But then, if you want to make it real, there's not secret to it : you have to work hard (correcting, proofreading, (re)writing the less engaging parts of a chapter) and yes most of time you ideas seems less brilliant when you put them on paper, and yes it's frustrating and unpleasent, but then again, is the only path !
Switching from a novel to another novel is just a disguised way for escaping these inconviniences ! I was doing the same.
Comment: new to this half my question never made it. I am well aware of my shortcomings, rereading and the terror of inadequacy that comes along with it chief among them ( although when forced too I am always pleasantly surprised)Main problem is after I am finished a novel I don t want to see it again.My eventual question was How do I go about finding a co writer,preferably female aged 30 to 50(as a male I can only guess as to a females point of view )?
Answer: I am not this type of a writer but in this case what I can suggest is when you have the jouces - just sit and write down what you think or even record it. Try to make it as a whole story as much as you can. Then when you have it somewhat structured go and talk to an editor and together consult how to write your story planning and putting deadlines.
What else I can suggest is collecting all your ideas, laying them down and then talking with a ghost writer who can finish your novel. I wouldn't do the seccond think though but it might work for you.

novel frustration


What is the KQL Syntax to use WebId managed property to restrict the search for particular sub sites by passing the WebId in the QueryText?

Question: I want to restrict the search for some sub sites in my SharePoint 2010 environment.
I want to use WebId managed property which represents the GUID of the sub site.
Answer: You can create a new scope in SharePoint center administration->Manage service applications->search service application->Scope, create rules to set the property query with "WebId".
In the search result web part, select the relevant scope for results.
Comment: I have developed custom search using KQL so I need to pass the WebId in the QueryText of the KQL.


Is Blood On The Clocktower on topic here?

Question: Is this the correct forum for Blood On The Clocktower questions? It's more of a social deduction game, and less of a RPG.
Answer: No
Because it's not really a roleplaying game, it belongs more on the Board & Card Games stack. There are already 4 questions about Blood on the Clocktower there.
Comment: I don't think I've ever commented or answered as an authority before, but as the creator and admin of the largest BotC community online, I definitely don't consider BotC an RPG.  Board and Card Games is a much better fit for questions about it - it's mechanically most similar to Werewolf and other circle-style social deduction games: right down to the "informed minority kills at night, uninformed majority votes to execute during the day" basic gameplay loop.  While players certainly _may_ roleplay the characters they get, it's not part of the default game assumptions.
Comment: @nvoigt As Exempt-Medic mentioned below, it's basically a variant on Mafia & Werewolf, and some versions of those games do use cards to assign roles.
Comment: There **is** a board and cards, for the Storyteller to determine and communicate roles, and to track the interaction and status between players. The website includes a demonstration video where these are clearly visible. @nvoigt
Comment: At first sight, that feels weird. The game has neither a board *nor* cards.
Answer:

Blood on the Clocktower is a classic diceless freeform large-group roleplaying game.  The game instructs you to take on the roles (see: roleplaying) of a bunch of villagers in a gothically named village.  There's a GM.  You're meant to act in character, although it avoids saying to what degree.
This is entirely different to a board game where you don't do any roleplaying.  While there are likely versions of this game where no roleplaying occurs and it's just mechanical interaction/questions/guessing, just like how in D&D you can have a dungeon crawl with absolutely zero roleplaying or IC interaction and just 'I roll to attack' 'pass the chips' etc, the rules clearly indicate roleplaying is meant to occur (just as they do in D&D), there is a setting, there is a GM, etc.  Couldn't be more clearly on topic for this stack.
Comment: At least to me, this game reads as being similar to Mafia/Werewolf/Salem, which are social-deduction style games with roles and a narrator/coordinator. They are on-topic for Board/Card Games Stack, though that doesn't mean they aren't *also* on-topic here, I thought it worth mentioning
Comment: Every argument here could also apply to monopoly - players take the role of businessman; one player manages the bank; you're meant to get as rich as you can. Therefore, I don't think an enumeration like this is sufficient to call it an RPG.
Comment: BOTC can be played entirely without roleplaying, it is not a core feature/method/motivation in the game. If the argument for making it on-topic is that the players pretend to take on a role, the entire meaning of the question "is it RPG?" has been completely removed: almost every game is an RPG because almost every game involves taking on a role.
Comment: Whether it's something we could consider a tabletop RPG is worth exploring, but probably the rhetorical device of asserting it's plain & simple & very clear is not helping that exploration. Our hobby is very much aware the borders get fuzzy and is more than willing to explore them; it's fine for it to be unclear, but we can't explore this if we're not willing to acknowledge there might be some lack of clarity. It's not cut & dry here, but it doesn't have to be.
Comment: It's also a largely pointless one. A significant number of games talk about *"taking on the role of X"* but they are very clearly not RPGs and would not be considered on-topic here.
Comment: @Exempt-Medic There are ttrpgs very similar to lots of board games and card games, especially in resolution mechanic.  The difference is in the 'rpg', 'role playing game'.  If you're playing roles, it's a roleplaying game.  If you're not, it's a miniatures wargame (or w/e).
Comment: @Nij that's not what the rules of the game on the website that I read say.  That may be the custom or practice, but I can literally point you to game stores where they play 5e d&d where if you tried to speak in-character the entire room would look at you like you just grew a second head.  If the rules of the game talk about playing roles, it's a roleplaying game.  If they don't, it's not.  That's a fairly simple and applicable distinction.
Comment: @Gloweye no player is specifically in the role of referee, the rules do not mention entering the role or playing a role, there is no setting.  The players are only ever referred to as 'players' or 'Bank'.  The difference between a board game and a game with a setting, roles, and an implicit and explicit expectation of playing those roles out is extremely clear cut.


Module to import github content onto local drupal server

Question: I want to be able to put content from github into the sites/default/files folder of drupal so I was wondering if there was a way to do this.
Comment: Why exactly would you want to do this? Is it a Library that you are needing? If so you need to look into the [Library API](https://www.drupal.org/project/libraries) to do it the correct way. But I'm still interested in knowing the reasoning if that's not what you in fact want to do.
Comment: i want to use the import_html module to import sites but as far as I know i can only do that by moving my html files to that folder and periodically the github repo may have new html items added to it or modified. so i need to move files from github to this folder periodically
Comment: So you should be able to bypass the sites/default/files folder then. That probably shouldn't be used since you are going to be importing html and turning them into nodes with the import_html module. You could just create a folder on the server (could be outside your Drupal path or inside it but probably would be best outside) and clone the repo (use git to update when it needs to update) and configure that path in the html_import module. I mean you could make it anywhere you want but I would advise against using sites/default/files since that folder is unprotected and could open security risk
Answer: I made my own module. You can see part of the code here. I put that code on a cron_hook.


Is Drupal cache as set in the core enough for simple sites?

Question: Let's imagine a site which is almost completely static. There are news which are rarely updated and from time to time some new content in the form of more news. If there are only anonymous users apart from the admin... would the cache retrieval be so fast as simple HTML pages? I ask this because I have tested the config above with cache on and it goes very slow in comparison with HTML saved counterparts and I am not sure if it is a misconfiguration.
Answer: No it would be unlikely to be as fast as plain HTML, because the default caching is still using the database and some PHP.
However you can improve the speed significantly with a module or two. It is highly dependent on the speed of your servers - if you have a fast database server but a slow filesystem you might be better using the database although that is an unlikely situation. At minimum I recommend installing Advagg - correctly configured that will reduce load times for a lot of sites by around 25%.
Depending on the site, Boost can also vastly improve performance although I have not found it as universally applicable as Advagg. Also depending on your setup an external cache like Varnish may be better although it requires careful configuration and some server admin knowhow.
Answer: Your problem might be misconfiguration of some modules, perhaps overuse of others. If you are using a shared host the problem might lie on the PHP Memory Limit, that sometimes is quite low (although lots of servers nowadays will allow you to change this for free).
You need to find out where is your bottleneck. Might be the connection with the db, the speed and limits of the PHP, perhaps some custom module...


Best place to place Domain objects in an ASP.NET MVC App?

Question: I'm just starting my first project in ASP.NET MVC. In my webforms experience, I would usually have a separate project dedicated to my domain layer. In here, I would have my Domain specific objects along with my NHibernate mapping files and some business logic. Most of the examples I am seeing online are putting these classes along with business logic into the Models folder on the MVC app, then calling into this from the controller. From my experience, this would seem to make it harder to move that logic into a different platform if need be. Specifically, I was thinking about the possibility of needing to move it to a webforms app if the environment dictated it. This might be a naive question, but is it better to have the Domain data in its own project, or in the Models folder?
Answer: If you plan to reuse the model outside of the MVC app, a separate class library is still an acceptable setup. I do that, but leave the Models folder and put the models for my views in it.
If you would put your DAL in App_Code in a Webforms project, then I would put it in Models in your MVC project. Otherwise, keep using separate projects like you have been.
Answer: I layout my solutions in a similar manner -- businessLogic, dataaccess, domain objects all  reside in one project. The view(s) (Web, Web services, windows forms, WPF..) all go into their own separate projects.
That way UI specific code doesn't filter down in to the lower layers of the application. In most web projects I've had to hack together a windows form to inject new data into the database or manage some type of the application that isnt' fesiable in the web medium.
If I bake in HttpCaching at the business level I wouldn't be able to switch between views.
Answer: I use a similar approach. I'm using MVC too and I like having a POCOs domain model in a separate project. For the app I'm building right now I have the following projects:

Cms.Data
Cms.Services
Cms.Domain
Cms.Web

The Cms.Data is a data access project that makes the translation from LinqToSql or Entity Framework model to the POCOs model in Cms.Domain and viceversa. The Cms.Services is a services project with the business logic wich brings/sends the POCOs from/to the data layer. Finally the Cms.Web is the MVC project wich uses the services from the controllers and the POCOs as Model.
I like receiving critics :)


How to create a grid based on random shapes?

Question: How to create a "grid" using actionscript like the image below?
Basically you have an area of 1100x615 which should be filled with shapes that could be rotated and scaled...
Collision detection perhaps or something less cpu intensive for flash (as3) to manage?
Thanks
Comment: look for bin-packing algorithms there are many out there but beware that this is NP-Hard problem (sorting items by size usually helps). With a little tweaking you can achieve coarse filling and then just fill the big holes with scaled items with the most similar shape to the hole
Answer: You probably could adapt some of the word placement algorithms because in the end they place irregularly shaped polygons. There's wordle here http://mrfeinberg.com and here http://mrfeinberg.com. An action script version here http://blog.int3ractive.com/2011/02/as3-wordle-tag-cloud.html
A very nice javascript version is here http://www.jasondavies.com/wordcloud/#http%3A%2F%2Fwww.jasondavies.com%2Fwordtree%2Fcat-in-the-hat.txt
Note: If you are going to mobile you might want to consider optimizations because these packing algorithms can be computationally intensive. I used vector data elements for their speed and integers for numbers though floats might be ok on many devices.


Publishing a novel idea without experiments and results

Question: I wrote a technical paper on a novel idea related to internet technologies. However, I don't have resources to conduct large scale experiment. Also, the numerical results cannot be consider as well. In the given situation is it wise to publish the idea paper in a low quality journal or submit it on arxiv?
Comment: what are you trying to achieve?
Comment: It will likely just get lost in the noise either way. Interesting ideas need some validation.
Comment: @Buffy for validation I need large scale experiment. I was thinking to share with resourceful professors but I am not sure if it is a good idea.
Answer: Ideas are like ...opinions...: everyone has one.
"Just an idea" is not research, and is not typically publishable. An idea based on a substantial compilation of existing research may be publishable, in which case the added value is the synthesis. I see this semi-frequently in my field (which is different from yours), but these types of "ideas papers" typically have other value to other readers in that they are written from the perspective of experts in the field. It's not a way to enter the field. They also double as review articles, but I somewhat doubt your technical paper serves as a review.
Publishable in this context means being able to put it somewhere that people will see value in it. Of course you can always pay someone to publish it, but that doesn't really have value.
Comment: Thank you Bryan! when I am saying Idea it is in detail description of system with mathematical representations and discussion on their use within exiting system. However, its all a theory! In computer science these kind of paper exist but came from experience and well known researchers. I don't have such kind of profile, so I need validity.


Child theme breaks after update of master theme

Question: I have a theme, lets call it Master.
I manually created a child theme, lets call in Master-Child and added some files into it.
All worked well until a notification came that I should update the Master because of a new version.
The child theme has failed to work since.
I get an error message "Master theme does not exist" although "Master" is activated. I tried to rename, capitalize and lowercase all characters.
Thanks a lot.
Answer: The only string to use the master is  Template: twentyten in the style.css if child theme.
Check, if this string correct or has the master change this. If you activate the master as Theme in your install, you find the string also in the database of the WP install, in table options, entry template and stylesheet; if you have active the child theme, must have the entry stylesheet your child theme name; the Master is always on template. (for fast check this use the plugin Adminer)
example screenshot with the Theme "Black Label" as Master, no Child theme used.
The Screenshot was in Adminer inside the WP install.
Comment: Thanks, so I need to do a SELECT in WP_OPTIONS table, correct?
Comment: no, with the plugin Adminer can you find this entry in table; you can also use an select, but its more work as activate an plugin and use it. (i have update on the answer with a small screenshot)
Comment: Thanks. I executed the query and reached a similar resultset. I still cannot see the child theme.
How can I access and "fix" my child theme since I cannot activate it?
The child theme does not appear in the result set.
Any ideas?
Comment: please add the result here; and do you have this string in your child theme on the comment string Template: ? After this activate the Child theme.
Comment: Thanks, I checked the actual name and referenced it; that fixed it. Thanks again!


A modest generalization of the law of large numbers

Question: Suppose I collect $2n$ independent samples of a probability density function $f$, which are separated into pairs $\{X_i^1, X_i^2\}$ for $1\leq i\leq n$.  Suppose I now consider the set of all $2^n$ sequences obtained by taking one sample from each pair.  Are there any existing results comparable to the law of large numbers that describe the family of all distributions that are "obtainable" from these pairs?  For example, if I pick an interval $\mathcal{I}$ with mass $p=\int_\mathcal{I} f(x)dx$ and avoid that interval as much as possible (i.e., if a pair contains a sample not belonging to $\mathcal{I}$), then for large $n$, I will have only $p^2 n$ samples belonging to $\mathcal{I}$.  On the other hand, if I prefer $\mathcal{I}$ as much as possible, then I will have $[1-(1-p)^2]n$ samples belonging to $\mathcal{I}$.  Is there a more nuanced result that describes this kind of behavior?
Comment: I suspect the question you really want to ask is the following: consider possible rules $h\colon\mathbb R^2\to\mathbb R$ where $h(x,x')\in\{x,x'\}$ (or maybe a random generalization I'll mention below). Then what are the possible pdf's of $h(X,X')$, where $X$ and $X'$ are independent samples from the pdf $f$. Here $h$ is "picking" between $x$ and $x'$. The random generalization is $h(x,x',z)\in\{x,x'\}$ where $z\in[0,1]$ is an independent Unif[0,1] random variable.
Comment: I believe the answer to my attempted reformulation of your question is that the possible pdf's of $h(X,X')$ are precisely those pdf's $g$ satisfying your conditions: $(\int_I f(x)\,dx)^2\le \int_I g(x)\,dx\le 1-(1-\int_I f(x)\,dx)^2$ for all events $I$. If this is right, the proof should probably go by Strassen's theorem.
Comment: Yes, that sounds perfect.  Is there any prior work on this kind of thing?  (I'd never heard of Strassen's theorem, will give it a look)
Comment: I'm not aware of any prior work on this, but as I mentioned, I believe Strassen's theorem, giving conditions for the existence of monotonic couplings is likely to be useful.
Answer: In the case where the $X$'s take finitely many values, you can prove what I claimed using the max-flow min cut theorem. I have not written it down, but this should be extendable to the general case.
Here's what I mean.
Suppose you have two finite sets $A$ and $B$, equipped with probability measures $p$ and $q$. ($A$ and $B$ are traditionally called "boys" and "girls"). Let $K\subset A\times B$ (i.e. $(a,b)\in K$ if $a$ and $b$ know each other).
A coupling respecting $K$ is a measure $m$ on $A\times B$ such that $m(\{a\}\times B)=p(a)$, $m(A\times\{b\})=q(b)$ and $m(K)=1$.
If $S\subset A$, define $\beta(S)=\{b\in B\colon\exists a\in S\text{ such that }(a,b)\in K\}$ and for $T\subset B$, $\alpha(T)=\{a\in A\colon\exists b\in T\text{ such that }(a,b)\in K\}$. By the max flow-min cut theorem,
a coupling exists if and only if $q(\beta(S))\ge p(S)$ for each $S\subset A$ and $p(\alpha(T))\ge q(T)$ for each $T\subset B$.
To apply this to your problem, suppose that $X$ takes values $1,\ldots,n$ with probabilities $p_1,\ldots,p_n$. Let $A=\{(i,j)\colon 1\le i,j\le n\}$ and $B=\{1,\ldots,n\}$. Equip $A$ with the probability measure $p(i,j)=p_ip_j$. Let $K=\{((i,j),k)\colon i=k\text{ or }j=k\}$ (so that $\alpha(S)=\pi_1(S)\cup \pi_2(S)$, the union of the projections onto the coordinates and $\beta(S)=S\times\{1,\ldots,n\}\cup \{1,\ldots,n\}\times S$). Then applying the above criterion, you get that a coupling exists if and only if $(\sum_{i\in S}p_i)^2\le \sum_{i\in S}q_i\le 1-(1-\sum_{i\in S}p_i)^2)$ for each $S\subset \{1,\ldots,n\}$.


PostgreSQL: Table and index on different tablespace

Question: In PostgreSQL i have the freedom of choosing to put index (of a table or materialized view) on tablespace other than the one i chose for the table (or materialized view) itself.
Is there any performance impact of this?
Answer: The idea to separate tables and indexes in different tablespaces (which must be on different devices) as a performance tuning measure is an old myth that is slow to die.
It may be a good idea to spread I/O over several devices, but you should do that by using striping on the file system or hardware layer. Of course you can also do it by using different tablespaces, but it is unclear why specifically separating indexes and tables should be beneficial.
People who know other databases think similar.


How to autocomplete methods with resharper templates

Question: I have a resharper template like below
new Assembly().$Add$.View();

Add has been marked as Execute Basic Completion macro. Now when I expand the macro I get
new Assembly().Add.View();

with Add highlighted and the autocomplete popup raised. I then select the method I want to expand in here which can be one of a dozen methods starting with Add such as AddLine or AddPointCloud etc. However when I select the method the following happens.
new Assembly().AddLine();.View();

Note that AddLine is a method with a single argument. As well an extra semicolon has been injected into the template breaking the code. The desired finished line would be
new Assembly().AddLine(points).View();

where points is a variable declared previously and I would type it in during template expansion.
My question is, is it at all possible using resharper templates to trigger autocompletes on methods such as above with the method being in the middle of a call chain.
Answer: I changed the template to
new Assembly()
    .$Add$($args$)
    .View();

where args is a comma-delimited list of values and it seems to now work


GeoNodes set position on vertices in vertex group along their normals

Question: I like to procedurally change the position of vertices in a selection (vertex group) randomly in a certain direction with a defined min/max threshold along their Normals. And here is also where I fail - combining the normal information of the vertex group with the set position node
Comment: Simply use a *Vector Math* node between the *Normal* node and the *Set Position* node and switch it to "Scale". The normal always has a length of 1. By scaling this vector (with random or fixed values) and using it as an offset, you move the points along the given normal.
Answer: As noted in the comments, you would just need to scale the normals here and use them as offsets to move the points along their normals.
Something like this:

Depending on what exactly your goal is, you could also use the Extrude Mesh node if you want to process the selection as a whole:


Can I use a digital multimeter as substitute for a zero resistance ammeter?

Question: I am testing the galvanic corrosion between two metals, following ASTM G71. In this method, a zero resistance ammeter was the material presented to determine the galvanic current measurements. Unfortunately, we don't have access with it. So can I use a digital multimeter instead?
Comment: There are no truly zero-resistance ammeters - just very low. You should look at the specs for your digital multimeter to see what the resistance is in ammeter mode. It may be higher than (or lower than if lucky) what you need for your experiment. There certainly are very low resistance digital ammeters.
Answer: Yes, using Ohm's law: I=V/R.
The only true "zero" resistance ammeter are superconductive. In practical use, the voltage drop across a small resistance is measured. If your DVM can measure down to a millivolt (mV), then a 1 mV drop across a 0.001 ohm resistor shows a flow of 1 ampere current. You'll need to consult the guide (~$45 online) for the maximum permissible voltage drop, and use an appropriate resistance.
Recently, I used the voltage drop across a piece of #16 copper wire to measure currents in the 1 to 5 A range... a switch in the circuit had greater resistance!
Answer: Not at all, Zero Resistance Ammeters are dedicated testing equipment provided with internal feedback to automatically compensate for voltage losses caused by the measurement. They actually have "infinite" input resistance, so don't load the source of current in any way, but are backed by an op-amp based circuit which acts like a zero impedance current source.
Without a solid theoretical evaluation (impedence matching), you cannot substitute such instrument with a common digital ammeter.


Where to add Google Remarketing tag in Magento

Question: I am trying to figure out in which file I need to add the Google remarketing tag. I know it needs to be added before the closing of the body tag. Can anyone point me in the right direction?
Thanks
Answer: here is I did in the past:
Depending on what kind of google tracking you are using you have a few different way to use:
1) If only add a custom code and should be in all the Magento page, use the "Miscellaneous Scripts" value going to admin section, System > Configuration > Design > HTML Head - Miscellaneous Scripts. (This will be included before head closing tag in page HTML.)
2) By native Magento already have Google Analytics tracking code and you can find this configuration going to admin section System > Configuration > Google API - Google Analytics.
3) If you are looking something more complex and use the Google adWords I used the extension magento connect link. For a particular Client I did some extra modification to include some extra code if a client subscribe to newsletter or a new client etc.
I hope you can find something helpfully in the post.
Best,
GrinGo.
Answer: There are different template file for different pages in magento so at first I think you should decide where to place it.For example if you want to place it in footer than you should place that code snippet in

"app/design/frontend/base/default/page/html/footer.phtml"

Similarly you can check other different template files to place your code.
NB:Best practice is to overide the core file of magento before making changes to it.
Hope this will help.
Answer: There's no indication as to which Magento version you're using 1 or 2. At the end of the day it depends how much technical knowledge you have and if you're using a version control system to manage your Magento build.

Miscellaneous Scripts as another answer mentioned earlier, this approach is straight forward and very easy to use to plug and play your code.
Google Module depending which version of Magento you use (CE/EE) there will be a built-in section for you to plugin your account ID in backend Magento configuration and then the platform will generate necessary code for you.
Write custom module by writing your own module you can place it the snippet anywhere on the page by targeting before_body_end node in your layout XML file. This is more technical but gives you more control over what you can do.
Google Tag Manager this also depends on if your Magento version comes pre-built with Google Tag Manager module, then you can create a container and place all your logic in there. This is also more technical and require the output of some values in JS format on the frontend to let GTM read the values.

At the end of the day go with what is easy to setup, portable and easy to manage. I usually go with Google Tag Manager as it takes time to create initial setup of exposing data on the frontend but then I have full control of what I want to do with that data through tag manager. In most cases you'll end up using the same data (ex. totals, shipping  method, product IDs, SKUs, cost, etc.) in more than one third party API so this gives you flexibility to do just that.


SqlBulkCopy with relationships

Question: I need to somehow copy data from one database to another. I guess best will be SqlBulkCopy.
Problem is that, my table Product have 5 more tables connected with ID of product.
So product is connected with Product_picture (pictureID, productID), for example.
Is there any way to copy Product and all other connected tables with ID (or Identity) from one database to another?
Answer: Invoke bulk copy multiple times. Nothing of this is automated in the product, so you have to build this on your own.
Look into table valued parameters. They are much more flexible and offer reasonable performance for bulk jobs. It is probably fast enough.
Comment: Thanks for fast reply. Do You mean like that: http://pastebin.com/h6gJ1WJv ? It does copy Product table, but then when Im trying to copy Product_picture Im getting error: The locale id '0' of the source column 'ref_product_picture' and the locale id '1045' of the destination column 'comment' do not match.
Comment: Your code is conceptually good. Google the error message. It is unrelated to this question.
Comment: Ok, I find out that I need to use ColumnMapping. But question is that - will SqlBulkCopy work if I got some Products in Source databse? For example, I got 20 products in SDB, 30 in DDB (s/d source/dest). So if I copy from SDB to DDB will it work?
Comment: Not sure what you are saying - if SDB contains rows they will be copies, of course. What good was SqlBulkCopy if it could not copy rows? Maybe you mean DDB? Yes, existing rows will be preserved. Bulk copy is nothing but a faster mass insert.

SqlBulkCopy with relationships


Will I lose data in recovery mode?

Question: I search everywhere if I will lose data in recovery mode so will I? I looked everywhere even in ask ubuntu and found nothing helpful.
Comment: No, not by default. Recovery mode doesn't delete data. What you (yourself) do in recovery mode could delete data, but merely entering the mode doesn't harm or delete anything.
Comment: Are you asking what will happen if you simply select "recovery mode" from the grub menu, or are you asking what will happen if you actually enter "recovery mode" and make changes?
Comment: I mean if you enter recovery mode will it wipe the data
Comment: Please, let me know how it went after you tried it.
Comment: I have never tried it because I just wanted to ask before so that I can get the understanding.
Answer: Recovery Mode will not delete any of your data merely by entering it (or merely by trying it).
It is NOT a "System Restore" or "System Reset". It's merely access to a root prompt so you can troubleshoot and fix problems yourself.
Answer: If you just enter recovery mode, and make no changes, nothing "bad" will happen.
Simply type exit and press Enter to exit recovery mode.
Recovery mode allows you to make changes to your system using a terminal console, but you have to explicitly grant yourself read/write access to do that.

You obviously already know how to get to the "recovery mode" menu, but I'll list the steps for completeness (adapted from Ubuntu Recovery Mode Wiki)

Switch on your computer.

With BIOS, quickly press and hold the Shift key to get grub menu.
With UEFI press the Escape key to get grub menu.

Select the line which starts with "Advanced options".

Select the line ending with "(recovery mode)"

Press Return and your machine will begin the boot process.
The "recovery mode" menu with a number of options will be displayed.
One of these options is "Drop to root shell prompt", and I believe this is the option you are asking about. (There are other options, but I will specifically talk about the "root" option).

Highlight "root Drop to root shell prompt" and press Enter.
Even though you are logged into your system as root, you can not (yet) accidentally make any changes.
This is because the root partition (the "parent" / directory on your system) is mounted read-only.

To make changes to your system must explicitly do the following:

Mount / as read/write using the following command:
mount -o remount,rw /

Next, if you have other partitions that you need to access (such as a separate partition for /home) use the following command:
mount --all

This will mount all filesystems mentioned in fstab.
Now, if you make any changes you could damage your system if you are not careful!
Comment: Can I also have how can I mount my home directory? @PJ
Comment: Yes. Please see my update to step 7.
Answer: I address the question that you added in your comment:

I mean if you enter recovery mode will it wipe the data (?)

In itself, it will not wipe any data — only if you explicitly ask it to.
Recovery mode in itself is just a simplified variant (actually, a subset) of the operating system: it starts up only the very core of the system, the bare minimum that can give you a chance to interact with the computer and try to fix any error that may be present.
A lot of features (even important ones) are not being enabled in recovery mode by default, so that a faulty subsystem has less chance to cause any instability or further crash.
You may still encounter data-loss — but not caused by merely entering recovery mode — in three ways:

One way is that the data loss has already occurred even before you are entering the recovery mode. Some errors that necessitate that you enter recovery mode, might have already caused the data loss.

An example could be some degree of failure of the internal disk.

Another way may be if you do something on the root shell console that causes data loss: like typing and executing such commands on the command line that you are unfamiliar with, and whose consequences are not clear to you.

For example, any disk- or partitions-related command is definitely not a good candidate to use on the command line in a trial-and-error fashion. One should first learn about such commands, for example, by reading tutorials about them on the net. You can even ask us on this site regarding using specific commands.

And lastly, I think we could highlight such features of the recovery mode that may be not entirely risk-free; in case you choose to use them:

"Try to make free space"

Probably not risky at all, but it's about deleting files, so technically it's still about throwing some files away — but not yours though: it probably throws away files from the cache and temporary directories, that are not needed any more. (Though admittedly I don't know much about it.)

"Check all filesystems"

If the filesystem checking utility (called fsck) is being run in read-only mode, then it should be fine.
But if it's run in such a mode where it attempts to fix disk errors, there may be a low chance that it might not succeed in fixing the disk, and may leave it in a bad state.

The lesson should be that one always needs to keep backups of important data, preferably on a separate device: at the minimum on some sort of memory card, or an external disk.
Not keeping a backup and always just hoping that you can get out of every emergency without any data lost, may slowly, but likely, lead to unpleasant surprises.
Answer: short answer: NO
Recovery mode is just like safe mode boot in windows. You boot up with just the very minimal resources and programs loaded so that you can debug and troubleshoot some OS or module issues and recover from that.
You can of course, destroy your OS by running commands without knowing what you are doing, but that you can do even in normal mode.
Linux command line is powerful, and with great power comes great responsibility. So know what a command can and is supposed to do before executing it.

Will I lose data in recovery mode?


Can I hone Silestone from a glossy finish to a matte finish?

Question: I would like to hone (make the glossy finish matte) my Silestone kitchen countertops.  Is this possible either through an acid wash, sanding or other?  Sanding works on samples but will be difficult to get uniformity on that large a surface.
Answer: Silestone is made of quartz (mohs scale of around 7 if I remeber correctly). Try wetsanding with > 1000 grit so that you don't get scratches in the surface.
Comment: Quartz is a crystalline form of glass, so I would expect it to stain about as much as scuffed up glass. The only problem I would expect would be with the polyester binders that the use. As with anything else, test in an inconspicuous area first.
Comment: when using the method you give above or any (other) appropriate method to achieve the look (result) "Mark" is after, should you be concerned about making the surface more susceptible to damage (eg staining)? Or is it considered a non-issue? Am asking, as it is my understanding that a matte finish is achieved by opening up the pours a little.
Answer: I don't think you can hone something to a lesser polish as the term refers to smoothing a surface--which is the opposite of what you are looking to do.
Sandblasting is typically the way to knock back the gloss on a surface. Not sure how practical that would be inside a kitchen, though.