summary
stringlengths
15
147
text
stringlengths
1
19.3k
answer
stringlengths
32
22.6k
labels
float64
0.33
1
answer_summary
stringlengths
5
164
Upper Bound on Determinant of Matrix in terms of Trace
For an $n\times n$ positive definite matrix $A$, I wish to prove that $$\det(A) \leq \bigg(\frac{Trace(A)}{n}\bigg)^n$$ To me this seems some form of AM-GM Inequality (Arithmatic Mean-Geometric Mean Inequality). Therefore If I can show the following, above inequality follows : $$\det(A) \leq \prod_{i=1}^{i=n} A_{ii}$$ Any idea how to prove the above. Thanks
Your second inequality is a consequence of the Hadamard inequality, see here: http://en.wikipedia.org/wiki/Hadamard_inequality Another way is to use the result that the eigenvalue vector of a Hermitian (hence real symmetric) matrix majorizes the vector of diagonal values, and then using that the product function $\prod_{i=1}^n x_i$ for $x_i>0$ is Schur-convex: One source for this results is the book by Bhatia: "Matrix Analysis".
0.666667
Hadamard inequality
Measuring Resistance of a Wire With an ADC
I'm trying to design a circuit which can measure small resistances down to 0.1 Ohm and a max. of 10 Ohms. I won't be measuring actual resistors but rather large coil of wires, upto 500 m (as you can imagine, these wires are quite thick). Here's the circuit I came up with: The circuit works by maintaining a constant current through the device under test, R2. With a current of 100 mA, R2 would develop a voltage between 10 mV to 50 mV. I think in an ideal world this would work but in practice I may have a hard time measuring 0.1 Ohms with this - mainly due to the ADC. Let's assume the ADC is 10-bit with VREF of 5V. This translates to 5mV per step. If R2 = 0.1 and Iout = 100 mA, then the voltage present at the ADC would be 50 mV - but I'm not sure how buried under noise this would be. My question is, should I increase the gain to, say, 50. If the gain is 50, then the voltage present at the ADC would be 500 mV - but the max. measurable resistance would be 1 Ohms. To measure 10 Ohms, I would need to lower the current to 10 mA instead of 100 mA. A way to do that would be use an FET to switch out R1 and connect a 20 Ohm resistor at Iout. I don't need the circuit to measure the resistance precisely - a tolerance of +/- 10% is fine.
First of all, this setup will not allow you to get a range of 0÷5V at the ADC input. Simply because the LM324 cannot swing up to its positive rail. It will also introduce potential offset voltages that will most certainly be able to ruin a 10 to 50mV measurement. I suggest getting an instrumentation amplifier or a selectable gain amplifier such as the MCP6G01. With a selectable gain from 1 to 100 you'll be able to maintain some accuracy within 2 orders of magnitude (e.g. from 0.1 to 10 Ohms).
0.888889
Selectable gain amplifier or instrumentation amplifier
Uncommon 4 pin DC 19V power socket - what type of connection is this [picture]?
A friend of mine picked up a Pioneer "Dream PC" for real cheap at a charity sale, just because it looked strange. But it did not come with a power cable. Any idea what this type of connection this is? Or any other type of device that uses this type of connection, so we can try track down a cable for the machine...
I've seen a power connector like that, but it's on the back of my external HDD case (but not a 19V DC connector). Because the PC is set to take 19VDC, you can't just take out the connector and wire up a power cable. You'd have to find something that can output 19 volts at the appropriate wattage (any other stickers on the PC about that?) My only suggestion for help would be to look to Daniel Rutter for some information. He lives in Australia and seems to be able to find information on the most random bits of hardware - and since this PC seems to be an Australia-only PC, he might be able to help. You can get a hold of him by email, and you might even make an "Ask Dan" column!
1
How to wire up a 19V DC connector?
Is untapping my permanents during the untap step optional?
I was reading the untap step rule and got confused a bit. It says: 502.2. Second, the active player determines which permanents he or she controls will untap. Then he or she untaps them all simultaneously. This turn-based action doesn't use the stack. Normally, all of a player's permanents untap, but effects can keep one or more of a player's permanents from untapping. If "a player determines", can I determine not to untap all my permanents?
You do not get to choose whether or not to keep a permanent tapped during the Untap Step of the Beginning Phase unless a specific card's ability provides that choice. The word "determine" in this context does not mean choose, it means to evaluate whether or not there are any abilities preventing a permanent from untapping, and evaluating the decision to untap should an ability provide that choice. As the rule states: Normally, all of a player's permanents untap.
0.888889
"determine" means to evaluate whether or not to keep a permanent tapped during the Untap Step of the Beginning Phase
How do I get a baby dragon pet?
I have seen players with a baby dragon as pet in Stendhal. How do I get one?
I won't give a spoiler, but this much I can tell: You can get the egg for a baby dragon via solving a quest. Someone will then hatch this egg for you, and you will have a baby dragon then. For spoiler information you can visit the quest section on the stendhal website. In the wiki there's plenty information on quests, especially in this case you should spend a look at the kill spiders quest, which will reward you with a mythical egg, that you can let an NPC hatch it near the green dragon in semos caves.
0.888889
You can get the egg for a baby dragon via solving a quest in semos caves
How to get three grayscale images from a RGB photo in PS?
As per the title, I have a RGB photo and I'm trying to get three separate grayscale images, each one referring to a single channel (i.e., a grayscale image for R, G and B values). From what I've read I should just make two channels invisible and simply export, but that's not working for me - I get the colored, three channels pic again. Thank you.
If I understand you correctly - You want just one channel separate from everthing else. Go to the channels window, right click on the desired channel and click duplicate channel: On the duplicate window choose new file and you'll get a regular layer on a new file
1
You want only one channel separate from everthing else
pre hung doors to fit into old frame
I have purchased some pre hung doors at 30" by 80" the jambs are 4 5/8 wide. The house is 50 years old and the existing door frame is 5 1/4 wide. Any solution as to how to fit these doors into the old frame.
Take off the trim, remove the old frame, install the new frame, re-install trim or install new trim. That, or re-use the existing frame by hanging the new door in it.
0.888889
Remove old frame, install new frame or install new trim .
PHP EDI X12 Parsing
I have a project to implement an EDI solution into an existing ecommerce-like website. There are only three EDI documents involved and only one company to transfer files with. They have strictly defined the X12 documents, and will be responsible for all of the GET/PUT's to an FTP site. The three documents are the Inventory Advice (inbound), Shipment Notification (inbound), and Invoice (outbound). We do not want/need to implement a full-blown EDI management solution. My question is, am I crazy to think that this is a relatively simple parsing task using PHP? Does anyone know of any existing PHP libraries that might be useful (maybe X12 to XML)? My searches have come-up empty. I'd like to get started on my own right away if it is a realistic goal and no other resources are available.
It's old, but I found it using google and maybe my answer will help someone... I found in a comment on pear.php.net http://code.google.com/p/izi-sandbox/source/browse/#svn%2Ftrunk%2Fphp%2Fphp_edi I found searching for EDIFACT on github https://github.com/markfoster/php_edifact
0.888889
Search for EDIFACT on github
Resonance stabilization and size of ligand atoms
I am told that for these two molecules, one of them is not as resonance stabilized as the other. Apparently it's the chlorine one, and it's because of the mismatch in the size of chlorine and carbon. This makes sense prima facie, but can someone confirm this is true? I can see how carbon and nitrogen have similarly sized p orbitals and thus have good overlap, and how chlorine and carbon might have poor p orbital overlap, like a BB pellet with a basketball.
Yes, this is true. The $\pi$ overlap between a valence $\ce{p}$ orbital of a second row element and one of a higher row element is much smaller than the $\pi$ overlap between two second row elements. One reason is that the bond length is generally higher when higher row elements are involved (due to their size). Another reason is, that the $3 \ce{p}$ or $4 \ce{p}$ orbitals are much more diffuse than the $2 \ce{p}$ orbitals. If you want to read deeper into the topic have a look at: [1] W. Kutzelnigg, Angew. Chem. Int. Ed. Engl., 23, 272 (1984). [2] N. C. Norman, Polyhedron, 12, 2431 (1993).
0.888889
The $pi$ overlap between a valence $cep$ orbital and one of a higher row
Derivation of relationship between Gibbs free energy and electrochemical cell potential
Why is $\Delta G=-nFE?$ I don't understand what the motivation is behind this definition. Was it derived or just given? The textbook provides no justification for this equation. In fact, much of the book associated with the Gibbs free energy provides no justification and just says, 'This is how it is. Now go and solve some problems.'
There are two ways to understand this equation. One is to realise that (reversible ideal case)$\Delta G=W_{\text{non-expansion}}$. Therefore, in an ideal chemical cell, if the potential difference between the electrodes is $E$, to move one mole electrons across the external circuit will be $FE$, which must be equal to the decrease in gibbs free energy of the system. Hence for $n$ mole electrons tranferred at the same potential, $W_{\text{non-expansion}}=\Delta G=-nFE$. The fact that $\Delta G=-W_{\text{non-expansion}}$ can be derived as under:- $$dU=\delta q+W_{\text{non-expansion}}+W_{\text{expansion}}$$ $$ds ={ \delta q/t}$$(in reversible case) $$Tds=dU-W_{\text{non-expansion}}-W_{\text{expansion}}$$ $$W_{\text{non-expansion}}=dU+pdV-Tds$$(for constant pressure and temperature) $$W_{\text{non-expansion}}=dH-Tds=dG$$ Another approach is to use $\mu_{electrochemical}=\mu_{chemical}+zF\phi$ where $\phi$=electric potential at the point, $z$ is the charge on the species. using this and $$dG_{T,P}=\sum_{i=1}^n \mu_idn_i$$ we get the required equation for $z=1$ for an electron, and considering the electrochemical potential of both the electrodes. I am unsure of a rigorous derivation for the electrochemical potential but this is some basics on it.
0.777778
How to understand the electrochemical potential of a mole electron
1/4 to 1/8 jack problem
I was planning to record months ago, with my electric guitar, and yesterday I got myself a guitar rig software and bought some 1/4 to 1/8 adapter jack so that I can plug in unto my laptop's mic hole. Whenever I plug my guitar cable to the 1/4 to 1/8 adapter then to the laptop I can't hear any sound (past the clicking sound you hear) but when I plug the cable almost halfway of the adapter's body (before the clicking sound) I can hear sound when I play and there's some loud buzzing sound involved. Any explanations as to why this is happening?
when I plug the cable almost halfway of the adapter's body I can hear sound when I play Sounds like (haw!) a mono-to-stereo problem. Look at the 1/4 inch plug. How many parts? The tip connector and the sleeve right behind the tip? Now look at the 1/8 inch plug. Two sleeves? If yes, you are shorting out one of the channels. Go back to the shop and look for a 1/4 mono to 1/8 stereo adapter, preferably with a short cord to take the load off the laptop's input.
0.888889
How many parts do I need to plug the cable?
generic helper to get ObjectResult<T> that will match any given EntityObject
trying to make a generic SQL Query via a method that will fetch data i was making this code public ObjectResult&lt;theSelectedTableNameModel&gt; getUsersRes(string sqlStr, string ColNameAsfilter, string FiltersValue,string OrderByFilter="") { string SqlCmd = ""; string By = ""; if (OrderByFilter.isNotEmptyOrNull()) By = string.Concat(" ORDER BY ", OrderByFilter); SqlCmd = string.Format("{0} WHERE {1}={2}{3}", SqlStr, ColNameAsfilter, FiltersValue, By); return anEntityName.ExecuteStoreQuery&lt;theSelectedTableNameModel&gt;(SqlCmd); } i have copied my code and edited real names and other variables /parameters so i might have made a mistake, but the question is , how could i make it more generic than this ? this is a working approach that lets me specify the query of the sqlCommand i wanted it to fit any entity and any model/object/table how could it be done ? i guess there's a ready solution for this or the engeniring of EF not ment to be generic... i'm using asp.net 4.0 , and latest EF..
I think you need something like this public List&lt;T&gt; Get(System.Linq.Expressions.Expression&lt;Func&lt;T, bool&gt;&gt; filter = null) { IQueryable&lt;T&gt; query = dbSet.AsQueryable(); if (filter != null) { query = query.Where(filter); } return query.ToList(); } Follow this link
1
Public List&lt;T&gt; Get (System.Linq.Expressions)
StackOverflow code snippet horizontal scrolling broken WebKit
Seems the problem is localized to WebKit Anybody else notice this? All code snippets, not just a particular post; http://stackoverflow.com/questions/2350874/ysod-yellow-screen-of-death-javascript-regexp-syntax-error http://stackoverflow.com/questions/2481664/pass-array-to-client-side-for-display/2483402#2483402 are just a couple..
I made the word-wrap: break-word; style apply to the child &lt;p&gt; element of .post-text rather than the whole thing.
0.777778
word-wrap: breakword
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?
Looks like it was delayed. For those who don't need the latest and greatest, there's a link on the UDK Page.
1
Looks like it was delayed
EE control panel dashboard search field
the search field in EE's dashboard doesn't seem to find anything. what is this field supposed to search?
It searches for (some) settings in the control panel. So you could search for file, and you should get a result/link to the file manager. Similarly, searches for category, channel, username should all return results with links to the respective areas of the CP. However, the search results aren't consistent. Search for security and you don't get any results, yet a search for session gives a result for the Security and Session Preferences. I'd say its there for someone who has limited knowledge of EE general options and wants to access some of the preferences, but can't find them. Not entirely useful though!
1
Search for security and session Preferences
changing the general theme of math fonts
I'm using latex templates which is producing a particular kind of math font, shown below. How can I change it to produce something like following? I'm particularly interested in changing the math font. Is there any specific package that I should exclude? unfortunately there are a couple of style and cls files and I'm not sure what is responsible for this change in font.
If you cannot change the template itself then write before \begin{document}: \usepackage{kpfonts} for Palatino like fonts or \usepackage{lmodern} for Computer Modern fonts.
0.888889
begindocument: usepackagekpfonts for Palatino like fonts or
Create pass through with Mule ESB 2.2.1
I'm attempting to set up a config file for Mule ESB 2.2.1 that routes incoming requests to another box. This seems straight forward, but I am getting connection refused exceptions and I'm not sure why. Here is the model from my Mule configuration file: &lt;model name="ProxySample"&gt; &lt;service name="HttpProxyService"&gt; &lt;inbound&gt; &lt;http:inbound-endpoint address="http://localhost:8787" synchronous="true"/&gt; &lt;/inbound&gt; &lt;outbound&gt; &lt;pass-through-router&gt; &lt;outbound-endpoint address="http://server2.xyz.com:8080#[header:http.request]" synchronous="true"/&gt; &lt;/pass-through-router&gt; &lt;/outbound&gt; &lt;/service&gt; &lt;/model&gt; I am browsing to http://localhost:8787/my-site in my browser, thinking that it will route to http://server2.xyz.com:8080/my-site, but I get a connection refused error. Here is the console output from the Mule server: ********************************************************************** * Mule ESB and Integration Platform * * Version: 2.2.1 Build: 14422 * * MuleSource, Inc. * * For more information go to http://mule.mulesource.org * * * * Server started: 1/19/10 10:43 AM * * Server ID: 6802537d-0511-11df-bb89-710580f6c729 * * JDK: 1.6.0_18 (mixed mode, sharing) * * OS encoding: UTF-8, Mule encoding: UTF-8 * * OS: Windows XP - Service Pack 3 (5.1, x86) * * Host: * * * * Agents Running: None * ********************************************************************** INFO 2010-01-19 10:43:50,681 [connector.http.0.receiver.2] org.mule.transport.http.HttpClientMessageDispatcher: Connected: endpoint.outbound.http://localhost:8080#[header:http.request] ERROR 2010-01-19 10:43:54,665 [connector.http.0.receiver.2] org.mule.DefaultExceptionStrategy: ******************************************************************************** Message : Failed to route event via endpoint: org.mule.endpoint.DynamicURIOutboundEndpoint@6645e149. Message payload is of type: GetMethod Type : org.mule.api.transport.DispatchException Code : MULE_ERROR-42999 Payload : org.apache.commons.httpclient.methods.GetMethod@d67067 JavaDoc : http://www.mulesource.org/docs/site/current2/apidocs/org/mule/api/transport/DispatchException.html ******************************************************************************** Exception stack is: 1. Connection refused: connect (java.net.ConnectException) java.net.PlainSocketImpl:-2 (null) 2. Failed to route event via endpoint: org.mule.endpoint.DynamicURIOutboundEndpoint@6645e149. Message payload is of type: GetMethod (org.mule.api.transport.DispatchException) org.mule.transport.http.HttpClientMessageDispatcher:127 (http://www.mulesource.org/docs/site/current2/apidocs/org/mule/api/transport/DispatchException.html) ******************************************************************************** Root Exception stack trace: java.net.ConnectException: Connection refused: connect at java.net.PlainSocketImpl.socketConnect(Native Method) at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333) at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195) at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182) at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366) at java.net.Socket.connect(Socket.java:525) at java.net.Socket.connect(Socket.java:475) at java.net.Socket.&lt;init&gt;(Socket.java:372) at java.net.Socket.&lt;init&gt;(Socket.java:246) at org.apache.commons.httpclient.protocol.DefaultProtocolSocketFactory.createSocket(DefaultProtocolSocketFactory.java:80) at org.apache.commons.httpclient.protocol.DefaultProtocolSocketFactory.createSocket(DefaultProtocolSocketFactory.java:122) at org.apache.commons.httpclient.HttpConnection.open(HttpConnection.java:707) at org.apache.commons.httpclient.MultiThreadedHttpConnectionManager$HttpConnectionAdapter.open(MultiThreadedHttpConnectionManager.java:1361) at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:387) at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171) at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397) at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:346) at org.mule.transport.http.HttpClientMessageDispatcher.execute(HttpClientMessageDispatcher.java:120) at org.mule.transport.http.HttpClientMessageDispatcher.doSend(HttpClientMessageDispatcher.java:258) at org.mule.transport.AbstractMessageDispatcher.send(AbstractMessageDispatcher.java:163) at org.mule.transport.AbstractConnector.send(AbstractConnector.java:2016) at org.mule.endpoint.DynamicURIOutboundEndpoint.send(DynamicURIOutboundEndpoint.java:178) at org.mule.DefaultMuleSession.sendEvent(DefaultMuleSession.java:327) at org.mule.DefaultMuleSession.sendEvent(DefaultMuleSession.java:213) at org.mule.routing.outbound.AbstractOutboundRouter$2.doInTransaction(AbstractOutboundRouter.java:152) at org.mule.transaction.TransactionTemplate.execute(TransactionTemplate.java:99) at org.mule.routing.outbound.AbstractOutboundRouter.send(AbstractOutboundRouter.java:159) at org.mule.routing.outbound.ChainingRouter.route(ChainingRouter.java:123) at org.mule.routing.outbound.DefaultOutboundRouterCollection$1.doInTransaction(DefaultOutboundRouterCollection.java:88) at org.mule.transaction.TransactionTemplate.execute(TransactionTemplate.java:45) at org.mule.routing.outbound.DefaultOutboundRouterCollection.route(DefaultOutboundRouterCollection.java:93) at org.mule.service.AbstractService.sendToOutboundRouter(AbstractService.java:892) at org.mule.model.seda.SedaService.doSend(SedaService.java:258) at org.mule.service.AbstractService.sendEvent(AbstractService.java:500) at org.mule.DefaultMuleSession.sendEvent(DefaultMuleSession.java:354) at org.mule.routing.inbound.DefaultInboundRouterCollection.send(DefaultInboundRouterCollection.java:228) at org.mule.routing.inbound.DefaultInboundRouterCollection.route(DefaultInboundRouterCollection.java:188) at org.mule.transport.AbstractMessageReceiver$DefaultInternalMessageListener.onMessage(AbstractMessageReceiver.java:364) at org.mule.transport.AbstractMessageReceiver.routeMessage(AbstractMessageReceiver.java:252) at org.mule.transport.AbstractMessageReceiver.routeMessage(AbstractMessageReceiver.java:193) at org.mule.transport.http.HttpMessageReceiver$HttpWorker.doRequest(HttpMessageReceiver.java:273) at org.mule.transport.http.HttpMessageReceiver$HttpWorker.processRequest(HttpMessageReceiver.java:227) at org.mule.transport.http.HttpMessageReceiver$HttpWorker.run(HttpMessageReceiver.java:190) at org.mule.work.WorkerContext.run(WorkerContext.java:310) at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1061) at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:575) at java.lang.Thread.run(Thread.java:619) ******************************************************************************** INFO 2010-01-19 10:43:54,665 [connector.http.0.receiver.2] org.mule.transaction.TransactionTemplate: Exception Caught in Transaction template. Handing off to exception handler: org.mule.service.DefaultServiceExceptionStrategy@1412e75 ERROR 2010-01-19 10:43:54,665 [connector.http.0.receiver.2] org.mule.service.DefaultServiceExceptionStrategy: ******************************************************************************** Message : Failed to route event via endpoint: org.mule.endpoint.DynamicURIOutboundEndpoint@6645e149. Message payload is of type: GetMethod Type : org.mule.api.transport.DispatchException Code : MULE_ERROR-42999 Payload : org.apache.commons.httpclient.methods.GetMethod@d67067 JavaDoc : http://www.mulesource.org/docs/site/current2/apidocs/org/mule/api/transport/DispatchException.html ******************************************************************************** Exception stack is: 1. Connection refused: connect (java.net.ConnectException) java.net.PlainSocketImpl:-2 (null) 2. Failed to route event via endpoint: org.mule.endpoint.DynamicURIOutboundEndpoint@6645e149. Message payload is of type: GetMethod (org.mule.api.transport.DispatchException) org.mule.transport.http.HttpClientMessageDispatcher:127 (http://www.mulesource.org/docs/site/current2/apidocs/org/mule/api/transport/DispatchException.html) ******************************************************************************** Root Exception stack trace: java.net.ConnectException: Connection refused: connect at java.net.PlainSocketImpl.socketConnect(Native Method) at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333) at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195) at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182) at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366) at java.net.Socket.connect(Socket.java:525) at java.net.Socket.connect(Socket.java:475) at java.net.Socket.&lt;init&gt;(Socket.java:372) at java.net.Socket.&lt;init&gt;(Socket.java:246) at org.apache.commons.httpclient.protocol.DefaultProtocolSocketFactory.createSocket(DefaultProtocolSocketFactory.java:80) at org.apache.commons.httpclient.protocol.DefaultProtocolSocketFactory.createSocket(DefaultProtocolSocketFactory.java:122) at org.apache.commons.httpclient.HttpConnection.open(HttpConnection.java:707) at org.apache.commons.httpclient.MultiThreadedHttpConnectionManager$HttpConnectionAdapter.open(MultiThreadedHttpConnectionManager.java:1361) at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:387) at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171) at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397) at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:346) at org.mule.transport.http.HttpClientMessageDispatcher.execute(HttpClientMessageDispatcher.java:120) at org.mule.transport.http.HttpClientMessageDispatcher.doSend(HttpClientMessageDispatcher.java:258) at org.mule.transport.AbstractMessageDispatcher.send(AbstractMessageDispatcher.java:163) at org.mule.transport.AbstractConnector.send(AbstractConnector.java:2016) at org.mule.endpoint.DynamicURIOutboundEndpoint.send(DynamicURIOutboundEndpoint.java:178) at org.mule.DefaultMuleSession.sendEvent(DefaultMuleSession.java:327) at org.mule.DefaultMuleSession.sendEvent(DefaultMuleSession.java:213) at org.mule.routing.outbound.AbstractOutboundRouter$2.doInTransaction(AbstractOutboundRouter.java:152) at org.mule.transaction.TransactionTemplate.execute(TransactionTemplate.java:99) at org.mule.routing.outbound.AbstractOutboundRouter.send(AbstractOutboundRouter.java:159) at org.mule.routing.outbound.ChainingRouter.route(ChainingRouter.java:123) at org.mule.routing.outbound.DefaultOutboundRouterCollection$1.doInTransaction(DefaultOutboundRouterCollection.java:88) at org.mule.transaction.TransactionTemplate.execute(TransactionTemplate.java:45) at org.mule.routing.outbound.DefaultOutboundRouterCollection.route(DefaultOutboundRouterCollection.java:93) at org.mule.service.AbstractService.sendToOutboundRouter(AbstractService.java:892) at org.mule.model.seda.SedaService.doSend(SedaService.java:258) at org.mule.service.AbstractService.sendEvent(AbstractService.java:500) at org.mule.DefaultMuleSession.sendEvent(DefaultMuleSession.java:354) at org.mule.routing.inbound.DefaultInboundRouterCollection.send(DefaultInboundRouterCollection.java:228) at org.mule.routing.inbound.DefaultInboundRouterCollection.route(DefaultInboundRouterCollection.java:188) at org.mule.transport.AbstractMessageReceiver$DefaultInternalMessageListener.onMessage(AbstractMessageReceiver.java:364) at org.mule.transport.AbstractMessageReceiver.routeMessage(AbstractMessageReceiver.java:252) at org.mule.transport.AbstractMessageReceiver.routeMessage(AbstractMessageReceiver.java:193) at org.mule.transport.http.HttpMessageReceiver$HttpWorker.doRequest(HttpMessageReceiver.java:273) at org.mule.transport.http.HttpMessageReceiver$HttpWorker.processRequest(HttpMessageReceiver.java:227) at org.mule.transport.http.HttpMessageReceiver$HttpWorker.run(HttpMessageReceiver.java:190) at org.mule.work.WorkerContext.run(WorkerContext.java:310) at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1061) at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:575) at java.lang.Thread.run(Thread.java:619) ******************************************************************************** ERROR 2010-01-19 10:43:54,665 [connector.http.0.receiver.2] org.mule.service.DefaultServiceExceptionStrategy: ******************************************************************************** Message : Failed to route event via endpoint: org.mule.endpoint.DynamicURIOutboundEndpoint@6645e149. Message payload is of type: GetMethod Type : org.mule.api.transport.DispatchException Code : MULE_ERROR-42999 Payload : org.apache.commons.httpclient.methods.GetMethod@d67067 JavaDoc : http://www.mulesource.org/docs/site/current2/apidocs/org/mule/api/transport/DispatchException.html ******************************************************************************** Exception stack is: 1. Connection refused: connect (java.net.ConnectException) java.net.PlainSocketImpl:-2 (null) 2. Failed to route event via endpoint: org.mule.endpoint.DynamicURIOutboundEndpoint@6645e149. Message payload is of type: GetMethod (org.mule.api.transport.DispatchException) org.mule.transport.http.HttpClientMessageDispatcher:127 (http://www.mulesource.org/docs/site/current2/apidocs/org/mule/api/transport/DispatchException.html) ******************************************************************************** Root Exception stack trace: java.net.ConnectException: Connection refused: connect at java.net.PlainSocketImpl.socketConnect(Native Method) at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333) at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195) at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182) at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366) at java.net.Socket.connect(Socket.java:525) at java.net.Socket.connect(Socket.java:475) at java.net.Socket.&lt;init&gt;(Socket.java:372) at java.net.Socket.&lt;init&gt;(Socket.java:246) at org.apache.commons.httpclient.protocol.DefaultProtocolSocketFactory.createSocket(DefaultProtocolSocketFactory.java:80) at org.apache.commons.httpclient.protocol.DefaultProtocolSocketFactory.createSocket(DefaultProtocolSocketFactory.java:122) at org.apache.commons.httpclient.HttpConnection.open(HttpConnection.java:707) at org.apache.commons.httpclient.MultiThreadedHttpConnectionManager$HttpConnectionAdapter.open(MultiThreadedHttpConnectionManager.java:1361) at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:387) at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171) at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397) at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:346) at org.mule.transport.http.HttpClientMessageDispatcher.execute(HttpClientMessageDispatcher.java:120) at org.mule.transport.http.HttpClientMessageDispatcher.doSend(HttpClientMessageDispatcher.java:258) at org.mule.transport.AbstractMessageDispatcher.send(AbstractMessageDispatcher.java:163) at org.mule.transport.AbstractConnector.send(AbstractConnector.java:2016) at org.mule.endpoint.DynamicURIOutboundEndpoint.send(DynamicURIOutboundEndpoint.java:178) at org.mule.DefaultMuleSession.sendEvent(DefaultMuleSession.java:327) at org.mule.DefaultMuleSession.sendEvent(DefaultMuleSession.java:213) at org.mule.routing.outbound.AbstractOutboundRouter$2.doInTransaction(AbstractOutboundRouter.java:152) at org.mule.transaction.TransactionTemplate.execute(TransactionTemplate.java:99) at org.mule.routing.outbound.AbstractOutboundRouter.send(AbstractOutboundRouter.java:159) at org.mule.routing.outbound.ChainingRouter.route(ChainingRouter.java:123) at org.mule.routing.outbound.DefaultOutboundRouterCollection$1.doInTransaction(DefaultOutboundRouterCollection.java:88) at org.mule.transaction.TransactionTemplate.execute(TransactionTemplate.java:45) at org.mule.routing.outbound.DefaultOutboundRouterCollection.route(DefaultOutboundRouterCollection.java:93) at org.mule.service.AbstractService.sendToOutboundRouter(AbstractService.java:892) at org.mule.model.seda.SedaService.doSend(SedaService.java:258) at org.mule.service.AbstractService.sendEvent(AbstractService.java:500) at org.mule.DefaultMuleSession.sendEvent(DefaultMuleSession.java:354) at org.mule.routing.inbound.DefaultInboundRouterCollection.send(DefaultInboundRouterCollection.java:228) at org.mule.routing.inbound.DefaultInboundRouterCollection.route(DefaultInboundRouterCollection.java:188) at org.mule.transport.AbstractMessageReceiver$DefaultInternalMessageListener.onMessage(AbstractMessageReceiver.java:364) at org.mule.transport.AbstractMessageReceiver.routeMessage(AbstractMessageReceiver.java:252) at org.mule.transport.AbstractMessageReceiver.routeMessage(AbstractMessageReceiver.java:193) at org.mule.transport.http.HttpMessageReceiver$HttpWorker.doRequest(HttpMessageReceiver.java:273) at org.mule.transport.http.HttpMessageReceiver$HttpWorker.processRequest(HttpMessageReceiver.java:227) at org.mule.transport.http.HttpMessageReceiver$HttpWorker.run(HttpMessageReceiver.java:190) at org.mule.work.WorkerContext.run(WorkerContext.java:310) at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1061) at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:575) at java.lang.Thread.run(Thread.java:619) ********************************************************************************
My project wasn't cleaning correctly in Eclipse. Once I ran the correct configuration file, the example above worked as intended.
0.777778
Installing a configuration file in Eclipse
Ad layout for programs - Illustrator or InDesign
today I'm looking for some advice from folks who have laid out event programs. In this case, the client (a local nonprofit) has a famous keynote speaker at their event, and have solicited donations from local businesses. Each donation over a certain level = a full page ad in the program for the event. Most of them are "Congratulations to on your anniversary", etc. with a company logo sitting somewhere (the businesses that send in their own camera-ready artwork will just have them dropped into place). I'm going to be laying each ad out in a template so they look consistent; my question to the GD crowd is, "Should I lay the template out in Illustrator and bring each ad individually in to InDesign or should I create a template page for an ad in InDesign and lay each ad out in InDesign?" Based on your experience, what are the pros and cons of each approach? Obviously it would be easier to lay each ad out in Illustrator (that's what it's there for) but I lose a certain amount of flexibility once I hit InDesign (the program will ultimately be laid out in InDesign).
Depends entirely upon ad style. If the ads are more illustrative in nature, I'd use Illustrator for the ad, then place then in a master Indesign document. Ads with text transforms, image interactions (cutouts) or with other non-critical design elements such as spot illustrations or flourishes can often be easier to create in Illustrator. If the ads are more text-based, I'd use Indesign for the ads as well as a master document. There is no set rule as to which one is better or should be used - Illustrator or Indesign. It really all comes down to personal preference and features needed.
0.888889
Illustrator or Indesign can be more text-based than Indesign
Passing data from Controller, to View, and back to Controller
Currently I have a method that is loading a PDF into an HTML page. The PDF is dynamically created after retrieving data from the database. Now, what I would like to do, is before the view of the PDF is loaded, I'd like to show a page that lets the user know that the information is being loaded. ActionParams: @using (Html.BeginForm("PreLoaderView", "Report", FormMethod.Post, new { @target = "_blank" })) Controller: public ActionResult PreLoaderView(TestViewModel viewModel) { return View(viewModel); } public ActionResult SolicitorActionReport_Load(TestViewModel viewModel) { var cultivationModel = new CultivationModel(viewModel, ConstituentRepository, CampaignRepository); var cultivationData = cultivationModel.GetCultivationActivityData(); var reportParamModel = new List&lt;ReportParamModel&gt; { new ReportParamModel() {AgencyName = SelectedUserAgency.AgencyName, StartDate = viewModel.StartDate, EndDate = viewModel.EndDate} }; return FileContentPdf("Constituent", "CultivationActivityManagement", cultivationData, reportParamModel, new List&lt;FundraisingAppealMassSummary&gt;(), new List&lt;FundraisingAppealPortfolioSummary&gt;()); return Content(viewModel.SolicitorType); } PreLoaderView: @model Report.SolicitorActionParamsViewModel @{ ViewBag.Title = "Cultivation Activity"; } &lt;script type="text/javascript"&gt; $(function () { $.ajax({ url: '@Url.Action("SolicitorActionReport_Load", "Report", @Model)', complete: function() { $('#progress').hide(); }, error: function() { alert('oops'); } }); }); &lt;/script&gt; &lt;div align="center"&gt; &lt;img id="progress" src="~/Content/images/loading.GIF"&gt; &lt;div id="result"&gt; &lt;embed width="100%" height="800px" src="http://localhost/YP/Report/SolicitorActionReport_Load"type="application/pdf"&gt; &lt;/div&gt; &lt;/div&gt; So, from the PreLoaderView, I'd like to pass the @Model back to the controller for use with the SolicitorActionReport_Load(). Is this possible to do?
This is what you want to serialize the model to Javascript so it can be passed to the ajax call: &lt;script type="text/javascript"&gt; $(function () { $.ajax({ url: '@Url.Action("SolicitorActionReport_Load", "Report", @Html.Raw(new JavaScriptSerializer().Serialize(Model)))', complete: function() { $('#progress').hide(); }, error: function() { alert('oops'); } }); }); &lt;/script&gt;
0.777778
Serialize Javascript model to Javascript
Putting the cursor back at the bash prompt after a script returns delayed output
Just a minor issue. I'm writing a simple bash script that starts and stops Jetty. When I execute it, the script immediately puts my cursor back on the bash prompt. However, as Jetty starts up and writes its initialization output back to stdout, it leaves the cursor on a line of its own (without a prompt) until I enter a command or hit enter. Nitpicking, I know, but I figure there's an easy way to avoid this that I'm missing. Here's the script: #!/bin/bash cd /opt/jetty/jetty-distribution-7.4.5.v20110725/ if [ "$1" = "-stop" ] then java -DSTOP.PORT=8079 -DSTOP.KEY=something -jar start.jar --stop else java -DSTOP.PORT=8079 -DSTOP.KEY=something -jar start.jar &amp; fi Here's the output: [user@machine ~]# jetty [user@machine ~]# 2011-08-11 14:47:34.818:INFO::jetty-7.4.5.v20110725 2011-08-11 14:47:34.866:INFO::Deployment monitor /opt/jetty/jetty-distribution-7.4.5.v20110725/webapps at interval 1 2011-08-11 14:47:34.878:INFO::Deployment monitor /opt/jetty/jetty-distribution-7.4.5.v20110725/contexts at interval 1 2011-08-11 14:47:34.883:INFO::Deployable added: /opt/jetty/jetty-distribution-7.4.5.v20110725/contexts/javadoc.xml 2011-08-11 14:47:34.934:INFO::started o.e.j.s.h.ContextHandler{/javadoc,file:/opt/jetty/jetty-distribution-7.4.5.v20110725/javadoc} 2011-08-11 14:47:34.935:INFO::Deployable added: /opt/jetty/jetty-distribution-7.4.5.v20110725/contexts/test.xml 2011-08-11 14:47:35.011:INFO::Extract jar:file:/opt/jetty/jetty-distribution-7.4.5.v20110725/webapps/test.war!/ to /tmp/jetty-0.0.0.0-8080-test.war-_-any-/webapp 2011-08-11 14:47:35.645:INFO::started o.e.j.w.WebAppContext{/,file:/tmp/jetty-0.0.0.0-8080-test.war-_-any-/webapp/},/opt/jetty/jetty-distribution-7.4.5.v20110725/webapps/test.war 2011-08-11 14:47:36.127:INFO:org.eclipse.jetty.servlets.TransparentProxy:TransparentProxy @ /javadoc to http://download.eclipse.org/jetty/stable-7/apidocs 2011-08-11 14:47:36.199:INFO::Started [email protected]:8080 STARTING And the cursor ends up on a blank new line just below. Is there a way to prevent this? I'm pretty new to bash scripting, is there something I should be doing that I'm not?
You could redirect output to a file for the java commands
1
redirect output to a file for the java commands
jQuery plugin naming convention (for the function)
Which casing looks better to you for a jQuery plugin: $("#foo").runMyPlugin(); or $("#foo").runmyplugin(); Is there a naming convention for jQuery that prefers on over the other? Thanks in advance!
I would recommend you the first one, that convention is widely used in JavaScript, even in the core language by itself, the ECMA Specification uses it, e.g. Array.prototype.toLocaleString Object.prototype.hasOwnProperty Object.prototype.propertyIsEnumerable // etc... All identifiers are named with camelCase, and only constructor functions are named with the first letter as capital (PascalCase).
1
ECMA Specification: Array.prototype.toLocaleString
If $f: \mathbb Q\to \mathbb Q$ is a homomorphism, prove that $f(x)=0$ for all $x\in\mathbb Q$ or $f(x)=x$ for all $x$ in $\mathbb Q$.
If $f: \mathbb Q\to \mathbb Q$ is a homomorphism, prove that $f(x)=0$ for all $x\in\mathbb Q$ or $f(x)=x$ for all $x$ in $\mathbb Q$. I'm wondering if you can help me with this one?
Any multiplicative homomorphism must send $1$ to an idempotent. The only idempotents of $\mathbb{Q}$ are $0$ and $1$ (the roots of $x^2-x=x(x-1)$), so $\varphi(1)=0$ or $\varphi(1)=1$. If $\varphi(1)=0$, then $\varphi(a) = \varphi(1a) = \varphi(1)\varphi(a)=0$, so $\varphi(x)=0$ for all $x$. If $\varphi(1)=1$ and the map is additive, then prove inductively that $\varphi(n)=n$ for all positive integers, hence for all integers; deduce that $\varphi(q) = q$ for all $q$.
0.666667
multiplicative homomorphism must send $1$ to an idempotent
How to drain power with pins for led matrix on atmega32 instead of using a led driver
I want to make a led driver without the tlc594 series. I use the atmega32 of which I can use 1 PWM pin. The PWM pin will be connected to the base of the transistors. With the PWM pulse I can dim the leds. My question is how to configure the pins so that: 1) Pin is high, led wont burn. 2) Pin is low, led will burn. I added a simplified scheme, of the led driver with a led matrix, so you can understand my situation. Thx for the help.
My question is how to configure the pins so that: 1) Pin is high, led wont burn. 2) Pin is low, led will burn. If you configure a pin as output, setting it to low will sink current and setting it to low will source current. As long as the Vcc supplying your LEDs is the same as the controller Vcc, you circuit should work as expected. The atmega32 can safely sink/source about 20mA per IO. However, there are limitations regarding the total maximum per port and for all ports combined. It depends on the package type. For PDIP its about 100mA max per port and 200mA max total. Take a look at the "DC characteristics" section in the data sheet. So using 4 LEDs as illustrated should work fine (assuming about 20mA per LED).
0.888889
How to configure pins so that pin is high, led wont burn.
In set theories where Continuum Hypothesis is false, what are the new sets?
So, say we are working with non-CH mathematics. This means, AFAIK, that there is at least one set $S$ in our non-CH mathematics, whose cardinality is intermediate between $|\mathbb{N}|$ (card. of naturals) and $|\mathbb{R}|=2^\mathbb{N}$, the continuum. Question: what kind of objects would we find in this set $S$? Also: is this mathematics radically different from the one where CH holds? Specifically, are there results that are used in everyday math , at a relatively introductory level, which do not hold on our non-CH math.?. What results that we find in everyday math would not hold in our new math? Would there, e.g., still exist non-measurable sets? Maybe more specifically: what results depend on the CH?
You might not get new sets -- you might get fewer bijections between the sets you already have! Sometimes getting more cardinals means having fewer sets.
0.666667
Get more cardinals between sets
tombstones and beer mugs
I'm trying to find an alternative to the standard tombstone qed symbol for more informal papers. I initially thought of an empty square with Pub written inside, but what would actually be better would be a small beer mug symbol. (much like the one found in this set of icons http://dutchicon.com/iconsets/food-and-drinks-icons) Unfortunately there doesn't seem to such a symbol in the comprehensive latex symbol list (although many funny symbols can be found there). Has anyone thought about this? Is there any quick-and-dirty solution?
I personally don't like the idea of the beer mug, but you could redefine \qedsymbol to use a previously saved image of a beer mug: \documentclass{article} \usepackage{graphicx} \usepackage{amsthm} \renewcommand\qedsymbol{\raisebox{-4pt}{\includegraphics[height=10pt]{beer-mug}}} \begin{document} \begin{proof} Test proof of a really basic theorem. \end{proof} \end{document}
0.888889
qedsymbol to use a previously saved image
Why is my CV 145% complete?
On Careers, when filling out my CV, it is listed as being 145% complete. Could someone tell me why this is?
Probably the same way I scored 104% of possible points in a compilers class - extra credit. Make sure your typing is neat and read the assignment thoroughly.
1
Compilers class - extra credit
generic helper to get ObjectResult<T> that will match any given EntityObject
trying to make a generic SQL Query via a method that will fetch data i was making this code public ObjectResult&lt;theSelectedTableNameModel&gt; getUsersRes(string sqlStr, string ColNameAsfilter, string FiltersValue,string OrderByFilter="") { string SqlCmd = ""; string By = ""; if (OrderByFilter.isNotEmptyOrNull()) By = string.Concat(" ORDER BY ", OrderByFilter); SqlCmd = string.Format("{0} WHERE {1}={2}{3}", SqlStr, ColNameAsfilter, FiltersValue, By); return anEntityName.ExecuteStoreQuery&lt;theSelectedTableNameModel&gt;(SqlCmd); } i have copied my code and edited real names and other variables /parameters so i might have made a mistake, but the question is , how could i make it more generic than this ? this is a working approach that lets me specify the query of the sqlCommand i wanted it to fit any entity and any model/object/table how could it be done ? i guess there's a ready solution for this or the engeniring of EF not ment to be generic... i'm using asp.net 4.0 , and latest EF..
after some time of testing every possible option, while i did not find any similar code on the net.. this is my solution , as an extension method, did i conduct a bad search/research ? or just no one use it like this , although the extesion is for the type ObjectContext it does return an ObjectResult list of optional parameters for where clause + another for order by and it does the work string firstPartSql="SELECT * FROM YourTblName"; list of string for WHERE filter will contain elements like "columnName=value", "columnName Like '%val%'" list of string for Order by will contain elements like "ColumnName" ,"ColumnName DESC" public static ObjectResult&lt;T&gt; getUsersResStatic&lt;T&gt;(this ObjectContext Entt, string sqlBeginhing, List&lt;string&gt; LstSelectWhersFilter = null, List&lt;string&gt; LstOby = null) { string SqlCmd = ""; string StrWhereFilterPrefix = ""; string StrFinalWHEREFiter =""; string StrKeyOb1 = ""; string StrKeyOb2 = ""; string StrFinalOrderBy = ""; if (LstSelectWhersFilter != null) { StrWhereFilterPrefix = "WHERE"; for (int CountWhers = 0; CountWhers &lt; LstSelectWhersFilter.Count; CountWhers++) { if (CountWhers == 0) StrFinalWHEREFiter = string.Format(" {0} {1} ", StrWhereFilterPrefix, LstSelectWhersFilter.ElementAt(CountWhers)); else { StrWhereFilterPrefix = "AND"; StrFinalWHEREFiter += string.Format(" {0} {1} ", StrWhereFilterPrefix, LstSelectWhersFilter.ElementAt(CountWhers)); } } } if (LstOby != null) { StrKeyOb1 = "ORDER BY"; if (LstOby.Count &gt; 1) { StrKeyOb2 = ","; for (int i = 0; i &lt; LstOby.Count; i++) { if (i == 0) StrFinalOrderBy = string.Format("{0} {1}", StrKeyOb1, LstOby.ElementAt(i)); else StrFinalOrderBy += string.Format("{0} {1}", StrKeyOb2, LstOby.ElementAt(i)); } } else StrFinalOrderBy = string.Format("{0} {1}", StrKeyOb1, LstOby.ElementAt(0)); SqlCmd = string.Format("{0} {1} {2}", sqlBeginhing, StrFinalWHEREFiter, StrFinalOrderBy);//StrKeyOb2, ob2); } if (LstSelectWhersFilter == null &amp;&amp; LstOby == null) SqlCmd = sqlBeginhing; return Entt.ExecuteStoreQuery&lt;T&gt;(SqlCmd); } any kind of comment will be helpfull (well...almost any)
1
ObjectContext extesion
How do I tell the difference between a borrowed chord and a key change?
Having muddled through for a few years, I'm finally learning the basics of harmony. I'm having a bit of trouble, though understanding exactly what goes on when chords occur from outside the key. Is the key changing? Or are these 'borrowed' chords, and in which case, how are they decided on? For example, see the classic "I Can't Forget" by Leonard Cohen. Here is an apparently accurate transcription of the chords in the verse: http://www.maartenmassa.be/CohenChords/09iym/i_cant_forget.htm F# I stumbled out of bed D#m I got ready for the struggle F# I smoked a cigarette D#m C# And I tightened up my gut B Bm G#m I said this can't be me A# E D#m Must be my double F# B And I can't forget... (etc) OK, so I see I-vi-I-vi-V of F# major, taking us to the line "I said this can't be me". This makes sense to me. But what happens then? It seems to modulate to B minor - fine, I think we're heading for a scale with B minor in it, ie A major, D major(/B minor), or G major. But this is followed immediately by G#m, though, so it's not any of those (maybe we're back in F#?), but then we get A#!? E? I am totally confused at this point as to what key we're in. It's particularly galling as the change to A# is my favourite chord change in the song, and the whole run from B to D#m, and then back to F#, is weirdly satisfying. Can anyone explain what's going on here?
This seems to be just an unusual chord sequence (ie, one that we're not used to hearing) within some otherwise fairly natural sounding chords. I's say this isn't a key change. The next verse starts on the same chord (F#) and does the same thing so the context of the chord sequence doens't change. At least until the end of second verse (I haven't listened further), the song is in the key F#.. major ? Only because that';s how the first line is sung (ish, he'sa bit wobbly lol). F#major and Dm scales don't share a heck of a lot of notes, and the sequence does this kind of thing elsewhere so it seems he's going for a notion of breaking some rules and having it sound like it all fits together. I think he's succeeded !
1
This isn't a key change .
How complex are sprite tasks usually allowed to be?
What is the general consensus on how detailed a Sprite command can be? I know Sprite tasks aren't spent until the Technomancer changes the command, but does having conditional modifiers like "if" or "if/else" statements or specific details to objectives count as multiple Tasks? Can stuff like that count as a single Task until you give it other conditions, or would any change in activity count as a spent Task? Also, does a single task limit the sprite to use of a single Complex Form or Power, or can they use as many as they need to continue performing a task?
I need to look in the book (so expect an edit later) but the way I view sprite tasks is sort of a "Do While" loop. It'll execute its task until preset conditions are met. Rather than give it multiple sets of commands, to me it would only make sense to have subsidiary sprites to deal with interfering tasks. Nested conditionals take a huge toll on the GM, especially if they are not technically minded towards following 4 step pseudocode much less priorities and algorithms. Edit: Page 241 of the 20th Anniversary Edition book says... Continuous use of a specific power, whether on a single target or a group, counts as only one task. If the parameters of a task are changed, another task is used. Engaging opponents in a single node in cybercombat only counts as one task, regardless of the number of foes involved.
1
Nested conditionals take a huge toll on the GM
Images give 404 after changing default domain
Never encountered this issue before. So I've just moved a site for a client to another server and for some reason all images give me a 404 when I change the default domain in the database (siteurl and home). CSS, JS and other files are linked correctly - it seems there's something affecting the uploads folder but I can't pinpoint what it is. Any ideas?
Of course you can do as per some other people gave you to go through the Database and fix it. But it can also break it if not done properly. Before going into Database mode, I would suggest one thing that happened to me. First make sure that you go in the settings of WordPress and make sure that the URLs are good... EVEN if they are good SAVE SETTINGS once more to make sure the settings is reflected everywhere. By using plugins to move sites around those settings don't seems to reflect everywhere even if this information here is good. Also I would suggest to go through most of your Settings (For example Permalinks) and Plugin Settings (For Example Polylang I had a problem with it since there is PATH information in it) and see if there is any relations with "PATH" if there is make sure they have the good information and SAVE THEM AGAIN even if they have the proper information. Sometime to make sure the change takes effect... I put a wrong information save and add the proper information again and save again... The reason why I do that, I know some programmers that do no "save" the information if it was the same before and after editing this way your are sure the information is transferred properly.
1
Make sure that you go through the Database and make sure that the URLs are good
Counting vowels with consonants
I have made a program to count the number of vowels and consonants in an inputted string: Scanner in = new Scanner(System.in); System.out.print("Enter a string "); String phrase = in.nextLine(); int i, length, vowels = 0; int consonants = 0; boolean y = false; String j; length = phrase.length(); for (i = 0; i &lt; length; i++) { j = "" + phrase.charAt(i); boolean isAVowel = "aeiou".contains(j.toLowerCase()); boolean y = "y".contains(j.toLowerCase()); if(isAVowel){ vowels++; }else if(isAVowel &amp;&amp; y){ vowels++; consonants++; //}else if(y &amp;&amp; !(isAVowel)){ // vowels++; }else{ consonants++; } System.out.println("The number of vowels in \"" +phrase+"\" is "+ vowels+".\n\nThe number of consonants is "+consonants+".\n\n"); When "y" is by itself it says its a consonant, it should be a vowel. Where do I state this?
I am not able to understand what exactly you want to do with 'y' so have counted them seperately. It is necessary to first remove all the non-word characters from the input. I have modified your code (though haven't optimized): System.out.print("Enter a string: "); String origphrase = new Scanner(System.in).nextLine(); String phrase = origphrase.replaceAll("\\W",""); int i, length, vowels = 0; int consonants = 0; int ys=0; String j; length = phrase.length(); for (i = 0; i &lt; length; i++) { j = "" + phrase.charAt(i); boolean isAVowel = "aeiou".contains(j.toLowerCase()); boolean y = "y".contains(j.toLowerCase()); if(isAVowel){ vowels++; }else if(y){ ys++; }else{ consonants++; } } System.out.println("Phrase:"+origphrase); System.out.println("Vowels:"+vowels); System.out.println("Consonants:"+consonants); System.out.println("Y's:"+ys);
0.777778
Remove non-word characters from input
where to put .sty and .cls file for project
I want to use my own .sty and .cls file in a project. I know of the following two possibilities of placing them: in my local tex tree (or the general tex tree, which is worse) in the same directory as the .tex file Both of these I find unsatisfactory for the following reasons: The local tex tree is unsatisfactory since the .sty file is specific for the project, so I want it to be close to the project, so I easily remember where it is etc. Also, I am using dropbox to synchronize the project files between different computers automatically, so the .sty file should be in the dropbox folder. The 'same directory' is unsatisfactory since the project is in a directory with many subdirectories. The .tex files in all these subdirectories should be able to access the same .sty file. What I would like to do is: create a subdirectory 'style files' in the project directory, where I put style and class files (there are several for the project), then tell tex somehow where to find them. How can I do this? I am using a recent TexLive on Mac OS X.6 I know there have been questions about placement of .sty files, but I did not find an answer to this question.
there is a third possibility and for projects the best one: put all in a texmf directory which is located inside your documents directory. Then do a export TEXMFHOME=texmf before running pdflatex or something else and the texmf tree will be searched first. Inside this local texmf you must have the same TeX Directory Structure as usual: http://tug.org/tds For a local texmf tree you do not need to run texhash because files are searched recursively in that tree
0.777778
Export TEXMFHOME=texmf before running pdflatex or something else
How do I automate the handling of a problem (no network device found) in Ubuntu 10.04 w/ preseed?
I have a preseed file that is doing some automation for an installation of Ubuntu 10.04. At the point where the network hardware is auto-detected, however, it fails to find hardware and displays a message, "No network interfaces detected". To make a long story short, I don't care if it can detect my network interface. How do I do one of the following: Skip that step alltogether. Handle the error page automagically. PS. I found somewhere where it suggested this: netcfg/no_interfaces seen true That didn't work. Thanks
I think this is what you are looking for: d-i netcfg/enable boolean false. I found it here.
1
d-i netcfg/boolean false
Sloshing Sound Under Dash
I have a 2011 Suzuki SX4 Crossover AWD with MT. Sometimes when I start it up, begin moving forward, or quickly decelerate I can hear what sounds like water (or some other liquid) moving from one place to another (can't quite tell where) under the dash or maybe just behind the firewall. I took it to the Suzuki service center (almost 2 hour drive from my home), and they told me that the A/C coolant was low. They refilled it and sent me on my way. However, I still hear the sloshing sound behind the dash. Does anyone have any ideas on what this might be? Thanks. ADDITIONAL INFO I've recently noticed that when this "running water" sound occurs that it is more prominent when the engine is running faster (e.g. during acceleration). This leads me to believe maybe this has something to do with the water pump, or some other liquid pump, that is run by the engine and not moving enough liquid to fill the pipe, hence a sloshing / running water sound.
some cars have a grille just forward of your w/screen.If so remove to access drain tubes inside plenum chamber to far left and right.Usually takes a child size hand to reach so you can insert a hose and flush.Good move to lift floor coverings 1st.Don't forget to check weep holes under your doors either
0.888889
Remove to access drain tubes inside plenum chamber
Making a checkered background for a page
I am writing a math work, and I'd like to create a background which looks like a math notebook. Any idea how to do it ? I found this solution, but I don't know how to put it in a mini-page ... %%% %%% quarre Kaestchenmuster %%% \def\quarre{% \raisebox{\footskip}[0pt][0pt]{% \ setlength{\unitlength}{.01\textwidth}% Einheit_1/100_Textweite \begin{picture}(100,115)% \color{black!10}% \linethickness{0.075mm}% \multiput(2,0)(2,0){49}{\line(0,1){110}}% 110-VER \multiput(0,2)(0,2){54}{\line(1,0){100}}% 54-HOR \color{black}% \put(1,112.1){% \begin{footnotesize} \textsl{\textbf{Notizen}} \end{footnotesize}}% \end{picture}% }% } would be great to combine it with this: Background image for minipage
Here's one possible solution using the background package: \documentclass{article} \usepackage{background} \usepackage{lipsum} \newlength\mylen \setlength\mylen{\dimexpr\paperwidth/40\relax} \SetBgScale{1} \SetBgAngle{0} \SetBgColor{blue!30} \SetBgContents{\tikz{\draw[step=\mylen] (-.5\paperwidth,-.5\paperheight) grid (.5\paperwidth,.5\paperheight);}} \begin{document} \lipsum[1-20] \end{document} And here's an adaptation for TikZ of the code found here, for the case of minipages; the main environment is gridmp with an optional argument (the color for the rules) and a mandatory argument (the width of the minipage): \documentclass{article} \usepackage{tikz} \usepackage{lipsum} \newcommand\MyGrid[3]{% \begin{tikzpicture}[remember picture,overlay] \draw[step=3mm,color=#1] (0,0) grid (#3,#2); \draw[color=#1] (0,#2) -- (#3,#2); \end{tikzpicture}% } \newlength\MaxHt \newsavebox\mybox \newenvironment{gridmp}[2][lightgray] {\def\mycolor{#1} \begin{lrbox}{\mybox}% \begin{minipage}{#2}} {\end{minipage}% \end{lrbox}% \setlength\MaxHt{\dp\mybox}\addtolength\MaxHt{1.1\ht\mybox} \noindent% \raisebox{-\dp\mybox}{\MyGrid{\mycolor}{\MaxHt}{\wd\mybox}}% \usebox{\mybox} \vspace{0.5cm}} \begin{document} \begin{gridmp}{\linewidth} \lipsum[2] \end{gridmp} \begin{gridmp}[blue!30]{\linewidth} \lipsum[2] \end{gridmp} \begin{gridmp}[green!30]{\linewidth} \lipsum[2] \end{gridmp} \end{document}
0.888889
documentclassarticle
How to get a store email addres in php
I made a custom module wich sends a email now i want to edit the module so that it automatically uses one of the store email adresses i saw something like Mage::app()-&gt;getStore()-&gt; but i dont know how to use this to get store mailadress I use zend $mail = new Zend_Mail(); $mail-&gt;setBodyText($bericht); $mail-&gt;setFrom($email, $name); $mail-&gt;addTo("[email protected]", "sales manager"); $mail-&gt;setSubject("Snel offerte"); $tmpFilePath = $_FILES['foto']['tmp_name']; if ($tmpFilePath != ""){ $file_size = $_FILES['foto']['size']; if (($file_size &gt; 22020096)){ Mage::getSingleton('core/session')-&gt;addError($this-&gt;__('Bestand mag niet groter zijn dan 21 MB')); } else{ $fname = $_FILES['foto']['name']; $ftempname = $_FILES['foto']['tmp_name']; $at = new Zend_Mime_Part(file_get_contents($tmpFilePath)); $at-&gt;disposition = Zend_Mime::DISPOSITION_INLINE; $at-&gt;encoding = Zend_Mime::ENCODING_BASE64; $at-&gt;filename = $fname; $mail-&gt;addAttachment($at); } } try { $mail-&gt;send(); }
You can set the store mail address in System > Configuration > General > General > Store Information. Then, to get this setting from your module, you can use the Magento function Mage::getStoreConfig('contacts/email/recipient_email') The function getStoreConfig will allow you to get any configuration, by giving it its XML path.
0.888889
Magento function Mage::getStoreConfig
Water Supply pressure
What size supply pipe must be used from a 5000 litre water tank to supply 4 bars of pressure to a house that is 20m below and 300m away from the tank?
Given that 20 meters of head only equates to 1.96 Bar (1m elevation = 0.0980413943 Bar), no pipe alone will do this - you'll need a pump, or you'll need to accept less than 2 Bar as all the pressure you have available. Then you need to determine the flow rate you wish to operate at for sizing the pipe - you'll get 1.96 bar with any size pipe and no flow (static head) but as you actually use water the pressure will drop (dynamic head) in relation to to pipe size and rate of flow. That is essentially friction in the pipe resisting flow and reducing the effective head. Calculators are available and the formulas for that are adequately complex that using one is suggested. Aside from size of pipe and flow rate, pipe material enters into it as some types are smoother inside and thus have less friction for a given size of pipe than other types. For example, if you were sizing for 12 l/min, 25mm plastic pipe would have about 2.7 m dynamic head, leaving you with 17.3m head pressure (delivery pressure = 1.7 Bar), and 50 mm pipe would only lose 0.0925m at that flow rate (delivery pressure = 1.9 Bar). Bump the flow up to 120 l/min and the 50 mm pipe costs 6.55m head (delivery pressure = 1.3 Bar) - but the 25mm pipe cannot provide that flow rate at all with 20m head - it tops out at about 35 l/min with no pressure at the house end (20 m static head - 20m dynamic head; delivery pressure = 0 Bar)
1
20 meters of head only equates to 1.96 Bar (1m elevation = 0.0980413943 Bar)
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.
My Mother-in-law uses it frequently. She uses it for soups, etc... She also uses it when making it bread. She tells me it's cause it gives the dough a nicer texture. She'll stores it for a couple weeks sealed properly (in canning jars) I think. Although as I'm thinking now, I don't see why you couldn't freeze it...
1
My Mother-in-law uses it for soups, etc.
Can grep return true/false or are there alternative methods
I'm trying to write this script for an assignment - it's only the second one I've written so bear with me. As a part of this script, I need to be able to check if the first argument given matches the first word of file. If it does, exit with an error message, if it doesn't, append the arguments to the file. I understand how to write the if statement, but not how to use grep within a script. I understand that grep will look something like this grep ^$1 schemas.txt I feel like this should be much easier than I am making it. Any help appreciated. Update: I'm getting an error too many arguments on the if statement. I got rid of the space between grep-q and then got an error binary operator expected. I've been poking around at it, but I don't see what it sees. if [ grep -q ^$1 schemas.txt ] then echo "Schema already exists. Please try again" exit 1 else echo "$@" &gt;&gt; schemas.txt fi
grep returns a different exit code if its found something (zero) vs. if it hasn't found something (non-zero). In an if statement, a zero exit code is mapped to "true" and a non-zero exit code is mapped to false. In addition, grep has a -q argument to not output the matched text (but only return the exit status code) So, you can use grep like this: if grep -q PATTERN file.txt; then echo found else echo not found fi As a quick note, when you do something like if [ -z "$var" ]…, it turns out that [ is actually a command you're running, just like grep. On my system, it's /usr/bin/[. (Well, technically, your shell probably has it built-in, but that's an optimization. It behaves as if it were a command). It works the same way, [ returns a zero exit code for true, a non-zero exit code for false. (test is the same thing as [, except for the closing ])
0.888889
grep returns a different exit code if its found something (non-zero)
How to make the code run only on interrupt?
I have the following code which is supposed to count the number of interrupts on pin P3.2 (external interrupt) and display it on UART. But this code is doing exactly opposite of it i.e. it's running when the interrupt doesn't occur (count gets incremented when there is no interrupt and count stops when there is an interrupt). Any advice on it on where I'm going wrong ? I'm using P89LV52RD2 micro controller. Thanks in advance! #include&lt;reg51.h&gt; #include&lt;stdio.h&gt; #include&lt;stdlib.h&gt; /* function prototypes */ void delay(unsigned int ms); void putc1( chr); void windspeed_read( void); void initialize(void); void record_wind(unsigned char c); void puts1(char* p); void send_data(); // global variables declared unsigned char buf[1]={0},*ptr; int c=0,i=0; /* delay function to create a delay of 1 sec */ void delay(const unsigned int ms) { unsigned int x; unsigned int y; for (x = 0; x &lt; ms; x++) { for (y = 0; y &lt;= 113; y++) ; } } void puts1(char* p) { char *temp = p; /*temp pointer so that the actual pointer is not displaced */ while(*temp != 0x00) { putc1(*temp); temp++; } } /* function to detect the wind speed */ void windspeed_read( void ) interrupt 0 { EA=0; c = c+1; sprintf(buf,"%d",c); EA=1; } /*init the TIMER and etc*/ void initialize() { SCON = 0x50; /*SCON: mode 1, 8-bit UART, enable receive */ TMOD |= 0x20; /*TMOD: timer 1, mode 2, 8-bit */ TH1 = 0xFD; /*TH1: for 9600 baud */ TR1 = 1; /*TR1: timer 1 run */ } /* to print the character in UART and serial window*/ void putc1(chr) { initialize(); SBUF = chr; while(TI==0); /*Wait until the character is completely sent */ TI=0; /*Reset the flag */ } /* main function */ void main() { initialize(); IE = 0x81; EX0 = 1; while(1) { send_data(); delay(100000); } } void send_data() { sprintf(buf,"%d",c); ptr = buf; P2 = buf[0]; puts1(ptr); } Here is the link for the data sheet of microcontroller I'm using.
In general on the 8051, an interrupt source sets an interrupt flag, and the handler for that interrupt must explicitly clear that flag before returning, or else the interrupt will keep happening. You do not seem to be clearing any flags in your ISR (windspeed_read()). I also do not see any place where you are configuring the hardware that will generate the interrupt in the first place.
0.777778
interrupt flags in the ISR
Why was Tyrion disgraced?
At the end of S2E10 "Valar Morghulis" Game of Thrones Tyrion has been disgraced, removed from his role as Hand of the King and left in a small room following a successful defence of King's Landing? Why is he in such disgrace after successfully defending the city?
Whilst he lay recovering from his wounds his father, who had little regard for him and wanted to ensure his own position of power set to work. He had authority when he was hand which his father took. He had power due to his wild men who had been removed. He had influence over the Gold Cloaks and guard via Bron etc. This had been removed. All of his allies and supporters had been bought by his father or sent away whereas his enemies now enjoyed the protection and power of his sister and nephew. He now has no political authority and no muscle to back his claims. He was also given no credit for what he did in defending the city. Overall he was not so much disgraced as had his status and power taken by Tywin which left him vulnerable.
0.888889
Tywin's power was taken by his father when he was hand .
How to describe the differences in skewed data with same median but statistically different distribution?
I am comparing length of stay after laparoscopic and open appendectomy in over 160000 patients. LOS is typically a skewed variable so I use the median and interquartile range and ranksum test to describe the result, which is 2, IQR 2-3 and 2, IQR 2-4, p&lt;0.0001. So there is a highly significant difference but it does not show that well in the median and IQR. The difference in length of stay is very small. This finding is a negative finding but still interesting as it goes against what most people think about LOS after laparoscopic appendectomy. That is why I want to report on the difference in LOS which is not evident if I only report median and IQR with p-value. The arithmetic mean (3.1 vs 2.8 and a difference of 0.3 days) is not recommended as the distribution is skewed. I wonder if any other measure could be used like, geometric mean (2.5 vs 2.3, difference 0.2 days) or harmonic mean (2.1 vs 1.9 days, difference 0.2 days)? When can I use geometric mean or harmonic mean? I am inclined to use the harmonic mean which comes closest to the median and gives a difference of 0.2 days. Is this incorrect?
The same question has been discussed on the Google-group Medstats. It was suggested that the arithmetic mean should be used as this is a more useful measure for planners. A difference in LOS of 0.3 days can be important for planning of health services and cost. Geometric and harmonic mean were dismissed as not correct to use in this situation. Different approaches was proposed for modelling using quantile or Cox-regression. I proposed poisson regression but ended up with negative binomial regression as the data showed evidence of overdispersion. This allowed me to compare the unadjusted difference of 0.3 days with difference after adjusting for age, sex, perforated appendicitis and period, which came down to a difference of only 0.05 days between the two surgical methods. This is important findings (although negative) as it goes against the common thinking about the advantages of laparoscopic appendectomy
0.666667
A difference in LOS of 0.3 days can be important for planning of health services and cost
Will paprika taste good in my soup?
I've been making a soup that has an onion + garlic + carrot + celery + flour base, and then chunks of sweet potato and potato as well as barley added. I've been spicing it with salt, pepper, garlic powder, and basil. Now I want to substitute paprika for the basil. Would that ruin the soup?
Go for a barbeque or curry: both of those will go well with the veggies you're using. Actually, your best bet is to experiment and try lots of different spice combinations. Soups are very versatile.
0.777778
Go for a barbeque or curry
Convert a String[] into an object and back into a String[]?
I'm putting a concatenated string into the Tag property of a component this way: Tag = String.Format("{0};{1};{2}", AThis, AThat, ATheOtherThing); Now how do I get it out, as Tag is an object? Trying to do this: String[] someStuff = Tag.Split(';'); I get, "'object' does not contain a definition for 'Split' and no extension method 'Split' accepting a first argument of type 'object' could be found
The type of Tag is object but the Split method is on String. You need to cast Tag back to String in order to call Split string[] someStuff = ((string)Tag).Split(';');
1
Split method on String
What happens to light and mass in the center of a black hole?
I know that black holes are "black" because nothing can escape it due to the massive gravity, but I am wondering if there are any theories as to what happens to the light or mass that enters a black hole and cannot escape.
Simply put: we don't know. From our perspective a black hole cuts off its interior from the rest of the Universe, the only aspects of a black hole that remain are mass, charge, and spin. In truth, even barely understanding what happens inside the event horizon will depend on an understanding of quantum gravity, something which we do not yet have. And even then it will still be largely theoretical since we have no way of interacting with the interior of a black hole.
1
a black hole cuts off its interior from the rest of the Universe
Should I tell other interviewers where else I've interviewed?
I am currently travelling for faculty interviews. Some professors and other interviewers have asked me where else I have interviewed. Should I tell interviewers where else I've interviewed? Intuitively I would like to give them less information, but I also don't want to appear guarded and defensive as a person, either.
If you don't want to disclose that, you can simply say: "I'd rather not discuss this", and you can look straight into your interviewer eyes with that. I've seen candidates do that; it may have looked harsh, but there's no obligation on the candidate's side to tell anything beyond the contents of the job talk. You can also try to convert this into a joke like "Enough to earn me a free roundtrip this year". An American faculty should take that as a hint that you don't want to talk about it. An international faculty may need a more straight answer like the one I gave above. (I am talking about the US here as the largest academic market; in UK, as far as I understand, you won't have more than 30 minutes face time with the faculty of the hiring institution, and they probably have more important things to ask than the # of interviews you have.) Having said that, you need to weight in the benefits of telling vs. not. For one thing, you may not have all the invitations out yet on your first fly-out, so you really don't know yet what other interviews you might have. On the other hand, by the time you reach your sixth destination (if you are lucky to get that many), the first place may already have told you, "Sorry, we made the offer to somebody else". So nominally you may have interviewed there, but really you won't get an offer from them. As a bottom line, you need to do what others in your discipline do. You don't want to look like a fool in the environment where everybody keep their secrets by telling left and right about your choosing between Harvard and Stanford (and thus losing a chance to get a far more realistic offer from Alabama); and you don't want to look like a fool hinting at many undisclosed interviews when your adviser had told them that this is the only interview you have when they called him/her, or your other interviews were posted on a job market rumor website.
1
"I'd rather not discuss this", and you can look straight into your interviewer eyes with that"
How do you give cells in a TableView a unique reference
I'm still very new to iOS development, so bear with me. I've got a TableView using static cells to contain options (click to check), I am able to select the cells fine. I'd like to assign a value (identifier) to each cell, so that when a cell is selected or de-selected I can add/remove it from an array. Then, once the editing has finished, use the references stored in the array to update the respective CoreData attributes. My google skills have failed me today, so a push in the right direction would be very much appreciated. Thanks.
NSIndexPath is the best tool for that! It will be unique for the selected cell. - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { NSLog(@"%i", indexPath.row); NSLog(@"%i", indexPath.section); } And I think you need this: [yourArray objectAtIndex:indexPath.row]; to get reference .
0.888889
NSIndexPath will be unique for the selected cell
Can I have an Animal Companions without being a druid or ranger?
I'm looking for a way to have an animal companion with classes other than druid or ranger, for example a paladin that fights with a trained hawk. I'm all for multiclassing if need be, but I'm looking for other ways as well, through feats if necessary. I'm not really worried about min/max stats or optimized builds.
Many, many classes have an archetype that grants an animal companion or other special access to them. However, failing that, any character of at least level 4 may gain access to an animal companion via the Animal Ally feat, though most characters may have to wait to level 5 (the next feat level in pathfinder) to actually take the feat. In the specific case of a paladin, you must delay access to the Divine Bond ability by one level (probably by dipping a level of cleric or some such) in order to be eligible for the feat. You could also give up the mount from that ability for the weapon option, but if you choose the mount option your hawk (or whatever) has an effective druid level of (your total level including your paladin levels)+(your paladin levels again)-3, which is pretty cool. At level 6 this is the difference between an EDL 8 hawk and an EDL 3 hawk, which is a sufficient difference to necessarily alter how you use it in game. Consider also that not all animals you use in combat or otherwise need to be animal companions. Animal companions are special super-powerful bonded animals that you pretty much control directly. You can get a loyal, useful, hunting hawk by training one with the Handle Animal skill. If you want a normal hawk to use for rabbit hunts and message delivery, this is probably more appropriate. If you want your hawk to scout out the enemy troop movements and report back, the animal companion version is a better bet.
0.888889
Animal Ally feats are special super-powerful bonded animals that you control directly .
Can a smaller sensor's "crop factor" be used to calculate the exact increase in depth of field?
If APS-C and similar crop-sensor digital cameras have a focal length multiplying effect such that a 50mm lens has an apparent focal length closer to the field of view of an 80mm on a full frame camera, and yet at the same time the depth of field for the smaller sensor camera is more like the depth of field a 50mm lens would produce on a full frame camera (using the same aperture), then this would seem to suggest the concept of an "aperture dividing effect." In other words, a 50mm f/1.8 lens on an APS-C camera would act more like a 80mm f/2.8 (approx. 1.8 * 1.6x) lens in 35mm equivalent — for depth of field, not considering exposure. Can someone with a better understanding of the physics involved clarify this for me. I've never seen this concept explicitly mentioned anywhere, so I am a bit suspect of it.
There is no "focal length multiplier effect", period. The focal length of the lens does NOT change magically because you use a smaller or larger sensor, it stays exactly the same. All you get is an image that's cropped from the one you would have gotten had you used the same lens to record an image on a larger size sensor. The DOF will thus be the same it would have been had you used that larger sensor as well.
0.777778
No "focal length multiplier effect"
Unable to apply publish properties?
I don't know what caused Visual Studio to start thinking it needs to publish my project, but now whenever I build it, I get several "Unable to apply publish properties for item 'blah'" warnings. How do I stop Visual&nbsp;Studio&nbsp;2005's publishing facilities from working on my project completely? I use InstallShield, so I don't have any use for Visual Studio's publishing system.
Open your project, select Project Properties->Publish(ing)->Application Files and click the reset all button. Does that help?
1
How do I reset all files?
Does the a gasoline or diesel engine appy fuel at high speeds when not pressing the pedal and more
Let say I directly connect a small engine to my bicycle, and that I'm superman who can overcome any force. Then I start cycling (using my legs...) - the engine starts to rotate, even though I haven't "started it" using the switch. Does it mean that if I press the pedal (or whatever) of the engine, it will apply force? Either on a diesel or a gasoline engine. Another question: Lets say I'm driving down a hill in a relatively high speed in a car, and I'm not pressing the gas pedal at all. Does the engine burn fuel at all, in both diesel and gas? If I (while in gear) turn off the engine, will something actually happen? If I would press the pedal after turning it off (while it still rotates) - will it apply force? (in both diesel and gas). If, while driving, I disconnected the idler (i.e the engine won't apply any force if I'm not pressing the pedal at any RPM and pressing the clutch will take it to zero RPM) and press the brake until I get to a complete stop, will the engine "stall"? If I'm doing it in a hill facing down, after releasing the brakes I'd accelerate and the engine would gain RPMs, will it be able to continue applying force? Finally: What's the difference between a "running engine" and one thats not running, assuming both are rotating? I'm sorry if I'm asking too much so if you would at least explain the principle I'd be very happy. Thank you!
I will explain it for an EFI engine with a manual transmission because it might not be as straight forward with a carbureted engine or automatic. For ease of explaining this I will consider the engine as "on" whenever the ignition switch is set to the "on" state. This means that the ECU is on and is monitoring the engine state and controlling it's behavior. For the bicycle example with an EFI engine if you had your "ignition" to on while you started cycling then the ecu would start to inject fuel and cause spark so yes it would apply force and use fuel. If the ignition were off then the ecu would be off and you wouldn't get any fuel or spark so no you won't get any force if you apply the accelerator. Going downhill not pressing the accelerator with the ignition on will use significantly less fuel (not sure if the ecu uses zero fuel though) and the engine will still be sparking for sure. If you were to turn the ignition to accessory while coasting downhill the ecu will shut off and you will stop injecting fuel and stop spark as well so the accelerator would no longer do anything. If you have the clutch in and you stop the engine will stop. If you then release the brakes and roll down a hill then one of two things will happen. 1) if your ecu is on (ingition on) then the engine will start to use fuel and spark. (It will be really rough until it gets to ~700rpm) 2) if your ecu is off then the engine will rotate but no fuel or spark so therefore no acceleration. Finally the difference between a running engine and not if they are both spinning : A running engine is one which can continue to run from the energy it is producing without an external force. Modern engines require fuel air and spark to satisfy this requirement. eg. ECU on and rotating An engine is off if when all external forces are removed then engine would stop. eg. the ecu is off so the engine isn't producing any of its own power and is only spinning because it is connected to wheels that are being accelerated by gravity. Hope this clarifies it somewhat....
0.777778
ECU on when ignition switch is set to the "on" state
Prove that a primitive root of $p^2$ is also a primitive root of $p^n$ for $n>1$.
For an odd prime, prove that a primitive root of $p^2$ is also a primitive root of $p^n$ for $n&gt;1$. I have proved the other way round that any primitive root of $p^n$ is also a primitive root of $p$ but I have not been able to solve this one. I have tried the usual things that is I have assumed the contrary that there does not exist the primitive root following the above condition and then proceeded but couldn't solve it. Please help.
We know from here, if $ord_pa=d, ord_{(p^2)}a= d$ or $pd$ If $a$ is a primitive root $\pmod {p^2}, ord_{(p^2)}a=\phi(p^2)=p(p-1)$ Then $ord_pa$ can be $p-1$ or $p(p-1)$ But as $ord_pa&lt;p, ord_pa$ must be $p-1=\phi(p)\implies a$ is a primitive root $\pmod p$ Again from here, $$ord_{(p^s)}(a)=d, ord_{p^{(s+1)}}(a)=pd,\text{ then } ord_{p^{(s+2)}}(a)=p^2d$$ So, as $ord_pa=p-1,ord_{(p^2)}a=p(p-1); ord_{(p^3)}a$ will be $p\cdot p(p-1)=\phi(p^3)$ Again as, $ord_{(p^2)}a=p(p-1) ord_{(p^3)}a=p\cdot p(p-1);ord_{(p^4)}a$ will be $p\cdot p^2(p-1)=\phi(p^4)$
0.888889
$ord_pa=d, ord_(p2)a= d$ or $pd$
Get an IFRAME element by name does not work anymore?
I have this very old JS that worked in IE8 that was doing this: window.document.getElementById("frameModalityList") Here is what I want to fetch: &lt;iframe name="frameModalityList" src="iframe_advanced_list.jsp" frameborder="0" marginheight="0" marginwidth="0" class="advanced_list" width="100%" height="300"&gt;&lt;/iframe&gt; Now, when I try it in IE9/10, Chrome, I get an error: SCRIPT5007: Caught exception occurred : Unable to get property 'contentWindow' of undefined or null reference What is the new proper way to get the IFRAME element?
New EDIT: That old code worked because of some possible bug (or intended) in the old versions of internet explorer. From this Beware of id and name attribute mixups when using getElementById in Internet Explorer When using getElementById to get a reference to an element via the id attribute, Internet Explorer for Windows (and some versions of Opera) will also match an element whose name attribute contains the same value. First given answer: You are fetching by id but you didn't set the id in iframe element window.document.getElementById("frameModalityList") change name attribute to id iframe to &lt;iframe id="frameModalityList" src="iframe_advanced_list.jsp" frameborder="0" marginheight="0" marginwidth="0" class="advanced_list" width="100%" height="300"&gt;&lt;/iframe&gt;
1
GetElementById in Internet Explorer
How do you output the filename in find command while using -exec?
I use the following line to find all sub-directories of the PWD and run svnadmin verify on each directory (I already know that they're Subversion repositories) find ./* -maxdepth 0 -exec svnadmin verify {} \; This works well, other than the fact that the output looks like this: * Verifying repository metadata ... * Verifying metadata at revision 1 ... * Verifying metadata at revision 2 ... * Verifying metadata at revision 4 ... * Verifying metadata at revision 5 ... * Verifying metadata at revision 6 ... * Verifying metadata at revision 9 ... * Verifying metadata at revision 10 ... * Verifying metadata at revision 12 ... * Verifying metadata at revision 14 ... * Verifying metadata at revision 15 ... * Verifying metadata at revision 18 ... * Verifying metadata at revision 20 ... * Verifying metadata at revision 22 ... * Verified revision 0. * Verified revision 1. * Verified revision 2. * Verified revision 3. * Verified revision 4. * Verified revision 5. * Verified revision 6. * Verified revision 7. * Verified revision 8. * Verified revision 9. * Verified revision 10. * Verified revision 11. * Verified revision 12. * Verified revision 13. * Verified revision 14. * Verified revision 15. * Verified revision 16. * Verified revision 17. * Verified revision 18. * Verified revision 19. * Verified revision 20. * Verified revision 21. * Verified revision 22. * Verified revision 23. * Verified revision 0. * Verifying repository metadata ... * Verifying metadata at revision 4 ... * Verifying metadata at revision 5 ... * Verifying metadata at revision 6 ... * Verifying metadata at revision 7 ... * Verifying metadata at revision 9 ... * Verified revision 0. * Verified revision 1. * Verified revision 2. * Verified revision 3. * Verified revision 4. * Verified revision 5. * Verified revision 6. * Verified revision 7. * Verified revision 8. * Verified revision 9. I'd really like find to print the filename before executing the svnadmin verify command, to make logging easier. I've tried to squeeze a little ls in there but bodged it up, how should I do this (preferably simply)?
Use . -maxdepth 1 instead of ./*, you need only the first level in the folder structure Use -type d, you need only folders Use ! -name ".", you don't need . Use -exec to start a shell Use sh -c to start commands inside the shell Your command find . -maxdepth 1 -type d ! -name "." -exec sh -c 'echo "{}"; svnadmin verify "{}"' \; or shorter Use -prune if the file is a directory, do not descend into it Your command find . -mindepth 1 -prune -exec sh -c 'echo "{}"; svnadmin verify "{}"' \;
0.888889
-maxdepth 1 instead of ./*, you need only the first level in the folder structure
Sloshing Sound Under Dash
I have a 2011 Suzuki SX4 Crossover AWD with MT. Sometimes when I start it up, begin moving forward, or quickly decelerate I can hear what sounds like water (or some other liquid) moving from one place to another (can't quite tell where) under the dash or maybe just behind the firewall. I took it to the Suzuki service center (almost 2 hour drive from my home), and they told me that the A/C coolant was low. They refilled it and sent me on my way. However, I still hear the sloshing sound behind the dash. Does anyone have any ideas on what this might be? Thanks. ADDITIONAL INFO I've recently noticed that when this "running water" sound occurs that it is more prominent when the engine is running faster (e.g. during acceleration). This leads me to believe maybe this has something to do with the water pump, or some other liquid pump, that is run by the engine and not moving enough liquid to fill the pipe, hence a sloshing / running water sound.
My experience (in multiple cars, albeit not your make/model) has been that this sound always means your cooling system is under-filled. If you've emptied your cooling system and refilled it, it can be really hard to get all the air pockets out of the heater core, especially since in many vehicles it's almost as high as the radiator cap and at the opposite end of the system. The best system I know of is to park on a steep grade with the front of the car facing upward, then let the engine run with the radiator cap off. Squeezing the hoses, especially the hoses near the back of the engine compartment that go to the heater core, and varying the throttle can help. You should get bubbles coming up the top of the radiator. Whenever the fluid level drops, add some more coolant, and repeat until you can't get any more bubbling. By the way, another symptom that might indicate this is your problem is that it's usually associated with poor heater performance (taking a long time to get heat, or only getting warm air, not hot air, out of the heater).
0.888889
a cooling system is under-filled .
Does Improved Familiar feat apply to Urban Companions?
Cityscape Web Enhancement lists an alternate class feature for Druids and Rangers, called Urban Companion: The character gains the companionship of a smaller but far more intelligent creature than she otherwise would have. This is identical to the sorcerer's ability to summon a familiar (PH 52), including all benefits granted and gained by the familiar, except as noted below. Her functional level for determining the abilities of the companion is equal to her druid level or one-half her ranger level. Does a character with Urban Companion qualify for the Improved Familiar feat?
The key to this is in the next sentence below your quote (emphasis mine): This is identical to the sorcerer's ability to summon a familiar (PH 52), including all benefits granted and gained by the familiar, except as noted below. Her functional level for determining the abilities of the companion is equal to her druid level or one-half her ranger level. Since the Urban Companion alternate class feature explicitly defines an equivalent arcane caster level for the purpose of obtaining a familiar through this ACF, the familiar tables' normal requirement for an arcane spellcaster level is satisfied by this; therefore, by RAW, characters with Urban Companion qualify for Improved Familiar, analogous to how cleric domains unlock feats for clerics, as they also already have the ability to obtain a familiar (via Urban Companion), and the alignment compatibility prerequisite is simply a restriction on which familiars you can have, not on the ability to take a familiar to begin with. This text also implements the class-level reduction for Rangers, just like they get for normal animal companions.
1
Characters with Urban Companion qualify for Improved Familiar .
Making a C++ app scriptable
I have several functions in my program that look like this: void foo(int x, int y) Now I want my program to take a string that looks like: foo(3, 5) And execute the corresponding function. What's the most straightforward way to implement this? When I say straightforward, I mean reasonably extensible and elegant, but it shouldn't take too long to code up. Edit: While using a real scripting language would of course solve my problem, I'd still like to know if there is a quick way to implement this in pure C++.
CERN provides CINT, a C/C++ interpreter that can be embedded within your application to provide scripting capabilities.
0.666667
CERN provides CINT, a C/C++ interpreter that can be embedded in your application
UNIX semaphores
I wrote an example program about UNIX semaphores, where a process and its child lock/unlock the same semaphore. I would appreciate your feedback about what I could improve in my C style. Generally I feel that the program flow is hard to read because of all those error checks, but I didn't find a better way to write it. It's also breaking the rule of "one vertical screen maximum per function" but I don't see a logical way to split it into functions. #include &lt;semaphore.h&gt; #include &lt;stdio.h&gt; #include &lt;errno.h&gt; #include &lt;stdlib.h&gt; #include &lt;unistd.h&gt; #include &lt;sys/types.h&gt; #include &lt;sys/stat.h&gt; #include &lt;fcntl.h&gt; #include &lt;sys/mman.h&gt; int main(void) { /* place semaphore in shared memory */ sem_t *sema = mmap(NULL, sizeof(sema), PROT_READ |PROT_WRITE,MAP_SHARED|MAP_ANONYMOUS, -1, 0); if (!sema) { perror("Out of memory"); exit(EXIT_FAILURE); } /* create, initialize semaphore */ if (sem_init(sema, 1, 0) &lt; 0) { perror("semaphore initilization"); exit(EXIT_FAILURE); } int i, nloop=10; int ret = fork(); if (ret &lt; 0) { perror("fork failed"); exit(EXIT_FAILURE); } if (ret == 0) { /* child process*/ for (i = 0; i &lt; nloop; i++) { printf("child unlocks semaphore: %d\n", i); sem_post(sema); sleep(1); } if (munmap(sema, sizeof(sema)) &lt; 0) { perror("munmap failed"); exit(EXIT_FAILURE); } exit(EXIT_SUCCESS); } if (ret &gt; 0) { /* back to parent process */ for (i = 0; i &lt; nloop; i++) { printf("parent starts waiting: %d\n", i); sem_wait(sema); printf("parent finished waiting: %d\n", i); } if (sem_destroy(sema) &lt; 0) { perror("sem_destroy failed"); exit(EXIT_FAILURE); } if (munmap(sema, sizeof(sema)) &lt; 0) { perror("munmap failed"); exit(EXIT_FAILURE); } exit(EXIT_SUCCESS); } }
main() must always return an int. return 0 at the end of your function. The consensus is that, when possible, return instead of exit. You could make a helper function that accepts a bool (from stdbool.h) and a const char *, and if the bool is false then perror and exit(EXIT_FAILURE) are called.
0.888889
Int. return 0 at the end of your function
Should I say "another ones" or "another one's"
Since I'm implying possession should I say another one's and your's? The book could either be yours or another ones. Is it "yours" or "your's" and "another ones" or "another one's"?
Neither of the options you present are correct. You should say: The book could either be yours or someone else's.
1
The book could either be yours or someone else's
Is it an absolute must that we ignore/delete all compiled files before committing?
I am working on a Drupal theme. I am going to be using "intermediary" languages to develop it, ie Stylus for styles, and CoffeeScript for some of the front-end scripts. I am going to be using a git hosting service to be able to share the code among colleges. I am also going to be using it to update the code locally and then push onto hosting service, to be later pulled by the live drupal site. This makes things really elegant. However, I have noticed that a lot of developers tend to .gitignore all compiled code. If it were a good practice, I would've loved to follow it, if and only if there wasn't this one issue: recompiling all the code that is needed in order for the theme to work out correctly. This means that when I do a pull, I will have to recompile all the CSS and JavaScript code. Now, if I were to do a pull on the live site, there's a risk that a user goes to the site right at the moment I do the pull. No styles and scripts will be loaded on the user's end, so long as the code hasn't compiled. Of course, compiling takes about a second, and the user might probably think to him/herself "meh, it was just my internet connection." But there is also the issue that the server doesn't have the compilers installed to begin with. So now, I would do a pull, but there will be no styles, and no scripts. Is it an absolute must that I delete all compiled code, or can I go ahead and include them in the commit?
MainMa's answer is great but it should be noted that this is a prime case for continuous integration. Setting up a machine (either a hosted solution or one of your own) that will identify when a commit has come in, compile the code, run appropriate tests, and build the deployment package if the tests succeed. This approach could be taken a step further and automate a scheduled deployment when your criteria for a deployment has been met.
0.666667
Set up a machine that will identify when a commit has come in, compile the code, run appropriate tests, and build the deployment
How do I make image-based tiled background for UIView so that it doesn't scale?
In iOS application, I have 250x85pt UIView. I would like it to have image-based tiled background. The original image is 398x398 px. I would like my image to tile. When I run application, my image tiles, but for some reason it scales as follows: I used the following code to achieve it: var image = UIImage(contentsOfFile: "myfilepath.png")! var uicolor = UIColor(patternImage: image) uiview.backgroundColor = uicolor Could you explain 1. why ios scales my image, and 2. how do I draw tiled image without scaling?
basically the image is bigger than your UIView. when you give UIColor(patternImage: image) it uses 1x size of the image. The image we usually laptops are scaled to window size with its aspect ratio. So scale your image to your requirement and then apply it as background image.
0.666667
UIColor image size
Compiling in Code::Blocks with Dependencies
I have a project in Code::Blocks which uses uses a dynamic library, and will use more in the future. I have set up the project correctly to use the library, and it compiles and runs perfectly fine. However, I'm wondering if there is a way to compile a release version of the exe with the dlls needed in a folder alongside it. (I'd prefer not to hunt them each down and copy/paste them in.) I feel like I'm missing something, or going about it the wrong way. Is there anyway to have Code::Blocks do this or a better way of obtaining an easy-to-distribute zipfile/project? How could I use makefiles (cmake preferably, but any type compatible with Windows would be great) to accomplish this?
CodeBlocks offers the ability to execute pre or post build things. Checkout menu "Project->Build options", and under the "Pre/Post build steps" tab, you can insert any shell command you want. For example: When hitting F9, you will see: -------------- Build: Release in aaa (compiler: GNU GCC Compiler)--------------- Target is up to date. Running target post-build steps echo "Hi" Hi Process terminated with status 0 (0 minutes, 0 seconds) 0 errors, 0 warnings (0 minutes, 0 seconds) So you can add here any command you want to gather you files together, for example something like (using 7-zip): 7z a my_archive.zip myfile1.exe myfile2.dll readme.txt Be advised that this will be executed at every build which is not something you might want: when compiling a minor change in program, you don't want to wait for the archive program. So maybe do this only in a special build target.
1
Build: Release in GNU GCC Compiler
Google Apps login in wordpress
I manage a google apps domain with plenty of users; I would like to join Google apps with a Wordpress based intranet app we're creating. Which level of integration could I expect to achieve? Our hope is to create users in wordpress using their google apps email and let them login using their google apps password, so that they don't need to remember two different passwords. How would you suggest we should implement this?
I would say Using OAuth would be your best bet. Making it so that the users can login only with gmail by removing all the WordPress registration and login. http://wordpress.org/extend/plugins/oauth-provider/
0.888889
Using OAuth to login only with gmail
Make *Buffer List* always appear in horizontal split
I know Emacs tries to be intellectual and opens its helper buffers depending on which dimension of the window is bigger, so it may appear in vertical split window if current width is bigger than height, and in horizontal split otherwise. But I’d prefer it to open that list always in horizontal split, because there are long paths I can’t see when the buffer is placed in vertical split. How can I do this?
You can remove (5) if you prefer not to select the window after it is displayed -- i.e., remove (select-window (get-buffer-window (buffer-name buffer))). I like the bottom window to be reserved for a 3-month calendar, so that's why I have a condition to use the window above (if it exists) -- you can remove that condition if you are so inclined. Actually, it's your function so you can modify everything as you see fit now that you see how it works. The alist would be used like this: '((window-width . 33)) if you wanted to control certain aspects of the target window, etc. I find myself always going back to this document page because it is the only scanty formal example I've found . . . and, of course, the source itself window.el: http://www.gnu.org/software/emacs/manual/html_node/elisp/Display-Action-Functions.html (defun lawlist-list-buffers-left (&amp;optional arg) "Display a list of existing buffers. The list is displayed in a buffer named \"*Buffer List*\". See `buffer-menu' for a description of the Buffer Menu. By default, all buffers are listed except those whose names start with a space (which are for internal use). With prefix argument ARG, show only buffers that are visiting files." (interactive "P") (lawlist-display-buffer-left (list-buffers-noselect arg) nil)) (defun lawlist-list-buffers-right (&amp;optional arg) "Display a list of existing buffers. The list is displayed in a buffer named \"*Buffer List*\". See `buffer-menu' for a description of the Buffer Menu. By default, all buffers are listed except those whose names start with a space (which are for internal use). With prefix argument ARG, show only buffers that are visiting files." (interactive "P") (lawlist-display-buffer-right (list-buffers-noselect arg) nil)) (defun lawlist-display-buffer-left (buffer alist) "(1) If `buffer` is already displayed, then display it again in the same window. (2) If `buffer` is not already displayed, and if there is a window to the left, then display that `buffer` in said window. (3) If `buffer` is not already displayed, and if there is a window to the right, then use the selected window. (4) If all else fails, then create a new window to the left and display `buffer` there. (5) Select the target window which displays `buffer`." (let ( (window (cond ((get-buffer-window buffer (selected-frame))) ((window-in-direction 'above)) ((window-in-direction 'left)) ((window-in-direction 'right) (selected-window)) (t (split-window (selected-window) nil 'left))))) (window--display-buffer buffer window 'window alist display-buffer-mark-dedicated) (select-window (get-buffer-window (buffer-name buffer))))) (defun lawlist-display-buffer-right (buffer alist) "(1) If `buffer` is already displayed, then display it again in the same window. (2) If `buffer` is not already displayed, and if there is a window to the right, then display that `buffer` in said window. (3) If `buffer` is not already displayed, and if there is a window to the left, then use the selected window. (4) If all else fails, then create a new window to the right and display `buffer` there. (5) Select the target window which displays `buffer`." (let ( (window (cond ((get-buffer-window buffer (selected-frame))) ((window-in-direction 'above)) ((window-in-direction 'right)) ((window-in-direction 'left) (selected-window)) (t (split-window (selected-window) nil 'right))))) (window--display-buffer buffer window 'window alist display-buffer-mark-dedicated) (select-window (get-buffer-window (buffer-name buffer)))))
0.888889
You can remove (5) if you prefer not to select the window after it is displayed .
What's the best way to pause my work in Virtualbox with Ubuntu as a guest?
Host OS: Windows 7 Guest OS: Ubuntu 11.04 Say if I won't need to work on the guest OS for 1 hour, while having a lot of programs running and don't want to close them. What is the best way to pause my work on the guest OS? Ubuntu has suspend and hibernate. I found that hibernate won't work as it always fails to boot up after hibernate. For suspend, should I couple it with Virtualbox pause to release the host OS resources. Would this cause any issue once resume the work? Since I found sometimes the guest OS becomes slower resume from pause VM.
For Virtual Box it is not recommended to use the power saving features of the guest OS as this will all be handled by the host. Therefore first thing when having installed my guest OS I disable this (including disabling the screen saver). The appropriate way to save a virtual machines state (and resume later) is to coose Save the machine state when closing the machine from virtual box manager (here depicted for Windows XP). This will free all ressources from the virtual machine. Next time we start the machine we will resume exactly at the same state where we saved it (like in suspend/hibernate from a real machine). From command line this can also be done by VBoxManage controlvm &lt;name_of_machine&gt; savestate Note on security: Mind that resuming from a saved state does not ask for authentication for the guest OS. In case we work with confidential data we therefore need to log out (or switch user) from the guest OS before saving.
1
How to save a virtual machine state from virtual box manager
get_permalink to attachment not working
I have following code &lt;?php $args = array( 'post_type' =&gt; 'attachment', 'numberposts' =&gt; 12, 'post_status' =&gt; null ); $attachments = get_posts( $args ); if ( $attachments ) { foreach ( $attachments as $attachment ) { echo '&lt;li&gt;&lt;a href="'.get_permalink( $attachment-&gt;ID ).'"&gt;'; echo wp_get_attachment_image( $attachment-&gt;ID, array('100', '100') ); echo '&lt;/a&gt;&lt;/li&gt;'; } } ?&gt; The point of this script is to show last added 12 photos (thumbs of it). And this works perfect. But I want to add second funcionality - link to the page where it comes from (usually native gallery embed into post/page) The problem is that in this case the link is corrupted. It always links to the very first post. What I am doing wrong?
Final version &lt;?php $args = array( 'post_type' =&gt; 'attachment', 'numberposts' =&gt; 12, 'post_status' =&gt; null ); $attachments = get_posts( $args ); if ( $attachments ) { foreach ( $attachments as $attachment ) { $url = get_permalink( $attachment-&gt;ID ); echo '&lt;li&gt;&lt;a href="'.strstr($url, '/attachment', true).'"&gt;'; echo wp_get_attachment_image( $attachment-&gt;ID, array('100', '100') ); echo '&lt;/a&gt;&lt;/li&gt;'; } } ?&gt; where /attachment is everything NOT needed in the URL.
1
&lt;?php $args = array
Add product and coupon to cart together
What I would like to do is add a product and a coupon to the cart at the same time from a product page. The reasoning behind this is we are creating a landing page for a specific coupon and want to add both the product and coupon to the cart with only a single click for the user.
Another approach is to look at the SalguaMagentoAddProduct extension https://github.com/salgua/SalguaMagentoAddProduct it provides the ability to do what you are looking for.
0.833333
SalguaMagentoAddProduct extension
Refresh Downloads list
I have Android 4.4.3 on a Nexus 5. I connected the phone to a laptop, and there I deleted most of the files in the Downloads directory of the phone. Nevertheless, these files still show up on the phone when I open Downloads (of course, when I try to open them, I get an error). Is there a way to refresh the Downloads list?
Long press on one of the entries to bring up the select menu. Click on each one of the files and press the trash icon in the upper right corner. The entries will be removed from the list but the files will remain in the Download folder. Too bad there is no 'select all' button.
1
Long press on one of the entries to bring up the select menu
Piezo as a switch to flash an led when disturbed
An LED embedded in a small translucent item (say half the size of a pack of cards) that would flash on briefly if the object was disturbed or tipped over. I immediately responded that a piezoelectric sensor/generator inside the object wired to an LED would do it. However, when I tried to demonstrate this concept using a piezo buzzer I liberated from an old phone, I could only get the LED to register a dim blip when I smashed the piezo buzzer with a blunt object. How would I ensure that a piezo sensor/generator would actually light up the LED adequately without the application of blunt force trauma. As I mentioned, space would be an issue so no large parts, breadboards, or really complex circuitry. I'm just trying to figure out the easiest and smallest way to accomplish this simple task. Thanks a lot for any help you can give me!
I have done this myself to detect tiny vibrations from anyone touching my bike. It triggers an MCU to text me using a GM862GPS module. The circuit uses a comparator whose inputs are set to be very close to each other. Then the vibration sensor can disturb the input voltages a little, causing the comparator to trigger. The diodes are there just to make sure the vibration sensor doesn't generate too high a voltage. It may be possible to get rid of them, but I haven't actually checked.
0.777778
vibration sensor triggers MCU to text me using a GM862GPS module
How to know if I have RAID configuration on my machine?
I was wondering if there is any Linux command I can use to check whether I have RAID setup on my machine? I know about cat /proc/mdstat but didn't show me anything meaningful. I just want to know if I have got RAID capability, either software or hardware.
If /proc/mdstat exists you have the capability to set up software raid - although if it does not have anything meaningful it means you have not set it up. Software RAID under Linux does not require any particular hardware [ you could argue the ability to support 2 drives, but even thats debatable if you consider USB]
0.888889
Software RAID under Linux does not require any particular hardware
How to work with large projects
I am working on a project and i want to slim it down a litle so please help me with the following. I have a document structure like this: /DocumentRoot |-main.tex |-title.tex | |-/chapter-1 | |-/images | |-chapter-1.tex | |-/chapter-2 |-/images |-chapter-2.tex My document is like this: \begin{document} \include{./title} \include{./chapter-1/chapter-1} \include{./chapter-2/chapter-2} \include{./chapter-3/chapter-3} \end{document} in my chapters i use both some images and some heavy tikz plots so i use externalize and draft options for quicker compilation. But i want the images to be placed in the respective chapter folders but for example in chapter 3 this works: \includegraphics[width=\linewidth]{./chapter-3/images/img.jpg} and this doesn't \includegraphics[width=\linewidth]{./images/img.jpg} for some reason xelatex has problems with the relative paths of included chapters. I also want to control the location output and the naming of the externalized tikz documents. Any help with that? I am working with miktex and texworks.
The idea is simple, just prepare directory paths (to import both chapter files and images files) whenever you include a new chapter. Main.tex \documentclass{book} \usepackage{graphicx} \def\Include#1{% \def\ChapterPath{#1/}% \def\GraphicsPath{\ChapterPath Images/}% \include{\ChapterPath#1}} \newcommand\IncludeGraphics[2][width=\linewidth]{% \includegraphics[#1]{\GraphicsPath #2}} \begin{document} \Include{Chapter-1} \end{document} Chapter-1.tex \chapter{Chapter One} \IncludeGraphics[width=0.5\linewidth]{Tulips} Remarks: Folder Chapter-1 is in Docoment-Root folder. Chapter-1.tex is in folder Chapter-1. Tulips.jpg is in folder Chapter-1/Images. Tips If your TikZ code is not "linked" to the text with nodes, for example, then put such TikZ code into a separate, compilable input file. Use article document class plus preview to get a tight PDF output. You can also use standalone document class instead. If you table is not long enough to span across multiple pages, then put it into a separate, compilable input file to get a tight PDF output. It is better not to specify the image extension explicitly when invoking \includegraphics. Define macros for often-used materials and put them into a package such that you can change their definition later in one place and the changes effect the whole document.
1
How to import chapter files and images files?
Can I use an SVM for labeling data as more than one class
I'm trying to classify e-mails using Mallet. If the classifier is too unsure about a new e-mail I would like a user to do the classification instead. I figured I could use the Mallet Labeling output for this: Labeling labeling = classifier.classify(instance).getLabeling(); My problem is that when I use an SVM my labels are all of certainty 1 or 0. CLASS1: 1,0 CLASS2: 0,0 CLASS3: 0,0 CLASS4: 0,0 CLASS5: 0,0 I would like the output to be more like this: CLASS1: 0,9945 CLASS2: 0,0047 CLASS3: 0,0005 CLASS4: 0,0001 CLASS5: 0,0001 The second output was generated using the Maximum Entropy classifier. My question is: Can an SVM give me estimates between 1 and 0? Is this behavior typical of an SVM or is it just the implementation I'm using. Follow up question: Is the Maximum Entropy classifier generally just as good as an SVM when it comes to text?
SVM are not designed to estimate probability of a class. Nevertheless, there is a way to estimate such probabilities, using Platt scaling. There is SVM-like probabilistic method, namely, Relevance Vector Machines. Unfortunately, they're patented by Microsoft, though, apparently, free to use in academia. Finally, if you want to find these xs where SVM is unsure about correct labeling, you can do it even without probability. The decision rule of SVM is $$ class(x) = \begin{cases} 1, &amp; \mathbf w^T x + b &gt; 0 \\ 0, &amp; \mathbf w^T x + b &lt; 0 \end{cases} $$ Where $\mathbf w^T x + b$ is SVM's decision function, effectively, a signed distance to the separating hyperplane. If this distance (modulo of it) is too small — SVM is less sure about $x$. You can come up with some kind of threshold on decision functions to find vectors of interest. About MaxEnt vs. (linear) SVM: It's mostly opinion-based, but their loss functions are quite similar SVM's loss is called "Hinge loss", MaxEnt's — "Logistic". Asymptotically (as signed distance goes to $\pm \infty$) they're the same (modulo scaling constant because of arbitrary log base in Logistic loss), so if you data is well-separable, both should perform fine. Both methods will find a separating hyperplane, though, SVM's one will have a bigger margin (because it's a max-margin classifier). When data is not linear separable, SVM will try to push as many points behind the boundary of distance = $\pm$ 1, thus having 0 loss on them, while logistic loss may tolerate some errors to become even more confident in already correctly labeled samples. This is my opinion, it is not necessarily true :-)
0.888889
SVM are designed to estimate probability of a class using Platt scaling
Was Miss Marples lover, Captain Ainsworth, married?
From the "Agatha Christie's Marple" TV series, I gather that Miss Marple was involved with a Captain Ainsworth. Are there any references to this also in the books? And it is suggested in "Murder at the Vicarage" that Captain Ainsworth was married. Is that correct? Are there other sources for this?
No, Captain Ainsworth only appears in the 2004 ITV series and is not a character who appears in the original books. And it is indeed implied that he was married when Miss Marple had the affair with him which explains why they never married.
1
Captain Ainsworth was married when Miss Marple had the affair with him
Apartment in Munich
I'm a married man looking for an apartment to live with my wife from February 2014 until April 2014. How can I find an apartment for this time period?
I would also recommend HouseTrip.com. We used it to find apartments in Budapest, Prague and Vienna and had a great experience overall! I was impressed by how flexible the search feature was (i.e., we were able to search for centrally located apartments that can sleep 6 people and that include WiFi and laundry).
1
HouseTrip.com was able to search for apartments in Budapest, Prague and Vienna
How to select multiple non-sequential lines in Vim
Is there any way to select multiple lines in Vim? For example I want to select line number 1,4,7,8 etc? I know that I can use V or v to select lines but they select the continuous lines. For example when I want to add comments # or // etc in different lines. I remember that Sublime-text 2 can do it, so I am wondering if Vim can do it too. Thanks in advance.
The multiselect - Create multiple selections and operate on them plugin allows just that. It's great for those cases where a selection via :global would be impossible or too cumbersome.
0.333333
Multiselect - Create multiple selections and operate on them
Why did Benjen Stark take the Black?
OK, I've waited until I finished ADWD in case there was any explanation there. Why was Benjen Stark on the Wall? Was there an explanation I have missed? I appreciate, as a younger brother, he would have had less opportunity than Brandon (or Eddard), and may have been looking for adventure or honour, but the Wall, by the time he would have joined, was hardly at the height of its renown. Joining the Black wouldn't be, I would have thought, a particularly obvious option for Benjen, if he was simply looking for a title or a role in life to fit the name of Stark.
The recount of the tournament at Harrenhaal tells us that one of the Starks fell for Ashara Dayne and got her pregnant. It is widely believed that this was Eddard - but the only reason for this seems to be the Eddard/Ashara connection and the rumours of her being John Snow's mother. Such a thing would have been extremely out-of-character for Eddard and Brandon also seems unlikely as, at that point, he was both betrothed to Catelyn and in a tryst with the future Lady Dustin (though this does not rule him out altogether). However, if we consider the only other character who knew the situation well - Barristan Selmy, who was in love with Ashara - he dismisses the notion of Ashara being John Snow's mother; saying her child was a stillborn girl - the grief over which drove Ashara to suicide. He also (as Meera did) avoids naming the father - referring to him simply as "Stark". If it was not Eddard but Benjen who impregnated Ashara at Harrenhaal, this would provide a far greater reason for him to take the black - his daughter died at birth and the woman he loved killed herself with the grief of it. Furthermore, if other theories (already noted in previous comments above) about John Snow's parentage are correct - and if Eddard knew of Benjen and Ashara's child - then this theory also explains why Eddard went to Starfall under the pretence of returning Arthur Dayne's sword (surely, given the circumstances, that could have waited a few weeks?) - he knew a Stark bastard was due to be born there and perhaps hoped to pass the infant Jon off as a twin or even replace Ashara's child with Jon.
1
Eddard/Ashara connection and rumours of being John Snow's mother .
No sound in Ubuntu except at log in
I installed Ubuntu 12.04 a month ago and am using it till now. I failed to notice that all this time there was no sound at all while running Ubuntu, even while playing a game in Wine. The weird thing is that only the startup sound comes when I log in (Indian/African drum tone), then comes the utter silence. I tested both Digital Output (S/PDIF) and the speakers in the sound settings but can hear nothing. Any help?
You do not need to install a new kernel. You can install only another version of ALSA. You can try this https://code.launchpad.net/~ubuntu-audio-dev/+archive/alsa-daily/+packages daily build repositary of ALSA.
1
Install a new kernel
How to create a local webapp userscript
I'd like to write my own local webapps userscripts, but I don't want to compile and install the main webapps source code every time. I would like to keep the original Ubuntu Webapps package installed, but use my local userscripts as well. Is this possible?
I found an easy and secure way to create custom web apps: using Firefox and the Greasemonkey extension. In Greasemonkey, it's enough to create a user script like this (I've created for Asana): // ==UserScript== // @name Asana // @namespace app.asana.com // @include https://app.asana.com/* // @grant none // @version 1 // ==/UserScript== window.Unity = external.getUnityObject(1); Unity.init({ name: 'Asana', domain: 'app.asana.com', homepage: 'https://app.asana.com/', iconUrl: 'http://asana.com/assets/FluidIcon.png' }); This script simply enable the Unity integration, but you can add other features writing more code.
0.888889
How to create custom web apps?
Is there a good field methods book that covers terrestrial ecology?
In the past I have used Limnological Analysis by Wetzel and Likens and Methods in Stream Ecology edited by Hauer and Lamberti to develop labs and research methods for courses and projects with an aquatic focus. These books detail the standard methods of lotic and lentic ecology with some emphasis on utilizing the methods in undergraduate or graduate level courses. I am now developing a biogeochemistry course that is not limited to aquatic systems and I am looking for a summary of field methods for terrestrial systems. Is there a book that summarizes terrestrial field ecology methods similar to Wetzel and Likens and Hauer and Lamberti?
Take a look at Field and Laboratory Methods for General Ecology by James E. Brower, Jerrold H. Zar, and Carl N. von Ende. If you are only interested in plant sampling techniques, an great resource published by U.S. Bureau of Land Management is Measuring &amp; Monitoring Plant Populations by Caryl L. Elzinga, Daniel W. Salzer, and John W. Willoughby. Another great resource that covers wildlife research and management techniques (2 volume set) is The Wildlife Techniques Manual published by The Wildlife Society and edited by Nova J. Silvy.
1
The Wildlife Techniques Manual (PDF)
Random Forest to estimate land use in past with Landsat
I am new in Machine Learning and in R. I am working in my Master thesis. I am trying to estimate the LULC of the years 1984, 1990, 2000, 2011, 2014 for characterizing the forest dynamics. I have for each year the bands corresponding to Landsat imageries. The images were corrected and I have calculated vegetation index (NDVI, EVI, SR) and Tasseled Cap Components(Brightness, Greenness, Wetness). All this was performed using i.landsat.toar, i.vi and i.tasscap commands in Grass 7, respectivelly. I have as reference the year 2009 since there is a orthophoto and LiDAR data. Using the orthophoto I digitized training polygons for 5 classes (1. Crops, artificial, bareland; 2. pinus forest; 3. Mixed forest; 4. Quercus and 5. Shrubs). I fitted a model using Random forest and my intention is to classify the other year datasets wich have 5 reflective bands, 3 vegetation indexes and 3 tasseled Cap Components as predictor variables. The performance of the model is quite good, OOB 10.45% but within classes the Mixed forest achieved about 30 % of error. Thus, when I use the model to classify the other years the misclassification is very high. Am I doing anything worng? Is the Random forest useful for this purpose? Is there any software, method or algorithm that i could use to estimate the landuse?
I would look at the support of you individual classes. If support for a given class is marginal in your fit model, the error may propagate in very undesirable ways. I would also consider fitting a series of binary models and predicting probabilities of each class separately. You could then perform a sensitivity test on the probabilities and evaluate if there is multiple pixel membership (eg., pine forest transitioning into mixed). You may be having issues with trying to validate a hard-boundary classification where fuzziness exists in the class margins. A probabilistic approach may allow you to evaluate the changes in the ecological gradients.
0.888889
If support for a given class is marginal, the error may propagate in very undesirable ways .
local AJAX-call to remote site works in Safari but not in other browsers
I am maintaining a website that uses Javascript. The script uses jQuery and loads some content from the server at which the site is normally hosted. Just for convenience while maintaining the site, I run a local copy of the site on my iMac. This works perfectly fine when I use Safari. But Firefox, Opera and Chrome refuse to work. I guess it is because of cross-domain-policy. (I couldn't test this with IE, because IE has to run in a virtual machine on my iMac, so for this reason it is not possible to access any local files) Is there a setting within Firefox and the other browsers where I can tell the browser that it is ok to ajax-load files that are located on a remote server from a local html-page with a local javascript? In a nutshell: This my html-page: &lt;!DOCTYPE html&gt; &lt;html&gt; &lt;head&gt; &lt;meta charset="UTF-8"&gt; &lt;title&gt;some title&lt;/title&gt; &lt;link rel="stylesheet" type="text/css" href="../css/stylesheet.css"&gt; &lt;script src="../js/jquery-2.1.3.min.js"&gt;&lt;/script&gt; &lt;script src="../js/myScript.js"&gt;&lt;/script&gt; &lt;/head&gt; &lt;body&gt; &lt;!-- some content with a div-container to receive the ajax-content --&gt; &lt;/body&gt; &lt;/html&gt; This is myScript.js: var errorMsg = function (msg) { //insert the message into the html-page }; var JSONerror = function (jqXHR, textStatus, errorThrown ) { var msg = 'JSON-answer: '+jqXHR.responseText; msg += '&lt;br&gt;'+'JSON-Errorstatus: '+textStatus; if ($.type(errorThrown) === 'string') { msg += '&lt;br&gt;'+'Error: '+errorThrown; } errorMsg(msg); }; var JSONreceive = function (JSONobj, StatusString, jqXHR) { //insert the data in JSONobj into the html-page } var StartAJAX = function () { $.ajax({ url: 'http://my.domain.tld/cgi-bin/myPerlScript.pl', data: "lastID=" + lastID + '&amp;qkz=' + Math.random(), dataType: "json", success: JSONreceive, error: JSONerror }); }; There is also an event-listener, that listens for page-scroll and resize and checks some other constraints (like: is there already an ajax-call in progress?). This listener calls StartAJAX. When it calls StartAJAX on a local copy of my page (file:///User/...) within Safari, I get the Ajax-content perfectly fine inserted into my html-document. within the other browsers i get the error-message inserted into the html-page. It is: JSON-Answer: undefined JSON-Errorstatus: error Error: Why does it work in Safari but not in Firefox, Chrome and Opera? How can I make those browsers work? (I need to test it with all browsers, because all browsers render the same html-domument differently, but I don't want to upload all files to the server after every change just to test it.) EDIT: After reading some answers, I want to make something clear, that I obviously did not make clear enough: I am searching for settings in Webbrowsers I will NOT change the settings of my remote webserver (Apache) I will NOT manipulate any files on my remote machine (.htaccess) I will NOT set up a webserver on my local iMac I will NOT change the code of the AJAX-calls in my Javascript-files I will NOT change the code of the Perl-Scripts on my remote Server I can tell you why: I am just doing a short maintainance, and i am too lazy to upload every manipulated file to the remote machine after I edited it. The settings of the webserver are fine for actual operation. I don't want to change them (and maybe forget the changes before finishing my work). Same for the scripts: Those parts that some of you want to change work fine as they are now. There is no reason to touch the Ajax-Calls, because there is nothing wrong with them in the productive environment. All I want is that those stupid browsers Firefox, Opera and Chrome behave like Safari and process the Ajax-calls correctly. BTW: Please can anyone explain what is so risky to call data via Ajax from an other domain in Firefox, Opera or Chrome while it seems to be harmless doing the same thing in Safari?
CHROME There is a plugin for chrome that will force it to ignore the security policy. You can also do this with flags. Note, please do not browse the "real web" with this enabled as it is a security risk for your computer. FIREFOX This thread indicates that there is presently no way to do this in firefox. OPERA Again, there does not appear to be a built in way to ignore CORS policies. The alternative would be to have the server (http://my.domain.tld) in your case return the proper headers - specifically Access-Control-Allow-Origin:
0.777778
a plugin for chrome to force it to ignore the security policy
Is it better to put "Preview" on an iFrame with a specific height or just show it in full?
We have a page that shows a preview of another page (newsletter) on an iFrame. Now we have two ways of displaying this: Give the iFrame a specific height so that the user can scroll up / down within the iFrame to see the embedded page fully. Dynamically resize the iFrame to the height of the embedded page so that it actually gets displayed in full (without the iFrame scrollbars). Is #1 better so that the users can access the buttons at the bottom easily (button is "Next") without scrolling 'till the end of the embedded page? (Although the disadvantage is that iFrame scrollbars are ugly.) OR Is #2 better so that the users actually feel like they're just seeing 1 whole page (and no scrollbars)? (Although the disadvantage of this would be the page could be very long depending on newsletter's height. But one can argue that newsletters are seldom very long and that users do scroll down.)?
I have worked on several preview features. I first opted for an overlay with an iframe. This provided the advantage of making a quick glance at the information being presented without having to change page. However, when we then tried it with the preview loading as a new page in the current tab (not opening a new window and removing the iframe altogether) this allowed for us to also use the same page template we had created for viewing the posted item and provided a better experience to the user. Once the preview was accepted we directed the user back to their home page. Or if it was rejected they could go back to edit it. The response we had from users was much better with this approach as it meant they could look at the content on different devices more easily, could scroll just with the page scroll bar and meant that the build was actually quicker as we were using similar templates. I would encourage this approach over the use of iframes but speak with your users and see what they think.
1
Using iframes and overlays
Do 802.11b devices slow down other, newer networks on or near the same channel?
I believe it is well-known and accepted that 802.11b devices connected to networks using newer protocols will slow down the newer devices on that network. The workaround, of course, is to disable 802.11b support so nobody with an 802.11b device will connect. However, what's less clear is whether 802.11b devices on neighboring networks can cause similar performance issues. Scenario: An 802.11n network is on 2.4 GHz channel 6. An 802.11b device is connected to a neighboring network that's operating on a channel between 2-10. Questions: Will the 802.11b device cause the 802.11n network to slow down, any more than it might if it were an 802.11g/n device? If "yes" to #1, does it matter if the 802.11b device is on the same channel (6), or just on a close neighbor (2-5 or 7-10)? If "yes" to #1, does configuring the 802.11n network for n-only operation solve this issue, or does it only work when the legacy devices are trying to connect to the 802.11n network?
First, let me say for the sake of others reading this that the presence of older-standard 802.11 gear never causes a newer-standard 802.11 network to fall all the way back to the older-standard rates. That's an old myth that has never been true. There are two main ways that the presence of older-standard 802.11 gear slows down newer-standard networks: Because the older gear can only use slower signaling rates, it takes a lot longer (a lot more airtime) for the older gear to send or receive a given packet than it would take modern gear. Imagine being in a panel discussion with one guy who TalksReallyFast and another guy who S - p - e - a - k - s - R - e - a - l - l - y - S - l - o - w - l - y. Every time it's the slow-talker's turn to answer a question, he wastes a lot of the panel's allotted time with his slow talking. The fast talkers don't get as much time as they would have had without slow talker present, so the overall amount of words said during the panel discussion is a lot fewer. Because older gear doesn't know the more modern modulation schemes, it can't detect the transmissions of the more modern equipment very well. So the modern gear has to enter "protection" mode that helps the slower gear know when the modern gear is going to be transmitting. Those legacy-protection modes slow things down some, but not drastically. Some people make the rookie mistake of thinking they can solve #1 by refusing to let older gear on their networks, and they think that means they can solve #2 but disabling the legacy protection modes. But what they don't realize is that legacy devices on another network on the same channel or an overlapping channel will still cause both the #1 and #2 problems, and the the only thing worse than having to use legacy-protection mode is when you need it but don't use it. That allows the legacy devices to step on the modern devices transmissions all the time, which can crater performance. So, to answer your questions: Yes, the presence of an 802.11b device on an overlapping channel can cause the other network to slow down some. It's hard to predict exactly how much. In general, having if your neighboring 802.11 network can't be on a completely non-overlapping channel, it's best to have it on the exact same channel as you, not a partially-overlapping one. When 802.11 devices are on the exact same channel, they do the best job of yielding to each other nicely. When they're on partially-overlapping channels, they have a harder time seeing each others transmissions reliably, and are more likely to stomp on each others transmissions (by that I mean transmit at the same time; collide). Nope, configuring for N-only doesn't solve anything in this scenario.
1
The presence of older-standard 802.11 gear slows down newer-standard networks
What is the feminine equivalent of "guy"?
Is there a word that is the feminine equivalent of guy? I thought of gal, but I think it is used for a girl, or a young woman. I am looking for a word that can be used to generally mean woman, and similar to guy.
According to the writers of this musical, it’s gal. In more recent times, however, guy seems to have become unisex.
1
In more recent times, guy seems to have become unisex
Is there something like Things for Windows?
Things is really nice GTD (Getting Things Done) app only for Mac. Is there something like Things for Windows? The closest one I've found is Doit.im. But I've heard that it is unstable and its website seems outdated.
Try Nirvana. It's web-based, rather than desktop-based like Things, but is very similar in UI, and, since it's online, can be accessed from anywhere. As someone who simultaneously uses PCs and Macs, I long since ditched Things for Nirvana.
1
Nirvana is web-based rather than desktop-based
What's the difference in ships in Wipeout HD?
By default, you have two ships available for every team. One seems to 'outperform' the other on the stats screen. Why would you ever choose the one with lower stats? When unlocking my first ship, I noticed it isn't any better stats-wise. Do you simply unlock new skins?
Each of the ships in Wipeout HD is balanced differently. There are some that are clearly inferior (ie, the overall total of their stats is lower than other ships) but they balance that by having best-in-class performance in a certain area. Depending on the track, they might outperform a ship with overall better stats, simply because they focus on an area important to the track. Your play style (and strengths/weaknesses) factor into this as well. If you're good in a straight shot, but terrible in turns, you may want to pick a ship with better handling, for instance. This guide lists all of the ships and their respective stats (including the unlockable ships) so that you can determine which one you like best. The Fury expansion pack unlocked a new set of ships with better stats - these ships are categorically better than their 'standard' variants. There's no reason to use the 'standard' ships if you have the Fury expansion. Skins are unlocked for completing certain challenges, and they factor into achievements, but there's not much else that they do besides that and showing off your Wipeout HD skills to other players online..
1
The Fury expansion pack unlocked a new set of ships with better stats
How can I make my iPad apps retina in Xcode 5 iOS7
Not long ago I started learning Objective-C with an interest of developing apps. I have just started my first app and I have no clue how to make my app retina. I made the design in photoshop and exported it as a png @ 2,048 x 1,536 but however the size of my storyboard is only 1,024 x 768. I have read somewhere on the internet that you need two story boards but I am not sure how to link everything together. I would really appreciate it if someone could help me.
What is Retina Display @1X is a resolution (or rather, a process) in which many designers still design apps. Why? Because (and as many would have to agree) designing at such is much more tangible. I find it hard to explain why it’s so, but all I can say is that the content feels much more 1 on 1, it feels right so to speak, and the design is much more flexible to deal with, because of our “low” resolution computer displays that we’re designing them on. Though that doesn’t mean we all like designing @1X. I’ve seen many others who build wonderful, beautiful apps designing at both processes (the other would have to be @2X — resolution of that of the Retina Display) and some say it feels much more comfortable for them having to have their content match perfectly without having to scale things up and tweak things around on the display. More Dtails 2x-the-retina-dilemma How identify the retina display #define IS_RETINA_DISPLAY ([[UIScreen mainScreen] respondsToSelector:@selector(displayLinkWithTarget:selector:)] &amp;&amp; ([UIScreen mainScreen].scale == 2.0)) if(IS_RETINA_DISPLAY) { // RETINA_DISPLAY }else{ // NON_RETINA_DISPLAY } Now, that the iPad has been released, I’m sure you are all scrambling for ideas on how to snag a piece of the market in the imminent gold rush. some of below links is going to help you on your journey with a series of iPad tutorials to come. ipad-programming-tutorial-hello-world How-To-Develop-iPad-Apps
0.777778
How to snag a piece of the market in the imminent gold rush
Complete induction
I am very confused with complete induction. Because in every task there is something different to do, and I never know what to insert (thats my biggest problem). Here's the example: Proof with complete induction. Please please help me, because I have exams coming up (I am just becoming a primary school teacher..) For $n\in\mathbb{N}$: $$\sum^n_{i=1}\frac{1}{(2i-1)(2i+1)}=\frac{n}{2n+1}$$
For a full solution, proceed like this: $n=1$: $$\sum_{i=1}^1 \frac{1}{(2i-1)(2i+1)} = \frac{1}{(2-1)(2+1)} = \frac{1}{3} = \frac{1}{2 \cdot 1 +1},$$ so it holds for $n=1$. Assume next that it holds for some generic $n$. You need to show that then it also holds for $n+1$. As it holds for $n$, you can assume that $$\sum_{i=1}^n \frac{1}{(2i-1)(2i+1)} = \frac{n}{2n+1}. \quad (1),$$ and want to show that $$\sum_{i=1}^{n+1} \frac{1}{(2i-1)(2i+1)} = \frac{n+1}{2(n+1)+1}. \quad (2)$$ Then: $$\begin{align} \sum_{i=1}^{n+1} \frac{1}{(2i-1)(2i+1} &amp;= \sum_{i=1}^n \frac{1}{(2i-1)(2i+1)} + \frac{1}{(2(n+1)-1)(2(n+1)+1)} \\ &amp; = \frac{n}{2n+1} + \frac{1}{(2n+1)(2n+3)} \quad \text{using (1)} \\ &amp; = \frac{n(2n+3)}{(2n+1)(2n+3)} + \frac{1}{(2n+1)(2n+3)} \\ &amp; = \frac{2n^2 +3n +1}{(2n+1)(2n+3)} \\ &amp; = \frac{(n+1)(2n+1)}{(2n+1)(2n+3)} = \frac{n+1}{2(n+1)+1},\\ \end{align}$$ which is (2), and was to be shown.
0.666667
Assume next that it holds for some generic $n$
Is OTP useful in modern electronic communication?
I have seen from time to time questions about various OTP schemes and "OTP" (i.e. stream cipher) schemes. The most common OTP troubles appear to be: How to extend size of previously generated key or how to generate key. How to get key material securely to the recipient. In electronic communication or storage encryption OTP appears scheme that is impossible to make work and if it works benefits are not clear. Requirement that the key needs to be the same size than input seems to be unbearable for many of modern use cases for encryption. Is there any practice where OTP is useful in modern cryptography except: As a component used on some proofs. As a example ideal of encryption algorithm. I.e.: Is it possible to base on OTP and provide the "information theoretic" strength to hashing (apparently not), authentication, etc.
Surprisingly yes. One-time-pads are used in many "quantum encryption schemes." Typically these schemes are actually standard one-time-pad encryption with the key being distributed using Quantum Key Distribution(QKD). They are, theoretically unbreakable since there is no way to intercept the key thanks to quantum physics(in practice, there are some problems). In theory, this is useful for highly sensitive messages that need to remain secure for ever no matter what breaks in known cryptographic primitives happen or what advances in computational power (particularly quantum computing) occur. There are commercial QKD schemes, though I do not know how much they are actually used.
1
Quantum Key Distribution (QKD)
Installing Windows 10 in VirtualBox and in MBM
I want to be able to test out Windows 10 in VirtualBox so that I don't have to reboot to switch to my main computer, however, it would be nice if I could also, when booting, boot directly into Windows 10 without the need for VirtualBox. So basically, I want to be able to have Windows 10 on a partition, which can be booted directly or booted in VirtualBox. Is there a way to go about this? If so, does anyone know the steps required to achieve this and if there are there likely to be any problems? Any help would be appreciated.
Technically possible: Yes In practice: No. When you boot virtual box you will have different hardware than when you boot from the bare metal. This will confuse windows, which tend to store its hardware configuration so it can boot faster. (Explicitly mentioning windows since other operating systems like FreeBSD or Linux do not do this and it would work for them. The price for that is a slower boot time) You might get around that by assigning a real partition to contain the disk information in virtual box and always running sysprep before switching to new hardware. However this is extremely bothersome and basically comes down to repeating part of the windows installation whenever you switch between virtualized hardware and the bare metal. A second way around that it by using VT-D and assigning real hardware to the OS in the VM. That requires a CPU with VT-D (or its AMD equivalent) and extra hardware. (e.g. one graphics card to boot your old OS, one to show in both real win10 and in the virtual box. That might be done as a theoretical exercise, but doing this for real means you basically have the hardware for two PCs.
1
Windows boot from bare metal
How to upgrade to Android 2.2 [Samsung GT i5800]?
I have a Samsung GT i5800 with original Android firmware and an offical Windows 7 PRO/64bit machine and a Samsung USB cable that I got with the phone. How can I update it offically to a fresher version of Android? [I read that Android 2.2 was alread out for this phone at Jan-Apr this year..so I thought it would be a very wise thing to upgrade it! OK.] Because it looks like Kies can't upgrade the phone....this is "funny"... Here is what I have on the phone: http://i.imgur.com/Zho9Q.jpg - Android 2.1update1 Here is the Kies version on the machine: http://i.imgur.com/I6R4q.jpg - 2.0.3.11082_152 up-to-date Here is the message from Kies that it cannot update the phone: http://i.imgur.com/VeGUE.jpg sorry, it's in hungarian.. :( p.s.: I tried to: reboot the win7 machine, Kies has a troubleshooting part, I tried it. What else are there?
You could uninstall Kies and the drivers completely, and then install the UK version of Kies from here. (Make sure to select the UK as your location during install). This should allow you to perform the update, although it might not give you the language you want. This worked for me to get Froyo on my Vibrant before it was released in the US. Alternatively you could try another European country that has had an official update released. You could also try flashing the latest European firmware via Odin. XDA has a guide on this (see the UPGRADING section). This is risky if you don't follow the instructions closely and will void your warranty just like rooting, but I've used Odin dozens of times on my Vibrant with no issues.
0.888889
Install the UK version of Kies from here
Can a card be un-cast, if the player realises it was a bad decision?
Let's say a player casts a spell, completely allows it to resolve, and accepts its consequences - then realises that was a bad idea, or there was something better to do. That player realises there was a better card to play, or that the spell will do something they don't want to happen, such as deal enough damage to that player to kill them. Does the caster have the opportunity to go back and fix that mistake (and to stay alive), even though they already accepted the consequences?
It would entirely depend on the type of game you're playing. If you're playing in any sort of tournament or other "serious" venue, you're SOL. In a casual setting, it would depend on your opponent, I suppose. If they agree to rewind, then you're good. But to put a proper answer in, strict RAW says that once you've done it, you've done it.
1
If you're playing in a "serious" tournament, it would depend on your opponent, I suppose.
Forefront (Identity Manager/Sync Service) missing from Service Manager
I am building a new testing environment, and in the process I have noticed that the Forefront services are missing from the Service Manager. Is there a way to add these services? This is the first time I have seen these missing. I am a local admin on the server. We are running Server 2008 R2 Enterprise with SP1
I've seen this before. Running a Install-SPService fixed it for me - http://sharepoint.nauplius.net/2011/06/missing-user-profile-synchronization.html.
1
Running a Install-SPService fixed it for me
Why choose an 80-200mm over an 18-200mm lens?
Being a beginner, I can't see why I must choose an 80-200 over an 18-200. Are there scenarios where an 80-200 would be preferable over an 18-200? I will be buying a D7000 soon and am looking at these: AF Zoom-NIKKOR 80-200mm f/2.8D ED AF-S DX NIKKOR 18-200mm f/3.5-5.6G ED VR II but similar considerations would apply to other brands as well.
Optically a lot superior. Constant 2.8 aperture up-to 200mm focal length. Sharp as a razor across the zoom range. Superior bokeh. Better build quality. Faster AF (assuming you buy the AF-S version). Performs much better on Full Frame.
1
Sharp as a razor across the zoom range
Orthogonal complement $V^\bot$ of the vector space $V=\langle(1,0,2),(3,-1,0)\rangle$ and $V\cap V^\bot$
Consider the inner product defined by polarizing the quadratic form $$q(x,y,z)=x^2-z^2+4xy-2yz$$ on $\mathbb{R}^3$. Let $V=\langle(1,0,2),(3,-1,0)\rangle$. Could you show me how to find $V^\bot$ and $V\cap V^\bot$? I get $V^\bot=\langle(2,6,1)\rangle$, which doesn't feel right, and don't know how to calculate the intersection. Also, in general, what can we say about the dimension of $W^\bot$ if we know the dimension of $W$?
you want to find $(x, y, z)$ so that it is orthogonal to $(1,0, 2)$ and $(3, -1, 0)$ that means $x + 2z = 0, 3x - y = 0$ if the basis of is more complex you will make a matrix made of these vectors as rows and row reduce them to solve for $x,y,z.$ in this example it is easier and we can set $z = -1$ and solve for $x = 2, y = 6$ so that $V^\perp$ is spanned by $(2, 6, -1).$ the dimension of $W$ and $W^\perp$ should add up to the dimension of the space these are subspaces of. edit: $\pmatrix{1&amp;0&amp;2&amp;|&amp;a\\3&amp;-1&amp;0&amp;|&amp;b} \rightarrow \pmatrix{1 &amp; 0 &amp; 2&amp;|&amp;a\\0&amp;-1&amp;-6&amp;|&amp;-3a + b}$ here $z$ is free variable and set it to $z = -1$. back substitution gives you $y = 6, x = 2$ if you had more than one free variable, you will set one of them to $1$ and the all rest to zero, then cycle through all of the free variables to get that many solutions in $W^\perp$
0.777778
How to solve for $x,y,z?
Sharepoint 2010. Add custom background and frame for content editor webpart
I need to create custom webpart with complex (few divs, or other html elements) background and borders. How can i use default sharepoint content editor and just add predefined background and frame!? Thanks.
You tagged your question with Sharepoint 2007 and 2010, the content editors are different though. This answer is for SP2010: You can just add CSS to a custom CSS file. background-image for .ms-rte-layoutzone-inner-editable will do the image trick. If you want to add a "frame" as in border, you can add border attributes to .ms-rte-layoutzone-outer and make it e.g. red. An example for a background image: .ms-rte-layoutzone-inner-editable { border-image: url(/PublishingImages/Mylogo.gif); } But please do your users a favor and don't include anything blinking or distracting to the content editor's background - if you wanna go for some very light grey or something like that it's OK. For MOSS2007 you need to check the specific styles you can override.
1
CSS to a custom CSS file
Usage of "might" and "would" to indicate doubt
Do the sentences She might be only 28, but Jodie Whittaker.... and My parents would have walked along the Barrow wrongly suggest doubt, or are they normal usage? Are there names for these constructions? Taken from Irish Times . I googled "would have spent their time". Many cases were counterfactuals ("... otherwise they would have spent their time...”) But plenty simply describe past events, as the in the usage sited above. I couldn't detect a regional bias. As an Irish-English speaker this usage is unremarkable for example I might say This is the exact spot where Caesar would have crossed the Rubicon I think the intention is to evoke the event rather than just record it.
Might implies possibility. She might be 28, but she very well could be older. Would implies intent. My parents would have walked along the Barrow had they lived by it. I don't think either of your statements imply doubt of any kind.
1
Would implies possibility.
How do I restore my wolf's health in minecraft?
I have a few pet wolves' in creative mode on minecraft (Pc) and one of them is on very low health (Its tail is sagging). Is there any way I can heal him?
You have 2 options. They are: Feed it some food. (Must be meat. Fish and plants will not work. Rotting flesh works.) Throw a splash potion of healing. Usually people go for number 1 because they have excess rotting flesh, which the wolf eats. Whether the food is raw or cooked does not matter. The wolf will not get hunger or poisoning no matter what.
1
The wolf eats excess rotting flesh.
How to remove "Have no fear, help is near!" from 404 error page?
I am newbie in Magento development. I want to remove "Have no fear, help is near! There are many ways you can get back on track with Magento Demo Store." from 404 error page in my site. How can I remove the line from the site and adding custom content to that page ?
The 404 page is a simple CMS page. Go to CMS-&gt;Pages in your admin panel, look for the 404 page and edit it. The default 404 page title is 404 Not Found.
1
The 404 page is a CMS page
Can I make a graph of savings in Quicken?
I've used the "Reports and Graphs" section of Quicken in a very basic capacity to see where my money has been going -- "Income / Expenses" and "Spending by Category" mostly -- and I've been trying to branch out and try the other reports/graphs to get a better idea of my finances. Here's what I'd like to do: See a simple graph that shows how much of my money went to Savings each month. The closest I've found is the "Net Worth" chart, where the amount it goes up (or down) is the amount I've saved (or overspent). I'd like one that shows (Total Income - Total Expenses) over time. I've also tried the "Income/Expense" Graph, but that shows separate bars for income and expense, and I want to show a single bar (or a line graph would be nice too).
I found a way to do this, but it's slightly backwards. Quicken does not allow you to make a graph of just your income, probably because that would be a fairly boring graph for most people. But it does allow you to do a graph of your expenses. Doing so, while including income categories, will produce the graph I want, but with negative numbers (savings is negative spending). Go to Reports -> Reports and Graph Center in the main menu. In the Quicken Standard Reports section, go to Spending by Category Click the Customize button. On the Customize Spending by Category window, on the Categories tab, add all Income and Expense categories (but no Bank categories). Click Show Graph. Set the Column to Month. This will switch it from a pie chart to a bar graph This will show a bar graph of overall spending, counting income as Negative Spending. So, having negative bars is good in this case.
1
Quicken does not allow you to make a graph of just your income, but with negative numbers