When hardening a LINUX system what command line tools would you remove first in order to make an attackers life really difficult?

Question: When hardening a LINUX system what command line tools would you remove first in order to make an attackers life really difficult?
Comment: Generally, any command line tool can be re-implemented by an attacker. Removing it does not slow them down. The only exception is for executables that are setuid, setgid, or setcap.
Comment: That's the wrong approach. Don't remove commands from a complex system but start with a small system (like Alpine Linux) and whenever you add something to it ask yourself why this really needs to be on the system and how it could be abused - especially with powerful things like compilers, scripting languages, network tools  etc which makes it easy for an attacker to add any functionality they need themselves. Apart from that, it is unclear what you have installed on your system so it is unclear what all can be removed.
Comment: What is the system supposed to do? What sort of attacker? Security is pointless without defining these things.
Answer: Most of the native tools are necessary for system administration. There are very few that you could remove without being concerned that you'll need them one day.
You run a serious risk of extending outages or delaying projects when administrators are missing essential tools.
Instead, you should focus on:

Making it difficult for an attacker to communicate with the system (network boundaries, packet inspection, removal of unnecessary services)
Isolating hosts based on sensitivity of data (DMZs, network ACLs)
Blocking inappropriate communication (HIPS, network IDS/IPS, local firewall/iptables)
Preventing exploitation and limiting escalation (patching, app-specific hardening, least privilege users, chmod jails, sandboxing)
Answer: The first thing I would do, is to keep off any insecure Telnet/FTP/Rlogin/RSH or other analogous superannuated services.
There are various commands and files that can be captured from people when they are connected on the same network. The solvent of the problem would be the usage of services that implement protocols with SSL/TLS encryption (FTPS, OpenSSH, and others).
Example on a Debian/Ubuntu system:
<code>~ $ sudo apt-get --purge remove nis yp-tools xinetd atftpd tftpd tftpd-hpa telnetd rsh-server rsh-redone-server
</code>
Answer: First? First I would remove compilers like gcc, g++, etc. No need for development tools on a prod system.
Comment: Who said it was a prod system?
Comment: Many tools and commands recommend building from source rather than binary download


magento 2 list not showing in Stores > Settings > All Stores

Question: i'm trying to setup a new magento site in 2.3.5p1 with multiple store views. after creating all the store views, i added all products. Now when i visit the stores list in Stores > Settings > All stores, the list has gone missing, although the number of records says 10. Below is the image for ref. Please advise how to resolve.
Answer: You can try to run indexer command again.


Is 0x Api perform "Dex aggregator" Swaps internally like 1Inch exchange?

Question: Is 0x Api performing "Dex aggregator" Swaps internally like 1Inch exchange?
Answer: The 0x API is a layer that sits on top of the 0x protocol which you can think of as an "aggregator of aggregators". This means when you make a swap on 0x, it looks across 3 main sources of liquidity (order books, AMMs, and market makers) to provide you with the best price.
The diagram here -  https://blog.0x.org/exploring-the-0x-defi-ecosystem/ - provides a good visual w/ examples of the different parties.

For more info about how the 0x protocol works, check out the architecture section of the 0x protocol docs.

Lastly, this blog post covers how for a given quote, 0x API's smart routing algorithm scans across DEXs for the best prices and will split up the order across the different sources (if relevant) to give the maximum return on a swap.
Hope this helps answer your question.


I know my mnemonic phrase but #walletconnect has me stuck on "convert" page. I need help!

Question: I have a very small bit of ETH from a while ago. Not worth much, but want to convert and cash out. I have never been serious about crypto, so all I know is my phrase. I booted up Wallet Connect in my previous phone and put in my mnemonic phrase. All it did was bring me to convert to EOS page and it gets stuck there. #walletconnect not helpful. Any advice for a novice?
Comment: Which wallet did you use? The wallet connect protocol doesn't have an official wallet, they provide a list of compatible wallets https://registry.walletconnect.org/wallets. It seems there's a scamwallet in the playstore with the same name, but it is unrelated to the protocol.
Answer: You can use the MyCrypto Desktop application to access with your secret recovery phrase (mnemonic). Be careful about where you type in your phrase online - as you may be getting scammed!


IK Rotation option for opposite end

Question: I have a string of bones with an IK constraint at the end that uses most, but not all, of the bones. When the target is brought back, the first bone bends greatly away from the bone before it, and the last bone (the one with the IK) bends greatly relative to the rotation of the target. In the IK constraint, there is a rotation option which will force the last bone to match the rotation of the target, and the bones before it rotate to account for that. How can I do this but for the first bone instead of the last, so it matches the rotation of the immediately before the IK-affected bones and the other bones rotate to account for it?
Comment: I've worked around it for now by switching the direction of the string of bones.
Comment: I may not be understanding this correctly, but if you don't want the first bone in the chain to rotate with the IK, then don't include it in the IK chain?  It will inherit its parent rotation, so if it starts in the same rotation, and it doesn't get rotated, it will stay in the same rotation as its parent.
Answer: This effect can be done by reversing the IK string ([w] -> "Switch bone direction") and placing the IK constraint on the "first" bone targeting the bone that used to come before it. Give the "last" bone (that used to have the IK constraint) a Copy Transforms constraint of the old IK target.
However, there are a couple things wrong with this method:

If the target is brought outside of the maximum length of the bones, instead of the bones pointing toward the target, they will follow the target and point at the other bones.
The rotation of the new target must be accounted for.

IK Rotation option for opposite end


why use svd() to invert a matrix?

Question: In MATLAB, i compared elapsed time to invert a Hermitian matrix using inverse(), svd(), and chol(). svd() took the longest. So is there any reason to prefer svd() to the other two methods?
Comment: in all honesty, this is not a signal processing, but a numerical math question, and might be better off on the math.SE sister site. However, VVT has made the right point: different problems scream for different solutions, and you can't compare things that are applied to different problems.
Answer: The two methods differ, above all, by their applicability to matrix classes.
col (cholesky) decomposes Hermitian, positive-definite rectangular matrices into the product of a lower triangular matrix and its conjugate transpose;
svd (singular value decomposition) factorizes any m×n matrix into the form UΣV*, where U and V are square real or compex unitary matrices, m×m and n×n, respectively, and Σ is an m×n rectangular diagonal matrix with non-negative real numbers on the diagonal.
The method inv internally performs an LU decomposition of the input matrix (or an LDL decomposition if the input matrix is Hermitian), but outputs only the inverse of square matrix only.
Both SVD and Cholesky can be used for computing pseudoinverse of a matrix, provided the matrix satisfies requirement for the method used. The pseudoinverse operation is used to solve linear least squares problems and the other signal processing, image processing, and big data problems.
UPDATE on OP's comment
The matrix can be both Hermitian and not a positive/negative (semi)definite, in which case it is called an Hermitian indefinite matrix. The (generalized) Cholesky decomposes Hermitian positive semidefinite matrices. You can also decompose a negative (semi)definite matrix, say, Anegdef, just call chol()) on -Anegdef, but you cannot compute an inverse of an indefinite matrix with Cholesky, because of unavoidable square roots of negative numbers.
Rank-deficient matrices (having zero singular values) are not invertible, as is the case for most general-case matrices. That is, there exists no matrix A-1 such that A-1A = AA-1 = I, for rank-deficient matrices. Still, many problems which you solve through matrix inversion can be solved for indefinite (and consequently non-invertible) matrices with a generalization of matrix inversion, pseudoinverses of matrices.
I won't bore you with the description of Moore-Penrose pseudoinverse concept, on which subject many articles are readily available online and in textbooks: in short, the matrix A+ is a pseudoinverse of matrix A, if AA+A = A (consequently, A+AA+ = A+). If A has linearly independent columns, the pseudoinverse is a left inverse, because in this case A+A = I, you can check it with a sample low-dimension matrix constructed for this purpose. If A has linearly independent rows, the pseudoinverse is a right inverse, because in this case AA+ = I. In general case, A may have no left/right inverses, but still have pseudoinverse A+ satisfying the equation AA+A = A.
Back to quadratic programming problems: Below, all matrices and vectors are real-valued, so instead of Hermitian conjugation H we have a matrix transpose T here. For an invertible (in a "classic" sense) matrix A, a quadratic form
$$
f(x) = {1\over2}x^{\textrm{T}}Ax-x^{\textrm{T}}b
$$
has a minimum value at xopt = A-1b:
$$
f(x_{opt}) = -{1\over2}b^{\textrm{T}}A^{\textrm{-1}}b
$$
To compute an inverse of A, you use function chol() here.
You can solve a minimization problem for a quadratic form with a non-invertible matrix A, provided A is positive semidefinite, even if A has no inverse in this case. For the singular matrix A, the minimum value is
$$
f(x_{opt}) = -{1\over2}b^{\textrm{T}}A^{\textrm{+}}b
$$
which is reached for all x given by
$$
x = A^{\textrm{+}}b + U^{\textrm{T}}{\left(\begin{align}{0\\z}\end{align}\right)}, \hspace{1cm} z \in \mathbf{R}^{\textrm{n-r}}
$$
, n is the dimension of x, r is the rank of A.
Matrix U in this solution is the factor of singular value decomposition of A = UΣVT, which you compute with the function svd(). So, maybe not all "the intermediate products, whether they be triangular matrices, eigenvectors, diagonal matrices, etc. are irrelevant when the only things that matter are the computation time(FLOPS)"?
In these examples, all matrices and vectors are real-valued, and I am not sure this example can be readily applied to your beamforming problem. Still, SVD is certainly useful in signal processing, e.g., see Image Reconstruction using SVD.
For the sake of completeness: 1) there exists a generalization of Cholesky decomposition useful for computation of a positive semidefinite matrix, and the pseudoinverse can be computed with the help of Greville's algorithm. But this algorithm is implemented through recursion on matrix columns, and the Cholesky speed can be offset by this recursion; 2) the "stability issues" are addressed by the LDL decomposition.
Any way, these algebraic technicalities are not "too much information" for those who work in signal processing: if, even without a preliminary analysis on positive-definiteness of matrices, you start compute using a chol() function and it turns out that you are getting weird results, you now know what might be the culprit.
Comment: Thank you for your responses. To be precise, this question pertained to inverting a Hermitian matrix in a signal processing application. I guess I still don't understand why svd() would ever be preferred in such a case, since it takes longer than the other two methods. My understanding is that the intermediate products, whether they be triangular matrices, eigenvectors, diagonal matrices, etc. are irrelevant when the only things that matter are the computation time(FLOPS), memory usage, and accuracy/stability of the resulting inv matrix. I read that the Cholesky method has stability issues...
Comment: Now that you've made known the context of your study in your question on unconstrained array gain, I can be more specific in my answer on the svd()/chol() inter-comparison, see the answer UPDATE.
Comment: Thank you - So, are you saying that ... if a matrix is not ... directly invertible, you can still ... get its "pseudo-inverse" by taking its svd()? I may have misunderstood that the svd() enables you to get the literal inverse instead of the "pseudo-inverse." I think i should read this, one of my references, more closely: http://pillowlab.princeton.edu/teaching/statneuro2018/slides/notes02_SVD.pdf
Comment: Basically, this is what I said, you get it right. Only, before diving deep into the linear algebra, make sure you definitely need pseudoinverses in your project. In your case, examine if your Hermitian matrix in beamforming calculations can be indefinite or rank deficient. If this is not the case, the awareness of the problem is sufficient for success. But, if your matrices can become degenerate, you have no other choice as to master pseudoinverses. Sort of "learning-on-demand".
Comment: Also, the separation of use cases for application of Cholesky vs SVD was blurred, see the edited text after UPDATE subtitle.
Comment: I would like to teach - demonstrate - some of these concepts for my coworkers. My idea is to generate many sample covariance matrices in matlab/Octave, i.e. an incoming sine wave signal with noise (rand() function), and then use chol() to determine if the covariance matrix is positive definite ("P flags whether the matrix A was positive definite and 'chol' does not fail"), and thereby show whether inv() and chol() can be used to invert the matrix, or if svd() must be used to compute the pseudo-inverse instead. This would also show how matrix inv depends on input data. Does that make sense?
Comment: Any covariance matrix is symmetric and positive semi-definite, so the Cholesky should always work, no need for SVD. For positive definite matrices it works unconditionally; if the matrix has zero eigenvalues, you call `chol` with the pivot param set: `chol(matrix, pivot=TRUE)`. Only mind numerical precision of your calculations: eigenvalues, however small, must be positive or zero.
Comment: As for your presentation, consider using an engineering or research problem well-known to your audience: MNA circuit equations, MIMO channel, something that can produce singular-value matrices.

