Can revving the engine cause damage to the fuel pump?

Question: I have a 2009 Dodge Ram 1500 and someone was revving my engine while they had the vehicle in park. The vehicle broke down on them losing all power to the engine not too long after. I've had some people look at it and say it's the fuel pump. That there's no noise when trying to start it coming from the fuel pump. I'm just curious if there's a way to damage the fuel pump by over revving the engine.
Comment: Welcome to Motor Vehicle Maintenance & Repair!
Comment: You or others must have superb hearing because fuel pumps (electric ones in fuel tanks) don't make loud noise. You can use a diy stethoscope,  screwdriver blade pressed to fuel tank, handle pressed to ear and listening. Some, like myself, can hear the faint hum/hiss sounds of the pump running for a few seconds at ignition on time before starting. A fuel pressure gauge  or depressing the fuel test valve after ignition is turned on to see if fuel and pressure sprays out with force. This presumes '09 uses an electric fuel pump in EFI. A dead pump won't generate any pressure (between 35-60 psi).
Comment: @FDryer - Not sure what you're saying about pumps, because the ones I've dealt with I have no problem hearing and my hearing isn't good to start with. For instance, my truck (2018 Silverado) fires the pump when I open the driver's door. I can hear it plain as day. Not that it's loud, but it is distinctive.
Comment: I'm a member of  one car forum and many members cannot hear their fuel pump running. Every model is EFI.
Comment: Dodge things, lol.  You did manage to discover the only thing revving an engine is good for.
Answer: Basically, no, revving the engine will not cause damage to the fuel pump. The fuel pump is engineered from the factory to be able to provide the engine with as much fuel as it needs. Revving the engine, even to redline, shouldn't cause the fuel pump any issues.


What is a safe way of knowing the referer/referrer in an HTTP request?

