summary
stringlengths
15
147
text
stringlengths
1
19.3k
answer
stringlengths
32
22.6k
labels
float64
0.33
1
answer_summary
stringlengths
5
164
WinJs: How to navigate to another start page programatically?
Let's say I want to display a login screen before going into the app's main screen This does not work and I don't understand why: default.js var p = WinJS.UI.processAll().then(function () { WinJS.Navigation.navigate('/pages/login.html'); });
WinJS.Navigation.navigate is merely a mechanism to raise navigation events. Some other piece of code has to handle those events to do the actual page loading. Without such code, the WinJS.Navigation APIs do nothing on their own. With the usual Store app templates in Visual Studio, there's a navigator.js file that provides this boilerplate code and works with pages you've defined with WinJS.Pages.define. If you are using navigator.js already, then check that the path you give to navigate exactly matches a path given to WinJS.Pages.define. If there's a mismatch, the page will fail to load. I'd point you to the MSDN docs on doing page navigation, but all of that's moving around in advance of Windows 10 so the links I know about are broken. But you can refer to Chapter 3 of my free ebook, Programming Windows Store Apps with HTML, CSS, and JavaScript, 2nd Edition, for all the details.
1
WinJS.Navigation.navigate does nothing on their own .
Why the use of resistors when pulling something up or down?
When pulling something up or down why is a resistor used and it not just connected straight to the +V or 0V rail?
It limits current to protect the switch (transistor, etc.) and allows signal sources with limited driving capability to change that node's voltage. Rails generally have high drive capability, or low resistance. Think voltage divider, including source impedance of signal and rail, then let the rail impedance be 0-ohms for simplicity. Other factors, other than operating current and voltage drops, to determine the pull resistance is charge time and substrate leakage. A 2M-ohm pull-down resistor on a top layer exposed to humidity and salts won't do anything due to sub-1M-ohm electrical resistance of grime layer.
0.888889
Rails have high drive capability, or low resistance
Does "so far, so good" carry a negative connotation?
As a follow up to this etymology question, does "so far, so good" carry a negative connotation? For example, after having her sonogram, my wife asked the technician if everything was okay. The technician replied, "so far, so good." My wife later remarked that she didn't like that the technician used the phrase because it sounded like things will be going wrong later. I always thought this phrase was positive and that it was a replacement for the word "good."
It literally means "good so far", but context is key here: if you'd normally expect an unreservedly positive response, then "so far, so good" can be interpreted negatively. For example, when I get in the elevator at lunchtime and ask a co-worker how it's going, the default polite response is "Fine". If they say "so far, so good", I can interpret that as "the storm hasn't hit yet, but there's the whole afternoon to go". Another interpretation is "I'm not done yet, let me finish"...I would guess that is what the tech was probably trying to say to your wife in this case. And it was not a good way to say it, considering the circumstances.
1
"so far, so good" can be interpreted negatively
What to call "Cancel" when "Cancel" is already the default action?
When attempting to cancel a service or setting, "cancel" is the default action. What should the normal "cancel" button be called? Redbox uses a playful "just kidding", which may not be appropriate in all circumstances.
I think that the shown image had a good idea of emulating the user's thoughts, some other good ideas would be: Nevermind Abort Undo Done Get me out of here! Call off Zap IMO: Nevermind and Done are the best.
1
Nevermind Undo Done Get me out of here!
Why is polyploidy lethal for some organisms while for others is not?
Polyploidy is the multiplication of number of chromosomal sets from 2n to 3n (triploidy), 4n (tetraploidy) and so on. It is quite common in plants, for example many crops like wheat or Brassica forms. It seems to be rarer in animals but still it is present among some amphibian species like Xenopus. As I know in mammals polyploidy is lethal (I don't mean tissue - limited polyploidy). I understand that triploidy is harmful due to stronger influence of maternal or paternal epigenetic traits that cause abnormal development of placenta, but why there is no tetraploid mammals?
In animals, polyploidy is not tolerated and very few polyploid species are known to exist. Those that do exist are usually asexual, parthenogenetic, or hermaphroditic. Most of the problems resulting from polyploidy occur during synapsis of homologues during prophase I. As plants do not have a chromosomal mechanism for sex determination, synapsis and subsequent disjunction is not as great a problem. In fact, most plants are monoecious. These paragraphs are taken from these lecture notes from an Emporia State University genetics course. Supporting information looks to be present in Why Polyploidy is Rarer in Animals Than in Plants (H. J. Muller, The American Naturalist, 1925), but I didn't get a chance to access the article.
1
Why Polyploidy is not tolerated in animals
What is the best place to start Warhammer 40k?
I've got three omnibus books containing 9 total Warhammer 40,000 stories. Before I mention which ones I've got, which book would you recommend as a good place to start the series?
As someone who enjoyed playing the computer games, but not played the tabletop yet, these are my recommendations based on how I followed it. First start with the Horus Heresy books; Horus Rising, False Gods etc. Then start Galaxy In Flames then The Flight of Eisenstein. After the first 2 books you would have what I believe is a reasonable grasp of the 40k universe with regards to the Imperium of Man v/s Chaos and why there are Traitor Legions within. You could then move on to discovering the other xenos aka Orks, Eldar etc. The books are a pretty easy read, but don't let that put anyone off as they are quite politically focused intertwined with some good narrative. However the downside, in the humblest of my opinions, is that I am starting to find the "Imperium of Man" is a bad organization. Especially with Horus being a Warmaster or have I read them wrong even before Heresy sets in. Of course Loken and his comrades are still good guys :). Maybe a spoiler there sorry :( So go with Horus Heresy 1st 1-4 books if you're like me and only dabbled in the periphery of W40k.
0.888889
Horus Heresy 1st 1-4 books if you're like me
Non-trivial examples of operations.
Let $A\neq \emptyset$ and $I$ be sets. An operation on the set $A$ is any function $f:A^{I}\rightarrow A$. Can someone give non-trivial examples of operation. By trivial I mean the most given in books such as sum, subtraction, set inclusion, function composition, boolean sum, empty function, etc. Thanks.
One interesting infinitary operation that hasn’t been mentioned is the Suslin operation, sometimes (following Suslin) called operation A, which is important in descriptive set theory. If $\mathscr{F}=\{F_\sigma:\sigma\in^{<\omega}\omega\}$ is a family of sets indexed by the set of finite sequences of natural numbers, the result of applying the Suslin operation to $\mathscr{F}$ is $$\bigcup_{\sigma\in^\omega\omega}\;\;\bigcap_{n\in\omega}\;F_{\sigma\upharpoonright n}\;.$$ Added: I should probably note that in terms of the notation in the question, $I$ here is $^{<\omega}\omega$, and $A$ is some family of sets, e.g., the family of closed sets in a metric space.
0.666667
Suslin operation is important in descriptive set theory
"God is Fire": Trying to Source an Analogy for Prayer
I remember reading once a very clever analogy, which I was sure that I had found in the writings of Yeshayahu Leibowitz (who sourced it, from memory, in the writings of the Rav, R' Yosef Ber Soloveitchik, who himself sourced it in the Rambam), but I can no longer locate it at all. In essence, the analogy stated that God is like fire. Different objects, when dropped into the fire, react differently. Some become hard. Some become soft. Some let off smoke. Some change their hue. Some make a noise. Some might explode. But while all of these different reactions can be found, at no stage is the fire anything other than a fire; the difference in responses to it is to be found in the different objects that come into contact with it. So too, the analogy concluded, when it comes to our relationship with God. When we pray, we change ourselves in order that God might interact more favourably with us. We do not hope for God to change in any way, but for ourselves to change instead. God's influence upon the world is constant and unchanging; it is we who are in flux. Does this analogy sound familiar to anybody? If you can direct me to a printed source (be it in the writings of the Rav, or Prof. Leibowitz, or whomever it was who came up with this), I would be much obliged.
From zaq's answer to a related question: In the Moreh Nevuchim [(Part 1 ch.53)], Rambam explains how God's attributes should be understood without compromising God's unchangingness. He compares God's mood to a fire. If you put ice in a fire, it melts, then evaporates. If you put clay in a fire, it hardens. If you put wood in a fire it burns... The fire causes many different and contrasting effects without changing the fire's properties. The same "fire melts certain things and makes others hard, it boils and burns, it bleaches and blackens." It is the properties of each individual material that elicit a different interactions with fire.
1
Rambam compares God's mood to a fire .
Trigger to create new event after insert/update creating dupes
I have a trigger that should create a new event after insert or after update of a custom object called Handoff, but only if a custom field (Status) of that new record = "Delivered" The after insert portion works fine, but the after update portion seems to always create duplicate events (two, to be precise). I can't quite seem to find where it's going wrong within the trigger... any ideas? trigger CreateEventAfterHandoff on Handoff__c (after insert, after update) { List<Event> lstNewEvents = new List<Event>(); for (Handoff__c eve : Trigger.new) { if (Trigger.isUpdate) { if (eve.Status__c != Trigger.oldMap.get(eve.Id).Status__c) { // Field has been changed! if (eve.Status__c == 'Delivered') { Event e = new Event(); e.Event_Type__c = eve.Event_Type__c; e.Meeting_Type__c = eve.Meeting_Type__c; e.StartDateTime = eve.Meeting_Time_Start__c; e.EndDateTime = eve.Meeting_Time_Stop__c; e.Subject = eve.Name; e.WhoId = eve.Lead__c; e.OwnerId = eve.User__c; e.Handoff_ID__c = eve.Id; lstNewEvents.add(e); } } } else if (Trigger.isInsert) { if (eve.Status__c == 'Delivered') { Event e = new Event(); e.Event_Type__c = eve.Event_Type__c; e.Meeting_Type__c = eve.Meeting_Type__c; e.StartDateTime = eve.Meeting_Time_Start__c; e.EndDateTime = eve.Meeting_Time_Stop__c; e.Subject = eve.Name; e.WhoId = eve.Lead__c; e.OwnerId = eve.User__c; e.Handoff_ID__c = eve.Id; lstNewEvents.add(e); } } } insert lstNewEvents; }
Most likely the cause is either You have a second trigger somewhere else in your code base on Handoff__c that in turn does a DML update on itself or You have a field update on Handoff__c via a workflow that will cause the after update trigger to be reinvoked. You can resolve either of these by using the controlling recursive triggers recipe as shown in the SFDC doc here or here in Help doc. You may also be able to control it by tighter if statements to avoid creating the Events even if invoked twice. This SFSE post addresses workflows and updates of greater than 200 records Lastly, examine your debug log to see where the after update trigger on Handoff__c gets reinvoked, this may provide additional insight
0.888889
After update trigger on Handoff__c is reinvoked
What kind of energy does superfluidity use?
Liquid helium (and other similar fluids) can "climb up" the walls of their containers. Who does the work in this case, and what kind of energy does it use? I'm sure we can't make a perpetuum mobile out of this, so I guess some kind of energy must somehow be expended to make the fluid "climb up" the wall.
the same kind of phenomenon appears for normal liquid but the explanation is different. for normal liquid, this phenomenon is called capillarity. In short, capillarity can be explained because the liquid like more to be in contact with the wall of the container than with the air. for suprafluidity, heat creates the phenomenon. As a superfluid can't transmit entropy, if you heat it, then it will dissipate the energy by "climbing up" the walls. a similar experiment is called the fountain effect. you can easily google it...
1
Capillarity is the same phenomenon for normal liquid
Why are there so many different types of screws (phillps/flat/hex/star/etc)?
Newbie question. Why is it that there's a bazillion different types of screws? Why can't we just always use one standard screw type? Are there advantages/disadvantages to the different types? Are there times when one type is preferred over another? Help me understand why there isn't one screw to rule them all.
The full list of reasons (partially based on some other good answers here) seems to be: design improvements (a "good thing" on the road to the world having the best screws) When people come up with improved designs, those start to get used. network effects (a "bad thing") Some people will stick with older, inferior designs that have many users, since those will be easier to find and they will already have the screwdrivers and bits for them. Also... economy of scale (a "bad thing") ...gives an advantage to more established designs (even if they are terrible), as production of those will be large-scale and efficient, so new designs (better or worse) will tend to be more expensive. patenting (and other business reasons that have nothing to do with design) (a "bad thing") As Chris Cudmore points out in a comment to a different answer here, this is the reason Phillips screws are more widespread than Robertson (square) screws, despite Robertson ones being generally better (far more difficult to strip the heads. ...and what was Ford's first choice again? ...exactly.). desire to have some things be tamper-proof (mostly a "bad thing") Guarding against vandalism (special washroom stall screws) and preventing theft (special car wheel lug nuts) are decent goals, but the motives are not always as good. (Is Apple just trying to protect users against themselves with pentalobe screws, or are there other, worse reasons for them, such as pushing more people back Apple for any repairs?) The tamper-proof requirement is pretty clearly at odds with what most users would want, though, as each variation means another set of screwdrivers or bits someone would need to own to be prepared. Of course the fact that the designers of these screw heads often make money off each screwdriver or bit sold points to that being one reason the screw is out there in the first place. different applications (mostly a "good thing") To end on a positive note after all of that, the different applications of screws really do leave room for multiple "best" designs. The points about wet applications and applications with small countersink-type heads (which can only fit much smaller bit sizes of the grippier designs) are great. (Still... We would be much better off if we just started using Robertson screws 99% of the time!) Actually, triangle heads should be best. They should have the best torque (as long as the sides are vertical), while still being simple to cut (low manufacturing costs). I just looked up whether they exist, though, and apparently they are being used as yet another tamper-proof design.
1
Design improvements (a "good thing" on the road to the world having the best screws)
Should I get my guitar re-set up when changing string brands, but not gauges?
So I've recently purchased an electric guitar, and I've been playing contentedly with it. However, I decided the factory strings were due for a change, so I had the guitar set up with strings of a certain gauge. Now, however, I've come to regret my choice of string. They just don't sound as good as the original strings from the factory. Therefore, my question is: can I just change the strings to the same gauge, or should I get the whole guitar re-set up, given that the brand might be slightly different or whatnot?
Same gauge strings = same set up. Same string mass, same tension, same speaking length. However... if you had the set up changed from original, which you liked, just changing brand will probably not do it for you. Sounds like you need to revert to the original string gauge, which will require a re-set-up.
1
Same string mass, same tension, same speaking length
Android- R.java file not found
While working with an android project .I'm stuck with R.java file which is not found even I clean the project(project---->clean).But that file still not found .Even I create a new project the same problem occurs . what I need to do ? I'm expecting the valuable replies from which I could overcome this problem
Have you checked that your builders are set up correct? To have the R.java file generated there's a need that the Android Pre-Compiler has processed all the resources. In Eclipse go to "Project --> Properties" and select "Builders" from the list. Only if these builders are set, the R file can be generated.
0.888889
How to get R.java file generated?
Is a password easier to brute force if it contains a repeating pattern?
My question is different from this previous question: Does repeating one word to form a password result in a similar pattern in its encrypted format?. I'm specifically wondering about brute force attacks. Based on my experiences with John The Ripper, I doubt that repeating a pattern in a password would shorten the time to successfully brute force a password like f00B@rf00B@rf00B@r as opposed to a random string of equal length. However, my doubt is based on the fact that, according to the documentation, JTR does not include a specific attack mode for repeating patterns. JTR, and presumably other brute force tools, can be customized for any arbitrary attack mode. But we can't know how often attackers bother to customize attacks in this way. So then the question becomes mathematical. Please forgive the awkward pseudo mathematical notation. T = brute force cracking time PL = pattern of characters of length L N = number of times PL is repeated R(LN) = string of random characters of length (L times N) Would it be true that T(PL*N)= T(R(LN)) If true, then a repeating pattern password would not affect brute force cracking time. But is it true?
The knowledge of the password pattern could give you really speed-up in the brute-force method. If you know, that brute-forcing password is a repeating pattern password, you can reduce the cracking time. If you know, that the password consists of N the same parts, then, all you have to do is find that part. So to speed the cracking process up, you need to add a few lines into your brute-force function. Let's say that the brute-force algorithm checked if your password is abba. Before you let it go to the another step (checking abbb), you should "glue" that try and check passwords like abbaabba, abbaabbaabba and so on.
1
How to speed up the cracking process
$\theta$ term of anomaly related with topological insulators
I am reading Ludwig's paper "Electromagnetic and gravitational responses and anomalies in topological insulators and superconductors", and in this paper, although I am clear how they get the descent equation which introduced the relationship between anomaly and the existence of topological insultor, I am confused about the theta-term they mentioned on section VA5, they said that the integral of anomaly polynomial $\Omega_{2n+2}$ corresponds to the $\theta$ term. Could anyone help and explain to me what is this theta-term referring to and where can I find information about it?
The $\theta$-term is also known as the axion term and it's simply the $F\wedge F$ term known to particle physicists. In a more condensed-matter-friendly language, $$\Delta {\mathcal L} = \theta\left( \frac{e^2}{2\pi h} \right) \vec B \cdot \vec E $$ I don't know the optimum starting point but you may begin with http://arxiv.org/abs/1001.3179 and its followups and references. More generally, the $\theta$-term means the integral of the anomaly polynomial. Note that the anomaly polynomial is a nice gauge-invariant expression - but in higher dimensions. The actual anomaly in the original spacetime is related to it by several operations.
0.888889
The $theta$-term means the integral of the anomaly polynomial
Planet orbits: what's the difference between gravity and centripetal force?
My physics teacher says that centripetal force is caused by gravity. I'm not entirely sure how this works? How can force cause another in space (ie where there's nothing). My astronomy teacher says that gravity is (note: not like) a 3D blanket and when you put mass on it, the mass causes a dip/dent in the blanket and so if you put another object with less mass it will roll down the dip onto the bigger mass. Is this true and is this what causes the centripetal force.
Simple answer: gravity is a centripetal force, and can be envisaged clearly as such in Newtonian mechanics. Centripetal just means a force that is "radially inwards" ("directed towards the centre"). The electric force, for example, is also clearly centripetal. (It's slightly harder to define "centripetal" for the magnetic force.) Your astronomy teacher is referring to Einstein's theory of general relativity. His description is loosely an overview of the topology (fabric) of space-time and how it interacts with matter/energy - the manifold is however 4-dimensional, not 3D. In fact, test particles (particles which do not really disturb the gravitational field) in general relativity follow a geodesic. This is effectively a generalisation of a straight line (shortest route) of normal Euclidian space to the curved space of GR, and may be seen as the source of centripetal force in Newtonian physics.
0.888889
Zenipetal means a force that is "radially inwards"
How to pass alias through sudo
I have an alias that passes in some parameters to a tool that I use often. Sometimes I run as myself, sometimes under sudo. Unfortunately, of course, sudo doesn't recognise the alias. Does anyone have a hint on how to pass the alias through? In this case, I have a bunch of options for perl when I'm debugging: alias pd='perl -Ilib -I/home/myuser/lib -d' Sometimes, I have to debug my tools as root, so, instead of running: pd ./mytool --some params I need to run it under sudo. I've tried many ways: sudo eval $(alias pd)\; pd ./mytool --some params sudo $(alias pd)\; pd ./mytool --some params sudo bash -c "$(alias pd)\; pd ./mytool --some params" sudo bash -c "$(alias pd); pd ./mytool --some params" sudo bash -c eval\ "$(alias pd)\; pd ./mytool --some params" sudo bash -c eval\ "'$(alias pd)\; pd ./mytool --some params'" I was hoping for a nice, concise way to ensure that my current pd alias was fully used (in case I need to tweak it later), though some of my attempts weren't concise at all. My last resort is to put it into a shell script and put that somewhere that sudo will be able to find. But aliases are soooo handy sometimes, so it is a last resort.
Wouldn't it be easier to simply hack out a script that includes your options, then place it somewhere in one of the folders that is the path for regular account and root? It really wouldn't take much of a script. #!/bin/bash exec perl -Ilib -I/home/myuser/lib -d $*
0.888889
Wouldn't it be easier to hack out a script that includes options, then place it somewhere in one of the folders that is
Where was the Scottish Skyfall scene filmed?
I know Scotland very well and have several theories of my own but can anyone tell me where this iconic shot was taken? Ideally I'm after as accurate a location as possible as I'm fairly sure I can narrow it to one of two valleys (bonus points for a streetview link!)
Actually I think it's here: Skyfall in Glen Etive The little bridge in front of Bond is the land mark.
1
Skyfall in Glen Etive The little bridge in front of Bond
Positioning using textpos and animated blocks
I am trying to position a figure on a page using textpos and then have a block appear over it in the next slide. I am inspired by the Gonzalo Medina's code given here. Here is what my code looks like, but the figure that is positioned on the page using textpos covers over the block as seen below -- block should cover that portion of the figure. Any suggestions? \documentclass{beamer} \usetheme{Madrid} \usepackage[absolute,overlay]{textpos} \begin{document} \begin{frame}{III. Override pages} \begin{enumerate} \item Bookmark manager \item History \item New tab \end{enumerate} \begin{textblock*}{20mm}(50mm,30mm)% \rule{2cm}{4cm} \end{textblock*} \only<2->{ \centering \begin{block}{Block Title} Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. \end{block} } \end{frame} \end{document}
I think in this case it's better to use TikZ and not textpos (more information in Christian's answer to How can I position an image in an arbitrary position in beamer?) textpos manual explains that overlay option places the contents over anything else, so it's not possible to draw something over the rule later on because the rule is on top of each slide. Next code using TikZ remember picture and overlay options worked for me in this particular case. \documentclass{beamer} \usetheme{Madrid} \usepackage{tikz} \begin{document} \begin{frame}{III. Override pages} \begin{enumerate} \item Bookmark manager \item History \item New tab \end{enumerate} \tikz[remember picture, overlay]\node at (current page.center) {\rule{2cm}{4cm}}; \only<2->{ \centering \begin{block}{Block Title} Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. \end{block} } \end{frame} \end{document}
0.888889
How can I position an image in an arbitrary position?
Can I use Ubuntu to diagnose hard drive or RAM problems in Windows?
This may be a crazy question, but here goes... My brother suggested that I could somehow use either a Ubuntu Live Boot CD or Flash drive or Kubuntu as a way to diagnose issues I'm currently having with my laptop. I'm running Windows 7 and for some reason my laptop has suddenly started freezing during Windows start up. This started immediately after I began seeing the hard drive light remaining on and my computer running very, very slowly - even though when I checked Task Manager it said that no applications or unusual processes were running at the time and CPU usage was 0%. Strange, I know. I've used the Restore disks 3 times already, thinking maybe it was a virus, even though I run Norton 360 and it found nothing upon a full system scan. But every time I end up with Windows failing to start up at all, or it getting stuck on the "Windows Starting" screen for at least 15-20 minutes before it starts. I'm at a total loss here. I'm thinking it is either a Hard drive issue or perhaps a RAM issue, but I am a total moron when it comes to the operational aspect of computers. I don't know where to begin. My brother said that if I used a flash drive of Ubuntu or Kubuntu and tried to boot from there that I would know immediately if it was my Hard drive because it wouldn't operate. I don't understand that since it wouldn't be operating off my hard drive, it would be running from the CD/flash drive. Does anyone have any clues on what I can do to check this out? I'm tempted to buy a new hard drive and RAM, but would hate to buy something I can't return if they aren't the issue. I'm stuck...any help would be very appreciated. Thanks so much and have a wonderful weekend.
For testing ram -> boot from the cd/usb and hold down a key (it will load and give option for testing memory) Memtest with Ubuntu 12.04 live CD For hard drive boot all the way to the ubuntu and in programs there will be a program called disks #(in disks click on the drive then the cog symbol and choose SMART) data or gparted. (help withv live cd: https://help.ubuntu.com/community/LiveCD)
0.666667
Memtest with Ubuntu 12.04 live CD
I can't control the count of records returned by the linkedIn api
Here is a simple query from the linkedIn documentation that works: $groupData = $this->linkedin->fetch('GET', "/v1/groups/{id}/posts"); It returns 10 records. But the moment I attach the count and start parameters like this: $groupData = $this->linkedin->fetch('GET', "/v1/groups/{id}/posts?count=20&start=0"); I get this error: A PHP Error was encountered Severity: Warning Message: file_get_contents(https://api.linkedin.com/v1/groups/{id}/posts&count=20&start=0?oauth2_access_token=xxxxx8&format=json): failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request Filename: libraries/Linkedin.php Line Number: 85 Here is my complete code: class Auth extends CI_Controller { function __construct() { parent:: __construct(); $this->load->library('linkedin'); // load library session_name('linkedin'); session_start(); } // linkedin login script function index() { // OAuth 2 Control Flow if (isset($_GET['error'])) { // LinkedIn returned an error // load any error view here exit; } elseif (isset($_GET['code'])) { // User authorized your application if ($_SESSION['state'] == $_GET['state']) { // Get token so you can make API calls $this->linkedin->getAccessToken(); } else { // CSRF attack? Or did you mix up your states? exit; } } else { if ((empty($_SESSION['expires_at'])) || (time() > $_SESSION['expires_at'])) { // Token has expired, clear the state $_SESSION = array(); } if (empty($_SESSION['access_token'])) { // Start authorization process $this->linkedin->getAuthorizationCode(); } } // this is where I am fetching linkedIn data $groupData = $this->linkedin->fetch('GET', "/v1/groups/{id}/posts?count=20&start=0"); // this is where I am sending the data to the idea model to be saved if ($groupData) { var_dump($groupData); exit(); // foreach ($groupData->values as $data) { // var_dump($data->creator->firstName); exit(); // } $this->load->model('idea_model'); $this->idea_model->store_ideas($groupData); } else { // linked return an empty array of profile data } } } The linkedIn library is the code sample given by linkedIn in their documentation: <?php defined('BASEPATH') OR exit('No direct script access allowed'); /** * CodeIgniter Linked API Class * * * @package CodeIgniter * @subpackage Libraries * @category Libraries * @author Muhamamd Hafeez */ class Linkedin { function __construct(){ } public function getAuthorizationCode() { $params = array('response_type' => 'code', 'client_id' => API_KEY, 'scope' => SCOPE, 'state' => uniqid('', true), // unique long string 'redirect_uri' => REDIRECT_URI, ); // Authentication request $url = 'https://www.linkedin.com/uas/oauth2/authorization?' . http_build_query($params); // Needed to identify request when it returns to us $_SESSION['state'] = $params['state']; // Redirect user to authenticate header("Location: $url"); exit; } public function getAccessToken() { $params = array('grant_type' => 'authorization_code', 'client_id' => API_KEY, 'client_secret' => API_SECRET, 'code' => $_GET['code'], 'redirect_uri' => REDIRECT_URI, ); // Access Token request $url = 'https://www.linkedin.com/uas/oauth2/accessToken?' . http_build_query($params); // Tell streams to make a POST request $context = stream_context_create( array('http' => array('method' => 'POST', ) ) ); // Retrieve access token information $response = file_get_contents($url, false, $context); // Native PHP object, please $token = json_decode($response); // Store access token and expiration time $_SESSION['access_token'] = $token->access_token; // guard this! $_SESSION['expires_in'] = $token->expires_in; // relative time (in seconds) $_SESSION['expires_at'] = time() + $_SESSION['expires_in']; // absolute time return true; } public function fetch($method, $resource, $body = '') { $params = array('oauth2_access_token' => $_SESSION['access_token'], 'format' => 'json', ); // Need to use HTTPS $url = 'https://api.linkedin.com' . $resource . '?' . http_build_query($params); // Tell streams to make a (GET, POST, PUT, or DELETE) request $context = stream_context_create( array('http' => array('method' => $method, ) ) ); // Hocus Pocus $response = file_get_contents($url, false, $context); // Native PHP object, please return json_decode($response); } } /* End of file Linked.php */ /* Location: ./application/libraries/linkedin.php */ Please help me fix this. What am I doing wrong?
The problem is that your parameter list has 2 two ?'s. I would change the fetch method to take an optional $params parameter: public function fetch($method, $resource, $params = array(), $body = '') { // Cast, just in case $params = (array)$params; // Add mandatory parameters $params['oauth2_access_token'] = $_SESSION['access_token']; $params['format'] = 'json'; // Need to use HTTPS $url = 'https://api.linkedin.com' . $resource . '?' . http_build_query($params); // Tell streams to make a (GET, POST, PUT, or DELETE) request $context = stream_context_create( array('http' => array('method' => $method, ) ) ); // Hocus Pocus $response = file_get_contents($url, false, $context); // Native PHP object, please return json_decode($response); } And call it like so: $groupData = $this->linkedin->fetch('GET', "/v1/groups/{id}/posts", array("count" => 20, "start" => 0));
1
fetch method to take optional $params parameter list
Do the four brothers in TMNT train in other weapons?
So I've been watching a lot of the 2003 TMNT cartoon, and I've noticed that whilst they claim to be ninjas they only seem to use their own iconic weapons. Is there any evidence that they train with other weapons? I'm not asking about just use, I mean proper training, involving kata or some such? Because I like to pretend all the reboots and remakes share a sort of pseudo-canon I'm happy for answers from the comics or other cartoons.
All of the turtles were trained by Master Splinter who learned his martial arts from his owner before he was mutated. He taught the Turtles all the martial arts they knew and each Turtle is quite capable no matter what weapons they used. They are all capable open-hand fighters and able to use any weapon they have at hand when necessary. When the original comics were written, each had chosen a signature weapon that suited their mental preferences and combat styles. Eastman and Laird showed many examples during their appearances in the comic series. The cartoons were far less likely to show such training since the cartoons were often a marketing tool for associated toys. The Turtles trained from 7:00 AM until noon. Master Splinter extols that diligence is the only path to mastery. Tales of the TMNT (Vol. 2) #55 Bo Staff (Donatello) vs Tonfa (Raphael) from Teenage Mutant Ninja Turtles vol.1 #9 Leonardo vs Raphael in sword training from Teenage Mutant Ninja Turtles vol.1 #9 Leonardo effectively throws shuriken from Teenage Mutant Ninja Turtles vol.1 #9 Leonardo (Dual Katanas): The Sword is the weapon of leadership and command. The de facto leader of the Turtles, Leonardo is courageous, decisive, and a disciplined student of martial arts. As a strict adherent to Bushido, he has a very strong sense of honor and justice. Raphael (Dual Sais): The sai is used both offensively and defensively, can be used to pierce or club an opponent and is able to disarm an opponent. Sais can also be thrown. The team's "Hot-Head", Raphael has an aggressive nature and seldom hesitates to throw the first punch. He is also an intense fighter. His personality can be alternately fierce, sarcastic, and full of angst, and oftentimes delivers deadpan humor. Still, he is good-hearted, willing to protect others and is intensely loyal. Michelangelo (Dual Nunchakus): Nunchaku are fast and deadly, requiring extreme skill and reflexes. Michelangelo is easily the most agile and quick of all the Turtles. The easy-going and free-spirited Michelangelo provides much of the comic relief. While he loves to read comics and eat pizza, this Turtle also has an adventurous side. Donatello (Bo Staff): Used to keep an opponent at range, but capable of dealing devastating damage in the hands of a master. The inventor, and technology geek, Donatello has a reputation as something of a smart aleck. He is perhaps the least violent Turtle, preferring to use his intellect to solve conflicts. Splinter - The Turtles' sensei and adoptive father, Splinter is a mutant rat who learned the ways of ninjutsu from his own master, Hamato Yoshi. Splinter is able to use any and all martial arts weapons. In the 1987 TV series and Archie Comics series, Splinter was Hamato Yoshi mutated into a rat instead of being just Yoshi's pet. Splinter's name is a parody of Stick, the man who mentored Daredevil.
1
Master Splinter taught the Turtles martial arts from his owner before he was mutated.
Can a Canon T3 DSLR be used with my TAMRON AF TELE-MACRO 90-300mm lens?
Can a Canon T3 DSLR be used with my Tamron AF tele-macro 90-300mm lens? I am trying to find a lower cost new camera (less than $500) to use with this lens that I previously used with a film camera. 1) Can the Canon T3 be used with this lens? and/or 2) Does anyone have another camera recommendation within this price range to use with this lens?
You can use this lens, with a few trade offs. 1. You will have to buy a lens mount adapter. Try searching the mount it is in "to canon ef" on amazon. 2. Neither autofocus, nor auto exposure will work for this lens. This is because the adapter won't have electrical contacts. Depending on the lens, it may be possible to find an adapter with the contacts, but it will probably cost about ten times as much. Despite these trade offs, using an old lens is great! I use an old 50mm with my canon, and using manual focus forces me to be more creative. You also save a lot of money, by not having to buy a new lens.
1
Neither autofocus, nor auto exposure will work for this lens
Why Do People "Pre-empt" With Seven Of A Suit In Bridge?
One advantage of a "pre-empt" is quite clear: You take two levels of bidding away from your opponents with a "three" bid. But could that be cutting off your nose to spite your face? Recently, I had something like KQxxxxx, and a side queen (I forget how the other suits were distributed but was told it didn't matter). My partner was disappointed I didn't "preempt" (in "third" seat). My response was "with seven points?" My understanding is that people often bid three of a suit with seven cards and this little. Sometimes even less, particularly when non-vulnerable vs. vulnerable. In its extreme version, the mantra is "with any seven (suited) cards." Isn't this risky? What if we're doubled and only make three or four tricks?
Originally (when Culbertson and others first studied Contract Bridge), the rule was "Seven cards and an outside Ace". With that and even a semi-reasonable dummy, you can usually make your contract, if left in it. But a little more study revealed that the hands you don't make are usually the ones where the opponents have an easy game/slam and, more importantly, starting at the three-level often makes it impossible for them to find the right contract, even if they do bid. Too valuable to restrict: cutting the outside Ace down to a King or Queen reduces the chance of making your contract, but offers much greater scope to interfere with the opponents, so reducing their score at the risk of a small penalty to you.
0.777778
Cut the outside Ace down to a King or Queen reduces the chance of making your contract .
How do electrical devices suck electricity?
If the electric potential is 220V and some device needs 1500watts then how does it suck exactly that amount of electrical energy from outlet?
It is not the most straightforward viewpoint to say that a device "needs 1500 watts". This is more a consequence than a condition. What happens is that you create an electric circuit by plugging in a device into the outlet. That circuit follows Ohm's law: $$V = I R$$ So for a given voltage and resistance a certain current $I$ will flow. The power is simply $$P = V I = V^{2}/R = I^2 R$$The device does not know anything, it just has a property, it's resistance $R$.
1
What happens is that a device "needs 1500 watts"
Resize a table imported from another TeX file
Is is possible to resize a table imported from another table without having to modify the LaTeX code in the file from which the table is imported? I was thinking of something like: \documentclass[english]{article} \usepackage{babel} \usepackage{graphicx} \usepackage[margin = 1.5 cm, tmargin=1.5 cm]{geometry} \begin{document} \scalebox{0.5}{% \input{DS} }% \end{document} The table in the file DS.tex looks like the following: \begin{table}[!htpb] \centering \begin{tabular}{ccc} % ... \end{tabular} \end{table} I got as expected the error : ! LaTeX Error: Not in outer par mode. I would like to know whether it is possible to resize the table in DS file without modifying it.
A floating environment (table, figure, ...) cannot put into an \hbox or \scalebox that internally uses \hbox. However the environment can be redefined locally: \scalebox{0.5}{% \renewenvironment{table}[1][]{\ignorespaces}{\unskip}% \input{DS}% \unskip } \ignorespaces and \unskip remove spaces by line ends in the file DS.tex that does matter in horizontal mode. An alternative is using \endlinechar=-1\relax, but this depends on the contents of the tabular environment, because some line ends might not be unwanted (e.g. space between words). The floating environment can be inserted afterwards, e.g.: \begin{table} \centering \caption{Table caption} \scalebox{...}{...} \end{table}
0.888889
a floating environment cannot be put into an hbox or scalebox that internally uses Hbox
How can I prevent the intake vent for an on demand water heater from getting plugged?
We have a Navien on demand water heater. The intake and outlet vent pipes run out through the poured concrete foundation and have a plastic grill on the end. If the intake vent is blocked in any way the water heater will not turn on as a safety feature. I have to add another tighter mesh over the intake in the summer or paper wasps build nests inside the pipe. If I leave the mesh on then in the winter it gets blocked with snow and ice. I need some sort of vent cover that blocks insects and does not get blocked by snow. Here is a sample with the "as delivered by the contractor" on the right and with a crude but workable filter for summer use on the left. Any ideas? Edit: the manufacturer suggests adding a PVC T valve at the end of the outlet. The number of elbows allowed is governed by the length of the run and number of previous elbows in the run. I'm going to try a T valve and the filters shown in the answer below.
Picture of the vents would help. The way I've usually seen them installed is with a 90deg elbow on the intake so that it points down. That would prevent snow from clogging it. The exhaust vent pipe usually has a 90 deg elbow so that it points up. You can get a rain cap for the end of it to keep rain/snow out. Looking at this document from your manufacturer it shows one of the vents elbowed to face down like I indicated the other one isn't. After seeing the pictures of your vents it looks like you can elbow the one on the right and then get a hooded cap for the one on the right. Something like the Noritz PVT-HL looks like it might work. Then you can install a tighter mesh to keep the wasps out. By the way, have you tried those wasp deterrents that look like nests? I haven't but they seem to have good reviews.
1
How do I get a 90deg elbow on the exhaust vent pipe?
Differences between PS3 and Wii version of Rock Band The Beatles
I'm considering buying Rock Band The Beatles for my only gaming console, the Nintendo Wii, but I was wondering if there are any big differences between the version on Wii and the version on Playstation 3?
The only difference is with DLC. If you wish to download the remainder of Rubber Soul, Sgt Pepper or Abbey Road, you must pay for the tracks individually on the Wii rather than a group bundle.
1
Do not pay for the tracks on the Wii
What does one do when one needs to bentch gomel?
One who has recovered from a serious illness or accident is supposed to bentch gomel during the torah service. What do you need to know to do this? Specifically: When is the right time -- the first torah service that you're able to physically attend, or is there some stricter standard? What do you do that day in shul? Is the answer different for a woman or a minor? (Are they obligated to gomel? If not obligated, permitted?)
As for women 'bentsching gomel', Dose of Halacha writes: ..The minhag is to recite it within 3 days of the incident after krias hatorah, though it may be recited later if necessary (Shulchan Aruch OC 219:6; Mishna Berura 20). The Chayei Adam (after 69) wrote a prayer after surviving an explosion. He writes that one should say this, along with the pesukim of the korban toda and give charity equal to the value of the animal he would have brought in Temple times. (See Mishna Berura 218:31). While women would also bring korbanei todah, the custom developed among many Ashkenazi communities that women don’t say the beracha, as the public recital is deemed immodest. The Magen Avraham (OC 219:4) writes that her husband should recite it on her behalf, while the Mishna Berura says that she recites it in front of ten women and a man. The Aruch Hashulchan (OC 219:6) suggests that this custom may have developed because women weren’t always present for Leining. Nonetheless, the Baer Hetev (219:1), Chayei Adam (65:6), Yechave Daas (4:15) and others all allow a woman to say it loudly from her side of the mechitza. Thus, Sefardi women should only say it in the presence of a minyan. In what is likely the last teshuva R’ Moshe Feinstein ever wrote (OC 5:14), he paskens that a new mother should recite the beracha in front of another, ideally her husband, and there is no need for a minyan. In England, we generally follow the Minchas Yitzchak (4:11). Women go to Shul and respond to their husband’s borchu and beracha (when he’s called up), with intent to thank Hashem.
0.777778
'bentsching gomel' is to recite it within 3 days of the incident after krias hator
Convert XML to PSObject
Note: I'm using ConvertTo-XML and cannot use Export-Clixml: I create a simple PSObject: $a = New-Object PSObject -Property @{ Name='New' Server = $null Database = $null UserName = $null Password = $null } I then convert it into XML using ConvertTo-XML: $b = $a | Convertto-XML -NoTypeInformation The XML looks like this: <?xml version="1.0"?> <Objects> <Object> <Property Name="Password" /> <Property Name="Name">New</Property> <Property Name="Server" /> <Property Name="UserName" /> <Property Name="Database" /> </Object> </Objects> I'm having trouble figuring out the dot notation or XPath query to extract the attributes/elements and convert $b back to the original PSObject.
You can do this pretty easily with XPath. Although PowerShell usually makes working with XML pretty simple, in this case I think the format using strictly PowerShell syntax would be pretty gross. filter XmlProperty([String]$Property) { $_.SelectSingleNode("/Objects/Object/Property[@Name='$Property']").InnerText } $Name = $b | Xmlproperty Name $Server = $b | XmlProperty Server # etc... EDIT: To generically do this for an XML document that contains one or more Object elements, you can do something like this: function ConvertFrom-Xml($XML) { foreach ($Object in @($XML.Objects.Object)) { $PSObject = New-Object PSObject foreach ($Property in @($Object.Property)) { $PSObject | Add-Member NoteProperty $Property.Name $Property.InnerText } $PSObject } } ConvertFrom-Xml $b
1
PowerShell syntax makes working with XML pretty simple
More than 2 resistors in parallel
Most people know the formula for the total resistance of parallel resistors: \$ \dfrac{1}{R_t} = \dfrac{1}{R_1} + \dfrac{1}{R_2} + {}...{} + \dfrac{1}{R_n} \$ If there are only 2 resistors, that can be easily rearranged to solve for Rt: \$ {R_t} = \dfrac{(R_1 \cdot R_2)}{(R_1 + R_2)} \$ Is there a safe way to do that for n resistors?
This is not an answer to your question but rather, additional information that may (or may not) be helpful in thinking about this kind of problem. When I teach introductory circuit classes, I always emphasize the notion of duality which, when mastered, can give you deep insight into many fundamental "rules" of circuit analysis. The idea is that if you know the answer for, say, a series circuit, you can take the dual of the result and get a correct answer for a seemingly very different problem. So, here is short list of circuit duals: Voltage - Current Resistance - Conductance Inductance - Capacitance Impedance - Admittance Series - Parallel Thevenin - Norton There are others but these will do most of the time. Ohm's law is usually written as: \$V = I R \$ To take the dual, replace all the variables in the above equation with their duals: The dual of Ohm's Law: \$I = VG \$ where \$G = \dfrac{1}{R} \$ Recall that for resistors in series, resistances add, so that the equivalent resistance is just the sum. Consider the dual of this, conductances in parallel. From the principle of duality, parallel conductances add just as series resistances. So, if you have 3 conductances in parallel, the equivalent conductance is: \$G_{eq} = G_1 + G_2 + G_3 \$ Now, convert back to resistance: \$R_{eq} = \dfrac{1}{G_{eq}} = \dfrac{1}{G_1 + G_2 + G_3} = \dfrac{1}{\frac{1}{R_1}+\frac{1}{R_2} +\frac{1}{R_3}}\$ In other words, the equivalent resistance of \$n\$ parallel resistors is the reciprocal of the sum of the reciprocals. This is the origin of your first formula.
0.666667
How do you take the dual of the result?
Get latitude/longitude of friend's current_location using Graph FQL
I'm trying to get the latitude/longitude of all of a user's friends using a single API call. I believe I need to write a multi-query FQL statement, but I can't get the syntax correct. I believe the two queries need to be something like the following: '"friends":"SELECT uid,current_location FROM user WHERE uid IN (SELECT uid2 FROM friend WHERE uid1 = me())"' '"location":"SELECT location FROM page WHERE id IN (SELECT current_location_id FROM #friends)"'; My problem is that somehow I need to get the ID of the current_location in the first query so that I can reference it in the second query, but I only know how to get an array that contains the id. Thanks for any help! Clarification: I'm not trying to get check-ins of friends. Instead I want to graph the "current_location" (i.e. where they live) of all of a user's friends on a Geo map. I can get a user's "current_location" with the following FQL query: "SELECT uid,sex,current_location FROM user WHERE uid IN (SELECT uid2 FROM friend WHERE uid1 = me())" This query returns the following array: [current_location] => Array ( [city] => New York [state] => New York [country] => United States [zip] => [id] => 108424279189115 [name] => New York, New York ) Which does not contain the longitude and latitude of the of the current_location (New York in the above example) Therefore I now need to take the ID of the current_location (e.g. 108424279189115) and run a second FQL query such as: "SELECT location,name FROM page WHERE page_id = 108424279189115)" To get the latitude and longitude of the current_location. Currently, I have a working code that runs the first FQL query, then extracts page_id in php, and then runs a second FQL query to get the current_location latitude/longitude. However, for performance reasons I would like to run only one multi-query if this is possible.
fql?q=SELECT location,name FROM page WHERE page_id in (SELECT current_location.id from user where uid in(select uid2 from friend where uid1=me())) this will do the magic for you
0.777778
fql?q=SELECT location,name FROM page WHERE page_id in
How to separate my rendering from game loop?
If I have a (complex) operation that takes a long time for it to finish, for instance, a couple of seconds, my frame rate drops far below the acceptable. How could I still implement it while it is not messing up my frame rate?
Create separate threads for drawing and logic, if you want improved performance. But, you can have update() and render() functions, which get called at different times. By doing this, you ensure that these two are separated, and that they do not depend on each other. That's the general direction you want to take, because it makes debugging a lot easier. Plus, once you've done that, creating separate threads for these things will be a piece of cake! If you were a bit more specific and told us what problems are you having exactly, it would be easier to answer the question.
0.666667
Create separate threads for drawing and logic, if you want improved performance
How to xlf-translate soy template by plovr?
{msg desc="Says hello and tells user to click a link."} Hello {$userName}! Please click <a href="{$url}">here</a>. {/msg} what set config file or request params in plovr?
You can use this fork of plovr which has support for soy translations via XLF (doesn't come with default plovr). You'll need Java 7 to build/run it. https://github.com/rgpower/plovr/tree/soy-translation See the most recent commit for plovr cfg syntax related to XLF translations.
0.833333
Java 7 to build/run plovr cfg
Do citizens of Hong Kong living in Canada - still need a visa to enter Russia for <2 weeks?
From what I understand, citizens of Hong kong (i.e. holders or HK Special Administrative Region passports) do not require a visa to go to Russia for short trips less than 14 days, according to this page. Does it make a difference if that person currently lives in another country, such as Canada, citizens of which - do require a visa to go to Russia? The same person is also holding a Canadian passport. Does current residency play a role in this matter at all, if the person tries to enter Russia as a Hong Kong citizen?
I don't know specifically about Russia but in general it does not make a difference and I would be a little surprised if it did. Being a resident somewhere can exempt you from some requirements (e.g. transit in the UK if you have a US green card) but typically not add some. Similarly, having Canadian citizenship can help you qualify for some exemptions but not make a visa necessary if you already qualify in another way. Basically, you can show one of your passports to benefit from the most advantageous rules. What could happen in some cases is that border guards notice you are a Canadian resident (because you come from Canada without a visa - if you are a citizen - or have a long-stay visa or stamps in your passport - if you are not) and question you about that (it's more likely to happen with a country they consider sensitive for some reason, which Canada usually is not).
1
Being a Canadian resident can exempt you from some requirements but not add some .
Tight VNC Server, Ubutu 12.10 and unity desktop
I've done the following but all I get in VNC Viewer is a blank orange screen, any help appreciated. apt-get -y install ubuntu-desktop tightvncserver adduser vnc passwd vnc echo "vnc ALL=(ALL) ALL" >> /etc/sudoers su - vnc vncpasswd exit cd ~ nano .vnc/xstartup #!/bin/sh # Uncomment the following two lines for normal desktop: unset SESSION_MANAGER . /etc/X11/xinit/xinitrc [ -x /etc/vnc/xstartup ] &amp;&amp; exec /etc/vnc/xstartup [ -r $HOME/.Xresources ] &amp;&amp; xrdb $HOME/.Xresources xsetroot -solid grey vncconfig -iconic &amp; x-terminal-emulator -geometry 1280x1024+10+10 -ls -title "$VNCDESKTOP Desktop" &amp; #x-window-manager & save THEN nano /etc/init.d/vncserver THEN paste in the following, then save: #!/bin/sh -e ### BEGIN INIT INFO # Provides: vncserver # Required-Start: networking # Default-Start: 3 4 5 # Default-Stop: 0 6 ### END INIT INFO PATH="$PATH:/usr/bin/" # The Username:Group that will run VNC export USER="vnc" #${RUNAS} # The display that VNC will use DISPLAY="1" # Color depth (between 8 and 32) DEPTH="16" # The Desktop geometry to use. #GEOMETRY="x" #GEOMETRY="800x600" GEOMETRY="1024x768" #GEOMETRY="1280x1024" # The name that the VNC Desktop will have. NAME="my-vnc-server" OPTIONS="-name ${NAME} -depth ${DEPTH} -geometry ${GEOMETRY} :${DISPLAY}" . /lib/lsb/init-functions case "$1" in start) log_action_begin_msg "Starting vncserver for user '${USER}' on localhost:${DISPLAY}" su ${USER} -c "/usr/bin/vncserver ${OPTIONS}" ;; stop) log_action_begin_msg "Stopping vncserver for user '${USER}' on localhost:${DISPLAY}" su ${USER} -c "/usr/bin/vncserver -kill :${DISPLAY}" ;; restart) $0 stop $0 start ;; esac exit 0 Then ctrl-x to save, Y for Yes, and enter to accept file name. THEN chown -R vnc. /home/vnc/.vnc &amp;&amp; chmod +x /home/vnc/.vnc/xstartup sed -i 's/allowed_users.*/allowed_users=anybody/g' /etc/X11/Xwrapper.config THEN chmod +x /etc/init.d/vncserver &amp;&amp; service vncserver start THEN update-rc.d vncserver defaults THEN reboot. FINALLY: go in there with tightvnc viewer client, and voila, blank kool aid tangerine orange screen. any help appreciated, of course it's been 3 x 8 hour evenings so far :}
From what i've seen you cant vnc into unity. Install a different desktop environment and you'll be good. Heres how woth xfce: https://www.digitalocean.com/community/articles/how-to-setup-vnc-for-ubuntu-12
0.666667
How to setup vnc into unity
How to allow someone else to send emails in my name?
I want to give another person the ability to send emails in my name. This person should be able to send mail using my email address, but not be able to read my email. Does anybody know a webapp or application that can do this? I use gmail, but am willing to try others.
If they use Gmail as well and you have access to their computer/account you can enter your E-Mail address as a custom "From" address. See Adding a custom 'From' address for details.
1
Adding a custom "From" address
Why use a small aperture when trying to see sensor dust?
Here and there I read of people who set their lens to a small aperture while testing their sensor cleanness, supposedly to get the best image of dust speckles. However, the image of the on-sensor dust particles should not, to my understanding, be affected by the sharpness induced by the lens settings. Same is true for dust particle on the lens elements themselves. It makes me wonder - do these people misunderstand the theory of how the optical system work, or am I missing something?
If the dust was really on the sensor proper, you'd be absolutely correct. At least in the normal case, it's virtually impossible for dust to get on the surface of the sensor itself, because there's a couple millimeters or so of filters directly in front of the sensor. The front-most of these is (at least in the usual case) the AA filer. The important thing is that all of this transparent glass. Therefore, with a wider aperture, there's more light coming at the sensor from various angles. Since the light can travel at whatever angle through those filters (because they're all at least mostly-transparent glass), the dust spots won't normally block all the light. With a smaller aperture, the light comes nearly straight back from the small aperture, so the edges of any dust spots are clearly defined. In practice, the difference is pretty obvious. Here's a shot at f/1.7, then shot taken a few moments later at f/22 (same camera, same lens, etc. -- all that's changed is the aperture and shutter speed): f/1.7: f/22: Like usual for this situation, I've also boosted the contrast to make the dust more visible -- since it's a plain, low-contrast subject, the histogram starts out like this: To make the dust more apparent, you adjust the levels something like this: If you apply it to the f/1.7 picture (as I did above, to keep things fair), that will also overemphasize the light falloff at the corners of the picture. Though there is some anyway, it's not normally even close to as bad as it looks in the first shot above. Note that this is a pretty rigorous test. This sensor is clean enough that on typical shots, there's no sign of dust on the sensor at all. Between the total lack of contrast/detail in the subject, tiny aperture, and extreme boost of contrast, we're seeing quite a bit that we'd never see in any normal picture (not to mention that the two worst spots here are near the bottom of the frame, where there's nearly always at least a little detail to hide these problems anyway). If you test this on your own camera, don't be too surprised if it looks (quite possibly a lot) worse than the ones above. From what I've seen, I'd guess that most dSLRs (and a pretty fair number of P&amp;S cameras too) are at least a little, and often a lot, worse than this.
0.777778
If dust was really on the sensor proper, you'd be absolutely correct .
Variations in the pronunciation of "the"
Although there are rather simple rules determining the pronunciation of "the", native speakers quite often deviate from these rules (including, e.g., TV shows). According to the Longman Pronunciation Dictionary, The EFL learner is advised to use [ðə] before a consonant sound (the boy, the house), [ði] before a vowel sound (the egg, the hour). Native speakers, however, sometimes ignore this distribution, in particular by using [ðə] before a vowel (which is in turn usually reinforced by a preceding ʔ), or by using [ði:] in any environment, though especially before a hesitation pause. Furthermore, some speakers use stressed [ðə] as a strong form, rather than the usual [ði:]. My question is: when native speakers use [ðə] instead of [ði] before a vowel sound, do they do it on purpose or accidentally? If it is on purpose, how do they (typically) decide which pronunciation to use? What is a valid reason to use [ðə] before a vowel sound?
For rather a lot of English there are "rather simple rules" that are flat out wrong (the order of the letters "i" and "e" when together is my favorite example). You just have to memorize them. In the case of "The", it is often pronounced with the long E sound for emphasis, which means that the same phrase might use a different pronunciation depending on the point the speaker wants to get across. The point of emphasis is often if the speaker wants to draw attention to the fact that it is somehow unique. For example there's "The Ohio State University". If someone is just rattling off its official name, typically you'd hear the softer sound. However, many people are kind of annoyed at how insistent they are about the "The" at the front of the name (most US universities don't do that), so I often hear it pronounced with the harsher long E sound (and the entire word "The" louder than the rest of the name).
1
"rather simple rules" that are flat out wrong
How do I deal with a slow and undedicated colleague in the team?
I have been working on a new project. The project works like this: The end user can access a webapp using a link and he can add multiple systems on his network and manage that particular systems details. My part involves the front end and the webserver, which is done in python. My python actually communicates with another project which is entirely done in c &amp; c++. The c/c++ project is the main app which does all the functionality. My python sends the user request to it and displays the response from it to the user. I am very familiar with my work and I will finish it soon. Since that's not much work in it. And I am a person who loves to work. I spends most of the time in office and only go home when I feel sleepy. The c/c++ app is managed by another colleague who has 5+ year experience and can do things much faster than me, but he never does it. May be he doesn't like to do it. His app crashes often when my python communicate with it or returns wrong values. It's full of bugs. Since my app depends on it, I am having a hard time building it. Instead of fixing the bugs, he asks me to slow down my work. He asks me to tell manager that my work needs a lot of time. He is asking me to fool the manager and even forcing me to work slowly like him. During project meeting, when manager asks him about the bugs he says that he fixed everything and it works fine. Since he is my colleague, I couldn't tell anything to the manager. I obviously need to have a good relationship with my colleagues more than my manager, since most of the time we will be with our colleagues, not with the manager. I am not able to tell the manager anything regarding this, since if manager asks him why, then he may think I complained about him to the manager. And he keeps on lying in the meeting. And since he fixes the bug slowly, it even slows down my work. Now I thought of working on the front-end part of my app and finishing it off so that in the mean time he can make his project stable. Now he is asking me to tell the manager that my front end part require a lot of work and I may need more and more time, simply so that he can drag the project down. And the sad thing is our actual manager has gone to the US, so we have a temporary manager and this guy doesn't know about the project much, so the c,c++ just fools him. Can anyone suggest me how I deal with this? I wanted to finish off the project soon. How can I make him work even by maintaining a good relationship with him? Responses to comments: If he's really deliberately misleading the company, you should report him to management. I am new to this company and the other guy has been there for many years. And I have just started knowing my colleagues. If I directly go and complaint him, I don't think so I can make good relationship with my other colleagues. Even he has the power to mislead them. I am not telling he is a bad guy, he can do the work, but he is not doing it. Doesn't your company have any kind of bug tracking system ? Here actual bug tracking system isn't there. The company tries to finish off the project as soon as possible and gives it to the QA. And then fixes the bugs reported by QA. This is why companies should give employees stock / options or some sort of ownership. That way you can literally tell the guy "You are costing me monetary growth... don't you want to make money also?". The company has the stock options they have given me a 2500 share, mostly he too would have got some more. Seniority does deserve some benefit of a doubt. You really need to speak to him first and try to understand the problem. He may be out of his depth, you may be able to help him, there could easily be variables you are unaware of. It may be hard now, but you could easily make the situation a lot worse by jumping the gun. I even does it, first his app wasn't handling multiple requests at a time, he was using a queue to handle the requests I sent to him. I even suggested to him some of my ideas on it. He said he already had these ideas, and will be executing them. His explanations was: "Everything require certain time to do and this is a project which may need two years to complete and we are asked to finish it in two months". I used to have a hard time coding during first few weeks because of this bug. But now he fixed it. But he is using a single queue for a user requests and that is now slowing down the app, since it processes one request at a time. What is QA doing this whole time? Why aren't they reporting/confirming the status of the project(s)? The manager is the person who decides when to give to the QA. As of now it has not yet given to QA. He said we should give it by this month end.
There are a number of issues at work. Be aware that: You are making assumptions about the motivations of other people You are coloring facts with opinions. Outsiders (anyone else) are not aware of the history and are not aware of your frustrations with your colleague. You may look childish if it appears that you are playing a "gotcha" game. Your colleague can probably play it better - after all he still has a job doesn't he? Therefore, when presenting the status of your project: Do not mention the other person. When reporting errors or issues with the code - not the developer. Say "The call to method FooBar() is returning 1 when it should be returning a 2". Then any issue is not a personal attack, you are just talking about code - not people. stick to the facts that you have proof for. If your colleague gets defensive or hostile, ask questions. "I don't understand why you think that I should do _ " Be oblivious to social slights or innuendoes. Pretend you don't get the personal attack. Get lots of sleep the night before any status meeting, so you are mentally nimble. Document, document, document. Don't be shy about asking this guy to help you with some interesting problem, he might take to you if he feels that you respect him. This is about building rapport. (note this is not sucking up - this is something else ) Be prepared to leave if you have to, so that way you are not needy or emotionally trapped. This will help with keeping your head in meetings.
0.666667
When presenting the status of your project: Do not mention the other person
Open problems/questions in representation theory and around?
What are open problems in representation theory? What are the sources (books/papers/sites) discussing this? Any kinds of problems/questions are welcome - big/small, vague/concrete. Some estimation of difficulty and importance, as well as, small description, prerequisites and relevant references, ... are welcome. To the best of my knowledge, there are NO good lists of representation theory problems on the web. E.g. the sites below contain lots of unsolved problem in other areas, but not in representation theory: http://en.wikipedia.org/wiki/Unsolved_problems_in_mathematics http://garden.irmacs.sfu.ca/ http://maven.smith.edu/~orourke/TOPP/ MO questions also discuss other fields, but not representation theory: What are the big problems in probability theory? What are some open problems in algebraic geometry? What are some open problems in toric varieties? More open problems Open problems with monetary rewards Open problems in Euclidean geometry? Open Questions in Riemannian Geometry What are some of the big open problems in 3-manifold theory? Open problems in continued fractions theory
There are many open problems on modular representation theory of finite groups. There is a well-known list of problems of R. Brauer which date to around 1960, about ordinary and modular representations of finite groups. There are other major conjectures ( Broue's Abelian defect group conjecture has already been mentioned in comments). There are Alperin's Weight conjecture, Dade's Projective Conjecture, the Isaacs-Navarro conjecture, and several related conjectures. This is only the tip of the iceberg (and only in one corner of representation theory).
1
Modular representation theory of finite groups
Illustrator, snap to guide
I'm attempting to place the end of a line segment at the intersection of a circle and a guide in Adobe Illustrator: I'm expecting the end of the line to snap into place at the intersection, but with no luck. Smart Guides and Snap to Point are turned on. Here is a short video of the problem: http://cl.ly/K3tr I'm using this guide/tutorial in order to "...connect a tangent line to a curved segment in order to create a smooth geometrically correct transition from a curve to a straight line..." - Tangent Lines to Curved Segments Is anyone familiar with this method that could shed some light on why it's not snapping? Thank you!
I think it's just the poor performance of snapping. Heck, even smart guides are often "off" by a few pixels. If you click-drag on the end anchor point you'll have better luck with it snapping to the intersection. Snapping is often dependent upon the position of the cursor. However, Smart Guides will never show that intersection. Honestly.... bug in Illustrator. Snapping/Smart Guides have been pretty bad the last few versions.
1
Snapping is often dependent on the position of the cursor
Can Noether's theorem be understood intuitively?
Noether's theorem is one of those surprisingly clear results of mathematical calculations, for which I am inclined to think that some kind of intuitive understanding should or must be possible. However I don't know of any, do you? Independence of time &lt;=> energy conservation. Independence of position &lt;=> momentum conservation. Independence of direction &lt;=> angular momentum conservation. I know that the mathematics leads in the direction of Lie-algebra and such but I would like to discuss whether this theorem can be understood from a non-mathematical point of view also.
Here are my two cents. Read the proof it will help you understand and build intuition because it is constructive. It explicitly shows you what the conserved quantity is, given the group of symmetries. If it is too hard to follow and you can't see the forest because of the trees, try a few examples it should help. Also here is a link that may help a bit. http://math.ucr.edu/home/baez/noether.html
1
Read the proof it will help you understand and build intuition
Explorer View on the Wiki Section of SharePoint
Does any one know if you can open a Wiki site page on SharePoint in Explorer View? If not is there any way around this or will I need to create a new wiki/section to enable me to complete this task? My computer system is Windows 7 and I am currently using IE 8 to enable me to open Explorer View on other sections. The only section which won't do it is the Wiki.
"Wiki" can be two things in SharePoint: wiki pages in a wiki library Enterprise Wiki site There are many differences between the two, but with regards to "open in [...] Explorer View" both are a resounding "No". Explorer View can show list columns with some data types like numbers and text. Wiki pages can have text, images, tables and web parts and other rich elements embedded. A wiki page can contain one or more of each of these elements. These items will not show as columns in an Explorer view. You need to learn about, and understand, the difference of data types that SharePoint captures. Wiki pages cannot easily be translated into a grid view. Enterprise Wiki pages are a different chapter altogether. They are a publishing content type, and you will need to understand publishing content types to deal with this data. Edit: You can add custom columns to a wiki library to categorise items. You can then build a view that shows the page title and the category column. Switch to the Data View to bulk edit the page properties.
1
"Open in [...] Explorer View"
What is the best way to paste code into a Trello card?
When I try to paste code in Trello, I get very weird formatting after saving, but it seems like it does format for code, I just can't get it to work right. What is the best way to paste code into Trello? Currently I'm just putting links to Gist, but I would prefer to just paste it straight in there.
Finally found the answer here: http://daringfireball.net/projects/markdown/syntax#code using markdown is outdated, its not as easy as just using Gist haha, think I'll keep that route... they should really work on their tools.
1
Markdown is outdated, not as easy as using Gist
Doctors working on Shabbat
What are some general guidelines regarding the halakhic permissibility for Jewish doctors to work on Shabbat? I know that saving lives generally overrides Shabbat, but I am curious about less black-and-white situations that may occur on Shabbat, such as having a shift where one must be in the hospital or be on call, receiving medical training, etc. Also, in a practical halakhic sense, are there any situations in which the appropriateness of violating Shabbat would depend on whether the patients are Jewish? I'm sure that these are not simple questions and that there are likely multiple opinions on various issues, but some insight into this topic would be welcome.
First of all, being a doctor and healing the sick is not considered a Malacha (work on Shabbos). It is considered a Chachma, a gift, not a trade. See Rambam Hichos Refuah. There is a fantastic Steera (contradiction) found in the Rambam which points this out. In Hilchos Shabbos, the Rambam holds that one is prohibited from carrying an amulet, since (medically speaking) they are of no use. However, in Hilchos Refuah, Rambam states that one can use (carry) an amulet since the ill person believes in this amulet (an amulet must be considered Mumcha, one which has been proven by healing the sick already), and healing is 60% in the mind, therefore the ill will be healed. As you can hear, the Rambam didn't sound like he was in favor of using tricks or the like. But if it works, any port in the storm! Next question, is one allowed to transgress the Shabbos to heal a Goy? Technically no. However the Chachamim stressed that if they knew this they would kill us, therefore it is in our best interest to heal them ("משום איבה"). I fear to add this but Halacha is just that. So, can one heal an animal on Shabbos? Basically no. However, one can make the animal comfortable until a doctor can administer to the animal. There is a wonderful book Sefer Tsar Balay Chaim by R' Itchak Nachman Eshkoli written in the last 10 years which deals with anything &amp; everything to do with animal suffering. My son-in-law used this while writing a paper on Feeding Animals on Shabbos while in YU. I highly recommend this sefer to anyone who has an animal, especially since Tzar Balay Chaim is a Torah Issur and it is important to know what one can or shouldn't do. Medical Halacha is well researched by the likes of Dr. Fred Rosner, Rabbi Dr. Abraham S Abraham (Nishmas Avraham), and many more. There are many Rabbis who write on medical halacha. Although that is a subject for another time indeed!
1
Can one transgress the Shabbos to heal a Goy?
Is it Possible to Use Histogram Facet or Its Curl Response in Kibana
Is it possible to use a manually created histogram facet (or the results of its curl request) like this one in a Kibana dashboard: { "query" : { "match_all" : {} }, "facets" : { "histo1" : { "histogram" : { "key_script" : "doc['date'].date.minuteOfHour * factor1", "value_script" : "doc['num1'].value + factor2", "params" : { "factor1" : 2, "factor2" : 3 } } } } } Thanks
It looks like it will be supported in Kibana4, but there doesn't seem to be much more info out there than that. For reference: https://github.com/elasticsearch/kibana/issues/1249
0.888889
Kibana4 will be supported in github.com
What introductory book on Graph Theory would you recommend?
I'm looking for a book with the description of basic types of graphs, terminology used in this field of Mathematics and main theorems. All in all, a good book to start with to be able to understand other more complicated works.
1) Harary's book is great - and he's a hoot. 2) Ringel and Hartsfield's Pearl in Graph Theory is great, lovable and has lots of pictures and excellent exercises - ideal for an undergrad class that's not geared towards prepping students towards a grad course. 3) Gross and Yellen's book is probably the best introduction if you're a "mature" math reader and want to really learn stuff - this is what I would buy. 4) Applied Combinatorics by Tucker is phenomenal - but graph theory is only 4 chapters out of 11. Nonetheless, I'd strongly consider this one.
1
Applied Combinatorics by Tucker is phenomenal - but graph theory is only 4 chapters out of 11.
What is the best place to start Warhammer 40k?
I've got three omnibus books containing 9 total Warhammer 40,000 stories. Before I mention which ones I've got, which book would you recommend as a good place to start the series?
I have only recently started to read Warhammer 40k. I have read the first two books in the Horus Heresy and although at first I didn't understand some things it then later clarifies. By half way through Horus Rising (the first one) I had a pretty firm grasp on the Warhammer 40k world and found the books easy to understand and read.
0.888889
Warhammer 40k is the first book in Horus Heresy
Squid proxy: how to link inbound IPv4+port to outbound IPv6
I'm trying to setup a squid proxy that will accept multiple inbound connections on one IPv4 across a range of ports, and for each port connection to connect out on a unique IPv6 address. I've named each port connection, and designated an ACL based on the connection name, and then I've tried to define an outgoing IPv6 for each. The script below works, in that it accepts connections on the different ports and routes out via IPv6 however, all outbound connections use the same IPv6 (user5) even though there are different ipv6 defined per user - the wierd bit is that even if I comment-out that user5 IPv6 from squid.conf, it still gets used for outbound connections. Can anyone see whats wrong here? (using Squid 3.1.1 on Centos 6 64bit) ## declare an acl that is true for all ipv6 destinations acl to_ipv6 dst ipv6 ##tell Squid to listen on sequential ports and to designate a name for each inbound connection. http_port 241.xxx.xxx.101:3128 name=3128 http_port 241.xxx.xxx.101:3129 name=3129 http_port 241.xxx.xxx.101:3130 name=3130 http_port 241.xxx.xxx.101:3131 name=3131 http_port 241.xxx.xxx.101:3132 name=3132 ## designate acl based on inbound connection name acl user1 myportname 3128 acl user2 myportname 3129 acl user3 myportname 3130 acl user4 myportname 3131 acl user5 myportname 3132 ## define outgoing IPv6 per user tcp_outgoing_address [2001:::::::ipv61] user1 tcp_outgoing_address [2001:::::::ipv62] user2 tcp_outgoing_address [2001:::::::ipv63] user3 tcp_outgoing_address [2001:::::::ipv64] user4 ##tcp_outgoing_address [2001:::::ipv65] user5 ##this last IPv6 always gets used for all outbound connections, even if commented out
In Squid 3.1 you need the to_ipv6 directive after each tcp_outgoing_address line. If you upgrade to 3.2 you won't encounter this problem. Reference: http://www.squid-cache.org/Doc/config/tcp_outgoing_address/
1
In Squid 3.1 you need the to_ipv6 directive after each line
Is "either you or [third-person]" followed by a singular verb or a plural verb?
Or, put in examples: which of the following is grammatically correct? Either you or your sister is going to have to do the chores. Either you or your sister are going to have to do the chores. The second option comes off as really strange; am I right to say that the first is grammatically correct because "is" directly follows "your sister" as opposed to "you"?
In short, it is best to recast the sentence. According to the 3rd edition of Fowler's Modern English Usage (R.W. Burchfield ed.), the verb should follow the number of the first element of a double subject if its elements are coordinated by or. Since the first element is "you" here, it should be "are"; but Burchfield seemed to be thinking rather about whether to use plural or singular in cases like "neither my opinion nor yours matters in this company", where both elements of the subject are singular 3rd person—not so much about cases where each element would require a different form. About double subjects coordinated by "and", he says that they should normally take a plural verb, unless they are so strongly connected that they may be regarded as one in thought, in which case singular is also possible. He mentions "a certain cynicism and resignation comes along with the poverty of Italian comedy" as a good example. It seems Burchfield, otherwise a fine chap, is skirting the issue. Credit must be given where it is due: the real Fowler did find the courage. In the 1st edition, he advises the following options, "in order of merit" from top to bottom: A. Recast the sentence by substituting a modal verb: Either you or your sister will have to do the chores. B. Recast the sentence by ellipsis and rearrangement: Either you are going to have to do the chores or your sister. C. Have the verb agree with the element nearest to it: Either you or your sister is going to have to do the chores. After all these years, Fowler never ceases to amaze with his sense of style combined with common sense. I wish I could write like him—such clarity and vigour. If anyone knows of a modern incarnate, do let me know; he is not always up to date at present (...), and Burchfield does not have his great style.
1
Fowler's Modern English Usage: recast the verb by substituting a modal verb
Building hand strength for when tapping on the guitar
I've been practicing on my tapping ability. An example of what I mean by tapping can be viewed here, notice how the right hand hits the strings. I'm currently using all four fingers excluding the thumb to tap the guitar. I find my pinky is not as strong as my other fingers when it comes to applying the appropriate strength on the string. What are some exercises I can do to increase my overall finger strength when tapping? More tapping? As a sidenote, I've noticed that I use the momentum of my forearm to help apply the appropriate pressure on the string I'm trying to hit. If I remove that momentum and only use force created by the movement of my finger the pressure is significantly less. I was hoping these exercises would also help me to not rely on my forearm as much.
From my experience &amp; from forum surfing, I can confidently say that your pinky finger will always be weaker than the others. I have tried the following techniques and think that they can be used to help bridge the gap for you (aside from unfocused tapping): Tap softer with the other fingers and tap harder with the pinky finger, slowly and cleanly. Build up speed keeping the sound clean. Use hand / finger grips to exercise the fingers, focusing on the pinky. (Gripmaster, Planet Waves, Xtensor, etc.) Use finger weights. Place weights on pinky to make it work harder, which will in turn build strength. Start off light, slow, and clean -- gradually increasing speed. After a week or so, increase weight and start back slow. You can alternate between increasing speed and or increasing weight, depending on what you want to train. If I were you, I would invest in the finger weights. I have found them very helpful. You actually feel faster and stronger after playing with them on and then removing them and playing normally. Note: I do not consider myself to be an expert guitar player.
1
Use finger weights to help bridge the gap for your pinky finger
Number Slider for exposed filter using Drupal 6
I need to expose the number fields in views with the range slider, for example : Min- 421 and Max 780. I found this slider Field module, but it support only for Drupal 7. any idea for Drupal 6 ? I don't want to use Better Exposed Filter module, because the plugins mentioned in the documentation are not there and hard to configure the options. Looking for any other alternate way.
Better Exposed Filters has that functionality built in ... What else can I do with BEF? Use the jQuery Slider widget for greater-than, less-than or in-between types of filters I've never used it for D6 but the project page doesn't mention the slider being missing from that version or anything so it should be there.
0.888889
What else can I do with BEF?
How does our work on this earth transfer into the new earth when God returns?
I recently read Every Good Endeavor by Tim Keller and also Surprised by Hope by N.T. Wright. Both are amazing books, focused on the resurrection theology that God will raise up a new heaven and a new earth, and we will dwell in the presence of God, not just sitting around, but living life with new redeemed bodies and doing redeemed work that isn't corrupted by sin. The ideas of heaven are very exciting: that we won't be just sitting around playing harps, but will live much like we do currently, although without the corruption of sin and in the presence of God. Another exciting theme in these books is that the work we do here matters towards the new heaven and new earth, and will be redeemed and made full when God comes. While this is exciting to me, it is also very confusing. Can anybody shed some light into how the work we do here transfers to Gods kingdom, even if it is "secular" in nature?
The works themselves, the particular activity we engage in, do not seem to matter as much as the faithfulness to the Lord with which we render the works. Matthew 24:45-51 shows us the outcome of the work. One servant found his usefulness recalled to mind when the master returned after a long while, and he was rewarded with greater responsibilities. But if that same servant had been found untrustworthy, then he would have been disqualified from any such reward. Note that the same servant is in view; we may prove trustworthy or not in the end; there is no guarantee that we'll reign with Christ; the trustworthiness of our character matters. Matthew 25:14-30 shows us the same situation. The two servants who were faithful in what they did received greater responsibilities. The one servant who did not pursue his duties like the other two was rejected. The idea is that if we are able to follow the Lord's will honorably when we cannot see Him, then we would be able to be trusted to follow Him in the next life with whatever commensurate responsibilities He gives us. See also Luke 16:11-12: "If therefore ye have not been faithful in the unrighteous mammon, who will commit to your trust the true riches? And if ye have not been faithful in that which is another man's, who shall give you that which is your own?" God wants to give us something to do in the future kingdom, but He will give it to those who have been found to be of such proven character that it can be entrusted to him/her. This is not a strange or weird idea. Many well-run businesses operate this way, rewarding the top performers (alas, not all governments are). Luke 16:10 tells us, "He who is faithful in what is least is faithful also in much; and he who is unjust in what is least is unjust also in much." Do not despise the day of small things; God sees our work as serving Him or serving something else.
0.777778
What is the true riches of a servant?
Is it ethical to profit by having my students buy my textbook?
This question was suggested to me by How can I sell my text book to my students in e-book format? which asked about the practicalities, but attracted many comments about the ethics. So this question is to ask about the ethics directly. Suppose I have written and published a textbook, and I want to use it as the text for a course I am teaching. I receive royalties from each copy of my book that is sold, so if my students are required to buy my textbook for the course, I will make some money. Is it ethical to do so? Well-reasoned opinions would be useful answers, but even more useful would be pointers to institutional policies, professional codes of ethics, etc, that address this issue. Of course, there are many ways to avoid profiting from the sale of my book to my students. If my contract with my publisher allows it, I could distribute PDFs to my students, or have the university bookstore print out copies and sell them at cost. Another approach I've heard of is to compute how much I earn in royalties on each copy, and refund that amount from my pocket to each student who buys a copy. Or, use my royalty earnings to buy pizza for the class. Certainly these are nice gestures, but I would like opinions on whether they are ethically required. Edit: To address some questions that have arisen in the comments: This question is hypothetical. I haven't published any textbooks myself and have no immediate plans to do so. In any case, my personal preference would be to make the book available to students for free, if at all possible. So I've phrased this question in the first person for rhetorical convenience only. I had intended the question to be only about the potential financial conflict of interest that could arise if I make money by assigning my own book. Some of the answers feel that it is improper for me to assign my own textbook at all, whether I make money or not, but I don't think this point of view is prevalent within the academic community. If it happens that my book (as a pithy but now-deleted comment put it) "blows", I think most would agree that my decision to assign it is pedagogically unfortunate, but not unethical. I don't literally mean that students would be required to buy the book, only that they'd be expected to have it. I might assign readings or homework problems from the book, so that the student needs access to the book in order to do them, but they could certainly achieve this by getting a used copy or borrowing from a friend. But probably most students would buy new copies anyway, since that is the most convenient way.
Short answer: I think it is neither ethical nor good (in terms of education, independent of ethics) to force students to use your textbook. (Assuming that we are talking about a "normal" lecture, as opposed to a workshop about your book.) Long answer: I see 3 different (but connected) difficulties here. None of them needs to be a problem, but together, they can trap the students. requiring a particular textbook: to me this is less of an ethical problem if it doesn't boil down to forcing the students to buy that particular book. Nevertheless, I think it preferable from an education point of view to teach students that they left the kind of school where exactly one solution exists, and now they are in a world with lots of sensible alternatives. Giving recommendations* (plural!), IMHO it is a most important point to make that the library holds even more useful books [also on that topic]. more or less forcing students to buy a textbook (Recall that the origin of "lecture" is that a (text)book was read to the students. So historically, the lecture was a solution to the problem that books were too expensive for students to buy.) I don't see why buying the textbook is necessary. Even if book and lecture are (naturally) close. I might assign readings or homework problems from the book, so that the student needs access to the book in order to do them Why would that be: Is is that difficult to prepare a slide of the homework problem which is displayed at the end of the lecture or a pdf that can be downloaded? Reading: I have to say that at university I've never experienced assigned reading from a textbook. So my question to you is: is it really necessary to assign reading chapter 7.4 as opposed to assign preparing the principles of pH electrodes? Also, I've seen reading materials for download. Making small parts of the book available to the students is probably possible even if the contract with the publisher doesn't let you distribute pdfs to the students. At least, e.g. in Germany, it is even possible to hand small parts from any book (not only yours!) to the class for teaching purposes. For the self-study aspect of the textbook, there is the textbook collection of the library. The university libraries I know have sensible numbers of the important textbooks to be borrowed by the students plus a number of copies that stay in the library so they are always accessible. Are the books there really not sufficient? If so, why not? Why are the important books not there? How can books be bought? (How to get your book into the collection is part of the next point:) Possible conflict of interest because it is your own textbook. This is the interesting part. But, if you take care of the first two problems, there is already much less space for an actual conflict of interest (≈ a real problem for the students) here. Or, taking another point of view, I perceive taking unfair advantage of the position*** as a symptom of (un)ethical behaviour which is closely bound to the whole character. In that I perceive it less of a single problem that is solved or not by a particular line of action on this point but rather a problem that appears with some people and not with others. In yet other words, people who take advantage of their position tend to do that in more ways than just this (e.g. in the combination of my three points - at which point @JeffE probably recommends to run). The formal action of not requiring their own textbook doesn't help much. Students will conclude from the general reputation/perception of taking unfair advantage that the book is required - whether it is stated openly or not. I guess it is one of the topics where those who do worry whether what they do is ethical are the ones who don't need to worry (because they do act ethically) - it would be far more important that those who don't would start to worry... Whether to donate copies of your own textbook to the library, make a donation that reimburses the library for your royalties, or convince the library to buy it like any other book, and/or whether and how you want to reimburse students is IMHO unanswerable as a general question. I think valid points can be made for and against** each of the options here. Good and sensible decisions will depend a lot on the particular circumstances and even more on the personality of the professor. Side note: Or, use my royalty earnings to buy pizza for the class. I object to this option on the following ethical grounds: If my problem is that I'm too poor to buy textbooks, I don't want to spend money on pizza but would rather like to save that money towards the next textbook. * A professor not recommending his own textbook sounds about as convincing to me as a vegetarian running a sausage factory. ** Here's the advocatus diaboli against each of the points: Donating books to the library? Someone is buying fame! Reimbursing the royalties - same as above, but more greedy (or the one above was more desperate for fame...) Convinced some committee to buy the books? Surely there is a textbook-buying circle emerging: You scratch my back and I'll scratch yours. reimbursing students who buy the book: that's an obvious attempt to whitewash the reputation and so on *** As long as you do not take advantage of your situation, the conflict of interest is at most your problem (i.e. you are worried). If you take unfair advantage, the students have a problem.
0.888889
Why is it necessary to assign reading from a book to the library?
How to Solve the "Unidentified network" in Windows 7
Possible Duplicate: Windows 7 unidentified network direct cable connection I connect the internet through Ad-hoc network, My machine uses win7 and another uses winows xp, There's no problem when I connect the XP machine, but if i disconnect and reconnect the net, then my local network is marked as "Unidentified network",unless restart the XP machine, I don't know why?
Could you clarify which computer has the internet connection? If the Windows 7 computer is the one sharing the ad-hoc network to the Windows XP computer, you might want to look into using Connectify instead of running an ad-hoc with internet connection sharing. Connectify uses windows 7's built-in support for emulating an access point to allow you to share an internet connection with just a laptop wireless card, but appear as a regular AP, not an ad-hoc. It is much less buggy than ICS, in my experience. I haven't used it since the beta, but it's free, and I recall it working pretty well even back then.
0.888889
Connectify uses windows 7's built-in support for emulating an internet connection to the Windows XP computer
Creating a static C struct containing strings
I'm trying to create a dynamic library in Rust that exports a struct as a symbol that will be loaded into a C program via dlopen(). However, I'm was running into some segfaults when accessing the second string in the struct, so I made a small test program to try figure out what I'm doing wrong. This is the Rust code (test.rs), compiled with "rustc --crate-type dylib test.rs": #[repr(C)] pub struct PluginDesc { name: &amp;'static str, version: &amp;'static str, description: &amp;'static str } #[no_mangle] pub static PLUGIN_DESC: PluginDesc = PluginDesc { name: "Test Plugin\0", version: "1.0\0", description: "Test Rust Plugin\0" }; and here is the C program that attempts to load the library (test.c), compiled with "gcc test.c -ldl -o test": #include &lt;dlfcn.h&gt; #include &lt;stdio.h&gt; typedef struct { const char *name; const char *version; const char *description; } plugin_desc; int main(int argc, char **argv) { void *handle; plugin_desc *desc; handle = dlopen("./libtest.so", RTLD_LOCAL | RTLD_LAZY); if (!handle) { printf("failed to dlopen: %s\n", dlerror()); return 1; } desc = (plugin_desc *) dlsym(handle, "PLUGIN_DESC"); if (!desc) { printf("failed to dlsym: %s\n", dlerror()); return 1; } printf("name: %p\n", desc-&gt;name); printf("version: %p\n", desc-&gt;version); printf("description: %p\n", desc-&gt;description); return 0; } This is the output: name: 0x7fa59ef8d750 version: 0xc description: 0x7fa59ef8d75c As you can see, the address of desc->version is actually 0xc (12), which is the length of the first string. So it looks like the struct that gets packed into the library also contains the string length after the memory address. Am I using the wrong string type here? As you can see I had to also make the strings NULL terminated manually. I tried to use the CString wrapper but that does not seem to work in this case ("static items are not allowed to have destructors"). I'm running the latest Rust nightly on Linux: $ rustc --version rustc 0.12.0-pre-nightly (f8426e2e2 2014-09-16 02:26:01 +0000)
The short answer is that you can't statically allocate such a struct. Future Rust will probably gain this ability. What you can do, is statically allocate a struct that contains null pointers, and set those null pointers to something useful when you call the function. Rust has static mut. It requires unsafe code, is not threadsafe at all and is (to the best of my knowledge) considered a code smell. Right here I consider it a workaround to the fact that there is no way to turn a &amp;[T] into a *const T in a static. static S: &amp;'static [u8] = b"http://example.org/eg-amp_rust\n\0"; static mut desc: LV2Descriptor = LV2Descriptor { amp_uri: 0 as *const libc::c_char, // ptr::null() isn't const fn (yet) }; #[no_mangle] pub extern fn lv2_descriptor(index: i32) -&gt; *const LV2Descriptor { let ptr = S.as_ptr() as *const libc::c_char; unsafe { desc.amp_uri = ptr; &amp;desc as *const LV2Descriptor } } answer copied from duplicate question
1
Statically allocate a struct that contains null pointers
Mutually generics
Given posets $P,Q\in M$, I would like to know under what circumstances there are mutually generic filters $G\subseteq P$ and $H\subseteq Q$ (generic over $M$). Also, what are the characterizations of mutual genericity? And finally, what can we say about the relation between $M[G]$ and $M[H]$ in that case? I have a slight difficulty finding references to the notion and properties of mutual genericity (whatever they are).
Another fact to add to Joel's list, one which I found surprising when I first came across it, is that adding a single Cohen real adds a perfect set of reals such that any finitely many are mutually generic over each other. To see this simply consider the trace of a Cohen real on the members of an almost disjoint family and use the theorem Joel quotes about products.
1
Add a single Cohen real to Joel's list
<img src="{{media url="someurl"}}"> results in broken url & wont get parsed
I'm having some problems within the product description as my client wants to use the wysiwyg-editor and its image upload features. Sadly all inserted image variables won't get parsed correctly so the output is something like this: &lt;img src="{{media url="someurl"}}"&gt; which is in fact the same as the raw input. Any suggestions how to fix this? I obviously don't want to change all image links to something hardcoded even if my client has just around 100 products ;) (Magento 1.7.0.2)
First of all, there is no image directive. To include files from the media directory, use the media template tag (double quotes are fine): &lt;img src="{{media url="wysiwyg/img.ext"}}" /&gt; If you see the markup as is in the frontend, this may be caused either by the WYSIWYG editor or by your theme, converting HTML special characters to HTML entities, e.g. &lt; becomes &amp;lt;. You may check the description stored in the database. If characters are already converted there, it's likely an issue during collection of data. Otherwise check your frontend display.
1
If you see the markup as is in the frontend, check the description stored in the database
Unusual Differential Equation
I have the differential equation $$y''y+n(y')^2=0\tag 1$$ I haven't found any references to equations of this type by searching. Does anyone have a suggestion as to how to proceed? It comes about from the following progression: $$y=(y')^n-\frac 1n\tag 2\\ y'=ny''(y')^{n-1}\implies1=ny''(y')^{n-2}\\ 0=n(n-2)(y'')^2(y')^{n-3}+ny'''(y')^{n-2}\\ 0=(n-2)(y'')^2+y'''y'$$ Taking $y$ in place of $y'$ and $n$ in place of $n-2$ I get the form shown in $(1)$. Are there any good ways to solve any of the other intermediate forms, or even the initial form shown in $(2)$? Further constraints: $y(0)\approx 1.27$ is an otherwise-unknown constant that I am attempting to build an expression for. The initial problem is the recurrence relation with $a_1\approx 1.27$ the unknown constant and $$a_{n+1}=(a_n)^{n+1}-\frac 1{n+1}$$ with the additional constraint $\lim_{n\to\infty}a_n=1$.
hint: as long as $yy' \ne 0$ you can divide through by it, giving: $$\frac{y''}{y'} + n\frac{y'}{y} = 0 $$ giving $ln\; y' = -n \;ln \; y + c$
0.555556
as long as $yy' ne 0$ you can divide through by it, giving: $$fracy
Importing data from an XLS File using ADO and Delphi
I want to import some data from an Excel file ( xls ) by using TADOConnection and TADOTable. I connect to file with no problem, but when i open TADOTable some fields have ftFloat datatype because their values in excel file are numeric, but their values are not a number! I want all fields of TADOTable (columns of Excel file) to have ftString datatype. I set the types of columms in Excel file to Text but no changes affected! How can I do this?
I am guessing you have a majority of columns that may appear to be numeric, but also some that are pure text. ADO effectively ignores the column type when importing an Excel. Instead, it guesses the column types, as stated in this MSDN link: A Caution about Mixed Data Types As stated previously, ADO must guess at the data type for each column in your Excel worksheet or range. (This is not affected by Excel cell formatting settings.) A serious problem can arise if you have numeric values mixed with text values in the same column. Both the Jet and the ODBC Provider return the data of the majority type, but return NULL (empty) values for the minority data type. If the two types are equally mixed in the column, the provider chooses numeric over text. One way to load all fields as strings is to use the IMEX extended property in your connection string like following: Provider=Microsoft.ACE.OLEDB.12.0;Data Source=c:\myFolder\myExcel2007file.xlsx; Extended Properties="Excel 12.0 Xml;HDR=YES;IMEX=1"; Setting IMEX to 1 makes ADO treat all columns as text, as stated in following ConnectionStrings page: Use this one [IMEX=1] when you want to treat all data in the file as text, overriding Excels column type "General" to guess what type of data is in the column. You can find more information about the IMEX property in this SO question. Update: The field data type retrieved using this would be ftWideString.
1
ADO correctly ignores the column type when importing an Excel
Does using a Power-attack while sneaking increase your chances of being detected?
According to the Skyrim Wiki, "daggers are silent, meaning that enemies are not alerted to your dagger swings, even missed ones." However, there is generally a sound (grunt or guttural throat noise) to go along with a power attack animation. Is this noise just for effect (like the passive spell-in-hand glow) or is the sound audible by potential victims/enemies?
I think the power attack is just as silent as a normal swing, the grunt/yell is purely for effect. I went up behind an enemy and whiffed a bunch of power attacks on purpose and he had no reaction whatsoever, then I finished him off with a power attack and a nearby patrolling enemy didn't react. I have to add an addendum to this: Power attacks can sometimes push your character forward a little bit on the swing, and this can cause you to be detected before the attack connects, making you lose the sneak attack bonus. Make sure you are standing far back enough for this to not happen.
1
Power attacks can sometimes push your character forward a little bit on the swing .
Update ExtJS Panel with HTML that will render iframe
I have an app with several tabs written in ExtJs 4. One of the tabs is just an iframe. I create it like this and it works fine. xtype: 'tabpanel', title: 'My Embedded Web Pages', items : [ { title: 'Google', html : '&lt;iframe width ="100%" height="100%" src="http://www.google.com"&gt;&lt;p&gt;Your browser does not support iframes.&lt;/p&gt;&lt;/iframe&gt;' }, ] I would like create the page Dynamically using more of an OOP design patter though by extending an Ext.panel.Panel. If I can do this I can add some more functionality ( like a basic toolbar with a back button ). Ext.define('NS.view.web_browser.WebBrowser' ,{ extend: 'Ext.panel.Panel', alias: 'widget.web_browser', title: 'Web Browser', refresh: function() { console.log('refresh'); }, initComponent: function( arguments ) { console.log('initComponent'); this.callParent(arguments); }, listeners : { viewready : function( view, options ) { console.log('viewready'); someText = '&lt;iframe width ="100%" height="100%" src="http://www.google.com/"&gt;&lt;p&gt;Your browser does not support iframes.&lt;/p&gt;&lt;/iframe&gt;'; //I'm assuming 'this' is the panel this.update( Ext.util.JSON.encode( someText ) ); } } }); However, this is not working. I expect its how I am trying to cram the html into the panel but am not sure. Any help appreciated.
Did you try out the ux: miframe.js? The documentation is available here. I have been using it for embedding iframes in Panels for quite some time with ExtJS 3.x. I don't know if it has been ported for ExtJS4 though.
0.888889
ux: miframe.js
Supposedly separate NSArray being contaminated by editing a copy
I have a TableView with some TextFields in. The values of said TextFields are linked to certain positions in a 2D Array (NSArray of NSMutableArrays). An initial clean array is defined as so: self.cleanEditContents = @[ [@[@-1,@-1] mutableCopy], [@[@0,@80] mutableCopy], [@[@0,@500] mutableCopy], [@[@-1,@-1] mutableCopy], [@[@-1,@-1] mutableCopy], [@[@-1,@-1] mutableCopy], [@[@-1,@-1] mutableCopy], [@[@-1,@-1] mutableCopy], [@[@-1,@-1] mutableCopy], [@[@-1,@-1] mutableCopy], [@[@-1,@-1] mutableCopy], [@[@-1,@-1] mutableCopy] ]; This array is supposed to be kept separate from the 'active' array, so that the active array can be reset on a button press. I use self.editContents = [self.cleanEditContents copy]; to set the active array both directly after the clean array is populated and on a button press. There is a problem where even though I reset the array and call reloadData and setNeedsLayout (overkill? probably), the numbers don't reset. I tried outputting the values of the same position in both arrays and it turns out that any changes made to the active array contaminate the clean array.
It sounds like you expected a deep copy. The copy method does a shallow copy, that is it just makes a copy of the array and not of the items in the array. So when you do [self.cleanEditContents copy] the new array shares exactly the same items as the original. If you need a deep copy (or maybe just a 2-level copy) you need to code it yourself.
0.888889
The copy method does a shallow copy of the array
Hide microphone button Android virtual keyboard
I wanted to know if is it possible to hide the microphone button (speech-to-text) in Android Virtual Keyboard programatically. I know I can disable this option through device settings, but I don't want the user to use this feature in my application independently of his/her settings. I mean i want to force this behaviour inside my app. Thanks in advance, Demian
Here's how you do it: android:privateImeOptions="nm" - nm stands for No Microphone.
1
android:privateImeOptions="nm"
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.
Brian Hooper: I had a look via Google for more information on this point, but, try as I might, I couldn't find anything. I remember reading an article on the difference between "Launching the lifeboat may have saved lives" and "Launching the lifeboat might have saved lives" but I can't remember where so that doesn't help much as a reference. Nohat: I would say may/might + perfective (have) has a different meaning than the “concession” meaning here. “Launching the lifeboat may have saved lives” implies the lifeboat was launched, whereas “… might have saved lives” implies it wasn’t launched. ============== I'm not completely sure of how things operate here at Stack Exchange. I'm not trying to step on anyone's toes, nor am I trying to be mean or snide. I don't know if this is the "proper" manner of addressing this. It seems to me that Comments is meant for just that, a short comment. This, to my mind, requires much more discussion, [and I hope it doesn't end here. Is there not a venue for advanced discussion?], hence more needed space so I've opted for a Your Answer. And I believe my comments are directed to answering the question. With respect, there's no way we can make the assumption that there is a "rule" that will describe for all situations/scenarios that launching or not launching a lifeboat [or similar situation] may or may not or might or might not have saved lives or told or implied to us whether or not a lifeboat was launched. There are scenarios where both 'may' and 'might' are used with their normal epistemic [level of certainty] meanings to speculate on past time events just as they are used to speculate on future or present condition events. Let me create a scenario. This is a time before ship to shore radios, radar, etc. were available. A ferry is about to leave port. A person on the dock remarks, "That boat might sink". That is based on their personal feeling according to whatever facts, feelings, superstitions that person holds that has influenced their choice of 'might'. A worker who has been involved in maintaining the ferry says, "I warned my superiors. That ferry may sink". The owner says, "That ferry will never sink" [Where have we heard that before?] A foreman says in a suicide note, "I have to address this, ... to set the record straight. We did our best but the owners wanted to save money. That ferry probably will go down on this trip." Other people, for whatever personal reasons they have, even a premonition, could choose, "The ferry will almost certainly sink" / "The ferry may well/might well sink". The wide variation, which ranges from zero percent chance [owner] to say, a old time "terrorist" who has made some effort to sink the boat, conjecturing "That ferry will go down", does not mean that anyone of them is right before the boat leaves port. That's what modals allow us to do, speculate on events, conjecture, and it doesn't matter if the event is past, present or future. There is a terrible storm, the ferry is overdue. Those same people, probably now joined by countless others, all weigh in with their OPINIONS because, they have nothing else to go on. Remember, this is a time before radios, radar, etc. 1)The ferry went down. 2) The ferry must have sunk. 3) The ferry probably/likely sank. 4) The ferry may have gone down. 5) The ferry might have gone down. 6) The ferry didn't sink. Again, at this point, with the available information, all are opinions, even 1) and 6), though one of them will, maybe, probably never, eventually be confirmed as fact. But look at the modal perfect examples for that's the point I'm trying to get across. Sometimes, 'might' just means what it most often normally means, "there's a tiny to small chance that X will occur/is occurring/has occurred". The ferry, I'm sad to report, [this is my scenario] went down. The people of that time only know this because no trace was ever found of the boat, the people or the things on the boat. No lifeboats were ever launched. There is now rampant speculation among the population on whether a or some lifeboats would have saved lives. 1) Lifeboats would have saved lives. 2) Lifeboats almost certainly would have saved lives. [Note that 'must have saved lives', epistemically equal to 'almost certainly would have saved lives' isn't possible here] 3) Lifeboats probably/likely would have saved lives. [Note that 'should have saved lives', is strange here even though 'should' is epistemically equal to 'probably/likely'.] 4) Lifeboats may have saved lives. 5) Lifeboats might have saved lives. 6) Lifeboats wouldn't have saved lives. But all these are still simply personal opinions, not statements of fact. Look at the 'may have' and 'might have' parts. There's no implication in the 'might have saved lives' opinion that lifeboats were launched. There's a fact that dismisses any such implication. No lifeboats were launched. Certainly, there are situations where 'might' and 'may are used to effect a meaning other that their basic epistemic/level of certainty meanings. I noted this with respect to 'might' in my previous post. We know that there are meanings for 'may' and for 'might' that are sometimes used to make a concession and sometimes, to angrily suggest [sometimes using understatement] that something should have been done. For this scenario, "You might have [at the very least] sent out one search boat!" What nohat stated was true, but it's not true for all situations, not even for most; I'd say that its true for a small portion of 'might have + PP' situations. I'm sorry that this is so long, but if you'll bear with me. I've read often this idea presented by nohat. It is similar in nature to the thought used to prohibit "If S was" as a counterfactual use. Somebody, sometime, noticed that "If S was" can hold the meaning of "allowing that that is true, ... ", so they errantly made a determination that that excluded the counterfactual 'was' use in "If I was you, ... ". Language is exceedingly complex and these kinds of expansive notions aren't helpful to come to an understanding of language. They have no affect on native speakers, save for the fact that the myths continue to be spread, but they have a gigantic affect on ESL/EFLs, both in terms of comprehension and production. Another of these expansive notions is the idea that 'would' is subjunctive. It is not! There are only a few examples of the subjunctive left in English and 'would' is not one of them. 'would' can be, and is often used in subjunctive uses to express subjunctive/contrary to fact ideas, but so are a lot of other modals. 'would' also hold the meaning of 100% true, "that would be Bill"; "He would, ten years later, be elected president". The original question, which I'm now pointedly getting to, [how does one illustrate a degree of embarrassment?] My parents would have walked along the Barrow likely, in my opinion, shows this same meaning of 'would', ie. 100% true. I may be wrong for this particular instance but that doesn't negate the fact that that is how 'would' is often used. Cindi noted: I think the intention is to evoke the event rather than just record it. Cindi and I disagree. She has an opinion on how 'would' is being used here that differs from my opinion. She may well be right. The speaker could be using 'would have' in the same sense as 'must have', which would express some degree of doubt. The mistaken notion that 'would' is always subjunctive/shows doubt cause these kinds of misunderstanding. I suspect that the person who asked the original question is a native speaker - I could be wrong here too but nevertheless, the answers, I feel, illustrate just how strong this notion is set even in the conscious ideas of native speakers. It's interesting to note, please do, that this notion doesn't exist in our personal natural grammars because we all use this idea of 'would' as 100% true in so many instances, without it twigging whatever conscious prescriptions we hold.
0.777778
'would' and 'might' are used to speculate on past time events .
Getting rid of "Tethering Detected" popup on Android ICS 4.0?
I just got a Samsung Galaxy S3 that runs Android ICS 4.0.8. When I connect the Galaxy S3 to my Mac laptop and use PDAnet to tether, I often get this popup on the Galaxy S3 screen: Tethering via PDAnet works great, but the popup can get annoying. I can close the popup, but it comes back a few seconds later. How can I get rid of this popup permanently?
In the end, I rooted the phone and installed the Cyanogenmod distribution in place of the cell phone carrier's OS. :)
1
Cyanogenmod distribution
How can I remove an existing Gradient Mesh from an object in Adobe Illustrator?
I just messed up using the Gradient Mesh Tool in Adobe Illustrator. I want to start a brand new Gradient Mesh on the object I messed up on and don't want to delete the original shape. How can I remove the existing Gradient Mesh so that I can start a new one from scratch?
There is no effective way to simply remove a Gradient Mesh from an existing object. So, instead you need to regenerate an object which matches the original shape but without the mesh applied. Select the Gradient Mesh object choose Object &gt; Path &gt; Offset Path enter a value of zero in the Offset field click OK This will create a new object which matches the shape of your original object. You can then simply delete the original Gradient Mesh object and start over on the new shape.
0.888889
Remove Gradient Mesh from existing object
Can I use a shock pump to inflate a tube?
I know that shock pumps are meant for high pressure applications so that they can withstand high pressures needed by suspension shocks. However, can I use a shock pump to inflate my tire in a pinch if I run out of CO2? How would it compare to a standard mini-pump in terms of volume?
A shock pump is designed to fill a very small volume of space with very high air pressures. A tire pump is designed to fill a large volume of air, to relatively low pressures, pretty quickly. You can technically fill a schrader valve tube using a shock pump, but because the volume of air for each repetition of the pump will be so low, it might take a week to fill the tire. A shock pump will not mate with a presta valve at all. On a practical level, you should use a shock pump to fill your shocks, and a tire pump to fill your tires.
0.777778
A tire pump is designed to fill a large volume of space with very high air pressures .
Need help with a subsets problem
With the set $X=\{1,2,...,n\}$, How many subsets of $X$ contain $1$? How many subsets of $X$ don't contain $1$? My work: I know a set with $n$ elements has $2^n$ subsets. The way I tackled this problem was to make a finite set like {1,2,3} and tried to make some generalization from it. I made a decision tree diagram to figure out the different subsets. If $1$ was contained in the subset, then the different subsets with $1$ would be: $$\{1,2,3\},\{1,2\},\{1,3\},\{1\} $$ which made me think there are four subsets. $2^n = 4$ which means $n=2$ but there are 3 elements in here so I generalized it as: $$2^{n-1}$$ where $n \ge 1$ such that $n \in N $ is how many subsets of X that contain $1$. And for the subsets of $X$ that don't contain $1$, the answer should come out the same as the previous question because, again, if I were to make a finite set like $\{1,2,3\}$, then the subsets without $1$ would be: $$\{2,3\}, \{2\}, \{3\}, \{\emptyset\} $$ which is also, $$2^{n-1}$$ where $n \ge 1$ such that $n \in N $ is how many subsets of X that don't contain $1$. I think it makes sense in my head but I am still unsure. Am I understanding this problem correctly or am I completely missing it?
The subsets of $X$ not containing $1$ are the subsets of $\{2,3,...,n\}$. This set has $2^{n-1}$ susbsets, because it has $n-1$ elements. The sets that do contain $1$ are all the subsets of $X$ that don't not contain $1$ (double negative!). There are $2^n$ subsets of $X$ and $2^{n-1}$ don't contain $1$, so the remaining $2^n-2^{n-1}=2^{n-1}$ must contain $1$.
0.888889
The subset of $X$ not containing $1$ are the subsets of $2,3,...,n$
Running a get link serverside, with php
When my PHP script runs, I would like to run a link like this server side: http://77.33.xx.xx/s/addtoqueue.php?action=store&amp;filename=myprettypicture&amp;link=http://i69.servimg.com/u/f69/13/29/70/44/facebo10.png Im doing this for storing the images on a own separate images server. The link is adding the image to a queue. How can I execute this link correct? I did this so far: $link = 'http://77.33.xx.xx/s/addtoqueue.php?action=store&amp;filename='.$filename.'&amp;link=$link; But dont know how to run this? And would it by the way be smart to urlencode() and urldecode() the $link?
I wouldn't build the query string myself like that, but use http_build_query() in preference: $url = 'http://77.33.xx.xx/s/addtoqueue.php'; $params = array( 'action' =&gt; 'store', 'filename' =&gt; $filename, 'link' =&gt; $link, ); $link = $url . '?' . http_build_query($params); To actually make a call to the URL you can use a number of techniques, but my favourite in this case would be curl. Here is an adapted version of the example from the manual: &lt;?php $ch = curl_init($link); curl_setopt($ch, CURLOPT_HEADER, 0); curl_exec($ch); curl_close($ch); Other options include file_get_contents($link); if the fopen wrappers have been enabled. Additional response for comments &lt;?php $ch = curl_init($link); curl_setopt($ch, CURLOPT_HEADER, 0); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $response = curl_exec($ch); curl_close($ch); $response now contains the response from the URL. From the curl_exec() manual page: Returns TRUE on success or FALSE on failure. However, if the CURLOPT_RETURNTRANSFER option is set, it will return the result on success, FALSE on failure. For more information on the curl options you can use checkout the curl_setopt() manual page.
0.888889
How do I make a call to the URL?
Best way to create custom building's map for iOS
I see some ways to do it: 1) Draw using OpenGL programmatically. 2) Draw using QuartzCore and CoreAnimation programmatically. 3) Draw map in AutoCad and then somehow connect it to iOS. 4) Draw map using SVG. Requirments are supporting pathfinding and gps navigation. For first 2 ways I think that it's expensive in terms of performance way, redraw all elements on scaling; and I don't think that this way may have GPS-navigation support. Using AutoCad pictured maps is hard to understand for me how to connect it with graphs\paths for pathfinding. My colleagues will develop this app on web using SVG. I found it - https://github.com/SVGKit/SVGKit , but still have no idea how it will support pathfinding and navigation. I would appreciate any help.
Generally there are two types of map application: A) They display a map, (with or without a user position) without needing to calculate a path like a navigation system does (see point B) B) Application that use the vectors of a map and calculate something: e.g to find a best path. The shortest connection, e.g A navighation system , etc. Application for A) are usually less complex then that of B), because the vectors can be somewhat inacurate, have no conections, have small gaps, have no logic between the edges, etc. 1) To only display a building map, you would only need a list of edges. (An edge is pair of coordinates (x1,y1) - (x2,y2). How ever you get that. E.g MapInfo Professional format mif/mid. Or even you could dispaly a pdf that contains the map of the builing. Right with the built in PDF View, (also with SVG but more difficult). Things get much more complicated if it is not a relative map, but also a map that is positioned with an reference coordinate system, like latitude/longitude (WGS84). In that case you would use a Tool (mapInfoProfessional, to import AutoCad DXF Files, and apply 3 GPS measured reference points at the corner of the house, and convert that to LatLong WGS84 coordinates system. With ios you cannot measure that 3 Points because you cannot average a position, ios stops sending when you are standing still at one corner of the house. You could try to extract the positions from a google earth satellite foto if you are living in a region where google Sattelite fotos have high resolution. (But this might violate the license conditions of that Satellite Foto provider (Topic: derived data)) Finally you now have a list of edges in Lat Lon coordinate System. For Displaying I personally would either do with 1) OpenGL) or 2) Quartz2D. Now the Path finding part. Probaly you need a second "map" that defines the possible paths inside the building. This structure must be a connect graph (points with connected neighbours). Computer games do it that way. (Some even allow you to display that path in developper mode) The path can be drawn, in a different layer of the floor plan. But this path has higher requirements: No gaps are allowed, all must be perfect connected. Call that layer "Path" and export it as own plan. Now use only this path layer, and import, and create a graph of nodes with connect neighbours. Use Dijkstra Algo to search for shortest path.
0.777778
Application that use vectors of a map and calculate something
Cubic graphs without a perfect matching and a vertex incident to three bridges
The example shown below (courtesy of David Eppstein) is a common example of a cubic graph that admits no perfect matching: Are there other examples of cubic graphs that do not admit a perfect matching and, unlike the above example, do not contain a vertex that lies at the intersection of three bridges (i.e. an edge whose removal increases the number of connected components in the graph)?
I think there are no such graphs. It was shown by Sumner and Las Vergnas (you can find the references here: http://mathsci.kaist.ac.kr/~sangil/pdf/2009claw.pdf) that a claw-free connected graph has a perfect matching (assuming even number of vertices, of course!). An intersection of three bridges is clearly a claw.
0.777778
a claw-free connected graph has a perfect matching
Why is a precoder necessary for DQPSK and what does it accomplish?
I've implemented a soft-decoder for DQPSK using the wonderful answers I received here: How to soft decode DQPSK? To get the soft-decoder working properly I needed to precode the data I was sending out. I implemented the precoder mentioned in this paper: $I_k=\overline{u_k \oplus v_k}*(u_k \oplus I_{k-1})+(u_k \oplus v_k)*(v_k \oplus Q_{k-1})$ $Q_k=\overline{u_k \oplus v_k}*(v_k \oplus Q_{k-1})+(u_k \oplus v_k)*(u_k \oplus I_{k-1})$ I'd like to know why this precoder is necessary -- what does that complicated expression of XORs actually accomplish? Here's a table showing what the equation yields. If "to_encode" is 00, the to_send symbol is the same as the previous ("prev") symbol. If the "to_encode" is 11, the to_send symbol is the previous symbol xor 11. What is the meaning in other cases? to_encode prev to send [ 0 0 ] [ 0 0 ] [ 0 0 ] [ 0 1 ] [ 0 0 ] [ 1 0 ] [ 1 0 ] [ 0 0 ] [ 0 1 ] [ 1 1 ] [ 0 0 ] [ 1 1 ] [ 0 0 ] [ 0 1 ] [ 0 1 ] [ 0 1 ] [ 0 1 ] [ 0 0 ] [ 1 0 ] [ 0 1 ] [ 1 1 ] [ 1 1 ] [ 0 1 ] [ 1 0 ] [ 0 0 ] [ 1 0 ] [ 1 0 ] [ 0 1 ] [ 1 0 ] [ 1 1 ] [ 1 0 ] [ 1 0 ] [ 0 0 ] [ 1 1 ] [ 1 0 ] [ 0 1 ] [ 0 0 ] [ 1 1 ] [ 1 1 ] [ 0 1 ] [ 1 1 ] [ 0 1 ] [ 1 0 ] [ 1 1 ] [ 1 0 ] [ 1 1 ] [ 1 1 ] [ 0 0 ]
Regard the dibits as Gray code representations of the integers $0,1,2,3$, more specifically, $$[0, 0] \leftrightarrow 0, ~~ [0, 1] \leftrightarrow 1, ~~ [1, 1] \leftrightarrow 2, ~~ [1, 0] \leftrightarrow 3.$$ Then, the precoding scheme is nothing but differential encoding for QPSK with to send = prev - to_encode modulo $4$. For example the line [ 1 0 ] [ 0 1 ] [ 1 1 ] in the question says that to encode $3 = $ [1 0] when the previous symbol was $1 = $ [0 1], we send $1-3 = -2 \equiv 2 \bmod 4$ where $2 =$ [1 1]. As stated in the answers and comments on the previous question, Differential encoding for QPSK is not the same as differential (binary) encoding of the I and Q bit streams separately. So the precoding scheme is just differential encoding for QPSK. As to why it is included in the system, it must be that the channel characteristics and system requirements are such that coherent detection of the signal is not thought to be feasible, and so the receiver is being implemented is a differentially coherent detector for DQPSK (differentially encoded QPSK). Note that coherent detection requires that the receiver phase lock loop acquire (and track) the incoming carrier in both frequency and phase (including resolution of the four-fold phase ambiguity) while for differentially coherent detection, frequency acquisition and tracking suffices, so that the receiver is simpler and more robust, though of course for a given SNR, the BER of the differentially coherent receiver is higher than the BER of the coherent receiver.
0.888889
Differential encoding for QPSK - to_encode modulo $4$
Law of Multiple Proportions: What is the significance of small whole numbers?
I'm new to Chemistry and in my textbook, it describes the Law of Definite Proportions and then goes on to describe the Law of Multiple Proportions. The example they give is carbon monoxide and carbon dioxide, where the mass ratio of oxygen to carbon in carbon dioxide is 2.67:1 and the mass ratio of oxygen to carbon in carbon monoxide is 1.33:1. I understand the above example, and I understand that when you compare them in the following way: 2.67g (proportion of oxygen to 1g carbon in carbon dioxide)/ 1.33g (proportion of oxygen to 1g carbon in carbon monoxide) = 2.00, a small whole number. $\frac{Mass~oxygen~to~1g~carbon~in~carbon~dioxide}{Mass~oxygen~to~1g~carbon~in~carbon~monoxide}$ = $\frac{2.67g}{1.33g}$ = 2.00 My textbook doesn't describe what a small whole number is, or what it means... just that, in this example, 2.00 is a small whole number. What is the significance of the 2.00? I understand that carbon dioxide has double the oxygen. Is this where the 2.00 plays a role?
The law of multiple proportions is largely obsolete these days because we all believe that atoms exist. Prior to about 1900 this and similar laws were used to show that, for example, the ratio of oxygen in $\ce{CO}$ to oxygen in $\ce{CO2}$ is 2:1. Of course that's trivially obvious when we write the formulas, but before we believed in atoms the "small whole number" ratios were used as an example of an experimental situation (the 2:1 ratio) could be explained by atoms (i.e. quantizing atomic masses.) Today, the law causes more confusion than it cures. Atoms are here to stay.
0.888889
The law of multiple proportions is obsolete today because we all believe that atoms exist .
CTE Running in Infinite Loop
My CTE runs in an infinite loop for a specific customer and I am not able to find out why. Here is the query: ;WITH ClassTree AS (SELECT ID, NAME, Parent_ID FROM TableName WHERE ID = 1 UNION ALL SELECT T.ID, T.NAME, T.Parent_ID FROM TableName T WITH (NOLOCK) JOIN ClassTree ON Parent_ID = ClassTree.ID ) SELECT * FROM ClassTree
I think this should find the problem record for you. It adds a LEVEL to your hierarchy, then looks for an individual ID record that exists at multiple levels. ;WITH ClassTree AS (SELECT ID, NAME, Parent_ID, 1 as 'Level' FROM TableName WHERE ID = 1 UNION ALL SELECT T.ID, T.NAME, T.Parent_ID, Level + 1 as 'Level' FROM TableName T WITH (NOLOCK) JOIN ClassTree ON Parent_ID = ClassTree.ID ) SELECT * FROM ClassTree c1 WHERE EXISTS (SELECT 1 FROM ClassTree c2 WHERE c2.id = c1.id AND c2.Level &gt; c1.level)
0.666667
SELECT ID, NAME, ParentID, Level + 1 as 'Level'
scrbook margin - ratio between top and bottom is wrong
I use the following document class \documentclass[11pt,a4paper,twoside]{scrbook} with default header and footer (chapter/section in header and the page number in the footer) My problem is, that the ratio between the margin of the header and the footer is not 1:2 when considering the header but not considering the footer. It is always 1:2 considering header and footer. I already tested the commands headinclude and footexclude, but it did not solve the problem. Does somebody have an idea how to solve this issue?
I can't reproduce your "issue". Compare the following examples (the second one features the headinclude class option): \documentclass[11pt,a4paper,twoside]{scrbook} \usepackage{showframe}% just for the example \usepackage{lipsum} \begin{document} \chapter{foo} \section{foobar} \lipsum[1-12] \end{document} \documentclass[11pt,a4paper,twoside,headinclude]{scrbook} \usepackage{showframe}% just for the example \usepackage{lipsum} \begin{document} \chapter{foo} \section{foobar} \lipsum[1-12] \end{document} Output (page 2) of both examples:
1
How to reproduce your "issue"?
Basic steps to develop python API in Unix environment
I am developing an API in Unix environment for virtual machines. Most of the modules are developed in python. I have few questions on this. I have the file extension as abc.py. I would like to make this as a command. For example , virtman dominfo [vmid] should be the command syntax. Now I have to give ./virtman.py dominfo [vmid] to achieve this. And I have first line as #!/usr/bin/python in the python file. So how can make this as a command? My echo $PATH looks like '/bin:/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin0' I read a lot of articles but I didn't get the clear picture,so any hints/suggestions would be helpful.
Anthon's answer is correct, however for non-trivial Python projects you should have a look at the distutils module in the standard library. It's designed to deploy python modules and executables on a system the "right way", and : Python devs are familiar with this module (or should be) because it's in the standard library and most well-known Python packages (Django, NumPy, Celery to name a few) are using it. Newcomers will know instantly how to deploy your project. Once you've defined which files and packages you have in your project, just run python setup.py install to deploy and update your package on the system. No more manually updating the PATH variable copying files to /usr/local/bin or setting them to be executable, it's all handled for you! You can use pip install -e to install your package in development mode. It's portable (sort of) in Windows or OSX environments as well. Also, I can't recomment the use of an argument parser such as argparse enough if you're designing command-line tools.
1
Python devs are familiar with the distutils module in the standard library .
ASP.NET MVC Update part of the model
I have very complex model. The flow is like this: - in controller I populate the model from the database - in view I have several tabs. After I fill in the info on the first tab, the second tab enables (this works just fine) and on click on the second tab button I need to update some properties of the model. How can I do this WITHOUT calling the database again in order to populate the model on the controller? The model is very complex, so I can't store as "hidden" all the properties. I hope I managed to be clear enough. Thanks for any kind of help
Use a JSON object that mimics your model and update it when user clicks on different tab or whatever. When Client-side update/manipulation is done, use AJAX to submit your JSON object to the controller. Here is how you can do this on a button click (you can change it to whatever is clicked): &lt;script src="../../Scripts/json2.js" type="text/javascript"&gt;&lt;/script&gt; &lt;input type="button" value="Partially Update my Model" onclick="UpdateYourModel()" /&gt; &lt;input type="button" value="Save to Database" onclick="SaveToDataBase"/&gt; &lt;script type="text/javascript"&gt; // Create YourModel Json Object including child objects in it. var childObject={"ChildId": "","ChildDescription":""}; //The array name (childObjects) should match the collection name in your actual Model var yourModel= { "ModelId": "", "Description": "","childObjects[]":"" }; function UpdateYourModel() { //update the childObject first childObject.ChildId=1;//any value from anywhere childObject.ChildDescription="any value"; // Update the model yourModel.ModelId= $("#ModelId").val(); yourModel.Description="This property was changed at client side"; yourModel.childObjects.push(childObject);//add child object to yourModel //Likewise, update other properties of yourModel }//function ends here function SaveToDataBase() { $.ajax({ url: "URL to your controller", data: JSON.stringify(yourModel), type: 'POST', contentType: 'application/json;', dataType: 'json', success: function (result) { alert("Success"); } }); } &lt;/script&gt;
0.666667
AJAX to submit a JSON object to the controller
Photoshop/Illustrator: generate vector graphic from bitmap
Possible Duplicate: Vectorization graphics approach Folks, Photoshop newbie here with what I think is a simple question, but clearly, I am not searching for the right keywords on Google. I have a hand-sketched pattern that I have scanned into a (bitmap) image. It is a crisp black and white image. I would like for a way to get Photoshop (or Illustrator) to detect the edges and extract paths from it, thereby converting it into a vector graphic. Is there a simple way to accomplish this? Thanks. -Raj
Since you're using Illustrator then use the tools built into it for doing exactly what you're doing. But if you don't have / want to use the Adobe software there are several free alternatives: Potrace is Free (as in FOSS) vectorisation software, these days it comes as a plugin for the free vector graphics package Inkscape The brilliant commercial / open source vector graphics package Xara is available free for Linux, it has an excellent built-in tracing tool (and it kicks illustrator's 4rse for speed and ease of use) Other free vectorisation software includes AutoTrace and Deliniate. Also there's a free web app called vector magic here, they sell a desktop version as well. -stib
0.777778
Free vectorisation software for Adobe Illustrator
Factory panic alarm going off after changing battery [97 Toyota Camry]
We just changed the battery in our 1997 Toyota Camry now as soon as we connect the battery the panic alarm goes off and all the doors lock. How do we stop this / turn it off. ///note: the battery in our remote is dead///
Obviously the easy fix is replace the battery in your FOB then just hit unlock once you hook up the battery. But... If you are too lazy to replace your FOB battery. Try just putting the key in the ignition in the "ON" position then hooking up the battery. If that doesn't work then try cycling the key between off and on (not start) 5 times. If that doesn't work then make sure all doors are closed and unlocked before disconnecting and closed and unlocked before reconnecting. If that doesn't work pull the fuse for the horn and go find a fob battery.
1
Replace the battery in your FOB then hit unlock
Any smart way to get the interest down on our student loans?
Trying to figure this out. I have a student loan $24,000 at 6.55% with Nelnet, and my wife has $48,000 at 5.2% with Mohelo. We have a home worth $220,000 with $40k in equity, and the rest at $180k at 3.9%. Any smart way to get the interest down on the student loans? A HELOC is an option I think, 4% may work. I tried to negotiate with Nelnet for a lower interest but they won't budge. We easily meet the $2k tax deduction between the two of us.
There was another question about using a credit card to lower their student loan payments. There are drawbacks that will also apply in your situation regarding a HELOC or 2nd mortgage: Make sure you understand the interest rate. If it is not fixed you could have made your situation worse. Monthly Payment. The repayment period of the HELOC or 2nd mortgage will greatly influence the monthly payment. Closing costs? There is no going back. If you want to switch back to a student loan you can't. Can you get a get a loan big enough? You need 72K, with only 40K in equity. Gone are the days where the loans could exceed the houses value at the start of the loan. Tax implications? Forgiveness programs. Some employers will forgive parts of the loan, or if you work in public service for X years they forgive some of the loan. They will not view the mortgage debt the same way.
0.777778
How do I get a HELOC or 2nd mortgage?
Help me identify this spider from my garden
Found this in my garden today in Sydney, Australia (specifically Lane Cove). Can you tell me what it is?
I believe it is a Garden Orb Weaver spider. The Australian garden orb weaver, Eriophora transmarina, has a strikingly similar body
1
Eriophora transmarina has a similar body
Google Universal Analytics - Campaign ID
In the Google Universal Analytics doc, they show a parameter called Campaign ID. The problem is that there is no other information about the use and the interest of this parameter. Indeed, all other campaign related parameters are very usual (utm_...) but the Campaign ID seems very odd. Can anyone provide more insight about it, please?
It appears to correspond with the utm_id query parameter. It is mentioned in the following Google Analytics help documents: Import Campaign Data - Analytics Help How To Use Master Tracking Codes - Urchin Help Campaign Tracking - Web Tracking (ga.js) - Google Analytics — Google Developers I believe that it is a parameter that was included in Urchin (which Google bought and branded Google Analytics). It appears that Google no longer recommends the use of this parameter.
0.5
Urchin - Google Analytics
What is the best way to show the user large amounts of data?
I am working on an application with a team that has roughly 2 years of data. This data is shown through multiple visualization methods. Part of the application is a settings panel, which lets the user control various things about the application (How much data they see, color schemes, etc.) In the settings panel, one of the options allows the user to view their data in table format (report style). Because there is about two years worth of data, it's been broken up in to Month and Year increments. If the user wants to export a particular month, they can export that data to a .csv which can then be opened in a third party program like Excel or Calc. This is what it currently looks like with the entire visualization screen: Close up view: Even with the data broken up, there is still a substantial amount in each table (probably about 150 rows). This means the user still has to scroll to view the data. My co-workers think this is the best option, however I want to take a different approach. I personally think that everything in the settings should be something to change the way the data looks or to get some of the data to take somewhere else. My solution would be to show the user some sample data (maybe 3-4 rows), then give them the option to export as the main function (as opposed to reading it in browser). I think this makes more sense since the user won't have the ability to sort, select, change, etc. like they would in Excel. Mine would look something like this: It's not perfect, but it should give you a general idea of the look I'm going for. So down to the actual question... Question Which scenario makes more sense? Display this much data to the user in browser (in a settings panel) Give the user sample data and let them export it and do what they please with it
I'm of the mind that you've answered your own question, with a couple of caveats. You have two examples, so effectively you have your own A/B test. If you are already talking to end users and consumers of this data and have garnered their opinion, after you have explained why you believe the second example is better (quick scan overview, simple to download, can't interact with the data on screen anyway) and they still prefer the 1st option, then it really isn't the job of the UX'er to persuade them otherwise. They've given you the feedback.
0.777778
You have two examples, so effectively you have your own A/B test
How to improve or get rid of an Indian English Accent?
As you might suspect, that the only person who can ask this kind of question must be an Indian. What's wrong with an Indian accent, that makes it difficult for other people to understand. I have communicated with Japanese, Chinese, American and French, and all have told me that your Indian English accent is difficult to understand. Can anyone tell me how to improve Indian English Accent or get rid of Indian English Accent. Please tell me how to improve specific pronunciation of alphabets, that can help other understand me clearly.
The two main problems in following Indian speakers of English are a) the sounds t, d, and r, and b) aspiration. For t and d - these need to be pronounced using the tongue against the alveolar ridge, just slightly back from the teeth. It's important not to touch the teeth when pronouncing these sounds. The r is pronounced with the tongue pulled slightly back from the alveolar ridge. Never pronounce any of these sounds with the tongue against the hard palate. The sounds p, t, k (including hard c) should be slightly aspirated - if you hold a piece of thin paper in front of your mouth it should move when you say these sounds. The aspiration is probably the biggest issue in being intelligible.
1
Aspiration is the biggest issue in being intelligible
How do I deal with a clinic billing mistake that was sent to collections?
Recently I created a CreditKarma.com account so that I can keep and eye on my credit. Upon logging in, I noticed I have a pretty low score (not that surprising since I just opened my first credit card recently), but I had a look around anyway just out of curiosity. What I found out was that I have three medical bills in collections from my local clinic that total around $250! What's odd is that I have insurance that should have paid those costs, and I've never received bills from them before for that reason. What can be done to get this removed from my credit report without paying it, since I wasn't supposed to pay it in the first place. Likely this started out as just an insurance mistake between the clinic and my insurance.
This happened to me when I went to buy my house. I had an "outstanding" $48 and $150 in medical bills due. When I paid them, I got checks 8 weeks later for the exact amounts I'd written, stating that it was over-payment. When I called the hospital, they said that collections didn't have updated billing records. 1) Contact the clinic Ask if you actually owe anything. They'll be able to pull all of the billing records for your account. If you do owe something, let them know that your insurance was supposed to cover that. If they insist that insurance doesn't / didn't, then you're liable for whatever is left. If it has gone to collections, you'll have to pay through the collections company, not directly to the clinic. 2) Contact the collections company They are notoriously bad at keeping their records up-to-date, and will continue to report "unpaid medical" until you pay it or they clear it. If the clinic says you're paid up, let them know that. They will contact the clinic to get the billing records. Once that's cleared up, move on to... 3) Contact the credit bureaus where this is affecting your history You can dispute an item to have it removed. They will contact the collections company and raise the dispute. If you've contacted collections, and they know you don't owe anything, they'll clear it when the dispute reaches them. This process can take a few months to complete (and for the bad mark to be removed from your report). In general, a single $250 medical bill past due doesn't have a huge effect on your credit score, but it's always good to get it cleared up.
1
If you do owe something, let them know that your insurance was supposed to cover that .
numpy float: 10x slower than builtin in arithmetic operations?
EDIT: I rerun the code under the Windows 7 x64 (Intel Core i7 930 @ 3.8GHz). Again, the code is: from datetime import datetime import numpy as np START_TIME = datetime.now() # one of the following lines is uncommented before execution #s = np.float64(1) #s = np.float32(1) #s = 1.0 for i in range(10000000): s = (s + 8) * s % 2399232 print(s) print('Runtime:', datetime.now() - START_TIME) The timings are: float64: 16.1s float32: 16.1s float: 3.2s Now both np floats (either 64 or 32) are 5 times slower than the built-in float. Still, a significant difference. I'm trying to figure out where it comes from. EDIT: Thank you for the answers, they help me understand how to deal with this problem. But I still would like to know the precise reason (based on the source code perhaps) why the code below runs 10 times slow with float64 than with float. EDIT: numpy.float64 is 10 times slower than float in arithmetic calculations. It's so bad that even converting to float and back before the calculations makes the program run 3 times faster. Why? Is there anything I can do to fix it? I want to emphasize that my timings are not due to any of the following: the function calls the conversion between numpy and python float the creation of objects I updated my code to make it clearer where the problem lies. With the new code, it would seem I see a ten-fold performance hit from using numpy data types: from datetime import datetime import numpy as np START_TIME = datetime.now() # one of the following lines is uncommented before execution #s = np.float64(1) #s = np.float32(1) #s = 1.0 for i in range(10000000): s = (s + 8) * s % 2399232 print(s) print('Runtime:', datetime.now() - START_TIME) The timings are: float64: 34.56s float32: 35.11s float: 3.53s Just for the hell of it, I also tried: from datetime import datetime import numpy as np START_TIME = datetime.now() s = np.float64(1) for i in range(10000000): s = float(s) s = (s + 8) * s % 2399232 s = np.float64(s) print(s) print('Runtime:', datetime.now() - START_TIME) The execution time is 13.28 s; it's actually 3 times faster to convert the float64 to float and back than to use it as is. Still, the conversion takes its toll, so overall it's more than 3 times slower compared to the pure-python float. My machine is: Intel Core 2 Duo T9300 (2.5GHz) WinXP Professional (32-bit) ActiveState Python 3.1.3.5 Numpy 1.5.1 END OF EDIT ORIGINAL QUESTION: I am getting really weird timings for the following code: import numpy as np s = 0 for i in range(10000000): s += np.float64(1) # replace with np.float32 and built-in float built-in float: 4.9 s float64: 10.5 s float32: 45.0 s Why is float64 twice slower than float? And why is float32 5 times slower than float64? Is there any way to avoid the penalty of using np.float64, and have numpy functions return built-in float instead of float64? I found that using numpy.float64 is much slower than Python's float, and numpy.float32 is even slower (even though I'm on a 32-bit machine). numpy.float32 on my 32-bit machine. Therefore, every time I use various numpy functions such as numpy.random.uniform, I convert the result to float32 (so that further operations would be performed at 32-bit precision). Is there any way to set a single variable somewhere in the program or in the command line, and make all numpy functions return float32 instead of float64?
CPython floats are allocated in chunks The key problem with comparing numpy scalar allocations to the float type is that CPython always allocates the memory for float and int objects in blocks of size N. Internally, CPython maintains a linked list of blocks each large enough to hold N float objects. When you call float(1) CPython checks if there is space available in the current block; if not it allocates a new block. Once it has space in the current block it simply initializes that space and returns a pointer to it. On my machine each block can hold 41 float objects, so there is some overhead for the first float(1) call but the next 40 run much faster as the memory is allocated and ready. Slow numpy.float32 vs. numpy.float64 It appears that numpy has 2 paths it can take when creating a scalar type: fast and slow. This depends on whether the scalar type has a Python base class to which it can defer for argument conversion. For some reason numpy.float32 is hard-coded to take the slower path (defined by the _WORK0 macro), while numpy.float64 gets a chance to take the faster path (defined by the _WORK1 macro). Note that scalartypes.c.src is a template which generates scalartypes.c at build time. You can visualize this in Cachegrind. I've included screen captures showing how many more calls are made to construct a float32 vs. float64: float64 takes the fast path float32 takes the slow path Updated - Which type takes the slow/fast path may depend on whether the OS is 32-bit vs 64-bit. On my test system, Ubuntu Lucid 64-bit, the float64 type is 10 times faster than float32.
0.666667
Numpy scalar allocations to float type
Is it possible to set borderless window mode?
I am playing Mass Effect again but there doesn't appear to be an option to enable a borderless window mode in either the game or the configuration utility, leaving the game running inside of a visible window. Is it possible to set a borderless window mode either by editing one of the configuration files or using a third party utility or some kind?
Use the following AutoHotKey Script: ^!a:: WinSet, Style, -0xC00000, a WinMove, a, , 0, 0, 1680, 1050 return When you pree ctrl+alt+a it will make the currently active window borderless. Replace 1680 and 1050 with the size you want the window to be.
0.888889
Replace 1680 and 1050 with the size you want the window to be
Are there fluid tripod heads made for panning with a lightweight, compact camera?
Are there fluid tripod heads made for use with compact or at least lightweight cameras (such as my LX100)? Most seem built to support a tank (or full-blown DSLR/video camera). I would like to be able to pan with my small compact.
A video camera tripod is different than a still photograph tripod, because it needs some resistance when panning and tilting. It is normally more sturdy because it is expected to stay in place while you move the head. A light one will move when you pan. It does not really matter if the camera is light or heavy. Of course if the camera is heavier you need one more reliable, in materials and construction. If you just need a tripod for still photography, just buy one you like. But feel it first, do not buy something "cheap" just because.
1
a video camera tripod is different than a still photograph tripod
LaTeX command for double lower index summation
I would like to know what is the latex command to include a double lower index using sigma notation (i.e: second index lies underneath the first index)? I tried typing: \displaystyle\sum_{m,n=-\infty, \; (m,n)\neq (0,0)}^{\infty} \left[ \frac{1}{(z-2 m\omega_{1} - 2 n\omega_{2})^{2}} -\frac{1}{ 4(m\omega_{1} + n\omega_{2})^{2}} \right] I would appreciate the assistance. Thanks
Try using substack: \usepackage{amsmath} ... \begin{equation} \prod_{\substack{ 1 \le i \le n \\ 1 \le j \le m} } M_{i,j} \end{equation} This example is taken from the Latex Wikibook.
0.777778
Try using substack
how do i get rust stains off driveway
I used fertilizer with iron and, unfortunately, didn't sweep adequately afterwards. Afterwards I ran my sprinklers and now my driveway and sidewalk are peppered with unsightly rust stains. What are the best ways to get it off? (By "best" I mean easiest and most efficient, while still being safe, inexpensive, and not too harmful to the nearby lawn.) Any suggestions?
OK, well, I just figured this out. I did some web research and saw all sorts of suggestions for stuff like TSP, muratic acid, and CLR (thanks, @mikes). But for the most part they're all bad for your lawn, bad for you skin, and bad for your wallet. Let me save you some money... All you need is a stiff wire brush and a bucket of water (and the water is optional). You can even use one of those BBQ grill scrubbers (although I recommend a 1" wire brush). Just a little dab of water and a little elbow grease and the rust is gone! You might think of using a hose, but I wouldn't recommend it because, if you just fertilized your lawn, you run the risk of washing more fertilizer right back onto your cement, and you'll have the same problem all over again when it dries. Now, I did this about an hour after I first noticed the stains. Perhaps if the stains had "set" for a few weeks it might have been harder -- I don't know. I did hear that another "solvent" that works well is vinegar (a natural acid), so if anyone doesn't get results from the above method, you might try it. But I didn't try it, so I don't know.
1
TSP, muratic acid, and CLR are all bad for your lawn
Is the Mechromancer's Little Big Trouble tree worthwhile in UVHM (72 level cap)?
So far, the tree seems rather underwhelming, especially the low-tier skills like Myelin, More Pep, Strength of 5 gorillas, etc. Evil Enchantress apparently doesn't affect shock, fire and acid direct damage; it only buffs the status effects which is pretty pointless when slagging an enemy does 3X damage. Shock storm doesn't sound useful as most enemies won't be bunched up enough. On the other hand, the damage buffs from Wires Don't Talk and Interspersed Outburst look very useful. Make it Sparkle also apparently gives Deathtrap massive additional damage of up to 3X. Is it worthwhile to spec into this tree just for the end-tier perks?
http://forums.gearboxsoftware.com/showthread.php?t=322489 I highly recommend that you read over this post on the official BL2 forums. It's titled "Gaige's skill tree and general deficiencies" or something along those lines, and it's a well thought out post that provides examples and math for the skills. Furthermore, it is written and discussed by people who are very experienced Mechromancer players. The op is an active member of the Mechromancer section of the BL2 forums. I hope the link helps, but if you don't want to bother with it the short answer is that, excepting Evil Enchantress and Electrical Burn (I think those are the right names), the LBT tree has lots of problems and can be a waste of skill points. I would also highly recommend using shotguns if you're specced into Anarchy. Slow Hand (from Badassasaurus in the Toruge Campaign of Carnage DLC ), Is a Moxxie weapon, and will heal you for around 3% of ~ANY~ damage done while it's equipped. That's a very good suggestion from Ben Brocka. I would further add that the Twister shotgun is also good with Anarchy, as the fixed firing pattern helps negate the accuracy debuff. It's dropped in the Hammerlock's Hunt DLC. By Rouge, a large crysalisk.
0.777778
I highly recommend using Shotguns if you're specced into Anarchy .
Populate a JSON into a table in real time with JQUERY
I'm looking for a library which do this : Retrieve a JSON through an AJAX call Populate table with the JSON Update in real time the table with the JSON (call every x seconds) and only delete or hide the rows wich are deleted or insert the new rows. /Editing after first answer Ok i guess my first explanation was not good. Retrieving through jquery a json and build a table is good, i could do that, but my request was more on the other part. I'm looking for a library to display the result in a special way. Let me explain. Json request 1 send : 1;Tomato 2;Apple 3;Salad 4;Carot Json request 2 send : 1;Tomato 3;Salad 4;Carot 5;Potatoes I would like the second row disapear with a effect (fadeOut) and the rows below move Up. For the row 5, i just want a new row appears with a fade in. Is that more clear ? Is there any livrary existing doing this ? Thanks again I'm doing it in PHP, but i hope to write all this in JS. The user could just look the table and see the new rows appearing and the old rows deleting. Any ideas or am i supposed to write it from scratch ? Thanks a lots
You can get the json like this (use get or post, ill show post here): function do_json_live(){ $.post('url.php','somedata', function(returnJSON){ alert(returnJSON); //do something with the `returnJSON` setTimeout(do_json_live, 2000); //2000 ms = 2 seconds },'json'); }
0.777778
json: function do_json_live
Why ducklings are yellow?
Why ducklings are yellow, what the evolutionary background for this? How could it help to survive? UPDATE I agree with comment below, I did remember then that ducks are wild animals too (when I asked the question I imagined domesticated ducklings as widely pictured in media), but anyway it is interesting to know why the domesticated ducklings are yellow now. What is the reason of selection drove such coloration to young ducks or yellow pigment is just a side effect?
Wild ducklings, like these baby Mallard ducks, are in fact typically only partly yellow: Photo by TheBrockenInaGlory via Wikimedia Commons, used under the CC-By-SA 3.0 license. While I'm no expert, I would guess that the mottled yellow-brown coloring of the juveniles is, at least partially, protective coloration, just like the somewhat similar pattern on the adult female's feathers. While it may appear conspicuous on open water, ducks in their natural habitat will often seek shelter among reeds and other vegetation, where the irregular pattern of light and shadow would create a very effective camouflage for the ducklings. As for the all-yellow ducklings of domestic ducks, these presumably arose via elimination of the darker parts of the coloring as a result of selective breeding, perhaps as a side effect of artificial selection for the white adult plumage found in many domestic ducks today.
1
Yellow-brown coloring of the juveniles is protective coloration .
Using a cell text as sheet reference
Is it possible to use a cell text as a sheet reference in Google sheets. I have a spreadsheet with many sheets and want to reference a sheet name from text in a cell rather than having to put the sheet name in each time.
Somewhat guessing what you require (examples often help) if say you have a couple of sheets named: Sheet2 Sheet3 and those names in A1 and A2 of Sheet1, then a formula like: =indirect(A1&amp;"!B2") in Sheet1 should return the value of B2 from Sheet2 and if copied down one row, the value of B2 from Sheet3.
1
Formula: =indirect(A1&amp;"!B2") in Sheet1 returns value of B2 from Sheet2
Line wrapping long curried function definitions in Scala with Scala IDE
This is a simple question, but I'm curious about the "right" way to line-wrap curried functions in Scala. For example, suppose I have the moderately long line (if it's not long enough, you can pretend there are more parameters): def executeFooBarCommand(ce: CommandExecutor)(implicit ec: ExecutionContext): Future[FooBar] = { //... } I have two problems regarding wrapping the long definition: First, I'm not sure what the accepted best practice is for wrapping such lines (or even longer ones. Second, most reasonable ways of wrapping the line seem to result and in "auto-rejoin" of the wrapped lines when I format in eclipse. I set eclipse never to join wrapped lines in java, and there doesn't seem to be a relevant setting in the scala IDE formatting section that I can find, so I'm not sure how to prevent the format command from joining these wrapped lines.
Eclipse is based on scalariform, and so far it doesn't have this option. However, it can split parameters in the same parameter list, so you could try formatting it as: def executeFooBarCommand( ce: CommandExecutor)(implicit ec: ExecutionContext): Future[FooBar] = { //... }
1
Eclipse is based on scalariform .
Facebook Connect Changed My User ID and Deleted Some Badges
So this actually happened a long time ago I just never complained about it until now: I was a beta user of SO and originally my account was located at: http://stackoverflow.com/users/871/andrew-g-johnson -- I used Google to login as soon as it was available Then when you guys rolled out Facebook Connect and I clicked that. Suddenly my account id was changed: http://stackoverflow.com/users/428190/andrew-g-johnson. I liked my low user id and beta badge -- is it possible to get those back?
This isn't possible without hours of painful dev work manually manipulating the database, sorry -- your account was auto-merged into the higher ID way back in August 2010.
1
How do I manually manipulate the database?
Stern-Gerlach and Hund's second rule
According to Hund's second rule, the spin tends to be maximal. That would, in my understanding, imply that, regarding the Stern-Gerlach experiment, the important electron in a silver atom has spin 1/2 (or "up"). This should hold for all atoms. Every atom would have the same spin magnetic moment (smm) - because the smm points in direction of the spin - and thus be affected by the B-field just like any other atom. But, if every electron has the same smm w.r.t. the magnetic field, why do we get two "blobs" on the screen and not just one "blob" above or below the z-axis? Where is the error in my thought process?
Although an electron is referred to as a spin 1/2 particle, it doesn't mean it is in a spin 1/2 state (confused yet?). A spin 1/2 particle has two states it can be in. It can be +1/2 in which case it goes up Stern-Gerlach experiment, or it can be in the -1/2 state in which case it goes down. If there are two unpaired electrons in a molecule, then it is called a spin 1 molecule and has three states (+1, 0 and -1). If the 2 electrons are both spin +1/2, the molecule will go up, if 1 electron is spin +1/2 and the other spin -1/2, the molecule will go straight. Finally, if both electrons are spin -1/2, the molecule will go down in a Stern-Gerlach experiment.
0.333333
a spin 1/2 particle has two states it can be in .
Setting text of UITextField from caller view
I have a barcode scanner on one view, and after the user has scanned the barcode, the app takes them to another view (BoilerDetails) where the barcode text field has been pre-filled. I understand that the viewcontroller is null when it hasn't come into view and I can'tchange the UITextField text directly. This so far has given me an error.. How can I fix this? BarcodeScannerViewController.m BoilerDetailsViewController *viewCtrl = [[BoilerDetailsViewController alloc] initWithNibName:nil bundle:nil]; [viewCtrl setBarcode:strBarcode]; [self.navigationController pushViewController:viewCtrl animated:YES]; BoilerDetailsViewController.h @interface BoilerDetailsViewController : SubViewControllerBase @property (retain, nonatomic) NSString *barcode; @property (retain, nonatomic) IBOutlet UITextField *barcodeField; - (void)setBarcode:(NSString*)strBarcode; @end BoilerDetailsViewController.m -(void)setBarcode:(NSString *)strBarcode { self.barcode = strBarcode; } - (void)viewDidLoad { [super viewDidLoad]; [_barcodeField setText:self.barcode]; // Do any additional setup after loading the view from its nib. }
First of all, this is wrong -(void)setBarcode:(NSString *)strBarcode { self.barcode = strBarcode; } self.barcode = strBarcode; itself calls the setter. depending on your ios version you shud write: //for ARC environment -(void)setBarcode:(NSString *)strBarcode { _barcode = strBarcode; } //since default association in ARC is strong before this do @synthesize barcode = _barcode; //and for non-ARC environment, since your property is retain type -(void)setBarcode:(NSString *)strBarcode { if (_barcode != barcode) { [_barcode release]; _barcode = [barcode retain]; } } And you will be OK.
0.833333
-(void)setBarcode:(NSString