why use svd() to invert a matrix?


What does layering biryani actually do?

Question: I've recently been experimenting with biryani (mostly chicken hyderabadi) and one thing that sort of puzzles me is making layers of rice (as typically instructed in recipes) as opposed to just having mixed rice over the chicken, even when each layer is topped the same way (ghee, herbs, biryani masala, saffron milk, fried onion). What is actually going on here and why does it make a difference? I would think that a haphazard mix of rice, spices and fried onions would achieve basically the same thing. You might not mix it too thoroughly so that you still get some unevenness like you would with layers. The steam should also still distribute unevenly the same way as it gets more trapped at the bottom, I guess. The final dish that is served is also not really "layered" in the same way as e.g. lasagne, so it's not like it's a textural or structural thing either.
Comment: Related: https://cooking.stackexchange.com/q/121623/67
Answer: From what I understand, biryani is never stirred except at the end when it is served.
Part of the reasons for not stirring is that traditionally during the second stage of cooking, the partially cooked rice is finally baked and steamed in a sealed pot. Prior to this, the rice is often cooked in stock beforehand to add flavour, but again it is not stirred.
As moscafj has said, part of the appeal of a biryani is the crispy layer of rice at the bottom, which would be lost upon stirring. But layering has a much more important role to play in the biryani.
Part of the inherent problem with the dish is the large volume of bland rice versus meat. It is a difficult balance to season such a dish throughout properly with liquid, whilst maintaining the correct texture. Traditionally, the layers were very different ingredients and each layer was independently seasoned so that sufficient flavour was added to the rice. The difficulty here with the mixing method is if you add sufficient liquid to intensify the flavour, the rice will potentially be soggy and overcooked, which is what would happen if the starch was released from the rice by mixing or too much much liquid added.
By building the biryani in layers, and seasoning each layer as it is assembled, different flavours are absorbed by each layer. Every layer of rice can then maintain the required "Stiffness", as very little liquid is added, just sufficient to either be partially absorbed or steamed off. When assembling the dish the rice is always gently placed on top of the ingredients, and never pushed down, as this again could break the rice.
The ultimate test of a good biryani is separate, cooked pieces of rice that are well seasoned and flavoured independently of any other pieces of meat or vegetable etc. from the dish. With care, you could achieve this with a stirred mixture, but to do so consistently (as the properties of rice varies considerably with age and variety etc.) would be challenging.
Comment: Stirring also would mean that you no longer have as much variation in the dish— some cuisines really value there being multiple flavors / textures within a dish rather than it being completely homogeneous.
Comment: Also: depending on how you're serving it, the layers may still be separate when served.  Yes, it's common to dump everything out on a platter, but sometimes one carefully unmolds the biryani, or even serves it in the original cooking pot, so all the layers are intact.
Comment: It's also probably out of scope for discussion here, but there are cultures where people eat on a set order (male adults before women and children).  Layering would give the people eating first the option to select more protein or carbs instead of it being a fixed ratio in the whole dish.  Even without the cultural aspect, some people just prefer one more than the other
Answer: When I cook a biryani, my goal is to ultimately get a crusty rice layer on the bottom. I use a dutch oven. When ready I flip the biryani onto a serving platter (a tricky maneuver for sure), the crusty rice (with luck) is on top.  The layering simply serves to ensure that everything inside is evenly distributed, but that the rice layer is intact.  The desired crusty rice layer is the only reason I see to avoid mixing thoroughly in advance. It certainly won't impact the flavor or cooking, but you might not be able to achieve that even crust, which is my personal goal.
Comment: @tmph I put a rice layer in the bottom of the dutch oven to start.  Then, proceed with layering.  I don't know if it is traditional, but I like the crusty rice, and it is the only reason I could think of for NOT mixing everything in advance.
Comment: Okay, that makes sense, but I've actually never come across a biryani like that. Sounds a lot like tahdig though, which is another dish I enjoy so worth a shot for sure!
Comment: @tmph...yes, I suppose I am really going for an Indian biryani with a tahdig-like crust...it never gets that evenly crusty, but any crunchiness is enjoyable.
Comment: Isn't the meat usually "in the way" so that you don't really get a crusty layer by contact with the metal surface? Maybe I am misunderstanding you, but I'm not used to biryani being crusty, at least not like, say, Iranian tahdig. I'm also not really sure how mixing changes that. It is still just rice in the end, or are you avoiding getting onions and herbs in the way of your crusty rice?
Answer: Adding a historical note, which supplements the other answers on this question:
Historically, Biryani only had two layers (see video of making a 1500s biryani here).  It consisted of a meat stew (usually goat) with parboiled rice on top, cooked in a large pot over hot coals.  In order to have the rice steam properly, it had to remain mostly above the stew. The wet stew could handle long, hot cooking. Rice grains which dropped to the bottom of the pot (or were mixed in) would turn to mush or burn.
The many-layered biryanis we see today are descendants of that early version.  In some cases, the layering probably is actually an affectation, and doesn't affect the taste/texture much if the biryani is being scooped out onto a platter. But in other cases, it might change the final result.

What does layering biryani actually do?


What is the fastest way to get money?

Question: I'm playing Dragon Quest IX, and I'm at the part where I just got the boat. What is the fastest way to make a bunch of money? I need about 10,000 to buy the best equipment and grinding takes a really long time when you only get a few hundred per enemy.
Answer: Early on the game, the best technique is to fight the highest level monsters that you have access to.
Here are some more techniques:

Gold Golems, which you can find in the ditch south of Gleeba, drop 505 gold each.
Use Alchemy to make Ear Cosys (Fur Hood + Bunny Tail + Lambswool) and sell them.  You can buy the ingredients at Slurry Quay (Fur Hood), Porth Llaffan (Bunny Tail) and Batsureg (Bunny Tail).
Use Alchemy to make Gold Mails (Silver Mail + Gold Ring + Gold Bracer) and sell them.  You can buy the ingredients at Bloomingdale (Silver Mail) and Porth Llaffan (Gold Ring and Gold Bracer).
In mid level (Copper, Bronze, Steel, Silver, and Gold) Cave and Ruin grottoes, you might find Gem Jamborees - these are worth 1130 gold each, and drop Gleeban Gold Pieces or Gold Bars.
In high level (Platinum, Ruby, Emerald, Sapphire or Diamond) Ice (Snowhall, Tundra, Glacier) and Ruin (Crypt, Ruins, Path, Maze, Lair, World) grottoes, you might find Gem Slimes - these are worth 10080 gold each.

(Most of these techniques require finishing certain points of the game.)
Comment: Where are the gold golems?
Comment: I'm told they "in the ditch south of Gleeba".
Comment: @Apreche In Gleeba west of the desert on an island.
Answer: I choose to make ear cosies. Killing gold golems are more fun but is not very efficient.
I am pretty sure making gooey gear is most efficient.
To get a lot of slimedrops I go to the plateau by Angel Falls and kill slimes.
Answer: I just fight grotto bosses. It's inefficient I'm sure,  but you got lots of exp. and a nice bit of gold, and sometimes nice drops (especially legaxy bosses)
Answer: Grinding takes a while, but I made 16,500 gold in an hour battling non-stop.
Faffing about using alchemy and buying ingredients will take just as long, and you don't get any of the experience you'd get from battling, so it's an easy choice, really.
Comment: Once you have 96000 or so gold, you can make 99 Ear Cosies. That gets you about 22000 gold and takes maybe 5 minutes. It's much faster than battling.
Comment: and gold armor is even faster, but takes a lot more starting gold

