Taking a sparse snapshot

Question: I would like to take a dm snapshot of a drive. I do not want to take the snapshot of the unused and deallocated blocks. Is there any way of determining the used blocks and sectors of a hard drive without being file system aware. I would like to take a snapshot without having the empty parts of my disk backed up.
Comment: That's how snapshots work; only the blocks that are written to after creating the snapshot are copied.  Initially no space is used, regardless of how much is used/free in the origin.
Comment: If I understand that correctly these are two questions / problems not related to each other.
Answer: Without being filesystem aware, the best you can get is probably something like this:

Take a snapshot.
fsck the snapshot if needed. Then mount it.
Fill all free space in the snapshot with 0's (e.g., cp /dev/zero tmpfile; rm tmpfile). This will take a lot of I/O, and also will require you to have plenty of space allocated to the snapshot.
Unmount the snapshot.

You can then assume that any sectors filled with 0's are unused. Or, at least, need not be backed up; you can just fill them with 0's again. (You could also feed the image to gzip, it should compress fairly well).
Much faster would be to use tools like partimage or partclone that do understand the filesystem. Or, just use tar.
Comment: If your disk is a SSD, be aware that writing useless blocks on it each time you do a snapshot might not be such a great idea...
Comment: @lgeorget Indeed it wouldn't be, but unfortunately the trim tools are filesystem specific. The final paragraph is what I'd do.

Taking a sparse snapshot


How can a undecidable theory be complete?

Question: I don't understand how a theory can be undecidable (there is no effective procedure for determining if a sentence of the language is a theorem) and also be complete. How do we know all sentences are provable when we don't have a procedure to determine if they are?
Comment: you are first making a false assumption. All languages do not have sentences. Sanskrit, for example, has 'stops', and where a stop is can alter the meaning of the idea or ideas. There are other languages without sentences.
Answer: Consider the following example: "Let x=0 if the Goldbach conjecture is true and let x=1 if the Goldbach conjecture is false." We know that x is either 0 or 1, but we don't know which (yet!).

That's exactly what's going on here. Given a structure S, let Th(S) be the set of sentences true in S. For each sentence p, either p is true in S and hence Th(S)-provable or p is false in S and hence Th(S)-disprovable (since ~p is in Th(S)). We've concluded this without knowing anything about the particulars of the structure S: any structure whatsoever is guaranteed to give rise to a complete theory. Note that in particular this tells us nothing about the complexity of Th(S), and indeed there are "perfectly concrete" structures whose theories we know to be undecidable - the standard example being the natural numbers (with addition and multiplication), as a consequence of Godel's incompleteness theorem.

Incidentally, this is the only way complete (consistent) theories arise at all: if T is a complete theory and S is a structure satisfying T then by completeness of T we have T=Th(S) - or rather, the deductive closure of T is equal to Th(S), if you use the weaker notion of "complete" here.