Question: I am using nodejs to write an image upload service.  Paying clients will be able to send an image file to my endpoint that I have set up on my server.  However, when every request comes in, I need to confirm that it is actually a paying client making the request.  I thought about having the client give me their domain name and I would just check the referer header.  However, someone could easily spoof the referer header and use my service without paying.  How do SaaS developers face this technical problem?  Is it possible to fix this without requiring my clients to have some server side code?
Comment: Don't depend on client side for this kind of job.
Comment: How about [OAuth](http://oauth.net/documentation/getting-started/)?
Answer: Are you building an external image hosting service for websites or is it to share something that HAS to be private and SECURE? If it is the former then read ahead.
Of course, the header can be spoofed. Here's why you should not worry about it:

Alternative is ugly: To build a secure provisioning service, you will have to develop some kind of token system that the website owner implements at his end as well. Chances are, he would not sign up with you because there are simpler alternatives available.
Spoofing will have to be done on client side. Very few "users" will actually do this. Two geeks spoofing headers on their own machine will not make a big difference to you. If they write some proxy or middle ware that does this work automatically and many people start using it, it could be a problem. However this is not very likely.

Guess you already know, but since you haven't mentioned - it is called Hotlinking.  Google this topic to find more resources.
Answer: You cannot authenticate a browser with a referrer header.
If you want to authenticate an individual, then you will likely need a login system that they provide credentials to (username/pwd) and you check those against your allowed user base.  If they pass, then you set a certain type of cookie in the browser that indicates they are a legit user.  Subsequent requests from this user will contain that cookie which you can check on every request.
The cookie needs to be something that you create that you can verify that cannot easily be guessed or forged (like a session or an encrypted token from your server).  You would typically set an expiration on the cookie after some time period of time so that the user has to login again.
Comment: Agreed.  There is a free, open-source framework called OAuth that will do much of the work for you: http://oauth.net.  Here is a link to the JavaScript code you can use, since you tagged Javascript in your question: http://oauth.googlecode.com/svn/code/javascript/


Excel: Delete row if cell in certain column is blank?

Question: I want to delete all of the rows that don't contain a value in column C. How would I go about doing this?
Answer: You can do this very quickly if the cells are truly blank using SpecialCells
Manual

Select Column C
Press F5, then Special
Check Blanks, then OK (see this step in the pic at bottom)
Delete the rows that are now selected (e.g. right click in selection > Delete cells... > Entire row or via the ribbon (see second screenshot))

VBA
Sub QuickCull()
    On Error Resume Next
    Columns("C").SpecialCells(xlBlanks).EntireRow.Delete
End Sub

Comment: I wish I knew this years ago
Answer: Here's an easy manual method

Apply an Auto Filter to your sheet
Filter on column C Blank
Select all visible rows
Delete Rows
Remove filter

This process can be automated with VBA if required.  Try running the macro recorder to get a start
Answer: I think the easiest thing assuming you don't have a bunch of other formulas in the other cells is to just sort everything by Column C and then delete all the rows that have a blank for column C(the sort function will put the blank values for column C at the top of the file).
In summary:

Click on the folded paper cell above cell marked "1" and to the left of cell
marked "A" (to highlight all)
Click on Data, and then sort
Sort by Column C, and make smallest values be first
Just highlight the rows down until you hit the first row with a value for
Column C, and delete everything you highlighted
Answer: This should work.
Columns("C:C").Select
Set rngRange = Selection.CurrentRegion
lngNumRows = rngRange.Rows.Count
lngFirstRow = rngRange.Row
lngLastRow = lngFirstRow + lngNumRows - 1
lngCompareColumn = ActiveCell.Column
For lngCurrentRow = lngLastRow To lngFirstRow Step -1
If (Cells(lngCurrentRow, lngCompareColumn).Text = "") Then _
Rows(lngCurrentRow).Delete
Next lngCurrentRow

Answer: You can put this code in Sheet Module (Right Mouse Click Sheet Tab and select "View Code"):
Sub Delete_Blank_Rows()

'Deletes the entire row within the selection if the ENTIRE row contains no data.

'We use Long in case they have over 32,767 rows selected.

Dim i As Long
Dim LastRow As Integer

'We turn off calculation and screenupdating to speed up the macro.

 With Application
     .Calculation = xlCalculationManual
     .ScreenUpdating = False

     'Reduce the work on the calc and define the range

     LastRow = Range("A" & Rows.Count).End(xlUp).Row
     Range("A2:A" & LastRow).Select

     'We work backwards because we are deleting rows.

     For i = Selection.Rows.Count To 1 Step -1
          If WorksheetFunction.CountA(Selection.Rows(i)) = 0 Then
              Selection.Rows(i).EntireRow.Delete
          End If
     Next i

    .Calculation = xlCalculationAutomatic
    .ScreenUpdating = True
End With

End Sub

Comment: This deletes rows where the entire row is blank? -if does, it's similar to @drnewman answer.
Question specifically states: Delete row if cell in certain column is blank.
Comment: Welcome to Super User! Please read the question again carefully. Your answer does **not** answer the original question.


Is there any NLP tools for semantic parsing for languages other than English

Question: I want to parse Malayalam(Indian Language) text corpora for developing a question answering system.Is there any NLP tools for semantic parsing for languages other than English.
Comment: Please [edit your post](http://stackoverflow.com/posts/32432719/edit) to fully explain your intent. Be verbose and specific. Also **add other tags to reach more people**. Choose tags that relates to the subject you are dealing with, better to ask for forgiveness that stay in the dark. So look other questions that have similar intent in the "related" section of the page and copy the interesting tags. You at least need "[question answering](http://stackoverflow.com/questions/tagged/question-answering)" tag.
Comment: Please, be specific, what are the language you want to parse? What task do you want to solve? NER? POS taggin? Stemming? Lemmatization?
Comment: @amirouche.. I want to parse Indian languages like Malayalam..using parsing i could extend the work to question answering
Comment: What computer language do you want to work with?
Answer: This might sound big and scary.
As far as I know, there is no free software question/answering system you can study, even if it's documented.
There is two part to question-answering:

understanding the question
looking up the response in some preprocessed dataset (say wikidata.org)

Both steps require similar algorithms.
Vertical question-answering pipeline
To implement a vertical question/answering system you will need to be able to parse "Malayalam" and other Indian languages at a high level which means at least to do:

split text into paragraphs, and then into sentences and into words. You must be able to tell where a sentence ends. For instance depending on the language sentences might not end with the same char. Or abbrev. like ie. are not the end of a sentence. I.B.M. is not three sentences, etc. How do sentence start, in english there is a upper case letter, but not all upper case letter start a sentence like proper nouns e.g. "Is Chomsky alive?"

Part of Speech Tagging: tell nouns, from proper nouns, from verbs, etc.

create a named entity recognizer: identify names of persons, organizations, locations, expressions of times, quantities, monetary values, percentages, etc.

build semantic tree dependencies: e.g. to which named entity "she" or "he" refers to? who is the subject of the sentence, the complement, etc.

create a text generation tool. Given that your program understand the question, found a possible answer it must format it in a natural language.

Luckily there is no shortage of example for doing that for english which you take inspiration from. If you want to work on Python you will want to study Spacy (wanna be fast and current NLP library) and NLTK which comes with book.
Algorithms can be shared between languages.
A more narrow approach
If you don't want to do all the steps and only resolve the sub problem of answering questions. You need to  simplify the problem and eliminate variables/unknown:
You must build a database with already split and tagged facts so that you can simply answer questions by doing a SQL query. For instance given the following fact tuple:

WHO:India WHAT:win WHAT:Cricket Championship WHEN:2015

Here, I simplify tagging as WHO, WHEN and WHAT.
It's easy to answer the question:

WHO:? WHAT:win WHAT:Cricket Championship WHEN:2015

ie.

who won the Cricket championship in 2015?

Again questions must be "predictable" and easy to parse other examples:

WHO did WHAT WHEN
WHAT is WHAT
WHEN WHAT WHO

This can work if you can recognize/parse a WHO, a WHEN and guess what is a WHAT in a sentence provided by the user. Also you can further simplify and say that WHENs can only be 4 digits ie. years. And futher constraint the kind of question, to simplify the parsing part.
This will lead you to a program that can actually answer question in a way that is more natural and more correct that an Information Retrieval (IR) systems like raw ElasticSearch or PostgreSQL would do.
Facts databases
You will probably need to work with semantical network look at the free ConceptNet (and send a message to the mailling list if you need help or want to contribute indian wiktionary) or babelnet. There is also wordnet.
Course
I liked a lot Jurafsky course, there is a specific chapter about QA. Jurafsky wrote a full book introduction to NLP.
Search Tips
Search the World Wide Web for information about NLP algorithms in the language you look information for. Say for a french lemmatizer I do the search on french research portal or through a search engine using native ie. french wording. American search engines are not really as good in other languages than english so be prepared to paginate (also use search tools).
Culture
Build a good culture on natural language processing and artificial intelligence. Look summarization or information retrieval (it's easy) to  you will learn method that can be re-used in another problem. For instance if you look at rule based machine translation you learn that in the industry they used simplified non ambiguous natural language grammars to be able to accurately translates documentations. Those documentations are written in a simple English (e.g. SUBJECT VERB NOUN) for which a computer grammar can easily be created (like computer language grammars) and can easily be translated mostly word-to-word. This an instance of solving a sub-problem to achieve higher quality. This is how I came up with the above narrow approach.
Algorithms
Last but not least, most sub-problem solutions falls into one the three  following algorithm category:

Algrebraic and graph theory try to makes sens of the data and can explain its results. e.g. PageRank, SimRank, CoSimRank, Logic programming.

Statistical which I compare to termodynamics, where basicaly "you get the problem solved but don't know why". This is what is called "machine learning" and is mainly used in the industry to solve actually narrow problems compared to NLP. But still machine learning algorithm exists to solve natural language problems e.g topic modeling but it's not the only example. Statistical programming is popular.

Hybrid: which means a mix of both methods.

Read On Chomsky and the Two Cultures of Statistical Learning for more insight about the dichotomy and the research/engineering background.
General Tips
You don't need to know and understand every algorithm and the scientifical grounds as long as you understand their limitations and how to use them.
Something that I've figured, even if I read mostly english, reading in my "native" language french widens my understanding.
Save the papers and ressources you find, things come and go.
Answer: When I was trying to find a semantic parser for a language other than english, I faced two major issues: Finding semantic annotated training data and a FrameNet like semantic database.
Since it is virtually impossible to find a good substitution for FrameNet even for popular languages, I suspect that this is off the table in your case.
One possibility would be to use semantic role labeling. This shallow semantic parsing is not as detailed as a real semantic parser, but maybe it is a step in the right direction. The SRL parser I know are not for english per se, they rather come with an already trained language model for english. So the biggest challenge is to train such a model for your language and that requires you to have a large corpus with semantic annotation. Most parsers need this data in the CoNLL format, because there are corpora available for multiple languages here.
mate-tools
They focus mostly on dependency parsing, but also contain a semantic role labeller that can be trained. They are stand-alone tools written in C++, so if you want to integrate them into your program you maybe have to build a toolchain of some shell scripts.
ClearNLP
Unlike the mate-tools, ClearNLP can be used as a Java library and the project is also actively developed. They also support the training of a new SRL model, a feature that is relatively new.
Since I doubt that you have the time and resources to create a semantic annotated corpus for your language, a possible workaround would be to use a very good machine translation system to translate your corpus to english and then apply semantic parsing. This approach is very error prone, so I highly suggest correcting the translated output, even if this is a time consuming task.
I am currently working with the SEMAFOR parser (GitHub). It is written in Java, comes with pre-trained models for english and creates FrameNet annotations in an easy-to-read XML file. It is far from perfect (like all semantic parsers currently), but it creates an output you can work with. If you choose to work with it, it is best to ignore the precompiled jars and download the newest code from their GitHub page.
I know that this is not the perfect solution, but it is the fastest and most reliable approach that I would choose.


How is Clan War Map position determined?

Question: I am #10 in my clan (cause I'm farming) but I am #2 in clan wars. I don't have the strongest troops in my clan. I'm just wondering how the order is set up, the only thing i can think of is that it is based off of your defense, but I'm not sure. Anyone know?
Comment: This question is not very clear, could you go back and re-word it?
Comment: the wiki say "Clan war attacks will neither break your shield nor affect your trophies, just like single-player attacks" (single-player attacks being the goblin bases). since a clan war victory is determined by stars not trophies so your ranking within the clan is changing because you are losing attacks/defenses outside the war while other players are gaining more. this however does not answer "How is Clan War Map position determined?" just why your in-clan ranking is changing. to reiterate, **it has nothing to do with the Clan War**
Answer: http://forum.supercell.net/showthread.php/237478-Clan-Wars-FEEDBACK-here
Official answer from Supercell. Scroll down to about mid page. War map rank is determined by overall defense.

Once a match is found, players are sorted on the map from strongest to weakest, in terms of defence power of their base, i.e., defense levels, hero levels, traps, etc.

We do not take TH levels into account. Instead, we only use overall strength of all defence elements in player's village. For example, a TH8 with higher level defenses than a TH9 will be ranked higher than the TH9 in the war map.
Answer: The bases are ordered from highest to lowest strength.
Strength is based on each member's attacking power this includes available types and levels of troops, army camp capacity, spells and heroes. Along with your defensive strength, which includes defensive buildings, walls, traps and heroes.
Your position has nothing to do with your trophies, Player level, Town Hall level, Achievements, or EXP.
Comment: I explained it in my answer
Comment: And, how exactly would you measure that without XP?
Answer: So as I understand it, rank is based on what defenses you have (defensive buildings, heroes, walls), and not the way in which they are laid out.  It has nothing to do with player level, although level gives you a rough estimate of a player's total progress through the game in terms of buildings and achievements. So basically, moving things around on your base to improve your layout won't help your war ranking, only upgrading or building new defenses will do so.
Comment: Exp is gained from upgrading and building new buildings, but it is also gained from completing achievements, clearing debris, and donating, therefore it is not the best measure of the strength of a particular village.
Comment: some player are high lvl because they just donate alot
Answer: Your clan rank in a war is determined by your defence strength, that is calculated by the cost of your highest upgrades and total cost excluding walls. I have the highest level but am 7th in my clan
Answer: The way I understand it is your trophy count gets you into the war, then the strength of your base defence determines where you rank in the clan war map. For example, your clan has 50 members and you go to war with a clan that has 40, then the war will be 40v40. The top 40 players in your clan (ranked by trophy count) will join the war, the remaining 10 will be spectators. Then the 40 players fighting for your clan will be ranked 1-40 on the war map based on the strength of base defence regardless of trophy count. Hope this helps
A co-leader has the right to select whom from his clan are participating in the clan war. But there must always be either a round number or a number between 1-50 with five or zero at the end.
Answer: Clan War position depends on your defense strength. Not the level, not the trophies, but HOW GOOD YOUR DEFENSE IS. :)
Comment: This should be a comment to the question not an answer (the users don't have rep for comments)
Answer: Okay the top two answers say most of it for the question but I would like to add a point. So if there are two players in war with the exact same defenses, they would further be differentiated on the basis of their league or trophies or xp.
How are clan war positions determined when identical bases are present in war?
Happy Clashing!
Answer: As I have understood your question, you're asking how your war base position is determined on war map. Right?
This is determined based on Player Level. Highest level players are positioned at Top and lowest level players at bottom. It has nothing to do with your position in Clan which is based on trophies.
Comment: This is not true
Comment: @SachinShekhar: My position on my clan's war map is higher than it should be if position were only based on level.  Your answer is wrong.
Comment: Player Level, apart from being a requirement for a lot of cosmetic items, has 2 uses, 1) a guide to how much work a player has done (Level 150 will ofcause have a done quite a lot of work to gain resources to build up their town) and 2) to inflate one's ego
Comment: @Jonco98 This is 100% true.
Comment: @SachinShekhar Player Level is roughly irrelevant, it may seem like the level plays a role but this is pure coincidence as upgrading/building all add exp and said actions are what you will be doing to improve your strength.


How exactly do outputs work?

Question: Suppose someone gives me 1 XMR, that I'll call 'A'. That person can now see when that output A they give me is used in a ring signature for a transaction. If I then make a transaction where I send 0.1 XMR, I send that 1 XMR output A and then receive 0.9 in change right? Now how does the tracking of A work now? If I go and make another transaction using the 0.9 in my wallet, will that initial output A once again be used in that transaction?
Answer: Oversimplified:
<code>1.0 (alice)
└── 1.0 (YOU - output A)
    ├── 0.1 (bob)
    └── 0.9 (YOU - output B)
        └── 0.9 (charlie)
</code>
By the time you send to charlie, there are no more funds left in A, so it cannot serve as actual output any more.

How exactly do outputs work?


Messenger pics iv sent to friends move sometimes to gallery

Question: Samsung Tab 4. Pics I send to friends on messenger (facebook) have started showing up in my gallery under messenger app , but only sometimes.Even ones I delete show up there sometimes . My second problem is stuff under messenger ,screensshots and Facebook apps in my gallery vanish . Please explain in easy terms if anyone got any idea as I don't know all the jargon yet . THANKS .
Answer: On Facebook Messenger,
Go to Settings › Photos and Media.
There uncheck the two options, if you wish to. This will stop messenger photos from appearing in the gallery in the future.
My Messenger is version 55. I think this option exists in all recent versions, too.


Is it possible before any college for me to get a short term job as a front end developer for experience?

Question: I'm 17 years old, and I've been programming for several years now, and I'm hoping to make web development my career in the future. I'm wondering if there are any companies that would hire somebody like me so that I can get some money before college, and some experience for a future long term job. If it's possible, where would I look? Is there a specific position I should be seeking out?
Comment: When you say "short term" how long do you mean? Months? Years?
Comment: Sorry for not being specific. I'm thinking months, possibly up to a year
Answer: You can go to your local community college career office and ask about places hiring interns. You're only a year or two younger than what they're expecting, and potentially more qualified than the average applicant. You won't make a ton, but having a mentor is potentially worth much more than another two dollars an hour at this point.
You can also pass out your resume to everyone you know, and ask them to take it to their friends. I receive several high-school student resumes per year, and they're usually on par with an average college student.
Comment: You can list the skills you have--languages and tools you're familiar with. You can also list your education, and grades if they're good. Very.very short is better than irrelevant fluff.
Comment: Good answer. Family and families contacts can also be useful. I've given quite a few friends kids small jobs and a bit of training. They have usually proved to be cheap, short term grunts happy to have some cash in their pockets and a reference.
Comment: Yeah, money would be great but I know this is a short term job, so I know I won't make a fortune anyway. Experience and learning are more important to me.

What would I put on my resume, having never had a job before? Is there anything else I should know about applying as a high schooler?


Minecraft yellow text is showing up with a symbol I can't remove

Question:
The symbol I'm having problems with is the one highlighted above in the red circle.
My code is the following:
§eRIP Jeremiah!
§eOverlord of green pricks!
§eI'm a grape!
§eHiro is top dog!
§ePromoted to regional manager!
The file is saved as "splashes.txt" encoded as UTF-8-BOM in Notepad++
This symbol only shows up on the first line
Subsequent lines do not have this issue
If I move them all down a line then the symbol is still there, just appears on it's own
Can anyone enlighten me to the problem I'm having here?
Answer: For those who need this answer, you need to set the encoding of the txt file to UTF-8 not UTF-8-BOM. This will fix the issue.


What is unsolved in CP Violation?

Question: I learnt about CP Violation in my Quantum Information Theory and Particle Physics courses. However I have not understood what exactly has not been solved yet about CP Violation. I thought that the standard model is able to predict CP Violation perfectly well.
Comment: Why is it so big? The Standard Model predicts some, to be sure, but not nearly enough to explain the amount of matter vs. antimatter we see. Also, why doesn't the strong force have any CP violation?
Comment: The absence of antimatter in the universe has nothing to do with the CP violation.
Answer: The standard model does indeed describe/predict CP violation in the quark sector perfectly well (dammit!)    But it does not explain why the universe we're in is full of matter and empty of antimatter.

What is unsolved in CP Violation?


What author changes are acceptable after paper acceptance in the camera-ready

Question: In a conference in the CS field, what sort of changes are acceptable from an author of a paper in the camera-ready version over the submitted version?
Can the author add few new related findings?
Answer: I can't speak for all parts of CS, but I have seen authors improving theoretical results, fixing bugs (both bugs discovered by the reviewers and bugs not discovered by the reviewers), changing the presentation (both following reviewers' requests or not), and adapting experimental results to the latest version of a tool, and I have done so myself, and nobody has ever complained about it.
On the other hand, if you have any reason to believe that the reviewers would have preferred the submitted version to the updated version, or would have rejected the paper if they had seen your changes, you should probably not change it.
Comment: And are you talking about top conferences? Because the rules sometimes vary between the conferences levels.
Comment: I'm talking about (among others) the top conferences in my research area.
Answer: You can probably add a few new results, BUT...
You need to honor page limits, of course, and...
You need to warn the program chair that you have done this. Note that your "few revisions or additions" haven't been reviewed and the chair might have an issue with it if s/he has and doubts.