What is the fastest way to get money?


Codeigniter HTML & Apache, JPG & jpg

Question: Hi i'm using codeigniter to save some jpg/JPG files on the webserver.
The problem is i don't know if all of the files extension will be the same: jpg/JPG
so on rendering i put a tag like this

in this way if the uploaded file is a .jpg it will not be displayed.
the solution i'm going to use is a simple redundance of the tag HTML:

this way if one is not rendered the other is
i would like to know if this problem can be resolved in php or codeigniter by changing the file extension on upload.
Comment: Change the extension to lower when uploading the file? Seems the simplest solution to me.
Answer: $newname = basename($filename, ".JPG").".jpg";
rename($filename, $newname);

Codeigniter HTML & Apache, JPG & jpg


Xcode not compiling "Terminating app due to uncaught exception 'NSInternalInconsistencyException'"

Question: I'm having quite a problem trying to make a simple Table View in my iOS application. I started with a bit more complicated source code, but while tracking down the error I found out it was an error in the Table View Controller's Data Source Methods. So I made a very simple app with a simple Nav Controller and a Table View and I havent even managed to get it to run.
Here's what my code looks like:
AppDelegate.m
<code>    #import "BIDAppDelegate.h"

    #import "BIDFirstLevelController.h"

    @implementation BIDAppDelegate

    @synthesize window = _window;
    @synthesize navController = _navController;

    - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
    {
        self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
        // Override point for customization after application launch.
        BIDFirstLevelController *firstView = [[BIDFirstLevelController alloc] initWithStyle:UITableViewStylePlain];
        self.navController = [[UINavigationController alloc] initWithRootViewController:firstView];
        self.window.rootViewController = self.navController;
        [self.window makeKeyAndVisible];
        return YES;
    }
</code>
Here's the method that's causing trouble. To test it, I just want a list that displays 3 cells that say "Hello".
<code>    - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
    {
        static NSString *CellIdentifier = @"Cell";
        UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];

        cell.textLabel.text = @"Hello";

        return cell;
    }
</code>
Xcode marks no errors before compiling, but when I try to do it, it shows this in the console and it doesn't compile my App.
<code>     Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'UITableView dataSource must return a cell from tableView:cellForRowAtIndexPath:'
</code>
Can anyone tell me what's wrong with this?
Answer: Change this method to
<code> - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
    {
        static NSString *CellIdentifier = @"Cell";
        UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
        if (cell == nil) {
        cell = [[UITableViewCell alloc] initWithFrame:CGRectMake(0, 0, 320, 44) reuseIdentifier:CellIdentifier];
        }
        cell.textLabel.text = @"Hello";
        return cell;
    }
</code>
Comment: Thanks that worked, sorry I'm kind of new in iOS development.


Can I get Chrome to work with sites that use windows integrated security?

Question: I've had success altering about:config in firefox to get firefox to work with certain intranet sites that use windows integrated security. Is there something like about:config in Chrome? Is there some other way to change a setting to enable windows integrated security (NTLM) in Chrome?
Answer: To summarize the link provided by @Vivek Kodira, you can to set a proxy server on your local machine that will do the authentication on behalf of Chrome.  Then it's not Chrome that does the authentication, it's the proxy, but Chrome doesn't know that.
Answer: Chrome has been updated (version 5+) has the following:
In windows it integrates with intranet zones setting in 'internet options'

In Windows only, if the
  command-line switch is not present,
  the permitted list consists of those
  servers in the Local Machine or Local
  Intranet security zone (for example,
  when the host in the URL includes a
  "." character it is outside the Local
  Intranet security zone), which is the
  behavior present in IE.
If a challenge comes from a server
  outside of the permitted list, the
  user will need to enter the username
  and password.

For other OS's, you can use the command line switch:
<code>--auth-server-whitelist="*example.com,*foobar.com,*baz"
</code>
source: https://sites.google.com/a/chromium.org/dev/developers/design-documents/http-authentication
Answer: well it's a known problem... it should be fixed in future versions...
http://code.google.com/p/chromium/issues/detail?id=19
http://code.google.com/p/chromium/issues/detail?id=6824
Comment: Google is working on it right now in the issue tracking systme
Answer: It's scheduled for inclusion in Milestone 5:
http://www.chromium.org/developers/design-documents/network-stack
Answer: Googling produces a few links that suggest otherwise. The first result however (link) suggests a hack.  Hope it is useful:).
Answer: I've found out that some proxy servers (Websense in my case) have configurations concerning the user-agent. And they actively block NTLM auth even when requested by the browser if the user-agent is not recognized (or matches some list, dunno). For example in my company, setting chrome's user-agent to a Firefox user-agent magically makes NTLM authentication work. I suggest everyone having NTLM auth problems to try changing their chrome's UA to the one of a working browser (IE ou Firefox) and see if it works. If it does, blame your company's sysadmins for doing this.
Answer: Help get this fixed: go to Google-Chrome known issues and report that you are having this issue also.


Advice on unintentional academic misconduct

Question: I took an online exam a month ago and ran into some technical issues which caused me to do it on another device. I realize now that this can be seen as academic misconduct since it shows me leaving the test page quite a few times near the end and going on the LMS. A month has already passed after the exam and my final grade is out. Should I still contact the instructor in the circumstance that they look back on completed courses to spot for signs of cheating, or is this just overthinking on my end? This has been on my mind a lot and I would like some advice as to whether I am overthinking this one issue. I've been reading about Some people getting accused months later have been giving me anxiety since I do not want to be falsely accused, and I would like to know how often this happens and whether I should reach out to the prof, or is this unnecessary for my case since all I struggled with were technical problems.
Comment: As you describe it, it wasn't actually misconduct.
Comment: They operate in balance of probabilities, but I decided to just leave this problem as it is because it seems like no one has emailed me yet and likelihood of them emailing me in the future after final grades are slim
Comment: OP, for allegations of assessment offences, does your institution operate on the basis of a "beyond reasonable doubt" standard of proof or a "balance of probabilities" standard of proof?  It should say somewhere in the published academic regulations.
Answer: Teachers usually understand that technical issues come up, and yours probably already saw what happened and figured that it wasn't a big deal. Especially if your test wasn't proctored or recorded I would think that leaving the test browser is one of the lesser signs of cheating they would be looking for.
As for people being accused months after finishing their class, I've personally never heard of it and would imagine that your justification will be just as reasonable if you do end up in such a situation sometime down the line.
Comment: Definitely agree that a complaint after the course ends is very unlikely.
Answer: I think that you have nothing to worry about, just make sure you inform them of so just in case.
Comment: Strongly disagree with 'make sure you inform them'.  AIUI, the situation is that no actual misconduct took place, but there exists circumstantial evidence that might, if anyone notices it, be enough to get a conviction in a "balance of probabilities" system.  Best strategy seems to me to be to keep quiet and not draw attention to the situation.
Comment: I don't think anyone will look after final grades are out, maybe everything I read was just fear mongering and those cases after final grades only happen due to someone reporting the student after the fact or some plagiarism checker picks up something. Since everything is online now, schools will give the benefit of the doubt for technical issues during exams when investigating academic misconduct?


Connecting sim-card module to Serial Pins

Question: I am trying to connect a sim-card (GSM) module to my RPi. I've connected its serial pins, to the serial pins on the Pi. I then edited the /boot/config.txt file by adding enable_uart=1 to the end. After this, I installed the ppp screen application (see ppp.samba.org) to communicate with the serial device. I then used the command: sudo screen /dev/serial0 115200 to open the communication interface (115200 is the baud rate for the GSM module). However, upon entering the command, I am faced with a blank screen which does not accept any inputs. I am unable to enter any commands. I would appreciate if you could give any ideas.
Answer: Based on the scant information you've provided, I'm not sure if this is "in the ballpark" or not, but here goes anyway:
Have you looked at Wammu & Gammu?. I was looking for a way to send SMS messages from my RPi, and convinced myself the package was worth a closer look. From outward appearances, it looks like a currently maintained project, and he has a load of documentation - which is just to say the module libraries appear credible.
Answer: At first, what is your GSM module? Is it on a third party board for easy connection or just a module like SIM900 or SIM800. If it is on a third party board I suggest you check its tutorials or other existing projects on the internet to how to configure it. If it is not on a board make sure you give enough voltage or current. Or connect pins to connect inputs.
Also If you are sure about the module is on and working, make sure that you implemented PPP correctly by trying pon or chat codes on raspberry.
By the way, on most of the modems, if you establish a PPP connection, it means it is in a data mode. In data mode, you can not control or read by serial. It means the serial bus is using for packet transfer from RPI to the modem. To connect or read serial make sure your modem is in command mode. You can check how to open data mode by checking the datasheet of your modem.
Also for the serial read on raspberry pi, use minicom. It is an old program but it is reliable. After establishing serial try writing "AT". Most of the modems use AT commands to work. If it returns you "OK", that means it is working.
If you have any other problems ask at comments.


How is variation in genes related to self-awareness?

