Do Canadian universities defer to the grade conversion scale of a foreign univerisity or do they follow their own?

Question: I'm planning to apply this year to several Ph.D. programs at different universities in Canada. The school where I finished my master's degree (outside Canada) uses a percentage grading system where a GPA of 94% is supposedly equivalent to a Canadian GPA of 3.60. This is indicated on the last page of my transcript. However, when I checked several reliable online resources on how to convert a foreign GPA to a Canadian GPA, I learned that the Canadian GPA of 3.60 is equivalent only to around 90%, not 94%. Thus, if I follow my former school's grade conversion scale, my GPA will look lower than if I follow the grade conversion scale that I found online. My question is: do Canadian universities defer to the grade conversion scale of a foreign university where the Ph.D. applicant graduated from or do they follow their own grade conversion scale? Thanks in advance for you reply!
Comment: Going to depend on the school you come from and the school you are applying to. You should web-search the contact info of the school you are applying to and ask. Plus, PhD progs are going to look at things other than grades. Letter of rec is going to be a big deal. If you have some kind of funding it will also be a big deal.
Answer: You can expect individual universities to give you guidance on what information to provide and what conversions to use. If it's not clear, you can contact them for guidance.
I took a couple minutes searching "(name of university) grade equivalent" and immediately found:
https://www.mcgill.ca/gradapplicants/international/equivalency
and
https://www.sgs.utoronto.ca/future-students/admission-application-requirements/international-credentials-equivalencies/
for the first two schools I looked at.
Grades aren't everything, and much of the advice given for the US at How are Ph.D. applications evaluated in the US, particularly for weak or borderline students? Am I likely to get into school X? will apply similarly for Canada. Like in the US, admissions are typically done at the department level, so you may need to address your questions to the specific program you apply to rather than a general graduate admissions department. A brief email like this would suffice:

Dear (graduate program),
I'm interested in applying for a (degree) in (program/department). My
undergraduate education was at (institution) in (country), where
grades are (given on a scale of XX to YY/given as class ranks/however
your country/institution does it).
(explain in a sentence what you
already understand about grade conversions from reading information
provided by the university online)
(ask a specific question about
whether they would like you to convert grades and how they'd like you
to do this, if it isn't clear).
Answer: I can't see how 90% or 94% will make much of a difference.  The availability of funding, academic trends on the transcript, and LoR will have a much greater impact than a 4% lost in translation.
To answer your question directly: Canadian universities do NOT defer to grades awarded in other countries.  There is a country-specific scaling factor based on historical data and some other factors (that I don't know too well) and as far as I know this scaling factor is agreed upon by all universities (at least within one province).
Answer: Graduate admissions are done by a committee of professors, not bureaucrats.  The professors will look at the overall records of applicants and make a [i]subjective[/i] decision about who is admitted.  It's quite likely that at least one of the professors on the committee will be familiar with grading norms in your home country or even your specific university and evaluate your transcript directly without converting your grades to a "Canadian" scale.  In any case, the small difference this will make in your GPA will have no impact on your application.
Comment: "Quite likely" seems like a a bit of an overstatement considering we don't know the country or the size or makeup of the admissions committee. In my own department (which is highly ranked) I would rate the chances of anyone on the committee being familiar with a given country as low. Perhaps mathematicians have more familiarity with worldwide grading systems?
Comment: @AzorAhai-him- of course it depends on the country, but my department of 20 can cover 10 countries and we could easily get information on another 15 through either close collaborators or other folks on campus.  That will easily cover most applicants (even if it doesn't cover most countries).
Comment: It is more likely that professors are NOT familiar with grading systems of other countries, but that some office has a known algorithm (based in historical or other data) for converting to an approximate university equivalent.
Comment: @ZeroTheHero: In my experience, this is absolutely not the case.  This is because professors are frequently people who have immigrated from another country and know other systems from personal experience, while the bureaucrats are frequently people who have never even lived in another town and can't even conceive of the idea that other people might do things differently.


start this workflow to approve publishing a major version of an item. greyed out/disabled

Question: I have got a problem. When I creating a workflow from the browser the start this workflow to approve publishing a major version of an item is greyed out/disabled. Please help.
Answer: Turn on "Create major and minor (draft) versions" on document library is definitely a right way to go.
Scenario 1 - Missing value in InitiationType Element
Make sure in your workflow definition (workflow.xml) you have included OnMajorCheckIn in <InitiationType>. For example
<MetaData>

    <InitiationType>Manual;#OnNewItem;#OnItemUpdate;#OnMajorCheckIn

    </InitiationType>

</MetaData>

MSDN - "If you do not specify an InitiationType element, Windows SharePoint Services treats the workflow as if the Manual, OnNewItem, and OnItemUpdate values have been specified"
Scenario 2 - The option is enable to you, but you can't select it.
Since "major and minor versions" only supported in Document Library. "Start this workflow to approve publishing a major version of an item" option was never meant to work with List. So make sure you only associate your custom workflow to Document Library if you want it to work. If you do it via code, make sure this is how you do it:
SPList _list = _spweb.Lists["Documents"];
SPDocumentLibrary docslib = (SPDocumentLibrary)(_list)
//Add workflow to document lib not list
docslib.AddWorkflowAssociation(yourWorkflow);

Why "Start this workflow to approve publishing a major version of an item" option is disabled for my custom workflow in SharePoint?
Comment: did you Turn on "Create major and minor (draft) versions" on document library?
Comment: Thanks for replay, but how to add field to have got for all list templates, and all Library. What should I change to have got in all list and library this options ?
Comment: Yes but in the Custom list it there no this option. Only in document library, and I want to cnow how could i change another template in the list.
Comment: where is the workflow.xml file?
Comment: did you check the your project? https://msdn.microsoft.com/en-us/library/gg534715.aspx?f=255&MSPPError=-2147217396


Can a satellite park between the Earth and Sun?

Question: If you put a satellite at Geostat altitude travelling the wrong way, will it remain between the Earth and Sun?
Comment: can you define "wrong way". because geostationary means it doesn't change position relative to the earth
Comment: Oh-oh!. Having given it some more thought, I realise that the answer is no, It would simply cross the same point on Earth every 12 hours, My question would only be valid if it were a plane capable of flying around the equator in 24 hours. Sorry for wasting your time.
Answer: Yes, a satellite can "park" between the Earth and the sun. I.e., there does exist a point at which it's possible for a satellite to remain between the Earth and the sun without using a prohibitive amount of fuel to do so. However, that point isn't at the geostationary altitude above the Earth, but rather at a point considerably farther away from the Earth than that, called the $L_1$ Lagrange point.
An object that remains closer to the sun than the Earth is will normally have a shorter orbital period around the sun than the Earth has. But at the $L_1$ Lagrange point, gravity from the Earth counterbalances the sun's gravity, lengthening the orbital period such that it matches the Earth's orbital period.
The $L_1$ Lagrange point is an unstable equilibrium point, meaning that if the satellite is slightly off from the $L_1$ Lagrange point, it will drift away from that point unless the satellite consumes a little bit of fuel to correct its orbit. There exist two other points in the Earth/sun orbital plane called the $L_4$ and $L_5$ Lagrange points, which are stable equilibrium points, i.e., if a satellite is a little bit off from either of those two points, it will remain just a little bit off instead of drifting away, without needing to correct its orbit.  $L_4$ and $L_5$ aren't in between the Earth and the sun, however, but rather are at points that form an equilateral triangle with the Earth and the sun.


Can my Dragonborn gain more breath weapon uses per short rest?

Question: Even though the Player's Handbook says a dragonborn only gets one breath weapon per short rest, is there any way outside of rule 0 for a dragonborn to gain multiple uses per short rest, like by using a spell or magic item?
Comment: @daze413 That's a reasonable solution. I've tidied up the last bits of references to multiple weapons that imply different types. Thatguy, if you'd like to know about ways to gain multiple different *types* of breath weapon for a dragonborn, please feel free to ask that different question in a new post. Cheers!
Comment: A dragonborn PC in the rule-book can only use 1 breathe attack. Is there any way rulewise that it can be used multiple times, or if not that, a way that a dragonborn can get multiple different elements of breathe attack?
Answer: "It states in the book that the PC would only get 1" - I think there's your answer. Should you wish to wander into the realms of homebrew I'm sure a DM could find a way of allowing a dragonborn to gain an extra use of breathe weapon - perhaps instead of a skill increase at level 8.
If you want to stay more true to RAW then I believe potions of fire breath make a good breath weapon substitute.
Comment: This answered my question perfectly. Also I didn't know about the potions of Fire breathe. Thanks very much!!
Answer: Yes.  There are 5 magic items in Tyranny of Dragons that if the user has a breath weapon that recharges on a rest it has recharge of 6.
Answer: A dragonborn can only use its breath weapon once per short or long rest. This is very important, because like a Warlock with their spell slots, in order to stay relevant throughout most of the adventuring day, you need some short rests (same with the Druid and their Wildshape ability).
That being said, DM's aren't required to give you short rests, although I believe it is stated somewhere in either the Player's Handbook or the Dungeon Master's Guide that the classes are designed around two short rests a day. This question has some good answers in regards to how often short rests should happen and more, I suggest giving it a read.
So, having more short rests will allow you to use your regular breath weapon more often. And, potions of fire breath will allow you a temporary additional breath weapon (I believe it's three uses). However, if you want a permanent extra breath weapon, there is the Variant:Mixing Potions rule in the Dungeon Master's Guide on page 140. If your DM uses this rule, it's possible (though highly unlikely) that drinking a Potion of Fire Breath and another potion together could result in one of them becoming permanent, although the exact mechanics of such a thing would be left entirely up to your DM. Me personally, I would likely make the permanent effect of the Fire Breath act similar to the Dragonborn breath weapon, not only for simplicity, but also so that the natural breath weapon of the Dragonborn stays just as relevant. This would essentially give you two breath weapons per short/long rest, which I thing would work just fine.
And of course, Homebrew is always an option, such as having a feat that allows you to use your breath weapon more than once, or spells or magic items with similar functions, or even homebrewed potions that work in the same vein as the Potion of Fire Breath (which you could use with the Variant:Mixing Potions rule) but with different damage types.
Comment: I like picturing a dragonborn that breathes poison, and then breathing a blast of fire in afterwards (and maybe causing the poison to ignite and explode, with DM's permission)
Answer: A few months after this question was asked, Xanathar's Guide to Everything was released. It includes a new spell called Dragon's Breath. Dragons Breath is a level 2 spell with a duration of 1 minute (concentration). It takes a bonus action to cast, and it allows the target to do 3d6 damage in a 15-foot cone as an action.
This spell gives you a breath attack that covers the same area and damage as a level 6-10 Dragonborn (Gold, Green, Red, Silver, or White). Because the spell is a bonus action, you can cast the spell on yourself and then immediately use the breath attack. It's much better for regular use than a potion of fire breath, because level 2 spell slots are much easier to come by than expensive magical potions.
Comment: I just recently got this book!! Thank you for the updates!!
Comment: Cheers! If you want, you could conceivably use this spell to play a purely dragon-breath focused character (i.e. you just use dragon breath over and over to deal damage). It's only level 2 and lasts a minute, so after level 5 or so you should be able to keep it up for most fights, and it does really solid damage.


What is the alternative to now?

Question: I see many warnings against the use of now (block.timestamp) in solidity code but no one mentions any alternative of getting the time. What is the alternative of using now?
Answer: The main issue with using block.timestamp is that it is manipulable by miners and random fluctuations to within an hour or so. For minute-scale time, you should use block.number * 15, which also can fluctuate but is less arbitrarily manipulable.
On the scale of days or more, block.timestamp will be far more accurate, since it is tied to real unix time.
Comment: can you explain why `block.number * 15`? are u assuming a block every 15 seconds?
Comment: Yes, on average. It's actually more like 14 now, but regardless it's actually random so you're not going to get great accuracy

What is the alternative to now?


Could you potentially turn a draft horse into a warhorse?

Question: To be a warhorse the horse would go through training, so could you get a draft horse, spend money to train it, and have it become a warhorse?
Answer: Mechanics of the game don't include anything like this so it's homebrew/ DM discretion all the way.
Destriers are trained from birth to be ready for battle so the process would be lengthy in the real world.
Historically, warhorses weren't the massive beasts media portrays them as. They needed strength and agility to perform battlefield manoeuvres and to be a comfortable ride for the knight.
Draft horses are big, built to drag heavy loads and have good stamina but they lack speed and the ability to stop, turn and accelerate.
But that is all just real world issues and DnD isn't a life simulator so ask your DM. The rule of cool always wins.
Comment: I think so. The definition of what constituted a warhorse seems to be hazy, with some sources saying certain breeds that would be considered draft horses were ridden in battle. It looks like it really came down to whether the breed could be trained, be fitted with a comfortable saddle (depth of the chest and other anatomical factors affected this) and be capable of performing adequately in terms of speed and agility. As long as those boxes were ticked (and others) the breed would been suitable as a warhorse regardless of actual breed. That's the result of quick research (I'm not an expert).
Comment: Warhorse is a weird term because there's a solid 400 years where 'warhorse' meant something very different from a medieval charger. A Hussar's 'warhorse' was a well trained riding horse, not a knight's destrier. And anyway breed isn't really a constant; a few hundred years is plenty of time to totally change a breed's personality if you start actively selecting against warhorse-like traits.
Comment: This is a good answer and here's why: I can put the same motor into (e.g.) a race car and (e.g.) a pickup truck. What's the difference? the race car is geared for speed and the pickup truck is geared for torque. Simplistically, warhorses are "geared for speed" and draft horses are "geared for torque." Yes, you could train one to become the other, but with al things biological, the longer you wait to do that, the harder and less valuable it becomes to do it.
Comment: Weren't percherons originally bred to be war horses?
Comment: Sounds about right, and I think we are drifting a bit.
Answer: Game-wise, that's up to the DM, but from a realism standpoint (not always a good one to use for a fantasy game), it's not going to work.
We know from various sources (such as Crusades-era horse transport ships, tapestries, and  surviving pieces of tack and shoes) that warhorses in the 11th-12th century were around 15 to 16 hands, which is a moderately large horse, but not crazy-big -- certainly not the 20+ hands range that's sometimes claimed for destriers. (For reference, draft horses like clydesdales or shires are often 17 or 18 hands, and most racehorses are in the 15 to 17 range due to disproportionately long legs.)
So draft horses are the right size, but they typically don't have the temperament to learn to be chargers. Warhorses are a matter of breeding as much as training; the reason most of the charger breeds died out by the early modern period is because they were terribly aggressive and difficult to handle, so nobody wanted them around once they weren't absolutely required for combat purposes. After guns entered the picture and everyone switched to using light cavalry and dragoons (when they used horses at all), the desirable traits for military mounts shifted to calm nerves and speed rather than size and aggression, which puts them in line with pretty much any riding breed.
Sure, you could put a draft horse in a warhorse training program, but they just wouldn't be willing to run full-speed into an opposing force the way warhorse breeds would. Draft horses tend to be plodding and gentle, because that's what you breed for when you're trying to get a horse that will pull a wagon or plough all day and is safe around your family.
Comment: You appear to be correct in your historical information, but can you add some citation support? That would really improve this answer and provide direct evidence for others to see and read.
Answer: Sounds like a Plot Hook
Other answers have looked at the history, and pointed out that simple "re-training" isn't necessarily a realistic answer.
BUT
The DnD world is deliberately full of magic. It seems fairly likely that you aren't the first person to say: "I have a nag, but I need a warhorse!"
I could envision mages who specialize in this transformation, or items that can perform it.
Think about the level of risk / certainty you want, and take it to the DM.
Variations could include:
"I'd let an apprentice practice on my horse, and if it works, I get a free warhorse."
"We'll recover the item for the King, and just use it on our own mounts on the way home."
"I'll throw some money at the mage, and he'll transform my horse."
All are valid, and any could be fun under the right circumstances.
To be a little more concrete:
The difference between a warhorse and a draft horse is 350gp. Trivially, if you say "A wizard can transform your horse for 350gp." This is "balanced" and should not cause any problems at your table. It would be equivalent to selling the draft horse and buying a warhorse with 350 gp and the proceeds from the sale.
If you're intended solution is more complicated, the risk should be appropriate for 350gp.
In the case of an apprentice practicing the spell, you could select a risk of spell failure that fits the stakes. Having the spell accidentally transform the horse into a CR 10 enemy is probably not balanced - 350 gp is not a significant sum for a level 10 party - but a risk of getting fined by the local guild for enabling unsanctioned transformations, or the risk of costly material components being destroyed rather than returned, or even the risk of the horse just dying are probably appropriate risks.
Perhaps all those risks are present, such that on average the cost is around 350gp, but there's a chance it could be either free, or far more expensive.
And, as always, if the players find themselves in debt, they may have to pay the local guild with services rather than coin.
Comment: I downvoted  because this is really just an idea generation answer. You haven't backed up with experience any of your ideas or the pros and cons of how they may play out at a table.
Comment: A warhorse is 350gp more expensive than a draft horse.  For early levels, that's significant.
Comment: It doesn't matter that it's not mechanics, we still want answers to be [supported](https://rpg.meta.stackexchange.com/questions/8696). Your lack of support is why I've downvoted and I really suggest you read my link about how to back up subjective answers.
Comment: @BenBarden - this is a good point.
Comment: @NautArch - It's not really a mechanics question. Warhorses aren't that expensive. Plot doesn't have pros or cons.
Comment: @NautArch - does the edit help?
Comment: I would also suggest the DM home-brews a "badly-trained WarHorse", which doesn't have as good attack or damage values.  Maybe also have a high-risk that the horse will run away or try and throw the rider if approaching an enemy.
Answer: From pure RAW, no (ask your DM)... but technically yes?  But actually no.
So, there are no rules that permit you to transform a draft horse into a warhorse via training.  It's left entirely undefined, which means that it's another case for DM adjudication.  It's one I'd be wary of, though, given that the draft horse is only worth 50gp, and the warhorse is 350gp.  If it were somehow doable to train the one into the other in anything approaching a reasonable amount of time, I'd want to at least answer the question of why there aren't large numbers of NPCs out there doing just that and making significant income from it.  By that token, while you might be able to get it turned into a warhorse by paying a fee, that fee is likely to be at least 350gp.
Now technically, the answer to the title question is "yes".  You can turn a draft horse into a warhorse.  It just takes two castings of a 9th-level spell.  First you True Polymorph the draft horse into an object of some variety (concentrating for the full hour to make it permanent), and then you True Polymorph the object back into a warhorse (again, with the full hour of concentration).  You can't do it direct, because the warhorse is higher CR.
For the exact wording of the question in the body, however, the answer is still somewhere between "no" and "ask your DM".  There are no rules in the book at all for training animals, let alone having hirelings do it for you.  You can turn the draft horse into a warhorse, but the requirement that you hire someone to train them makes it impossible.
Comment: @KorvinStarmast I hadn't seen anything definitive on the matter, but I'd sort of assumed that it would be pretty obvious that "cast True Polymorph twice" was absurd overkill as a way to acquire a warhorse - not least because you could cut that price in half trivially by picking a rock up off the ground and using it instead of the draft horse.
Comment: Yeah, I guess you are right about that absurd overkill bit
Comment: I'd suggest pointing to the usual cost of casting a level 9 spell per the DMG or AL guidelines on that for a sense of scale.  (If it costs X to cast that spell, times two, why not just spend the 350, and so on)


How can I list all videos that are only visible to me on Vimeo?

Question: I'd like to list all videos that are only visible to me on Vimeo: how can I achieve that?
Comment: Are you trying to build this via the API?
Comment: No, just as a simple user using the user interface. But if it's not possible, I'm curious about which API method can achieve that.
Answer: When building an off site list of Vimeo videos, you will need to use the API.
Vimeo's new API has a lot of the features you need, and you can get started here: https://developer.vimeo.com/api/start
The above link will walk you through app creation, and then the endpoint varies based on the videos you want to see. It's pretty intuitive though, so start here: https://developer.vimeo.com/api/endpoints
If you want to see your videos, request /me/videos. If you want to see all videos in the staff picks channel, request /channels/staffpicks/videos.
Make sure to read the Authentication documentation, I expect you are building a Single User application and can hard code your authentication token into your app.


What block cipher is used for CBC-MAC?

Question: What block cipher is used for CBC-MAC? DES, AES, 3DES? Or it doesn't matter?
Answer: Well, yes, it does matter; however the terminology 'CBC-MAC' does not specify which.
CBC-MAC is a generic construction that takes an arbitrary block cipher, and turns it into an object that acts like a MAC for fixed length messages (much like CBC mode is a generic construction that takes an arbitrary block cipher, and turns it into a object that encrypts variable length messages).  And, just like "CBC" isn't necessarily used with a specific block cipher, neither is CBC-MAC.
Note: CBC-MAC has issues if you try to use it with variable length messages; CMAC and XCBC are two modes similar to CBC-MAC that avoid this problem.
Comment: I prefer to say that CBC-MAC is a construction that constructs a MAC from an arbitrary block cipher. If the block cipher is secure and we restrict to fixed-length messages, the MAC is also secure. For variable-length messages, the MAC is insecure regardless of block cipher.
Answer: CBC-MAC is a MAC construction based on a block cipher. Any block cipher will do, but the security of the scheme is reducible to the security of the block cipher. To put it more precisely, any block cipher will make a secure CBC-MAC as long as that block cipher is a secure pseudorandom permutation.
Comment: Yeah but this violates the definition of CBC-MAC, namely that it acts on messages of fixed length.
Comment: Actually, the security of CBC-MAC as a MAC is not reducible to the security of the block cipher.  For example, if we ignore padding, and $A$ and $B$ are messages with lengths a multiple of the block size, then if $CBCMAC(A) = X$ and $CBCMAC(A|X) = Y$ and $CBCMAC(B) = Z$, then we can deduce that $CBCMAC(B|Z) = Y$; this is a violation of the MAC properties.  Including padding complicates this attack, but not enough to make it infeasible.
Comment: CBC-MAC is fine with variable length messages, as long as you never have one message that's a prefix of another. For example a length prefix can achieve that if you know the length of the message beforehand.
Answer: First the block cipher can take on more than one general form provided certain criteria are met and in terms of:  block cipher, Fk, secure CBC-MAC,and of course CBC mode.  Pseudo random generators and permutations as an aside an in response to above are very related in terms of inversion. In symbols F:K*X---> PRP. If a given block cipher is secure this does not make the MAC secured, vice verse a secure CBC-MAC/CBC-MODE does NOT make a secure block cipher. In MAC engineering and cryptology in general there are many paths to exploitation. While Wikipedia and other sites get PRP and PRG somewhat correct and hint at or briefly mention prepending they do a poor job at actually explaining the finer points that matter in this discussion. As long as the block cipher meets certain minimum requirements then it is suitable for the CBC-MAC.
<code>                     Please see below for more details:
</code>
CBC-MAC Handles arbitrary length messages and more specifically message much longer than a single block Length. The message can be of arbitrary but fixed length. Both sender and receiver must agree on the length of the message beforehand in theory, but this is not realistic in practice so messages can be changed in length via a few methods, but one practical one is prep-ending the length of the message where: to authenticate a message m1--ml where l can take on any value l will be coded as a single block using n bits perhaps padding to the left with 0's then run the CBC-MAC system m1--ml messages and will handle any arbitrary message of any length l.
Given a message m1--ml where each Mi represents a block of the message whose length is = to the block length of SOME underlying block cipher we can compute a tag by applying the block cipher Fk (effs of k) to the initial block M1 value then use it as a chaining value and xor to M2 and all through the same until a result: a tag t of the message m1--to ml.CB-MAC is also deterministic unlike CBC mode which itself has IV = initiation vector which would make if used CBC-MAC insecure.However,both CBC and mode are necessary to be secure. Finally, the element t must be mapped to set x by a separate key k in the Key space.Without this final encryption function, this function is known as a cascade function and it is not secure. Yet the fpad at the end matches mode functions to protect the Block cipher.
Interestingly hash functions are related to CBC-MAC/CBC MODE and they are an engineered response to some MAC issues.
References:
Dan Boneh Cryptography I Coursera/Stanford.
Jonathan Katz Cryptography Coursera/University of Maryland

What block cipher is used for CBC-MAC?


Store a n-bit string using only O(log n) space

Question: Is it possible to somehow store a $n$ bit string using only $\mathcal{O}(\log{n})$ space? I am thinking if the string could be stored using a hash function, but I am not sure if it is even possible.
Comment: You can store all the information in the universe in just one bit. In particular you can store **a** string of any size. A different question is how many different strings could be stored in the same space.
Answer: There are $2^n$ many $n$-bit strings, but only polynomially many strings of length $O(\log n)$.
Answer: When you say "store", I suppose you're also expecting to be able to retrieve the original string based on the shorter string, right?
If so, then the answer is a categorical no. And not only to log(n), but even to n-1.
Theorem: it is not possible to construct a program that reversibly converts all possible strings of length n to strings of length m, where m<n.
Proof by contradiction: let's suppose there was a program that could reversibly convert all strings of size n, to strings of size m. There are 2^n inputs, and 2^m outputs, where 2^n < 2^m. But in order to revert the conversion, there must be at least two outputs that revert to the same input, therefore the conversion is not reversible.
This proof is another way of explaining the pigeonhole principle: you cannot put 10 pigeons in 9 pigeonholes, without using at least one of the pigeonholes at least twice.
A lot of people seem to be surprised by this. Isn't storing data in a smaller size the entire point of lossless compression? Compressors are based on finding patterns that can be stored with less data, but ultimately, the same theorem proves that it is not possible to create a program that can losslessly compress all possible inputs to a smaller size.


Middle-click on Lenovo laptop

Question: I just got myself a new Lenovo T400 laptop and I'm quite enjoying it.  However, I'm kind of a middle click junky, it gets used on my desktop probably more than Right-click.  Anyway, on other laptops I have been able to use Right Click + Left Click to emulate a middle click.  Is there anyway to do this?
Comment: If you want to use the 3 mouse buttons below the keyboard, then check out this question: http://superuser.com/questions/35970/thinkpad-x30-middle-click/36231#36231
Answer: With Windows 10, the Mouse part of the new Settings app has an "ELAN TrackPoint for Thinkpad" heading (which can also be accessed just by typing e.g. "trackpoint" with Start menu open). This leads to a "TrackPoint settings" link, and there the Middle Button Action dropdown menu can be changed from Scrolling to Middle Click.
Answer: Update your synaptics touchpad driver - there should be an option to set corners as middle-click.
I've not been following synaptics driver development - it could be that now there's an option for two-button-middle-click-emulation too.
Update : 2-button-middle-click-emulation found for T400 here.
Comment: The T400 does not have a Synaptics touchpad... See http://www-307.ibm.com/pc/support/site.wss/document.do?sitestyle=lenovo&lndocid=MIGR-72858#mouse
Comment: Update : 2-button-middle-click-emulation found. :) http://log.psi.cc/2009/04/09/two-button-middle-click-on-a-lenovo-t400-t500/
Comment: Not too sure about US or EU or anywhere else, but the T400 sitting in my office works with the Synaptics driver.
Comment: @Breakthrough - Just because you don't see Synaptics software listed on the T400 support site, does not mean that they don't use Synaptics touchpads. Have you seen an Ultranav touchpad brand anywhere else then besides on Lenovo? Are you saying that they created a company called Ultranav just to make touchpads for their own notebooks?
Answer: On ThinkPad t400s Windows 7 works for me disabling of special functions on a middle button:
Control Panel -> Mouse -> UltraNav (tab) -> TrackPoint "Settings..." (button) -> Set "Choose Scrolling or Magnifying Glass Function" to "Neither"
On Windows 8 one suggest to uninstall driver for UltraNav pointing device completely and use native Windows 8 support: Delete driver for UltraNav pointing device completely.
see: https://forums.lenovo.com/t5/X-Series-ThinkPad-Laptops/Carbon-X1-Use-middle-scroll-button-as-middle-click/m-p/1413823#M54804
Answer: I don't use the touchpad at all, so I configured the left touchpad button to be a middle button.  You can do this in Control Panel | Mouse | UltraNav.
Note that I have this problem that is still unresolved.
Answer: Autohotkey(.com) could do this quite easily.
<code>LButton & RButton::MButton
</code>
would do middle on clicking left then right. You could also remap right then left to middle, or something totally different.
edit: I see I got the example the ENTIRELY wrong way round. The way & works is that if you press and hold button 1, then press button 2, it fires - so... yeah. :D

Middle-click on Lenovo laptop


Oversized display in monitor when connected by VGA from windows 10 laptop

Question: So I have ASUS laptop A455LF i5-5200u with Intel HD Graphics 5500 and Nvidia GT930M running latest update of Windows 10 and latest update of every graphic driver connected to LG 22MN42A monitor + tv via HDMI. It got full HD resolution at 1920x1080 but the quality is so bad, text has white shadow, some text looks blurry, color looks odd. But when I try to connect via VGA cable, everything became so much better with sharp text and natural color. One problem is, no matter which display resolution I choose, each of it will get oversized in the monitor, just reduced in quality when I choose smaller resolution. When I see resolution detail of my LG monitor+tv on its website, it says "PC/Analog 1366x768" and "Video/HDMI 1920x1080". Is there any meaning of this? Please help me everyone, thank you.
Answer: Check the manual for a control called "Overscan" & disable it.
That will fix the 'zoomed' aspect you are seeing, but nothing is really going to fix the fact that you're trying to make a low-end TV with a basic 480i picture quality into a computer monitor.
It attempts to show you 1920x1080 over HDMI by simply stretching the picture to fit - might be kind of OK for a television picture, but awful for a computer monitor.
Its nominal display size [actual pixel count] is only 1366x768, which is not "Full HD", so your 'best picture' is going to be at that resolution.
Comment: I see, so the 480i thing means something. Thank you. I will use this for tv use only, I guess I need to buy a new real monitor.
Answer: The resolution of the display is determined by the screen.
PC/Analog 1366x768: When the PC or Analog signal is input, the maximum resolution that the host outputs to the monitor is 1366x768.
Video/HDMI 1920x1080: When the Video or HDMI signal is input, the maximum resolution that the host outputs to the monitor is 1920x1080.
Try the following method:

It is recommended to use an HDMI cable.
Try changing the screen mode to the extended mode so that we can set the resolution of the two screens separately.
Adjust the resolution of the TV to 1920*1080.
Comment: But why is the display quality of HDMI output looks so bad. Is it because my laptop's native resolution is 1366x768?


Are there companies who you can invest in that invest for you?

Question: I'm wondering about if this sort of thing exists, the idea is that you invest in a company to do investing for you, they check the market, talk to investors about smart choices etc for a small cut of your investment, does this sort of thing exist? To me it seems like theres no reason it wouldn't, I'm super new to investments so I might be wrong here.
Answer: That thing is called a mutual fund.
They are readily available, either as a mutual fund proper, which has rules for investing and withdrawing, or as an exchange-traded fund, which trades in real time just like a stock.
-
What you are specifying is an actively managed mutual fund, where a monkey throws poo at a wall to pick stocks at random ... and either beats the market average (an index like the S&P 500) or not. Oh wait, you want human-managed mutual funds, which replace the monkey with a genius stock picker and an army of research staff. That ought to work better, right?
The other option is index funds, which simply are the index because they buy every stock in the index.
The expenses of running the fund come out of the profits in the fund; this is called an *expense ratio**.  The expense ratio is guaranteed 100% loss to you.  For instance, the monkey fund pays its stock picker bananas.  So does the index fund, as it's simply an intern checking daily to make sure the fund portfolio matches the index.  The expense ratio of human-managed funds is not so low:   As much as 1.6% per year.  Since you expect about 10% per year average return, 1.5% is kind of a big bite out of profits.
The question is whether the managed fund beats the index by enough to justify its expense ratio.  The canonical work on that question is John Bogle's Common Sense on Mutual Funds.  You might read it.
Comment: A man of many talents!  I started reading the third paragraph... and said "I know this guy"..
Answer: Berkshire Hathaway does exactly what you want.  Each share is $331,000, so you probably won't be investing in it...
For us mere mortals, actively managed mutual funds and ETFs do the same thing, except they're funds managed by brokerage firms, not companies.
Many firms offer them.  Three popular ones are, alphabetically:

Charles Schwab
Fidelity
Vanguard
Comment: Fortunately, there are lower priced share classes of Berkshire Hathaway today. Also, if this wasn't the case, you could invest into Berkshire Hathaway through a fund whose only purpose is to invest into this one particular company. I would heavily recommend Berkshire Hathaway. It's an actively managed fund whose cost is significantly lower than that of practically any index fund.
Answer: Yes, there are in the UK. They are called investment trusts (though they aren't really trusts in the normal sense of the word — they are companies). Around 60 of the 350 companies in the FTSE-350 list of the biggest listed companies in the UK are investment trusts.
Answer: Many good answers here already. Your best bet would be to read up on investing in index funds, JL Collin's stock series is a great source on this. Simple, easy to understand and will save you a butt loaf of money in the long run.
If you don't feel like learning though there are many companies out there willing to take your money, analyze your risk tolerance and give you a pre-packaged plan. Websites like wealthsimple, and Betterment. I've analyzed the returns you get from these and wealthsimple seems like a scam, while betterment is actually pretty decent. There're a lot of companies out there, but at the end of the day none of them are going to care about your money as much as you do, so you're better off building your understanding and doing it yourself.


How can I execute searches via submitting URL (may be with special syntax)?

Question: Can I execute searches via submitting URL (may be with special syntax) rather than typing in words in Google (or other search engine) form?
Answer: Typing

https://www.google.se/?gfe_rd=cr&safe=off#safe=off&q=mamas%20and%20papas

... in the address bar launches the search in firefox.
The same from bash:
firefox 'https://www.google.se/?gfe_rd=cr&safe=off#safe=off&q=mamas%20and%20papas'
... note the use of '-quotes, as & and # are special to bash.
%20 is the hex code for a space. Example: echo "Test text" | od -t x1z - will tell you what the codes are for "Test text" and the appended linefeed.
Answer: If you are using Firefox:
You can define a keyword for any search field. Typing the keyword followed by your search terms into the address bar will then execute a search.
Quoting the instructions from my answer on Super User:

Right-click on any input field.

Select "Add a keyword for this search…" (or similar).

Enter the shortcurt (and optionally: edit the generated search URL to include pre-defined search terms).

This will save a bookmark in a folder of your choice. You could manually edit this bookmark to change the keyword or the search URL.
Example: If you right-click into the search field of this site, Ask Ubuntu, and associate the keyword au, you can enter the following into the address bar to search for "foobar" on Ask Ubuntu:
au foobar


send sms j2me appear promt message

Question: When I am sending sms via j2me application, before message sent it appears question for can I use internet to sent message. Is it possible to exit this question to not appear?
Answer: This is happening because you Accessing HTTP & SMS API. For using such API you need to signed your Java ME Application. For Signed a the Java ME Application, you need to purchase Signing Certificate from VeriSign or Thawte Site by paying the Fees.
Plesae visit this link
For VeriSign's certificate, they costs 20K per certificate.
Comment: Is there another solution (without signed Java ME Application) for sending sms via j2me app and to not appear question before sent sms?
Comment: Unfortunately it is not possible as they are restricted APIs. However you may try Self Certified Application. Search on Google for it.
Answer: I think you can skip the prompt but your application must be signed. However, even if your application is signed, on some devices, the prompt will still appear once. This usually (or always) occurs on the session's first use of the Wireless Messaging API. This happens because the access to this API is set to something like "Ask first time."
If your app is signed, you can manually set the access to the wireless network settings to (something like) "Always allow." If it is set to (something like) this, the prompt will not appear.
For apps that are not signed, the option "Always allow" is not available. However, on most devices, the next best option is available: "Ask first time."
Well, the bad thing is, you are going to set it manually. The good thing, however, is that you are not going spend so much money just to set it to "Ask first time." :D
Answer: J2ME by the platform design have the drawbacks in which users of the applications are asked to  select yes or no for any attempt to use any of the secure API's. Some devices gives this alerts in such a way which will make the end user to think if he should go ahead or stop it there. By digitally signing the application, one can reduce the alerts to levels depending on the device KVM implementation and the number of secure APIs in use.
In some device having Symbian OS Feature Pack 1, the prompts continue even if the code is signed.
This behavior of J2ME makes the applications less developer friendly and less user friendly. I think this is a wrong strategy and model adopted by SUN. There is some thing called Verified by Java in which you can get your application signed using a certificate which will make the application work seamlessly and without prompts in the end user device but unfortunately the process of getting that certification is expensive and not practical. The only advantage of J2ME platform is that it allows less chances of virus or malware code to be executed on the end user device. I think the trade off between security and ease of user use is not worked well and that is the reason we don't see very good apps in J2ME.
In contrast, Android for example, lets the user see all the permissions prior to installation of the app and the user is not bothered at run time when those secure API are used. That is the reason we see millions of apps there and not in J2ME. We can always say this approach had led to many malware types of applications in the end android user device but that is how it goes, people need to have smooth apps running and are happy with them.

send sms j2me appear promt message


I want to learn about servers, where should I start?

Question: I am interested in learning how to run a server to host a website and provide me with email and all the other features hosting companies offer. I have read snippets from all over about different aspects, but I would like an absolute begining as I don't really even understand how servers work. Can anyone recommend a site or book that would offer a solid foundation for understanding how a server works.
Comment: Although not exactly a learning resource, I suggest you follow the Netcraft website for news updates in this area - http://netcraft.com/ . Netcraft provides "research data and analysis on many aspects of the Internet. Netcraft has explored the Internet since 1995 and is a respected authority on the market share of web servers, operating systems, hosting providers, ISPs, encrypted transactions, electronic commerce, scripting languages and content technologies on the internet."
Answer: Your best bet is to rent a Virtual Server for ~£15 a month for approximately six months.
The reason being that there is only so much you can do with an offline host, e.g. something on your LAN - it is just not 'real-world' enough.
The best operating system to learn with is Ubuntu simply because it has the best community support of all of the distros.
With your basic box you will need to get the webserver running, the emails to work and build a suite of tools so that you can access the thing with more than the command line.
Rather than follow a course or reading a book, the Virtual Server and some tasks you wish to complete will help you with goal-oriented learning.
One site that I found immensely useful is http://www.howtoforge.com/
Their how-to articles include the 'perfect server' series. These will take you through all the steps needed to build a functoning LAMP stack.
Comment: Good answer. "Start with a server!" I did something similar as this... started with an Ubuntu VPS, installing and configuring stuff... wow, there is so much to learn. This was three years ago. I spent a long time to make a working "fully-featured" mail server, with Postfix + DKIM-proxy + Dovecot + SSL + Roundcube + proper DNS settings... now, knowing the caveats, and passing through the EXPERIENCE, I am seen by some as an "e-mail deliverability expert". So... just rent a VPS and start playing with it! :-)
Answer: Linux Administration Handbook
This book helped me a lot when I started.
http://www.amazon.com/Linux-Administration-Handbook-Evi-Nemeth/dp/0130084662


Slept updating ubuntu

Question: I've been using Ubuntu for quite some time now and I absolutely love it. I recently purchased a laptop (Dell Inspiron 15r 3542) which is supported by Ubuntu, and have pre-istalled ubuntu 12.04.
So, it asked me to update to 14.04, and then....
After downloading packs it started to install them. Some time after it started there was fading electricity for 5 minutes and later i found DELL falled asleep.
Now, i write this lines without any chance in update or next launch of my DELL.
how to check update status without reboot? Window is just grey.
Comment: Just reinstall. If it's new, you have no data to lose.
Answer: You should be able to press the power button to bring it out of slumber. If this does not work, you can usually do a hard power off by pressing the power button and holding it down until the computer shuts off.
If you need to, reinstall using a live CD or DVD.

Slept updating ubuntu


"global" calculations for sorted sets

Question: With a sorted set, is there an easy way to compute "global" values, for instance the average, median, max, min, etc. of all the scores in the set, or do I always need to extract the scores and do the calculations myself (which is a bit of a pain ...)?
Answer: You can do it all with ZCARD and ZRANGE (withscore of course).

Min: ZRANGE on index 0
Max: ZRANGE on max index (ZCARD value)
Median: ZRANGE on the middle index (ZCARD/2)
Average: you can store the total off all score in another counter and then divide it by the ZCARD value
Answer: There is no easy way for doing it. There are not many aggregation commands.
Edit: if that's what you have to do, maybe sorted set (or even redis) is not the way to go. Can you elaborate on your use-case?
Answer: You can add another key with the sum of all the scores in the sorted set. You will have to update it manually (in a multi/exec probably) on every insert/update/delete of the sorted set. Then you can get the value and divide it by the ZCARD to get the average.

"global" calculations for sorted sets


How to make models do more than setting and getting data and validation

Question: I am asking this question because after developing a few small custom cms solutions in a framework, I developed the idea that Models can be easily substituted with ORMs which ease up the task of validating, getting and setting data, as thats all they are needed for.
I recently got an order for a complex custom client management solution. After researching a bit on how to proceed on it, I found this:
http://blog.astrumfutura.com/2008/12/the-m-in-mvc-why-models-are-misunderstood-and-unappreciated/
Now the idea is not new as thats what i had read about the MVC approach, models handle the business logic. But I am finding it hard to plan out an approach in which Models handle the business logic and are classes which are complete in themselves because of the type of work i have gotten used to.
Please help me out here by explaining the idea and pointing me to some examples, articles etc
Comment: Nice question. I haven't thought about this before.
Comment: Nice link ...what dev technology are you using ...ASP.Net?
Comment: IAbstract, I use the black sheep of dev technologies, php. However, it has become pretty good since 5.3. Used to work in codeigniter, now work in fuelphp (basically a codeigniter for php5.3)
Answer: You should read more about Domain Driven Design. Basically you try to capture the requirements of the business into a pure model (in oop mostly object models) which can do all necessary business logical tasks. This model can then be invoked from an application layer (e.g. the view or the controller in MVC, in MVP you call it and adjust it for the GUI in a Presenter). The model should also be as ignorant of persistence and other technical things as possible.
Encapsulating the business logic in such a domain model has some great advantages:

Reusability
Ease of use and extension
Generally leads to a better architecture
It clearly communicates coherences and the business requirements ...
... and thus improves communication between developers, customers, analysts etc.

I recommend Eric Evan's book on Domain Driven Design for further reading, as it will point you in the right direction and give you some good examples on where to put which logic. I bet that by the time you've read it, a large percentage of your entities will contain more than flat data.

But I am finding it hard to plan out an approach in which Models
  handle the business logic and are classes which are complete in
  themselves.

I assume, that by model you're mostly referring to entities in this context. Putting business logic/behaviour in the entities is not a trivial task. But you should always think about what an entity is and what an entity does. Does it have some responsibilities or behaviours? Sometimes it's ok to have flat entities if behaviours or responsibilities are better expressed as services.
Suppose you have an animal. While its attributes can be saved flatly to a database, it has some behaviour, too. It needs to eat. But a herbivore won't eat meat, so you've got to make sure it'll show its behaviour when the programmer wants it to consume meat by force. It can move and it can make it's own unique noise. These are some things that should be modelled into the entity for example. You sure wouldn't rely on procedural services to make those animals eat, move or make their noise.
But all examples are shallow without a concrete business domain. So think about your business domain and about its entities, behaviours and responsibilities. An other business domain may contain entities which look much the same to an outsider, but are indeed something entirely different or show a totally different behaviour. The model needs to first and foremost depicture the domain of its users as accurate as possible.
Comment: thats a very informative answer. Thanks. From what I understand, I might need to extend the orm classes in order to add the functionality i might need, or rather, define a second layer of models over the ORM layer which applies the business logic to the objects it works on. Am I getting it right? (Also, I am ordering that book right away)
Comment: Can't edit anymore, but by extending the ORM calsses, I mean extending the models which represent the database
Comment: @kapv89: Sometimes it's better to wrap/extend the classes, primarily for transfers. See the DTO pattern (Data Transfer Object) to get some more insight.
Comment: I have been thinking about what you said in your post and reading about fat models and Domain driven Design. I think I have some idea now about how to go about this project. Thanks. i have also ordered that book and will read it while working on this project


What kind of chain to buy for internal gears?

Question: What kind of chain should I buy if my gears are internal in a drum?  I have seven gears but should I buy a one speed chain?  What would happen if I would use a seven speed chain?
Answer: The chain you need is 1/8 inch chain, usually sold as singlespeed chain.
A derailleur chain, which are sold as multi-speed chains, is narrower and the cogs may be too thick to fit.
EDIT: As said in the other answers, some singlespeed and internal gear hubs have narrower cogs and can use the 3/32 inch chain. An 1/8 inch chain may be slightly noisier with these cogs, but works.
Answer: To answer your question, if you used a 7 speed chain it will do one of two things
1) It will either work perfectly (if the bike has "normal" thinner teeth on the chainring and cog) then its 3/32" chain.
2) or it won't sit on the teeth properly and will ride high, plus it might wedge onto the teeth and not come off when its supposed to.    This would be "Chain Suck" and would make for very bad riding.  In this case you require wider 1/8" chain
Note: 1/8" is "wider" than 3/32".  1/8 is the same as 4/32 and is therefore 25% more, or 33% additional space between the inner plates.
So you need the right chain.  Consider checking with a caliper, or take the old chain to your LBS and ask for one of those please.
Answer: You need a chain that is specifically a single-speed chain, not a multi gear derailleur chain.
For an internal gear hub (IGH) bike you probably need a 1⁄8 inch (3.2 mm) single-speed chain.
However some single speed or IGH bikes use a narrower 3⁄32 inch (2.4 mm) single-speed chain, which is the same as derailleur chains.
To determine what you have currently, measure the distance between the inner plates of your current chain.
Comment: If you need a 3/32" chain, a chain marked for 7 speed derailleur drivetrains will be fine.
Comment: If current chain is not present or you're not sure if it is properly choosen - measure the sprocket thicknes or at least check if new chain would "sit" properly.
Comment: I put on a seven speed chain as I had that already.  It was thinner than my old one but seems to sit OK.  Rode 10km today and so far no problems.  Next time I will buy a single speed chain.


arduino leonardo stops transmitting once hdmi cable is connected to a screen

Question: I am using arduino leonardo for moving mouse pointer with head tracking using MPU6050. It works fine in general. But as soon as I connect an external lcd screen to my laptop via hdmi cable, it stops transmitting. (that is the TX led goes off altogether and the mouse stops moving) I am not able to figure out what the issue is here Will using a teensy 3.0 instead of leonardo solve this problem?
Answer: The issue is that the mouse coordinates are being set by the display device that it's attached to.
The computer sends a descriptor about the display to the HID device ( the mouse ) the mouse then uses the information about the logical size of the screen to co-ordinate the movements.
For example, to move with Mouse.move(100,100,0); you are not actually moving by 100 pixels, but by 100/(127-((-127)).
The only option is can suggest is to STOP the mouse and Restart it again - this will be easier to restart calculations again.
Heres my Logic Function to convert Percentage to appropriate values for Mouse.move();
int percentToLogic(int percent) { return percent*254/100; }
Comment: I have no idea how this answers this nearly six your old question, but I can see you put some effort into it. Typical mice transmit relative coordinates and have no idea how large the screen is or even whether or not one is plugged in.  Absolute position mice send information with respect to where they are within their own coordinate system, and likewise normally completely unaware of the monitor connectivity and its geometry.


Is there any way to prevent some views from displaying in the browser drop down?

Question: For a list with many views, and some are for background operations and the user does not need to see. Is there a way to prevent some views from displaying in the browser drop down?
Comment: Or hide it by settings the SPView.Hidden property.
Comment: Search for ``ctx.ListSchema.ViewSelectorPivotMenuOptions``
Answer: You can do it with couples of ways.
Method # 1, you can do from list setting page.

Enable the MetaData Navigation and Filtering site feature from site settings > Site actions > Manage Site Features

Now go the List Setting page

you will see the "per-location view settings" link.

Click on it and remove the All the views which you don't want to display in the drop down.

Click Ok. and test it.
One thing keep in mind, even you hide this but still if somebody know the URL of the view can browse it directly typing URL in the browser.

Another Method is Using the Powershell as other folks responded.
Answer: Try this:
SPList list = site.Lists.TryGetList("Sample");
SPView view = list.Views["SampleView"];
view.Hidden = true;
view.Update();


How to set taxonomy hierarchical level to 2?

Question: I have created a custom taxonomy and registered it. I want the taxonomy maximum level should me 2. i.e. Parent => child => sub-child. How to set level??
Answer: You can't set a level when you create the taxonomy.
The only way to enforce a level is by watching the term creation: Filter create_term; that's the earliest filter that allows us to change parent term ID. For no obvious reasons the filter pre_insert_term is lacking that information … it would probably too easy.
Then change the parent term ID if the current on is already a second level ID.
Sample code, not tested:
add_action( 'create_term', function( $term_id, $tt_id, $taxonomy ) {

    $term = get_term( $term_id );

    // Nothing to do.
    if ( empty( $term->parent ) )
        return;

    $parent = get_term( $term->parent, $taxonomy );

    // This is a second level term, that's okay.
    if ( empty( $parent->parent ) )
        return;

    wp_update_term( $term_id, $taxonomy, [ 'parent' => $parent->term_id ] );
}, 10, 3 );

Comment: It creates the term then checks the parent. This is not a solution. I want to check if the term which is going to create has hierarchical level 2? If yes then give error msg else create the term.
Comment: @Deepakmodi The parent ID is not available in an earlier action. So you can at best delete the term here.
Comment: I don't know the solution yet.. But this method don't looks perfect as it allows to create the term. And then i have to delete that term. This is not effective way of doing. Better we have to not allow the term to create with pre_insert_term hook. But i don't know how to.


Auto provisioning community users

Question: interesting challenge that would benefit from your wisdom:
Trying to provision a new community user (with preset password) via salesforce when a specific event takes place and trigger fires. I dont want the contact/user notified of anything - they'd just land on the site login, enter their known credentials and session is established.
The contact record exists, the community is active however if I try using Site.createPortalUser then Im told 'nope - that operation is allowed only from within an active site' (so for self registration I assume). Damn. If I try a simple user insert then I get the expected mixed DML error.
Soooo - how on earth does one use apex to provision a new customer community user account from an internal user perspective ?
Any ideas most appreciated!
Answer: The resolution to this question was to move the user setup into @future methods.

Auto provisioning community users


How do I move (rearrange) the orientation of a video?

Question: I want to crop the video at some position and move the part next to the part that wasn't cropped. (See image, it explains better)

https://i.stack.imgur.com/mzBN8.png
Comment: I'm not sure I understand. You want to move lower half of the frame to the right side? On each frame? In that case you'd turn from portrait mode to landscape (to use photography terms) and screw up initial resolution? And... what software you have at disposal?
Comment: I have VirtualDub.
Answer: FFmpeg can do anything :D
ffmpeg -i input.mp4 \
-filter_complex '[0:v]split[top][bottom];[bottom]crop=iw:ih/2:0:ih/2[right];[top]crop=iw:ih/2:0:0,pad=iw*2:ih:0:0[left];[left][right]overlay=W/2:0[outv]' \
-map [outv] -c:v libx264 -crf 22 -preset veryfast output.mp4

The split filter creates two identical versions of the input video ([0:v]), called [top] and [bottom] for the purposes of the filtergraph. The first crop cuts the top half of [bottom] off, creating an output called [right]; the second crop removes the bottom half of [top], then sends it to the pad filter, which doubles the width of the video frame to the right and creates an output [left]. Finally, [left] and [right] are sent to the overlay filter, which places [right] on top of [left], on top of the black area created by the pad filter, creating the final output [outv].
Unfortunately I can't put a line break in the -filter_complex, since that would break the command.
-map [outv] tells ffmpeg to use the video output of the complex filtergraph; if you want to use the input audio too, you can use -map 0:a as well. All the -c:v and so on are video settings.
Here's a slightly shorter, but less clear version of the above command:
ffmpeg -i input.mp4 \
-filter_complex 'split[top][bottom];[bottom]crop=iw:ih/2:0:ih/2[right];[top]crop=iw:ih/2:0:0,pad=iw*2:ih:0:0,[right]overlay=W/2:0' \
-c:v libx264 -crf 22 -preset veryfast output.mp4

Answer: You'll need to use something different, other than VirtualDub. Sony Vegas 8+ comes to my mind.
In Sony Vegas you can put your video, rotate it, crop it and fit the first upper part in the left side of the video. I am assuming that you are going to use a 16:9 aspect ratio video project for this case, so you can use the left side of the canvas in order to put the first part of your video.
In another row in the time line, you can add the same video, rotate it, crop it and fit the right side of the project. This way, you can put the parts of the video in whatever position, rotation, size, zoom, etc. as you wish.
I suggest you to run a search on youtube with the words "Sony Vegas Pan Crop Tutorial" in order to find useful tricks on how to do this. I was about to suggest you some of them but they doesn't cover exactly your need. Nevertheless, learning how to pan/crop a video you can achieve this task.
Good luck!


Texture painting doesnt work as intended

Question: Im new to blender and wanted to try making the famous donut. But when i started working on texture painting i came across a problem. When I tried painting the texture, i couldnt paint the 3d donut because my drawings were random and not where i wanted them to be. What could be the problem here?
Answer: If your texture painting isn't working right its probably because of your mesh. I had to go to Edit Mode and select all vertices. Then I just simply go to Mesh > Normals menu and then click on Recalculate Outside.


Being 'known by Jesus' in Matthew 7:22

Question: In Matthew 7:21-22 Jesus says for Him to know me I must do His will. There are plenty of scriptures that talk about God seeing us and knowing us, why then does Jesus say I didn't know you? Is it because the word 'know' is more of an intimate 'knowing' ie, a relationship?
Comment: Since God never sins, He does not "know" sin and evil in the same sense in which a sinner does, which is what the text is about.
Comment: @Lucian Looks like the basis of a solid answer. Stephen, welcome to ChristianitySE.  The [tour], [ask] and [answer] provide guidance on how this site works best.
Answer: For Jesus to 'know' us means we have submitted to his Lordship and we are no longer slaves but are intimate acquaintances.  Jesus said this of his disciples:

Whoever does God's will is my brother and sister and mother (Mark 3:35).

When we know Jesus and believe in him, we are adopted into God's family:

Yet to all who received him, to those who believed in his name, he gave the right to become children of God (John 1:12)

We can call God "Abba, Father" (Romans 8:15).  It doesn't get more personal and intimate than that!  When people speak of "knowing" Jesus, they refer to having a relationship with Him.  Being a Christian is more than knowing about Jesus; being a Christian is about knowing Him personally.  Jesus spoke of the need to know the Saviour when He prayed:

This is eternal life: that they know you, the only true God, and Jesus Christ, whom you have sent" (John 17:3).

When we know Jesus, we also know God:

We know also that the Son of God has come and has given us understanding, so that we may know him who is true.  And we are in him who is true – even in his son, Jesus Christ.  He is the true God and eternal life. (1 John 5:20)

There were people in Jesus' day who thought they were friends of his because they knew the Law, made strict rules for themselves (and for others), and listened to his teaching.  They followed him, applauded the miracles, and liked some of what he said. But Jesus calls them "evildoers" and declared, "I never knew you."  Matthew 7:21-23
They didn't know who Jesus REALLY was.  Some people have an intellectual, head knowledge of Jesus.  They may have read the Bible and believe it, but have never allowed the truth about Jesus to penetrate into their hearts so that their lives are transformed.  Jesus said:

These people honour me with their lips, but their hearts are far from me. They worship me in vain; their teachings are but rules taught by men. (Matthew 15:8–9 quoting Isaiah 29:13)

To really know Jesus means we grasp the significance of what God, in Jesus, did to pay for our sins and we seek his forgiveness so that we may know him personally, and enjoy intimate fellowship with him through the Holy Spirit (Acts 2:38).
Answer: Well, yes, you have answered it yourself.
"Know" here means known and loved.

"The 'knower' has actual involvement with or in the object of the knowing" - ("Vine's Complete Expository Dictionary" under the Hebrew entry "To Know").

And so "Adam knew Eve his wife, and she conceived..." (Gen 4:1) where intimacy is intended.
It is the same sense of intimacy as in Psalm 1v6 :

For the LORD knows the way of the righteous; but the way of the ungodly shall perish.

So, in Exodus 6:3 it is clear the word "know" does not merely mean what English means: I appeared to Abraham, and to Isaac and to Jacob, by the name of God Almighty, but by my name Jehovah (i.e. LORD, the tetragrammaton) was I not known to them.  But actually they did know his name if we use the English sense of the word "know"(eg Genesis 14:22):

Yada' (3045 in Strong's) in the intensive and causative stems is used to express a particular concept of revelation.  God did not make himself known by His name Jehovah to Abraham, Isaac, and Jacob.  He did reveal that name to them, that He was the God of the covenant.  Nevertheless, the covenant was not fulfilled  (they did not possess the Promised Land) until the time of Moses. The statement in Exod 6:3 implies that now God was going to make Himself known "by His name"; He was going to lead them to possess the land. (Vine's)

The bare knowledge of His name Yahweh/Jehovah did not constitute a knowledge of Him by His covenant name. What was needed was a personal felt experience of all that the name means by going in to possess the land of  promised in the covenant.  Hence to know includes to know experientially.
Again from Vine's, it may also mean "to know by deduction" or "to know by observing and reflecting" rather than experience. Hence, Noah "knew" the waters had abated when he saw the olive leaf in the dove's mouth (Genesis 8:11).  He could not see or experience the abated waters for himself, but he "knew" by deduction.
Returning to Matthew 7v22,23 (See Spurgeon's Sermon Notes, Kregel Publications, 1990):-

These open professors of religion attended to marvels, but not to essentials; they prophesied, but did not pray; they cast out devils, but the devil was not cast out of them; they wrought wonders, but were also workers of iniquity.  Jesus had been omitted from their religion; they were utter strangers to his heart.  He had neither chosen them, nor communed with them, nor approved them, nor cared for them.

Outwardly they looked good to others:

they were religious and undertook Christian service; they said "Lord, Lord"; they were energetic; they did everything in the name of Christ;

But they had no real faith in Jesus as their Lord and Saviour.  Some currency is counterfeit. Some gold is Fool's Gold. Not all in the church are of the church (2 Timothy 2:19).

As if to say "I knew you well enough for "black sheep" or rather for reprobate goats: I knew you for hirelings and hypocrites, but I never knew you with a special knowledge of love, delight, and complacency.  I never acknowledged, approved, or accepted of your persons or performances.
Notice, it was not "I once knew you but I cannot own you now"; but "I never knew you;  - I never knew you as real penitents, as supplicants for pardon, as humble believers, or as true followers."

Perhaps they thought their works would make them accepted; but we must come to Jesus as sinners seeking for a free pardon, not as workers for our wages.

Those who accept His invitation "Come unto Me" (Matt 11:28) shall never hear Him say "Depart from Me". (Spurgeon)

Before attempting to live for Jesus we must believe on and entirely depend on Jesus and his finished work, I mean his blood and righteousness, for our justification, and on his Spirit for our sanctification.
Comment: Thank you Andrew, the quotes from Spurgeon were particularly helpful
Comment: You are very welcome, and thank God for C.H. Spurgeon and Nigel who persuaded me to alter the answer.  You might find some of these verses worth mulling over:  John 6:37; John 6:29; John 10:27-30; 1st John 5:13; Eph 2:8-10 (consider the _past_ tense "you _have been_ saved"); and John 3:15 together with Numbers 21:6-9 and Isaiah 45:22: that we have been poisoned by the serpent of sin is common to all, it is those who look to God's remedy who are cured.

Being 'known by Jesus' in Matthew 7:22


Multiple field updates in flow

Question: I have created a flow with a scheduled path.  When that time is reached, I want to update multiple fields.  I have created one Update Record element for each field update, and have chained them together.  My question is, will the object trigger run after each field update, or when all the field updates have been made in the flow?
Answer: Each Update Records element will initiate the save sequence defined in Triggers and Order Of Execution
A better strategy is to use Assignment element(s) and assign to a record variable and then use a single Update Records element
Note that each SOQL/DML element (as well as Apex Action) are bulkified - all flow interviews that start in a transaction will run in "parallel" and when they all hit the same DML element, the Flow runtime engine bulkifies the SOQL/DML/Apex action so triggers execute efficiently.

Multiple field updates in flow


קִדְשָנוּ versus קְדִשָנוּ

Question: I've noticed a very common mistake that surfaces when people say Birchas HaMitzvos out loud. Instead of saying אשר קִדְשָנוּ במצותיו (kee-di-shu-noo) as written in all Siddurim, many people pronounce it "קְדִשָנוּ" (ki-dee-shu-noo) instead. Is there any source or reason for this change, or is it simply a widespread mistake?
Comment: Do you mean using the wrong 'shva' or using a chirik instead under the daled, or the wrong chirik under the kuf
Comment: @preferred I'm referring to using a chirik under the daled and a shva under the kuf instead of the other way around. Listen up when the chazan counts s'fira, lots of people say it incorrectly
Answer: See grammar and pronunciation rules from Jewish Virtual Library. From my understanding of the rules, the correct pronunciation should be "keed-di-sha'-nu". Since there is a dot in the daled, it is considered as if it is doubled, i.e. - ending the 1st syllable and starting the 2nd one, as well.
Offhand, I would say that sounding the 2nd syllable with a chirik has no grammatical basis, as that's not the conjugation of the verb "kadesh" in the present plural in Hebrew. Someone who does pronounce it this way, could be mistaken for using another verb which sounds like he's saying "ki-di-shay'-nu", which would be using a different verb "deshen" meaning "refine", as in the term we use in Shabbat musaf, "am medushnei oneg".
Comment: That would be a כ instead of a ק
Comment: That's alot of information to process... Interesting note about the doubled daled. I asked this question partially to raise awareness, as I didn't think the mispronunciation actually had any source.
Comment: Sorry about the unintentional "overload". I thought that the additional comment on the :deshen" verb would interest you and others. @Double AA is correct about mentioning the "chaf" that would be at the beginning of the word. Like other languages, Hebrew has many homophones.
Comment: כ and ק are not homophones... One is more guttural like the Arabic ك and ق respectively
Comment: @DoubleAA - You are technically correct on this. However, most pronunciations, today (and I do admit that many of us pronounce Hebrew incorrectly in numerous areas), tend to vocalize these 2 phonemes the same way.
Comment: @DanF It was interesting. I also hope some people start noticing this mispronunciation and changing or mentioning it to their friends. I hear it so often lol

קִדְשָנוּ versus קְדִשָנוּ


Transfer Photos from Mac to Android Device

Question: How can I transfer photos from Mac(including iPhoto) into Android phone? When I connect my android phone to Mac via USB, iPhoto can recognize it, but I can only find the import new photo button, then where is the export photo to android phone button?
Answer: Find the Android phone in Finder, as it shows as just another USB device. Drag photos from iPhoto to the Android device in Finder.
Answer: You can not use USB cable and still manage to transfer photos from Mac to Android device, if you use AirMore, AirDrop or Dropbox to help you.


Silverlight deep zoom image click issue

Question: I am using deep zoom composer to generate XAP and html files and they works fine for me. Currently, I want to retrieve the information about which image the end user is clicked, and I want to display the description information for the user clicked image in another Silverlight TextBox control on the same page. The description informaiton is currently stored in a database, and has WCF interface. So, I need to know which image in the whole deep zoom area is clicked (support I have 100 images, 10 images in a row and 10 rows).
Any reference samples or documents? I am using Silverlight 2.0 + VSTS 2008 + .Net + C# + IIS 7.0 on Windows Vista x86 Enterprise.
thanks in advance,
George
Answer: projectsilverlight Wilfred Pinto posted  interesting solution to find the image index of the selected image. go check out here
I used the index to loop through the MetaData.xml collection to find the tags associated image..

Silverlight deep zoom image click issue


Type A USB 3.0 with Type C USB 3.0 orientation:

Question: What if I use a USB A - to - USB C adapter cable, with the A side plugged into a USB 3.0 Type A receptacle, and the C side able to accept a slave device, say perhaps a USB C flash drive.  Will the C  side of the cable still be rotationally symmetrical, as would be the case for using type C USB 3.0 throughout?  My guess is no, because there are no CC pins on the Type A 3.0 connector, and only one set of Tx and Rx pins.
Answer: The Type-A receptacle doesn't have CC pins, it is true. But the CC pins are present in the other end (Type-C) cable. The A-to-C adapter you described is called "legacy cable assembly", where the Type-C end represents host functionality (because Type-A receptacle is normally a USB host). To make the Type-C cable end to look like a host, the C-end includes a 56k resistor pulled to VBUS. The resistor is mounted inside the Type-C overmold. This signals to a Type-C device that a standard 500/900mA host is behind the cable, and everything works, in both orientations.
Answer: Yes, it works. There is a CC pin on the USB-C side of the cable, and the cable connects it to VBus through a termination resistor (as the host device would do for a C-to-C connection). This lets the downstream device know its intended role, as well as the orientation of the cable.
Answer: If a USB 3 cable with an A plug and a C plug is used, then it is up to the device with a C socket to determine the orientation of the cable and perform usb 3 signaling on the appropriate pins.
Adapters with C sockets are not allowed by the standard, if someone was to make such an adapter anyway, then you are likely to find that superspeed only works in one orientation (or doesn't work at all).


Configurable Swatches Image Problems

Question: I have the weirdest problem.  I think it has to do with an ERP we installed on Magento 1.9.3 but I'm not sure.  I have configurable products that have different sizes.  I use the configurable swatch to create a nice label for the sizes since I don't want to use drop down fields.  For the most part, the products came out correct.  However, when I add new products (after installing extension) I get a copy of the product image rather then labels.  Can someone help me troubleshoot the problem?
CORRECT
http://c6341.sgvps.net/~msrhp/index.php/default/riding-gear/nxt-39/jackets/nxt-jersey-red-navy.html
INCORRECT
http://c6341.sgvps.net/~msrhp/index.php/default/riding-gear/legend-71/test/legend-71-jersey-black-yellow.html
Answer: Looks like the problem was no text with the images.  Once I added text, problem was solved.

Configurable Swatches Image Problems


Upgrade from restful_authentication to devise :confirmable not confirming old users

Question: I have upgraded my application from Rails 2.3.5 to Rails 3.2.2. I have replaced authentication from restful authentication to devise with guidance of steps given in devise wiki.
I have user model as
 devise :database_authenticatable, :registerable,:confirmable, :validatable,
     :recoverable, :rememberable, :trackable, :encryptable,:encryptor => :restful_authentication_sha1,:authentication_keys => [:login]

When I tried to login with old user then I am unable to login because of confirmation token matching problem.I can login with new user after confirmation
BUT when I remove :confirmable from devise options. I can login with old user too.
I have added pepper and stretches
config.stretches = 10

config.pepper = "<KEY_FOR_SITE>"

Another thing is that when I try to login with unconfirmed user the notice will not be displayed just login page refreshes
Please help.
Answer: Try to set:
config.stretches = 1
config.pepper = ''


Is there a way to close voting on your post?

Question: I recently posted a question that turned out to be a duplicate, but already had multiple answers. I wanted to delete it, but I couldn't. I kept getting downvotes, ruining my reputation. I can't do anything about it. Is there a way to close voting?
Comment: If it's a duplicate, then presumably it's already been closed as a dupe or is in that process. If it hasn't been, then find the URL of the dupe, then flag your own Q as a dupe or it (I'm guessing you don't have he 3K rep needed to vote to close instead of flag). Otherwise, there's nothing else you need to do (or can do).
Comment: @ZaniXu If you spend *any* time here, you'll realize how little 20 rep is. I wake up some mornings having gained more than that for posts I made years ago. Just to reinforce the point in my answer: don't sweat it. Focus on producing quality content going forwards, and losing a little rep because of the odd rushed post will be nothing.
Comment: @yagmoth555 You don't get a "fresh start".  Account deletion doesn't get around question bans
Comment: But I have like only 20 reputation
Comment: I started yesterday
Comment: If you badly start on a community, you can ask via the contact form to get your account deleted, and you can restart later. It happened to me one time with a situation like you. After a while you will learn that the DV is not a personnal attackt too
Comment: @Ramhound The OP didnt talk to get around question ban, just not seeing something DV day after day, which is impossible to remove as a question if a upvoted answer exist.
Answer: There's no way for a user to lock voting on their question. That would be ripe for abuse.
You'd have to get a lot of downvotes to "ruin" your reputation though. 5 downvotes will cost you only 10 rep, and that amount can entirely be recovered by a single upvote on an answer of yours. Don't sweat it. It's peanuts.
And besides, the point of the downvotes was (, likely, in this case) to point out that you did insufficient research. In the future, just think back and make sure you've covered all your bases before posting and this won't be a problem.
Answer: According to the help center, you can vote to close your own questions once you have 250 reputation, and you can vote to close any question once you have 3000 reputation. If you don't have that much reputation but have at least 15 reputation, you can flag your question for closure, which will send it to a review queue where users with enough reputation can vote to close it. To do so, click the "flag" link under the question, choose "should be closed" and then choose the reason why you think your question should be closed.
However, in your question, you say that the question "turned out to be a duplicate". I suppose that you mean that it's marked as a duplicate, which means that it's already closed. If that's the case, there's nothing more you need to do. It can also happen that it's not closed yet, but someone flagged it. In that case, you will have a banner on the top of your question with two buttons, "this solved my problem" and "my question is different". If you click "this solved my problem", your question will be immediately closed, and if you click "my question is different", it will allow you to edit your question to explain why it's  not a duplicate. In this case, I suppose you would want to click "this solved my problem".
Also, you seem worried about the downvotes ruining your reputation. Closing a question only prevents new answers to that question, it doesn't prevent downvotes. The only questions that can't be downvoted are deleted locked questions, and only moderators can lock questions. If you think a question should be locked and you have at least 15 reputation, you can flag it for moderator attention by clicking on the "flag" button below your question and choosing "in need of moderator intervention" and typing a custom message to the moderators. However, posts are only locked in rare cases, and I doubt that your question is one that should be locked, so I don't suggest asking a moderator to lock it, otherwise your flag will probably be declined. For more information about how closed and locked posts work, I suggest reading What is a "closed", "on hold", or "duplicate" question? and What is a "locked" post?.
If you're worried about your reputation and can't delete your question, the best thing to do would be to edit the question to turn it into a good question. You can read the "how to ask" page in the help center on the site you've asked the question on for tips about how to ask a good question. You can access the help center from the "?" icon in the top bar. Once you've turned it into a good question, it will hopefully get upvotes which will compensate for the reputation you lost from downvotes.
If you've read the help center and you don't think you can edit your question into a good question, you can also get the post dissociated from your account as described here. If a post gets dissociated from your account, your name will be removed from the post, no further votes on the post will affect your reputation (neither upvotes nor downvotes), you will lose all the reputation you've earned from upvotes on that post and you will get back all the reputation you lost from downvotes on that post. However, you shouldn't do that too often. The only way to get a post dissociated from your account is to have a Stack Exchange employee do it, and if they notice that you're abusing that feature to be able to ask bad questions without losing any reputation, they might delete your account. It's OK to get a post dissociated from your account once or twice when you really regret posting something, but you shouldn't do that systematically every time you get downvoted.


How to open holes in plastic electrical junction box

Question: How am I supposed to open the holes for the cables in a junction box like the one shown in the picture below?
Comment: Where are you on this planet?
Comment: I'm in Cyprus..
Answer: I would use a sharp knife, a so called utility knife, if I had one handy, but would try my moderately well sharpened pocket knife if that was all I had.
EDIT It may be that all one has to do is to pierce a "ring" with a knife or even a flat blade screwdriver and then pulling propagates the tear as the inside is pulled out.
EDIT2 The fact that the ring feature is convex suggests that the designers envisioned the removal could be with a slicing action with a blade parallel to the plane of the rings. For a right handed person I could imagine holding the box with the left hand with the inside of the left forearm braced against the chest.
The knife would be held in the right hand (cutting edge toward the thumb) with the right elbow braced against the person's ribs. The cut would be made by pulling the knife so that in the event of a slip the right forearm would contact the chest and stop the movement of the knife. After slicing 90 deg the box would be rotated 90 deg to continue the cut . . .
Alternatively, the box could be held down on a flat surface and the knife held with the cutting edge away from the thumb. The removal would be with a slicing action from above then the box flipped over for slicing the remainder.
Answer: I would use a step drill bit similar to this one.  It will allow you to drill whatever size hole you need for the appropriate size connector.
Cheap Harbor Freight Bit
Answer: First, you make sure this thing is actually certified for use in mains wiring.  If it came from ebay, amazon or alibaba/aliexpress, it's not.
Then, you obey the labeling and instructions that come with it.  It can't pass certification without instructions, because certification isn't for all uses, only for the methods of use described in the instructions.
If you improvise, that will get you written up by an inspector and you'll have to redo the work.
Regardless, any wire entry into a box requires a strain relief clamp, mainly to protect the wire from damage from the box edge, unless the labeling and instructions tell you otherwise.

 Which they would do, if the box had been designed, tested and certified to work that way.


Doppler compensation method for cdma

Question: Do you know of effective and simple methods to compensate for Doppler due to movement for the CDMA protocol?
Comment: There's no "the CDMA protocol"; CDMA is a multiuser access scheme, not a specific protocol!
Answer: I sure wish I had a universal method for that that is any smarter, but:
Unless you have enough SNR and computational power so that you can treat the chips as symbols of a higher rate single-carrier system and do the usual frequency correction as if it was just a normal single carrier system (e.g. higher-order phase control loops), you'll have to brute force your way through frequency hypotheses.
That's among the reasons why high-bandwidth communications switched away from CDMA (as used in UMTS and 802.11b, for example); without very specific restrictions on the code, the best you can do is decoding a set of frequency-shifted versions of your signal. One of them will work best – the one with the correct frequency offset.
Thinking of systems, not all is lost – one could have a non-CDMA preamble where you do an initial frequency error estimate, and then periodically insert pilot symbols in your CDMA data payload to keep track of phase drift. This really happens in a very narrow window between channel coherency and desirable maximum spreading gain.
Comment: Once you are within the coherence bandwidth of your symbols (1/T where T is your correlation time), you can simply track the post correlation I and Q rotation. I think of the frequency hypothesis operations you describe as the acquisition operation and "Doppler correction due to movement" as an ongoing function during carrier tracking. Do you agree Marcus?

Doppler compensation method for cdma


Best practice in 2018 to claim Ethereum presale purchase

Question: I have the presale wallet and password, but went through a number of trials and just now trying to get back on my feet. I have yet to claim my presale and could really use it to help with medical bills. I did not invest much, but every little bit helps for my situation. I've researched, but see conflicting statements about people having issues claiming and no support responses from Ethereum.org. I can say my experience is that I have yet to try and claim it because I have yet to find a confident source to try. I also did try to contact Ethereum.org, but also did not have any response which is not encouraging. Thought I would reach out here to get input. I would be grateful for detailed instructions that also deal with claiming both ETH and ETC as well. Blessings!
Answer: Yes, I managed to split my ETC & ETH in 2018. 1st use MEW and make sure to point it to the ETC chain. Then unlock the pre-sale JSON file using MEW which should then show your ETC balance. What I did was to make a transfer to Changelly to convert the ETC into ETH. I created a new ETH wallet to be able to receive the ETH that I will get and did not put it in my pre-sale ETH wallet. That's it. I left my pre-sale ETH where it was and will keep it for a few more years.