Now you might object that some epistemological violence is being done to the word "know" here; that's a reasonable response, and leads to the idea of intuitionistic logic. But in the classical situation, everything above is perfectly valid - if a bit weird.
Comment: @csp2018 Nope! The *theory* has to know, but *we* might not.  (To hopefully make this all less slippery, note that there are many ["levels" of undecidability](https://en.wikipedia.org/wiki/Turing_degree), and once we know something is undecidable we don't have to throw up our hands but in fact have a bunch of new interesting questions. So I'd say that this isn't actually a cheap trick.)
Comment: Ah, I guess my confusion came from thinking one has to know whether P is true or not for the theory to be complete.


How can one try to preserve his semen and make it raise to head (ojas)?

Question: Since semen is considered to be very precious, how to preserve it make it raise to head (ojas)?
Comment: Why do you want to raise your semen into your head, eww :/
Comment: Wet dreams and avoiding it is not a concept precise to Hinduism. You should remove it. Asking for Health advises is not under our scope.
Comment: Without help of Guru, the Kama shakti can't rise. For that you should develop some spiritual qualities before.
Comment: Vajroli Mudra https://medium.com/yoga-from-india/vajroli-mudra-231e4af1a255
Comment: I think this question has asked and could be a duplicate.
Answer: The state where the semen's natural downward flow is blocked and it is made to travel up as Ojas is known as Urdhareta.
This is difficult to achieve but can be achieved through the practice of Yoga.
As, you may know, Yoga is eight-limbed:

yamaniyamasanapranayamapratyaharadharanadhy anasamadhayo-a-shtava
  anggani|
Yama, Niyama, Asana, Pranayama, Pratya hara, Dharana, Dhyana, Samadhi,
  are the limbs of Yoga.

And, under Yama, comes the following:

ahinsasatyasteyabrahmacharyaparigraha yamah |
Non-killing, truthfulness, non-stealing, continence, and
  non-receiving, are called Yama.

Now, the result of Brahmacharya is stated to be Viryalabha or getting the state of Urdhreta.

बहचमपय णतषामां वीमरय ाब् ॥ ३८॥

brahmacharyapratishthayam viryalabhah
By the establishment of continence energy is gained.

All these verses are from Patanjali Yoga Sutras' Chapter 2 (Sadhana Pada).
So, basically the answer is that by following continence/Brahmacharya one can achieve the state where the sexual energy is not wasted but instead is converted into spiritual energy (Ojas).
And, Brahmachrya basically means to give up all forms of sexual conducts although it has a different definition for married persons.
UPDATE:
While it's very easy to say that, by maintaining Brahmachrya one can raise the sexual energy upwards, but that is difficult to achieve that practically and hence not much helpful as an advice.
So, let me also add to this answer few Yogic postures (Asanas) that help one to curb one's sexual desire and thus aids in Brahmacharya.
I have this book called " Yoga Sadhana and Yoga Chikitsa Rahasya by Swami Ramdev". From that book I have selected three Asanas/Mudras.

Aswini Mudra:

This is discussed in this post.
This Mudra is said to curb sexual desire and helps in attaining Urdhreta.

2.Brahmacharya Asana:

This is said to be extremely helpful in Brahmacharya (as the name itself suggests) and it also cures diseases like Swapnadosha (nightfall). Not that difficult to master this posture too IMO.

Go Raksha Asana:

The benefits of this Asana are the same as those of the previous Asana. But this is somewhat difficult to master compared to the other one (at least for me).
Comment: It's available in Bengali? Where did you buy it from?
Comment: Yes but they hv such books too.. You can at least ask them where to get this book form @SuryaKantaBoseChowdhury
Comment: Yes it's available in Bengali. I don't remember now where I bought it from. But it shd be easily available. Try any Patanjali store. @SuryaKantaBoseChowdhury
Comment: Patanjali stores usually sell medicines and food products...never seen them selling books...


What is Bitcoin?

Question: Can someone explain what exactly is Bitcoin?
Comment: If you plan to use it, I'd recommend you have a look at some of the latest articles on ars: http://arstechnica.com/search/#bitcoin
Comment: http://bitcoin.stackexchange.com/questions/336/what-is-a-good-way-to-concisely-explain-bitcoin
Answer: Bitcoin is a digital currency created in 2009 by Satoshi Nakamoto. The name also refers both to the open source software he designed to make use of the currency and to the peer-to-peer network formed by running that software.
Unlike other digital currencies, Bitcoin avoids central authorities and issuers. Bitcoin uses a distributed database spread across nodes of a peer-to-peer network to journal transactions, and uses digital signatures and proof-of-work to provide basic security functions, such as ensuring that bitcoins can be spent only once per owner and only by the person who owns them.
Bitcoins can be saved on a personal computer in the form of a wallet file or kept with a third party wallet service, and in either case bitcoins can be sent over the Internet to anyone with a Bitcoin address. The peer-to-peer topology and lack of central administration are features that make it infeasible for any authority (governmental or otherwise) to manipulate the quantity of bitcoins in circulation, thereby mitigating inflation.

Source: http://en.wikipedia.org/wiki/Bitcoin
Beginners Guide http://startbitcoin.com
Another source: http://www.bitcoin.org
Another source: http://www.weusecoins.com
Answer: "Bitcoin is a peer-to-peer currency. Peer-to-peer means that no central authority issues new money or tracks transactions. These tasks are managed collectively by the network."
See more at http://www.bitcoin.org.
Answer: Bitcoin is a non-national, internet currency that can be used to make purchases across the web.  Like other currencies, it has exchange rates to various national currencies.  More on wikipedia
Answer: What is Bitcoin
First hit with Google.
Comment: I would certainly link to the website, but I would also add enough content to briefly answer the question, such as Thiago M.'s answer. The best way to look at it is: If all the links/references to external websites fail or break, can your answer here still stand by itself?
Comment: Linking to the actual organizationis frowned on?  What do you suggest? The tool to insert the link is provided.
Comment: Dave makes a valid point, his answer although short is correct, that site will tell you what bitcoin is... however maybe just leave a comment next time if you don't have anything extra to add?
Comment: Suggesting people google and linking articles is frowned upon, because soon google will take people here, and articles can be taken down or moved.

What is Bitcoin?


Use Case Diagram for Mobile and Web

Question: Do I need to create a different use case diagram for my mobile app and for my web app? I have a mobile and a web app but mobile users cannot access the web application. Only the admins can do that.
Comment: Short answer: probably. But you haven't really told us anything about the app itself, so that's just a random person on the internets making a guess.
Comment: The mobile app sends a report or complaint. It is for passengers. Meanwhile, all reports are delivered to the web app. which is being managed by a government agency
Comment: Possible duplicate of [How to show a sub system like mobile application in a Use Case Diagram](https://softwareengineering.stackexchange.com/questions/338750/how-to-show-a-sub-system-like-mobile-application-in-a-use-case-diagram)
Answer: A use-case diagram shows the high-level goals that users of the system want to achieve by interacting with the system. The use-cases shown in the diagram are on a comparable level of detail as system requirements and should not depend on the technology that gets used.
This means that the use-case for sending a report or the one for sending a complaint should not materially change when the design choice gets made to let the interaction run through a mobile app rather than a website.
This also means that the use-case diagram should not be split on the technology used to implement the use-case. Rather, if the diagram is to be split at all, it should be split such that related use-cases end up in the same diagram.
Answer: You have a couple of options here.
You can consider the subject of the use case diagram to be a system that is inclusive of both the mobile app and the web app. Your actors would be the different people or roles or personas who are using one of the two.
Alternatively, you can consider the subject of the use case to be each application. On each diagram, you would only have the actors that are using that application.
Since it appears that the actors that use each interface are different, I would lean toward creating a use case diagram for the mobile app that indicates the various actors who use the mobile app and what they can do and a use case diagram for the web application that does the same.
However, I'd be remiss if I didn't call out some words from Martin Fowler on use case diagrams:

Use cases appear in the UML in the form of use case diagrams, but
  these diagrams are of little value - the key value of use cases lies
  in the text which is not standardized in UML. So when you do use cases
  put your energy into the text.

In your particular case, use case diagrams may serve some value by providing a map to the use cases and making it easy to identify which applications provide which use cases to which actors. However, I would still focus on the textual or tabular representations of use cases - these are the things that would help developers and testers understand the user needs and build software far more than a use case diagram.

Use Case Diagram for Mobile and Web


How to update httpd.conf file in openshift

Question: Is there a way to apply Apache server config (in httpd.conf) to Openshift PHP application? I need to add a configuration so that Apache acts as reverse proxy for specific URL pattern and those requests need to be handled by a java application also hosted in Openshift. But I do not have access to httpd.conf file and only root user has access to it. The file I am referring to is (php/configuration/etc/conf/httpd.conf)
Answer: The users do not have permissions to edit the hhtpd.conf file in PHP cartridges I know of.
However, you can develop your own cartridge, that will have it configured according to your needs. You can find more about creating cartridges here.


Faster playback in VSE

Question: When I edit videos in the VSE, I would like to have a fast preview (e.g. sped up 1.5 times). Is it possible to adjust the speed of the playhead?
Answer: If you want to speed up the overall frames pr. sec. you can do this in the Properties - Output - Frame Rate.
If you just want faster search through the video, two add-ons support this: Power Sequencer(included in Blender, but needs to be enabled in Preferences) or VSEQF: https://github.com/snuq/VSEQF
If you want to only speed up one strip, this can be done by adding a Speed Effect Strip.
Comment: Wow, thanks!! Power Sequencer and VSEQF seem *extremely* promising!!! They even offer ripple-delete which I was already about to program myself xD

Faster playback in VSE


New list column is not displaying in dropdown list when creating a lookup column

Question: I have an existing list called Employees and I have added a new column "Company". I would like to create a lookup column using Company but Company is not displaying as an option in the dropdown list or additional fields. The Employee content type does have Company listed. Any ideas why Company is not being listed when creating a lookup column?
Answer: Only this types can be displayed as additional fields:

Single line of text
Number
Date
Date and Time
Calculeted single line of text
External data: OnHandQuantity
More info here


The only exception is Bob and Jim. Or, The only exception are Bob and Jim. Which is correct please?

Question: which is correct please. The only exception is Bob and Jim. Or, the only exception are Bob and Jim? Thank you.
Comment: The second is flat out wrong -- should be "the only exception**s** are Bob and Jim".  But, with that correction, either sense could be correct, depending on context.
Comment: Much obliged. The context is, 'All must attend training. The only exception is/are Bob and Jim'.
Comment: Are Bob and Jim one of several two-man teams, or are they individuals who just happened to be grouped in the "no training" group?
Comment: Ahm, they are a part of staff..hope that helps? We don't have two-man teams. Only two of them are the exceptions, as they have done the training already. Training is mandatory, (so there can't ever be a 'no training group', (sadly-would make life easier if it were so).
Answer: If Bob and Jim are a married couple and the people with whom they are being compared are also couples then Bob and Jim could be considered to be a single entity for purposes of comparison. You might see a sentence like this:

Most of the households in our block are heterosexual couples; the only exception is Bob and Jim.

However it is more likely that they will be compared separately with other individuals and you might see a sentence like this:

Most of the members of our team have completed the diversity training module. The exceptions are Bob and Jim.

So, as Parever has said, when there is one exception you say "the only exception is ..." but when there is more than one exception you say "the only exceptions are..." (note the plural 's' on exceptions).There are no circumstances where you could say "the only exception are..." since "exception" is singular and "are" is plural so they do not match.
Answer: If there are two exceptions, i.e. Bob and Jim, I would change your sentences so that you use the plural form.
"The only exceptions are Bob and Jim."
Answer: If the context is asking for a couple, you are right that it would be "The only exception is Bob and Jim".
In context:
"All the couples at the party aren't in love. The only exception is Bob and Jim who are kissing right now."
Here it would be untrue to say that Bob is an exception because he alone is not. Only together with Jim he qualifiés as an exception.
Otherwise, I would use "The only exceptions are Bob and Jim". To clarify that both Bob and Jim are an exception. If this is the case, the three statements
- One exception is Bob.
- One exception is Jim.
- There are no other exceptions.
are true.


problem opening normal boot after TWRP install on nokia 3

Question: by using sp flash tool i installed TWRP on nokia 3 phone and using fastboot loader i can open TWRP but i can not normal boot , when trying to boot normally only android logo appears.
Is it possible to open in normal boot.
Comment: Have you wiped any partitions(example like /system)? Please check whether it is the latest TWRP version for the device.
Answer: As you have install the custom recovery following reasons may cause problem-

Wrong version of twrp.
Wrong size of twrp recovery because some mediatek processors support 7mb of recovery.

So as you mentioned after installing twrp recovery device won't boot into system and it stuck on boot logo see the following guide to fix-

download stock rom of your device.
flash recovery.img from stock rom with sp flash tool as you flash twrp recovery.
This will return your device recovery mode to stock recovery form.
Now you can perform normal boot and your device won't stuck at logo.

Extra tips-

try to find the right version of twrp recovery, unlock the bootloader and if won't find the twrp recovery for your device just build it yourself take help from Google hope it helps good luck.


Will split question feature be useful?

Question: I often encounter situation when a new user is posting several absolutely non correlated questions as a single quetion. As the result we get a bunch of non-enlightening answers which are very short since they try to cover all the OP's question. Even more one can answer only a part  of this questions but do not do this, because he is supposed to completely answer the whole list of OP's question. I suggest to request this feature, and what is more I think it will be useful for all SE sites.
Comment: Who will own these new questions? The mod / high rep user performing the split, or the original poster? Presumably, the poster. Then it's a fundamental change of the way SE operates: someone will be able to create a question and assign its ownership to me. I do not like this.
Comment: When someone posts several question in one, I tell him/her not to.
Comment: And what ususaly that people do?
Comment: Related: [Posting multiple questions as one?](http://meta.math.stackexchange.com/questions/6464/posting-multiple-questions-as-one)
Comment: Sorry, Norbert, I haven't been able to keep track of what people do when I ask them not to post multiple questions in one. Sometimes, they get multiple answers before they can even read my comment, which sort of makes my comment moot. By the way, if you want to be sure I read something addressed to me, you have to put @Gerry in it.
Comment: @GerryMyerson Thank you, I see people not enthusiastic about my idea.
Comment: @user53153 These new questions could be owned by the Community user.
http://meta.math.stackexchange.com/users/-1/community
Answer: No, I don't think this is useful.
I think a better response to such questions is to leave a comment suggesting that the questions be posted separately, and that the current question be deleted.  You can punctuate this with a downvote and/or a vote to close.
It is better for the asker to do the work of splitting the question.  If someone else does it, errors could be introduced or necessary context omitted.
Comment: Asker won't do the splitting, because in most cases author of such questions are newbies that will visit this site only once.
Comment: @Norbert It does not have to stay on the site. Closed questions can be deleted with 3 votes to delete. Unanswered questions with $\le 0$ votes are automatically deleted after a year.
Comment: Well then, they won't get an answer, and their question will probably be closed, and that's just too bad.  If someone else is interested in one of the questions, they can ask it themselves.
Comment: Then what is the purpose to leave such a trash on site, if you are sure that it will be closed/non-answered/downvoted ?
Comment: @Norbert And unanswered questions with $<0$ votes are deleted after only a month. [Source](http://meta.stackexchange.com/a/5222/206169)
Answer: I think we should just go ahead and delete all the subsequent unrelated questions in the post, and leave a comment asking the OP to ask them as separate questions. (It would be considerate to add a link to the original version in the edit history, so they can easily copy the contents to new questions.) The result is that (i) we have a single well-defined question which can be answered reasonably, and (ii) the asker is motivated to do the work of splitting the question themselves if they want answers to the other questions. It's a win-win!
This is the last part of Phira's suggestion on how to deal with multiple unrelated questions in a single post.
Comment: I consider removing substantial parts of a post as over-editing.
Comment: @5PM: My view is that the reason over-editing is harmful is because it may change the meaning of the post and result in a different question being answered than the one intended by the asker. This is not likely to happen in this case. But I can see that the rest of the community does not share my enthusiasm for this solution.

Will split question feature be useful?


Data representation and bit/time complexity

Question: I have a simple technical question on multiplication of finite bit words. Say the number of bits of words that need to be multiplied is $O(\log{M})$ and say an hypothetical algorithm uses $O(\log{M})$ intermediate words of size $O(\log\log{M})$ bits (doing simple addition and modulo-$2$ operations for $O(\log{M})$ times on these $O(\log\log{M})$ bit words) and producing the final output of $O(\log{M})$ bits, would that be an $O(\log{M})$ bit/time complexity or an $O(\log{M}\log\log{M})$ bit/time complexity algorithm? I looked on literature and I could not identify the exact notion/relation bit time and bit space complexity of such algorithms. Atleast it was not clear to me.
Answer: Your algorithm has a time complexity of $O(n \log n)$.
Your algorithm uses $O(\log M)$ intermediate words each of size $O(\log \log M)$. Thus, the algorithm writes up to $O(\log M \log \log M)$ bits, taking $O(\log M \log \log M)$ elementary bit steps. Since the complexity is measured based on the input size, which is $\log M$ in your case, it has a complexity of $O(n \log n)$ [to multiply two words represented by $n$ bits].
Further note that since $O(.)$ only gives an upper bound on the asymptotic worst-case runtime, it is possible that your algorithm is actually faster, ie, the bound was not tight. For example, the algorithm could use just 1 intermediary word of size 1, which would make the algorithm be in $O(1)$.
Comment: How about using only variable portion of the $O(\log{\log{M}})$ bits at each step. Would that also lead to reduction in complexity of the complexity is still on the absolute word size?
Comment: I am not sure if I understand your last comment.
Comment: say if $M=2^{2^{k}}$. Then, it may be possible all the intermediate words of size $k$ do not use all the bits. If we know, the pattern ahead, we could in run-time change the word sizes we work on.
Comment: "....reduction in complexity OR does the complexity is still based on the absolute word size?"
Comment: Sure. You can write a different algorithm that only works on your restricted input, and just rejects input not of the restricted form. This different algorithm might have a different complexity, of course. However, complexity is generally meant to be worst-case (unless stated otherwise). So, considering your original algorithm: even though it might have good cases (where it is faster), in worst case it might use up $O(\log M)$ many words of size up to $O(\log \log M)$ bits.


18' header beam installation for single story room addition

Question: Im expanding my 28' wide single story composite shingle  home.  I want to come out perpendicular off 1 plane of the roof to expand master bedroom, and then remove
the wall.  The foundation is crawl space with peer and beam foundation. Im installing an 18' 14x3.5 psl beam above the wall being removed that will have the 2x6 rafters and 2x6 ceiling joists nailed to the face.  Im in sf bay area with no snow load. The beam will rest on two opposite 90 degree corners of the foundation peer.  My question is do i need to reinforce the peer foundation at those corners to accomodate the load created at the peer and beam foundation corners as a result of removing the wall under beam.  I believe there may be 6' concrete columns under the concrete beam at the corners.
Answer: You need to go to your city building department and pull a permit. They usually have a code engineer who tells you what you need to do in detail.
If your soil is ok and you are not in a hillside, it should not be too complicated.
They expect not only foundation and columns modifications, but also a plan of addition of some shear walls or some kind of lateral load resisting premanufactured wall such as "Simpson Shear Panel" with its required new foundation to remedy the loss of lateral support due to removal of your wall.
You may ask at the plan-check desk for their Type-5 remodeling handouts and approved test data sheet on the types of these premanufactured shear walls and their wind and seismic ratings.
Or else they ask you hire an engineer, and they may even ask you to upgrade the existing home up to code if the addition is bigger than their limit which triggers code upgrade.


Replace CH340 With FTDI

Question: I have built a arduino midi octapad with a Clone of arduino nano that contain a ch340 chip but hairless midi says FTDI driver doesn't installed i installed that driver but it still show that error so can i replace the ch340 chip with a FTDI chip to resolve this Problem... ?
Comment: You can't just take one chip off and put another on. The two are *very* different things. Like taking a boot off and trying to put a glove on your foot instead. You could remove (or disable) the CH340 and connect an FTDI cable or dongle to the TX/RX pins though. Would that solve the "problem"? Maybe - who knows? What's "hairless midi"?
Comment: yes ... install an FTDI  chip to resolve the "no FTDI chip installed" error
Comment: Personally I wouldn't bother messing with it. I'd just choose a microcontroller with a native USB connection that is capable of being programmed to appear as a USB MIDI device.
Answer: When you search for "FTDI" in one of the hairless-midiserial repos on github (I looked at this and this one), you find what looks like your error message (though you didn't actually put it in your question:
<code>./src/PortLatency_win32.cpp:        emit debugMessage("FTDI drivers don't seem to be installed. Not attempting any FTDI latency tricks.");
</code>
Also the repos have a class in PortLatency.h with the description:
<code>A simple class to manage latency reduction of FTDI-based serial ports.
</code>
This gives us some information:

The message above is not an error message, but a debug message. It might work despite not having an FTDI
The class description suggests, that the program wants to use some tricks to reduce the latency in the communication. These tricks seem to be FTDI specific. When the above debug message appears, these tricks are not used. Thus your performance may be significantly worse than with an FTDI chip. Also one of the repos has an open issue about problems with the CH340, which states, that it just doesn't work correctly. It was updated in May and still has no solution. I would not bet on getting help there. (Also the ground repo, that the other was forked off, wasn't updated since 5 years.)
You cannot fix that debug message by installing the FTDI drivers, because you don't use an FTDI chip.

As we are on Arduino SE here, we cannot really help you with that program running on your PC.
Of course you can use an extra FTDI chip/board and connect it to the RX and TX lines of the Arduino (not using the CH340 USB serial chip on the Arduino itself). But I support Majenkos comment about just migrating to an Arduino with native USB connection (means the USB communication is done by the Arduinos microcontroller directly, not by an extra chip) (for example the Micro, but there are a lot more Arduinos with native USB). That enables you to manipulate the type of USB connection, thus you can let the Arduino directly appear and work as an USB midi device. Then you don't need the hairless-midiserial program anymore.

Replace CH340 With FTDI


Lost the appcenter in Loki

Question: I lost the app center in loki after doing sudo apt-get autoremove
i cant seem to locate the file  or the app.
A correct name of the package might help me install it
Answer: Its just appcenter I verified with dpkg -L appcenter and looked in synaptics where it also shows up as appcenter.
Answer: I can't figure out how apt-get autoremove had anything to do with the disappearance of appcenter.
The man-page for apt-get claims the autoremove command " is used to remove packages that were automatically installed to satisfy dependencies for other packages and are now no longer needed."
Researching in the web one can see some users that reported problems by using apt-get autoremove though.
If appcenter has been uninstalled anyhow, you should type in terminal:
sudo apt-get update
sudo apt-get install appcenter

Lost the appcenter in Loki


Facebook update like feature

Question: I want to implement a Facebook updates(user action and notifications) on my web application as well. I am using LAMP. Should I make a db table where I store duplicate data or should I make calls to different tables to show user his updates.
Is there a better way to do this.
For Example: When someone comments on user's profile then that should also come in his updates. when some one comments on users's profile this is stored in comments table. There are many functions like this which need to be captured in updates.
Answer: I'd say two tables
<code>Action = {id, type_id, details, user_id}

ActionTypes={id, name}
</code>
But it's really hard to to be specific since you don't provide a lot of information on what you want to do exactly
Answer: By far the easiest way to do it would be to denormalize it.  Put all of your messages/notifications/whatever into one table and query that.  Think of it as being similar to an "inbox" for your users.
Answer: I am in the process of doing this on my social network, currently my site has user bulletins but I am changing over to the web 2.0 actions type, so I am basicly going to have the same thing you mention but mine is much more complex because mine will only show actions of users that you are a friend of.  I am always open to suggestions on improving this performance as it requires JOINS and such to only show recent activity of friends instead of all users
Answer: I'd say it depends on wether you anticipate growth in actions that will be reported in your feeds, and wether you want to be able to build on these actions and search/sort/link/interact with them.
If don't care about extending them, I'd say use the denormalized approach that Matt Grande suggested.
If you want to be able to easily filter, sort and extend, than normalize anything you'd have interest in changing later. An action 'Publisher' could have a name, icon, and the 'Actions' could just be a string with links. The real question is what do you want the feature to do, and how will you and your users interact with it?

Facebook update like feature


High frequency model of transistor AC ground AC input

Question: When creating the high frequency model for transistor circuits, certain capacitances arise. A lot of them are often in parallel to one another(so they add up) or grounded on both sides(so they get erased). If a capacitance has its one end to Vin (AC input) and the other on a random node, should I consider Vin as AC-GROUND, and merge it with other capacitors that go from the random node to AC-GROUND? I saw Behzad Razavi doing it in an online course but I cant't find sources to back it up. Thanks!
Answer: Vin may have a source impedance internally but an ideal voltage source is 0 ohms so it is an AC ground.


How to solve simultaneous two variable system

Question: My maths knowledge is rusty and need some help in brushing it up. I tried to google around could not get what i am looking for
How to solve the below equation $x + y = 6$ and $x^2 + y^2 = 20$
Help is greatly appreciated
Answer: The easiest way for you probably substitution.
Since $x+y=6$, $y=6-x$. Therefore, substitute it into the other equation, you get
$$x^2+(6-x)^2=20$$
$$x^2+x^2-12x+36=20$$
$$x^2-6x+8=0$$
$$(x-2)(x-4)=0$$
Therefore, the two roots are $2$ and $4$.
Note that $x$ and $y$ are interchangable, you get two pairs of solutions
$(x,y)=(2,4)$ and $(x,y)=(4,2)$.
Comment: wow.... thanks...!!!!
Answer: Start with the simpler equation, $x+y=6$, and solve it for $y$ in terms of $x$; you get $y=6-x$. Now substitute that value of $y$ into the other equation to get
$$x^2+(6-x)^2=20\;.$$
After you multiply out the lefthand side, you have
$$x^2+36-12x+x^2=20\;,$$
and collecting all terms on one side of the equation leaves you with
$$2x^2-12x+16=0\;.$$
You might as well simplify by dividing through by $2$:
$$x^2-6x+8=0\;.$$
At this point you can either invoke the quadratic formula or factor the quadratic to get
$$(x-2)(x-4)=0\;.$$
A product of numbers is $0$ if and only if at least one of the factors is $0$, so the solutions to this equation are $x-2=0$ and $x-4=0$, i.e., $x=2$ and $x=4$. Recall that $y=6-x$, so the solutions to the original pair of equations are $x=2,y=4$ and $x=4,y=2$ (and you can of course check that both are correct by substituting them into the original equations).
Answer: Hints:
$$x+y=6\Longrightarrow y=6-x$$
And now substitute in second equation:
$$x^2+(6-x)^2=20\Longrightarrow  x^2-6x+8=0\iff (x-4)(x-2)=0\ldots$$
Answer: $$
x+y = 6 \Longrightarrow x=6-y
$$
Thus:
$$
(6-y)^2 + y^2 = 20 \Longrightarrow 16-12y+2y^2 = 0 \Longrightarrow\\
8-6y + y^2 = 0 \Longrightarrow
(y-4)(y-2)=0\\
$$
Can you take it from here?
Comment: Thank you for the suggestion
Comment: @linuxdeveloper No problem. welcome to math.SE
Answer: $(x+y)^2=36$
$x^2+y^2+2xy=36$
$x^2+y^2=20$
Therefore, $xy= 8$
There are four possible pairs $(4,2)(-4,-2)(-2,-4)(2,4)$ , Since $x+y=6$ Only the $+ve$ pairs are the solution.


Will vim .bashrc command create new bashrc file? How can I remove them?

Question: I used vim .bashrc to open my bashrc file, but I forgot to go to the home directory. I think this command have created several new bashrc files, should I remove those files?
Comment: You already have an answer, but my tip is to use `vim ~/.bashrc` so you don't have to bother about which folder you reside in.
Answer: Having multiple .bashrc files in different locations will not cause any issues. The one in your home directory is the only one that is loaded when you launch bash. You may want to delete them however to avoid confusion if others use your system/server.
You can use rm .bashrc after you have changed directory to the directory containing the .bashrc you accidentally created using cd <location of extra .bashrc>.
Note: Vim will not create a file unless you exit with :wq.


Outlook 2010 (purchased copy) Reminders alerting to Days in the future

Question: I purchased my Outlook 2010 via Office 2010.  Recently, the Reminders have been alerting me to things that are going to be due in the next several days or weeks.  Previously, it only alerted me to something that was coming up in the near future or was over due.  Any idea how to get it to stop telling me about something that is coming in two weeks?
Answer: File > Options.. In dialog box open Calendar tab. There is a setting "Default Reminders". It's default is 15 minutes. But maybe you accidentally changed this to 4 days, 2 weeks or something else...
Comment: thanks guys.  it seems to be okay now.  i have the reminders set to 15 minutes.  if it comes up again, i will check to see what the reminders are set to.  i appreciate your help!  happy new year!! chip
Comment: if this was your solution please accept the answer so the question will disappear from unanswered questions list.
Answer: What did you set under "reminder" on the create appointment window? (Middle top of screenshot)


Is there a native PHP class/library that supports fill_form with xfdf?

Question: First, I have researched this on SO and Google already. In fact, based on this, I'm pretty skeptical that what I need exists. I'm almost at the point where I might give up the next 6 months of my life to write something from scratch, since it seems obvious that everyone wants a server-side form filler native to PHP.
Okay, sorry for the rant...
Here is my situation:
1.I need to deliver pre-filled PDF forms to my users.
Because the form is behind cookie-based authentication, Adobe Reader won't open the xfdf, but instead passes the task along to the browser. This is an issue for Linux users and other users who don't use Adobe Reader as their PDF reader.
Oh, and Adobe hasn't written a 64-bit plugin for Snow Leopard yet, so a third of my users have to change Safari to run in 32 bit mode every time they print this form.
Given the above, delivery of the PDF already filled in so that it can be printed in Preview, Foxit, etc, is steadily becoming the most obvious solution.
2. I can't use pdftk
This is a bit silly, but since pdftk is ancient and requires gcj to compile the outdated version of itext that it uses, I can't install pdftk on my host machine. The server doesn't have gcj, and I'd rather avoid requesting that it be installed for this one case.
Also, even if I could install pdftk, I can only do passthru() and other command-line operations via CGI, which I'd also like to avoid.
3. My host currently does not have PDFLib installed,
so I can't use the PDF extension in php. Not that it offers this feature, but I thought maybe it could be used to add the fdf dictionary to the generic form, the same way that itext/pdftk does.
I thought all was lost until I learned about TCPDF and FPDF. It looks like TCPDF has the stronger track record, and more features, but I can't find anything on Google or their documentation about server-side form filling.
If this isn't already obvious, I don't need a library for generating FDFs or XFDFs. I already have that down. But it is proving not to be enough for my users who simply want the combined product.
So I guess my questions are:

Is there a pre-built method for outputting a new PDF that is the generic form with the data from an XFDF filled in?
If not, is there a work around that doesn't entail simply writing in the values on top of the form fields (as opposed to within the fields)? Writing the values on top of the fields means that the javascript won't validate the values and that I'd need to manually change the stream values every time.
If no to both, is there a port of pdftk I haven't found yet that works with PHP and doesn't simply call the binary via command line?

Any help with this is greatly appreciated. If anyone wants to volunteer to help me make such a library, let me know, I'm already hard at work trying to learn PDF syntax, just in case.
Comment: Have you found an answer for this? I am looking for the exact same thing. any luck?
Answer: TCPDF allows delivering forms pre-filled. Please checkout their example at - http://www.tcpdf.org/examples/example_014.phps , especially the date field and radio buttons in it.


Is alumni success a valid parameter for selecting a group?

Question: I will be starting my Masters degree and intend to be fully committed to working on interesting problems with a lot of impact. I have a few groups in sight which seemingly work on very important problems and publish in major conferences but looking at the 'alumni' section on their website, I haven't noticed MS alumni getting into top PhD programs. Does this say anything about the group's quality or could it be just because of the students?
Comment: Probably, but not necessarily.
Answer: It is a valid parameter, but not the only valid parameter. It's absolutely justified to ask, and consider, "Where did people in this group go when they were done?"

I haven't noticed MS alumni getting into top PhD programs. Does this say anything about the group's quality or could it be just because of the students?

You need more information than just "did they get into top PhD programs" - unless a research group is very large, it's likely that any patterns you see in the fates of MS students will be the result of stochasticity. For example:

Are they ending up in private industry? For many people, this isn't a failure, but a success. A group I was in sends many of it's graduate students onward to jobs, and this is considered a success by all involved. Masters programs are not just one step in a PhD conveyor belt. The same is true for "R1 Tenure Track Positions" etc. Many people don't end up taking what is conventionally considered the "brass ring" of their track because they don't actually want to.
Did they want to go to a top tier program and couldn't, or did they not want to? These are two very different things, and will be easier to assess by talking to members of the group, rather than just browsing their alumni page.
Is their alumni page actually accurate? Don't ever assume academic web pages are fully up to date.

It's a valid parameter consider when weighing choices, but I believe it would be a bad idea to eliminate a potential option simply because of their alumni page. You should also look at individuals. Where did the people who presented those important papers end up? Is there someone "like you" who had the trajectory you did? If not, it's worth talking to them about.
Answer: You have two slightly different questions. Some groups/programs may prepare MS students for jobs in industry and other for PhD programs. This tells you little about the quality of the groups. What this means is that asking

Does this say anything about the group's quality or could it be just because of the students?

is not the same as

Is alumni success a valid parameter for selecting a group?

Trying to infer the quality of a program/group from where students go is likely not useful. Choosing a group/program based on what it will prepare you for is very important. That said, just looking at where past students have gone, is not all that informative. Asking the PI how he can help prepare you for a PhD program is going to be much more informative.
Comment: I disagree. If hardly anyone from this group goes on to do what OP wants to do, then either they've tried and failed--in which case it's not a good group--or they haven't tried--in which case it's likely not a good fit for OP's career goals. Getting educated/prepared for the next step isn't enough. You also have to make it to the next step.
Comment: @emory which is why I suggest to ask the PI. If a PI at Harvard can explain why his group would prepare you for being a General and help you climb the military ranks (e.g., the PI went to Med school with the Surgeon General of the Army and they have a project that they are interested in collaborating on), then it might make sense over a group at West Point for which the PI's interests are only peripherally related to military interests.
Comment: @user37208 consider a group whose research is very in demand by industry such that students get high paying job offers, this doesn't mean the group cannot prepare you for a PhD.
Comment: but it also doesn't mean it CAN get you into a good PhD program. In some fields such "industry pipelines" are considered less prestigious. Which might not be the case here, but OP has no real way of knowing if it is. It's inherently riskier than a program with a good track record of PhD program placement.
Comment: @StrongBad if you want to become a general, prefer West Point over Harvard.  Harvard is an excellent school, but West Point alumni have a better record at making general.


Guide to using Sphinx with PHP and MySQL

Question: I'm looking for a complete guide to using Sphinx with PHP and MySQL.  I'd like one that's a bit simpler and easygoing than the one provided on the site.
I'm looking for a few concepts on how exactly it all works.
I have a server with PHP, HTML, other data and a MySQL database. How would I go about setting up Sphinx to power the search and results being returned?
I'd like to be able to pass my search terms to my PHP script and have it deal with Sphinx and return the data.
P.S. I'm also open to suggestion regarding any other alternatives to Sphinx.
Answer: I came across this post but didn't find an answer I wanted to see. So here is my Quick Start Guide:
1. Install Sphinx
On Mac with Homebrew:
brew install sphinx

On Amazon Linux (CentOS) with yum:
yum install sphinx

2. Create Sphinx config
Sphinx comes with config template. Look for sphinx.conf.dist in the configs directory:
On Mac installed with Homebrew:
/usr/local/Cellar/sphinx/<sphinx version>/etc

On Amazon Linux installed with yum:
/etc/sphinx

It is pretty straightforward but might contain too many settings for a newbie. In such case you can use this simple config:
source TestSource {
    type = mysql
    sql_host = <host>
    sql_user = <user>
    sql_pass = <password>
    sql_db = <db>

    sql_query_range = select min(id), max(id) from TestTable
    sql_range_step = 2048

    sql_query = select id, some_info from TestTable\
        where id >= $start and id <= $end
}

index TestIndex {
    source = TestSource
    path = /var/lib/sphinx/test-index
    min_word_len = 3
    min_infix_len = 3
}

searchd {
    log = /var/log/sphinx/searchd.log
    query_log = /var/log/sphinx/query.log
    pid_file = /var/run/searchd.pid

    max_matches = 200

    listen = localhost:9312
}

I added max_matches setting to this config because my first question after I got everything working was "Why do I always get only 20 search results?". With max_matches you can set the limit for search results number.
3. Create index using indexer
indexer --all

4. Run Sphinx daemon
sudo searchd -c /path/to/config/sphinx.conf

5. Install PHP Sphinx extension
On Mac with Homebrew:
brew install homebrew/php/php56-sphinx

On Amazon Linux with yum:
yum install libsphinxclient
pecl install sphinx

6. Query your index from PHP
$index = new SphinxClient();
$index->setServer("127.0.0.1", 9312);

$result = $index->query('some search term', 'TestIndex');

print_r($result);

In case of any errors you can get more information with the following method:
$index->getLastError();

7. Keep up to date index
To maintain an up to date index you can use two indices:

Main index, which is not updated often (once per week, month, etc)
And delta index, which updates often (every hour, 5 min, etc)

Every time delta index is re-indexed it is merged with the main index
Follow this link http://www.sphinxconsultant.com/sphinx-search-delta-indexing/ to read more about this approach.
Links I found useful:

http://sphinxsearch.com/docs/current.html
http://sphinxsearch.com/info/faq/
http://atlchris.com/1996/working-with-sphinx-search-engine-on-a-lamp-linux-apache-mysql-and-php-stack-server/
http://www.sphinxconsultant.com/sphinx-search-delta-indexing/
https://github.com/schmittjoh/php-stubs/tree/master/res/php/sphinx
Answer: I'm not too sure about a good guide but here are my steps.
a) Download and install it's quite straightforward
b) Make your first index - you need a source a location the given config is very good remember you can use a primary source to config all the main areas and then other sources stem off from that. Each source should start with the primary key and I find it works best to do key_id AS id
c) Test you index using the search
d) Start your search demon for sphinx - searchd this is what php will connect to and how it gets your results.
e) Make a function to search all indexes pass in the index you want to search and it will return the ids in an array that have matched your search
f) Make a delta and updates.
Job done - the sphinx forum is very nice and should provide you if you need any help.
Richard
Comment: It's 'daemon' not 'demon' :)
Answer: Take a look at Search Engine Extensions at php.net: http://php.net/manual/en/refs.search.php.
Answer: http://play.manticoresearch.com/ is a set of interactive courses that will walk you through different tasks people come across when using Sphinx/Manticore and how they can be solved.