Question: I sometimes wonder if "I" would have existed if another sperm had fertilized the egg that was to become "me".  Is this even answerable in any meaningful way? I sit here and experience myself as a unique individual and I speculate that everybody else feels the same about their own unique consciousness and self-awareness. So if a different sperm had fertilized the egg that was there when I was conceived, would "I" have come into existence nine months later, but with a different set of genes?
Comment: This is a great philosophy question --I gave you an upvote for that --but it's not a good fit for this forum because there is no defined answer.  You might manage to keep it from being closed if you make it more specific --*i.e.* "what would philosopher X say about this question?" or "how could we address this question in light of X-ism?"
Comment: If a different sperm from same the same man fertilized the same egg, 25% of the embryo's DNA would be different from yours. The result would be similar to your semi-identical twin. http://en.wikipedia.org/wiki/Twin#Semi-identical_twins
Comment: You could also think about the differences and similarities among identical twins (same genetic info) and siblings (with 50% similar genetic info).
Answer: Studies tend to show that about 50% of variability in behavioral traits is explained by genes and 50% by environment.  Unlike with identical twins, your other could have a pretty similar experience to you.  So, with 25% of your genes different, your other would be up to about 8x more similar to you than a random person is, and would have many of the same experiences and memories.
But of course that very-similar-person's consciousness wouldn't be yours; you are by hypothesis not around to experience anything.  You can't really arrange it so you can without breaking the whole premise.  So the other-you is identifiable as the most you-like entity in that hypothetical universe, and that is about as far as it goes.
Comment: While I would tend to agree with some of this. There seems to be a giant root assumption that goes unstated about the nature of consciousness and its relation to the physical brain. The seemingly appropriate follow-up question is this: did "I" exist a minute ago, a day ago, a year ago? It seems like  answers as to why these questions are affirmative or negative would explain what your answer really means.
Comment: I think the answer to the question "did 'I' exist a minute ago, a year ago" is yes. At least in the context of my own self-awareness and memory of who I was a minute ago.
Comment: Although my experiences and physical parts are constantly changing I still think I retain a definite self-awareness that is specific and unique to "me". On the other hand I suppose a grain of sand on the beach is also unique - just as unique as a particular mosquito, bacteria, or cloud formation. Could it be that this concept we call "self-awareness" is merely a kind of biological feed-back loop or memory polling function that evolved as just another component in our biology - from single cells all the way to warm blooded mammals with backbones and a self-polling memory function in our brain?
Comment: @Steved'Apollonia that may all be true... but I think Rex needs to indicate *his* answer to this question and explain why the different genetic material matters in a way that different matter does not.
Comment: @virmaior - I'm arguing that the premise makes it an unanswerable question when asking it in the "did 'I' exist a year ago" sense.  When asking it in another sense, we can tell that this person is likely to be Steve-like, but somewhat distinct: perhaps less different than identical twins (save for looks) are to each other, but there still would be substantial differences based on the genetic contribution.


Landscape lens vs portrait lens

Question: How is a landscape lens different from a portrait lens optically. I believe all wide angle lenses are primarily landscape lenses and all in one is the kit lens. Is the 50mm lens primarily a portrait lens. I also understand there are different kinds of distortion in a landscape lens like pin cushion etc. Is this why they are not branded as portrait lens?
Comment: In photography, the words "landscape" and "portrait" are ambiguous. They can mean images that are wider than tall vs. taller than wide, or they can be meant verbatim, talking about two types of subject. From your question it's not clear to me which interpretation you mean, or if you are even confusing the concepts.
Comment: I voted to close this question because it is based on broad, incorrect assumptions.  1) wide angle lenses are NOT primarily "landscape" lenses 2) a "kit" lens is NOT a "one in all" lens 3) a 50mm lens is NOT primarily a "portrait" lens 4) distortions are NOT specific to a type or class of lens
Answer: What do you mean when you say a lens is "branded" as a portrait lens or a landscape lens? I've seen lenses being listed as suitable for portrait photography or landscape photography, but that doesn't restrict their use to only that type of photography. Lens designers, as far as I'm aware, don't make design decisions in a wide-angle lens' design that preclude it from being used for portraits. There's nothing wrong with using, say, a 28mm lens for landscapes as well as for (environmental) portraits. It's mostly just about angle of view, and what angle of view is more often desirable for portraits or landscapes.
Having said that, fast short telephoto lenses have developed as good portrait lenses, and I believe there are indeed design decisions made whereby, for example, the lens can be sharper in the centre than at the edges, because it makes sense for the subject's face to be sharper than any peripheral objects. That would be different to a macro lens for example, which might be a similar focal length, but would be designed for sharper rendition across the entire frame (as well as allowing much greater magnification of macro subjects of course).
But, ultimately, it mostly comes down to angle of view. In a landscape photo, or head-and-shoulders portrait, or environmental portrait, what do you want included in the photo? You can make good photos of all these shot types with a variety of different lenses.
Answer:
How is a landscape lens different from a portrait lens optically.

It isn't necessarily. It can be the same lens, in some cases. "Landscape" and "portrait" indicate usage, but not the type of lens. You can shoot landscapes with anything: ultrawide, wide, telephoto, even supertelephoto. Portraits, similarly can be done with nearly any type of lens, including fisheyes, depending on what the photographer wants to create and what type of effects they're after.
Certain types of lenses are more conventionally used by most shooters for specific tasks. But that's not the only way they can be used or necessarily the best way to define a lens.
While wide angles are often seen as better suited for landscapes, and longer fast primes are often seen as suitable for portraiture, you don't need either for either subject.

I believe all wide angle lenses are primarily landscape lenses

Not necessarily. Fisheye lenses are wide angle but are rarely used for landscape because of the distortion.

... and all in one is the kit lens.

Yes, and no. A typical kit lens can go from wide to short telephoto and so can cover both subjects if you're using conventional focal lengths, but it may also be a slower lens with a smaller max. aperture, which can't blur backgrounds the way a fast prime lens can. Some portrait shooters want to use thin DoF and prize big max. aperture lenses.
But also. A kit lens isn't necessarily a cheap 18-55 or 16-50 lens, either. My 5Dii's kit lens was a pro-grade EF 24-105 f/4L IS USM which was (at the time) around $1300. A kit lens is just a lens that comes in the box with a camera body. It can be a walkaround zoom, a telephoto zoom, a supertelephoto zoom, or a prime lens. My Olympus OM-10 (a 35mm film SLR)'s kit lens was a 50mm f/1.8 fast prime.

Is the 50mm lens primarily a portrait lens.

On crop, it's more likely. On full frame, it can also be used as a street or walkaround lens, because it's normal (not wide/not tele) as well as having magnification very close to that of the human eye.
What you want to use a 50mm lens is up to you. With pano stitching, I've used one to take very very wide scenic landscape shots; with extension tubes I've used one for macro, and I've also used it as a low light lens. AND a portrait lens.

I also understand there are different kinds of distortion in a landscape lens like pin cushion etc. Is this why they are not branded as portrait lens?

Well, nothing's actually "branded" as a portrait lens. But distortion is something you can choose to incorporate or not into a portrait. And it's also something that can be digitally corrected in post. Shorter lenses may suffer from barrel distortion, while longer ones may exhibit pincushion. And a few weird lenses have mustache/wave distortion which is a combination of both at the same time.
But shorter lenses tend to be used closer in to achieve similar framing to longer lenses, and the closer a lens is to the subject, the more perspective distortion will happen (how the lens renders subjects at different distances from the lens).  The shorter the lens is, the more extreme that distortion will be. And this would be in addition to the lens distortion.
Answer: There are "portrait lenses" (in the sense that they are designed specifically for portrait photography or at least that portrait is one of their main uses) but AFAIK there are no landscape lenses.
A portrait lens is usually a short fixed telephoto (so, slightly longer that the standard lens: around 80 to 150mm for fullframe, 50 to 100mm mm for APS-C) to keep the camera far enough from the subject (putting it too close enlarges some facial features such as the nose). Canon even has a "soft-focus" lens designed for this.
You can of course use instead a decent zoom lens that covers the same focal range. If you use your kit lens,you will use the long end, which is usually not the part where they are the best, but if you have an APS-C camera there are inexpensive 50mm prime lenses that do a good job as portrait lenses.
Answer: It's worth thinking of composition sometimes as not a matter of the properties of the lens, but where you stand relative to the subject in order to compose the frame with it.  From the same viewpoint you can mostly take the same picture with a wide angle as with a telephoto if you're willing to crop it to just the same angle of view in the center.
A telephoto lens is good for portraits because it's long enough to force you away from the subject to get everything in frame so there's fewer perspective effects. Meanwhile a wide angle is 'bad' for portraits because to fill the frame you would need to be in the subject's face and the perspective effects from there would turn them into a total nose monster.
It can also help that telephotos have a large absolute aperture so when you open them up they're good at cutting out the background.  The math may still work out that the cropped wide-angle or normal would give the same narrow depth of field once you were enlarging it to match and increasing the rate at which things blur while leaving the plane of focus.
Answer: Portraits imaged using a wide-angle lens are seldom ever flattering. That's because features nearer the camera like the nose, are exaggerated as to size and features like the ears are imaged too small.  In other words, prospective distortion creeps in and ruins the portrait (the subject is not pleased). The remedy is to use a moderate telephoto for portraits. Such a lash-up forces the photographer to step back and this act produces an image with a pleasing perspective (little or no distortion to the physique of the subject).
Comment: It's important to be clear that perspective is not influenced by whether a wide-angle lens or a telephoto lens is being used. Perspective is influenced only by distance between the camera and subject. A wide-angle lens only produces unattractive perspective if the camera is close to the subject. As Alan mentions, being so close to the subject is essentially just not possible with a telephoto lens, because the narrow angle of view will preclude the full subject from being included from that distance.
Comment: A photograph has accurate perspective provided it is viewed from a distance equal to the focal length. True regardless of focal length. As an example, a 35mm format 24mm height by 36mm length likely is viewed on a computer screen, perhaps 8X enlargement applied. If imaged with a 50mm lens, viewing distance for correct perspective is focal length multiplied by magnification. For this lash-up the viewing distance is 50 X 8 = 400mm = 16 inches. In other words, each lash-up has a unique viewing distance. For most images, viewing distance is of no importance, portraits are an exception.

Landscape lens vs portrait lens


Why are derailleur jockey wheels commonly made of nylon?