How to delete a table in postgresql

Question: There is a postgresql installation on my server that worked fine so far. However now there is a single table (all other tables work fine) which I cannot open through pgadmin3 or drop.
I've tried restarting the server. Didn't help. I also tried dropping the table with DROP TABLE from the command line on the server. It's just stuck. I've executed the command and it has been just hanging in the console for the past hour.
I don't know what to do. Is there a file I could erase in the data directory perhaps?
Comment: You'll need to be more precise than that. If `drop table` just hangs, more details are needed, and the better venue to ask would be the pg-hackers or pg-bugs lists.
Answer: Most probably explanation: some other open transaction is holding an exclusive lock on the table.
You are using pgAdmin, so you can check with Tools -> Server Status. The activity pane lists all current connections. For instance, there is one (or more) listings for every open SQL window. Look for long running connections.
You can also try to issue a DROP TABLE and check this list. With any luck you'll see what blocks it. Once you have identified the troublemaker and made sure, it's not needed, you might be able to kill the process. Might be vacuuming gone haywire because of bad settings ..
That, or something is seriously broken.
Answer: You could try taking a dump of the database and see if that works? Also have a look at the http://www.postgresql.org/docs/9.1/static/runtime-config-logging.html#GUC-CLIENT-MIN-MESSAGES and log_min_messages options. Change that to debug and see what is happening when you try to drop the table.
Answer: In Case of Windows Users. Try restarting Postgresql by follwowing these steps: Start -> Run -> (then type in:) services.msc. Select Local postgresql Server and then press "Restart." Now, go ahead and try deleting the database or the table you wanted to delete (Via pgAdmin). Hope it helps.

How to delete a table in postgresql


How can I hide/show the Ubuntu dock with a keyboard shortcut?

Question: I am not able to hide/unhide the Launcher/Dash/Dock from the keyboard in Ubuntu 17.10 or in Ubuntu 18.04. Is it possible?
Answer: Not exactly what it's intended for, but you can use super+q to show the Ubuntu dock when it's hidden.
The actual use of the key combination is somewhat different, the super+q combination shows the dock with numbers next to each icon in the dock. Then you release q and press the number to launch or switch to the associated application.
If this feature is disabled, run the following to enable it first:
<code>gsettings set org.gnome.shell.extensions.dash-to-dock hot-keys true
</code>
Answer: If you wish to hide/unhide on the go, the following extension does it.
It has a button in the top bar.
See the Gnome extension Dock Hide Button by sanjarcode.


Analysis of Sonata form

Question: I'm about to take my level 10 Harmony exam and I'm still kind of unsure about Sonata Form. Could someone give a (brief?) explanation of it? The textbook that I use does have a good explanation, but I'd love to hear another explanation in different words I guess. Thanks!
Answer: The question proposed as a duplicate should give the answer you're looking for, but here's some brief detail to get you started.

Part 1: Exposition
1.1 First theme / first key area
1.2 Transition
1.3 Second theme / second key area
1.4 Transition / Ending

Part 2: Development
2.1 Development of thematic or other material
2.2 Retransition

Part 3: Recapitulation
3.1 First theme / first key area
3.2 Transition
3.3 Second theme / first key area
3.4 Transition / Ending / Coda

Analysis of Sonata form


Portable gdal2tiles.py

Question: I want to realize "Portable gdal2tiles.py" in both Windows and Mac environment.
"Portable" means, run script without installing something.
To realize this, I believe, we have to have such components:
1. Python runtime which is portable
2. libproj4 which is portable
3. libgdal/libosr which are portable
Are there such components? Is this possible?
Answer: The Portable GIS project solves this for you on windows machines.

Portable gdal2tiles.py


Is this a design pattern? If so, what is its name?

Question: I'm currently developing a turn-based RPG (a rogue-like) in C++ and I have created a neat architecture in my code that looks like some design pattern because I remember having seen code structured like this in some other projects. I want to know if this is some kind of design pattern that I have stumbled upon and if so, what is its name. I have deliberately applied some patterns such as Factory and Singleton in other parts of the program, but the following is a rough description of another part of the program which I don't know if it's a pattern or not:
I have a base-class called GameElement, which is the root of every object that may appear within the game field. This class implements basic and complex behavior about moving around, detecting collisions, etc. that all subclasses inherit because it's common behaviour regardless of the type of the element. Plus, it has 2 virtual methods which by default do nothing, but can be overriden by subclasses: handleCollision( GameElement* e ) and handleTurn(). The handleCollision method can be reimplemented so that the objects know what to do when they collide with another object (especially with the player), and the method handleTurn exists so that the objects have an opportunity to do whatever they want when it is their turn. So far I have created several subclasses, namely SolidElement, PushableElement, FighterElement (for the player and enemies), PlayerElement (the player) which inherits FighterElement, and EnemyElement (the root of all evil) which also inherits FighterElement.
There's also a class called GameEngine which encapsulates the game loop (which also has the SDL event loop) in the run() method. This is the (fairly short) implementation of this method:
void GameEngine::run()
{
    SDL_Event evt;

    while ( running ) {
        handlePlayerCollisions();
        handleTurns();
        updateScreen();
        delay();

        SDL_PollEvent(&evt);

        if ( evt.type == SDL_KEYDOWN )
            handleKeyInput( evt.key.keysym.sym );
            continue;
    }
}

Within the game loop, it calls handlePlayerCollisions which has a loop that passes through the entire GameElement* container in the current scene, calling handleCollision( player ) in each one of them, so that if that element is colliding with the player, depending on the type of the element, it can do something to the player such as hurting, blocking his way, moving along (i.e. being pushed), or anything else that the class implemented in its handleCollision method. Also, the method handleTurns is called, which does almost the same thing as handlePlayerCollisions, except that it calls handleTurn in every element so that they can do what they like. The other method called is updateScreen, which does exactly what its name says it does. And the last thing is the SDL event loop used to handle key input.
If this architecture is some kind of design pattern, and if I knew what pattern it was, it would be much easier for me to use it in other projects and it would take much less time to explain it to other people when I need or have to.
Comment: Don't know if this setup has a name, other than "deep hierarchy mess". If it is a design pattern, then it is an anti pattern, as it is usually considered to be bad design. See e.g. this article for more on the problem and how to do it better: http://cowboyprogramming.com/2007/01/05/evolve-your-heirachy/
Comment: @tcarvin I actually misread this as not the own design by OP, but rather as something found from an FOSS project. Fernando, sorry for the disrespectful choice of words there. This is a design I have used in the past and it turned out to be a mess. I still have my notebook where I am pondering where the place of a in-game-backpack is in such a hierarchy. There are so many different aspects, that just can't be sensibly expressed in a class hierarchy. So really look for a component based design. That's the point of my comment.
Comment: Harsh.  I don't know that th OP was just referring to his game entity hierarchy in regards to the pattern question.  Anyway, patterns are not usually whole programs or frameworks or engines.  What you've got here is larger than a pattern.
Comment: Components are complicated so a lot of programmers love them. Sadly, they too tend to turn into this "deep hierarchy mess" so instead of solving that problem they just make it that much worse because now you have no idea what functionality any given item has unless you iterate its components. Unfortunately, the folks who have seen the light on that topic spend more time making games than writing articles.  ;)
Answer: Not quite what you have, but the pattern for many simulators is based on the OODA loop - observe, orient, decide, act - or the variant Sense Decide Act . In a game or simulator with a visualisation, you tag rendering into each loop cycle.
For your game, handlePlayerCollisions() is part of the observing step - each component is determining whether it is in the same place as player. Presumably handleTurns() has decisions to follow or run away from the player, and other decisions and actions. updateScreen renders the current game state. Separating acting from observing and deciding allows simulations to compute all observations from known state, then compute decisions from known observations, then compute actions from those decisions means you do not skew the simulation so latter entities are observing the results of the actions of earlier entities in the same cycle. But since you have limited to observing only the player and lumped observe, decide and act together you don't have that guarantee (unless updateScreen also includes updating the simulations state).
Whether the entities in the games are a single deep hierarchy, aggregations of components or concerts of intelligent behaviours is another discussion.
Answer: The methods you describe are an implementation of "Template Method" (GoF) pattern
 http://www.vincehuston.org/dp/template_method.html


