summary
stringlengths
15
147
text
stringlengths
1
19.3k
answer
stringlengths
32
22.6k
labels
float64
0.33
1
answer_summary
stringlengths
5
164
Where do I stand from a legal perspective using Helvetica Neue in my logo?
What is the legal perspective of using specific fonts for your company logo? Which fonts CAN you use in your logo?
Every font should come with a EULA (End User License Agreement) that will outline what you can and can not do with the font. In most every case, you having purchased a license for a font grants you the right to use the font for typesetting any work you are creating. In some cases, there may be some exceptions. Some common exceptions: some fonts don't allow you to embed them in electronic files (software or PDFs) some fonts don't let you use them for commercial work (typically an exclusion in freeware fonts) some fonts require an additional license for usage as a logo for large corporations (this is restriction for some of House Industry's faces) most fonts don't let you use the font as a primary element of a retail item (for instance, using the font to create big wooden letters and then selling the letters) without an additional license. Another example is some fonts require additional licenses for using it in clothing. some fonts have moral clauses (for instance, not being allowed to use it to promote tobacco products) In general, though, most fonts that you have paid a license for allow you to legally use them in logos. Just check to see if there are any exceptions in the license. If you're not sure, email the foundry and they'll be glad to answer the question for you.
1
EULA (End User License Agreement) allows you to use the font for typesetting any work you are creating
How do I turn off my Raspberry Pi?
Should I just pull the plug? Or is it best if I exit LXDE and any other running processes first?
To avoid the SD card corruption issues you should always shut down the OS properly, you can automate this by using a power controller hardware solution and a script that is triggered through a GPIO port signal, for example (in addition to the Pi Supply mentioned above) : http://mausberry-circuits.myshopify.com/ http://msl-digital-solutions.myshopify.com/products/remotepi-board The RemotePi Board in the last link has the added functionality of using IR remotes to power on/off the RaspberryPi.
0.888889
Power controller hardware solution and script that is triggered through GPIO port signal
Origin and meaning of "The eagle flies at midnight"
The eagle flies at midnight. What's the origin and meaning of this idiom?
This is something my father would say when it was pay day just then the eagle flies or the eagle has flown or will fly on a date. He was born in 1903
1
eagle flies on pay day or fly on date
Mounting a PCB in an Extruded Aluminum case
I want to make a case for a PCB using extruded aluminum. (Such as the IPOD nano shown below, and the portable amp under it). How do I mount the PCB inside the alumimum extrusion? (I know some come with slots but are there different options? Who are some good suppliers of extruded aluminum? (bonus if they do milling on small quantities too)
For extruded aluminum, find the local distributor for aluminum structural framing in your area. Try 8020.net in the US and Bosch-Rexroth in Europe. You might also try frontpanelexpress.com, though their stuff might be too big. Here are some options to mount the PCB: The slots PEM studs (you'd need a fabricator to press these in for you) Bolts and standoffs (try Digikey) For the PEM studs, check out the KSSB family-- they're designed specially for mounting PCBs without extra fasteners.
0.833333
Find the local distributor for aluminum structural framing in your area .
Using video ports 'backwards'
If I want to connect my laptop, which has a VGA output, to a monitor, I plug a VGA cable into both ends. The output being my laptop, and the input the monitor VGA output sockets are the same as VGA input sockets however, so what if I want to use my laptop as the monitor, with the video being outputted from somewhere else? As I said, VGA's output is the same as input, so in theory, I have the hardware in my laptop to do this. But presumably I need some software. So can I use the VGA port on a laptop as a video input? (And also, can this be done with HDMI?)
It depends on your laptops hardware, but in at least 99% of all cases: No. You can not. Just because a plug fits does not mean it has the functionality. [Edit]: the only way I can ever imagine this working is is your "VGA connector" is of the displayport type. And that assumed you used VGA connector as a term for "plug/cable to the monitor" and not as "DB 15 cable, once used for VGA and now commonly but incorrectly referred to as a VGA connector".
0.777778
"VGA connector" is of displayport type
Adding Properties to User Profile and Displaying in List
I have a site that I am migrating to WordPress, and I have a need to add properties that each of the users can edit (e.g., Address, City, State, Business Name, etc), along with some properties that Administrators can edit (IsActive, CanEmail) that wouldn't be displayed to the user. In addition, I need to be able to display the properties in a table (similar to how the plugin, "Members List", displays, but with the custom fields displaying as well. Given these requirements, I had attempted to use a combination of "Cimy User Extra Fields" and "Members List", but the members list grid did not have an option to display the extra fields created by the other plugin. How would you recommend I approach this? EDIT: So I guess the crux of my question is, what is the preferred method to add properties to the User?
This is not an answer but a suggestion. You can use buddypress: http://buddypress.org/ Profile Field Setup section is what you are looking for i think.
1
Buddypress: http://buddypress.org/ Profile Field Setup
probability of a certain event in a repeated sampling with replacement (without ordering)
I have a problem that is bugging me for a couple of weeks now. I have asked some friends etc but the answers were not satisfying at all. So here we go. Suppose we have a set S = {1,2,3,4,5,6,7,8,9,10} and each time we pick a random number from this set. After $N$ pickups suppose that the number, lets say 6, has never been picked. The question is, what is the probability of picking number 6 in the $N + 1$ pickup knowing that it has not been picked for the previous $N$ pickups? I know that people will rush and say, its just $\frac 1 {10}$ but if we consider the previous pickups, meaning that we have a "memory" in the "system" doesn't it change everything? Imagine a representation of the distribution of # of picks on X axis and # of actually possible values to be picked in Y axis. Law of Large Numbers says that approximately every possible value will have the same number of pickups after a very large number of repetitive samplings N. Supposing that we have rolled for a large number of, lets say dice, and we see that a specific number has not been rolled yet, lets say the 6. Doesn't this implies that it is almost certain that the roll 6 has to come, it was just too unlikely to not have been rolled up to now, given that the dice is "fair"? I tried to solve this as binomial with Conditional Probability but i think its wrong cause the set is dynamic while Conditional Probability needs a constant set. My wrong answer is here: $N$ is known Number $k$ $\in$ $S$ has $P_k$ = $\frac 1 {10}$ and $Q_k$ = $\frac 9 {10}$ In $N$ pickups no success: $A$ In $N + 1$ pickups $1$ success: $B$ Binomial: $p ( X=0)=$ $\binom{N}{0} P^0 Q^N =(\frac {9} {10})^N$ $p ( X=1)=$ $\binom{N+1}{1} P^1 Q^{N} ={\frac {(N+1)!} {N!}} (\frac {1} {10})(\frac {9} {10})^{N}=(N+1)(\frac {1} {10})(\frac {9} {10})^{N}$ And so we ask for the probability of B, given that A has been fulfilled: $p(B/A) = \frac {P(B\bigcap A)} {P(A)} = \frac {\frac {1} {10}} {(\frac {9}{10})^N} =(\frac {10}{9})^N (\frac {1}{9})$ This seems to be wrong since $p > 1$ for large N. Thanks in advance and sorry if i did not make the question clear enough. I do not know well the mathematics' definitions in English. EDIT: I have corrected $P(B\bigcap A)$ and $p ( X=1)$.
The probability of choosing $6$ at any given time is independent of whether it has been chosen before, which is why the answer is simply $\frac1{10}.$ You can still calculate it as a conditional probability, of course, but you've miscalculated your $P(B\cap A),$ which is why you get a "probability" greater than $1$ eventually. Note that $B\cap A$ is the event in which $6$ is not chosen in the first $N$ picks, but is chosen once in $N+1$ picks (so necessarily on pick $N+1$). Equivalently, $B\cap A$ is the event of choosing $6$ for the first time on pick $N+1$. Part of the issue is that your $A$ and $B$ are not independent, so that makes calculation more cumbersome. Instead, let $C$ be the event of choosing $6$ on pick $N+1,$ and note that $C\cap A=B\cap A,$ and that the events $A,C$ ("never having chosen $6$ before" and "choosing $6$ now") are independent. Thus, $$p(B\cap A)=p(C\cap A)=p(C)p(A)=\frac1{10}\cdot\left(\frac9{10}\right)^N.$$ Put another way: In $\left(\frac9{10}\right)^N$ of our possible outcomes, we have not chosen $6$ in the first $N$ picks. In $\frac1{10}$ of those outcomes, we'll choose $6$ at pick $N+1$--specifically, when we choose $6$ next, rather than some other number. $\frac1{10}$ of $\left(\frac9{10}\right)^N$ is $\frac1{10}\cdot\left(\frac9{10}\right)^N,$ the fraction of our possible outcomes in which we choose $6$ for the first time at pick $N+1$. Thus, the probability is $$p(B\mid A)=\frac{p(B\cap A)}{p(A)}=\cfrac{\frac1{10}\cdot\left(\frac9{10}\right)^N}{\left(\frac9{10}\right)^N}=\frac1{10}.$$ Suppose we approach it combinatorically, instead? There are $10^{N+1}$ total ways to make a sequence of $N+1$ picks from $S,$ but we already know that $6$ was not chosen in the first $N$ picks, so our sample space is narrowed (perhaps substantially, depending on how large $N$ is). There are $9^N$ possible ways to make a sequence of $N$ choices from $S$ without choosing $6$. From this, it follows that: There are $9^N\cdot 10$ possible ways to make a sequence of $N+1$ choices from $S$ without choosing $6$ except possibly at pick $N+1$. (This is the cardinality of our "narrowed" sample space.) There are $9^N$ possible ways to make a sequence of $N+1$ choices from $S$ where $6$ is chosen for the first time at pick $N+1$. (This is the cardinality of the event we're interested in.) Hence, the probability that we choose a $6$ on pick $N+1$, given that we haven't chosen $6$ in any of the previous $N$ picks, is $$\frac{9^N}{9^N\cdot 10}=\frac1{10}.$$
0.666667
The probability of choosing $6$ at any given time is independent of whether it has been chosen before .
What are the implications of Emmet's autonomous movement?
During The Lego Movie we learn that the whole LEGO world is actually a universe existing within ours, or to be precise, in the basement of a real human family and that the whole story is actually played out by a little boy named Finn and a way for him to cope with the conflict of his strict and fantasy-inhibiting father. And indeed this is again strengthened when we see that the actions as performed by his father when supposedly "repairing the mess" that Finn created are directly represented by Lord Business' micromanagers performing them inside the in-universe viewpoint of the other LEGO figures. Upto this point that is a reasonable and obvious representation to me and even Emmet's direct witness of the universe behind his, our real world, is nothing but him seeing the strips behind the course of his own universe, however he managed to overcome this boundary between dimensions. But the single-most action that completely shatters this whole viewpoint is the incident, when Emmet manages to move completely on his own, thus directly interfering with our universe on his own and it seems to me that there is no way to bring this in congruence to our own physical reality, not even when accepting the LEGO world and its course as an emanation of Finn's fantasy, since Finn didn't do anything at all. So what are we to make of this incident? Does it have any deeper implications for the depicted realities? Does this establish the LEGO figures as existent and sentient within our physical reality outside of our mere fantasy? Does it have any further signficance for the meaning of the whole story and actually extend the rather simple and obvious kid's fantasy interpretation of the story in a much more elaborate way I have missed? Or is this just to be brushed off as nothing of relevance?
The way I took it as that both universes exist side by side (and not subservient to each other) and incidents in one universe affect the other. The causality traffic might seem a bit heavy sided towards Finn's universe being the dominant one, but on closer look you see that this isn't completely true. The Man Upstairs' LEGO policies have certainly shaped Emmet's universe greatly. But Emmet, being Finn's chosen one, has reversed the flow of effects. Not only was he able to cross between his world to Finn's (and back again), but his reformation of President Business has also somehow triggered The Man Upstairs to look differently at his hobby. In short, Emmet's world is not a fantasy or part of Finn's world, but a distinct one that has a border with Finn's world where cause and effect can cross.
1
The Man Upstairs has reversed the flow of effects on Emmet's universe
How to find the files in magento directory
I want to get the list of taxes to display on cart page.. The code that is using to display the tax is : This block is showing tax information: $this->renderTotals(); while this block is shwoing grand total: <?php echo $this->renderTotals('footer'); ?> But i need to made some changes... please tell me which file i have to look for so i can make the changes... I tried all the files adn check the coding.. but no success... Please help me....
Check this file out: app/design/frontend/base/default/template/checkout/total/tax.phtml
0.777778
Check this file: app/design/frontend/base/default/template/checkout/total/tax.phtml
Can a single bad letter of recommendation ruin my chances of getting admitted to grad school?
I am dealing with one very mercurial professor and I had a bit of an incident with him. I think I might have offended him slightly (I told him about the deadline to submit a letter of recommendation (LOR) in the nicest possible way and yet he flared up on me). My seniors tell me that he has the habit of extracting revenge on people who ask him for a LOR if they irritate him. I am afraid I might have offended him; he kinda scares me. But he is a very good researcher in computer networks and I performed well in his class. I don't want to drop him and choose another faculty. Now I know very well that the other two lecturers are going to rate me well, but if this lecturer gives me a bad rating will it harm my chances of getting admitted?
Yes. A bad recommendation can ruin your chances. If a letter writer were to write that you had committed some grave academic dishonesty, for example, that would look extremely bad for you, even if the others were generally positive. An answer to another question says that even a "good but not great" letter could keep you out of some departments.
1
A bad recommendation can ruin your chances of writing a letter .
Can't install Pantheon desktop environment
I've tried to install Pantheon desktop environment several times. I tried sudo apt-get update and sudo apt-get upgrade, but it's no use. I’m just a very new beginner. This is what I’ve done: quanglong@ubuntu:~$ sudo add-apt-repository ppa:elementary-os/daily [sudo] password for quanglong: You are about to add the following PPA to your system: ATTENTION! Do NOT install this PPA if you want a tested running system, this PPA contains the newest and most unstable development of elementary, it's useful only if you are a developer and are not afraid to encounter CRITICAL BUGS. Also this PPA may overwrite already installed packages you don't want it to! More info: https://launchpad.net/~elementary-os/+archive/daily Press [ENTER] to continue or ctrl-c to cancel adding it gpg: keyring `/tmp/tmpkz5d_z/secring.gpg' created gpg: keyring `/tmp/tmpkz5d_z/pubring.gpg' created gpg: requesting key 4E1F8A59 from hkp server keyserver.ubuntu.com gpg: /tmp/tmpkz5d_z/trustdb.gpg: trustdb created gpg: key 4E1F8A59: public key "Launchpad PPA for elementary OS team" imported gpg: Total number processed: 1 gpg: imported: 1 (RSA: 1) OK /bin/rm: cannot remove `/run/user/root/gvfs': Is a directory quanglong@ubuntu:~$ sudo apt-get update Hit http://ppa.launchpad.net quantal Release.gpg Get:1 http://security.ubuntu.com quantal-security Release.gpg [933 B] Hit http://us.archive.ubuntu.com quantal Release.gpg Hit http://ppa.launchpad.net quantal Release.gpg Get:2 http://security.ubuntu.com quantal-security Release [49.6 kB] Get:3 http://us.archive.ubuntu.com quantal-updates Release.gpg [933 B] Hit http://us.archive.ubuntu.com quantal-backports Release.gpg Hit http://ppa.launchpad.net quantal Release Hit http://us.archive.ubuntu.com quantal Release Hit http://ppa.launchpad.net quantal Release Get:4 http://us.archive.ubuntu.com quantal-updates Release [49.6 kB] Hit http://ppa.launchpad.net quantal/main Sources Get:5 http://security.ubuntu.com quantal-security/main Sources [74.3 kB] Hit http://ppa.launchpad.net quantal/main amd64 Packages Hit http://ppa.launchpad.net quantal/main i386 Packages Hit http://us.archive.ubuntu.com quantal-backports Release Hit http://us.archive.ubuntu.com quantal/main Sources Hit http://us.archive.ubuntu.com quantal/restricted Sources Hit http://us.archive.ubuntu.com quantal/universe Sources Hit http://ppa.launchpad.net quantal/main Sources Hit http://us.archive.ubuntu.com quantal/multiverse Sources Get:6 http://security.ubuntu.com quantal-security/restricted Sources [1,833 B] Hit http://us.archive.ubuntu.com quantal/main amd64 Packages Hit http://ppa.launchpad.net quantal/main amd64 Packages Hit http://us.archive.ubuntu.com quantal/restricted amd64 Packages Get:7 http://security.ubuntu.com quantal-security/universe Sources [23.8 kB] Hit http://ppa.launchpad.net quantal/main i386 Packages Hit http://us.archive.ubuntu.com quantal/universe amd64 Packages Hit http://us.archive.ubuntu.com quantal/multiverse amd64 Packages Get:8 http://security.ubuntu.com quantal-security/multiverse Sources [1,169 B] Hit http://us.archive.ubuntu.com quantal/main i386 Packages Hit http://us.archive.ubuntu.com quantal/restricted i386 Packages Get:9 http://security.ubuntu.com quantal-security/main amd64 Packages [207 kB] Hit http://us.archive.ubuntu.com quantal/universe i386 Packages Hit http://us.archive.ubuntu.com quantal/multiverse i386 Packages Hit http://us.archive.ubuntu.com quantal/main Translation-en Hit http://us.archive.ubuntu.com quantal/multiverse Translation-en Hit http://us.archive.ubuntu.com quantal/restricted Translation-en Hit http://us.archive.ubuntu.com quantal/universe Translation-en Get:10 http://us.archive.ubuntu.com quantal-updates/main Sources [134 kB] Get:11 http://security.ubuntu.com quantal-security/restricted amd64 Packages [3,469 B] Get:12 http://security.ubuntu.com quantal-security/universe amd64 Packages [72.4 kB] Ign http://ppa.launchpad.net quantal/main Translation-en_US Get:13 http://us.archive.ubuntu.com quantal-updates/restricted Sources [2,564 B] Ign http://ppa.launchpad.net quantal/main Translation-en Get:14 http://us.archive.ubuntu.com quantal-updates/universe Sources [96.7 kB] Ign http://ppa.launchpad.net quantal/main Translation-en_US Get:15 http://security.ubuntu.com quantal-security/multiverse amd64 Packages [1,488 B] Ign http://ppa.launchpad.net quantal/main Translation-en Get:16 http://security.ubuntu.com quantal-security/main i386 Packages [205 kB] Get:17 http://us.archive.ubuntu.com quantal-updates/multiverse Sources [5,269 B] Get:18 http://us.archive.ubuntu.com quantal-updates/main amd64 Packages [337 kB] Get:19 http://us.archive.ubuntu.com quantal-updates/restricted amd64 Packages [4,804 B] Get:20 http://us.archive.ubuntu.com quantal-updates/universe amd64 Packages [218 kB] Get:21 http://security.ubuntu.com quantal-security/restricted i386 Packages [3,531 B] Get:22 http://security.ubuntu.com quantal-security/universe i386 Packages [73.0 kB] Get:23 http://us.archive.ubuntu.com quantal-updates/multiverse amd64 Packages [12.1 kB] Get:24 http://security.ubuntu.com quantal-security/multiverse i386 Packages [1,726 B] Hit http://security.ubuntu.com quantal-security/main Translation-en Get:25 http://us.archive.ubuntu.com quantal-updates/main i386 Packages [334 kB] Hit http://security.ubuntu.com quantal-security/multiverse Translation-en Hit http://security.ubuntu.com quantal-security/restricted Translation-en Hit http://security.ubuntu.com quantal-security/universe Translation-en Get:26 http://us.archive.ubuntu.com quantal-updates/restricted i386 Packages [4,841 B] Get:27 http://us.archive.ubuntu.com quantal-updates/universe i386 Packages [219 kB] Get:28 http://us.archive.ubuntu.com quantal-updates/multiverse i386 Packages [12.3 kB] Hit http://us.archive.ubuntu.com quantal-updates/main Translation-en Hit http://us.archive.ubuntu.com quantal-updates/multiverse Translation-en Hit http://us.archive.ubuntu.com quantal-updates/restricted Translation-en Hit http://us.archive.ubuntu.com quantal-updates/universe Translation-en Hit http://us.archive.ubuntu.com quantal-backports/main Sources Hit http://us.archive.ubuntu.com quantal-backports/restricted Sources Ign http://security.ubuntu.com quantal-security/main Translation-en_US Hit http://us.archive.ubuntu.com quantal-backports/universe Sources Ign http://security.ubuntu.com quantal-security/multiverse Translation-en_US Hit http://us.archive.ubuntu.com quantal-backports/multiverse Sources Ign http://security.ubuntu.com quantal-security/restricted Translation-en_US Hit http://us.archive.ubuntu.com quantal-backports/main amd64 Packages Ign http://security.ubuntu.com quantal-security/universe Translation-en_US Hit http://us.archive.ubuntu.com quantal-backports/restricted amd64 Packages Hit http://us.archive.ubuntu.com quantal-backports/universe amd64 Packages Hit http://us.archive.ubuntu.com quantal-backports/multiverse amd64 Packages Hit http://us.archive.ubuntu.com quantal-backports/main i386 Packages Hit http://us.archive.ubuntu.com quantal-backports/restricted i386 Packages Hit http://us.archive.ubuntu.com quantal-backports/universe i386 Packages Hit http://us.archive.ubuntu.com quantal-backports/multiverse i386 Packages Hit http://us.archive.ubuntu.com quantal-backports/main Translation-en Hit http://us.archive.ubuntu.com quantal-backports/multiverse Translation-en Hit http://us.archive.ubuntu.com quantal-backports/restricted Translation-en Hit http://us.archive.ubuntu.com quantal-backports/universe Translation-en Ign http://us.archive.ubuntu.com quantal/main Translation-en_US Ign http://us.archive.ubuntu.com quantal/multiverse Translation-en_US Ign http://us.archive.ubuntu.com quantal/restricted Translation-en_US Ign http://us.archive.ubuntu.com quantal/universe Translation-en_US Ign http://us.archive.ubuntu.com quantal-updates/main Translation-en_US Ign http://us.archive.ubuntu.com quantal-updates/multiverse Translation-en_US Ign http://us.archive.ubuntu.com quantal-updates/restricted Translation-en_US Ign http://us.archive.ubuntu.com quantal-updates/universe Translation-en_US Ign http://us.archive.ubuntu.com quantal-backports/main Translation-en_US Ign http://us.archive.ubuntu.com quantal-backports/multiverse Translation-en_US Ign http://us.archive.ubuntu.com quantal-backports/restricted Translation-en_US Ign http://us.archive.ubuntu.com quantal-backports/universe Translation-en_US Fetched 2,151 kB in 45s (47.7 kB/s) Reading package lists... Done /bin/rm: cannot remove `/run/user/root/gvfs': Is a directory quanglong@ubuntu:~$ sudo apt-get install elementary-desktop Reading package lists... Done Building dependency tree Reading state information... Done E: Unable to locate package elementary-desktop /bin/rm: cannot remove `/run/user/root/gvfs': Is a directory quanglong@ubuntu:~$
A quick look shows that there isn't a elementary-desktop in the PPA. Have a look at these instructions.
0.777778
There is no elementary-desktop in the PPA
NTP / SNTP and UTC Time
I'm trying to get a little bit smarter about the NTP & SNTP protocols. I have read through the RFC's and understand how the protocol works, but I'm uncertain about the timestamps themselves. The RFC's don't actually state that all timestamps are normalized to UTC time, but it seems that they must be. Is this correct?
Yes, the NTP servers all talk UTC and your local machine translates that into whatever time is appropriate based on your timezone settings.
0.777778
NTP servers all talk UTC and your local machine translates that into whatever time is appropriate based on your timezone settings.
What is the exact word used for this unusual "interval" of sorts?
I knew this word a long time ago. Then I lost my memory. childhood and all. mva trauma, head injury.. I was good with words before because I was a songwriter, and I had a feeling that this word was etched in my memory somewhere but was just inaccessible.. knowing this word again could solve a lot of consequent problems in writing/overcome writers block to some degree for me. So here it is: You know how there is an "interval" between say a "train of events"? "Interval" is the best and only word I could think of -closest to this phenomenon- to describe it. To be a bit more vivid, imagine a train (locomotive) with 10 carriages, and the third and fourth carriage missing above the wheels. So, as the train moves past you, there is a "gap" that transitions through your visual and sound spectrum yes? What is this phenomenon? "Something" (that) passes by you.. It is a very obvious word, but I just can't figure out.. Even after one of you points it out, I might have to give it a memory marker to make it a long term memory- as my short term memory is still not in very good shape (or maybe it's just in the head). Further, imagine this "gap" or "interval" of sorts streaking past you like a bullet.. What is this phenomenon? :)
I don't have a clear understanding of the phenomenon you are attempting to describe, but imagine at least the first of the following is relevant: • caesura, “A pause or interruption in a poem, music, building or other work of art” (Also see 2) • lapse, “A pause in continuity”, “An interval of time between events” • interruption, “A time interval during which there is a cessation of something”
0.888889
"A pause or interruption in a poem, music, building or other work of art"
Create Processing Instruction in BizTalk Map
I know that in BizTalk maps, you can perserve processing instructions. However, the source XML that I will have will not have any processing instructions. However, I will need to create a processing instruction for the Target XML. I know I can write a custom XSLT to do this, however I would like to avoid that as I have the BizTalk map complete except for this. Can I create processing instructions on the Target XML using only the available functoids in the BizTalk mapper?
Other than using XSLT as you've mentioned, there is also an option to do this on the send port: Select the native XmlTransmit send pipeline Add your processing instructions to the XmlAsmProcessingInstructions property as per this example
1
Add processing instructions to XmlTransmit send pipeline
Potential PHP problems with EE 1.13 or CE 1.8
My client is on an old server running PHP 5.2.17, should I encourage him to upgrade to 5.3 or will it be ok?
The support for PHP 5.2 ended in August 2011, so I recommend to update the PHP installation. The configuration site on magentocommerce.com shows that PHP 5.3 is required. Some weeks ago we had some issues with a PHP 5.4 installation, EE 1.12 and atomic repo (some segmentation faults) and we stepped back to 5.3. Update: The error was Fatal error: Cannot override final method Mage_Core_Model_Abstract::clearInstance() in various PHP-Files with PHP 5.4.17
1
PHP 5.3 is required
What do you call a customer's customer in a specification document, use case, or scenario?
My team and I develop software that our customers will use to interact with their customers. Additionally, we also eat our own dogfood and use the software ourselves to interact with our customers. Therefore, it can sometimes be difficult to explain use cases and scenarios, as our employees can be operators, our customers can be operators, and our customers' customers can be visitors. However, our customers can also be visitors interacting with our operator employees, our customers' customers can be visitors interacting with our customer or our employee. Here is a model where: A is an employee B is a customer C is our customers' customer X interacts with Y Operator --> Visitor A --> B A --> C B --> C Because sometimes our customers can play different roles, it's sometimes necessary to refer to the specific role, Operator or Visitor, instead of Employee and Customer. It's also a mouthful to say "customer's customer" all the time. I was wondering how other development shops handle these semantic details when writing their use cases and scenarios. Are there any one-word, generic terms that can apply to any product that involves a third-level actor? Other than using the specific roles, Operator and Visitor, what words could be used to identify a customer of a customer? The word would need to be short enough as to be adopted within an organization. If longer than a couple syllables, it's shortened form must still differentiate it from the other actors.
Maybe a bit of a tangent but... I'm fond of interaction design myself, and there you never use abstract "roles" or "users" but something called "personas". Basically you make a up a character with a name, description and photograph and then you use that in your design process "Bob is a bank manager in his middle years, he has some computer experience but is not especially fond of them." Then in your project you can use their real names "No, Bob wouldn't want that" , "If Bob does this then Alice needs to be notified somehow". Personas are especially useful when you're doing scenarios. I'd highly recommend The inmates are running the asylum and About face
1
Personas are especially useful when doing scenarios
Set leading of paint / fontmetrics in android
I'm using a custom font and adding text to a canvas with a Paint object in android, e.g: Paint paint = new Paint(); paint.setARGB(255, 255, 255, 255); paint.setTextSize(29); paint.setAntiAlias(true); paint.setTypeface(font); paint.setXfermode(new PorterDuffXfermode(PorterDuff.Mode.SRC_OVER)); // Text Overlapping Pattern final TextPaint tp = new TextPaint(paint); final TextPaint tpStroke = new TextPaint(strokePaint); // canvas.translate(15, 5); canvas.translate(20, 5); StaticLayout sl = new StaticLayout(textOne.getText().toString(), tp, (finalBitmapOne.getWidth()-10), Layout.Alignment.ALIGN_NORMAL, 1.0f, 0.0f, false); sl.draw(canvas); I'm not happy with the leading / line height, how can I adjust it? I can get the leading via: FontMetrics fmPaint = paint.getFontMetrics(); fmPaint.leading; But how can I adjust it?
From the documentation for getFontMetrics (emphasis mine): Return the font's recommended interline spacing, given the Paint's settings for typeface, textSize, etc. If metrics is not null, return the fontmetric values in it. You don't set this to change spacing, you read this to determine what the recommended spacing should be. You'll have to reposition coordinates manually yourself, i.e. translating the canvas again between drawing each line.
0.666667
Return the font's recommended interline spacing
$browser.$$checkUrlChange is undefined in a jasmine test
I have the following test: it('should maintain a bind between the data at the $scope to the data at the ingredientsService', function(){ $scope.addFilters('val1', $scope.customFiltersData, 'filter1'); $scope.$digest(); expect($scope.customFiltersData).toEqual(ingredientsService.filters()); }); I get the following error: TypeError: undefined is not a function at Scope.$digest (/home/oleg/dev/vita-webapp-new/bower_components/angular/angular.js:12502:17) at null.<anonymous> (/home/oleg/dev/vita-webapp-new/test/spec/controllers/customfilters.js:92:20) When debugging I saw that $browser.$$checkUrlChange on line 12502 of angular.js is indeed undefined. As a temporary solution, I changed the invocation on line 1250 to $browser.$$checkUrlChange && $browser.$$checkUrlChange() But I cannot help to wonder whether this monkey-patch can hurt me in some other way. Any clue on how to solve this properly is much appreciated. In case I do not get my answers I might consider opening a bug at the Angular repo on GitHub.
You have a mismatch in the version of angular and angular-mock . See here: jasmine test fails with undefined is not a function(evaluating $browser.$$checkUrlChange())
0.777778
jasmine test fails with undefined is not a function
New to circuits, confused about where reset happens with SR flip-flop
In one of my classes we are learning about circuits. For homework, we have to create a finite state machine for a vending machine using an SR flip-flop. The machine can either take a nickel, dime, or nothing until it gets to at least 15 cents, so it has 4 states (0, 5, 10, and 15 cents). Once the machine receives 15 cents, it dispenses its product. Once in this state, if nothing is deposited it goes to the 0 state; if a nickel is deposited it goes to the 5 cent state; if a dime is deposited, it does to the 10 cent state. The truth table that I came up with is: Present|Inputs| Next | | SR Flip Flop | | | Output | Q1 Q0 |D N |P1 P0| | S1 R1 S0 R0 _______|______|_______|________|_____________ 0 0 | 0 0 | 0 0 | 0 | 0 X 0 X 0 0 | 0 1 | 0 1 | 0 | 0 X 1 0 0 0 | 1 0 | 1 0 | 0 | 1 0 0 X 0 0 | 1 1 | X X | X | X X X X _______|______|_______|________|_____________ 0 1 | 0 0 | 0 1 | 0 | 0 X X 0 0 1 | 0 1 | 1 0 | 0 | 1 0 0 1 0 1 | 1 0 | 1 1 | 0 | 1 0 X 0 0 1 | 1 1 | X X | X | X X X X _______|______|_______|________|_____________ 1 0 | 0 0 | 1 0 | 0 | X 0 0 X 1 0 | 0 1 | 1 1 | 0 | X 0 1 0 1 0 | 1 0 | 1 1 | 0 | X 0 1 0 1 0 | 1 1 | X X | X | X X X X _______|______|_______|________|_____________ 1 1 | 0 0 | 0 0 | 1 | 0 1 0 1 1 1 | 0 1 | 0 1 | 1 | 0 1 X 0 1 1 | 1 0 | 1 0 | 1 | X 0 0 1 1 1 | 1 1 | X X | X | X X X X Based on this truth table [and the k-maps I made from it], I created the following logic gates: My question is, where exactly does the "reset" happen? For example, if I am in the 15 cent state and deposit a nickel, how does it go to the 5 cent stage? Do I have to make the output from "open" loop around? Sorry for such a novice question, I hope that made sense! Edit: The first two columns are for the present state of the machine, i.e., how much you have deposited so far. So Q0 Q1 = 00 represents the first state (0 cents), Q0 Q1 = 01 represents the second state (5 cents), etc. The next two columns represent adding a nickel or dime. If you are in the state 00 and and 01, you should move to state 01. Since you cannot deposit a nickel and dime simultaneously, we don't care about the the input 11. If you are in state 10 and add 10, you go to state 11 (and don't get any change back!).
Depending upon how the coin sensors and output of the machine are implemented, you might need some more states to allow for the fact that a coin might be hitting a switch for an arbitrary length of time; I don't see anything in your machine to handle that. It's also not clear how long the "dispense product" output is supposed to be active. A logical possibility would be that "dispense product" should remain active until a signal is returned from the mechanism indicating that the product has been dispensed, whereupon the machine should reset to its start state. Also, if you are going to use RS latches, you need to design your machine so that if multiple latches switch simultaneously for a state transition, it won't matter whether one switches before the other. If the machine was sitting in state "01" and a nickel arrived, it would attempt to transition into state "10". If Q0 and Q1 are RS latches, there is no reason to expect them to switch simultaneously. If you want to minimize the number of states, the theoretical minimum set, assuming the dispensing mechanism's cycle will last at least as long as a coin input would be: Nothing inserted Switches active with $0.05 Switches idle with $0.05 Switches active with $0.10 Switches idle with $0.10 Total of $0.15 inserted (switch state irrelevant) Six states, probably allowing a three-bit state machine. I would conjecture, though, that you might find it easier to use different states for the "switch active with second nickel" and "switch active with first dime" scenarios. Also, you might be able to reduce circuitry further if you use four latches in two pairs, where the states of the first pair of latches are computed using the outputs of the second, and the second pair of latches copies the state of the first whenever no coins are present.
0.666667
"dispense product" output is supposed to be active until a signal is returned .
Create a block showing the latest of a certain content type
I am very new to drupal, so I already apologize if I ask something very simplistic... I have a site where I would like to add a new block to the front page of the website. This block would show the companies newest available training's. I created the sub-pages of the training's. My thought process was that I create the sub-pages, then create a new type of content (with the cck) where I can add the new sub-page node names and their links. I created the new content type with two fields. field_offeringlink and field_offeringtext. Where the the text would be the actuall promotional text and the link directing to the sub-page. After this I wanted to create a Block that I would place on the front page, showing these two fields. I couldn't figure out this part... So how do I make the bloody block show my fields? OR If you have a better idea for this whole shannanigan then I am welcome to ideas. My goal: Create a dynamic block on the front page, that shows all the latest training's. Under dynamic I mean, that we can add-remove the links from the admin/content menu. Thanks in advance!
You want to create a content type for Training. Then you can add Fields for things like start and end dates, registration deadlines, difficulty ratings, whatever. Then you want to have a View that exposes a Block, for content type Training. The view shows the 5 (or however many) newest Training nodes that you've created. You can accomplish all this on the first, 'easy' page when you create the new view. Also, since you used Views, you can then move on to, for instance, showing only Trainings whose registration deadlines have not passed, and so forth. But basically Views does all the heavy lifting. If you ever find yourself thinking: 'I need to make a page that lists all these nodes,' then what you really need is Views.
0.888889
Create a View that exposes a Block for content type Training
Presentation of discrete upper triangular group
Let $G$ be the nilpotent Lie group consisting of matrices $$ \begin{pmatrix} 1 & a_{12} & \cdots & a_{1,n}\\ 0 & 1 & \ddots & \vdots\\ \vdots & \ddots & \ddots & a_{n-1,n}\\ 0 & \cdots & 0 & 1 \end{pmatrix} $$ where $a_{ij}\in\mathbb R$. I would like to find a presentation of the group $\Gamma=G\cap\mathrm{GL}_n\mathbb Z$. The entries on the superdiagonal play a crucial role, in that the $n-1$ matrices with a single $1$ on the superdiagonal ($1$s on the diagonal and $0$s elsewhere) generate all of $\Gamma$. Trying to write down a presentation, I would start by choosing $n-1$ generators, $a_{12},\dotsc,a_{n-1,n}$ (named after the matrix entries). It is also clear that we need commutation relations, like $$ [\cdots[[[a_{12},a_{23}],[a_{23},a_{34}]],\ldots]\cdots]=\cdots=e. $$ (If $n=3$, this would just be $[[a_{12},a_{23}],a_{12}]=[[a_{12},a_{23}],a_{23}]=e$.) I am just not sure, though, if I explicitly need to require that, say, $$ [a_{12},a_{34}]=e, $$ which seems to be directly related to the embedding I am thinking of. I would like a presentation in which any generators can be mapped to any of the matrices with a $1$ in the $(i,i+1)$ position. Is this possible?
I assume that when you are using $a_{ij}$ to denote an element of $\Gamma$, you mean the identity matrix with an extra 1 in the $(i,j)$ position. It is easy to write down a presentation of $\Gamma$ on the $m := n(n-1)/2$ generators $a_{ij}$ with $i<j$. Just use the $m(m-1)/2$ commutator relations $[a_{ij},a_{jk}] = a_{ik}$, and $[a_{ij},a_{kl}]=1$ when $j \ne k$, $i \le k$, and $j<l$ when $i=k$. Of course many of these relations are redundant. To get a presentation on the generators $a_{i,i+1}$, you can then use the equations $[a_{ij},a_{jk}] = a_{ik}$ to eliminate all of the other generators. Doing that with $n=3$ gives the presentation you have written down. Although many relations in this presentation are redundant, those like $[a_{12},a_{34}]=1$ between the commuting generators $a_{i,i+1}$ are definitely not redundant, because if you left one of those out, then you could make the group bigger by putting that commutator equal to a new central generator.
1
When using $a_ij$ to denote an element of $Gamma$, you mean the identity matrix
What's the name of the characteristic of being "open hearted"?
I can not think of any another good phrase to describe the sense, "Open Hearted". This characteristic is like one who does not posses the nature of being stubborn, who has the ability to listen and in certain cases accept others' theories though they can be in opposite of his own theory. A good example would be if a person is capable of admitting if there is some bad customs in his own religion and he does not fall back to admit it in front of others and change the custom in his regular life. What is the name of this characteristic?
Other ways to say this would be "easy going" or "flexible". Joe is such an easy going guy. He never argues with Bob, even when everyone knows that Joe is correct. Jane is pretty flexible – she never gets hung up on the sticky parts; instead, she focuses on the big picture and getting things done. NOAD defines easy-going as: relaxed and tolerant in approach or manner and lists tolerant and broad-minded as synonyms. This may not be completely synonymous with open minded, but there is some overlap. Similarly, NOAD defines flexible as: (of a person) ready and able to change so as to adapt to different circumstances Here, "different circumstances" can be applied much more broadly than matters of beliefs and opinions (such as coping with an unexpected job change). Still, the word might be used when talking about the situation you described.
1
NOAD defines easy-going as: relaxed and tolerant in approach or manner
Moving a WP Multisite to a subdirectory
Firstly, I've read a number of posts on this process. However, for various reasons, the process remains difficult to implement or troubleshoot for lack of even abstracted examples, or maybe too abstracted. And there's a few "can not do" posts, nearly always followed up by "with 3.5, you now can" caveats, so whether one can remains ambiguous, though no doubt non-trivial. Summary: How to move a wordpress multisite (WPMS) from root.com to root/blogs? For this example, we're moving a WPMS from "root.com" to "root.com/blogs" I understand that I need to update the paths in the database and wp-config.php appropriately. It seems I may also have to update .htaccess? I'm also aware of the serialization issue with search/replace and mysql query updates. I have a WPMS that I've updated to 3.5. I've found the following tables with domain and path info Existing working configuration before move to subdirectory 1. wp_blogs select blog_id, domain, path from wp_blogs; +---------+-------------+--------+ | blog_id | domain | path | +---------+-------------+--------+ | 1 | root.com | / | | 2 | root.com | /matt/ | +---------+-------------+--------+ 2. wp_site select * in wp_site; +----+-------------+------+ | id | domain | path | +----+-------------+------+ | 1 | root.com | / | +----+-------------+------+ 3. The blog_id corresponds to the wp_#_options tables which contain: select option_name,option_value from wp_2_options where option_name = 'home' or option_name = 'siteurl'; +-------------+--------------------------+ | option_name | option_value | +-------------+--------------------------+ | home | http://root.com/matt/ | | siteurl | http://root.com/matt/ | +-------------+--------------------------+ 4. In my wp-config.php I have the following WPMS-specific lines: define('WP_ALLOW_MULTISITE', true); define( 'MULTISITE', true ); define( 'SUBDOMAIN_INSTALL', false); $base = '/'; define( 'DOMAIN_CURRENT_SITE', 'root.com' ); define( 'PATH_CURRENT_SITE', '/' ); define( 'SITE_ID_CURRENT_SITE', 1 ); define( 'BLOG_ID_CURRENT_SITE', 1 ); 5. Lastly, in my .htaccess, I have: RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] # uploaded files RewriteRule ^([_0-9a-zA-Z-]+/)?files/(.+) wp-includes/ms-files.php?file=$2 [L] # add a trailing slash to /wp-admin RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L] RewriteCond %{REQUEST_FILENAME} -f [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^ - [L] RewriteRule ^[_0-9a-zA-Z-]+/(wp-(content|admin|includes).*) $1 [L] RewriteRule ^[_0-9a-zA-Z-]+/(.*\.php)$ $1 [L] RewriteRule . index.php [L] Updates required to move the site It seems to me that in order to move my site to the /blogs , I would: 1. Update wp_blogs to mysql> update wp_blogs set domain=concat(domain, '/blogs'), path=concat(path, 'blogs/'); select blog_id, domain, path from wp_blogs where blog_id < 3; +---------+-------------+--------------+ | blog_id | domain | path | +---------+-------------+--------------+ | 1 | root.com | /blogs/ | | 2 | root.com | /blogs/matt/ | +---------+-------------+--------------+ 2. Update wp_site to update wp_site set domain=concat(domain, '/blogs'), path=concat(path, 'blogs/'); select * from wp_site; +----+-------------+------------+ | id | domain | path | +----+-------------+------------+ | 1 | root.com | /blogs/ | +----+-------------+------------+ 3. wp_#_options +-------------+--------------------------------+ | option_name | option_value | +-------------+--------------------------------+ | home | http://root.com/blogs/matt/ | | siteurl | http://root.com/blogs/matt/ | +-------------+--------------------------------+ 4. wp_config.php define('WP_ALLOW_MULTISITE', true); define( 'MULTISITE', true ); define( 'SUBDOMAIN_INSTALL', false); $base = '/blogs/'; define( 'DOMAIN_CURRENT_SITE', 'root.com' ); define( 'PATH_CURRENT_SITE', '/blogs/' ); define( 'SITE_ID_CURRENT_SITE', 1 ); define( 'BLOG_ID_CURRENT_SITE', 1 ); note: I'm not clear how this step is appropriately updated 5. .htaccess I found vague "update .htaccess appropriately" instructions, but not specifics. Update RewriteBase? Which lines in .htaccess to I update when I move root.com to root.com/blogs? Missing from the above process will be the paths founds in posts. My druthers are to use the search and replace tool for that, after I've made this more fundamental updates; or am I wrong? Update bungeshea suggests that, yes, I point RewriteBase to the "blogs" subdirectory, i.e., RewriteBase /Blogs Finally, if you don't know about http://interconnectit.com/products/search-and-replace-for-wordpress-databases/ you should. It's excellent.
i know its old but i fixed it! i installed WP MU in a subfolder. htaccess: RewriteEngine On RewriteBase /YOUR_SUBFOLDER RewriteRule ^index\.php$ - [L] # add a trailing slash to /wp-admin RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L] RewriteCond %{REQUEST_FILENAME} -f [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^ - [L] RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L] RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L] RewriteRule ^(.*\.php)$ YOUR_SUBFOLDER/$1 [L] RewriteRule . index.php [L] wp-config.php define( 'WP_ALLOW_MULTISITE', true ); define('MULTISITE', true); define('SUBDOMAIN_INSTALL', false); define('DOMAIN_CURRENT_SITE', 'localhost'); // or your host define('PATH_CURRENT_SITE', ''); define('SITE_ID_CURRENT_SITE', 1); define('BLOG_ID_CURRENT_SITE', 1); wp_site domain: localhost (OR your domain but no subdirectory!) path: / wp_blogs domain: localhost (OR your domain but no subdirectory in each blog_id!) path: / wp_sitemeta siteurl: http://localhost/YOUR_SUBFOLDER (replace localhost with your host)
0.888889
WP MU in a subfolder
Where are the fishing spots surrounded by rocks etc, and do they actually increase the chances of catching fish?
While talking to the fisher guy in the fishing hut he told me the best place to fish was in small places surrounded be rocks or wall. Is this true? If so, where are theses places in the game? Is there anything else that helps to catch more fish? For example, I have noticed that fishing next to a fisherman seems to have a higher chance of catching something. is this correct, and what else helps with fishing?
Trent's answer gives a solid overview of chain fishing in general. To complement that, here are some of the best areas for chain fishing. Note that each spot is surrounded on 3 sides with rocks or cliff. This spot is just below Ambrette Town (courtesy of this guide). Exit the Museum onto the Sand, then double back along the cliffs: Then there's Shalour City, Route 8 and Route 21 (guide) Shalour: Route 8: Route 21: These are just some of the areas where it is possible, there are many others. Look around, try and find more!
0.888889
Here are some of the best areas for chain fishing in general
Skip duplicated files on copy
I am moving files from one folder to another destination1 to destination2 however if destination2 already has a copy of the file from destination1 I would like to simply skip and continue the copy process rather than overwriting which will take a longer process. I have already tried: FileSystem.CopyFile(destination1,destination2, true);which will overwrite the file. Is there anyway I could get some assistance on accomplishing this please.
You told that you want to avoid overwriting, then why you did pass true for the last parameter? Have you tried passing false? FileSystem.CopyFile(destination1, destination2, false); As side note, remember that the system will never compare two files in order to know if they are identical and then skip the copy. If you want to accomplish this behavior, then you have to implement it by yourself, but it would usually be heavier than simply overwriting, due to the need to fully read the destination file, unless you implement some caching mechanism or the destination file is already (and still) in system cache. Regards, Daniele.
0.777778
Why did you pass true for the last parameter?
Broker (AirTicket24) has changed part of flight, can i ask a full refund?
I have booked flight from broker, flight is from Riga RIX to Goa GOI, now part of my trip has changed. 3 9W2354H 24APR MAA GOI 1035 1315 (cancelled flight) 4 9W2305H 24APR MAA BLR 0820 0910 (new flight) 5 9W 498H 24APR BLR GOI 1025 1140 (new flight) 6 9W 427H 05MAY GOI BOM 1855 2005 (cancelled flight) 7 9W2374H 05MAY GOI BOM 0545 0700 (new flight) Broker offers only partial refund (full price was 550 Eur) We would like to inform you that unfortunately the airline company does not accept the request for full refund in case of cancellation so according the airline's rules your e-ticket fare is non-refundable. The refundable amount is 85.62 € for both passengers. This amount will be reimbursed within a maximum of 30 working days after the airline's authorization. For any change or cancellation our agency charges 30.00 €. Now we prefer not to take a flight at all, may i ask a full refund because a part of booking has be changed?
It's probably not the broker who changed the flight but the airline, which indeed has the right to cancel and/or reschedule flights. However it would seem that, according to the FAQ page from AirTicket24, you can ask for compensation in case of substantial changes: 23. What happens if the airline changes its flights? The airlines are sometimes forced to modify the itineraries, hours and number of their flights. In this case we will try to inform you for any changes before the date of departure so that you adjust your program to these changes. These changes are usually of minor importance without significant impact on your trip. If significant changes occur related to your flight (for example change in departure time for more than 2 hours or change of departure airport) and you have no alternative that suits you then you can request compensation from the airline, according to the passenger's rights established by the European Union, unless you have been informed on time by the airline. Hence I would go ahead and contact both your broker, quoting the FAQ, add well as your airline to see what can be arranged.
1
What happens if the airline changes its flights?
EditText blocked by keyboard when it is clicked
The question title may be misleading, but I have what I think is a common issue for Android newbies: I have an activity with a LinearLayout, and I have an EditText at the bottom of the screen. When I click on it, the keyboard appears over the EditText, hiding it while typing. Is there a way to achieve what most user expect, that is the activity gets scrolled down until the EditText becomes visible again?
Add the contents of your LinearLayout to a Scrollview and when the EditText view gets focused, manually scroll the ScrollView. Thats it.
0.777778
ScrollView EditText
How can I make particles rise softly?
I'm trying to make particles rise softly, as if floating on hot air. I've added drag, increased particle mass, and lowered wind strength, but it isn't getting slow enough. Is this just a matter of finesse (right wind strength/particle mass), or is there a trick to it or a certain setting necessary?
Instead of using wind etc. to blow the particles upwards, try disabling gravity for just the particles: In this case the emitter plane's normal is facing upwards, so the particles start with a initial upwards motion. I've also added a turbulence force field along with some random initial and brownian velocity, to give it a bit of randomness.
1
Disabling gravity for the particles
Is there a way to fill your tires with nitrogen?
I know this is a rather controversial issue. I was skeptical as well before doing this on my car, and I have not refilled my car tires for several months. Before that I needed to adjust the pressure every couple of months at least. Now I think it is a good idea to try this for our bikes. Especially since, when I see I need to fill up my bike tires, I get too lazy and give up the ride altogether. Is there a way to do this at home? EDIT: I thought I'd update the question for people who come and read later: Thanks for all the comments, I drive a lot (30kmiles/year) and I saw (to my surprise) a significant difference with nitrogen. I understand the reasoning with losing oxygen over time and increasing the N2 concentration but in practice that does not happen fast enough. I think I'll look into Helium/Argon and I'll update you if I managed to do something interesting. And I live in a small place I don't like to have a large pump but that is exactly why pumping is such a chore for me,
There is and I have done it with the same setup. I am a diver by trade and I experimented with the same setup. I used a SCUBA bottle and set the regulators with my calibration equipment. I got it to work but it the only value I got from it was knowing that it could be done. The N₂ was expensive, at least compared to air. The SCUBA regulators were expensive and they needed to be precisely set. Calibration is usually not accurate to 1PSI, which you would need. I also didn't want to haul the whole heavy potentially dangerous HP gas setup around with me. I dove with He on several occasions. That is even more of a hassle. The whole system would leak no matter what. It was because the Helium molecules are so small they can pass through cracks of pipe fittings no matter how tight the fittings were.
1
I used a SCUBA bottle and set the regulators with my calibration equipment
Are these adjoint functors to/from the category of monoids with semigroup homomorphisms?
Do the forgetful functors $G_H:\bf Monoid \to \bf Semigroup^1$ and $G_O:\bf Semigroup^1 \to \bf Semigroup$ have left and/or right adjoints? Here $\bf Semigroup$ is the category of semigroups with semigroup homomorphisms, $\bf Semigroup^1$ is the category of monoids (semigroups with identity) with semigroup homomorphisms, and $\bf Monoid$ is the category of monoids with monoid homomorphisms (the image of the identity is the identity). An interesting functor $F_H:\bf Semigroup^1 \to \bf Monoid$ is given by the functor which leaves the monoid objects unchanged, and modifies the homomorphisms by replacing the image of the identity by the identity of the target monoid. Is this a left or right adjoint functor to $G_H$? A nice functor $F_O:\bf Semigroup \to \bf Semigroup^1$ is the one which leaves monoids unchanged, and adjoins an identity element to semigroups missing an identity element. The homomorphisms are extended by mapping the newly adoint identity element to the identity element of the target monoid. Is this a left or a right adjoint functor to $G_O$, or both? A well known functor $F:\bf Semigroup \to \bf Monoid$ is the one which adjoins to each semigroup an identity (independent of whether it already has one), and extends the homomorphisms by mapping the newly adoint identity element to the newly adjoint identity element of the target monoid. I have seen the assumption (statement) that this is the left adjoint of the forgetful functor. Is this correct?
Functor $F\circ G_{O}:\mathbf{Semigroup}^{\mathbf{1}}\rightarrow\mathbf{Monoid}$ serves as left adjoint of functor $G_{H}:\mathbf{Monoid}\rightarrow\mathbf{Semigroup}^{\mathbf{1}}$. Does functor $G_{O}:\mathbf{Semigroup}^{\mathbf{1}}\rightarrow\mathbf{Semigroup}$ have a left adjoint? Let's say it has and let's denote it as $K:\mathbf{Semigroup}\rightarrow\mathbf{Semigroup}^{\mathbf{1}}$. Then the composition $F\circ G_{O}\circ K:\mathbf{Semigroup}\rightarrow\mathbf{Monoid}$ should serve as left adjoint of $G=G_{O}\circ G_{H}:\mathbf{Monoid}\rightarrow\mathbf{Semigroup}$. This according to the rule $\left(G_{O}\circ G_{H}\right)^{ad}=G_{H}^{ad}\circ G_{O}^{ad}$. Then $F$ and $F\circ G_{O}\circ K$ must be isomorphic functors (both left adjoints of $G$). However, if you start with an object $S\in\mathbf{Semigroup}$ having no identity and a finite underlying set, then $K\left(S\right)$ must have at least $1$ element more (the missing identity must be 'added') and $F\circ G_{O}\left(K\left(S\right)\right)=F\left(K\left(S\right)\right)$ will on its turn have $1$ element more than $K\left(S\right)$ (again an identiy is added). Then $F\circ G_{O}\left(K\left(S\right)\right)=F\left(K\left(S\right)\right)$ has at least $2$ elements more than $S$ in contrast with $F\left(S\right)$ that has exactly $1$ element more. This shows that the functors cannot be isomorphic. The conclusion is that $G_{O}:\mathbf{Semigroup}^{\mathbf{1}}\rightarrow\mathbf{Semigroup}$ has no left adjoint.
0.888889
Functor $Fcirc G_O:mathbfSemigrouprightarrowmh
How do I find the most populous cities in the world?
I am attempting to plot the most populous cities on a world map. Currently, I have the line of code: numberofpeople = Map[{#, Length[CityData[#, "Population"]]} &, CityData[All]]; which should give me the City name, and the population. However, when I type in the line of code Reverse[SortBy[numberofpeople, Last]][[1 ;; 20]] I am getting odd data, which is that the most populous cities have 1 person. Could somebody debug my code, and answer any future questions I have on the matter? Much appreciated. EDIT: How do I plot these points on a World Map? Currently I have Graphics[{EdgeForm[Black], , CountryData[#, "SchematicPolygon"]} & /@ CountryData[]] but I have no idea what goes between the points.
I was gonna post this as a comment but it'll be too long. As Mr. Wizard has shown you how to obtain the most popluar cities, here is how to plot them: Graphics[{{White, EdgeForm[Black], CountryData[#, "FullPolygon"] & /@ CountryData[]}, {PointSize[Large], Red, Tooltip[Point[Reverse[CityData[#, "Coordinates"]]], CityData[#, "Name"]] & /@ largeCities}}] Here, largeCities are the names of the cities without their populations. So you can do something like largeCities = Take[SortBy[numberofpeople, Last] // Reverse, 20][[All, 1]]
0.833333
How to get the most popluar cities
MapServer MapCache WMS
I just installed mapserver and mapcache on a Debian server. I struggled to put those two to work :D. Now when I call this url (by the way I don't know if it's the good one) //myserver/cgi-bin/mapserv/service/wms?map=/opt/basemaps/osm-google.map&mode=browse&template=openlayers, I get the map pat it is just a single image ! no tiles. If the map appears this means my mapcache works fine ? Is there anything i missed. ./mapserv -v MapServer version 6.5-dev OUTPUT=PNG OUTPUT=JPEG SUPPORTS=PROJ SUPPORTS=AGG SUPPORTS=FREETYPE SUPPORTS=CAIRO SUPPORTS=ICONV SUPPORTS=FRIBIDI SUPPORTS=WMS_SERVER SUPPORTS=WFS_SERVER SUPPORTS=WCS_SERVER SUPPORTS=FASTCGI SUPPORTS=GEOS INPUT=JPEG INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE Thank you Reagards
You have installed two separate programs: - MapServer that is a map engine - MapCache that is a tile cache for rendered images With your request you hit Mapserver (by using a peculiar Mapserver specific "browse" mode). The MapCache service will be found from another URL http://server/mapcache/? as you can see by reading the documentation http://mapserver.org/mapcache/index.html You will need to read the documentation in any case because you must configure Mapcache to read maps from the Mapserver side before you can make the whole factory to run.
0.777778
MapServer that is a map engine
I need help! PopUp with only OK button
I need help! I have an Ipad. A pop up came on my screen giving an htpp : ip adress and a nasty sexual message. There is only an OK button and I cannot close it. It seems to be have frozen my web browser . I'm using Safari. I read some examples on this site. I tried to download AVAST but finally I unstalled it. I cannot find ClamXAV. Should I click the ok button and then close all the Windows? Since I have no access to internet can I download G-Whizz Apps Browser? Can I have two browsers on the same Ipad, or will I loose all my favorites and stuff from Safari? I'm 61, not very familiar with all this computer language, but willing to learn even if I find this very difficult! p.s. Now I seem unable to send this message because I need a tag.... now what is a tag. I can see many suggestions so I will chose ipad, because this is what I have, but why I'm doing it, is a mystery???
Mobile Safari will disable the browser controls (new tab, back, etc.) when a JavaScript popup is opened. Unfortunately, this locks the browser until you press "OK" or "Cancel" (if available). To get rid of the popup without clicking "OK" or "Cancel": If you are in Mobile Safari, close it by pressing the home button. Kill Mobile Safari by double-tapping the home button to bring up the bottom panel, tapping and holding the Mobile Safari icon, and then tapping the minus sign (-) at the top left of the icon. Open the Settings app. Click on "Safari". Click on "Advanced" Uncheck/Turn off "Java Script" Go into Flight mode or turn the Wlan off Open Safari and close the tab (of the former bugging popup - it wont open this time, because JavaScript is disabled :-) ) Turn Wlan and Java Script on again enjoy the lack of the stupid popup in your Browser. ;-) So this way you dont have to clean your cache.
1
Mobile Safari will disable browser controls when a JavaScript popup is opened
How do I create a great fantasy villain that inspires the party to rally against them?
In my early years of GMing it was simple enough to say that the badguys were evil and that was all the justification we needed. They are attacking the village because they are evil, they are stealing the princess because they are evil, etc. Over time, my group needs have grown to need more complicated and detailed villains. It is important to consider motives. What is it that defines them as 'evil' to the party? In terms of a fantasy setting, what would you consider to be an interesting villain? What qualities make a villain that inspires your party to rally against him? What kind of villains have worked for your games in the past? Example: A member of nobility is using trade connections to move valuable pieces of art into another country that is secretly paying him quite well and is framing a member of the party to take the fall. In addition, someone important to the party member has been taken hostage with a promise of release once they party member takes the blame for the crime.
TSR has a "Villains Lorebook" on their website here that I think has some good example villains that can be mined for your use. AD&D had a book called the "Complete Book of Villains" that had good advice. A post about it here. Wolfgang Baur has a series about villains that I liked a lot. Click here. Here's more of the Baur stuff -- Wizards doesn't make it easy to find... Part 2 Part 3 Part 4 Part 5 Part 6 Part 7
1
TSR has a "Villains Lorebook" that has good example villains .
Is it safe to truncate a field revision table?
I noticed D7 creates a field_revision table for every field, and duplicates the content from its field table counterpart even if one has revisions turned off. I have a big text table and it is taking up a lot of space (several GBs). Would it be safe to truncate the revision table? PS: Meanwhile, I have also reported this as a bug.
You should have a look at this How I can delete all node/field revisions?, and perhaps subscribe to http://drupal.org/node/1063266#comment-5268252
1
How to delete all node/field revisions?
How do you run an installer?
we bought a CrashPlan-Install program for backing up the computer. Since I am still learning about Ubuntu, I don't know how to run the installer. These are the only instructions that I have- To install CrashPlan run the installer in this directory: ./install.sh Does this mean I need to create the directory? I know how to do that, but if that is the case where (or how) do you run the installer?
You downloaded a file named CrashPlan_3.5.3_Linux.tar.gz file from the website and stored this somewhere on your computer. Open a termimal and go to the directory you downloaded it into and type tar xvfz CrashPlan_3.5.3_Linux.tar.gz This will extract the file. After it is done cd into the directory it created and install... cd CrashPlan-install/ ./install It will then start installing CrashPlan. From their website: CrashPlan automatically starts up after installation and prompts you to create a new account. Enter the information and click Create Account. CrashPlan will send backup reports and notifications to the email address you enter. Extra: there is a README file inside the directory. Notable: NOTES: 1) CrashPlan for Linux uses the Sun Java Runtime Environment to run. If you do not have the Sun Java Runtime Environment installed, CrashPlan can download a version of the Runtime Environment and install it alongside CrashPlan itself. This will not overwrite your system's installed Java. 2) Once installed, the GUI can be launched by using the command 'CrashPlanDesktop', which will be linked from your chosen directory. If defaults are used, it will be: /usr/local/bin/CrashPlanDesktop 3) The background service, now called 'CrashPlan' which starts the backup engine, will be installed and setup to run from your designated directory. If defaults are used, it will be: /etc/init.d/crashplan and it will be linked from: /etc/rc2.d Note that on some flavors of Linux you may need to added the following to /etc/init.d/boot.local: /etc/init.d/crashplan start
1
CrashPlan for Linux uses the Sun Java Runtime Environment to run.
SQL Server repeated error with OPENROWSET
I am running the following query to import a csv file: SELECT * FROM OPENROWSET('MSDASQL', 'Driver={Microsoft Text Driver (*.txt; *.csv)};DBQ=D:\Documents\;', 'SELECT * from file.csv') AS something I am getting this error: OLE DB provider "MSDASQL" for linked server "(null)" returned message "[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified". Msg 7303, Level 16, State 1, Line 1 Cannot initialize the data source object of OLE DB provider "MSDASQL" for linked server "(null)". This is what I have done to try an resolve the issue, neither of which was enough: MsSQL and IIS have access to the folder and file in question. They also both have access to the temporary folder for Network Services under which SQL server is running. I have enabled Ad Hoc Distributed Queries using sp_configure I have fixed the registry key DisallowAdhocAccess by setting it to 0 I have installed Microsoft Access Database Engine 2010 Redistributable The system is a Windows 2008 Server running SQL Server 2012 Express, but the issue has been replicated with SQL Server 2008 as well. At this point any random ideas are appreciated :). Thanks!
The answer turned out to be quite simple, but very much underdocumented: the MSDASQL driver did not work together well with a 64bit installation of SQL Server. There is some more info about this in this thread but for my purposes, "downgrading" to a 32bit instance was a sufficient solution.
0.666667
MSDASQL driver did not work well with 64bit installation of SQL Server
What is the Evangelical Christian argument against Rob Bell?
I was surprised to read the comments on this meta question1 about Rob Bell. I don't know much about him (except I watched some of the NOOMA films). What is the Evangelical Christian problem with him? Why has he been called "heretical"? 1 I fully appreciate the irony of the question, in light of the meta question.
This article at Christian Post summarizes the controversy pretty well. The beginning of the disagreement came when Rob Bell published a book called Love Wins. In it, he espouses a theology of hell which many read as universalism, the idea that God saves everyone, and that hell is not eternal. In response, John Piper simply tweeted "Farewell, Rob Rob Bell." To compound matters, Bell resigned from the church he started - Mars Hill - to begin a speaking tour. As Rick Warren calls it, doing that created a situation in which there is "full visibility and no accountability." To phrase that far more bluntly, he was basically saying that Bell was neglecting the Gospel and becoming an "attention whore." In short, many prominent evangelicals find Bell's actions to be inconsistent with an authentic Evangelical witness.
0.888889
Rob Bell espouses a theology of hell which many read as universalism
Important non-technical course for programmers?
What kind of non-technical training course do you suggest for a programmer? Example could be public speaking course, presentation skill, English, business writing, or anything not related to programming or software engineering itself.
Any decent quality Work-Life Balance courses, workshops, or even books can be helpful to stress the importance, and remind us (all of us) how important it is in the long run to maintain a balanced life so we don't end up burnt-out, divorced, and suffering from major depressive disorder alone and laid off. In poor economic times it may be even more important, because of the tremendous pressure to cheat ourselves of this balance for what is typically a false hope of security (if the situation are really that precarious, it will mostly eventually fail anyhow). Avoid any training or seminars that are too gimmicky, or quick-fix oriented, but simple common-sense oriented balance is the best bet in my opinion.
1
Work-Life Balance courses, workshops, or even books can be helpful to stress the importance of maintaining a balanced life so we don't
C++: Access embedded resource from dll
I have a c++ dll project, in which, I have embedded some raw data through "resource.rc" file. IDR_TEMPLATE1 RCDATA "areaTemplate.bin" Now I want to access the data of "areaTemplate.bin" file from the dll. How can I read the contents of "areaTemplate.bin" in a byte array?
First use FindResource or FindResourceEx, then use LoadResource and LockResource. Use SizeofResource to get the size of datas. Code: HMODULE g_hModDll; [...] HRSRC hRscr = FindResource( g_hModDll, MAKEINTRESOURCE( IDR_TEMPLATE1 ), MAKEINTRESOURCE( RT_RCDATA ) ); if ( hRscr ) { HGLOBAL hgRscr = LoadResource( g_hModDll, hRscr ); if ( hgRscr ) { PVOID pRscr = LockResource( hgRscr ); DWORD cbRscr = SizeofResource( g_hModDll, hRscr ); } } Be sure to read the following remark about LoadResource: Remarks The return type of LoadResource is HGLOBAL for backward compatibility, not because the function returns a handle to a global memory block. Do not pass this handle to the GlobalLock or GlobalFree function. There is no "unlock resource" or "free resource" APIs. Remarks The pointer returned by LockResource is valid until the module containing the resource is unloaded. It is not necessary to unlock resources because the system automatically deletes them when the process that created them terminates.
0.777778
LoadResource returns handle to global memory block
Deploying Yesod to Heroku, can't build statically
I'm very new to Yesod and I'm having trouble building Yesod statically so I can deploy to Heroku. I have changed the default .cabal file to reflect static compilation if flag(production) cpp-options: -DPRODUCTION ghc-options: -Wall -threaded -O2 -static -optl-static else ghc-options: -Wall -threaded -O0 And it no longer builds. I get a whole bunch of warnings and then a slew of undefined references like this: Linking dist/build/personal-website/personal-website ... /usr/lib/ghc-7.0.3/libHSrts_thr.a(Linker.thr_o): In function `internal_dlopen': Linker.c:(.text+0x407): warning: Using 'dlopen' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking /usr/lib/ghc-7.0.3/unix-2.4.2.0/libHSunix-2.4.2.0.a(HsUnix.o): In function `__hsunix_getpwent': HsUnix.c:(.text+0xa1): warning: Using 'getpwent' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking /usr/lib/ghc-7.0.3/unix-2.4.2.0/libHSunix-2.4.2.0.a(HsUnix.o): In function `__hsunix_getpwnam_r': HsUnix.c:(.text+0xb1): warning: Using 'getpwnam_r' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking /usr/lib/libpq.a(thread.o): In function `pqGetpwuid': (.text+0x15): warning: Using 'getpwuid_r' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking /usr/lib/libpq.a(ip.o): In function `pg_getaddrinfo_all': (.text+0x31): warning: Using 'getaddrinfo' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking /usr/lib/ghc-7.0.3/site-local/network-2.3.0.2/ libHSnetwork-2.3.0.2.a(BSD__63.o): In function `sD3z_info': (.text+0xe4): warning: Using 'gethostbyname' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking /usr/lib/ghc-7.0.3/site-local/network-2.3.0.2/ libHSnetwork-2.3.0.2.a(BSD__164.o): In function `sFKc_info': (.text+0x12d): warning: Using 'getprotobyname' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking /usr/lib/ghc-7.0.3/site-local/network-2.3.0.2/ libHSnetwork-2.3.0.2.a(BSD__155.o): In function `sFDs_info': (.text+0x4c): warning: Using 'getservbyname' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking /usr/lib/libpq.a(fe-misc.o): In function `pqSocketCheck': (.text+0xa2d): undefined reference to `SSL_pending' /usr/lib/libpq.a(fe-secure.o): In function `SSLerrmessage': (.text+0x31): undefined reference to `ERR_get_error' /usr/lib/libpq.a(fe-secure.o): In function `SSLerrmessage': (.text+0x41): undefined reference to `ERR_reason_error_string' /usr/lib/libpq.a(fe-secure.o): In function `initialize_SSL': (.text+0x2f8): undefined reference to `SSL_check_private_key' /usr/lib/libpq.a(fe-secure.o): In function `initialize_SSL': (.text+0x3c0): undefined reference to `SSL_CTX_load_verify_locations' (... snip ...) If I just compile with just -static and without -optl-static everything builds fine but the application crashes when it tries to start on Heroku. 2011-12-28T01:20:51+00:00 heroku[web.1]: Starting process with command `./dist/build/personal-website/personal-website -p 41083` 2011-12-28T01:20:51+00:00 app[web.1]: ./dist/build/personal-website/ personal-website: error while loading shared libraries: libgmp.so.10: cannot open shared object file: No such file or directory 2011-12-28T01:20:52+00:00 heroku[web.1]: State changed from starting to crashed I tried adding libgmp.so.10 to the LD_LIBRARY_PATH as suggested in here and then got the following error: 2011-12-28T01:31:23+00:00 app[web.1]: ./dist/build/personal-website/ personal-website: /lib/libc.so.6: version `GLIBC_2.14' not found (required by ./dist/build/personal-website/personal-website) 2011-12-28T01:31:23+00:00 app[web.1]: ./dist/build/personal-website/ personal-website: /lib/libc.so.6: version `GLIBC_2.14' not found (required by /app/dist/build/personal-website/libgmp.so.10) 2011-12-28T01:31:25+00:00 heroku[web.1]: State changed from starting to crashed 2011-12-28T01:31:25+00:00 heroku[web.1]: Process exited It seems that the version of libc that I'm compiling against is different. I tried also adding libc to the batch of libraries the same way I did for libgmp but this results in a segmentation fault when the application starts on the Heroku side. Everything works fine on my PC. I'm running 64bit archlinux with ghc 7.0.3. The blog post on the official Yesod blog looked pretty easy but I'm stumped at this point. Anyone have any ideas? If there's a way to get this thing working without building statically I'm open to that too. EDIT Per Employed Russians answer I did the following to fix this. First created a new directory lib under the project directory and copied the missing shared libraries into it. You can get this information by running ldd path/to/executable and heroku run ldd path/to/executable and comparing the output. I then did heroku config:add LD_LIBRARY_PATH=./lib so when the application is started the dynamic linker will look for libraries in the new lib directory. Finally I created an ubuntu 11.10 virtual machine and built and deployed to Heroku from there, this has an old enough glibc that it works on the Heroku host. Edit: I've since written a tutorial on the Yesod wiki
You have several issues. You should not build production binaries on bleeding edge distributions. The libraries on the production system will not be forward compatible. You should not link glibc statically - it will always at runtime try to load additional libraries. For example cpu-based assembly. That is what your first warnings are about. The last linker errors look like they are related to a missing openssl library on the command line. But all in all - downgrade your distribution.
0.333333
Build production binaries on bleeding edge distributions
Can I use an Apple remote to control a keynote presentation?
Is it possible to use the Apple remote to control Keynote presentations? How so? I have a mid-2010 white plastic unibody MacBook. (I've been told that this isn't supported, but perhaps there are third party solutions.)
Yes - although most people are using the iOS based Keynote Remote these days, the old infrared (which is very thin / physically touchable and very reliable in dark rooms and easily hidden in a hand) works just fine. The Keynote '09 help shows what functions the various buttons will perform when you are in the various modes: Keynote window itself, presentation mode and slide switcher mode.
1
Keynote '09 help shows what functions the various buttons will perform when you are in various modes
Parsing Ids from a string to create detail objects
I am building a Flow that takes a user through a wizard to create a custom contract object with detail objects that represent the products on that contract (stored as a junction object). An issue I ran into is that Flow has a known limitation where if you use a Dynamic Choice (i.e. creating a dynamic set of checkboxes to choose Products from based on records from the Product object) it can only store the choices as a long semicolon delimited string in a variable; it cannot create detail objects based on your dynamic selection (even using a loop). To get around this, I want the flow to just create the parent Contract, then I want an after insert Apex trigger to parse the field where the long string of semicolon separated Product Ids are stored. The trigger would need to take the string and find each Id to store in a List. Once I had the List made from the text field I could insert the Product detail records to the parent Contract. I am very new to Apex, mostly just a point and click admin here. I am struggling with how to use RIGHT and LEFT to loop through the string field. trigger AddProductstoSOW on PS_Contract__c (after insert) { for(PS_Contract__c c:Trigger.new){ List<Id> ProductsToInsert = new List<Id>; integer n = LEN(c.Initial_Services_Products__c); for(p=15,p<n,p+17){ //How to iterate through Initial_Products_Selected__c? thisId = LEFT(p); Id product = Id.valueOf(thisId); ProductsToInsert.add(product); } } insert ProductsToInsert; } Any help is very appreciated.
You can use the String split method and split the concatenated string using the delimiter. something like this List<String> strProductIds = c.Initial_Services_Products__c.split(';');
0.888889
String split method
What is my lcd density?
How can I figure out what is my tablet's lcd screen density. It is a cheapy one with no official site... Is there any settings option I could check to see the display resolution configurations? Is there any other way for it?
You probably have a diagonal screen size, and a resolution. Use the Pythagorean Theorem on the resolution and divide the result by the screen size to get the DPI. For example, my Vibrant is 4", 800x480. sqrt(8002 + 4802) / 4 = ~233 dpi.
1
Diagonal screen size, and resolution
Do you start writing GUI class first or reverse?
I want to write my first Java program, for example Phonebook, and I wonder what to do first. My question is should I write GUI classes first or util classes first? I am database developer and want to know best practice in building program.
Start with the part of the project you find most interesting. If you start with the part you don't like you might quit before you make progress. Where you start is mostly a matter of preference so you might as well choose what you most want to work on.
0.555556
Start with the part of the project you find most interesting
What does chain worn indicators 75% mean?
I've bought a chain wear checker made by BBB, but not sure what the percentage of worn is about? It has 2 sides, one of them indicates that the chain is worn 75% and I should replace it in the near future. The other side shows, that the chain is 100% used and should replace it as soon as possible. My detailed question : What does these percentage mean? What is the equivalent of it in the metric system? Will 75% worn state affect my cogwheels also? Can I replace the chain to a new one without changing the drivetrain's other elements? I use a single-speed bike. Chain width is 1/8 inch. It consists 94 chain. (400km (250miles) / month)
The .75 is not 75% worn per se. A chain checker measures chain stretch. Chain stretch is an indicator or wear-and-tear. Parts of a drive train wear at different rates. For instance the teeth of the chainset will show wear when they become "shark-finned". But this could be long after the point at which you should replace a worn chain. If you persist in using a worn chain - though you may not notice anything detrimental - but when the chain eventually gives up - and you put a new chain on - you may find it skipping under load through the gears. This requires replacement of chain-rings / cassettes. An earlier replacement sought - would have prolonged the life of chain-rings / cassettes. As for your last question - it is difficult to say - if you ask a manufacturer - they will say no difference. Personally, I think the wider chains lasted longer and are stronger than the narrower 10/11 speed chains of today. Don't know of any exceptional single-speed chains ... just keep it well oiled and it will last longer.
1
Chain stretch is an indicator or wear-and-tear
When are Unity scripts actually disabled?
When I disable an active script in unity, will it be disabled then and there, or will it only be disabled at the end of the frame? For example, if I disable a certain script from within a "OnCollisionEnter" event method, will the "disabled" script still perform it's Update method for this frame?
I just tested this using the following code: void OnCollisionEnter( Collision collision ) { this.enabled = false; Debug.Log( "Collided with " + collision.gameObject.tag ); } void Update() { if( this.enabled ) { Debug.Log( "Enabled" ); return; } Debug.Log( "Disabled" ); } "Enabled" was displayed until the object came in contact with something, it outputted "Collided with tag". "Disabled" was never shown, proving that disabling/enabling an object takes immediate effect. It's probably just a flag that is checked when calling event methods. This is assuming that Update methods are called after OnCollisionEnter, which they, according to the Unity documentation, are.
0.888889
void OnCollisionEnter ( Collision collision)
3D array multiplication
I have arrays A and B both of dimension MxNxH. I would like to define a binary operator, to "multiply", such that the result is MxN dimensions. The equivalent operation would be: C = A[:,:,0] * B[:,:,0] + A[:,:,1] * B[:,:,1] + .... + A[:,:,H] * B[:,:,H] Is there a way to do this operation in a more efficient way? For example, using a built in function in numpy? I have tried tensordot, but this gives a different result.
The easiest is: C = numpy.sum(A * B, -1) I think this might work too: C = numpy.einsum("...i,...i->...", A, B)
1
C = numpy.sum(A * B, -1)
Sum of vlookup values on multiple sheets
Have 12 excel Sheets in a workbook for each month Jan-Dec. Each sheet contains Names and leaves marked for that month in the same row and sum value for each category of leave at the end of the table. I need to summarize these individual sheets value by looking for each person's Name in all sheets. how can I achieve this in excel.... I tried sum of vlookup from all sheet, it throws error or no result.
It may be simpler using SUMIF here because SUMIF won't give an error if the person isn't found on any particular sheet (although all sheets need to exist), so if you have sheets "jan" through to "dec" try this formula for the 12 month total =SUM(SUMIF(INDIRECT({"jan";"feb";"mar";"apr";"may";"jun";"jul";"aug";"sep";"oct";"nov";"dec"}&"!B8:B110"),B8,INDIRECT({"jan";"feb";"mar";"apr";"may";"jun";"jul";"aug";"sep";"oct";"nov";"dec"}&"!AL8:AL110"))) You can shorten that by using a named range, e.g. Sheetlist ={"jan";"feb";"mar";"apr";"may";"jun";"jul";"aug";"sep";"oct";"nov";"dec"} then formula becomes =SUMPRODUCT(SUMIF(INDIRECT(Sheetlist&"!B8:B110"),B8,INDIRECT(Sheetlist&"!AL8:AL110")))
0.777778
SUMIF gives an error if the person isn't found on any particular sheet
.CIO section MSP430
In memory allocation window of Code composer studio 6.1 I see 288 bytes of .CIO section. What is this segment and how I can remove it. Linker file lnk_msp430f2619 has mention of .CIO section. But where I can make this zero byte section. .bss : {} > RAM /* Global & static vars */ .data : {} > RAM /* Global & static vars */ .TI.noinit : {} > RAM /* For #pragma noinit */ .sysmem : {} > RAM /* Dynamic memory allocation area */ .stack : {} > RAM (HIGH) /* Software system stack */ #ifndef __LARGE_DATA_MODEL__ .text : {}>> FLASH /* Code */ #else .text : {}>> FLASH2 | FLASH /* Code */ #endif .text:_isr : {} > FLASH /* ISR Code space */ .cinit : {} > FLASH /* Initialization tables */ #ifndef __LARGE_DATA_MODEL__ .const : {} > FLASH /* Constant data */ #else .const : {} > FLASH | FLASH2 /* Constant data */ #endif .cio : {} > RAM /* C I/O Buffer * /
According to the CCS user guide: Console I/O (CIO) functions, such as printf, require the use of a breakpoint. If these functions are compiled in, but you do not wish to use a breakpoint, disable CIO functionality by changing the option in Project → Properties → CCS Debug Settings → Target → Generic Debug Options → Enable CIO function use. According to the TI Forums: The Debug project properties control if the CCS debugger attempts to perform CIO, and not the allocation of the .cio section on the target. To prevent the .cio section being allocated on the target you have to ensure there are no calls to run time library functions which use CIO, e.g. ensure there are no calls to printf() in the code. Later on it mentions: Turns out I had some _assert(0) statements in one of my libraries. This would in turn bring in stdio, which would demand a .cio section, consuming ~400 bytes of RAM. Mind which libraries you use.
0.777778
Configuration I/O (CIO) functions require use of a breakpoint
How can I find out which server OS a particular site is running?
Is there a way to check which server OS a particular site is running. For example from linux command line. Maybe via telnet? But all I can get from "telnet www.google.com http" is: Trying 209.85.173.104... Connected to www.l.google.com. Escape character is '^]'. Can somebody dwell on the subject if possible at all?
You can look for OS fingerprinting functionality built into NMap. However, if you're looking for something like "What is Google running?" you won't get far since you won't know what's behind their load balancers, or firewalls will block it, and fingerprinting can only be so accurate so you can get false reports back and you may not get anywhere when the connection is somehow NAT'ed.
1
NMap fingerprinting can only be so accurate so you can get false reports back
Superlatives with "the"
What is the rule regarding using the with superlatives? For example: John is the fastest among his friends. John is fastest among his friends. Both appear to be correct. I have seen both formats in a variety of places.
Both are indeed correct. An article is only necessary in the superlative (or comparative) if the adjective is attributive (i.e. is in the same phrase as the noun it is describing). Consider the following examples: Example #1: John is the fastest boy. *John is fastest boy. Example #2 John is the fastest among his friends. John is fastest among his friends. As is shown in the examples above, omitting the in #1 causes it to become ungrammatical, as the superlative fastest is in the same phrase as its noun boy. In #2, however, the may be freely omitted as it is not attributive. Some English superlatives, however, use the adverb most, which can cause some amount of confusion. Consider the following examples: Mary is the most beautiful. Mary is most beautiful. Mary is a most beautiful woman. All three of these examples are grammatical and show the overlap of an adverbial intensification with the superlative. With the definite article the, it can only be a superlative, but with the indefinite article a it can only be interpreted adverbially (i.e. essentially the same as "very beautiful"). Both of these forms, however, allow omission of the article, and so the meaning of #2 is left ambiguous. Note that there is a third form which is related to the superlative known as the elative. While it is not a separate inflection, it can be shown to exist in constructions such as the following: It is with the greatest pleasure [...] This sentence is generally understood not to mean with a pleasure greater than any other, but rather something more akin to with extreme pleasure.
1
An article is only necessary in the superlative (or comparative) if the adjective is attributive
How do I find which elements in one array aren't in another?
I am new to programming and hence I am stuck on a basic level problem. Following is code I wrote for comparison. But the result I get does not make sense to me. I would appreciate if someone could tell me what is going wrong. There are two arrays: @array1 , @array2 of unequal length. I wish to compare both and list down values not present in @array1. my %temp = map {$_,$_}@array2; for (@array1){ next if exists $temp{$_}; open (FILE, ">>/filename") or die "$!"; print FILE "$_\n"; close(FILE); }
See the FAQ How do I compute the difference of two arrays? How do I compute the intersection of two arrays? Adapting the code you posted: #!/usr/bin/perl use strict; use warnings; my @x = 1 .. 10; my @y = grep { $_ % 2 } @x; my %lookup = map { $_ => undef } @y; for my $x ( @x ) { next if exists $lookup{$x}; print "$x\n"; }
1
How do I compute the difference of two arrays?
Control 8V H-Bridge with microcontroller
Good afternoon. I've been trying to control an 8V H-Bridge (PMOS+NMOS) with a 4V microcontroller output signal. I thouth it would work but then i read that the PMOS source voltage had to be equal or smaller than the control voltage in the PMOS/NMOS gates. Does somebody know how to deal with this problem (without adding much more electronics)?
You can't drive the PMOS transistor directly like that. Remember that the gate voltage is always referenced to the source terminal, so if you apply 8V to the source and 0-4V to the gate, the gate-source voltage varies between -8V and -4V. In other words, the PMOS can never shut off, because it's gats-source voltage never goes to zero. To fix this, you need to create a "level shifter" for the PMOS gate signal. There are many ways to do this; one of the easiest is to purchase a driver chip designed specifically for the task.
1
How to drive the PMOS transistor directly?
What is the torque and sequence for a '99 Jetta Oil Pan?
I have a '99 Jetta TDI (diesel) with a cracked oil pan. I'm looking for the sequence of tightening the bolts and the torque needed for each bolt. I've been doing to google-fu but can't seem to find it. Does anyone specifically know these details, or where I can maybe find this? Note: Can someone with priv please put 'oil-pan' and 'bolt-sequence' as tags :)
Oil pans don't have a specific bolt sequence like a cylinder head or crankshaft bolts. This link should be helpful: TDIClub Forums - View Single Post - frequently asked torque specs: Use Silicone sealant D 176 404 A2 Removing Remove center, left and right sound insulation trays: Drain engine oil. Remove securing bolts for oil pan. Loosen oil pan with light blows of a rubber-headed hammer, if necessary. Remove oil pan. Remove sealant residue on cylinder block with a flat scraper. Remove sealant residue on oil pan with a rotating brush, e.g. a drill motor with a plastic brush (wear eye protection). Clean sealing surfaces. Surfaces must be free of oil and grease. Installing Note: Observe the use-by date of the sealing compound. The oil pan must be installed within 5 minutes of applying the silicone sealing compound. Cut off tube nozzle at forward marking (approx. nozzle diameter: 3 mm). Apply silicone sealing compound, as shown, to clean oil pan sealing surface. Sealant bead must be 2 to 3 mm thick Run along inner side of bolt holes The sealing compound bead must not be thicker, otherwise excess sealing compound will enter the oil pan and may block the oil suction pipe strainer. Apply silicone sealant bead carefully as shown to areas marked by arrows. (Illustration shows position of sealant bead on cylinder block). Install oil pan immediately and tighten all oil pan bolts lightly. The oil pan must be flush with the cylinder block. Tighten oil pan bolts to 15 Nm. Tighten oil pan/transmission bolts to 45 Nm. Let the sealing compound dry for approx. 30 minutes after installing the oil pan. Only then fill the engine with oil. Further assembly is basically the reverse of the disassembly procedure.
1
Sealant bead must be 2 to 3 mm thick
Android setOnItemClickListener
I'm not able to initiate the "OnItemClickListener". You can see my code snippet ListAdapter adapter = new SimpleAdapter(this, mylist , R.layout.main, new String[] { "title"}, new int[] { R.id.item_title}); setListAdapter(adapter); final ListView lv = getListView(); lv.setTextFilterEnabled(true); lv.setOnItemClickListener(new OnItemClickListener() { public void onItemClick(AdapterView<?> parent, View view, int position, long id) { @SuppressWarnings("unchecked") HashMap<String, String> o = (HashMap<String, String>) lv.getItemAtPosition(position); Toast.makeText(TopNewsActivity.this, "ID '" + o.get("id") + "' was clicked.", Toast.LENGTH_LONG).show(); } }); after the setListAdapter my debugger goes to "lv.setOnItemClickListener" but then does not get into the loop and moves out. I want to make the links Clickable kindly help.
bbalazs is right. I would like to put it more precisely: If you have a view A as a child of a view B and A is by default clickable(button f.e.), than setOnItemClickListener won't work on B. It is pure magic, but it works so.
0.777778
SetOnItemClickListener doesn't work on B
Manipulate SearchCenter how showing the results
is it posible to manipulate the searchcenter result list? I need for results from a special library an other Link or another name field. For Test i need an other Field e.g. a Userdefiend Title and i must manupulate the URL from the HyperLink. Thanks Mario
The display of the results on controlled by XSLT in the Core Results web part. For a start on how to change it follow Walkthrough: Add a Tab and Custom Search Page with Enterprise Search Web Parts to the Search Center you can skip the add tab and create pages part (and yes it also applies to SharePoint 2010)
0.833333
Add a Tab and Custom Search Page with Enterprise Search Web Parts
Real time PCR normalization algorithm
When performing normalization of real time PCR results, I found two ways of doing it: In my lab they follow the next layout: $\text{Efficiency}^{-(CT\ _{\large\text{interest gene}} - CT _{\large\text{ housekeeping}})}$ each time controls with controls and treatments with treatments. Then they divide the all values (treated and controls) each with controls. On the other hand I found another way to normalize that follows this steps: $\text{Efficiency}^{(CT_{\large\text{control}} - CT_{\large\text{treated}})}$. Then you make the same for the normalizing gene and divide the first by the last. The values obtained are similar but not exact. Also I noticed that first algorithm gives rather different values for most diluted when performing a standard curve. Which is correct?
This topic could probably have it's own StackExchange, there is so much info and trial and error done with rtPCR. Here's my 2 cents: Your adjusted calculation does not normalize your data, it just subtracts the 'background' or control. For expression studies this is not good enough. Normalizing data for gene expression must involve setting it to a scale of another gene whose expression should be not only present but consistent between your treated and untreated samples. House keeping genes (you are probably using GAPDH) make good candidates for this because their expression rarely changes. If you don't normalize than you don't know if your your expression is actually changing, or if it's simply due to a larger input of mRNA. However it must be shown that the housekeeping gene's expression is also not changing, this is usually accomplished using a different sample set. Take if from me, I've done a lot of this and this step is one of the most important in your experiment. Any reviewer who knows what he's doing will reject a paper using rtPCR without the proper statistics. I have had a lot of success using Applied Biosystems StepOne software to provide you with accurate Ct values. Generating the variable is complication, use software to do it right every time: http://www3.appliedbiosystems.com/cms/groups/mcb_support/documents/generaldocuments/cms_042380.pdf What method/system are you using?
1
Normalizing data for gene expression must involve subtracting the 'background'
Network database access - How do I connect to a remote database?
I am able to connect to a specific MS Access Database when it is on the same Windows computer as Mathematica via the command << DatabaseLink`; conn = OpenSQLConnection[JDBC["odbc", "Databasename"]]; However, I cannot figure out how to connect to this database over a local area network -- disregarding trivial network problems (the computers can ping eachother), is this even possible?
Empirically, it is not possible to directly connect Linux (and therefore also not MMA under Linux) to a MS Access data source in an acceptable amount of time. An alternative solution is to migrate the .accdb -> MySQL DB, which then can be queried platform independently. How to connect to this DB is described in the MMA documentation (works out of the box). The migration step is, according to MySQL whitepapers, easily possible - I will update this post if this is the case. MS Access can still be used as a convenient frontend to the MySQL DB.
1
How to directly connect to MS Access data source
How do indirect, session-specific resource tokens increase security?
The OWASP web site recommends this: Use per user or session indirect object references. This prevents attackers from directly targeting unauthorized resources. For example, instead of using the resource’s database key, a drop down list of six resources authorized for the current user could use the numbers 1 to 6 to indicate which value the user selected. [italics mine] Check access. Each use of a direct object reference from an untrusted source must include an access control check to ensure the user is authorized for the requested object. [italics mine] So if a user doesn't have access to the requested resource, how does obfuscating the direct object reference improve security? Given the increased complexity that, say, an ASP.NET MVC site would accrue, is this worth the additional trouble for anything but banking sites?
I will explain this by giving an example: Suggest you have a list of objects in your database named: Pear Apple Orange You have a query which fills up a hash table stored in your session which maps the fruits you are authorized to have to a number: 1 => Pear 2 => Apple You do not have access to Orange. You then have a function which allows you to add fruits to a basket, so you choose a number 1 or 2 (this is the indirect object reference). Orange is not accessible in this session as it's not present in the hashtable (there is no number 3). With direct object reference you would have a function which just uses Apple, Pear, Orange rather than a number. So you could abuse the function (if no access controls are used) to add the Orange to your basket as well. I personally do not see issues with direct object reference IF adequate access controls are in place. These access controls should be tested extensively. There might be more critical applications than others where this might be required, but imagine applications where there are thousands of users with each 100 or 1.000 options unique to them. Storing all of these in a session could have a significant impact on performance (considering the server will need to store this information for each client on the webserver). Now to answer your first question: simply because it won't be loaded into the session. As in my hashtable example you simply won't have orange available.
1
Adding orange to a hash table
Can I limit the time a table lock is being held server side?
I have a SQL Azure server with some stored procedures with TABLOCKX hints that I call from C# code on a Windows Azure web role VM. I'm kinda paranoid about those hints - what if there's some network protocol failure and the transaction doesn't end or something like that and a lock is held forever and all invokations of that stored procedure block on the statement with the TABLOCKX hint and all my stuff comes to a halt. Is it somehow possible to tell SQL Server that the lock should not be held for more than say one minute so that it is unconditionally released after that time?
You can explicitly specify using : SET LOCK_TIMEOUT timeout_period timeout_period Is the number of milliseconds that will pass before Microsoft SQL Server returns a locking error. A value of -1 (default) indicates no time-out period (that is, wait forever). When a wait for a lock exceeds the time-out value, an error is returned. A value of 0 means to not wait at all and return a message as soon as a lock is encountered. At the beginning of a connection, this setting has a value of -1. After it is changed, the new setting stays in effect for the remainder of the connection. The setting of SET LOCK_TIMEOUT is set at execute or run time and not at parse time. The READPAST locking hint provides an alternative to this SET option. CREATE DATABASE, ALTER DATABASE, and DROP DATABASE statements do not honor the SET LOCK_TIMEOUT setting. Refer to : Support for SET statements in Azure UPDATE: Is it somehow possible to tell SQL Server that the lock should not be held for more than say one minute so that it is unconditionally released after that time? No. As I mentioned in the comments section. THe database wont be able to maintain its ACID properties. Either the query fails and returns an error or the lock is held by SQL Server until the transaction is completed and then released.
1
SET LOCK_TIMEOUT timeout_period
possible different ways to get the kanto starters and ways to get fossils in x and y
hi there I was wondering if you guys would happen to know the most effective ways to get the kanto starter pokemon because using friend safari seems kind of ineffective and slow. also how would one obtain fossils aside from the original glittering cave ones thanks
Just go to the Glittering Cave and grind for fossils in the big boulder room.
1
Go to the Glittering Cave and grind for fossils
Wordpress - Custom taxonomy page of custom post type listing by terms
I have a taxonomy-taxonomy.php page that needs to look like so: CUSTOM POST TYPE TITLE (RESOURCES) Custom Taxonomy 1 (Resource Types) Resource Type Term 1 (White Papers) White Paper post 1 White Paper post 2 White Paper post 3 Resource Type Term 2 (Videos) Videos post 1 Videos post 2 Videos post 3 Tried to make sense of all the new documentation for Wordpress 3.0, but it only made me more confused as it seems to be mixed up with 2.8.
Hey manon1165 , I actually just accomplished this. Was a huge pain, hopefully my code snippet will help! I made a custom page template. And did something along the lines of <?php $categories = get_terms('taxonomy-name', 'orderby=name&hide_empty=0'); $cats = object_to_array($categories); ?> Now, just print_r($cats) and you will see the array of the categories. You will need to convert the object to an array, I did so with. function object_to_array($data) { if(is_array($data) || is_object($data)) { $result = array(); foreach($data as $key => $value) { $result[$key] = object_to_array($value); } return $result; } return $data; } I did <ul id="cat-list"> <?php foreach($cats as $cat) { ?> <li><a href="/taxonomy-name/<?php echo $cat['slug']; ?>"><?php echo $cat['name']; ?> (<?php echo $cat['count']; ?>)</a><br><?php echo $cat['description']; ?></li> <?php } ?> </ul> Hope that helps!
1
How to convert the object to an array?
Laravel eloquent how to order collection by accessor in appends array
I have following Eloquent model: class Song extends Eloquent { protected $table = 'mg_songs'; protected $hidden = array('events'); protected $appends = array('lastDate'); public function events() { return $this->belongsToMany('Event', 'song_event'); } public function getLastDateAttribute() { if (!$this->events) return null; return $this->events[0]->date->formatLocalized('%d.%m.%Y (%a, %Hч)'); }} Is it possible to sort by "lastdate" field same as db field: $songs->orderBy('title', 'asc'); - works $songs->orderBy('lastDate', 'desc'); - doesn't works May be exist simple answer? EDITED: My db structure (only needed fields), with many-to-many: events table event_id date songs table song_id title song_event pivot table id song_id event_id SQL-request: SELECT s.title, (SELECT MAX(e.date) FROM events e JOIN song_event se ON (e.id = se.event_id) WHERE se.song_id = s.id) AS s_date FROM mg_songs s ORDER BY s_date desc
You can sort the resulting collection by accessor, obviously the query can't be ordered, for it's not in the db. $songs = Song::all(); // get the result $songs->sortByDesc('lastDate'); // sort using collection method // or ascending: $songs->sortBy('lastDate'); You could achieve the same using joins, if you prefer to do this in the db call (it's better in terms of performance). Another thing: you use if( ! $this->events) which will cause trouble soon. Check this out: // hasOne / belongsTo / morphTo etc - single relations $model->relation; // returns related model OR null -> evaluates to false // BUT for hasMany / belongsToMany etc - multiple results $model->relation; // always returns a collection, even if empty, evaluates to true So change this if to: public function getLastDateAttribute() { if ( ! count($this->events)) return null; return $this->events[0]->date->formatLocalized('%d.%m.%Y (%a, %Hч)'); }}
0.666667
Sorting the resulting collection by accessor
So gravity turns things round
It makes sense, since gravity tends to push the surface of a body towards it's center. Unless I'm mistaken, everything with mass has it's own gravity, every atom and for instance, our own bodies should also have their own gravity. The question is: how strong is our own gravitational pull? I know it must be extremely weak, but is there actually anything at all that gets attracted to us, like maybe, bacteria or molecules? And finally (this will sound ridiculous, but I'd really want to get an answer or at least a way of calculating it myself): What size would a human body have to reach in order for it to collapse into a sphere?
Well, more or less, the size of a planet... :) There are fu*** big asteroids out there that aren't big enough to get spherical shape. Also, it will help if most of the planet is gas or liquid. You can calculate the forces classically by Newton's expression for gravitational force: $$\vec F=-G\frac{Mm}{r^2}\vec u_r$$ $G$ is Newton's constant: $G\approx6.67\cdot 10 ^{-11}$ in IS units. You can see it's really week, compared to the constant of electrical force: $k\approx 9\cdot10^9$. $M $ and $m$ are the two masses between you want to calculate the force. $r$ is the distance between them. $-\vec u_r$ indicates the force is attractive. So, the size of the person, well, a million things happens before the size is big enough to collapse in a sphere, like broken bones. You would need to know how resistent tissues are before they brake and so no, but I would go for a good approximation, that it's the order of the size of the moon (probably less than that), like 2 or 3 orders og magnitude smaller.
1
Calculate the forces classically by Newton's expression for gravitational force
Why does the C++ standard algorithm "count" return a ptrdiff_t instead of size_t?
Why is the return type of std::count a ptrdiff_t? Since count can never be negative, isn't size_t technically the right choice? And what if the count exceeds the range of ptrdiff_t since the theoretical possible size of an array can be size_t? EDIT: So far there is no suitable answer as to why the function returns ptrdiff_t. Some explanation gathered from the answers below is that the return type is iterator_traits<InputIterator>::difference_type which is generic and can be anything. Up until that point it makes sense. There are cases where the count may exceed size_t. However, it still does not make sense why the return type is typedef ptrdiff_t iterator_traits<InputIterator>::difference_type for the standard iterators instead of typedef size_t iterator_traits<InputIterator>::difference_type.
If the iterator was an array, it would imply the result is within the range of the array. For this specific algorithm I can't think of a reason that is interesting. For someone using this as a component it may be interesting, though. The page does say that it would do something equivalent. So for the case of an array it may do something like a direct pointer difference. This would be a pretty fast specialization if it were applicable.
0.666667
If an array was an array, it would imply the result is within the range of the array
Does a terminator have a form of self-preservation or prohibition against suicide?
This weekend I was watching Terminator 2 (editor cut). In the end, after T-1000 is destroyed, Arnold asks Sarah and John to destroy him by melting and says "I cannot destroy myself". So, what does this mean? The terminator cannot destroy himself unless it is absolutely necessary in order to succeed in his mission (like protect John?)? In that case, what was the Terminator in part 1 going to do after the success of his mission (i.e. destroy Sarah)? Just live a long happy life and wait for Skynet arise? Update: I understand that this is not the exact Third law of Asimov, since the terminators definitely don't follow the First or Second law. Let's call it the law of self-preservation. Does terminator have a form of self-preservation to some point and the prohibition of suicide?
To Arnold maybe, but certainly not to all Terminators proven by the second part of the law: "... as long as such protection does not conflict with the First or Second Laws". Now the first two laws are about protecting humans, which given the name would suggest they were not programmed to do so. There is an instance in the latest movie where one of the machines terminated itself. This was when they were testing the magic signal. While it wasn't a "terminator" it came from the same place and therefore had the same programming. The difference with Arine is that he was reprogrammed by the Humans and therefore could have had the three laws apply. So I would say terminators are not bound by the third law in any way.
1
Terminators are not bound by third law in any way
Alto singing Tenor
I am currently musically directing a community theater production of Sweeney Todd. We have cast a female to play the part of Toby, and in the song "Not While I'm Around", she is not able to achieve sufficient volume on the opening notes of the number. The song starts on an Eb, moves to F, then Eb, Ab, and Bb. She has a great tenor timber to her voice, and once she gets up to the Ab, she sounds great. We have 16 days until the show opens, and my question is twofold. First, are there any good exercises that a singer can do in order to improve the volume on the low end of their range? Second, if it comes close to performance time, what does music theory have to say about these two choices: changing the melody to something like Ab, Gb, Ab, Ab, Bb, or having her begin the song an octave higher, and then on the third line of the song change back to the original octave? I personally do not like how the second choice sounds, as it seems to bring about a very drastic change, but I am wondering if there is precedence for something like this, or if conventional musical theory has anything to say. Here is the first two bars, which is repeated in the next two bars:
Not knowing the song, but assuming the beginning is too low, and the key changes are all upwards, which is usual, I'd start in maybe the 2nd key, and either lose a key change, or go up another time, if the duetter can cope. Changing key for a song is, as jjmusicnotes points out, very common - I did it all the while when playing for choirs, often to get a better sound from them, instead of having them screaming at the top of their range, or grunting in their boots. Seeing the total song may give other options. The above options may also not be good for accompanying musicians. Since the start comes straight after some narrative (I'm guessing), the easiest would be to speak the first bit, before bursting into song, maybe on the second or third line.
1
Changing key for a song is very common, as jjmusicnotes points out
Java and JVM license
Does Java license allow other companies to create their own versions of Java language or just implement it accurately? Same question about JVM. I heard about Sun suing Microsoft for changing their .NET version of Java implementation and Java for Google Android, but I just can't grasp the whole concept as a totality.
You can write a compiler that implements the Java Language Specification or write a JVM that implements the Java Virtual Machine specification, but when you officially want to call it "Java", you have to prove it is compatible by passing the tests of the TCK (technology compatibility kit) and pay for a license from Oracle. Oracle doesn't make it easy for other parties to do this, though. Apache has their own implementation of the JVM (Apache Harmony) but previously Sun, now Oracle, is not cooperating in making the TCK available nor let Apache get a license, which has led to a lot of resentment between Apache and Oracle. Long ago Microsoft had their own version of Java (that was indeed called "Java"). They tried to change it to make it Windows-specific, which Sun of course didn't like. Microsoft lost, quit their own Java version and created .NET, which is a completely different thing that just happens to work a lot like how Java works... The lawsuit about Android isn't based on this at all; Google isn't saying that Android is Java. That lawsuit is about patents; Oracle has patents on a number of ideas and concepts in their own JVM implementation and is claiming that Google is using the same patented ideas in Android without getting a patent license from Oracle.
0.666667
Oracle doesn't make it easy for other parties to do this, though
How do I counter support Zyra?
I main support, usually opting for poke supports such as Lulu and Sona or aggressive supports such as Blitzcrank and Leona. Since the various Regional Finals, however, I've begun to encounter support Zyras in my bot lane. This is a very difficult lane for me. I can't establish lane dominance, since Zyra just sits in her bush and puts seeds in mine. I've tried a rune page with flat MR for when I play against Zyra to counter some of her harass, but it doesn't help against her cc. How can I effectively counter a support Zyra?
Look for best counters to Zyra her: http://www.picklol.net/zyra, so I would pick Lux against her. because of stun and harras!
0.777778
Look for best counters to Zyra her
How does our work on this earth transfer into the new earth when God returns?
I recently read Every Good Endeavor by Tim Keller and also Surprised by Hope by N.T. Wright. Both are amazing books, focused on the resurrection theology that God will raise up a new heaven and a new earth, and we will dwell in the presence of God, not just sitting around, but living life with new redeemed bodies and doing redeemed work that isn't corrupted by sin. The ideas of heaven are very exciting: that we won't be just sitting around playing harps, but will live much like we do currently, although without the corruption of sin and in the presence of God. Another exciting theme in these books is that the work we do here matters towards the new heaven and new earth, and will be redeemed and made full when God comes. While this is exciting to me, it is also very confusing. Can anybody shed some light into how the work we do here transfers to Gods kingdom, even if it is "secular" in nature?
John 3:5,6 Jesus answered, Verily, verily, I say unto thee, Except a man be born of water and of the Spirit, he cannot enter into the kingdom of God. That which is born of the flesh is flesh; and that which is born of the Spirit is spirit. Jesus here is instructing Nicodemus, which in verse 10 He says: “Art thou a master of Israel, and knowest not these things?” The interesting thing here is that Jesus is chastising Nicodemus for not knowing that one has to be “born again” before His (Christ’s) completed work on the cross. In the book of Hebrews chapter 11 we know that those that lived before the cross received a good report by faith. Revelation 20:12 And I saw the dead, small and great, stand before God; and the books were opened: and another book was opened, which is the book of life: and the dead were judged out of those things which were written in the books, according to their works. First Corinthians 3:13-15 Every man's work shall be made manifest: for the day shall declare it, because it shall be revealed by fire; and the fire shall try every man's work of what sort it is. If any man's work abide which he hath built thereupon, he shall receive a reward. If any man's work shall be burned, he shall suffer loss: but he himself shall be saved; yet so as by fire. The Book of Life appears to be an eternal genealogy, where the “books” seem to record ones life works, either born of the Holy Spirit or conceived and born outside of the will of God the Father and of the Holy Spirit. So in answer to the question: Fire is the agent that separates eternal substance from temporal substance, this is also true with our life works as well. Fire typically depicts God's judgement.
0.888889
Nicodemus is chastising for not knowing that one has to be “born again” before His (Christ’s) completed
Is a Photoshop EPS file a vector format?
If I save my file from Photoshop as a Photoshop EPS is that going to be okay as a vector across the board (ie will it be resizeable in whatever it's opened in)? I know if you open a .psd in Photoshop and resize the image, it holds it's quality, so that's fine, but when people need an EPS file because they might want to print it on the side of a building one day (or whatever) is a Photoshop EPS going to be okay? Or is there something else I need to be doing? All my designs are always vectors within Photoshop, so text/shapes/designs done with the pen tool - I just need to know that they'll still be a vector for people who don't have Photoshop and can't open it in there to resize it.
EPS, is an acronym for Encapsulated Post Script - it is a package of information (vector and raster elements) used for cross-platform print documents. Most would considered this a legacy format, well supported for print. In terms of vector information - it is probably the best choice for what you describe, Willow. The EPS format can be used for RGB images - but in fact EPS will never be efficient for rgb, as it is designed for post-script print files. Your vector images will always be printable as EPS, but it's not a particularly efficient file format and if you do include raster images, the transparency is not well accomodated (as you may have to save the alpha channel separately) There should be a go-to summary of file formats and their strengths and weaknesses. For example, you are incorrect about PSD files and resizing. All raster images will pixelate when enlarged.
1
Encapsulated Post Script is a package of information used for cross-platform print documents.
Should you optimize mobile experiences based on individual handedness?
In abbood's question "How to implement a stack exchange style voting for mobile?" he answers his own question with the following mock-up: My immediate thought was that the up-vote control was on the wrong side. Why? Because my feeling is that up-votes happen more often than down-votes (because something not interesting is not worth wasting a click on) and the primary action on mobile should be on the left. But that got me thinking. I'm a lefty, so when I hold my phone (in my left hand) it's easier to reach the control on the left, hence my thought to put the primary control on the left side. But for a righty, it would be easier to reach the right-sided control. This may be a trivial example, but if you have a UI that requires a lot of tap-based input it could make quite a difference on which side the most-used action is located. My question: should you optimize mobile experiences based on individual handedness? Has there been any research on this and is this practically possible? Adding a setting which mirrors controls seems possible, but is there a way to detect this and do this automatically? Using the accelerometer perhaps, or maybe by measuring the speed to click depending on distance from either side?
(EDIT: The question was clarified a bit since my first response) I'm not aware of any research into handedness-based layouts. It sounds like an interesting idea and, as a lefty, I'd fall all over any app that catered to my inability to use my right hand like a normal person. However, I would caution that from a practical standpoint, you could probably not optimize for handedness in an automated fashion. To see why, let's suppose you used the accelerometer and were able to detect the hand being used 100% of the time. Perfect, except that you're measuring the wrong thing! The hand using the mobile device is not necessarily the dominant hand. Ever use your phone with your off-hand? Bam! Your app's interface is completely backwards, hindering rather than helping your user. In other words, handedness does not determine behavior. So the best, most consistent way to do this would be to create a setting and send your lefties there. Maybe you could use the accelerometer for this purpose, for example, "it looks like you may be left-handed, would you like to switch to a left-handed layout?" I do not know the feasibility of using the accelerometer for this purpose, but it seems like it would not be trivial. In my original response, I talked about the value of avoiding interactions with an obvious handedness, which I think still applies. (A) Your customers might not want to or know how to change settings (good defaults are important!) and (B) you'd make the job of customizing your UI that much easier. Take the iPhone's slide to unlock or slide to power down as an example. As a lefty, this action was almost impossible for me to perform one-handed because it meant tucking my thumb in close to the left edge and pushing out. More than once, I have dropped my iPhone attempting to perform this action. This interaction clearly favors the right-handed. Now compare to the Windows Phone power down: There's no clear handedness to this interaction. It works equally well for righties and lefties. I now use a Windows Phone. It saddens me to say that if you absolutely must design an interaction with an obvious handedness, you should probably favor righties. They make up approximately 90% of the population.
0.333333
How to optimize for handness in an automated way?
Voltage ratings of capacitors: ceramic vs electrolytic
Now I know when it comes to electrolytic capacitors it's usually good practice to use a voltage rating 1.5x - 2.5x the maximum rating you ever expect the capacitor to be exposed to, as the lifetime can be significantly reduced by running it near its limits. But does the same protocol apply to ceramic capacitors? For example, assume a 25V ceramic capacitor - will running it at 24V reduce its lifespan significantly? I'm currently designing a PSU which needs to be reliable, so at the moment I'm using 50V caps for a maximum 20V input (35V caps aren't available), but I'd like to switch to 25V caps if possible.
You should actually not be comparing ceramics to electrolytics in terms of lifespan at all, they are actually intended for totally different purposes. Most beginners (I did untill recently) think they are just higher values, but they are as different as inductors are to resistors. Mainly because electrolytic values are more approximate, and their value much more temperature dependant than ceramic, polycarbonates or tantalum. Note: Tantalum are very voltage sensitive. You answer is that I would also use a 50V cap for a 20V supply, in fact if you glance at the charge curve for electrolytics you will notice that they work better (more farads) at about 1/3 of their rating anyway. As for being for different purpose, you will get heating in an electrolytic if you allow it to completely charge and discharge on a cycle, for instance using a 220uF to service a 10 amp load on a rectifier will tax the cap and cause heating in the leads, and as the other answers alread indicate, heating equals less farads. I'm just an amateur, so no clever math, sorry.
0.888889
comparing ceramics to electrolytics for different purposes
Why do people rewrite some libraries to many programming languages?
There are some libraries, which are available in their versions written in many different programming languages, like for example Lucene, which is written in Java (as they say, 100% pure Java), but has also its versions in C++, C, Perl, Ruby, Lisp and some other languages. And I'm talking about implementations in these languages, not just FFI interfaces. Why do people do that? I can see one obvious reason: deployment and distribution (and probably development as well) easier when a project has fewer dependencies. But is there anything else? In what situations is it worth it?
Typically reimplementing a library to be "native" to a particular platform allows for: Simpler deployment and distribution Easier debugging More idiomatic APIs suitable for your exact platform Often better performance (platform interop can be a pain) Fixing design issues which are still in the original for compatibility For example, I started the Noda Time project as a port of Joda Time. It simply isn't practical to use Joda Time directly from within .NET... you really don't want to have to spin up a JVM just to do date and time calculations, as well as working out how to do the interop between the two. An automated port (a la J#) might have been feasible, but the end result wouldn't have been a pleasant and idiomatic API to use from C#.
0.777778
Implementing a library to be "native"
Best beginning programming language for someone interested in IT security
Backstory: At the moment I'm someone with very limited knowledge on computers and programming, but I would like to change that. I have discovered that I'm mainly interested in IT security and that I would especially like to learn more about that (not going to deny that Skyfall didn't have a part in this, but that's certainly not the main reason) as opposed to for example game/app development and such. I don't know exactly why, maybe it has something to do with the fact that I myself have been a victim of viruses and phising a couple of times. Question itself: I have recently decided that I would like to learn my first programming language. This decision is seperate from my interest in IT security, but I would like my first language to be the language most useful for someone who wants to learn more about IT security. I feel this would be killing 2 birds with 1 stone. What would this language be and why?
To really understand IT security (and, more generally, computers), you will have to know how things go inside, so, sooner or later, you will have to learn assembly for one or two architectures (preferably more than two). The low-level exploit codes (e.g. for buffer overflows) don't make sense unless you know assembly. Then move on to C, which is very widespread and a usual target for such exploits. C is easy to learn if you know assembly. Once you know assembly and C, you can learn more complex languages (e.g. C# or Java); your understanding of the inner workings of the machine will guide you through the most "magical looking" features of such advanced languages. Following this path, you may then try scripting languages, where each language element hides an awful lot of computations. This learning order, from low-level to high-level, is an ideal; I have yet to meet a single person who strictly adhered to it. In my own learning path, I started with Basic ("version 1.0", from 1984) and then switched to assembly (on a 6809E CPU) because Basic was really too slow on my machine (a 1 MHz CPU does not have a lot of muscle). Later on, I learned Pascal, then C, and some more assembly. Afterwards, I did a lot of C, I touched many other languages (e.g. Caml, PostScript, Prolog, Objective-C, C++), some scripting (Unix sh, Perl...) and even more assembly (on several distinct architectures). Even later on, I did a lot of Java. Also tried Forth, Scheme, some more assembly. Lately, I have done some C# (which is very similar to Java), PowerShell, and suffered from an outbreak of VB. What is to remember is that every language has its quirks; you will achieve the programming equivalent of enlightenment if you can see beyond the particularities of any specific language, and concentrate on the underlying algorithmics. Knowing a lot of languages and architectures will help you greatly. It will also highlight what language features are especially "dangerous" to use, by which I mean prone to trigger exploitable weaknesses. Conversely, if you stick to a single language, then you will only be a mediocre practitioner of programming and IT security. Other learning paths exist and some people are happy with them. Many apprentice programmers begin with something high-level like Python and only later on try to see "under the hood" how the computer really does things. I tend to favour the low-to-high path because it is similar to the path that I followed myself, but there is no absolute necessity in that.
1
How to learn assembly for one or two architectures
Is there a quick way to delete Foldered bookmarks directly from Safari bookmark bar?
I like to group my bookmarks into Folders in the Bookmark Bar. But I cannot find an easy way to delete these bookmarks! The only way I know to do this is to go to Show All Bookmarks, then browse down to the shortcut and select it and delete it - this totally gets in the way of workflow. Is there any way to delete a Foldered bookmark from the bookmark bar?! NB - I am not talking about standalone bookmarks, deleting those is easy and intuitive.
Hit option+command+B. It will open a bookmark editor; it's very easy to delete anything within a folder from there.
1
Hit option+command+B .
How do I turn off my Raspberry Pi?
Should I just pull the plug? Or is it best if I exit LXDE and any other running processes first?
You definitely don't want to just pull the plug this can cause problems with the SD Card and filesystem. From the command line or a terminal window you can enter the following to do a clean shutdown: sudo shutdown -h now or from the LXDE GUI click the shutdown button (red power button) in the menu bar at the bottom right corner of the screen. then click shutdown. Once it says "system halted" you can remove the power cord if needed
1
Shutdown of SD Card and filesystem
I can't find a PFET protected against ESD
I like to use OmniFETs for MOSFETs because they have internal protection against ESD so I am unlikely to damage them while handling and then when they don't work I don't have to wonder if it was damaged or I have a circuit mistake. These are n-channel FETs, but now I need a p-channel FET. I tried to find one Mouser and Digikey, but was unsuccessful. Is there such a thing? It would basically be a MOSFET and a diode in one package. Other things like over-current and over-temperature protection would also be nice, but are less important.
The overvoltage clamp is not an ESD protection, it is a protection against an overly high input voltage during use, preventing the transistor from being turned on if too high a voltage is being applied. The clamp will change the transistor from being switched on to being switched off electronically in case it detects overvoltage. It does not remove the voltage, only prevent a current from flowing. Sufficient ESD will still destroy the transistor. The whole protection part can only be constructed for n-channel FETs, and not for p-channel FETs for technical reasons: The protection circuits have to be powered. We need protection only when conductive, because that is when heat is created inside the transistor. When conductive, the source-drain voltage probably is quite low. So the only way to draw power is from gate. Now a pfet has no voltage on gate when conductive, meaning an active protection cannot be powered. Also, in amplifiers, where pfets are often used, it is a bad idea to use individually protected transistors. The protection circuits are not very precise, meaning the individual transistors will not turn off at the same time. Turning off only one transistor of a symmetric setup can lead to very bad results.
0.888889
Overvoltage clamp prevents transistor from being turned on if too high voltage is applied .
Where can I find the source code for Dungeon Defenders?
According to the wiki, the PC version of Dungeon Defenders comes with the "gameplay code and source" for UDK, for the purposes of modding. However, it's not listed in the usual place ("Tools" in Steam), and I can't find any other info online. Where is the source code?
It's under steam's tools section now!
1
It's under steam's tools section now
How to change rotation direction of 3-phase electrical machines?
I was taught that if you want to change the direction of a three phase rotating machine that is rotating in forward direction, you interchange the phases. Since the phases has the same features (voltage and current), what is responsible for making the machine to rotate in reverse direction, when the phases are interchanged?
The windings in a 3 phase motor, when activated by a 3 phase supply produce a rotating magnetic field in the rotor area of the motor. Swapping phase A with phase B re-orders the fluxes so that the flux rotates in the opposite direction. Swapping B with C does exactly the same thing as does swapping A with C. Think of it like a triangle with corners called A, B and C. If you swap any two corners and follow the points A, B and C you'll go in anopposite direction. Swap two more corners and you're back to the original rotation. This is what it looks like. The black arrow is the flux produced by the three phase windings: - Clearly, if yellow phase were swapped with blue phase the rotation would be opposite.
1
Swapping A with phase B re-orders the fluxes so that the flux rotates in the opposite direction
Native Browser Automation using Appium 1.2.0.1 on Windows 7 Android real device: Could not find a connected Android device
I have looked many forums for this issue, there are quite a few answers on this topic but none of these have worked for me/match my criteria. I recently took up Mobile Automation task and hence am completely new to Appium. I am working with Appium 1.2.0.1 on Windows 7 and trying to automate the native Android Browser(not Chrome or an App) on an Android v4.3 real device. I have installed everything according to the instructions. I am using Selenium in Maven Build in JUnit Framework to execute the scripts through Appium. I use Appuim.exe in Admin mode and use the GUI to start the node. Then I run my scripts. My issue is that when I try "adb devices" in cmd, I am able to see the device. Whereas, during execution, Appium is throwing an Error "Failed to start an Appium session, err was: Error: Could not find a connected Android device." I tried many troubleshooting options and verified if everything is in place. No luck. Please help. Below is the trace of Error: > Checking if an update is available > Update not available > Starting Node Server > info: Welcome to Appium v1.2.0 (REV e53f49c706a25242e66d36685c268b599cc18da5) > debug: Non-default server args: {"address":"127.0.0.1","fullReset":true,"logNoColors":true,"platformName":"Android","platformVersion":"18","automationName":"Appium","browserName":"Browser"} > info: Appium REST http interface listener started on 127.0.0.1:4723 > info: LogLevel: debug > info: --> POST /wd/hub/session {"desiredCapabilities":{"platformVersion":"4.3","browserName":"Browser","platformName":"Android","device":"Android","deviceName":"Android"}} > debug: Appium request initiated at /wd/hub/session > info: Retrieving device > warn: code=ENOENT, errno=ENOENT, syscall=spawn > debug: Request received with params: {"desiredCapabilities":{"platformVersion":"4.3","browserName":"Browser","platformName":"Android","device":"Android","deviceName":"Android"}} > debug: The following desired capabilities were provided, but not recognized by appium. They will be passed on to any other services running on this server. : device > debug: Looks like we want chrome on android > debug: Creating new appium session fa19e382-c178-4e6b-8150-a386a51bee39 > debug: Preparing device for session > debug: Not checking whether app is present since we are assuming it's already on the device > debug: Checking whether adb is present > debug: Using adb from C:\Android\android-sdk\platform-tools\adb.exe > debug: Trying to find a connected android device > debug: Getting connected devices... > debug: executing: "C:\Android\android-sdk\platform-tools\adb.exe" devices > debug: Could not find devices, restarting adb server... > debug: executing: "C:\Android\android-sdk\platform-tools\adb.exe" kill-server > warn: code=ENOENT, errno=ENOENT, syscall=spawn > warn: code=ENOENT, errno=ENOENT, syscall=spawn > debug: Getting connected devices... > debug: executing: "C:\Android\android-sdk\platform-tools\adb.exe" devices > debug: Could not find devices, restarting adb server... > debug: executing: "C:\Android\android-sdk\platform-tools\adb.exe" kill-server > error: Error killing ADB server, going to see if it's online anyway > debug: Getting connected devices... > debug: executing: "C:\Android\android-sdk\platform-tools\adb.exe" devices > debug: Could not find devices, restarting adb server... > warn: code=ENOENT, errno=ENOENT, syscall=spawn > warn: code=ENOENT, errno=ENOENT, syscall=spawn > debug: executing: "C:\Android\android-sdk\platform-tools\adb.exe" kill-server > warn: code=ENOENT, errno=ENOENT, syscall=spawn > error: Error killing ADB server, going to see if it's online anyway > warn: code=ENOENT, errno=ENOENT, syscall=spawn > info: <-- POST /wd/hub/session 500 20314.056 ms - 206 > debug: Getting connected devices... > debug: executing: "C:\Android\android-sdk\platform-tools\adb.exe" devices > debug: Cleaning up appium session > error: Failed to start an Appium session, err was: Error: Could not find a connected Android device. > debug: Error: Could not find a connected Android device. > at ADB.getDevicesWithRetry (C:\Selenium\AppiumForWindows-1.2.0.1\Appium\node_modules\appium\node_modules\appium-adb\lib\adb.js:600:15) > at androidCommon.prepareActiveDevice (C:\Selenium\AppiumForWindows-1.2.0.1\Appium\node_modules\appium\lib\devices\android\android-common.js:349:12) > at null.<anonymous> (C:\Selenium\AppiumForWindows-1.2.0.1\Appium\node_modules\appium\lib\devices\android\android-common.js:289:26) > at C:\Selenium\AppiumForWindows-1.2.0.1\Appium\node_modules\appium\node_modules\async\lib\async.js:610:21 > at C:\Selenium\AppiumForWindows-1.2.0.1\Appium\node_modules\appium\node_modules\async\lib\async.js:249:17 > at iterate (C:\Selenium\AppiumForWindows-1.2.0.1\Appium\node_modules\appium\node_modules\async\lib\async.js:149:13) > at C:\Selenium\AppiumForWindows-1.2.0.1\Appium\node_modules\appium\node_modules\async\lib\async.js:160:25 > at C:\Selenium\AppiumForWindows-1.2.0.1\Appium\node_modules\appium\node_modules\async\lib\async.js:251:21 > at C:\Selenium\AppiumForWindows-1.2.0.1\Appium\node_modules\appium\node_modules\async\lib\async.js:615:34 > at androidCommon.prepareEmulator (C:\Selenium\AppiumForWindows-1.2.0.1\Appium\node_modules\appium\lib\devices\android\android-common.js:339:5) > debug: Responding to client with error: {"status":33,"value":{"message":"A new session could not be created. (Original error: Could not find a connected Android device.)","origValue":"Could not find a connected Android device."},"sessionId":null} And here is my code: if (runEnv.equals("Android")) { DesiredCapabilities capabilities = new DesiredCapabilities(); capabilities.setCapability("device","Android"); capabilities.setCapability("deviceName","Android"); capabilities.setCapability("platformName","Android"); capabilities.setCapability("browserName", "Browser"); capabilities.setCapability("platformVersion", "4.3"); try { driver = new RemoteWebDriver(new URL("http://127.0.0.1:4723/wd/hub"), capabilities); } catch (MalformedURLException e) { e.printStackTrace(); } driver.manage().timeouts().implicitlyWait(80, TimeUnit.SECONDS); } Please help! Thanks, Arpitha
In the deviceName field copy and paste the id given in the cmd window when you run the adb devies command.
0.777778
Copy and paste the id given in the deviceName field when running the adb devies command
Bash script doesn't catch SIGINT while in read loop
I have several scripts with while read line loops that don't execute my cleanup function when I press Ctrl C. For example: #!/bin/bash cleanup() { stty echo exit 0 } trap cleanup SIGINT SIGHUP SIGTERM stty -echo while read -r line; do echo "$line" done < /foo/bar cleanup When I press Ctrl-C, my terminal is screwed up because the stty -echo setting is still in effect. I have many other scripts where my cleanup function works flawlessly. The only time I seem to have a problem is when I press Ctrl-C while the script is in a read loop. Is there a way to ensure that the cleanup function will get called when Ctrl-C is pressed while the script is inside a read loop? Or am I just missing something obvious here? Update: There is something else going on in my scripts. I ran the exact script above, and I can't get it to fail the way my other scripts do. I will have to try to distill the broken scripts down to something that I can get to fail, at which point I will update the question. Update 2: Okay, I figured it out. I was getting an error from stty (which I wasn't seeing because my real cleanup function was also clearing the screen). The error was: stty: standard input: Inappropriate ioctl for device. I looked this up an apparently it was due to calling stty while stdin was redirected from the file /foo/bar. So I changed my trap call to trap "break" SIGINT SIGHUP SIGTERM and it worked.
It turns out the problem was due to the fact that my cleanup function was calling stty, and stty evidently doesn't like to be called while stdin is being redirected from a file. Thus, when I pressed Ctrl-C while the script was executing the read loop, the cleanup function got called as if I had called it from within the loop: while read -r line; do ... cleanup ... done < "$filename" This, in turn, meant that stty was executed with a redirected stdin, and it died with the error stty: standard input: Inappropriate ioctl for device. I was able to fix this by changing my trap line: trap "break" SIGINT SIGHUP SIGTERM So instead of having it effectively insert a call to cleanup into my loop when I press Ctrl-C, it instead just (effectively) inserts a break into the loop, thus breaking out of the loop and subsequently calling the cleanup function via the line after the loop.
1
cleanup function called stty while executing read loop
How can I open a window on a different monitor?
With multiple monitors, I have so far been dragging windows manually around. Is there a way to make a window open on a specific screen in a dual-head setup? (Not to be confused with multiple X server displays.) Something like: SCREEN=2 firefox or open-in-screen 2 firefox. If it matters, my environment is KDE using the KWin window manager. KWin window rules can only match some properties like title, but I could not find an environment variable as filter. The secondary display extends the primary screen: $ xrandr -q Screen 0: minimum 320 x 200, current 3520 x 1080, maximum 32767 x 32767 LVDS1 connected 1600x900+0+0 (normal left inverted right x axis y axis) 382mm x 214mm 1600x900 60.1*+ 1024x768 60.0 800x600 60.3 56.2 640x480 59.9 VGA1 disconnected (normal left inverted right x axis y axis) HDMI1 connected 1920x1080+1600+0 (normal left inverted right x axis y axis) 477mm x 268mm 1920x1080 60.0* 50.0 59.9 1920x1080i 60.1 50.0 60.0 1680x1050 59.9 1280x1024 75.0 60.0 1440x900 59.9 1280x960 60.0 1280x720 60.0 50.0 59.9 1024x768 75.1 70.1 60.0 832x624 74.6 800x600 72.2 75.0 60.3 56.2 720x576 50.0 720x480 60.0 59.9 640x480 75.0 72.8 66.7 60.0 59.9 720x400 70.1 DP1 disconnected (normal left inverted right x axis y axis)
No, you can't do that directly. In the X architecture, the two physical monitors you see are not discernible by applications. You can only work your way around this abstraction, by determining which areas of the visible workspace correspond to which monitor and then place windows at the correct offset. Sensible toolkits support a -geometry option, which allows your application to request being placed at a specific position. If you don't have this option available, you can use wmctrl if you have an EWMH/NetWM compatible X Window Manager to move and resize already existing windows (see wmctrl (1), you need options -r and -e). I use devilspie to force placement of some windows and of course your window manager of choice may have its own facility to force window placement. devilspie allows to apply certain actions on X windows and can use X window properties to discern different windows and applications. The key rule for you would be geometry "<width>x<height>+<xoffset>+<yoffset>". Yet, you always need to do the calculations of when and where another physical monitor begins yourself. But this is not too hard and xrandr does tell you how and where it uses monitors in the form of "<width>x<height>+<xoffset>+<yoffset> on each line staring with an output name. There is not the foolproof-it-will-just-work way, because implementations may (and do!) vary. wmctrl usually works on the window title to identify the target. devilspie can also refer to its class, yet, I am not aware of any toolkit that lets you specify a X windows class but not its geometry. Of course you could always start two xephyr instances and make one fill your left screen and the other your right screen and then address screens via the DISPLAY environment variable, but this solution has other downsides. In theory, the authority to govern window placement is the window manager. Consequently, if you want stuff your window manager can't to, it will be hacky and it's also the reason why there is no generic way to accomplish this. Yet, if your concrete use case is your android emulator ... which is very different from asking for the option to specify SCREEN=n fooapp on the shell, then devilspie may be what you are looking for. Hint: I found it's best to identify applications by their window class.
1
Using devilspie to force placement of X windows
Why isn't my if/elseif/else working correctly here?
I am using a simple if/elseif/else bit of code to generate a header image for my page, I can't seem to understand why it isn't working properly. It determines the category of the page being displayed and displays a header accordingly. Here's the code in my header.php: <?php if (is_category('dino run') || has_category('dino run')) { ?> <a href="dino-run/"><li><div class="logo splash2">Dino Run</div></li></a> <?php } elseif (is_category('potatoman') || has_category('potatoman')) { ?> <a href="http://www.pixeljam.com/potatoman/"><div class="logo splash4">Potatoman Seeks the Troof</div></a> <?php } elseif (is_category('glorkian' || 'glork') || has_category('glorkian' || 'glork')) { ?> <a href="glorkian"><div class="logo splash3">Glorkian Warrior</div></a> <?php } else { ?> <a href="#"><div class="logo splash1">The Pixeljam Octology</div></a> <?php } ?> The problem I'm having is I click on a post that has a category "Dino Run" and it displays fine... but when I click on a post that doesn't have any of the above 3 defined categories it doesn't fall through to the else statement, it actually displays the third header "Glorkian Warrior". Any ideas what I did wrong here?
is_category will not process the logic inside the argument list. This: is_category('glorkian' || 'glork') The condition is true on all category pages. What I think is happening is that PHP does parse that argument string, but is always going to be true. Try this: var_dump('glorkian' || 'glork'); Meaning that what you are doing, essentially, is this: is_category(true); That is not a valid argument but the function seems to revert to default functionality-- is this a category archive or not? Obviously, the answer is "yes" on any category archive. Valid arguments are: (mixed) (optional) Category ID, Category Title, Category Slug or Array of IDs, names, and slugs. http://codex.wordpress.org/Function_Reference/is_category#Parameters So I believe that what you need is : is_category( array( 'glorkian', 'glork' ) ); It is the same with has_category.
1
is_category will not process the logic inside the argument list
Eigenvalues of a transition probability matrix
I have read that, for $$I - \alpha P$$ where $I$ is the $n\times n$ identity matrix, $\alpha \in (0,1]$, and $P$ is the transition probability matrix with dimensions $n \times n$, $I - \alpha P$ is an invertible matrix because the eigenvalues of any transition probability matrix lie within the unit circle of the complex plane. "Thus no eigenvalue of $\alpha P$ can be equal to 1, which is a necessary and sufficient condition for $I - \alpha P$ to be invertible." Why is that?
As stated, the result is FALSE. Presuming P is indeed a Markov Chain transition matrix, i.e., is row stochastic, i.e., all entries are non-negative with all row sums equal to 1, then the largest eigenvalue of P is exactly 1. Given that α = 1 satisfies α ∈ (0,1], I - α * P in this case has an eigenvalue = 0 (i.e., corresponding to P's eigenvalue of 1). Therefore, such an I - α * P is not invertible; and in this case, α * P = P, which has largest eigenvalue = 1. The result would be true if the restriction on α were changed to α ∈(0,1). The statement, "eigenvalues of any transition probability matrix lie within the unit circle of the complex plane" is true only if "within" is interpreted to mean inside or on the boundary of the unit circle, as is the case for the largest eigenvalue, 1. Proof that P has an eigenvalue = 1. All row sums of P = 1, therefore, P * (vector of ones) = (vector of ones) Therefore, 1 is an eigenvalue of P with right eigenvector = (vector of ones), thereby establishing the falsehood of the claim made in the opening post of the thread.
0.777778
Presuming P is indeed a Markov Chain transition matrix, i.e.
What is the real reason for the Joker's scars?
In The Dark Knight, The Joker told different reasons for the scars on his cheeks. Initially he said that his father gave him the cuts on his cheek as a child after his father performed the same act on his mother, which includes the famous line "Why so serious?". The Joker also tells Rachel Dawes that his wife had scars due to an accident and that he cut his own cheeks with a razor blade to prove that scars did not matter. He starts to tell Batman a third story about how he might have been disfigured. Anybody knows what is the real reason? Was the real reason mentioned in any comics or other books?
Wikipedia says : "Though many have been related, a definitive back-story has never been established for the Joker in the comics, and his real name has never been confirmed. He himself is confused as to what actually happened; as he says in The Killing Joke, "Sometimes I remember it one way, sometimes another... if I'm going to have a past, I prefer it to be multiple choice! Ha ha ha!""
1
The Killing Joker's real name has never been established, Wikipedia says .
Possessive form (of) with compound nouns
This is a main difference between the personality of good people and bad people. Is the sentence comparing personality of good people and personality of bad people? or comparing personality of good people and bad people? How to avoid ambiguity when using of with compound nouns?
Here's a way to recast the sentence to avoid the problem of pairing a singular personality with plural people--and two different types of plural people at that: This is a main difference between the personality of a good person and that of a bad person.
0.888889
recast the sentence to avoid the problem of pairing a singular personality with plural people
Connection resets while trying to read from Socket
I'm developing a simple application to read data from a remote server (I don't have access to the server code). It's going through the connection process, but when I try to read some data from the server, the conection resets. Here's my code: import java.io.IOException; import java.io.InputStream; import java.net.InetSocketAddress; import java.net.Socket; import java.net.UnknownHostException; import java.util.HashMap; import java.util.Map; import java.util.Map.Entry; public class ProtocoloX { private byte[] bytes = new byte[1024]; // private byte[] bytes = new byte[] { (byte) 0xC6, 0x57, 0x54, (byte) 0x95, // 0x5E, (byte) 0x9E, 0x6B, (byte) 0xC6, 0x55, 0x17, 0x55, 0x52, // (byte) 0x9E, 0x21 }; private Socket cliente; private final String HOST = "177.71.195.77"; private final int PORT = 52246; private Map<Byte, Byte> table4x5 = new HashMap<Byte, Byte>(); private Map<Byte, Byte> table5x4 = new HashMap<Byte, Byte>(); private String msgReceived = new String(); private byte[] packetsToSend; private int packetsToSendLength = 0; public ProtocoloX() { table4x5.put((byte) 0x0, (byte) 0x1e); table4x5.put((byte) 0x1, (byte) 0x09); table4x5.put((byte) 0x2, (byte) 0x14); table4x5.put((byte) 0x3, (byte) 0x15); table4x5.put((byte) 0x4, (byte) 0x0a); table4x5.put((byte) 0x5, (byte) 0x0b); table4x5.put((byte) 0x6, (byte) 0x0e); table4x5.put((byte) 0x7, (byte) 0x0f); table4x5.put((byte) 0x8, (byte) 0x12); table4x5.put((byte) 0x9, (byte) 0x13); table4x5.put((byte) 0xa, (byte) 0x16); table4x5.put((byte) 0xb, (byte) 0x17); table4x5.put((byte) 0xc, (byte) 0x1a); table4x5.put((byte) 0xd, (byte) 0x1b); table4x5.put((byte) 0xe, (byte) 0x1c); table4x5.put((byte) 0xf, (byte) 0x1d); table5x4 = invert(table4x5); } private static Map<Byte, Byte> invert(Map<Byte, Byte> map) { Map<Byte, Byte> inv = new HashMap<Byte, Byte>(); for (Entry<Byte, Byte> entry : map.entrySet()) inv.put(entry.getValue(), entry.getKey()); return inv; } public boolean connect() { this.cliente = new Socket(); System.out.println("-- Trying to connect: " + HOST + ":" + PORT); InetSocketAddress socketAddress = new InetSocketAddress(HOST, PORT); try { this.cliente.connect(socketAddress); } catch (IOException e) { System.out.println(e); System.out.println("-- CONNECTION PROBLEM "); return false; } System.out.println("-- Connection successful"); return true; } private void receive() { InputStream stream = null; System.out.println("-- Reading data..."); try { stream = this.cliente.getInputStream(); try { int count = stream.read(); System.out.println((char) count); } catch (IOException e) { System.out.println("-- DATA READING PROBLEM"); e.printStackTrace(); } } catch (IOException e) { System.out.println("-- DATA READING PROBLEM"); e.printStackTrace(); } System.out.println("-- Data read successful"); } private void send() { // TODO: função que envia sinal } public static void main(String[] args) throws UnknownHostException, IOException { ProtocoloX protocolo = new ProtocoloX(); if (protocolo.connect()) { protocolo.receive(); } } }
This usually occurs after you have written to a connection that had already been closed by the peer. In other words, an application protocol error.
0.666667
This occurs after you have written to a connection that had already been closed by the peer
Facebook API: is it possible to get a user's public profile data by email address?
Possible Duplicate: Find Facebook user (url to profile page) by known email address I have a list of email addresses from people that use my app. Is it possible to query for their facebook public data by email address? Thanks Richard.
Facebook use the facebook id to access user information via api or via FQL instead of email id.
0.888889
Facebook use the facebook id to access user information via api or via FQL instead of email
What do you call a group of people that move a lot?
I can't think of the word to describe it. Something similar to "wanderer" or "roamer". It's often used to describe people that don't stay in one place... not "migratory"...
Some more possibilities: transients vagrants drifters fugitives migrants errants floaters wanderers Bedouins itinerants (from @Kit)
1
transients vagrants drifters fugitives errants floaters wanderers Bedouins itinerants
Where to create a shared media folder?
I'd like to place all my family's media in one shared folder for everyone to use from any computer. Whether it's a PC or home server. What is more appropriate: Create it in my home folder (/home/lamcro/media/) Create a new account called media (/home/media/) or just Create a new folder (/media/) As far as I know, there is no "Shared Folder" in Ubuntu, like in Windows. I'm just looking for the least cumbersome method, in case I ever want to do a full Linux re-install.
I do this exact thing with an external drive. Same basic idea as the new partition without repartitioning. I have never looked into the nuts and bolts but the drive is on when you boot up so shows up for everyone and we use it for any data that is appropriate to share between users.
0.888889
External partition without repartitioning
Three tier Validation Rule / Validation chain?
I am stumped so I hope I can present my question in a manner that allows me to get some support. I am creating a Lead validation rule that in essence is 3 tiers i.e. if tier 1 is selected require that tier 2 is selected and if this value in tier 2 is selected require tier 3 text to be completed. Here are my picklist requirements Lead Source Lead Source Details Complete Text Field Wholesaler >ABC Wholesaler >XYZ Wholesaler >Other if other is selected complete [text field] Personal Referral nothing else here Trade Show/Event nothing else here but we need to > [text field] TBP Event nothing else here but we need to > [text field] Website nothing else here Other nothing else here but we need to > [text field] When this was only a 2 tier picklist I used this validation rule but now I can't figure out how to rewrite for 3 tier ISBLANK(Lead_Source_Details__c) && ( ISPICKVAL(LeadSource, "Distribution Partner") || ISPICKVAL(LeadSource, "Event/Trade Show") || ISPICKVAL(LeadSource, "TBP Event") || ISPICKVAL(LeadSource, "Other") )
A validation rule's formula should be true when rules fails, so we need to have criteria for each failure condition, combined with an OR ( "||" ). If I read your table correctly, here's how to express your requirements. I used inline comments to highlight each LeadSource's section of the formula. /* first check Wholesaler */ ( ISPICKVAL(LeadSource, 'Wholesaler') && ( ISBLANK(Lead_source_Details__c) || (ISPICKVAL(Lead_Source_Details__c, 'Other') && ISBLANK(TextField__c)) ) ) || /* Personal Referral has no other requirements */ /* check Trade Show */ ( ISPICKVAL(LeadSource, 'Trade Show/Event') && ISBLANK(TextField__c) ) || /* check TBP */ ( ISPICKVAL(LeadSource, 'TBP Event') && ISBLANK(TextField__c) ) || /* Website has no other requirements */ /* check Other */ ( ISPICKVAL(LeadSource, 'Other') && ISBLANK(TextField__c) ) Note that I didn't have the name of your text field, so I used TextField__c; update for your field name.
0.666667
Validation rule's formula should be true when rules fail .
What does "You tell him!" mean?
  "You know how I think they choose people for the Gryffindor team?", said Malfoy a few minutes later, as Snape awarded Hufflepuff another penalty for no reason at all." It's people they feel sorry for. See, there's Potter, who's got no parents, then there's the Weasleys, who've got no money – you should be on the team, Longbottom, you've got no brains."   Neville went bright red but turned in his seat to face Malfoy.   "I'm worth twelve of you, Malfoy," he stammered.   Malfoy, Crabbe and Goyle howled with laughter, but Ron, still not daring to take his eyes from the game, said, "You tell him, Neville."   "Longbottom, if brains were gold you'd be poorer than Weasley, and that's saying something." What does Ron mean by the phrase "You tell him, Neville"?
You tell him means “I agree wholeheartedly with you have just told him and support you unreservedly in expressing it frankly, to his face.”
1
"I agree wholeheartedly with you have just told him and support you unreservedly"
Removing a Viscous Fan without the serpentine belt (1998 Land Rover Discovery)
The PAS pump on my Discovery failed fairly spectacularly last week, shedding it's pulley at the side of the road. In order to get at it to replace it, I need to get the fan off, which requires undoing a left-hand-thread nut in the viscous coupling. The problem, however, is that I can't stop the pulley rotating in order to undo it (it's on it's own pulley rather than being on the end of the crankshaft). Normally this would be held in place by the serpentine belt, but without the PAS pulley I can't refit the belt... Any suggestions? I can't get anything in there to wedge the pulley... Edit: It's the big bolt in the middle of this part (thanks Paulster2 for the link): And it is located here on the car: The big pulley spins freely. I've tried using the small bolts that hold the pulley on for extra purchase - two of the four came undone (great, I thought!), but the other two won't - because of the hexagonal shape of the big nut, I can't get a ring spanner on them, and an open-ended one just started to round them...
Using the new pump, you are able to determine the size of its large nut. It is either 34 or 36mm across the flats. Using a flat piece of metal, make a flat spanner with a length long enough to extend out of fan blades to fit the nut. With the 'spanner' on the nut and with a engineers hammer, strike the improvised spanner to undo the nut. The inertia of the assembly allows it to come undone. Viscous couple spanners to do exactly the same are available here in the UK for around £5 ($10 ?). Use a dab of Locktite when fitting the new pump, impacting it in the other direction to tighten it. In a workshop with an air chisel, they can be undone by a couple of short bursts aimed at an angle to the nut.
0.666667
Using a flat piece of metal, strike the 'spanner' to undo the nut
How do you prepare for out of memory conditions?
This can be easy for games with well defined scope, but the question is about sandbox games, where the player is allowed to create and build anything. Possible techniques: Use memory pools with upper limit. Delete objects that are no longer needed periodically. Allocate extra amount of memory at the beginning so it can be freed later as a recovery mechanism. I would say around 2-4 MBs. This is more likely to happen in mobile/console platforms where memory is usually limited unlike your 16 GB PC. I am assuming you have full control over memory allocation/deallocation and no garbage collection involved. That's why am tagging this as C++. Please note that I am not talking about Effective C++ Item 7 "Be prepared for out-of-memory conditions", even though it's relevant, I would like to see an answer more related to game development, where you usually have more control over what's happening. To summarize the question , how do you prepare for out of memory conditions for sandbox games, when you are targeting a platform with limited memory console/mobile ?
The application is usually tested on the targeted platform with the worst case scenarios and you will always be prepared for the platform you are targeted. Ideally the application should never crash, but other that, optimization for specific devices is the only thing you can do, there are little choices when you face low memory warning. The best practice is to have preallocated pools and the game uses from the very beginning all the needed memory. If your game has a maximum of 100 units than have a pool for 100 units and that's it. If 100 units exceeds the mem requirements for one targeted device then you can optimize the unit to use less memory or change the design to a maximum of 90 unit. There should be no case where you can build unlimited things , there should always be a limit. It would be very bad for a sandbox game to use new for each instance because you can never predict the mem usage and a crash is a lot worst than a limitation. Also the the game design should always have in mind the lowest targeted devices because if you base your design with "unlimited" things in it then it will be a lot harder to solve the memory problems or change the design later on.
1
Optimizing a pool for a targeted device
EditText blocked by keyboard when it is clicked
The question title may be misleading, but I have what I think is a common issue for Android newbies: I have an activity with a LinearLayout, and I have an EditText at the bottom of the screen. When I click on it, the keyboard appears over the EditText, hiding it while typing. Is there a way to achieve what most user expect, that is the activity gets scrolled down until the EditText becomes visible again?
Have you tried adding android:windowSoftInputMode="stateVisible|adjustResize" to your activity in manifest?
0.833333
Android:windowSoftInputMode="stateVisible|adjustResize"
Unprotect a Word Document
Possible Duplicate: Can’t edit a specific document in Word 2007 How do I remove the password protection (unprotect) on a Word document if I don't know the password? (i.e. The protection provided by Tools > Unprotect Document)
Save the file in Rich text format RTF Open the file with WordPad Save the RTF file with a different name Open the new RTF file with Word Save the document as a word document Delete the two rtf files
1
Save the file in Rich text format RTF Open the file with WordPad Save the RTF file as a word document Delete the two
Storing potato water: how long can it be refrigerated?
When boiling potatoes, I like to use the leftover water for soups, sauces, etc. Does anyone else use potato water, and if so, how long can it be stored in the refrigerator? I am wondering if it has a "shelf life" similar to homemade stock.
Yes, shelf life would be similar to homemade stock. It has the same potential for cross-contamination, and natural contamination (with a slightly reduced chance for contaminates from ingredients, as there is no meat). Be sure to cool and refrigerate quickly (cool pot in a sink of ice + cold water). If left to sit out, warm + starchy water is a great breeding ground for un-fun microbial life.
1
microbial shelf life is similar to homemade stock
'Trying to help someone, but the other party doesn't appreciate it'
What is a word that best describes trying to help someone, but the other party doesn't appreciate it? I'm looking for a word.
Ungrateful. Pretty obvious answer.
1
Ungrateful answer