Question: Almost all derailleurs seem to come from the factory with nylon jockey wheels . What is the rationale for the use of nylon (rather than alloy or aluminum)?  Is it merely weight savings (which would seem to be trivial given the size) or is there a functional advantage to  nylon/plastic?
Comment: Related but not the same: http://bicycles.stackexchange.com/questions/7828/is-there-any-functional-point-of-using-alloy-jockey-wheels
Comment: The plastic is, to a degree, "self-lubricating".  And harder materials are simply not needed for that duty.
Answer: Caveat: I've only seen two or three sets of metal pulleys in my life. There are several reasons:

cost: plastic parts are cheaper to make than metal ones
weight: it's easier to make a lightweight plastic part than a metal one (this is also related to cost, "easier" usually means "cheaper")
durability/resilience: somewhat counter-intuitively, plastic cogs are less likely to fail completely. When the plain bearing locks up the plastic wheel is likely to slip on the metal bearing (and many people don't even notice that this has happened), or the teeth with abrade off to form a smooth surface that the chain will run on (it's very hard not to notice this). A metal pulley does not do this, if they stick for some reason generally the bike isn't rideable, and it's unlikely that the aluminium pulley will slip nicely on the steel bearing.

The latter is somewhat hard to get experience with, since metal pulleys are sufficiently rare and expensive that few people use them. Also, people who pay extra for them tend to maintain them so I haven't seen them fail other than via "full of mud, not going round". In that case, though, the chain will not go through the rear derailleur at all, so the bike needs to be converted to single speed before you can ride it. Which is an ugly thing to have to do when you're out on a bike ride.
Note that recumbent idler pulleys have the same concerns but often they're on the drive side of the chain so the forces are larger. So are the pulleys to reduce chain bend angles and thus losses. In that case metal cogs are usually also lighter and quieter but significantly more expensive (more than double the cost). Derailleur pulleys would also benefit from being larger, but that's relatively rare, I suspect because weight and air resistance also increase with size (and a larger cog would mean extra chain, further increasing weight)
Comment: in my experience, yes. It's the difference between the noise of a chain hitting a chainring, and a chain hitting a block of plastic. I suspect you don't get that effect with derailleurs because the forces are so much smaller. Some recumbents use O rings on the pulleys to reduce the noise, but IME on the drive side those don't last very long.
Comment: In fact nylon on steel *is* the plain bearing on some - the metal sleeve is a spacer clamped tight when the screw is done up.
Comment: Interesting... are metal cogs really quieter than plastic?
Answer: I'd always assumed nylon was used because it was a softer material than alu or steel, and therefore reduced wear on the chain. Since jockey wheels simply route the chain and don't need to operate under the same load as chain rings and cassettes they can be made from a less durable material. I would guess that the routing round the jockey wheels is potentially a high wear area for the chain, so making the jockey wheels from something softer reduces the wear.
Answer: Several reasons. Nylon is lightweight, tough, wears only slowly, and in particular the dynamic coefficient of friction with steel is the lowest amongst the sufficiently tough synthetics. Friction and Wear of Polymers
Answer: I had Bullseye red aluminum pulleys on a Super Record derailleur similar to the one that's pictured.  I recall they were slightly noisier than the original nylon ones.


What is the difference between behaviorism and cognitivism?

Question: Recently I've been reading about the subject, and I have trouble finding a definite difference between the two. What is the difference between behaviorism and cognitivism?
Comment: Welcome to cogsci.SE!  More information would make this question much easier to answer.  Where have you been reading about these two?  With respect to what area of psychology or cognitive science?  How do these approaches seem similar?
Comment: For what it's worth, I found OP's question to be pretty clear and I think you guys are being harsh with the downvotes. =/
Comment: The field of cognitive neuroscience! I understand that it is a blackbox(input then see the result) vs. whitebox(see how the underlaying structure is) approach. However I am having trouble finding examples!
Comment: "The field of cognitive neuroscience" doesn't actually give any more information.  Where, specifically--what articles or books?  I see you've accepted an answer below, but more information might get further answers or examples; generally, around here, the more work you put in the question, the more work people are willing to put into answering it.
Answer: Short answer:  Behaviorism treats the human brain/mind like a black box whose internal processes cannot be known.  As such, behaviorists claim that it only makes sense to study the association between a given stimulus and the behavioral output it produces.
Cognitivists, on the other hand, examine internal mental processes (attention, executive control, predictive coding, etc) and are just as interested in what behavior a stimulus elicits as how it elicits it.
Comment: Perfect answer! Thank you, you set my mind in the right perspective now.
Answer: Comparison between Behaviorist Theory and Cognitivist Theory
What is the Behaviourist Theory? Behaviorist theory says that learning is nothing more than the acquisition of new behaviour based on environmental conditions – linking a new behaviour to a stimulus by providing reinforcement after the correct behaviour is produced.
The Theorists : Pavlov (1849 – 1936) Skinner (1904 – 1990) Watson (1878 – 1958)
The Behaviorist approach to language learning grew out of the belief that students could learn a second language by being taught to produce the correct "response" to the appropriate stimulus. The students would then receive either instant positive or instant negative "reinforcement" in the shape of either correction or praise from the teacher.
What is the Cognitivist Theory? A cognitive theory of learning sees second language acquisition as a conscious and reasoned thinking process, involving the deliberate use of learning strategies. Learning strategies are special ways of processing information that enhance comprehension, learning or retention of information. This explanation of language learning contrasts strongly with the behaviourist account of language learning, which sees language learning as an unconscious, automatic process.
Comment: Welcome to CogSci and thanks for the answer. Could you please add sources to your answer to allow other users to background read on your material? Further, the numbering of the paragraphs does not seem to make much sense.
Comment: Tried to tidy up the response a bit. Please feel free to roll back changes if this doesn't reflect the info you were trying to give (I didn't change any content).


Cannot filter a SharePoint 2013 Task List after March 2015 Update

Question: Not sure if anyone else has noticed this, but for some reason after I installed the SharePoint 2013 March 2015 CU I am unable to filter Task Lists using a view. (April 2015 does not work either) Even the default Completed view does not work. All items are begin displayed. I have tested this on four different servers now. There is a checkbox in the web part properties that allows for server rendering which I am currently using as a work around but I would like to get the client side rendering to work again as it had before the CU.
Comment: Hello!
I have encountered the same problem and it seems too be related to the CU. I have tested different approaches, but with no results.
I have submitted a ticket to Microsoft and will hopefully have an answer soon.
Comment: I have also submitted a ticket with MS Support. They are currently doing some investigation. I will post their response as soon as I get it. The workaround listed below is not ideal as it reverts the view back to SP 2010 functionality which does not support sub tasks
Comment: Having the same issue.   Note that it only seems to be effecting Task Lists.  All my other lists work fine.
Comment: Is there an official way to communicate this bug to Microsoft?
Answer: Was contacted by Microsoft yesterday.
Short summary:
At the moment there are no solutions for this problem, but they are working on a new smaller CU update that will include a fix. They could not give me a timeframe for when this update will be published, but they told me "very soon".
There are two quick/temporary fixes:
1.  On the page go to Settings -> Edit Page -> Select the List Web Part and the option Edit Web part -> Miscellaneous -> Server Render (Checkbox).
2.  Go to the list -> select and edit view -> expand "Style" -> Chose any style besides "Default". The style "Shaded" is ok.
Comment: Thanks for the info.  Note that both of these solutions we lose the ability to Search the list, and easily change the view, which both are heavily used at our place.  Hope they can fix this soon.
Answer: I've just confirmed that the May 2015 Cumulative update contains a fix for the issue listed above http://www.microsoft.com/en-us/download/details.aspx?id=47213
Please note that the CU does take quite a while to install and requires the server to be rebooted
Comment: We just upgrade our enviornments to Apr 2015 CU.  do we have any workaround for this issue.
Answer: After applying the March 2015 CU (and possibly MS15-022), it is no longer possible to Filter a View based on criteria in the Task list (e.g. Task Status). This appears to only impact new Task Lists created post-patch. One workaround is to place the Task list on a Page. Edit the Web Part and check "Server Render" under Miscellaneous. This does not appear to be a Lists.asmx Web Service issue as the filtered view correctly filters in 3rd party tools.
http://nauplius57.rssing.com/chan-11167629/latest.php
Answer: Just bumped into the issue above but it happened on a custom list (not issue derived) with March 2016 CU applied. This is the first instance I found so far. I corrected it by doing the following:

Edit the listview page.
Edit the listview web part
In the Miscellaneous section, click Server Render
Save web part settings and page.
Repeat 1-4 except uncheck Server Render.
Answer: I also encountered this issue, but on a SharePoint 2013 BCS External List. Filtering with "yes" on a Yes/No column seems to do nothing, return all rows as is. Also when I choose to filter by a date on DateTime columns, no rows were returned.
Changing the view style to "Shaded" and enabling "Server Render" solved the above issues.
Downside to this solution is that you loose the ability to use JS Link / CSR.


How to build a Joomla extension ?

Question: firstly i want to know f there is any difference between Extension and Plugin and Module
Then i want to Know how To Start with This ? what tools and Knowledge i must have
and What is The best Martial For This ?
Comment: Not really a programming question
Comment: had he said how to PROGRAM an extension would you have been happier? It is obviously a programming question by the subject, and someone with bad english by the content.
Answer: Components, Modules and Plugins are all types of Extensions, just like Audi, BMW and Ford are all types of cars.
Components are your main applications such as forum, shop system and so on. These are usually displayed in the center of your site (where you articles are displayed).
Modules are like small widgets that you would normally see on the side of your website, such as a shoutbox, Twitter Feed etc.
Plugins basically manipulate the site behaviour by firing events, for example it could be used to load a library or integrate the user profiles between 2 components.
To start learning, you should first of all understand how Joomla works, paying special attention to the fact it's MVC based. Have a looks through the Joomla Docs.
Once you start to feel confident, trying making a Hello World module, install it and have a mess around. To get you started, either read the Documentation, view this video, or use a Module Generator.
Or should you want to develop a component, start off by following the documentation on Developing a Basic Component for Joomla 2.5
Plugins provide rather a lot of possibilities, therefore it would be best to start here and choose which way you want to go on from there.
Just a word of advice, don't start to use Joomla 1.5, either go for 2.5 or 3.0 ;)
Hope this helps
Answer: http://docs.joomla.org/Extension_types_(general_definitions)
Extensions are something generic covering Components, Plugins and Modules. Plugins and modules are both separate things. See the link above for a more detailed explanation of this.
Assuming you know about HTML, CSS, PHP and Javascript (Mootools for Joomla 2.5 and jQuery for Joomla 3.0) - then I'd start by reading through the developers articles on the Joomla Docs page here: http://docs.joomla.org/Developers
Module Development: http://docs.joomla.org/Module_Development
Plugin Development: http://docs.joomla.org/Plugin_Development