Dvorak typers, how do you handle shortcuts like Ctrl-C?

Question:
Do you change the key binding in the OS to be, i.e., Ctrl-Q?
Do you manage to stretch your left hand to the C key?
Do you use right ctrl and press shortcuts with your right hand?
Answer: When I switched to Dvorak, I was using primarily Ctrl+Ins and Shift+Ins for copy/paste.  Now I use Ctrl+C and Ctrl+V and other program-specific shortcuts, but I have just learned to use them in their "weird" locations.
A similar question was asked on SuperUser, with the following answers:

Use an AutoHotKey script to remap the keys. (Link)
Use Microsoft Keyboard Creator to remap them. (Link)
Install a third-party app that will remap them automatically. (Link, Link)
Comment: On a normal keyboard, I usually use both hands, since I do a lot of touch typing and both hands are already up there.  Sometimes I do it all with my right hand, but never stretch my left.  On my work and home dev machines, I have keyboards with extra programmable keys and have mapped 3 of them to cut, copy, and paste... so in most cases I cheat!
Comment: Really you use as is? Do you strech your left hand, use right control or use booth hands?
Comment: I've been using `Ctrl`/`Shift`+`Ins`/`Del` since before Windows, so that's what I am doing still, and in doing so avoided the whole issue.
Comment: @sanfilippopablo Stretching your hand to press ctrl and the top row would be quite difficult. It's much easier to just use two hands.
Comment: I used AutoHotKey to remap Windows-C, V and Z to copy, paste and undo. Eventually I then found I was using Control-C, V and Z instead and didn't need the mapping.
Answer: macs have it built in (Dvorak - QWERTY ⌘: Temporarily changes the layout to QWERTY when you press and hold the Command key).  there is a keyboard layout for dvorak with querty shortcuts.  for windows, i use https://code.google.com/p/dvorak-qwerty/ it works well with ctrl and alt but dosen't work with the Win Key, which is not that bad.
Answer: The program AutoHotKey is what I use to map C,X, and V to their Querty origin.
Answer: On Linux, the solution that works great with some versions of Gnome on Wayland is this. It will set up all the rules on installation and will work transparently.
Previous answer:
Using Cinnamon, the following works when typing in some applications (i.e. vscode editor):