Make a copy of email using pipe in postfix alongside 1 content_filter

Question: I am using postfix and already usHi. I am using postfix and already using a script as a content_filter which re-injects back to smtpd to all users, but before this happens, I would like to make a copy of the email as well. Do I need multiple content_filters? This does not need to get re-injected back to smtpd since I am just looking to make a copy of the email so I don't think I need to pass this off into my other script. It should be separate. An email should be copied to a local dest as well as go through the script which goes out through smtpd to deliver the email to the recipient. So this is all for just outgoing emails. I am pretty sure it has something to do with using the pipe and to a file but would like guidance on proper syntax and if I should be using a script, two content_filters, and how those two can be configured to work concurrently. I also don't think I can use the always_bcc option here since it would just make a copy of the email AFTER it goes through the current content_filter, unless I am wrong about that. Thanks for any help.
Comment: Yeah, you're right about the `always_bcc`. If you're looking to write a pipe script to copy the email, it should be fairly straight forward.. though you do need to decide how you store your copy.
Answer: Yes I was thinking about that. I was thinking the script below could catch the email from STDIN and feed it to a file but this file would need to be unique so I was thinking something along the lines of using the date command up until the milliseconds just in case more than 1 person sends an email at the same time. The file must be unique. Also the proper syntax in master.cf would be appreciated but this is what I think could work:
<code>#!/usr/bin/php
<?php
$file = fopen("/tmp/postfixtest", "a");
fwrite($file, "Script successfully ran at ".date("Y-m-d H:i:s")."\n");

// read from stdin
$fd = fopen("php://stdin", "r");
$email = "";
while (!feof($fd)) {
    $line = fread($fd, 1024);
    $email .= $line;
}
fclose($fd);

fwrite($file, $email);
fclose($file);

?>
</code>
Comment: If you want to make a copy before anything else, I'd read through this: http://www.postfix.org/SMTPD_PROXY_README.html and this: http://www.postfix.org/FILTER_README.html the second allows pipe methods, but may not run before your content_filter.


Use elliptic curves certificate only if client support them

Question: Is it possible to send an EC certificate to a client if it supports it or send a regular certificate if it doesn't?
Answer: ECDSA certificates can only be used together with the *_ECDSA_* ciphers, i.e. ciphers like TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA_P256. The client sends the list of supported ciphers within the  ClientHello initiating the TLS handshake, so it is in theory possible for a server to decide based on these ciphers which certificate to send.
In practice support for this feature varies, but there is support in Apache 2.4 and support was added to nginx in version 1.11.0. In both cases you need at OpenSSL with at least version 1.0.2.
Comment: "Support for parallel ECDSA / RSA certificates " - exactly what I've searched for. For nginx, it was ready just 4 weeks ago.
Comment: How does selection work for Apache? Any documentation?
Comment: @SmitJohnth: I don't find any documentation but I don't know what else apart from the offered client ciphers they could reliably use to find out what the client supports.


hot water issues

Question: We replaced our bathroom faucet after not having hot water for several years. The water worked fine for a few weeks, but the hot water has suddenly stopped. In the meantime, the pressure for the hot water in our kitchen was extremely low. We replaced the faucet and it worked fine for about a week. Now the hot and cold water is basically a dribble.
The bathroom water line was full of calcium deposits and is now working again (at least for now).
The kitchen faucet is one handle with a pull out sprayer. We have taken the aerator off the sprayer and removed some calcium debris,  but there is obviously more somewhere else. The problem is we don't know what to try next. Should we just buy a new faucet? My concern is that it might be cheaper than paying for a plumber. HELP!!
Comment: How would a new faucet help if you have debris in the line? Why did you not have hot water for several years? Did you try draining the hot water tank to see fi there is debris in it?
Comment: Disconnect the pull-out sprayer from the flexible line, there's a screen in there too.
Answer: I would first flush each feed line by detaching them from the faucet and opening them to flow into a bucket until the water moves freely.
Then if you have any compressed air, you might be able to blow out the faucet backward (blow into the faucet outlet/aerator end).  This should blow any calcium debris out the rear of the faucet.  Of course you must open the faucet valve so the air can pass through it.  With luck, that will clear the faucet valve.
Then re-attach the feed lines and confirm that water flow has been restored through the faucet.  Of course if calcium continues to dislodge in the water line, the blockages may recur.
Answer: How old is your water heater? Ultimately it sounds like the problem is coming from your water heater.  Corrosion settles in the bottom of the water heater tank. You can try flushing it out through the spigot at the bottom of the heater.Depending on how old your heater is and how much sediment there is inside you may just need a new one to solve the problem. If you do replace it a couple things you can do to prevent this from happening again is 1) replace anode rod every few years this is a long tube located at the top of the heater the which goes down in the tank and attracts minerals and impurities in the water and helps prevent sediment in bottom of tank. Eventually the rod will corrode and need to be replaced. You cando this youself you will need an impact wrench though. Secondly you can just run some water out the bottom of the heater about once a month, this will help to flush out the sediment and keep the tank clean.

hot water issues


Can I "ignore" rain?

Question: Am I able to stop or lessen the sound of rain, and only  rain? I want to hear all the other interesting sounds of Minecraft, but the pitter patter of the rain is getting to me...
Comment: You can replace the sound file in the minecraft.jar with a blank sound. I'll write up an answer tomorrow if there isn't one.
Comment: You can stop the rain completely on an SMP server with /toggledownfall
Comment: does it rain a lot for you?
Comment: If you install the Too Many Items mod, you can toggle rain off any time you hear it start up.
Comment: @MrSmooth I don't want to stop rain I just want to stop the sound.
Answer: You can mute the rain sound by replacing the rain sound in the minecraft "resources" directory. No .JAR file editing required!
Windows:
- Navigate to %appdata%/.minecraft/resources/newsound/ambient/weather
Mac:
- Navigate to ~/Library/Application Support/minecraft/resources/newsound/ambient/weather
Linux:
- Navigate to ~/.minecraft/resources/newsound/ambient/weather
All:

Download silent.ogg and save it to that directory (right click and save file as...)
rename rain1, 2, 3, and 4.ogg to rain1, 2, 3 and 4.bak
copy silent.ogg three times and rename them to rain1, 2, 3 and 4.ogg

All done! Play minecraft and now the rain will be silent.
(Note: If silent.ogg 404's on that link in the future, just search google for "silent ogg" or make one yourself in your favorite sound editor).
Bonus: You can do this for any sound file in the game, just browse around the resources directory for .ogg files.
Comment: Thank you so much for the answer, especially since you added the "make one yourself" part. I might make just a really quiet rain file.
Comment: Will you need to redo this every time Minecraft updates?
Comment: @OrigamiRobot I just tried it by updating Minecraft on this computer with an older copy. As expected, it did not touch the dates on the sound files, leaving my modifications intact. If an update does change the content of the rain files in the future than yes - you will need to reapply the changes. Setting the file flags to "Read Only" might work, but can't be tested unless they apply a rain-sound-changing patch.

Can I "ignore" rain?


Choosing the best tool for analysis using R.

Question: We need to improve post-operative pain management for patients, and have collected data for 2 years from 2 different samples. Data for year 1 (52 patients) was before we put interventions to reduce pain. Data for year2 (55 patients) was collected after we put new interventions. Pain levels were measured at 4 points (0, 12, 24 and 48hrs post-op) on the Visual Analogue Scale (VAS), taking the values 0-10 (pain level). What test can i use to find if the pain levels were statistically significantly lower @ 48hrs than it was at 24hrs using R. Data is arranged as PATIENT VAS0hrs VAS12hr VAS24hr VAS48hr.
Answer: From what I understand your question to be, you could use one of the following techniques.
1) A Cox proportional hazard model.
https://stat.ethz.ch/R-manual/R-devel/library/survival/html/coxph.html
2) Wilcoxon Signed Rank test.
https://stat.ethz.ch/R-manual/R-devel/library/stats/html/wilcox.test.html
Comment: Thank you. Was also thinking of using Wilcoxon Test but can i also use it in a situation when the subject gives 2 responses after a *single treatment* Or its best used  say in a crossover design (the same subject receiving *2 diff treatments* and give responses at each of the treatments)
Comment: When I worked in healthcare, I used WSR to analyze the effect of treatment  on a patient pre - and post on ER visits, IP admissions, etc. You might want to also look into a Wilcoxon Rank Sum Test.


What is the name of a minor chord with a minor 9th?

Question: If I take a standard A minor chord as a barre chord on the 5th fret of a guitar and play it but move my pinky from the root note A on the 7th fret and move it to the 8th fret, I get a dominant chord sounding chord. Essentially it is an Aminor with a min9th... is this called a minor 9th chord? and why does it sound like a dominant chord?
Comment: b9 chords contain a tritone (between the 5th and the b9), whose sound is very recognisable and prominent to the ear (and sounds dominant7 to you!).
Answer: From your description, the chord is based on the A minor triad (A, C, E), with an added Bb, the minor ninth. The correct label for the chord would be Am (add b9). It is probably better to call it "add b9", instead of simply "b9", since that may be taken to imply the presence of a flat seventh, which you don't have. That said, since this chord is not used as often, you'll find that some people notate it one way, and others the other way.
Why does it sound like a dominant chord? Most importantly, there is a tritone between E and Bb. The tritone is the characteristic (tense) interval of dominant chords (at least if you use the word "dominant" mostly in a jazz sense).
As in one of the other answers, you should compare your chord with C7. C7 contains C, E, G, and Bb. Your chord contains C, E, A, and Bb. So the fifth of C7 (a G) has been swapped for an A. Overall, this is not that big a difference, since the two chords have roughly the same intervals:
Am (add b9) has:

1 semitone interval (A - Bb)
1 whole tone interval (Bb - C)
1 minor third interval (A - C)
1 major third interval (C - E)
1 tritone (E - Bb)
1 fourth/fifth (A - E)