How to build a Joomla extension ?


Electronic Power steering dashboard light

Question: I have a kia forte 2009 but my EPS dash light is always on and my steering is OK,
My question is should I ignore this light and continue driving?
Comment: You sure it's EPS and not ESP? ESP is your stability control
Comment: Have you ever tried steering the car without powersteering, when the ignition is off? It's really hard to do. Imagine you suddenly, unexpectedly, have to do that in traffic. It can create lethally dangerous situations. Your problem is likely not that critical, and it probably won't suddenly stop alltogether, but it's still dangerous.
Answer: No, you should not ignore it. Steering is with the brakes the most important safety critical system in the car. Either steering or brakes failing can be fatal.
The systems are usually designed in such a manner that they don't fail by suddenly turning violently to the left when there's oncoming traffic, but even the mere possibility of this happening would be a major concern.
If you ignore it, you'll soon find the car failed the next mandatory inspection.
However, do note that EPS and ESP are two different things, as user9181 correctly noticed. Even the ESP light would usually mean the inspection is failed.


"hidden" intentions

Question: I just really want to ask the other ways of saying "having hidden intentions". The word that I've been looking for is something which is synonymous with the "hidden" used in this context. The word is at the tip of my tongue and I just can't really seem to remember it.
Comment: Hi, Flaubert, can you write an example sentence with context where the expression would be used? It will help users write an answer.
Answer: You might be looking for ulterior motives, where "ulterior" means "intentionally hidden" (here) and "motives" is broadly synonymous with "intentions".
Answer: Hidden Agenda
Concealed Intentions
These are less commonly used than Ulterior Motives, but they mean the same as hidden intentions.
Answer: Sometimes what is hidden in somebody's mind could be shameful, unavowable or hypocritical and thus this is a veiled intention.

"hidden" intentions


If you want to be a computer scientist, can competitive programming be helpful early on in your career?

Question: Competitive programming is a craze among many computer science and engineering students. Is competitive programming important to be a good computer scientist? Thank you.
Comment: Competitive programming is to programming as competitive eating is to eating.
Comment: A good computer scientist is not necessarily a fast, or even a good programmer. It usually doesn't hurt, though.
Comment: Maybe if you are looking for an industry position that isn't research. Even then I would rather work with someone with a strong grasp of how to program rather than someone that can kick out working but not as sound code quickly.
Answer: All types of practice are valuable, and if competition pleases you, go for it. However, programming quickly and under pressure is more akin to industry than to academia, and may leave little time for theory. Therefore I'd not call competition "important" for formation in CS, rather it's one of a number of forms of structured programming practice.
Comment: As someone who started programming in industry before moving to academia I fully support this. There are moments where getting working code out fast is useful but your research code should be concise, well written and well documented (for reviewers/re-use of your code).
Answer: Their are three things to my knowledge commonly referred to as competitive programming.
All are mildly beneficial, none are crucial, and winning never matters.
Code Golf and Programming Puzzles
This is the least useful perhaps.
If it is being done in the langauge you work in (rather than in a golfing langauge)
it can arguably keep you familar.
Really though it is a form of mental exercise.
Keeping your brain fit.
ACM International Collegiate Programming Contest etc
These tend to be restricted to undergrads or even highschoolers.
These involve becoming very familiar with a lot of algorithms.
Eg Dijkstra's algorithm, bellman-ford's algorithm.
And with important techniques like dynamic programming
Becoming so very practiced at these algorithms and techniques can certainly help one recognize when they are applicable to a research problem encountered down the line.
I know someone who became a very proficient at restructuring problems into things they could solve with dynamic programming during such competitions as an undergrad.
They have spent their PhD not only using it to solve their problem in some genome sequencing related area,
but then meeting other biological researchers (without the strong algorithm design background), and being able to solve the problems they have been fighting with for months in days -- which is a rad way to get a pile of collaborative works.
One word of warning is to not let them blind you.
They use a restricted set of tools -- often just a few programming languages with their core library -- and the problem needs to be solve entirely in them to the end.
But outside of those rules, there are more options that may be not notices.
E.g. if you can transform your problem into a mixed integer programming problem, you are probably done.
It probably can't be made into a simpler problem (that is not NP-Hard), because that tends to be fairly obvious (citation needed).
And once it is in that state you don't need to write a solver for it, you can just use one "off-the-shelf".
Hackathons
These have nothing to do with coding.
Hackathons are about building contacts.
Yes, you write code, but you are probably not writing code that is academically interesting.
(the coding may or may not be interesting to regular programmers, but regular programmers are not what this SE is for)
But they are a good place to meet people.
Sometimes the tools wanted to be made are for researchers in non-computing areas, and they need soemthing to gather-data, or something that lets them "productize" their research.
Sometimes that lets you put your face out their for industry people, who know know X is doing a PhD on topic Y. Then 6 months later: "Wow we really need this problem related to Y solved. We should get in touch with X".
And then maybe you get to do some research on their dime.
However some hackathons are exploitative, eg requiring you to pay to prototype something for a commercial company.
Rules for hackathons:

Never pay to attend. One does not pay to work.
If they do not have mentors/clients/competing teams who are going to make good contacts done attend.
Don't do 24 hour or 48 hours of continuous work. It is unhealthy.

Their are enough hackathons around that you can be picky.
Comment: I really appreciate even this answer. Though, I haven't marked it as the best I would like to really thank you for this answer! I was/am indeed thinking of the ACM style programming challenges! :)
Answer: I'd say it's a fallacy of converse logic. The winner of a hackthon is surely a good programmer, but the converse is not necessarily true that all the best programmers are good at hackthons and competitions.
Answer: Competitive programming is not particularly important for a computer scientist, but it can teach you useful skills. It's a form of competitive sports closely related to your work as a computer scientist. Like all competitive sports, competitive programming teaches you self-control: how to stop procrastinating and get things done. Being able to implement prototypes of new ideas quickly is a rather useful skill in most subfields of computer science.
Answer: It depends on what type of competitive programming you are talking about.
If you are talking about ACM-style competitions that have algorithmic questions it can be useful to participate in them. Practicing for ACM-style competitions forces you to become more familiar with algorithms and recognizing what types of problems can be solved with which type of algorithms. If you are interested in algorithms or algorithm design, I would definitely recommend participating in this type of competition.
If you are talking about hackathon-style competitions which are more about producing a prototype product, it would be more useful for learning software engineering than fundamental computer science. Hackathons can give you experience in quickly building an application, service, or device from the group up. If you are interested in software engineering I would definitely recommend participating in hackathons.
Overall, competitive programming is not needed to be a good computer scientist or software engineer, but it definitely can help. It all depends on what you want to learn and what other choices you have for learning and improving your skills.


How do I stop the spread of corruption through my desert?

Question: I have played terraria for a while now but I have noticed that my corruption biome is spreading into my desert and I'm not sure if this is a good thing or a really bad thing. My question is how do I stop the spread of corruption easily for above and below ground? (for hardmode) Also all I know is that corruption spreads "3-6 blocks per day" is this irl? And does it spread faster or slower through sand?
Answer: According to the unofficial Terraria wiki,

The player can remove corrupt areas by using Purification Powder

The Clentaminator can [also] be used (with purchased solutions) to change blocks into the normal pure forest, the Hallow, the Crimson, or the Corruption.

Wood is a cheap but effective material for containing the Corruption or the Hallow.

Also see the the official Terraria wiki:

Purification Powder is able to revert any Corrupted … Blocks back into their pure form

Bonus option — Air works, too!

By digging at least a 3-block wide tunnel around your corruption/crimson/hallow, you can prevent it from spreading outside of the boundaries that you give it.


How to make traces on an universal PCB?

Question: I hope this question won't be closed as too subjective. I'd like to know best practice - how to make traces on universal PCB's with individual holes without traces (like the following image). My idea is to bend the ends of discrete components and use them to make traces to other components. Is this approach acceptable, or nasty? Although this is called "prototype" PCB, I'd like to use it for my simple final circuits (low frequency, low current applications), because I hope it will save time.
Comment: I'm thinking about how I do the "layout" of the circuit for an answer, but I have a tip as well. Use a fine-tip black marker to trace out which  holes are actually traces. It  makes the board much more visually intuitive and can really help with debugging. You can also plan out the entire circuit this way to make sure everything fits the way you want it to. If you make a mistake and have to redo something just use some rubbing alcohol.
Comment: This is not really a PCB: it is a perfboard with solder pads. **Do not use this.** Get a PCB breadboard which has traces that you can exploit. There is at least one program to help with layouts on that type of board: VeeCad.
Answer: Protoboards are up to you how to use, if it works, it works.
The three common methods of using them is using jumper wire, solder bridges, or using leads. Or all three, depending on your needs.
Solder bridges take a lot of solder, especially long ones. They are good for two or three adjacent points.
Using the leads, or bare wire, is great for straight lines and buses, using less solder than solder bridges.
And jumper wire is best for when you can't/don't want to go around an existing solder joint.
It all really boils down to what you need. Of course, solder bridges can be very sloppy if you don't have practice at them. And using too many jumper wires or bare leads looks ugly and not well thought out. But this is your project, you can figure out how to mount them, and what's acceptable or not.
If you need much of either, what you really want to do is think about the placement of your components, move stuff around to minimize the need to use jumpers or long bridges.
Comment: Another advantage of using wire like in the first image is it's a good way of using up left over component legs that would otherwise be wasted - I started using SMT stuff mostly because I got annoyed at the huge piles of snipped off component legs that THT results in.