In keyboard settings, add QWERTY keyboard layout as the first in the list,
add Dvorak layout as the second

When typing text in an editor using the Dvorak layout, pressing Ctrl will still use the first (qwerty) layout.
This does not work in other applications, like Firefox browser, for example so can be pretty confusing.
Having a shortcut (i.e. Alt+Shift) for switching layouts assists in those cases.
While can be difficult at times, the advantage of this approach seems to be that it does not require additional software.
Answer: I use none of the proposed solutions: instead, I modify CapsLock so that it becomes a dead-key that I use to program various actions.  For example, when I press CapsLock and the key marked (in QWERTY)

S, this is mapped to Ctrl-X (and thus cut)
D, this is mapped to Ctrl-C (and thus copy)
F, this is mapped to Ctrl-V (and thus paste)
I, this is mapped to up-arrow
K, this is mapped to down-arrow
J, this is mapped to left-arrow
L, this is mapped to right-arrow
etc.

This is was dubbed 'Home Row computing' by Gustavo Duarte when he introduced this idea in https://manybutfinite.com/post/home-row-computing/ and then https://manybutfinite.com/post/home-row-computing-on-mac/
I'm pretty sure that this amounts for a large part of the speed I gained when typing, in addition to touch-typing.
Answer: I've written Dvertkey, an AutoHotKey script, for this.
I've been a dvorak user for sixteen years, and for years I've used the various alternative keymaps mentioned in this thread, but all of them fall down when using a number of recent incarnations of Microsoft applications, such as the Office apps and SQL Server Management Studio. They seem to ignore Windows' own keymaps when using meta keys, rendering the hybrid layouts useless. AutoHotKey gets around this to ensure I get exactly what I want in any application.
Answer: I've been using Dvorak for so long now that I couldn't imagine remapping ctrl-c and other hotkeys to be in any other location than where they are supposed to be on the Dvorak keyboard. As for hotkeys, it's much easier and more natural to just use two hands to do the combinations. Use the left hand for ctrl and the other hand for the c-key. It would be too confusing to try and think ctrl-c and then press something else.
For the occasional windows game that requires WASD, I just switch the keyboard for the duration and if that means typing QWERTY sentences in chat then I just mentally switch and type a little bit slower.
Answer: Those characters are accessible with the right control key (a bit of a stretch for the x). If you are right handed, and have your right hand on the mouse, just move your left hand to the right control key and do the key combination