This pattern is also referred to as the all-interval tetrachord. "All-interval" because it contains each interval type exactly once, "tetrachord" because its a chord with four (tetra-) notes.
C7 has the following intervals:

1 whole tone interval (Bb - C)
2 minor thirds (E - G and G - Bb)
1 major third (C - E)
1 Fourth/fifth C - G)
1 Tritone (E - Bb)

So these chords have a lot in common, which is why they sound alike. That said, using different root notes and inversions can make a big difference to the ear. Using A minor and then sneaking in the minor ninth as a color note is a more subtle way to evoke a tritone dominant than simply going for C7. Good luck with your discovery process!
Comment: If b9 means the existence of a 7th in addition to a 9th, then isn't the chord name "7#9" redundant for example in the Hendrix chord, E7#9? And it should be just E#9. Or does this only apply to flat ninths, not sharp ninths?
Comment: That one's probably an exception because it doesn't occur within any of the modes of the major scale. Minor b9 is the ninth chord on a Phrygian mode. Finally, the Hendrix chord is in some sense different because it is not created by stacking major or minor thirds. There's a fourth between the b7 and the #9.
Comment: But are you saying that E#9 should be enough to imply all the same notes? Why then are people redundantly saying E7#9? I'm trying to say that the practice of writing chord symbols is not based on a grand unified logical scheme that's universally understood the same way by those in the know. Implying that something is universally "correct" gives a slightly misleading idea, when in reality you'll bump into cultural differences. With the E7#9 name being so widely used, I'd think that it's perfectly reasonable to assume that leaving out the 7 implies that there is no 7th.
Comment: Sure. I'd say that it's fairly logical, and that the Hendrix chord is an exception to the usual naming pattern, for the reason I've already given. The main point is to make sure that the user of the notation is clear on the notes in the chord.
Comment: @piiperiReinstateMonica - good point. E7#9 has always been called that, and I often meet E7b9, but when E9 comes along, the m7 is implied, and  in Emaj9 the D# is - not only implied, but expected.  Weird..! E add#9 might be a solution, just as E add9 is a well known chord.
Comment: @ScienceOfLogic - there is not a fourth between b7 and #9. The interval will be a 3rd - think letters (in key E) D E F. It can only be a third. It may sound like a P4, but it's called augmented 3rd. True, it sounds like P4, but going from D, E, Fx makes it squarely aug3.. Honest! Hope you don't think the Hendrix chord has a M3 and a m3!
Comment: To me, the use of more than one (enharmonically equivalent) label for each interval is a design flaw of the naming system. Certainly the blues musicians who pioneered the use of these chords did not think along the lines of your comment. The simpler description is that they liked to stack a minor triad on top of a major triad (with a b7). A lot of the blues comes from this move. Anyway, I think that we are moving offtopic, since it's not related to the question, or to my answer of it. I made a small edit, hope it's to your liking.
Answer: I would call it Am b9 (A minor flat nine), it sounds like a dominant, because it has the notes of a C dominant chord, something like "C7 add 6 omit 5 / A" and it resolves to an F chord. If you leave out the bottom A note, it's a nice dominant for F.
Edit. At least in some kind of theoretical thinking, a "b9" chord tension means that "there is a ninth", and because there is a ninth, there should also be a seventh, because chords are - in theory - built from stacks of thirds. To explicitly state that one of the notes in the stack are missing, words "add" and "omit" can be used. For example "C add 9" would mean that there's a root, third and fifth, but no seventh. Or "C9 omit 3" would mean that there's the root, fifth, (flat) seventh and ninth, but no third. In practice however, some chord notes are routinely omitted. In 11 chords the third is omitted so systematically that it's even "officially" stated in some theory material, and the chord is in practice used as a jazzier sus4 chord. In 13 chords, the 5h, 9th and 11th might be left out either because they add too much mud or because e.g. the guitar simply doesn't have enough strings and guitarists don't have enough fingers to play theoretical 13 chords.
For "b9" and "#9" ... is there a 7th in the chord? In the Hendrix chord E7#9, it is explicitly stated that there is a 7th in addition to a 9th. So if you leave out the 7, "E#9", then wouldn't it be reasonable to assume that there is no seventh?
Comment: Just to add to the OP's original thought an A-9 chord would be (A, C, E, G, B).
Comment: great thanks, makes sense, and it is nice if you want to make a minor chord sound like a dominant chord :)
Comment: "C7 add 6 omit 5 / A" Normally the chord symbol would be just C13 (or C13/A)
Comment: @user1079505 True, especially on the guitar that's a commonly used approximation, even though it lacks the 9th.
Comment: @armani: instead of saying thanks you can vote up (arrow up) the answers that make sense to you, and the best and clearest one you can accept.
Answer: If I'm understanding correctly, the notes, from 5th string up, are E B♭ C E A, making a kind of dominant 13th chord. C13. Oft-times, a 13th chord needs only the m7 (B♭) and the 13th (A, aka 6) to be a 13th chord. 9th and 11th are routinely omitted. Also the 5 (G) is often left out.
I feel it's a red herring to say there's a m9 in the chord - unless you still want it to be A based. But then the dominant sound won't emanate from it having root A. And, that apart, Am9 is a completely different animal.
Answer: I think your question is really about jazz chord nomenclature.
"Minor nine chord" in jazz would be a minor triad with a major ninth, ex. Am9 called "A minor nine."
"Minor flat nine chord" in jazz would be a minor triad with a minor ninth, ex. Em♭9 called "E minor flat nine."
In Roman numeral, functional analysis the wording can be different.
First, both C: V9 tones G B D F A and Cm: V9 tones G B D F A♭ can be called "dominant ninth chords." The particulars of the major or minor ninth will be understood in the context of the key. Likewise if you have C: vi9 or C: iii9 they both might be called simply "ninth chords" or "submediant ninth" or "mediant ninth" or "A minor ninth" or "E minor ninth." Various wordings like that might be used. Again, the ninth would be understood in the context of the key.

Aminor with a min9th... and why does it sound like a dominant chord?

A dominant should be a dominant to something. I'm not sure how your hearing it as a dominant. It could go two ways...

...if C becomes C# then it's a dominant to Dm. If you move the A to some tone of a C7, C dominant seventh chord, it's a dominant to F. Without knowing where you would move the dominant sound you hear the generic explanation is it differs from some potential dominants by only one tone.
Answer: An am7b9 chord sounds like a dominant chord because if you don't play the bass tone you have the V7 of the relative chord: I would notate this chord as a V7/and the relative minor root bass tone.
Examples: (not referring to guitar chord shapes!)
EGBDF => G7/E
ACEGBb => C7/A


Google Address API URL street address example

Question: I am successfully creating a Google Map with my street address input (origin and destination) However, when I use the same exact test with the Google Address API the JSON response shows numerous addresses and none of them appear to be valid. For example, I am using an address in Colorado and it is returning the directions for the same street address in a city in California. This is not consistent as some addresses work fine... so, I believe the issue is my url structure but I can find no Google Address API examples that include street addresses. All of their examples only cite city and state. So it is difficult to see how the parameters are supposed to look without seeing a specific street address example. Can someone supply a post or an example or a link that will help me?
Thank you!
Answer: Google Maps is an address approximation service. To illustrate, go into street view at nearly any location, and the top-left corner should display "Address is approximate." Google and other such services don't verify the existence or deliverability of an address.
From what you've described, it's quite possible that your URL is assembled correctly (though, you haven't posted it, so unless you do that we can't be certain), and Google is just doing what it does best: making a best guess with what it's given.
If you're looking for only valid addresses, you'll need to hook into a CASS-Certified service.
I work for SmartyStreets; we provide an API called LiveAddress that returns only valid addresses. There are a few out there so we encourage you to do your own research, but you won't find any others that are free to use (with full functionality, indefinitely).
If you need correct directions, I would recommend running the start and destination address through an API like LiveAddress, then submit those results to Google. At that point you'll be sure you're in the right state. :)
Hopefully that helps; let me know if you have any other questions about addresses.


Duration of Recurring Tasks in MS Project

Question: I have set up a recurring task to recur every 4 weeks for 4 occurrences. To me, this means the duration should be 4 x 4 x 7 = 112 days, but the duration is set to 253 days. Can someone explain?
Answer: The recurring task duration is not the sum of the durations of the detail tasks.  It is the span of working time from the start of the earliest of the details to the end of the last.


css text below overlayed image

Question: I have a product image and an overlay image that looks like a file folder with the desired effect being the file folder image looks like it has the product image on top of it.  This works perfectly!
The problem is, the text is displaying behind the product/overlay images and I really want it placed below.  I've tried moving the closing div niavely thinking this would force the next below but it still displays behind.
Here's the html:

Name: $fldr_name
Published: $pymnt_date

Here's the CSS:
.kit-folder {padding:0px; width:auto; position:relative;}
img.overlay-image{position:absolute; left:0px; top:0px; z-index:10;}
img.kit-image{position:absolute; left:0px; top:0px; z-index:1;}

Answer: After about 4 hours I figured out that I could a) close the div before the text and B) set height:110px on the kit-folder and the text appears exactly where it's supposed to.

css text below overlayed image


夫唯弗居,是以不去 What"s the meaning of the first 4 characters?