One other thing to be aware of with solder bridging is if you are doing long straight lines, try to do them bit by bit (letting it cool), and where possible, or zig-zag them. Otherwise as the solder cools and contracts it can warp the board.
Answer: Typically a board like this has components connected using wire from pad to pad. I usually use 30-AWG wire-wrap wire.
I often place components in such a way that leads that need to be connected are placed in adjacent holes. It's quite easy to create a solder bridge across two pads.
Sometimes I'll need to connect three or four leads. If possible I place these along a horizontal or vertical line of pads and create a solder bridge across the length of them. It's somewhat more difficult than a 2-pad bridge, because the solder will have a tendency to bridge only at the position of the iron, where the heat is. With a little practice, it's entirely possible to create lengthy solder bridges that span several pads. However, it can be ugly, waste solder, and is difficult to change. Multiple bridged pads is something of a hack, so while I do it sometimes, I don't recommend it for best results.
You can improve the bridged pad idea slightly, by adding stripped 24-gauge or smaller wire to the pads and using it to connect them. This image and caption/tutorial from brewpi.com:

...use some naked wire for long tracks and just solder it to the board. For very short connections, you can do it without a piece of wire: Set your soldering iron to a lower temperature, and first put some solder on both pads. Then put some solder on your iron and tip in between the pads. When you are lucky, you'll connect them. It takes some practice but it is definitely easier at lower temperatures.

I personally find bending the lead of a component to connect to another component on the underside (solder side) of the board less desirable than creating solder bridges. The reasons are:

the leads are thicker than the wire I would use instead
the leads are equivalent to bare wire and could easily make contact with an adjacent pad that should not be connected
difficult to remove/replace a component

In conclusion, if you need some bus lines, I would highly recommend spending a few dollars to get a solderable perf board that already has them as part of its design.

This 6.3" x 3.94" board is $5 at All Electronics.
Comment: I made something once by solder-bridging on such a board. The key operative word being *once*. :)
Comment: The Radioshack link doesn't work, can you find a replacement reference?
Comment: @KellyS.French Sure thing, I've changed the link to a Jonard Tools product at Digikey.
Answer: I know this isn't exactly an answer to your question but I thought it might help others. I still use perfboard a lot because it is more commonly available and I have a bunch of it laying around, but since I discovered stripboard, it is my preference. If you workout your layout, you can minimize the number of traces you have to create with soldier or wire. Instead, you use a drillbit to break the strips of copper where you need in order to create your traces.
This is very similar to what JYelton posted at the end of his answer but you can find boards like this all over ebay for dirt cheap.
Comment: In addition to a drill bit, most of these boards will let you cut away parts of traces using an xacto knife or a box cutter.
Answer: It is possible and I have to admit I'm doing the same thing.. but I cannot recommend it because it's very hard to take the parts out later, when something's broken. The holes stick not that good to the board most of the time, so with too much soldering you would get the hole of your board. That's what happens sometimes when you're taking out parts again. So it's better to connect wires on the backside instead of using the leads of the components.
Comment: Easily mitigated by cutting the component leads before desoldering from the holes they go through, leaving the old leads as the interconnect - so in the replacement case it degenerates to using separate wires (the old component leads) while most of the time the component leads supply the wiring.
Comment: That is true but I find cutting the leads when soldered yet to be a bit hard, so I'd go with cutting first and using the leads as wires.

How to make traces on an universal PCB?


How to resolve the Dokku 413 Request Entity Too Large error?

Question: I'm using Dokku to run a node API and recently hit the 413 Request Entity Too Large error when trying to upload a file ~1.5mb.
I've followed the Dokku Nginx docs and created a nginx.conf.d folder in the root of my project with upload.conf file that contains on entry - client_max_body_size 20M;
My understanding; this should modify your Nginx config next time you git push the app, but it is not working for me. What am I missing?
Comment: Check `nginx.conf.d` and `nginx.conf` permissions (must be to dokku:dokku), check if nginx.conf contain the line `include /home/dokku/myapp/nginx.conf.d/*.conf;` and/or finally try to manually restart nginx.
Answer: It was my misunderstanding, you have to SSH to the server and execute the following as root:
mkdir /home/dokku/myapp/nginx.conf.d/
echo 'client_max_body_size 50M;' > /home/dokku/myapp/nginx.conf.d/upload.conf
chown dokku:dokku /home/dokku/myapp/nginx.conf.d/upload.conf
service nginx reload

Replace myapp with your app name
Answer: You can use the Nginx-Max-Body-Size plugin. It also adds the client_max_body_size directive, and you can control it using a configuration variable:
dokku config:set MAX_UPLOAD_SIZE=20M
Answer: Since Dokku 0.23.0 you can set it natively with:
dokku nginx:set node-js-app client-max-body-size 50m

Documentation:
https://dokku.com/docs/networking/proxies/nginx/#specifying-a-custom-client_max_body_size


How to find out the ratio of speculators to hedgers?

Question: When investing, I would like to find out the ratio of speculators and hedgers that are in the market. For some market, such as commodity, I guess you can make an educated guess, yet for many other markets this is not possible.
Is there any platform that allows you to see such a ratio?
Comment: I can't speak to the futures market but with options, there is no public disclosure for intent.  If I buy calls, I don't have to disclose if I am outright  bullish or for that matter, I am bearish and have hedged short shares. Hence, there is no available data that denotes the ratio of speculators and hedgers.
Answer: The CFTC, in its Commitment-of-Traders report, classifies traders as being commercial or non-commercial. A commercial trader is a hedger while a non-commercial trader is a speculator.
https://www.cftc.gov/MarketReports/CommitmentsofTraders/ExplanatoryNotes/index.htm
.
Comment: and is there any way to see the ratio f the two for a particular commodity/stock?


Bad sound in Ubuntu 18.04 except Firefox

Question: I am pretty much a beginner with desktop linux and I recently installed Ubuntu 18.04 on my newly bought Lenovo P51s. Works fine besides a strange sound problem:

Sound output (internal speakers) is at very low volume and the sound quality is terribly poor (like out of a tin can) when played from Chrome/Chromium, Rhytmbox, VLC, etc.
But: Volume and quality is fine when played from Firefox
If any source besides Firefox is already playing sound, sound from Firefox is also bad.
pavucontrol shows same level for all applications. Moving beyond 100% leads to distortion.
alsamixer: all 100%

My audio device is a
aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: PCH [HDA Intel PCH], device 0: ALC298 Analog [ALC298 Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #

Any suggestions? Is this a known issue? What kind of information should i additionally provide?
Answer: The upgrade to Ubuntu 19.04 solved to issue for me.


Can I start a new game in Borderlands 2 but use an old character?

Question: I have a character I made with a friend playing 2player. I want to know if I could start a new single player game and import that existing leveled up character with equipment into the new game like you could in borderlands 1.
Comment: What platform are you on? On PC you may have some options to hack your save game, but on a console you can always play solo-coop with a dummy character.
Answer: There are basically two options here:

Just have the person with the least quest progress start the game. Story progress is tied to the host, so if you join a level 1 person starting the game you can progress through the story as if you never have before (you won't get quest rewards for stuff you already did though).
Reset quest progress in Ultimate Vault Hunter Mode. This will let you completely reset quest progress and start over again. Unfortunately you and your friends must be at level 50 or so to be able to survive UVHM and at least one of you must have UVHM unlocked.

There's no real way to reset your own quest progress outside of UHVM though, just like there wasn't in BL1.
Answer: Just goto select character from main menu and when it asks you what game mode you want (such as true/ultimate vault hunter mode) you just press triangle to select the reset option to reset all mission progress and restart the game from the very beginning as a (say level 61) existing character.
Answer: Each character's quest progression is saved "inside" that character, and you can't reset it. When you play together, the party is doing quests that game's host has active, but quest progress is saved for everyone.
If you have completed some quest - in any game, solo or team - this quest is done for you, and you can not redo it. There is an option though - someone other than you can do it, taking you along. I.e. you can join a game of a brand new character and play through everything again.
Obviously, you will be able to experience the story again in True Vault Hunter Mode - Normal and TVHM are distinct "save slots".
So, if you want to savour the story without anyone interfering and cannot create a dummy character just for that - you are out of luck.
Comment: Note: The option of using TVHM is, AFAIK, only valid so long as none of your previous questing was done in TVHM.


Buying pork for someone

Question: Salam alaikum, I had a question in regards to pork. Awhile ago I came across a homeless woman and I told her since I don't give homeless people money I can buy her food instead and as it were we were standing next to a Lidl. I told her she can pick out couple of items and she picked up chicken, potatoes and other items. She also picked up ham and at that time my brain did register that it was haram but I was preoccupied and it didn't occur to me that I shouldn't be paying for pork. I think my brain would've alerted me to any alcohol but it just dismissed the chicken and ham until I was thinking about it afterwards. So my question is did I bring sin upon myself whilst I was trying to do an act of charity. Would that act even count? Thank you.
Answer: You still did a good deed.

You have supported someone in need
You tried to care for that your gift will be used for good.
You didn't choose the ham, so you didn't intend to give something haram. You are not responsible for her choice.

Buying pork for someone


Is there a special hose to tap connector that doesn't splash?

Question: I have a garden tap inside my conservatory/summer room. The problem is that every time I disconnect the hose from the tap, I get a gush of water that sprays on the wall and floor.
I've tried using a rag wrapped around it but the force is too strong and it sprays through it.
Is there a special type of connector for this type of problem?
Answer: Gardena makes hose connectors that have a built-in water stop. I grew up with these in Germany. The orange & grey design is IMHO questionable at best, but they work like a charm.
Afaik they are available in the US, too, see the company's website here (scroll down a bit).
Apart from that, it's probably a good idea to switch off the tap and release the pressure on the hose by simply opening the other end - depending on what you have connected, e.g. pushing the trigger on a watering gun or sprayer.
Comment: Yup. Click and done. I have fond memories of the summer when my dad (by mistake) installed *one* non-water-stop module when all other hoses had them... Got replaced rather quickly.
Comment: These are also sold as quick connects and come in breakable plastic or sturdier brass.  Should be available at most hardware or garden centres


Error when I try to create array of object

Question: I am getting quite a bit confused, to me I think the following two implementation are valid (but my syntax has error), but I can not get either one of them to work. This is a year 1 C++ intro class homework, we can not use Vector (or else it will be done a long time ago...)
I already finished my class Student, but now I have to create a container to store n students.
I was thinking the following two option.
1) Create an array of student objects: Student arrayOfStudents[20];
My student class is very simple (It is modified different because too many lines). But the idea is like this...
class Student
{
    public:
    // Constructor for the Book class, take 6 arguments
    Student(string myUID, string myLastName, string myFirstName,
         string major, string age, string homeState, bool isWorking);
    ...
};

But when I try to create an array of students, I get this error message.
cs114p2main.cpp: In function 'int main(int, char**)':
cs114p2main.cpp:103: error: no matching function for call to 'Student::Student()'
cs114p2Student.h:14: note: candidates are: Student::Student(std::string*)
cs114p2Student.h:11: note:                 Student::Student(std::string, std::string, std::string, std::string, std::string, bool)
cs114p2Student.h:7: note:                 Student::Student(const Student&)

2) Also tried: Create an array of student pointer that points to each student.
Student* ArrayOfStudents = Student[20];
My question is why doesn't the method 1 work? And do I have to use pointers in this case (something along the line of method 2).
Because I need to pass this array into a function that going to set up each student. (I do not know how many students are going to be there). So does that mean I have to pass a pointer to the array of students? In that case I really hope method 1 can work, I can't imagine dealing with pointer to array of student pointers. I was thinking have to return an array of data[numOfData][numOfStudnet], and do it in the main, but either way I would like to figure out why this gives me error.. thank you.
Edit: Follwo up question : I know through research, I must declare the size of the array of Student as the parameter, but what if I only know the size after it is running? In that case, what are my options?
Comment: You need a default constructor which is called to construct every element of the array.
Answer: Your Student class has only one constructor, namely
Student(string myUID, string myLastName, string myFirstName,
     string major, string age, string homeState, bool isWorking);