Should I use cement board or green board behind the walls of a neo angle shower?

Question: I purchased a neo angle shower and I am installing it on the second floor of my house.  I have the pan down and I am ready to drywall.  which is safer to use, cement board or green board behind the shower panels?
Comment: What are you putting up on the walls?  Is this a kit with molded walls or are you tiling?
Answer: I would always use cement board in the shower area.  I would extend the cement board to where you shower unit will cover.  You can go past that point just plaster with a nice joint compound, like durabond to join to the rest of the plaster board for a permanent bond. I typically do not use green board unless you expect the wall can get wet, like a basement.  My bathroom is upstairs and my house would wash away before those walls got wet, therefore regular board is fine.
Answer: I would use Schluter Kerdi board , not green board or cement board.  This is the system to use if you want to construct a shower to last a lifetime
Answer: Always use cement board in a wet area.  Green board in the rest of the bathroom.
If you're using plastic or fiberglass panels you can use green board, but I would paint it with a waterproof membrane to insure the longevity.
You can search on the internet for names of membranes
Comment: Why? What would you define as a wet area? How far should the cement board extend? Please improve your answer with more details.
Answer: In my upstairs bathroom that has a full 6 ft. whirlpool tub and shower I used cement board throughout the tub area for the long term durability before tiling. It has held up excellently. For the basement powder room, I am just putting in a stand up shower. This will not get as much use so I used green board on all of the interior walls of the bathroom and the tile in the shower area will be installed over the green board. This shower will be used less often and I did make sure to install a good fan to evacuate the moisture. If this shower was going to see regular use I would have installed the cement board in the shower area.
My biggest concern is the interior of the green board. Although the paper covering is treated for moisture resistance as well as mold resistance, if your calking or other sealing products fail and water does find it's way into the center of the drywall, the drywall will wick up the moisture and swell. This swelling will further upset your tiles exasperating the problem. I don't think I need mention that this wicked up water is going to cause other issues that you will have to deal with as well. Which ever way you go I would make sure that your final calking is good and inspect it regularly.
Chances are you will be sitting close by anyway from time to time, so having a quick look around is not a big deal.
Good luck.
Comment: Why use green when you can use cement board?  As I recall, there is not a significant price difference.  Perhaps it is because the finishing is more demanding?
Comment: Greenboard is not an appropriate substrate for tile.


Please confirm whether the Canon 430EX can be used as off camera flash with the Canon EOS 1300d