Question: it's the end of the second chapter of Dao De Jing. I try to make sense:
是以不去 therefore it's not lost, doesn't go away.
夫唯弗居? Can anybody help me?
Comment: In (comparatively more) modern Chinese, I would put it as "只有不自居其功,才可以永垂不朽".  "唯" means "an essential factor" or even "the only way".
Answer: Nannuo gave a nice explanation. But there are some of the details I don't agree with.
It seems 夫 is 发语词 to me. Normally one doesn't relate it to anything.
夫唯弗居 => 唯弗居 =>  Only contributing without taking credit.
以 means "because of". 是以 = 以是 = because of it/this/the reason/something.
去 = leave (vanish is also good.)
是以不去 => 以是不去 => Because of the reason above, it (the credit of your contribution) never go away.
Comment: agree that 夫's not a subject in above - though it can also serve as a transition similar in English to "Now, ...".  Example 韩昌黎's 答刘正夫书: "夫君子之于文,岂异于是乎。"
Answer: 夫唯弗居,是以不去。
夫:发语词。no actural meaning。 can be translate to "so".
弗:does not,never
唯:only,just
居:possess (merits) (regard contribution as merits。)
是以:therefore
不去:does not lose。
(So)Just because does not possess(merits) ,therefore never lose it。
Answer: Apologies for my late reply.
I have no formal training in classical Chinese, modern-day Chinese or something akin thereunto; however, in a Japanese sense, the answer should be more or less clear.
My answer is thus shown as follows (in a tentatively explanatory note):
Someone in question is/was merely not at home; therefore, he is/was not gone ([or] he has/had not left for anywhere else [for good]).
The [...] thread has not provided the entire excerpt or, better still, the entire article/account; therefore, I have no choice but to deem that, from these given words, the author of the original phrase ([or] the first-person character or any of the likes) seems to have responded to his or her listener(s)/reader(s), or seems to have provided an explanatory note in re the perceived departure, i.e., as to whether or not someone in question be/have gone. The author has apparently made it clear that the person in question merely was not at home, as opposed to having gone somewhere else (for good [or not]).
Note: In my opinion, whether or not one choose (chooses) to treat the first character (meaning in general: man, husband, this, etc.) as insignificant when being translated into English, it does not matter. The meaning in its essence remains clear that someone is/was merely not at home for the time being; thus, having gone nowhere (as possibly expected/assumed thus or so).

夫唯弗居，是以不去 What"s the meaning of the first 4 characters?


Make my own custom timeline for a website

Question: I'm a designer, but I also  do some programming (javascript, html, css). I need to create a custom timeline for a website (Couldn't post a photo because of insufficient reputation on here, but here's a link to the design: http://postimg.org/image/5p92wkk8f/  Like you hover the mouse over a part of the timeline, and according to that the year changes)  But I have no idea where to begin. (I tried looking it up on the internet, but there's no timeline code examples and I don't wanna generate a timeline from other websites, I wanna make a custom one that would be exactly like this design). Would anyone be able to give me hints, say anything useful, tell me where to start? Thanks!
Answer: Timeline JS is may be exactly what you are looking for. As it's open source tool, you can modify it as per your needs.
Answer: I'd make many divisions, one for each part (year in this case) of the timeline. So there'll be about 20 divs that together make the whole white line.
CSS would be something like:
.timeline { /*"timeline" is a class name that I made up.*/
    background-color:#ffffff; /* This is white color, change it to the cream color of the timeline.*/
    height: 30px; /*estimation*/
    width: 30px; /*estimation*/
    position:absolute;
}

.timeline:hover {
    background-color:#000000; /* This is black color, change it to the brownish background color.*/
}

This is just a part of the CSS. You'll need to position each division with margins. With the CSS code done, you'll have the timeline change it's color for each div you hover on.
The harder part is actually changing the text, and for it we'll use javascript. In order to make the code not too long (and easier for me to write) I'm going to write it as if there were only 2 divisions in the timeline. Once you get what I do, you will be able to finish it off easily.
So first of all, add an id to the division in which the text is, "text" e.g. In html, add to the 2 timeline divisions the event onmouseover, then a function. The functions are numbered.

Here is some text

Now we need to write the functions. We'll make a variable which will include the whole "text" id, then make 2 functions (one for each div) and make each function change the text according to the function's number.
var text_div=document.getElementById("text");
function changeText1()
{
    text_div.innerHTML="Some Text"; //"Some Text" should be the text to be written when the user hovers his mouse on the FIRST part of the timeline.
}
function changeText2()
{
    text_div.innerHTML="Some Text"; //"Some Text" should be the text to be written when the user hovers his mouse on the SECOND part of the timeline.
}

So let's review. The CSS makes the division change color when hovered on. Additionally, when a division of the timeline is hovered, it will trigger a function from the javascript code which will change the text, according to which division was hovered on.
Another thing you should notice: In the image you added, there isn't one paragraph only, for each paragraph a different CSS code. The javascript code I wrote will change the whole "text" division, making it's CSS be the affecting one for the whole text you entered in javascript ("Some Text" part). If you wish the CSS to stay different, you should:

make for each paragraph its own id (in html).
then make a new variable in javascript for each id.
and then add a new line to each function, which will change the inner HTML of the new paragraph separately.

If something is unclear, please ask.
Comment: This is actually incredibly helpful, thank you so much! I'll get to it, and if I have questions I'll make sure to come back to you. Thanks again! :)


How can I write complex and believable characters?