Because of this, the default constructor does not get generated by the compiler.  Since you also don't provide one (default ctor: one callable with no arguments), the compiler cannot create the array -- it would need default-constructable objects to place in the elements (initialize the array with).
To fix, you will need to provide a default ctor:
Student();

the behavior of which you will need to find out yourself based on how Student is assumed to behave.
You could also provide default arguments to all parameters of the listed Student ctor, so it is callable without explicitly specifying any of the parameters -- thus qualifies as a default ctor
If a default ctor is not feasable, you will need to become more creative and dynamically allocate the array, copy all existing elements to the new one and assign the given new element to it when needed.  Note that with this you are essentially re-creating the functionality of the std::vector container.  Note also, that this approach is really hard to get it right, so I advise against it, especially since you are just learning the basics.
Yet another approach is to create an array of pointers to Student, so you can assign each as you create them dynamically.  You will have to test whether the element is a null pointer, before you attempt to access the Student object pointed to.
Student* students[20];

students[0] = new Student(/*list of actual parameter values*/);

if (student[0] != NULL) {
  students[0]->getName(); // assuming you have a member function getName()
}

Note: the index 0 is used only for illustrative purposes, you can use a variable as well (as long as you ensure it stays within 0 and 19 (inclusive) -- note even though you have 20 elements, the largest index is 19 as the counting starts from 0
Comment: Do I just create an `Empty` constructor? That doesn't do anything? Or it is recommended I do give them some value, say `null`?
Comment: not sure what you mean by Empty ctor.  Also not sure where you want to use null
Comment: Thank you for the very detailed explanation, but my head is still spinning a little bit. The pointer situation gets even worst when I have to pass them into a function.
Answer:
My question is why doesn't the method 1 work?

Because Student does not have a default constructor (a constructor with no arguments). A default constructor is generated by the compiler only if no constructors are defined. As  constructors have been defined, which take at least one argument no default constructor exists. When you declare the array:
Student arrayOfStudents[20];

Twenty instances of Student are being created, using the default constructor which does not exist.
You could define a default constructor which would allow use of the array, but does it make sense for a Student to exist without a name, age, etc?
Or, use an array of Student*:
Student* arrayOfStudents[20] = {}; // The '{}' will set all pointers to NULL.

EDIT:
If the number of students is not known until runtime then:
// Get number of students somehow.
int numberOfStudents = ...;

// The '()' will set all pointers to NULL.
Student** arrayOfStudents = new Student*[numberOfStudents]();

Remember to delete each entry in arrayOfStudents and to delete[] the arrayOfStudents itself.
Comment: But what about function's parameter? I tried using global `numberOfStudents`, but I don't think it worked, it seems to want `const` only.
Comment: I have to write a function set up the Students base on a text value. I am creating this array of Students in my main, but I don't know the size until I "run" this program.
Comment: As this is homework I don't want to write it in full for you, which would be pointless for you. You need to convert the text value to an int (see std::ostringstream for that). Pass that int as the single argument to the create array function and have the create array function return a `Student**`.
Comment: I already have the function written, it is about passing the array of student. But I will ask another question if I can't figure it out... Thank you hmjd.


Line spacing does not go to zero

Question: I have reduced the font size to very small here but large interline gaps remained. Additionally, it does not seem to be monospace since length does not increase monotonously as it should in case of font-family: "Courier New",Courier,monospace. In edit mode, everything is fine.
Comment: The line spacing is dependent on the `line-height`, not the `font-size` (although it is related initially).
Comment: Thanks. I have set the line-height to zero for the enclosing `` component. It does not change anything. Also, I see no problem in the editor mode where I just select a small font and all inter-line spacing to to zero with font size. I do not change line spacing separately. I ask here because line-height does not help.
Answer: Ok, the problem was that switching from HTML to WYSIWYG composition mode, blogger does something to the HTML so that font-family: "Courier New",Courier,monospace; font-size: 1px; slipped into
 tag where nothing more but font size had effect.

Line spacing does not go to zero


3-way switches don't have power

Question: My house is 100 years old. Two bulbs (one on the first and one on the second floor) are controlled by two switches (one on the first floor and one on the second).  I checked the both switches. They are good, but don't have power. Surprisingly, the lights can be on once or twice a year. The wiring is original. Thank you for your help.
Comment: That's a little confusing. Please clarify your question. Without power the lights will not come on. What exactly is your question?
Comment: The answer might depend partially on which country you're in, as the history of house wiring technology varies from place to place.
Comment: When you tested for power at the switches, did you measure against local neutral or against some other reference? If you just checked for potential between the wires in the switch box, the break could be either on the hot side or on the neutral return side.
Comment: What testing have you done to "know" that the switches control the bulbs, since you don't have power and they don't work?
Answer: Electrical problems such as this, you're more than likely going to need an electrician..I will NEVER advise people to dig into wiring.
A bad sign:
You mentioned this circuit only works a couple times a year ? Oh boy, that is NOT good.
What it could be, and what a homeowner can do without digging into the wiring:
Post a person AT EACH SWITCH for ease of troubleshooting.
(person 1, person 2)
Person 1: Flip the switch, (only once) & observe the light
What happens ?
Does the light come on ?
If yes or no
Person 2: Flip the switch ( only once) & observe the light
What happens ?
Does the light come on or turn off ?
Now that both switches are in the opposite positions of where you had them:
Person 1: Flip the switch... What happens ?
If the light comes on or doesn't come on:
Flip it again. Once again, if the light comes or doesn't come on...
Person 2: Flip the switch... What happens
Wether the lights come on or not, Flip the switch again.
All the above is doing is checking to see if one or more of the switches are bad or if they were possibly MISWIRED.
If you ever remember these working fine at one time, I can say with a good degree of certainty that it's a faulty switch or switches. And if it's only one that's bad, I'd still replace both due to age alone.
It's always best to get a electrician involved when you see all your breakers are on and you've got a intermittent problem.
Answer: If your house is 100 years old and the wiring is the original - you will not have power at the switches - You will have a switched NEUTRAL. This is not allowed anymore in the Electrical code for an obvious reason. Lets Discuss:
1: Your bulb sockets are always hot (100 years ago this was common - and no I am not that old ..). This means you can get electrocuted when installing light bulbs - touching ground and the bulb base - will give you plenty to think about - or maybe help someone inherit early.
Your neutrals are switched through the switches. Your Bulbs are wired hot.
I don't know what you mean by this: "Surprisingly, the lights can be on once or twice a year."
JUST an FYI: You might want to consider having your whole house rewired to current code standards - it will be much safer for you and your family.
Comment: Nothing the OP has said would indicate his neutral is switched, nor was a switched neutral ever more than a rare oddity even 100 years ago. - It's always better to get the OP to do some analysis and provide enough additional information to understand the problem, than to throw out random guesses that might burn down his house or electrocute someone.
Comment: @A.I.Breveleri nothing in my answer will cause him to burn down his house! Nothing in my answer will cause him to get electrocuted! What my answer will do is allow him to have the information he needs to check it out, it also warns him of the dangers that he can get electrocuted with that old wiring thinking a lamp socket is off when it is indeed HOT. The OP said his house was 100 years old with the original wiring; common neutral in the switch box with no hot wires in the box. Further my answer suggests he upgrade the house wiring to modern code standards to make his home safer.

3-way switches don't have power