Question: Please confirm whether the Canon 430EX can be used as off camera flash with the Canon EOS 1300d. I have been searching online and asked different Facebook groups (which non of them answered to my question) but till now it is still an answered question. Thanks in advance for the help.
Comment: Could you be more precise about what you mean by "off camera flash"? Possibilities include 1) not physically mounted to the camera but connected by a bit of wire 2) optical triggers 3) radio triggers 4) something else.
Comment: Which 430EX? The current version (430EX III-RT) can be radio-controlled (in addition to the optical control of the previous versions) so this opens your options...
Comment: This question might help [Do Canon 430EXII speedlite flash units have an optical slave function?](https://photo.stackexchange.com/questions/43363/do-canon-430exii-speedlite-flash-units-have-an-optical-slave-function)
Comment: @xenoid The 430EX is the 430 EX. The 430EX II and 430EX III-RT are not the 430EX. If the OP meant 430EX II or 430EX III-RT when naming the 430EX, that needs to be corrected. But as the question now stands, it's specifically asking about the 430EX, not the 430EX II or 430EX III-RT.
Answer: No, the Canon 430EX can not operate as an off camera flash with your EOS 1300D, unless you add some extra equipment.
More advanced cameras like the 600D, 700D, 80D, 90D, etc. can use the built in, pop-up flash to trigger the 430EX, but your 1300D can not.
You will need to buy a master flash like the 580EX II or 600EX.
Answer: Since the pop-up flash on your 1300D can not be used as a Master Flash in Canon's E-TTL optical wireless flash system, you can not fire an off camera 430EX or 430EX II using your EOS 1300D without additional hardware.
To use a 430EX or 430EX II off camera with your 1300D, you have several options:

Use an on-camera TTL Master, such as a Canon 580EX II, 90EX, or third party flash that is capable of being used as a Canon E-TTL Master Flash
Use a Canon ST-E2 near-infrared flash Controller (if you can still find one) or third party clone (if you can find one)
Use a Canon compatible off camera shoe cord, such as the Canon OC-E3 or clones which are available in a wide variety of lengths
Use a set of radio triggers that are compatible with Canon E-TTL if you want to do more more than tell the flash when to fire
Use a set of cheap manual radio triggers to fire the flash, which must be set in manual mode using the flash's own control panel

With the first two options, the Master Flash or Controller would be placed on the camera's hot shoe and the built in optical receiver on the 480EX or 480EX II would respond to the output of the Master Flash or Controller.
With the last two options, the transmitter would be placed on your camera's hot shoe and the receiver's hot shoe would be connected to the flash's hot foot.
Answer: Not without additional gear.
Canon reserves a flash "master" for the built-in pop-up flash for the ###D/T#i series of digital Rebels (T3i and later) and higher-end camera bodies. The SL/T### and ####D/T# line bodies do not have this capability.
And Canon's EX-designated and EL series flashes can all be "slaves" in the system, do not have simple optical slave capability that works with any flash burst (e.g., S1/S2 "dumb" optical slave modes).
To use a 430EX/430EX II/430EX III-RT off-camera with a 1300D, you need to use an appropriate "smart" optical "master" unit on the camera hotshoe (ST-E2, 550EX, 580EX, 580EX II, any of the RT or EL models).  Or, an appropriate radio transmitter (RT-compatible for the built-in receiver on the 430EX III-RT; e.g. ST-E3-RT) and matching radio receiver on the foot of the flash (if, say, you go with 3rd-party triggers).
See also: What features should one look for when selecting a flash?


Does the cohomology ring of a simply-connected space X determine the cohomology groups of ΩX?

Question: One could try to apply the Eilenberg-Moore spectral sequence to the pullback diagram • → X ← •, obtaining a spectral sequence TorH•(X, R)(R, R) => H•(ΩX, R), but could there be differentials or extension problems which differ for different spaces X with the same cohomology ring?
Answer: Well, simply connected Lie groups tend to have cohomology which is an exterior algebra.  For instance, SU and X = S3 x S5 x S7 x ... have the same cohomology ring.  But ΩSU=BU, and ΩX isn't.  Since each H∗ΩSn is a divided power algebra, while H∗BU is a polynomial algebra, this should provide a counterexample, I think.  I'm guessing this shows up in the Eilenberg-Moore spectral sequence as a non-trivial extension problem.
Comment: Nice, too bad I've reached my daily vote limit!
Comment: This doesn't give an example for what Reid asked, though because the cohomology _groups_ are still the same.
Comment: Oh okay.  I interpreted his remark about extension problems as being about *multiplicative* extensions, rather than group extensions.
Comment: Yes, I intentionally worded my question the way I did, but it wasn't because I knew of an example for the version with "cohomology ring" in both places (it was because I expected the answer to the question in the title to be no even as stated here).  This example is very nice and memorable, thanks!
Answer: Tyler's comment to my earlier answer seems to give a solution; he suggests comparing the space $T=(S^3\vee S^3)\cup\_{[x,[x,y]]} e^8$ with a wedge $S^3\vee S^3\vee S^8$.  It's probably easier to think about homology with the Pontryagin product.  Homology of loops on on the wedge will be a tensor algebra on classes in 2,2,7 (since it's loops of a suspension).  The homology of loops on Tyler-space $T$ should differ in dimension 6: the homology class [x,[x,y]] will be 0 (where x,y are now the homology generators in dimension 2), "killed" by the new attaching map.  So H_6 (and thus H^6) of the two spaces have different rank.
To make this explicit, we have $S^7 \xrightarrow{f} X \rightarrow T$, where X is the wedge of two 3-spheres.  The restriction of $\Omega f: \Omega S^7 \to \Omega X$ is a map $S^6 \to \Omega X$ adjoint to f, and on homology this hits the homology class corresponding to the [x,[x,y]].  The result follows because $\Omega S^7 \to \Omega X \to \Omega T$ is null homotopic.  (I'm basically using the Hilton-Milnor theorem to understand $\Omega X$.)
Answer: Complementing the other answers in this thread: while the cohomology ring of a simply connected space does not determine the cohomology of the loop space, the rational cohomology viewed as an $A_\infty$-algebra does.
Namely, the cohomology of any $A_\infty$-algebra $A$ over $\mathbf{Q}$ (in particular, of any differential graded algebra) carries an $A_\infty$-structure such that there is an $A_\infty$ map $H^\ast(A)\to A$ inducing the identity in cohomology; this $A_\infty$ structure is unique up to a non-unique isomorphism. See e.g. Keller, Introduction to A-infinity algebras and modules, 3.3 and references therein. By taking $A$ to be the rational singular cochains of a topological space $X$ we get an $A_\infty$-structure on $H^\ast(X,\mathbf{Q})$.
To each $A_\infty$ algebra $H$ there corresponds a bar construction, which is a free differential coalgebra on $H$ shifted by 1 to the left (see e.g. 3.6 of Keller's paper mentioned above). It is an old result of Kadeishvili (see MR0580645) the that if $H$ is the cohomology of a simply-connected space $X$ with the above $A_\infty$-structure, then the cohomology of the bar construction is the cohomology of $\Omega (X)$.
This also explains why we should expect a negative answer to the question as it is stated: all components of the $A_\infty$ structure on the cohomology participate in the bar construction, and not just the product.
Answer: It seems hard to come up with an example in which the cohomology groups of the loop spaces differ.  I imagine something like the following should produce an example, in the context of rational homotopy:
Find two rational commutative dgas A and B whose cohomology algebras are the same as rings, but which have different massey product structures.  Then I think it's likely that the derived tensor products Q ⊗A Q and Q ⊗B Q will have different cohomology.  I can't find an example small enough that I'd like to compute it, though.
Comment: You should be able to attach an 8-cell to S^3 wedge S^3 to kill a Whitehead product [x,[x,y]] of the generators x,y of pi_3 in rational homotopy.  The cohomology algebra is then the same as S^3 wedge S^3 wedge S^8 ignoring secondary operations, but the underlying DGA is different.
Answer: My feeling is that Charles is on the right track with the answer above.  But rather than looking for a counterexample, I think we should have a go at correcting the original question.
Now I'm not quite sure over which rings the next statements work, possibly only over rings over a field of char 0.  Perhaps someone knows the details better than I, but to make it work will probably require working with simplicial algebras as these carry a model structure over any ring.
The cochains of X carry a dg-algebra structure A.  Since ΩX is the homotopy pullback of • → X ← • and taking cochains should preserve the relevant (co)limits (can someone help me here), then the cochains ring of ΩX is the homotopy pushout of k ← A → k, that is, the derived tensor product.  We can then take cohomology.
For the next bit we probably do need characteristic 0.  The cochains ring will be rather large, so to keep track of things we could take the cohomology, but remember the higher operations.  Then as an infinity ring the cohomology H(A) will be quasi-isomorphic to A (which isn't necessarily true if we don't remember the higher operations).  Then with that in mind we can calculate the derived form of k ⊗_H(A) k.  Its cohomology should be the cohomology of the loop space.
It would be nice to have a counterexample though, how about complements of links, the cohomology rings aren't so bad to calculate (only depending on the number of links over the rationals at least).  What about the loop spaces?


How to power an attiny from a solar panel?

Question: I'm using an attiny microprocessor that uses around 6mA plus another 3mA for the LED. It periodically runs a servo ( Tower 9G ) that according to a few source online draws 120 - 200 mA ( for around 6 seconds ). (200 x 6)/3600 gives me .33 mAh. If I add the two together, I get a draw of 10 mAh a day. Now lets say i had a tiny battery, something like this one. that has 100 mAh. If i then add a solar panel like this that is capable of providing 45 mA in peak sun, It sould ba able to provide more than ample power to keep the battery fully charged indefinely ... are my calculations correct? or am I missing something?
Answer: You power budget looks ok. But the battery says:
<code>"very important that you only use a LiIon/LiPoly
constant-voltage/constant-current charger to recharge"
</code>
and
<code>"Never charge or use unattended."
</code>
The battery claims to have overvoltage protection, but it's not clear how that is achieved. It may overheat and catch fire....particulary as it says that
<code>"the batteries we sell do not have thermistors built in"
</code>
so-- don't burn your house down.
Answer: Lithium-Ion/Lithium-Polymer batteries must be handled and used with extreme care.
They are sensitive to over-charging, over-discharging, current draw above what they are rated for, temperature, mechanical force (eg. puncture to the soft casing), trickle charging... just to name a few.
Even if they have built-in protection circuitry, it is always best to have a solid understanding of the risks and safety precautions involved.
Also, with respect to charging, there are specific profiles that must be followed. Parameters will be given by the battery manufacturer for constant current and constant voltage levels required. A compatible charge circuit is absolutely required. Unless you have in-depth experience with this, just buy a reputable one, pre-made. The site your battery is from sells them.
45mA from your solar panel fits within the charge current listed in your datasheet, but that's in ideal light conditions. You may still run into problems of insufficient current from the panel. This could result in trickle-charging your battery, which can be damaging over a long period of time. If the charger protects against this, you could still run into intermittent/short charge periods, which is not ideal.
To learn more about Lithium Ion batteries, I would recommend doing some research online. Places like Battery University have a lot of good information.
Also consider using a different battery chemistry. For example, NiMH batteries are a lot more forgiving.
Otherwise, your choice of battery capacity should be sufficient for your application.
Answer: Use a MCP73831 li-ion charge controller. It is cheap, easy to use and will protect your battery against overcharging. Just make sure that the peak voltage from panels will not exceed chip's max input voltage when the battery is full.
Panel -> MCP73831 -> battery -> MCU


Is it possible to guess the length of a password by sniffing TLS packets?

Question: In this answer, the author states that it is possible to tell the length of your password, by sniffing your TLS packets. Is this true, and how would this be done in practice?
Comment: @WhiteWinterWolf Can you explain further how block ciphers hide the length of the input message? That does't seem like an obvious statement.
Comment: I suppose that such kind of leak would be greatly diminished by the use of block ciphers, which is now quite a standard for most TLS uses.
Comment: @MikeOunsworth: You can see my new answer then :)
Comment: Right, so without knowing how much padding was added, you can only deduce the length of the password up to the closest block. Fair.
Answer: All ciphers are not made equal regarding this possibility. It greatly depends whether we are dealing with a stream cipher or a block cipher.
Stream ciphers (like RC4) take a flow of n plain-text characters as input and produce a flow of n encrypted characters as output.
With such ciphers, adding a single character to the password (which acts as the plaintext data here) will make the cipher text on character longer, thus allowing a really good guess on actual password length.
Block ciphers, on the opposite, will only operate on blocks of fixed size (128 bits for AES for instance, which means 16 bytes), the last block being completed with padding.
In such case, adding a single character to the password will never make the cipher text one character longer. If it happens that the password length is long enough to fill the last block (it may require from 1 to 16 characters) then a supplementary block of cipher text will be produced, but with no mean to know how much of this new block is actually used, and therefore without any precise information about the exact password length (a 16 characters approximation does not seems reliable as long as passwords are concerned...).
Fortunately, block ciphers are the most used ciphers for common TLS applications where the data is already handled by blocks of finite length. An HTTPS request for instance has a clear begin and end and do not suffer that much from the up-to 16 bytes padding overhead caused by block ciphers. Therefore, most web servers and browsers nowadays prefer to use block ciphers than stream ones (if stream ciphers, RC4 mainly, are not disabled altogether).
Stream ciphers, having more limited cryptography properties, see their usage being restricted to very specific use-cases, mainly situations where the data appears more as a flow than well defined blocks. Network level cryptography (WPA2, IPsec for instance) are good example, but this may also affect application-level cryptography as well (VoIP application for instance can use SRTP which relies by default on AES used in stream mode). In such cases it would neither be optimal to send a whole block to carry a single effective byte nor to try to hold-on the communication in the hope that more data will come to fill the cryptographic block. A stream cipher will just follow the communication flow as it goes on.
Under some conditions, a block cipher can be used in stream mode (when used in CTR mode for instance). Most applications show a list of the enabled cipher suites in their order of preference. This cipher suites indicates the encryption algorithm used, accompanied by the operation mode whenever applicable. Here are a few cipher suite examples to make things clearer:

ECDHE-ECDSA-AES128-GCM-SHA256: This uses AES in Galois/Counter Mode (GCM), this remains a pure block cipher,
ECDHE-ECDSA-AES256-SHA: This one does not clearly show an operation mode, it is an OpenSSL notation corresponding to  the standard notation TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA assuming Cipher Block Chaining (CBC) by default, this is also a pure block cipher,
TLS_RSA_WITH_AES_128_CCM: This is a standard cipher suite showing AES used in Counter with CBC-MAC  (CCM) mode, derived from CTR it is a way to use a block cipher as a stream one,
ECDH-RSA-RC4-SHA: This one does not use AES, it uses RC4 in place which is by definition a stream cipher (while block cipher can be used as stream ones, the opposite is not true: you cannot turn a stream cipher into a block one, so there is operation mode indication for stream ciphers).

This should allow to check the kind of encryption used by your software:

When using only stream cipher, the length of the encrypted message can be easily known (so if the password length is the only variable of an otherwise known message it becomes easy to deduce the actual password length, unless the password has been hashed before being sent as Mike Ounsworth rightly outlines in his answer),
Using only block cipher will reduce this to some approximation, possibly excluding any practical use for such a small information as a password,
If you cumulate the two (for instance accessing an HTTPS (assuming block cipher) website over a WPA (stream cipher) protected Wifi network) you keep the advantage of the block cipher making the guessing a large approximation.
Comment: Interesting, but I read that in TLS 1.2, there is a CCM mode of operation (https://en.wikipedia.org/wiki/CCM_mode). Quote 'CCM is effectively a stream cipher'. So in this mode it would be possible to guess the length? Reading further, this would mean that in WPA2 and IPSEC the length could be guessed?
Comment: @Michael: I have completed my answer, do not hesitate to tell me if it does not fully answer your questions or you still have some remaining doubts :).
Comment: Thanks, so cross-linking to http://security.stackexchange.com/questions/76993/now-that-it-is-2015-what-ssl-tls-cipher-suites-should-be-used-in-a-high-securit , this attack would almost never work in practice (if the server is configured well of course).
Answer: Good question. As far as I know, there's no general way to do it, so I'm curious to see what others post. I know that it is possible to do in some cases if you know how the protocol works.
It's well known that encryption does not hide the overall length of the message, so if I know the protocol then I can deduce the length of your password.
For example: let's say that you're a member of www.someforum.com and I know that their login page sends login requests in the following form:
<18 byte header> + <username> + <password> + <40 bytes of other data>

Now let's say I sniff your network traffic while you're logging in and I see a packet which is 83 bytes long. Since I know your username is "Michael" (8 bytes with the trailing null), I can deduce that your password is
83 - 18 - 8 - 40 = 17 bytes, with the trailing null

Note that login pages that are worth their salt (pun intended) will do a couple iterations of hashing on the client side, so the "password" they send will always be a hash digest and therefor will have a fixed length, thwarting this kind of information leak.
Comment: @Cthulhu No, not at all, good login pages will do some hashing client-side to offload some computation, and to prevent the server from ever seeing the plaintext pwd, and then a bigger round of hashing server-side to protect against rainbow table attacks. Do both. [Here's an answer I recently gave on this topic.](http://security.stackexchange.com/a/96556/61443)
Comment: `Note that login pages that are worth their salt (pun intended) will do a couple iterations of hashing on the client side` wouldn't that require server to store password in the plaintext?


Interpretation of a real numbers through Dedekind's cuts

Question: For what I have understood Dedekind, in order to define an irrational numbers such as  $\sqrt{2}$ defines $2$ sections in the number line, one with all the rational numbers that squared are greater than $2$ and one with all the rational numbers that squared are less than $2$. Now Dedekind says that the section is an irrational number ($\sqrt{2}$). But what does that mean? The only way I could interpret it is that $\sqrt{2}$ is the number on the real line which is excluded by the $2$ cuts. Is this correct? What does it mean for a number to be a section? And if my interpretation is correct then Dedekind hasn't really demonstrated the existence of  $\sqrt{2}$ but has merely said that it is there. Do I need to consider the fact that the real line is continuous?
Answer: If we want to define irrational numbers, that means we are assuming we are only starting with rationals. Its not just that we don't know what $\sqrt{2}$ is, its that it doesn't exist yet. That means we have to actually define what that means.
Why do we want to do this? Well it has something to do with this fact that the real line is 'continuous' as you say. The problem with the rationals is that they aren't what mathematicians would call complete - this is essentially what you mean by 'continuous'. An example of this incompleteness is that we can find a sequence of rational numbers that 'converge' to $\sqrt{2}$ (although this is a strange notion, since $\sqrt{2}$ doesn't exist yet). An example would be a sequence defined by the decimal expansion of $\sqrt{2}$: $1,1.4,1.41,1.414,1.4142,\dots$.
Okay, so we've realized the rational numbers aren't quite what we want, so we need some new numbers. How do we create numbers? Well, you may recall that we can define the natural numbers by the Peano axioms, or that we constructed the rational numbers as equivalences classes of ordered pairs of integers (more specifically as partitions of $\mathbb{Z}\times\mathbb{Z}\setminus\{0\}$). Notice that with the rationals, our 'numbers' are actually sets of other numbers we previously defined (in particular, $(a,b)$ and $(c,d)$ are part of the same rational number if $ad=bc$ - usually we would write this as $\dfrac{a}{b}=\dfrac{c}{d}$).
When we define the real numbers (using Dedekind's definition), we will use a similar idea. These 'sections' are sets of rational numbers. These are in fact the real numbers. Later, when we use them in calculus or other math, we will just think of them as points on a number line, but in a rigorous definition, they are in fact sets.
Now, just to clarify, the two sets for $\sqrt{2}$ are given by $$A=\{r\in\mathbb{Q}:r\le 0\}\cup\{r\in\mathbb{Q}:r>0\text{ and }r^2<2\}$$ and $$B=\{r\in\mathbb{Q}:r>0\text{ and }r^2>2\}$$ where $A$ is the lower section and $B$ is the upper section. (Note this is slightly different than what you mentioned. The way you stated it, $-4$ would be in $B$ not $A$.) In particular, these sets 'coincide' with $$A'=\mathbb{Q}\cap\{x\in\mathbb{R}:x<\sqrt{2}\}$$ and $$B'=\mathbb{Q}\cap\{x\in\mathbb{R}:x>\sqrt{2}\}$$ I say 'coincide' in quotes, since we are viewing $A$ and $B$ as subsets of $\mathbb{Q}$ and $A'$ and $B'$ as subsets of $\mathbb{R}$. This distinction is important, because as we discussed above, $\mathbb{R}$ is a subset of the power set of $\mathbb{Q}$.
To summarize, you have the right idea in your head. The real number we are constructing with these sections is the 'missing' one. However, formally, these numbers are just sets, not points on a number line (and be careful about calling it the real line - these cuts are from the rational line!). And yes, Dedekind has 'merely said it was there' - but really this is a big deal and this is what math is all about. There was a concept that was missing from our understanding, so Dedekind defined a new one that would be useful.
Comment: So if I got it right basically mathematicians felt the need to create new numbers since the rationals were incomplete in the same fashion as complex numbers were created (and I know I'm using terms loosely) to complete the rationals. Basically the need was to obtain the totality of the numbers with infinite decimals. In order to construct these numbers Dedekind cuts the rational line into 2 and shows that there is a set between which he calls irrational number since it isn't part of either of the two cuts. These sets are actually the irrational numbers which are sets just like natural numbers.
Comment: One could also define the reals as the point which is part of consecutive cuts of the real line into smaller sections one within the other. In this case the number is a actually a point, not a set. In that case could we view a real number as the limit of the sequence of rational numbers that converge to a real number? For example for $\sqrt{2}$ could be considered as the limit of the monotone increasing sequence of all the rational (positive) numbers that squared are less than 2? Or the limit of the monotone decreasing sequence of all the rational numbers that squared are grater than 2?
Comment: Your intuition seems good. There is a bit more going on 'under the hood' so to speak (for instance, be careful, there isn't really a monotone decreasing sequence of *all* rationals greater than 2, but there are plenty of sequences of rationals approaching 2 (monotone or otherwise)).

There is a bit of a difference in the how the rationals are incomplete vs the reals. The rationals is more of a topological/analytic thing, whereas the need for complex numbers is more algebraic (i.e. how do we solve $x^2=-1$?)
Answer: Dedekind is defining the real numbers from scratch: imagine you understand what rationals are, but have no conception of real numbers. Dedekind tells you that you look at the collection of Dedekind cuts; he shows

How to define arithmetic operations on these cuts.

How to assign each rational number a cut.

And why the collection of cuts, unlike the collection of rationals, is complete in a precise sense.

Dedekind then makes a really interesting decision: he decides that the collection of cuts is the "right" object to study, and he calls Dedekind cuts real numbers. For Dedekind, "$\sqrt{2}$" is shorthand for the pair $$\langle\{x: x^2<2\},\{x: x^2>2\}\rangle.$$ Whenever Dedekind uses the term "real number," he means "Dedekind cut."
This is a really odd approach to defining real numbers - we usually think about real numbers as points, not sets in any sense. But formalizing what a real number is is extremely difficult; Dedekind observed that using set theory, we can define a mathematical object that behaves exactly how our naive real numbers behave; he then (arguably in an act of bad ontology) proposed that these were literally the real numbers.
If you like, you can view Dedekind cuts as describing, rather than being, real numbers as you say: a given cut describes the unique real not in either of its sections (or the greatest element of its left section, if such exists - this happens when the cut describes a rational). This is much more philosophically conservative; but Dedekind adopted a more ambitious position. Like it or not (and there are certainly good reasons to dislike it - see e.g. this article by Benacerraf1, which focuses on natural numbers a la set theory rather than real numbers a la Dedekind, but is still relevant), that's what's going on here, and why Dedekind is using the word "is."
1Paul Benacerraf: What Numbers Could not Be.
The Philosophical Review, Vol. 74, No. 1 (Jan., 1965), pp. 47-73.
DOI:10.2307/2183530, JSTOR
Comment: This would beg the question: how would you choose which of the Dedekind cut construction, or the equivalence classes of Cauchy sequences of rationals, or equivalence classes of "almost linear" functions $\mathbb{Z} \to \mathbb{Z}$, etc. you choose to define the real numbers to "be".  Whereas they're all isomorphic models of the axioms of $\mathbb{R}$, so in the end it doesn't really matter which model you choose as the canonical definition of $\mathbb{R}$.
Comment: @DanielSchepler Dedekind *did* argue for his specific construction: the point he made was that the information a real number captures is exactly the set of rationals it's bigger than, and the set of rationals it's less than. He viewed this piece of information as the key aspect of a real number, and he identified a real with that information. So while you're right about the choice ultimately being immaterial, it's not fair to say that Dedekind picked his construction arbitrarily; he did view it as having specific importance, and argued for this.
Answer: I think what's missing in your understanding here stems from how number systems are built in (most mainstream) mathematics. Usually, a number system is defined based on the ZFC (or ZF) set theory, where every mathematical object that we deal with is a set. Even the natural numbers are considered sets. In fact, one of the most primitive ways of building the natural numbers involves defining,
\begin{align*}
0 &:= \lbrace \rbrace \\
1 &:= \lbrace 0 \rbrace = \lbrace \lbrace \rbrace \rbrace; \\
2 &:= \lbrace 0, 1 \rbrace = \lbrace \lbrace \rbrace, \lbrace \lbrace \rbrace \rbrace \rbrace;
\end{align*}
etc. We can then extend the natural numbers into the integers, by a few methods, but basically by using ordered pairs (which are also made with sets!) to form two copies of the positive natural numbers. The rationals are then defined by using an equivalence relation on $\mathbb{Z} \times \mathbb{Z}$, where $(a, b) \sim (c, d)$ if and only if $ad = bc$. But, importantly, everything comes back to sets!
Now, we're trying to define the real numbers. We can take it for granted (because it is outside the scope of the problem) that $\mathbb{Q}$ exists and is defined. Now we want to use $\mathbb{Q}$ to define something that matches our intuition about what $\mathbb{R}$ is supposed to be (for example, we want to make it a field for which $\mathbb{Q}$ is a subfield). But, as for which sets specifically make up $\mathbb{R}$, that's up to the definition we're using.
Dedekind cuts are Dedekind's way of defining $\mathbb{R}$. Dedekind defines $\mathbb{R}$ as the set of closed, ordered intervals $I$ that are bounded above and have the property that $\mathbb{Q} \setminus I$ is also an interval. The rationals correspond to the set of such intervals with maxima, for example, $I = (-\infty, 1/2] \cup \mathbb{Q}$. (Note, $I$ is not an interval in $\mathbb{R}$, but it is in $\mathbb{Q}$).
The set $I = \lbrace q \in \mathbb{Q} : q^2 \le 2 \rbrace$ is another interval in Dedekind's $\mathbb{R}$ (this does require some proof), but one can show that it has no maximum. It's an example of something in $\mathbb{R}$ that doesn't correspond to anything in $\mathbb{Q}$.
We can also define a multiplication operation on Dedekind's $\mathbb{R}$. If $I$ and $J$ are such intervals, then one can show that the set
$$I \cdot J := \lbrace ij : i, \in I, j \in J \rbrace$$
is also in $\mathbb{R}$. If we take $I$ to be the interval in the previous paragraph (the supposed square root of $2$), then we can show that
$$I \cdot I = \lbrace q \in \mathbb{Q} : q \le 2 \rbrace,$$
i.e. the interval corresponding to $2 \in \mathbb{Q}$. So, in Dedekind's $\mathbb{R}$, the number $2$ has a square root.
Answer: Without thinking about "real numbers" at first, consider a very special type of pairs of sets that can be formed from a "universe" $U$ that has a total ordering property. That is, there exists an operator "$<$" such that for every $u_1,u_2 \in U$ either $u_1$ and $u_2$ are the same element of $U$, or u$1<u_2$ or $u_2 < u_1$; and also, the $<$ operator is transitive in that $u_1 < u_2$ and $u_2 < u_3$ together imply $u_1 < u_3$.
The special type of pairs of sets $(A,B)$ are on in which $A\cup B = U$ and every element of $A$ is less than every element of $B$ and
there is no greatest element of $A$.  That is, if $a\in A$ then $\exists a'\in A: a'>a$.  Let's arbitrarily call such a special pair of sets a "Dedekind cut" on $U$.
As an example, on the universe of rational numbers, consider any proposition $P$ about a single number that has the inherent properties that if $q$ satisfies $P$ then all numbers greater than or equal to $q$ satisfies $P$, and also that there is no rational number $\bar{q}$ such that $\bar{q}$ satisfies $P$ but no greater rational does.  Then property $P$ defines a Dedekind cut, with $A$ being all numbers that satisfy $P$, and $B$ being all rational numbers that do not.
Now comes the critical step:  You can carefully define abstract operations that map pairs of Dedekind cuts to some other Dedekind cuts.  For example, working with cuts $c_1$ and $c_2$, you can say that $q$ is in the $A$ set of "$c_1 \oplus  c_2$" if and only if $q=q_1+q_2$ with   $q_1\in A(c_1)$ and $q_2\in A(c_2)$.
It takes some care to ensure that this property does define a Dedekind cut, but it is not too hard.
So far we have not said a word about "real numbers." But after we have defined the usual arithmetic operators $\oplus,\ominus,\otimes,\oslash$ on our cuts in the universe of rationals, we might notice that there is a one-to-one correspondence between our intuitive notion of real numbers, and these Dedekind cuts on the reals, with our set operations preserving all results of the usual $+,-,\times,/$ operators.
Now comes the step that you are having trouble with:  Since these special pairs of sets can be put into 1:1 correspondence with our itnuitive notion of "the real numbers,"
we discard our fuzzy intuitive notion and say that the real numbers are these pairs of sets (Dedekind cuts).  What have we gained here?  We have put the real numbers on a solid footing without having to introduce any new axioms about arithmetic.


How do I configure Broadcom Wifi Drivers on Gobolinux?

Question: 2016-06-19 - Initial Post
I'm having trouble setting up my wifi connection on GoboLinux. I already installed the propietary broadcom drivers. The wifi module is now recognized, at least.
Using iwconfig wlan0 gives me the following output:
wlan0     IEEE 802.11bg  ESSID:off/any
          Mode:Managed  Access Point: Not-Associated   Tx-Power=20 dBm
          Retry short limit:7   RTS thr:off   Fragment thr:off
          Power Management:off

That means there must be some kind of wifi module build into my laptop. (Using Windows it works btw.)
lspci -k shows me the name of the Network controller.
04:00.0 Network controller: Broadcom Corporation BCM4312 802.11b/g LP-PHY (rev 01)
    Subsystem: Broadcom Corporation Device 04b5
    Kernel driver in use: b43-pci-bridge
    Kernel modules: ssb

The firmware is being loaded - dmesg | grep b43:
[    8.127113] b43-phy0: Broadcom 4312 WLAN found (core revision 15)
[    8.142216] b43-phy0: Found PHY: Analog 6, Type 5 (LP), Revision 1
[ 1339.940316] b43-phy0: Loading firmware version 666.2 (2011-02-23 01:15:07)
[ 1777.008290] b43-phy0: Radio hardware status changed to DISABLED
[ 1782.025291] b43-phy0: Radio hardware status changed to ENABLED
[ 2247.468296] b43-phy0: Loading firmware version 666.2 (2011-02-23 01:15:07)

I am not able to scan for existing wifi networks and also cannot connect to one. What am I missing?
2016-06-20 - Edit, Print System Information
Here is my System Information per uname -a:
Linux Arbeits-PC 3.14.2-Gobo #1 SMP PREEMPT Sat May 3 22:59:40 GMT 2014 i686 GNU/Linux

Comment: Please add the output of `uname -a`
Comment: I added the System Information (`uname -a`)
Answer: The bcm4312 is supported by the b43 driver.
Install the firmware-b43-lpphy-installer package .
Unload driver:
modprobe -r b43-pci-bridge
modprobe -r ssb

Load the b43 driver :
modprobe b43

Comment: i installed it via recipe, but i still cannot find any network.


Matching a field (exception name) on the second line in a multiline event

Question: I have multiline Log4J logs. The lines after the first are optional. The first line contains the log message and after that is the stacktrace. I want to extract the top exception class name on a stacktrace and it is the first part on the second line. An example:
2016-01-18 13:19:34,812 [myScheduler-4] ERROR com.company.framework.service.notification.TriggerServiceImpl- Hibernate operation: could not load an entity: [com.company.framework.pojo.jc3iedm.ReportingData#32300000000000565988];.
java.sql.SQLException: Connection has already been closed.
    at org.apache.tomcat.jdbc.pool.ProxyConnection.invoke(ProxyConnection.java:118)
    at com.sun.proxy.$Proxy47.prepareStatement(Unknown Source)
    at org.hibernate.jdbc.AbstractBatcher.getPreparedStatement(AbstractBatcher.java:534)

I'm interested on the 'java.sql.SQLException' part. I wrote the following grok pattern:
LOG4J_DATESTAMP %{YEAR}-%{MONTHNUM}-%{MONTHDAY} %{HOUR}:?%{MINUTE}(?::?%{SECOND})
LOG4J_LOG %{LOG4J_DATESTAMP:timestamp} \[%{GREEDYDATA:thread}\] {LOGLEVEL:level} %{JAVACLASS:class}\-%{SPACE}%{JAVALOGMESSAGE:logmessage}%{SPACE}(^%{JAVACLASS:exception})?

(^%{JAVACLASS:exception})? is the part, which should match the next line. It matches as expected on the grokconstructor.appspot.com but i can't get it working with the logstash 2.1.1 version. All other fields are extracted successfully.
This is the logstash conf file:
input {
 file {
    path => "D:/projects/ELK/localhost.log"
    start_position => beginning
    codec => multiline {
      patterns_dir => "../patterns"
      pattern => "^%{LOG4J_DATESTAMP}"
      negate => true
      what => "previous"
    }
 }
}

filter {
 grok {
    match => { "message" => "%{LOG4J_LOG}"}
 }
}

output {
  elasticsearch { }
}

My guess is that logmessage ( JAVALOGMESSAGE (.*) ) matches everything up to the end and therefore there is nothing left to match. But my questions are how is it working on the grokconstructor.appspot.com? and how to achieve this with logstash?
thanks.
ilhami
Comment: I'm seeing this logstash / grok constructor difference, too. Did you find a solution?
Answer: I had more success and saw way less differences using http://grokdebug.herokuapp.com/
I came up with:
LOG4J_LOG %{LOG4J_DATESTAMP:timestamp} \[(?<thread>[^\]]+)?\] %{LOGLEVEL:level} %{JAVACLASS:class} - (?<message>[^\r\n]+)((\r?\n)(?<extra>(.|\r?\n)+))?