Question: How do I write characters that are more grounded, complex and believable so that readers can resonate with them and makes my novel more compelling?
How should I elaborate their dialogues and actions that adds more immersion in the story?
Comment: I imagine and write conversations between my main characters. These don't always go in the main story, but they help me give each character a distinctive voice.
Comment: Related, possibly duplicate: https://writing.stackexchange.com/q/49511/23927
Comment: This is a huge improvement and seems to ask the same core question.  Nice rewrite!  BTW, being a duplicate isn't really a bad thing, it may just mean you missed someone else having asked approximately the same question (and gotten at least one good answer).
Answer: We write best the things we love best. People are the real world model for characters, so if you want to write better characters, pay more attention to people. Try to see them as they really are, not just your image of them, or their demographic categories, or your judgements about them. If you can love someone because of their flaws, not just in spite of them, you'll be well on your way to writing better characters.
That's the organic answer. From a more technical point of view, I'm a fan of Marilyn Hacker and Samuel Delany's three-point checklist for well-rounded characters. They need to have actions in the narrative that are:
a) Functional - serve a necessary role in the larger plot
b) Habitual/Characteristic - distinctive personal actions that are representative of them individually
c) "Gratuitous" - neither habitual nor functional
Less well-rounded characters often have only one or two of the above. They are there to serve the plot, or there to add color to the narrative, or they have some memorable trait, but not all three.
As with anything else in your book, giving a character a complete backstory (for your own information, not necessarily to end up on the page!) and a wealth of sensory detail (what do they sound like? what do they look like? what do they smell like?) helps make them feel more real. Another mechanical trick I've learned that can help create a memorable character is to give them a symbolic object of some sort --a locket, or a sword, or a pocket-watch --that helps physicalize some aspect of their personality.
Comment: Great answer!! I'd also add a suggestion though - you mentioned to 'see them as they really are not just ... their demographic categories'. One thing that makes a character memorable is that they do things that are opposite to their demographic, or the people around them. Handy technique for creating the habits or characteristics of a main character you want to stand out - works for a good or an evil one, depending on the trait you use. So, studying real-life demographics isn't altogether a bad thing as long as it doesn't bias your judgement of someone.
Comment: really REALLY Nice answer! - adding to the **backstory** part of your answer; there could be some connection as well - like - (previously) , for example when you said a symbolic object of some sort - a sword or a locket - (especially the locket, got me thinking of -say 2 childhood friends that has 2 "symbolic objects" and these objects maybe can be connected (say, a key to the locket) if they ever would sorta-say "part-ways"

note this is just my thought; that I just wrote out; no real advice, just a additional-comment. have it great!
Answer: This may sound odd but don't put yourself in a character's shoes. Put the character in uncomfortable shoes.
What I mean is this:
People are more different than you can imagine. I developed a neurological problem that gave me a taste of what it was like to be someone else. To filter out different things from the world; to form beliefs differently; to experience things that many people talk about but had been alien to me, and much more. It's earth-shaking how different people are and there are many things that are impossible to imagine if you have not experienced them.
That's not to say you shouldn't try to get into a character's head, and imagine what it's like to be them. You should. But it's not about putting yourself in their place, immersing yourself in their backstory and motives. It's about probing the enigma of what it is like to be them—something that you can never fully attain but must try to.
As for the second part—in any good story, the characters are often outside of their comfort zone; their identity is challenged. As if it wasn't hard enough to understand who they are, you then have to put them in positions where it's hard for them to be who they are!
In terms of how this translates into writing, here are some simple examples:

some characters will be "noticing this" or "ignoring that" frequently
a character can show subtle signs of impatience all the time
a character might be future-oriented (seeming to always bring useful things or have a plan) or quick-witted
a character with high anxiety or low confidence might ask a lot of questions (which can also be a useful writing device)
a character might generally use a lot of sarcasm but do this less when discussing something that scares them or is meaningful to them
a narcissist will restate someone else's ideas sometime later in a conversation as if they were their own; ignore people; steer the subject to things that interest them
a shy character could be put on the spot (asked a question in public) and not cope with it; perhaps having a friend get them out of the situation
a quick-witted character will screw something up in haste
an observant character will read too much into a series of co-incidences
characters will commit to overcoming one of their flaws but will later forget or not realise they are still making that mistake, because it's very hard to change one's nature

As you can see there is a lot of "show, don't tell" going on here and some of it is hard to notice but the little things add up in the reader's mind.
One side-note about villains—psychopaths are not necessarily sadists, and vice versa. Making a villain be both is very cliché and likely to end up with a 1-dimensional character.
Comment: exemplary answer. **especially it's structure how it was written! the first sentence explains it all!** thanks!

`don't put yourself in a character's shoes. Put the character in uncomfortable shoes.` this is so Powerful. of course there is edge cases for everything; and some times it maybe might be a good idea to "put yourself in the character's shoes" - for example if one is writing a character that has a same-thing(a problem, or something) as one self (rare maybe but probably happens once here n there)

but I totally agree on the whole post, marvelously written! 10/10!
Answer: This is a big question, so I'm not even going to attempt to give a complete answer. Let me just mention a couple of points that I really notice when an author does NOT do right.
One: In real life, people often have complex motivations. When making an important decision, a person will routinely have several reasons for deciding the way they do.
I sometimes hear a silly criticism of politicians that goes like this: "Yesterday the president said that he was proposing this new policy to bring peace to the Middle East. Today he said that he is doing it to help the US economy. So which is it, huh? huh? Was he lying yesterday or is he lying today?" But that's often a silly criticism. He might well be doing it for both reasons and a dozen others.
Oh, of course I don't expect every trivial decision in a story to have complex motivation, or for you to explain the motivation. If you say that a character stopped at a store and bought a candy bar, I don't expect an in depth discussion of why the owner chose to build a store at this spot and why they are selling candy bars. But for the big decisions that a character makes in a story -- why the hero decides to start a revolution or which man the heroine picks to marry or whatever -- should be complex enough to be interesting. If you can sum it up in one sentence, it's probably not interesting enough.
Two: Related to that, avoid making characters 100% good or 100% evil. It's common advice to say that the hero should have flaws that he must overcome in the course of the story. I think it's also important for the villain to have justifications for his actions that sound at least remotely plausible. In real life, even the worst villains rarely say, "I will destroy all that is good and right!!" and then burst into fiendish laughter. Usually it's more like, "Yes, I suppose there have been some excesses. But we have no choice. We must fight these people because they have betrayed our country and are selling us out to our enemies for profit. I regret that some innocent people have suffered, and we must take steps to protect the innocent, but we can't let that paralyze us into doing nothing while these people destroy us." Etc.
This is especially true if you are creating villains who represent a political position or ideology or religious beliefs or whatever that you don't like. I've read many book and seen many movies where it's very obvious what the political (or whatever) views of the writer are, because everybody from his party is good and reasonable and likable, and everybody from the other party is evil and stupid and obnoxious. If you have trouble writing someone you disagree with without making him constantly screaming incoherently, you need to do some research and find out what these people actually say in real life.
In general, avoid making characters too simple. I recall when I watched Star Wars Episode 1 that I thought to myself, You know, every character in this story can be completely described in one sentence. There's the arrogant young man who's sure he knows it all, the wise old teacher, the politician who is only interested in power, etc. Yes, any story will have minor characters who have to be kept simple to avoid cluttering up the story. But if you can completely sum up a main character in one sentence, your characters aren't interesting enough.
Answer: Welcome to WSE, @{Ishan2077} !
I will provide the intuition you must use for this purpose. In my opinion, there is no such way to accomplish things in novel-writing. But by noting your requirements (from your inspiration or sales-pitch), you can close in. The whole point is to narrow down the choices through intelligent analysis.
Each novel, or any literary piece for that matter, is driven by its characters.
So - it should be no surprise that the construction of characters is tied to the theme of the novel, or to be precise, its environment. Begin with an environment/setting of your choice; this will guide you to the kind of characters that populate this world. Now - if you have a more traditional setting, you can make good use of timeless classical tropes in literature, such as the 'swashbuckler' and the 'old hag' (Remember Indiana Jones and Cruela De Vil).
If you go for a more rebellious set of characters, you must intentionally flout the rules your setting poses. For example, Jane Austen's novels provide female protagonists who resent the way society suppresses their will, particularly in the choice of husbands. To do this, you must first figure out the rules.
It is helpful to maintain journals to explore your characters. You must know your character inside out: needs, requirements, emotional state, perception, and last but not the least, physical features. A good way to get more insight into character-building is by reading more books, and paying attention. Don't read for sport; read to process the characterization. And details like accents and tics go a long way in differentiating your characters. It is not necessary your character be justifiable or likeable. They must be believable.
Your next challenge after you do your homework regarding this will be putting together a story.
Good luck with that!


Screenshot shortcut key error

Question: For more than a week or so whenever I use one of the cursor keys, page up or down, home, end or delete, it takes a screenshot and asks if I want to save to clipboard.
I checked Ubuntu Keyboard shortcuts and it seems to have the default shortcuts (Print, Alt+Print, Shift+Print...).
I'm sure I don't have to tell you how annoying it is this behaviour when editing text or just trying to fast forward when viewing a video.
Thanks.
I'm using ubuntu 14.04 LTS and Screenshot 3.10.1.
Answer: I have installed Zorin 9.1 and I press CTRL + ALT + PRINT keys and take a beautiful screenshot. I have shortcuts into start // control panel // keyboard // shortcuts.
If you can not then: You must have installed gnome-screenshot that you can search in the software center of Ubuntu, i take always screenshots with this program because it have a time (waiting in seconds) for take a screenshot.

Screenshot shortcut key error


Removing multiple inheritance

Question: I am studying multiple inheritance, and I read that it is considered bad design.
I created an example where multiple inheritance would be useful, and I have not found a way to rewrite it to remove multiple inheritance.
Furthermore, many languages do not support multiple inheritance and a new design is needed.
The 'Animal' class implements many things that all animals do.
The 'AquaticAnimal' class implements everything about water.
The 'TerrestrialAnimal' class implements everything about animal on land.
The 'Amphibious' class was created for animals that can do everything that 'AquaticAnimal' and 'TerrestrialAnimal' can do.
The application needs to use 'Amphibious' animals in the classes: Zoo, Aquarius, Plains and AmphibiousRace.
Despite virtual inheritance, the diamond problem continues, because calling Amphibious.eat() will call Animal.eat() twice and it will lead to inconsistent state.
It is not a real programming language, but it is like Java/C++.
class Animal{
  private:
    Place birthplace;
    String name;
    List likesToEat;
    Stomach stomach;

  public:
    virtual void growl(){ ... }

    virtual int eat(Food food){
        ... test if likes
        ... many operations
        chew()
        ...
        stomach.fill(food);
    }
}

class FlyingAnimal extends Animal {
  private:
    Wings wings;
  public:
    void fly(){ ...  wings.move(); ... }
}
class AquaticAnimal extends Animal{
  private:
    Flipper flipper;

  public:
    void swim(){ ... flipper.move(); ...  }

    int eat(Food food){
       int x = Animal.eat(food);
       ... use x
       flipper.nourish(food);
    }
}
class TerrestrialAnimal extends Animal{
  private:
    Legs legs;

  public:
    void run(){ ... legs.move(); ...  }

    int eat(Food food){
       int x = Animal.eat(food);
       ... use x
       legs.nourish(food);
    }
}
class Amphibious extends AquaticAnimal, TerrestrialAnimal{
  public:
    int eat(Food food){
        AquaticAnimal.eat(food);
        TerrestrialAnimal.eat(food);
        //PROBLEM: Animal.eat() will be called twice.
    }
}

//------------------------------------------
class Zoo {
  public:
    void add/remove(Animal a);
    void feed(Animal a);
    void show(Animal a);
}
class Aquarius {
  public:
    void add/remove(AquaticAnimal a);
}
class Plains {
  public:
    void add/remove(TerrestrialAnimal a);
}
class HighPeaks {
  public:
    void add/remove(FlyingAnimal a);
}
class AmphibiousRace {
  public:
    void add/remove(Amphibious a);
    void enterIntoLake(Amphibious a);
    void exitFromLake(Amphibious a);
}

Comment: There's not even a question mark in this. Do you have a question, or is this just a brain dump?
Comment: The question is: how to rewrite this code to remove multiple inheritance?
Comment: I know this is an old question, but today the best way to solve this is to use mixins or traits. See: http://alisoftware.github.io/swift/protocol/2015/11/08/mixins-over-inheritance/
Answer: If it's the legs and flippers that differentiates aquatic and terrestrial animals, is it really valid to say amphibious animals inherit from both?  Not many animals have both legs and flippers.
Either way, you could use more of a composition approach where you pass the pieces that are needed into the class:
class Animal{
  private:
    Place birthplace;
    String name;
    List likesToEat;
    Stomach stomach;

  public:

    virtual IEnumerable<Movement > Movements { get; }
    virtual IEnumerable<IAppendage> Appendages{ get; }

    virtual void growl(){ ... }

    virtual int eat(Food food){
        ... test if likes
        ... many operations
        chew()
        ...
        stomach.fill(food);
    }
}

interface IAppendage {
   void Move();
}

class Wings : IAppendage {}
class Legs: IAppendage {}
class Flippers : IAppendage {}

class Movement {
  private:
  IAppendage AppendageForMovement { get; }
  public :
  void Go(){
    AppendageForMovement.Move();
  }
}

class FlyingMovement : Movement {}
class RunningMovement : Movement  {}
class SwimmingMovement : Movement {}

class AmphibiousAnimal extends Animal {

private:
   Flippers flipper;
   Legs leg;
    virtual IEnumerable<Movement > Movements { get { return new Movement [] { new SwimmingMovement( flipper ), new RunningMovement( leg ) } ; }
    virtual IEnumerable<IAppendage> Appendages { get { return new IAppendage[] {new Wings() } }

  public:
    void fly(){ // find flying movement
           ...
           flyingMovement.Go();
           ...
    }
}

That's a bit of a rough example, but hopefully it gives you the idea.  Instead of trying to tie all the functionality into base classes try passing the functionality you need in.  If you need more than one type of functionality (e.g. running and walking and swimming) then you simply pass in more helper classes to provide that functionality.

Removing multiple inheritance


Wordpress SSL config on Google cloud instance

Question: I am trying to configure a Wordpress instance hosted on Google cloud to use https instead of http
I am trying to set it up as per these instructions:
https://jamescoote.co.uk/add-letsencrypt-ssl-certificate-to-wordpress/
to use letsencrypt
I've added installed the certificates as per those instructions. I also sylinked ssl.conf and ssl.load into mod-enabled.
I added the cert paths into the default-ssl.conf and symlinked that into sites-enabled but whenever I do this I can't get apache to restart. I get this message:
apache2.serviceJob for apache2.service failed. See 'systemctl status apa
che2.service' and 'journalctl -xn' for details.
but when I try those commands it doesn't give me enough information to solve the problem.
The contents of the default-ssl.conf look like this (I've changed the hostname but the rest is as is):

        ServerAdmin webmaster@localhost
<code>    DocumentRoot /var/www/html

    # Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
    # error, crit, alert, emerg.
    # It is also possible to configure the loglevel for particular
    # modules, e.g.
    #LogLevel info ssl:warn

    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined

    # For most configuration files from conf-available/, which are
    # enabled or disabled at a global level, it is possible to
    # include a line for only one particular virtual host. For example the
    # following line enables the CGI configuration for this host only
    # after it has been globally disabled with "a2disconf".
    #Include conf-available/serve-cgi-bin.conf

    #   SSL Engine Switch:
    #   Enable/Disable SSL for this virtual host.
    SSLEngine on

    #   A self-signed (snakeoil) certificate can be created by installing
    #   the ssl-cert package. See
    #   /usr/share/doc/apache2/README.Debian.gz for more info.
    #   If both key and certificate are stored in the same file, only the
    #   SSLCertificateFile directive is needed.
    # SSLCertificateFile    /etc/ssl/certs/ssl-cert-snakeoil.pem
    # SSLCertificateKeyFile /etc/ssl/private/ssl-cert-snakeoil.key

    SSLCertificate /etc/letsencrypt/live/hostname/cert.pem
    SSLCertificateKeyFile /etc/letsencrypt/live/hostname/privkey.pem
    SSLCertificateChainFile /etc/letsencrypt/live/hostname/fullchain.pem

    #   Server Certificate Chain:
    #   Point SSLCertificateChainFile at a file containing the
    #   concatenation of PEM encoded CA certificates which form the
    #   certificate chain for the server certificate. Alternatively
    #   the referenced file can be the same as SSLCertificateFile
    #   when the CA certificates are directly appended to the server
    #   certificate for convinience.
    #SSLCertificateChainFile /etc/apache2/ssl.crt/server-ca.crt

    #   Certificate Authority (CA):
    #   Set the CA certificate verification path where to find CA
    #   certificates for client authentication or alternatively one
    #   huge file containing all of them (file must be PEM encoded)
    #   Note: Inside SSLCACertificatePath you need hash symlinks
    #        to point to the certificate files. Use the provided
    #        Makefile to update the hash symlinks after changes.
    #SSLCACertificatePath /etc/ssl/certs/
    #SSLCACertificateFile /etc/apache2/ssl.crt/ca-bundle.crt

    #   Certificate Revocation Lists (CRL):
    #   Set the CA revocation path where to find CA CRLs for client
    #   authentication or alternatively one huge file containing all
    #   of them (file must be PEM encoded)
    #   Note: Inside SSLCARevocationPath you need hash symlinks
    #        to point to the certificate files. Use the provided
    #        Makefile to update the hash symlinks after changes.
    #SSLCARevocationPath /etc/apache2/ssl.crl/
    #SSLCARevocationFile /etc/apache2/ssl.crl/ca-bundle.crl

    #   Client Authentication (Type):
    #   Client certificate verification type and depth.  Types are
    #   none, optional, require and optional_no_ca.  Depth is a
    #   number which specifies how deeply to verify the certificate
    #   issuer chain before deciding the certificate is not valid.
    #SSLVerifyClient require
    #SSLVerifyDepth  10

    #   SSL Engine Options:
    #   Set various options for the SSL engine.
    #   o FakeBasicAuth:
    #    Translate the client X.509 into a Basic Authorisation.  This means that
    #    the standard Auth/DBMAuth methods can be used for access control.  The
    #    user name is the `one line' version of the client's X.509 certificate.
    #    Note that no password is obtained from the user. Every entry in the user
    #    file needs this password: `xxj31ZMTZzkVA'.
    #   o ExportCertData:
    #    This exports two additional environment variables: SSL_CLIENT_CERT and
    #    SSL_SERVER_CERT. These contain the PEM-encoded certificates of the
    #    server (always existing) and the client (only existing when client
    #    authentication is used). This can be used to import the certificates
    #    into CGI scripts.
    #   o StdEnvVars:
    #    This exports the standard SSL/TLS related `SSL_*' environment variables.
    #    Per default this exportation is switched off for performance reasons,
    #    because the extraction step is an expensive operation and is usually
    #    useless for serving static content. So one usually enables the
    #    exportation for CGI and SSI requests only.
    #   o OptRenegotiate:
    #    This enables optimized SSL connection renegotiation handling when SSL
    #    directives are used in per-directory context.
    #SSLOptions +FakeBasicAuth +ExportCertData +StrictRequire
    <FilesMatch "\.(cgi|shtml|phtml|php)$">
            SSLOptions +StdEnvVars
    </FilesMatch>
    <Directory /usr/lib/cgi-bin>
            SSLOptions +StdEnvVars
    </Directory>

    #   SSL Protocol Adjustments:
    #   The safe and default but still SSL/TLS standard compliant shutdown
    #   approach is that mod_ssl sends the close notify alert but doesn't wait for
    #   the close notify alert from client. When you need a different shutdown
    #   approach you can use one of the following variables:
    #   o ssl-unclean-shutdown:
    #    This forces an unclean shutdown when the connection is closed, i.e. no
    #    SSL close notify alert is send or allowed to received.  This violates
    #    the SSL/TLS standard but is needed for some brain-dead browsers. Use
    #    this when you receive I/O errors because of the standard approach where
    #    mod_ssl sends the close notify alert.
    #   o ssl-accurate-shutdown:
    #    This forces an accurate shutdown when the connection is closed, i.e. a
    #    SSL close notify alert is send and mod_ssl waits for the close notify
    #    alert of the client. This is 100% SSL/TLS standard compliant, but in
    #    practice often causes hanging connections with brain-dead browsers. Use
    #    this only for browsers where you know that their SSL implementation
    #    works correctly.
    #   Notice: Most problems of broken clients are also related to the HTTP
    #   keep-alive facility, so you usually additionally want to disable
    #   keep-alive for those clients, too. Use variable "nokeepalive" for this.
    #   Similarly, one has to force some clients to use HTTP/1.0 to workaround
    #   their broken HTTP/1.1 implementation. Use variables "downgrade-1.0" and
    #   "force-response-1.0" for this.
    BrowserMatch "MSIE [2-6]" \
            nokeepalive ssl-unclean-shutdown \
            downgrade-1.0 force-response-1.0
    # MSIE 7 and newer should be able to use keepalive
    BrowserMatch "MSIE [17-9]" ssl-unclean-shutdown

</VirtualHost>
</code>

# vim: syntax=apache ts=4 sw=4 sts=4 sr noet
when I checked to see if the certificates had been granted successfully they had. I guess there's some apache config that I haven't applied somewhere but I can't figure out what it is, any pointers would be appreciated.
Thanks
More details as requested:
This is the contents of the error log from apache:
[Thu Feb 23 06:46:55.153392 2017] [mpm_prefork:notice] [pid 1215] AH00163: Apache/2.4.10 (Debian) configured -- resuming normal operations
[Thu Feb 23 06:46:55.153424 2017] [core:notice] [pid 1215] AH00094: Command line: '/usr/sbin/apache2'
[Thu Feb 23 06:51:40.656914 2017] [authz_core:error] [pid 12411] [client 188.8.131.52:50713] AH01630: client denied by server configuration: /var/www/html/wp-config.old, referer: hostname/wp-config.old
[Thu Feb 23 07:42:52.938926 2017] [authz_core:error] [pid 12408] [client 220.127.116.11:51000] AH01630: client denied by server configuration: /var/www/html/wp-config.old, referer: hostname/wp-config.old
[Thu Feb 23 11:09:56.509913 2017] [mpm_prefork:notice] [pid 1215] AH00169: caught SIGTERM, shutting down
[Thu Feb 23 11:13:34.728029 2017] [mpm_prefork:notice] [pid 17535] AH00163: Apache/2.4.10 (Debian) configured -- resuming normal operations
[Thu Feb 23 11:13:34.728083 2017] [core:notice] [pid 17535] AH00094: Command line: '/usr/sbin/apache2'
Which doesn't strike me as being related to the issue but maybe I should remove that file anyway (although it starts ok when I removed the 443 section from the virtual host file)
This is the message from systemctl:
Failed to get D-Bus connection: No such file or directory - I got that having added the virtualHost section to my wordpress.conf to listen on 443, which what I had originally tried when starting to do this.
Comment: What information DOES `systemctl status apache2.service` and `journalctl -xn` give you? Also, post the relevant lines of your apache error log.
Comment: This is the message from systemctl:  Failed to get D-Bus connection: No such file or directory - I got that having added the virtualHost section to my wordpress.conf to listen on 443, which what I had originally tried when starting to do this.
Answer: It turns out the problem was this:
SSLCertificate
should have been
SSLCertificateFile
Answer: Those certificates should be added to your VirtualHost file and not to your default-ssl.conf file.
<code><VirtualHost *:443>
    ServerName www.example.com
    SSLEngine on

    SSLCertificate /etc/letsencrypt/live/hostname/cert.pem
    SSLCertificateKeyFile /etc/letsencrypt/live/hostname/privkey.pem
    SSLCertificateChainFile /etc/letsencrypt/live/hostname/fullchain.pem
</VirtualHost>
</code>
It also would be good to post the results of the erros logs as mentioned above.
Comment: There is nothing wrong with doing this in the default-ssl.conf if it is the only  virtualhost on the host. Without the actual error message why apache doesn't start this is just blind guessing.
Comment: I've edited my original question to include additional information


Pulling .NET Dynamic Data by First Letter only

Question: I have a long list of dynamic data being generated on a jquery mobile site. I'd like to have this data be separated by alphabet list bars, much like the directory organization of a phone by first letter.
Another option would simply be to only call the data by first letter. For example, I select the letter "A", and all the data that starts with "A" displays.
I am calling names via ASP.NET.vb repeated method with: <%# Eval("Name")%>
That code of course pulls all names. How can I narrow it down to specific letter starts? I am new to ASP and ASP.NET; therefore, I'm not quite sure where to start or what terminology to start researching. Any help would be greatly appreciated, thank you.
Answer: Call the first letter within the query of the WHERE.


MS program in Canada with bad undergraduate result

Question: I am not sure if this the appropriate place to ask such question. I have very bad undergraduate record with a CGPA of 2.40 which took nearly 6 years to complete. I have never thought to study again after my bachelor. But recently I am kind of desperate to do higher study. I attended for GRE, and  my score was 305 and my IELTS score is 7. I have 5 years of job experience as a software engineer. Is there any chance that I can get admission for MS in any Canadian university? I am kind of desperate to change my career path, I want to be an AI researcher. Is there any hope for me to pursue a masters degree in Canada or any north American country?
Answer: I'll be blunt, you have no chance. AI is probably the most competitive field in the world right now, and most applicants have exceptionally strong profiles and still get rejected. At the University of Toronto, most people who get accepted have 3.8+ GPAs, and have at least one publication at NIPS or ICML, on top of extensive research experience.
If you're really deadset on grad school, I'd the following:
1) Apply to course based masters instead of research based masters. These are significantly easier to get into. However, you get no funding usually and are expected to pay your tuition fees and living costs yourself.
2) Apply to a field other than AI, something fairly obscure with little competition. You have 0% of getting into AI.
3) Apply to low tier schools. You're not getting into U of T or UBC in Canada for instance. Maybe try Laurier and schools in that league.
4) Your GRE score is exceptionally poor, fix it. You need to redeem your low GPA somehow. Aim for atleast 164 Quant.