summary
stringlengths
15
147
text
stringlengths
1
19.3k
answer
stringlengths
32
22.6k
labels
float64
0.33
1
answer_summary
stringlengths
5
164
Strategy for hosting 700+ domains names, each with a static HTML site
I have a portfolio of more than 700 domain names, and ideally I'd like to put up a single-page HTML/CSS/JavaScript webpage for each domain. Is there a system/strategy/workflow that will allow me to: Automate the deployment of new websites, quickly and easily without having to manually initiate each new website in an ...
@jonschlinkert setting up CNAMES has nothing to do with adding a single HTML page to 700 domains. CNAME's won't help any with SEO. If you're creating a single HTML page for each of your domains why not build an HTML template. I don't think you'll find any good method of inserting the copy into each page since you'll ha...
0.777778
How to add a single HTML page to 700 domains?
Error extends AccountController.php in magento
I'm trying to extend the core AccountController.php -> app/code/core/Mage/Customer copied it to app/code/local/Mage/ and add a log to see which extends properly. In the file AccountController.php (app/code/local/Mage/Customer/controllers) ... ... public function createPostAction() { Mage::log('In app/code/loca...
I answered this question of yours over at StackOverflow: The logic through which controller class definitions are loaded builds the path to the file above the explicit include paths on which the autoloader relies. This means no local vs. core precedence. You need to creat a controller rewrite by specifying a ...
0.888889
How to build a controller rewrite by specifying a directory under the xpath frontend?
How to remove a directory and its contents using NSFileManager
New to Objective C. I have created a few directories which contain pdf files for an iPhone app. How can I delete a directory and its contents using NSFileManager? Do I need to loop through and remove the contents first? Any code samples would be much appreciated. Thanks in advance.
Heres some code I use that Ive edited to suit the question - (NSMutableString*)getUserDocumentDir { NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); NSMutableString *path = [NSMutableString stringWithString:[paths objectAtIndex:0]]; return path; } - (BOOL)...
0.888889
NSMutableString *paths
Scipy Fast 1-D interpolation without any loop
I have two 2D array, x(ni, nj) and y(ni,nj), that I need to interpolate over one axis. I want to interpolate along last axis for every ni. I wrote import numpy as np from scipy.interpolate import interp1d z = np.asarray([200,300,400,500,600]) out = [] for i in range(ni): f = interp1d(x[i,:], y[i,:], kind='linear...
The method you propose does have a python loop, so for large values of ni it is going to get slow. That said, unless you are going to have large ni you shouldn't worry much. I have created sample input data with the following code: def sample_data(n_i, n_j, z_shape) : x = np.random.rand(n_i, n_j) * 1000 x.sor...
0.777778
Interp_2 is a vectorized implementation of linear interpolation that avoids any python loop whatsoever
abelian higgs vortices
Dear fellow mathematicians, during some gauge-theoretic explorations I've stumble upon a recent paper by Nick Manton on Abelian higgs vortices where he studies Abelian higgs "vortices" on hyperbolic surfaces. Does anyone have any historical knowledge of whether the word vortex in this context have any connection with p...
The study of vortices in Abelian Higgs models in the context of relativistic QFT goes back to the paper by Nielsen and Olesen, Nucl.Phys.B61:45-61,1973. They in turn were directly inspired by the study of vortices carrying quantized magnetic flux in type II superconductors which goes back to Abrikosov (see his Nobel le...
0.888889
Vortices in Abelian Higgs models in context of relativistic QFT
Wiki-like tool for writing specifications and documentation
I am looking for a wiki or wiki-like system for writing and managing specification and documentation for a software project. I know there are lots of wiki-implementations available, but are there some that are especially well-suited for this kind of task? Actually it doesn't have to be a wiki, just a system that mak...
For the personal project (existing only in my PC) I use Wiki in a Jar. In the past I worked with Redmine (it has furthermore a system of bug tracking and SCM )
1
Wiki in a Jar
Career advice โ€“ mathematics
I really need some opinions/advice on my situation. My background I'm studying for my master degree in mathematics. I have always (since I was 14) wanted to do my own research one day. As I grew older, I knew that mathematics was what I wanted to do. So I went to the university to study mathematics. After having enco...
I'm having a lot of trouble nailing down your question. After reading it several times, I think you mean that you have an opportunity to go on to study a PhD in geometric group theory at your current university. (Is it specifically relevant that you are going abroad tomorrow? How does this fit in with the rest?) Fr...
0.888889
Doing your own research means precisely to developing new ideas and being dedicated to something .
Close Popup window in Salesforce1
I need to close a popup window in Salesforce1. When it opens in a normal browser, the popup is closed using Window.close() But in case of Salesforce1(App Browser), the Window.close() does not work. Is there any workaround to close the popup?
When you say Salesforce1, are you trying this on a real device or in emulated mode on a browser (using the /one/one.app suffix)? If there are any errors, it should show up in the console log. Else, you should try the following window.top.close(); or window.self.close();
0.888889
If there are any errors, it should show up in the console log
Log In / Sign Up on Splash screen?
Is it common to include Login / Sign Up actions on an app's splash screen? Or is it more efficient to first have a Splash screen, and then follow with a dedicated Log In / Sign Up page?
I would suggest skipping the splash screen, as this will only delay the user. The answer to your login/signup question depends on the requirements of your application. Here are the various ways it could be done. If authentication is required to access any content on the application, because it will not function witho...
1
How to skip splash screen?
Does the Canon *.CR2/CRW format contain "truly RAW" data?
In my work I am dealing with *.CR2 raw images taken by a Canon DSLR in raw mode. When I read about the format here, I was surprised to find that it has 4 TIFF IFDs which contain a) Original Size JPEG Image b) Thumbnail JPEG image c) Uncompressed RGB data d) Lossless JPEG image. My impression until now was any camera c...
I think you are most definitely missing something. Consider: JPG is used to store (and usually compress, lossy) images. Any image. What is an image? It is a great big bundle of pixels, when all is said and done. The output from the camera sensor is a great big bundle of pixels, too. They just happen not to be full-col...
0.888889
What is an image? What is a bundle of pixels?
What is the best introductory Bayesian statistics textbook?
Which is the best introductory textbook for Bayesian statistics? One book per answer, please.
I found an excellent introduction in Gelman and Hill (2006) Data Analysis Using Regression and Multilevel/Hierarchical Models. (Other comments mention it, but it deserves to get upvoted on its own.)
1
Gelman and Hill (2006) Data Analysis using Regression and Multilevel/Hierarchical Models
sharing state between different controllers in angular
I have two controls : Left Side Navigation and the right pane that changes the content on clicking of any item on left navigation. Here is the html (angular view): <nav class="navigation"> <ul class="list-unstyled" ng-controller="NavigationController as navigation"> <li ng-repeat="...
My answer to a previous question may help. It uses a type of observer pattern. AngularJs update directive after a call to service method Your service would change to allow all interested controller or directives to either generate or listen for certain events and access the associated data.
0.833333
AngularJs update directive after service method
What to do about students who ask for help too often?
For my writing courses, about 5% of students will come to me prior to deadlines asking for help with their paper. I see no problem advising students, as I often similarly came for help when I was an undergraduate. Recently, though, I found an increase in students who apparently just want to abuse this: Students will ...
If you see something definitely plagiarized, you could try to get them to claim it as theirs when they consult you and fail them on the spot for making the claim whether it's in class or not. I do agree with @DaveClarke that on this or the other issue, announcing a policy at the start of the term (no more than N consu...
0.888889
If you see something definitely plagiarized, you could try to get them to claim it as theirs when they consult you .
Delay in debt appearing on credit card statement
We charged hospital fees totalling $2400 on a St George Bank credit card on 17 and 21 April 2014. The hospital was located in Denpasar Bali. On last checking the amount owed on the card (12/05/2014) in Sydney, we were advised that no account from the hospital has appeared. It is now three weeks since the transaction...
If the hospital is run like hospitals in the US it can take a long time just to determine the bill. The hospital, Emergency room, ER doctors, surgeons, anesthesiologists, X-Ray department, pharmacy and laboratory are considered separate billing centers. It can take a while to determine the charges for each section. I...
0.888889
Is there an insurance company involved?
Interacting with openCPU
I've stumbled across an awesome open source project called openCPU.org and I'm tremendously excited about the project. As a research scientist trying to create a website hosting my work, I would love nothing more than to be able to run R on the cloud to have my scripts run in real time and show up on my webpages. So ...
OpenCPU uses HTTP POST to execute functions, and HTTP GET to read/render objects and graphs. You could start with saving your function to the temporary store, and then calling it from there. A basic example is given in the "/R/tmp API" chapter of the interactive manual. If you click the red demo buttons named save a fu...
0.777778
OpenCPU uses HTTP POST to read/render objects and graphs
How can I enable HttpOnly cookies in EE
Update: Thanks to Dom Stubbs, I have an extension to accomplish this now. It is up on devot-ee and also up on GitHub. Thanks Dom! The Original Question I am nearly through a security review of a new EE2 version of an existing EE1 site that I hope to launch soon. One of the final issues remaining is to make the coo...
For anyone else coming across this, ExpressionEngine 2.8.0 introduced a new config variable for httponly cookies, and it's set to 'yes' by default: http://ellislab.com/expressionengine/user-guide/general/system_configuration_overrides.html#cookie-httponly-config
0.666667
config variable for httponly cookies set to 'yes'
Many POST requests to /xmlrpc.php from GoogleBot taking down server?
I have several hosted wordpress blogs, and I've been trying to visit them and they are really slow. I looked at my server logs and I found this stanfordflipside.com:80 188.138.33.149 - - [17/Aug/2013:17:14:28 -0700] "POST /xmlrpc.php HTTP/1.1" 200 595 "-" "GoogleBot/1.0" stanfordflipside.com:80 188.138.33.149 - - [17/...
I would block the IP with iptables if it were me, and if you have that kind of server level access. You could also disable xmlrpc. Unfortunately, since 3.5 the admin screen option to disable that feature has been removed. A single line of code should disable it though: add_filter( 'xmlrpc_enabled', '__return_false' );...
1
xmlrpc disables admin screen
What do percentages mean on a BF3 server description?
I am a bit behind the curve, and just started playing BF3. I played BFBC2, and liked it, and enjoy what I see so far in BF3. The new server setup confuses me though. Since it appears that there are no more 'standard' servers (think BC2 or even most other games on the xbox like Halo or CoD), you can see a list of all o...
It means 500% increase in tickets per round. It essentially makes the rounds last longer because there are more tickets. See this for more details on how tickets work: http://www.battlefield.com/uk/battlefield3/blog/battlefield-3-battleblog-11
0.888889
500% increase in tickets per round
Should I include high school details in Grad School Resume?
I was wondering if I should include my high school details in the resume of my graduate school application ? It's unclear about this bit since we are not actually submitting any proof of high school records during grad school application( they only ask for undergraduate details). But my high school final examination de...
No You already explain why: they only ask for undergraduate details. The graduate school admission committees already have too many applications to look at. Donโ€™t over-load them Your idea is actually counter-productive. If your high school record is better than your undergrad credentials, they would wonder why your a...
1
Why is your high school record regressing?
Word for a result/achievement so exceptional that it is impossible?
I am looking for a word or phrase regarding something that is "impossible". I can't seem to put my finger on it, but I am trying to think of the word to describe something that is the top of the top, and thus impossible to achieve? The only two words I have come up with are elusive and formidable, neither of which re...
Unattainable Not able to be reached or achieved: an unattainable goal
0.888889
Unattainable Not able to be reached or achieved
Why don't spinning tops fall over?
One topic which was covered in university, but which I never understood, is how a spinning top "magically" resists the force of gravity. The conservation of energy explanations make sense, but I don't believe that they provide as much insight as a mechanical explanation would. The hyperphysics link Cedric provided loo...
The point is that conservation principles are not generally intuitive. For example, why should energy be conserved? One must have a grip of the dynamics involved in order to understand them. Anyway, the precession of the spinning top doesn't have to do with the conservation of angular momentum. It has to do with the ...
0.777778
Why should energy be conserved?
Using sketch to find exact value of trigonometric expression
Use sketch to find exact value of $\tan (\cos^{-1}\dfrac{5}{13})$ I drew a right triangle with angle $\theta$ and sides $12,5,3.$ If $\cos \theta=\frac{5}{13},$ then $\sin \theta = \frac{12}{13}$ and $\tan \theta = \frac{12}{5}.$ This isn't correct since tangent is greater than one. How would I solve this corre...
Print it and give it to your teacher. Or send him this link. Answer is $\pm\frac{12}{5}=\pm 2.4$
0.888889
Print it and give it to your teacher or send him this link
I want to travel to the USA while working remotely for my non-US employer
I would like to travel in the USA for a period of 3 - 6 months. But I want to spend some time working for my employer (remote work) and getting paid by the employer. Is this possible under a tourist visa (B1/B2)? I hope this is OK since I will not be getting paid by a US employer. I am in the IT trade so all that I wi...
Tourist visas do not allow you to work as employed in the issuing country. But, they do not prohibit you from doing your 'home' work while on vacation. So anyone from anywhere who is working on their laptop or smartphone while on short or long vacation is not under any penalty. You can do your work/ personal stuff th...
0.888889
What is your intended relationship with US/US Consulate/US Visa - as a tourist
"I wanted you to know that ..." is it mean or offensive
I am not a native English speaker. I am writing an email to my boss and I want him to know an important thing, so will it be ok to say "I wanted you to know that ...", it is offensive/mean etc in any sense ?
I don't find it offensive or mean. If you wanted to soften the language somewhat, though, you could use: I wanted to let you know that ... NOAD defines that idiomatic phrase as: let someone know inform someone You could also avoid the use of the word you by saying: I just wanted to say that... which ...
1
NOAD defines that idiomatic phrase as: let someone know inform someone
A alternative to install pairtaghighlighter for geany 1.23.21
I prove to install this plugin following the instructions of this post: HTML pair tag highlight alternative for Geany editor on Ubuntu 14.04 but, when I write sed -i 's/1.24/1.23/' wscript it says me this: fatal: destination path 'geany-plugins' already exists and is not an empty directory. What can I do? after...
This has nothing to do with sed -i 's/1.24/1.23/' wscript. This is an error message from Git. You start the command git clone https://github.com/geany/geany-plugins.git several times. Then Git complains. Example: $ git clone https://github.com/geany/geany-plugins.git Cloning into 'geany-plugins'... remote: Countin...
0.777778
Git clones 'geany-plugins' in a directory that is not empty
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 fo...
you didn't set gui session for xstartup file, that is why you see blank screen when try try to remotely connect to your desktop/server via vnc on ubuntu, if you want gnome, install these packages # apt-get install gnome-panel gnome-settings-daemon metacity nautilus gnome-terminal and use this xstartup file #!/bin/s...
0.777778
Install gnome-panel metacity nautilus on ubuntu
ListBox is selecting many items even in SelectionMode="Single"
I have encountered something very strange, simple WPF application <Window x:Class="ListBoxSelection.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="MainWindow" Height="350" Width="525"> <Gri...
Dan Bryant got most of the answer in his comment. What's going on here is string interning. When you create a bunch of strings with the same value, .Net saves on memory usage by having all references to the same string value actually refer to the same string object. (See this, for instance, for details.) I don't re...
0.888889
What's going on with string interning?
Interface options for specifying language prettify
I'm the maintainer for Google Code Prettify. Markup authors can specify the language for source code, but not markdown authors. Are the SO admins interested in a way of doing this? If so, might the following work If the first line is "#!" followed by one or more word characters, then make the first line invisible (...
Syntax Highlighting with โ€œCode Prettifyโ€ This is now implemented. See Stack Overflowโ€™s help on Syntax Highlighting. Specifying a language for syntax highlighting Besides tag inferences (a recent change), you can manually specify a language as a hint to Google Code Prettify. Hereโ€™s how: <!-- language: ยซlang-or-t...
0.777778
What is syntax highlighting and how does it work?
Why was the winner of the AES competition not a Feistel cipher?
The winner of the AES competition has a structure that does not qualify as a Feistel cipher, as explained in answers to this recent question. However, most many of the AES candidates, and all 3 out of 4 some other finalists (Twofish, MARS) are Feistel ciphers, if we define that as a cipher transforming a block of data...
As a page at ibm.com indicates, there could have been a bit of a "contra" attitude against Feistel ciphers thanks to DES having seen the first breaks in it's security etc. Down with the Feistel structure! In most ciphers, the round transformation has the well-known Feistel structure. In this structure typical...
1
Non-Feistel ciphers have a well-known Feistel structure
Create Valid XML from XSD Loaded at Runtime (without xsd.exe)
Possible Duplicate: Programmatically Create XML File From XSD XML instance generation from XML schema (xsd) How to generate sample XML documents from their DTD or XSD? Here's the scenario: I've created an application that hooks into a commercial CRM product using their web service API, which unf...
For others that wound up here: the best solution given the constraints, create XML at runtime and using .NET, is probably the first link: Is there a class to generate a sample XML document from XSD schema in .NET At least, that's what I am going to try :).
1
Is there a class to generate a sample XML document in .NET?
Is Cyrus the Messiah?
What are the actual words used for Isaiah 44:28 to describe his anointed? Why do most Bible translation translate that as shepherd? I've heard the Masoretic Text uses "messiah" and the Septuagint uses "Christ". The English translation uses the word "shepherd," which seems like lying or filtering. Why the discrepancy?...
The original Hebrew word being used here is ืจึนืขึดื™ (roยท'i),[1][2], which does indeed translate as "shepherd" according to Strong's Concordance.[3][4]
0.888889
Hebrew word "shepherd"
finding control in winforms panel
I need to find a child control in a winforms panel. I was wondering if there is a method similar to Panel.FindControl() of the asp.net webforms panel in the .net winforms version
You can achieve like this: mypanel.Controls.Find("mycontrolname",true); The documentation is here: Control.ControlCollection.Find Method
0.666667
Control.ControlCollection.Find Method
Why are my recovered images only 160x120 pixels?
I am trying to recover some lost images, and with all the programs I've tried, some of the photos resulted to be in a 160x120 pixel resolution. What does this mean, and is there any possibility to recover photos in original dimensions? Any help is appreciated.
The recovered images might be the thumbnails and not the actual images. Some of the image programs or browsers create the thumbnails from the actual images for displaying in the GUI. If you know any other attributes that might ascertain that the recovered image were, indeed, the actual images (location etc) then you m...
0.777778
The actual images are the thumbnails and not the actual images
Session Fixation - Setting path to root without /
I have found an XSS vulnerability on the subdomain of a site I am testing, and using it I can set cookies for both the main site and all it's subdomains. My url currently looks like this: http://s1.example.com/u/%22%3E%3Cmeta%20http-equiv=Set-Cookie%20content=%22sid=1234;%20path=/;%20expires=Thursday,%2020-May-15%20...
Remove the whole %20path=/ section - the HTTP response header should set everything at root level. If that doesn't work inside a meta http-eqiv, try the HTML encoded version of the path as because the content is in HTML should be correctly decoded (/). Alternatively you could inject JavaScript to set the cook...
1
Remove the whole %20path=/ section
hide javascript/jquery scripts from html page?
How do I hide my javascript/jquery scripts from html page (from view source on right click)? please give suggestion to achive this . Thanks.
It's virtually impossible. If someone want's your source, and you include it in a page, they will get it. You can try trapping right click and all sorts of other hokey ways, but in the end if you are running it, anyone with Firefox and a 100k download (firebug) can look at it.
0.888889
Firefox and 100k download (firebug)
Probability of a certain result obtaioned by throwing an octahedron
Assume having a fair octahedron. We throw it $93$ times and get the following results: $\{33;7;8;1;2;0;5;37\}$ The numbers represent how many times the die fell on side $1, 2,...., 8$. What is the probability we got such a result?
Use multinomial distribution with $p_i = 1/8$, $n=93, n_1 = 33, n_2 = 7, n_3 = 8, n_4 = 1, n_5 = 2, n_6 = 0, n_7 = 5, n_8 = 37$ for i = 1 to 8. The required prob = $$\frac{93!}{33!\cdot7!\cdot8!\cdot1!\cdot2!\cdot0!\cdot5!\cdot37!}\cdot{(\frac{1}{8})}^{93}$$ http://en.wikipedia.org/wiki/Multinomial_distribution
1
Multinomial distribution
display tag and c choose tag
I use the following code. But it is always go to the otherwise condition. I checked the value , and those are correctly passed from java to the jsp. Any missing points? <c:when test="${pCount > 0}"> <display:column class="colPCount" property="pCount " title="${titlePCount}" sortable="true" headerClass=...
Try this way: ${itemList.pCount>0}
0.888889
$itemList.pCount>0
Adding price-alert link to category list views
Normally the build in functionality goes just for a single product view as it has no i.e. setProduct() method. I already modded the module so every product can be set from category list/grid template which works as expected. As you shouldn't build your blocks hardcoded inside the template I want to move from a Mage...
As you might already figured out: Your problem is, you need a bunch of blocks, not a single one. Because you need for every product your own block. So you either achieve this, by setting the product in the registry (this might be done already by magento, please check) and then just use the product from the registry o...
1
Make sure that you don't save any product specific states in the block
Why are there mobs on my balcony?
I have a sweet ravine balcony, that I've lit up, and partially fenced off. It's not connected to anywhere that mobs could spawn yet, come night zombies are at my door creepers are lounging around and spiders are crawling around! I didn't invite them! Is there any reason for these mobs to spawn here when it's well...
If there is a tunnel connecting to the balcony that has some dark areas the mobs you encounter could be spawning there and be walking onto your balcony. If not then creepers could be climbing up the ladders and spiders can climb up walls as you probably know. Or the mobs culd be dropping off an above area to your balco...
0.555556
If there is a tunnel connecting to the balcony the mobs could be spawning there and be walking onto your balcony
Are there any versions of LQG that claim to not violate Lorentz symmetry?
LQG formulations have a minimum length/area. Since say, a Planck area can always be boosted, any minimum area in space can be shrunk. Do LQG proponents worry about local Lorentz invariance violation, and if not, why not? In LQG, does considering length to be a quantum operator really get rid of the boost problem?
This has been asked and answered before: see Does the discreteness of spacetime in canonical approaches imply good bye to STR? Also, this question has popped up many times on other sites such as physicsforums: http://www.physicsforums.com/showthread.php?t=281951 The answer is roughly that LQG does not in fact violate...
1
Does discreteness of spacetime in canonical approaches imply good bye to STR?
Would Esther really have kept silent?
In Esther 7:4 we read ื•ึฐืึดืœึผื•ึผ ืœึทืขึฒื‘ึธื“ึดื™ื ื•ึฐืœึดืฉึฐืืคึธื—ื•ึนืช ื ึดืžึฐื›ึทึผืจึฐื ื•ึผ, ื”ึถื—ึฑืจึทืฉึฐืืชึดึผื™--ื›ึดึผื™ ืึตื™ืŸ ื”ึทืฆึธึผืจ ืฉึนืื•ึถื”, ื‘ึฐึผื ึตื–ึถืง ื”ึทืžึถึผืœึถืšึฐ ... ... But if we had been sold for bondmen and bondwomen, I had held my peace, for the adversary is not worthy that the king be endamaged. Is this true? Had, in fact, the entire J...
The Meam Loez says that she meant that Achashveirosh shouldn't kill the Jews, as he would thereby lose out. Had the Jews been sold as slaves, Achashveirosh could have always changed his mind later on (once realized how useful the Jews are). However, once they would be dead, he couldn't have done anything.
0.888889
Achashveirosh couldn't kill the Jews if they were sold as slaves .
How does multitasking work
I am completely clueless about the inner workings of an operating system, but I can more or less guess the approximate behaviour of many functions. One thing that I am not able to figure out, though, is multitasking. In theory, the operating system manages time, according the CPU for small intervals to the various pro...
Timer interrupts can be generated by computer hardware to interrupt CPU. In this way, based on the scheduling algorithm used by Operating System, OS can decide whether to continue executing your current program or context switch to another one that is ready to run.
1
Timer interrupts can be generated by computer hardware to interrupt CPU
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?
Hrm... My first guess would be multithreading. For example, if you had your logic and render in the main loop, if logic takes a long time, you don't get anything rendered till it is done. With multiple threads, the render can be independant of the logic, and so evedn if the logic is bogged down, stuff still gets rend...
0.666667
Multithreading if logic takes a long time
What's the best way to generate an NPC's face using web technologies?
I'm in the process of creating a web app. I have many randomly-generated non-player characters in a database. I can pull a lot of information about them - their height, weight, down to eye color, hair color, and hair style. For this, I am solely interested in generating a graphical representation of the face. Currentl...
The way you are thinking to do it is fine. You should drop inhibitions about Flash and just use it. You aren't writing a bank system here, you're writing a single game. Even if it does have a sequel, Flash is still installed on pretty much every computer today. Just a note that the best face generator I've ever com...
0.888889
The way you are thinking to do it is fine. You should drop inhibitions about Flash
What are the reasons to mix oil & coolant?
Frontal impact vehicle is there fan motor touches the oil cooler,oil cooler slight impact is there, in coolant tank oil and coolant mixed, what are the reasons to mix the coolant and oil in this situation.
It's not unusual for a second radiator to be present behind the main radiator, often to cool the transmission fluid. If these fluids are mixing (water and transmission fluid), then both radiators have been damaged and are leaking their fluids together. Both radiators will need to be removed and repaired. Sometimes c...
0.888889
If a second radiator is present behind the main radiator, then both radiators have been damaged .
PHP getting cover image from Google Books API
I'm trying to get the image from Google Books service, in the thumbnail. Reading the address in php via file_get_contents get all the web page of the book while I just want to get the cover image. I know that it can be done via the src tag of html img element but I need the image server side. Is there a way? Thanks He...
sounds like you want something like this $dat = file_get_contents('https://www.googleapis.com/books/v1/volumes/H1w9AwAAQBAJ'); $arr = json_decode($dat,1); $info = $arr['volumeInfo']; $imagedata = file_get_contents($info['imageLinks']['thumbnail']); file_put_contents('/images/thumb.jpg', $imagedata); // just to se...
0.888889
$dat = file_get_contents
Robots.txt disallowing URLs
I need to disallow some URLs on my site but I am not sure how to do that. I have a site that has products and reviews. When someone makes a review, the site generates a URL automatically like this: mysite.com/addreview_1.htm mysite.com/addreview_2.htm .... mysite.com/addreview_9999.htm I need some way to disallow a...
The original robots.txt specification has no concept of "full" URL. Whatever you specify as value for Disallow is always the start of the URL paths you want to block. For example, see this robots.txt: # robots.txt for example.com User-agent: * Disallow: /foobar.html This will obviously block example.com/foobar.html...
1
Disallow is always the start of the URL paths you want to block
Removal of the incoming sms
@Override public void onReceive(Context context, Intent intent) { Bundle bundle = intent.getExtras(); SmsMessage[] msgs = null; if (bundle != null) { Object[] pdus = (Object[]) bundle.get("pdus"); msgs = new SmsMessage[pdus.length]; for (int i = 0; i < msgs.length; i++) { ...
Use This Code to delete last sms after recieving sms in your first activity class. Dont forget togive sms read and write permission in your mainfest file. Uri uriSms = Uri.parse("content://sms/"); Cursor c = getContentResolver().query(uriSms, new String[] { "_id", "thread_id", "address",...
0.555556
Use This Code to delete last sms after recieving them in your first activity class
Conscript won't install - what to do?
I'd like to started with Scalatra. For that, I need to use giter8 to generate a template project. To install giter8, I need to install conscript first. But doing that (at least using the runnable jar on Windows) fails with this error: :::::::::::::::::::::::::::::::::::::::::::::: :: UNRESOLVED DEP...
I'm not sure if Scala 2.11 is supported in conscript, so that's the first thing I'd try. Scalatra depends pretty heavily on conscript, so we'll need to check it out with 2.11 in Windows - I would imagine you're pretty much the first person who's hit this. You can of course set Scalatra up without using conscript, by ...
1
Scala 2.11 is supported in conscript, so check it out with 2.11 in Windows
Array of Fibonacci values; Value of high index turns array value into negative
I created an array called numbers that will store values of a Fibonacci sequence. 1, 2, 3, 5, etc. The problem is that when I try to call the array value at a very high index value, the array value becomes negative. numbers[10] = 144 which is reasonable but numbers[9999998] = -1448735941 Any help? public sta...
You are experiencing integer overflow. Take a look at BigInteger for one workaround.
0.888889
Integer Overflow
How are pixels actually shown on display
I spend a lot of time looking at raw-video in YCbCr-format. Started thinking about what is really shown on the display and how the pixels end up there. No display can handle YCbCr-data so I guess everything gets converted to RGB somewhere. YCbCr->RGB is however tricky business, see e.g. http://www.fourcc.org/fccyvrgb....
That's a lot of questions, I'll try to answer at least some of them. No display can handle YCbCr-data so I guess everything gets converted to RGB somewhere. All displays use RGB. On LCDs each pixel consists of three subpixels in three basic colors. So you're right, everything must be converted to RGB to be displa...
1
Is there a way to convert YCbCr to RGB?
Spice definition of resistor/capacitor
I am trying to understand a Spice definition of a circuit and transient analysis on it. I have kind of "inherited" this and can't ask the original creator; my Spice memories from university are pretty rusty, and online manuals have not been of much help. What I don't understand is the first segment here (snippet of wh...
Google search found that Micro-Cap Spice simulator does allow for .define keyword to be used. I understand that .define could be omitted from the code you showed with the following change: il 0 98 dc 0 ac 0 pwl (0s 1720.0a 692s 1726.0a 1385s 1716.0a 2077s 1720.0a 2770s 1726.0a 3463s 1724.0a 4155s 1712.0a 4848s 1720...
0.666667
Micro-Cap Spice simulator does allow for .define keyword to be used
How to access Event object inside javascript tag of Aspx page header content?
I am trying to fire a event from script inside aspx page. To fire a event I am using Event.observe() method. In that line I am getting error like "Event is not an object". Please help me inthis issue.Thanks in advance. My code: function Submitkeyword() { obj = document.getElementById("select");//select is bu...
Event.observe requires the Prototype JavaScript library loaded. If its not loaded and you try to use it you will get the error "Event is not an object" You need to include that in your <head> as follows : <script src="/path/prototype.js" type="text/javascript"></script>
0.888889
Event.observe requires the Prototype JavaScript library loaded
Saturated Density Plots
I am making some density and contour plots in Mathematica. These plots have very high peaks which saturate with color and prevent me from seeing differences in the peaks. Is there a way I can tone down the color scale so my peaks are not just white blobs? Trying other color schemes has not worked out, and playing with...
Borrowing Murta's data we can also try out Rahul Narain's Log recommendation: data = Table[Exp[-10 (x^2 + y^2)], {x, -1, 1, 0.02}, {y, -1, 1, 0.02}]; ListDensityPlot[data] ListDensityPlot[Log @ data] If your data is in the (x,y,z) form you will need something like {#, #2, Log@#3} & @@@ data as Kuba comments...
1
Using Murta's Log
What is the likelihood of ever discovering the graviton?
How would one look for and confirm existence of a graviton? Someone was speaking to me about perhaps one day discovering the graviton, but to me it seems unlikely, although I'm young and essentially quite naive, so am coming to you physicists to ask What actually is the likelihood of finding it? How would we find ...
This depends on graviton energy and wavelength. Given a source of a beam of high-frequency gravitons with high luminocity, it would not be difficult to detect one. The problem is that nature has little sources of high-energy gravitons.
1
a source of a beam of high-frequency gravitons with high luminocity
XNA 2D camera just part of screen
Is it possible to use the 2D camera, but just for a part of the screen? Perhaps I want some info on the screen about score and other things, but I want that at a fixed place, just like when not using a 2D camera?
Create a Vector2 called Camera. Say you want to show an object with respect to the camera, i.e. a non-HUD object, draw it at a position given by: DrawPosition = ObjectPosition - CameraPosition; For the score and other HUD stuff, don't consider the camera vector. DrawPosition = ObjectPosition;
0.777778
Create a Vector2 called Camera
Please help me in changing layout of all products page
can anyone tell me where can I change layout of this page i think this page is now having 3columns.phtml layout but I need 2columns-left.phtml layout please help me.
add the following code in your local.xml file <catalog_category_layered translate="label"> <reference name="root"> <action method="setTemplate"> <template>page/2columns-left.phtml</template> </action> </reference> </catalog_category_layered>
0.666667
Add the following code in your local.xml file .
Effects of nuclear explosions in space?
In the Honor Harrington universe, ship-to-ship combat takes two forms: missiles and direct energy weapons. Missiles come in two forms - bomb-pumped lasers and contact nukes. Both use multi-megaton nuclear initiations to damage enemy ships. While this sort of event on a planetary surface will obviously have lasting e...
The biggest hazard would have to be any macroscopic particles left over. Gamma rays, X-rays, and other ionizing radiation would spread out at the speed of light, or nearly so for electrons, alphas, etc., and within moments be less than the radiation that always present in space. After an hour, any such radiation will...
1
The biggest hazard would be any macroscopic particles left over .
How can you detect if the device is rooted in the app?
Possible Duplicate: Determine if running on a rooted device On Launch of the application, I want to detect if the device running is rooted. Is there proper way of detecting it? I don't think trying to write a file to '\data' to see if rooted is a good solution. (Since even rooted devices may have that path ...
you could try to do Process proc = Runtime.getRuntime ().exec ( "su" ); if that throws an exception or proc is null then they don't have root
0.333333
Process proc = Runtime.getRuntime
Application deployment using MDT with no access to network.
Is it possible to install ONLY software using MDT via USB? I don't want to deploy OS as don't want to lose the licence. I would like to achieve this scenario: Laptop with installed Windows 8.1 USB stick with MDT on it is plugged in I run silent deployment of software using the wizard. Other bits to clarify: I don...
Read this and ignore the OS part. http://www.vkernel.ro/blog/creating-an-offline-mdt-deployment-media
1
Read this and ignore the OS part
Display a field of a node that is referenced on another node via a relationship
I have two content types, "Stores" and "Offers." In the "Offers" content type, there is a CCK node reference field type that references the "Stores" nodes. So essentially, I create a store and if the store has an offer, I create the "Offer" node and select the store with which it is associated. I have a view (a defau...
I finally went with something similar to Stefan's answer. I created a module using hook_views_pre_render that checks the correct table against the node id to see if there are any related nodes. The code is shown below. <?php /** * Implementation of hook_views_pre_render() */ function gretna_views_pre_render(&a...
0.888889
hook_views_pre_render checks the correct table against the node id
C#: Is it possible to have partial extension classes
I am looking to create Extension classes that extend Entity Framework Entities in a different assembly to the EF Entities. I also want to code gen some additional/generic methods in an extension methods class (using T4), then have the ability to create a partial extension methods class with additional custom methods. I...
You don't need them. Just write another extension class. namespace Namespace1 { public static class MyEntityBlibblingExtensions { public void Blibble(this MyEntity self) { // ... } } } Then, elsewhere... namespace Namespace2 { public static class MyEntityFurtlingE...
0.555556
putting extensions inside classes is a bit of a hack
Maximum absolute value of polynomial coefficients
Suppose we have a polynomial in integer coefficients $$p = p_0 + p_1 x + p_2 x^2 + \ldots + p_n x^n, p_k \in \mathbb{Z}$$ Now define $M(p)$ as the maximum absolute value of the coefficients of $p$, i.e. $$M(p) = \max \{|p_k| \: |\: 0 \leq k \leq n\}$$ Is it true that for any polynomial factor $q$ of $p$, $M(q) \le...
No. There is a famous example of a factor of $x^{105}-1$ \begin{align} \Phi_{105}(x) = & \; x^{48} + x^{47} + x^{46} - x^{43} - x^{42} - 2 x^{41} - x^{40} - x^{39} + x^{36} + x^{35} + x^{34} \\ & {} + x^{33} + x^{32} + x^{31} - x^{28} - x^{26} - x^{24} - x^{22} - x^{20} + x^{17} + x^{16} + x^{15} \\ & {} ...
0.666667
Factor of $x105-1$ beginalign
How can I add a director name in line with author name in beamer?
I would like to write director name in line with author name in a beamer like: \author{Made by:\\Author name} \director{Directed by:\\Director name} but if I try to define director: \def\director#1{\def\Director{#1}}\director{Director's Name} Then it writes on the top of the first frame. Any suggestions?
You can adopt an approach based on columns environment: \documentclass{beamer} \usepackage[T1]{fontenc} \usetheme{CambridgeUS} \title{My title} \institute{My institute} \author[Author name]{Made by:\\Author name} %<= used the short author name [] for the footline \newcommand{\director}{Directed by:\\Director name}...
1
Using the short author name for the footline
Create an "All Posts" or "Archives" Page with WordPress 3.0?
I'd like to create an "All Posts" page on the Ocean Bytes blog that contains an unordered list of all Titles of the posts to date, with each title hyperlinking to its blog post. There appear to be several plugins that do something like this, but most do not list Wordpress 3.0+ as supported yet, or they want to subset ...
I ended up creating a page template called "allposts-page.php" in the Twenty-Ten Themes folder containing the following code: <?php /** * Template Name: All Posts * * A custom page template for displaying all posts. * * The "Template Name:" bit above allows this to be selectable * from a dropdown menu on the ...
1
Template Name: All Posts - Page.php
App drawer on stock Android not alphabetized
I have a Nexus 4 with stock Android and no modifications. I installed a flashlight app and for some reason it is first in my app drawer despite it starting with a "f" and not an "a". As a developer I find this intriguing. Does anybody know how this developer managed to put his app first in the drawer or is this some ty...
I can't say for sure, but there's probably a zero-width non-breaking space, or some other invisible or unprintable character, at the start of the label, causing it to sort ahead of normal characters.
0.888889
Null-width non-breaking space, or other invisible or unprintable character at the start of the label
up sample and down sample
Let's say that I have a sampled signal x[n], it is being, in this exact order, up sampled by 2, down sampled by4, up sampled by 4 and down sampled by 2 to produce y[n]. It seems to me that it should be pretty self evident that since we up sampled the signal by 2 and down sampled it by 2, then up sampled it by 4 and do...
The downsampling by a factor of 4 can introduce aliasing (because you upsampled only by a factor 2 in the first stage). If this is the case, it cannot be undone by the following upsampling operation. So in general this system will not produce at its output the original input signal $x[n]$.
0.666667
The downsampling by a factor of 4 can introduce aliasing
If $a$ is a quadratic residue of odd prime $p$, then is it the case that $a^{-1}$ is also a quadratic residue?
If $a$ is a quadratic residue of odd prime $p$, then is it the case that $a^{-1}$ is also a quadratic residue ? I notice quadratic residues of odd prime $13$ : $$1^2\equiv 12^2\equiv 1\\2^2\equiv 11^2\equiv 4\\3^2\equiv 10^2\equiv 9\\4^2\equiv 9^2\equiv 3\\5^2\equiv 8^2\equiv 12\\6^2\equiv 7^2\equiv 10$$ $4^{-1}=1...
If $a^2 = b$ in a ring $R$ with unit, $a$ is invertible if and only if $b$ is and then $b^{-1} = (a^{-1})^2$. (Tell if this is clear to you, if not, I'll detail in an edit.) Apply this to $R = \mathbf{Z} / n \mathbf{Z}$. Apply the latter to the case $n = p$ is prime. ;-) Detail. If $a$ is (for instance left) invertibl...
1
If $a2 = b$ in a ring $R$ with unit, $a$ is invertible if
Reading XML file and fetching its attributes value in Python
I have this XML file <domain type='kmc' id='007'> <name>virtual bug</name> <uuid>66523dfdf555dfd</uuid> <os> <type arch='xintel' machine='ubuntu'>hvm</type> <boot dev='hd'/> <boot dev='cdrom'/> </os> <memory unit='KiB'>524288</memory> <c...
I would use lxml and parse it out using xpath //UUID
1
Parse lxml using xpath //UUID
Keyword not supported in SQL Server CE connection string
I'm trying to connect to a SQL Server CE database in a C# web application (VB 2012) using this connection string: using (SqlCeConnection conn = new SqlCeConnection(@"Data Source|DataDirectory|\MyData.sdf; Persist Security Info=False;")) The problem is that I am getting an exception that the data source|datadirectory...
I think you're just simply missing an = sign: Data Source=|DataDirectory|\MyData.sdf; Persist Security Info=False; * ***
1
= sign: Data Source=|DataDirectory|MyData.sdf
Preventing Superscript from being interpreted as Power when using Ctrl+^ shortcut?
I have very strong desire to use superscript as the index of the variable. However, it looks like that the Mathematica automatically recognize the superscript as the power and I got message that my variable with superscript is 'protected'. Could you help me to make the superscript used as the index of the variable in...
Superscript is not interpreted as Power: Presumably you are referring to what happens when you enter a power in superscript notation using the key combination Ctrl+6. Mathematica is capable of representing both this power notation and a formatted plain Superscript. In my opinion it is a failing that the power nota...
0.666667
Input alias: Palette Input Aliases
Interpretation of riemannian geodesics in probability
Good morning everybody. My question is, as maybe already hinted in the title, rather philosopic. We know that geometric properties of a riemannian manifold can be interpreted in terms of certain evolution processes; I'm thinking about all the relations between the expansion of the heat kernel and, for example, the gau...
Check out: Franchi and LeJan, Hyperbolic Dynamics and Brownian Motion: An Introduction
0.888889
Franchi and LeJan, Hyperbolic Dynamics and Brownian Motion
Any connection between akimbo, askance and atremble?
I came across akimbo and askance today and wondered if they were related, with the opening 'a' signifying something. Apparently not: Akimbo โ€” to stand "with hands on hips and elbows projecting outwards", from the C15 in kenebowe, "literally: in keen bow, that is, in a sharp curve" Askance โ€” to look sideways, obliquel...
This is actually a matter of general reference that should be easily explained by consulting any dictionary worthy of being called such โ€” and certainly can be found in The Dictionary, if one would but look. But I will explain it anyway. :) English has at least 6 different prefixes, a-. This, however, is not one of th...
1
The Dictionary says of askance adv.
How to measure a crooked room?
I am faced with the task of measuring a room that has no right angles. The room has the following layout (this sketch in not scaled, there is also a window in the right wall which I omitted here): I want to measure the room as accurately as possible, because I want to create a plan for a friend who is a carpenter to...
Forget it!!!! Trying to measure an untrue room for prefabrication of parts is nearly impossible. Your carpenter will have to come in, establish a center line in both axis and divide the differences on the edges. This application is no different than doing a suspended ceiling, and must be done on site. There will be a...
1
Trying to measure an untrue room for prefabrication of parts
Word to describe "a person who is only wishful to help others and cares little about themself"?
Specifically, I am looking to describe a person whose only purpose is to help others, not caring about what happens to himself or herself (physically or otherwise), though without actively seeking pain.
Selfless Having, exhibiting or motivated by no concern for oneself but for others; unselfish. Also altruistic. See http://en.wikipedia.org/wiki/Altruism
1
Selfless Having, exhibiting or motivated by no concern for oneself
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.
I thought it would be useful to include an image/link to some drive types found on screws and bolts (obtained from bontool):
1
Image/link to some drive types found on screws and bolts
Password sending through network
In case of no TLS/SSL available, why can't I use the hash of the password (SHA512) as the key to encrypt the password (with out any salt) to send through the network ? MITM attacks I can understand, but what are the other possible attacks ?
SSL's only purpose is to stop Man in the middle from happening. Not having SSL/TLS just means you can't have: Confidentiality Integrity Furthermore the password is just a token used for authentication, it's not required to have the actual password if the access token is the hash. You can perform a repeater/replay a...
1
Pass-the-hash attack
Possible to remove p tags from a table cell in Wygwam
I have a problem that occasionally a <p> tag is being added to a table cell, usually when someone pastes something into it. Is there a way to remove that <p> and just have the cell be an empty <td> or <th>, ideally without editing the source? Is there an option that could be added through th...
If the reason is appearance, you can remove any margin/padding formatting with css, like: table p {padding:0; margin:0} Or you can add specific classes to the styling menu of wygwam for tables, for a more fine grained control over styling tables.
0.5
Edit margin/padding formatting with CSS
Facebook Redirect url in ruby on rails open ssl error
I have followed the omniauth devise facebook app as explained by Ryan in episode 235.After the user authorizes we are getting the error at http://localhost:3000/auth/facebook/callback?code=13444... The following are the facebook settings : App Domain : localhost siteurl: locahost:3000/ canvas url: http://loca...
In one project, we had to add this code to config/environments/development.rb to get Facebook connect working for local development: OpenSSL::SSL::VERIFY_PEER = OpenSSL::SSL::VERIFY_NONE
0.833333
config/environments/development.rb to get Facebook connect working for local development
If NASA could send a camera into a black hole, could we then see what's inside the black hole?
Inspired by Stephen Hawking I recently tripped upon an idea of what is really inside a black hole. I thought if NASA (or any other space agency) could send a super protected camera into a black hole, then we could see what's inside black hole. Is this even possible?
No, not even light can escape a black hole, therefore radio will be unable to broadcast signals back to Earth. (Radio is a form of light)
1
No, not even light can escape a black hole
Meaning of ladder points
Last night, we had a discussion regarding promotions on the ladder. One of the issues where whether the points have influence on promotion or not, and neither of us can find legit facts to the points on the ladder. We couldn't find any facts regarding the points at all, besides the fact that it ranks you on the ladder....
Ladder ranking (LR) is (presumably) like hidden Matchmaking Rating (MMR), but offset by an unknown amount, and inflated by Bonus Pool. Ladder ranking changes similarly to MMR, rising and dropping depending on the relative strength of your opponents, but it becomes offset by following factors: LR has different "zero ...
0.555556
Ladder ranking (LR) is similar to hidden Matchmaking Rating (MMR)
Windows 7 lookups on first host file entry
Today my ISP blocked my internet due to suspicious activity - outgoing requests to malicious websites. Numerous scans of my machine couldn't reveal the culprit. However, after doing a quick netstat /f I found the following: TCP 127.0.0.1:5357 101com.com:49168 TIME_WAIT TCP 192.168.1.21:49169 TH...
First, let's make something clear. hosts file doesn't prevent domain name resolution, it only overrides what domains resolve to. When some program tries to resolve 101com.com, your OS would normally query DNS servers for its IP address. But, if you have it in your hosts file, then 101com.com will be resolved to provid...
1
How can we explain 101com.com in netstat's output
Link directly to a tab in adminhtml tab widget
Is it possible to link directly to a tab on a backend page, using URL fragments? In particular, I want to link to the "Manage Label / Options" tab on the "Edit Product Attribute Page": I hope for something like /admin/catalog_product_attribute/edit/attribute_id/1/#product_attribute_tabs_labels where the URL fragmen...
Actually it's possible with a URL parameter ?active_tab=$id. How to find the right tab id Find the responsible tab container class. This is a child class of Mage_Adminhtml_Block_Widget_Tabs, in my case, Mage_Adminhtml_Block_Catalog_Product_Attribute_Edit_Tabs. You'll find calls to $this->addTab(), usually in the ...
0.888889
How to find the responsible tab container class
asynchronously loaded images in uitableview disappear on scrolling up
i am able to fetch images asynchronously on to uitableview.i am fetching these images are from a url.on scrolling up uitableview these images disappear and they take time to load again and sometimes they dont load at all.i dont want to use any 3rd party libraries.i dont want to go with synchronous approach.please sugg...
It seems like your reuse code contains bug, which causes everytime to create new cells. The following code uses reuseIdentifier as @"identifier" if (cell == nil) { cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:@"identifier"]; } Change it to: if (cell == nil) { cel...
0.888889
reuseIdentifier is @"identifier"
Heathrow Customs - "Arrivals from the EU" exit
At Heathrow, after collecting your baggage, there are three exits. Green - nothing to declare Red - something to declare (not sure of text) Blue - arrivals from the EU What is the blue one for? Is it if you have something to declare, and have come from an EU country? I saw no signage to tell me when I w...
The blue channel is for travelers from the EU who have nothing to declare. If you have something to declare you should in any case go through the red channel. The difference between travelers coming from the EU and other travelers is that some procedures like declaring cash are unnecessary and the limits, e.g. for alc...
0.888889
The blue channel is for EU travelers who have nothing to declare .
A deferred capital gains tax similar to the real estate 1031 Exchange but for securities reinvestment?
I am looking for a way to transfer a stock that has done well into a safer investment (like an index fund). I assume the only way I can do this is sell the stock, pay the tax owing, and buy new stock. I do remember reading something about you can transfer the ownership of the stock (e.g. into a Children's Trust) but n...
Sale of a stock creates a capital gain. It can be offset with losses, up to $3000 more than the gains. It can be deferred when held within a retirement account. When you gift appreciated stock, the basis follows. So when I gifted my daughter's trust shares, there was still tax due upon sale. The kiddy tax helped reduc...
1
Sale of a stock creates a capital gain, which can be offset with losses .
Adding seconds to mysql DateTime via php
Im trying to add 12 seconds to a mysql datetime object via php. My php code generates the following query: "UPDATE Stats SET Usage = 1970-01-01 00:00:12" however the query fails. My php code is as follows: public function UpdateTime($diffrence) { $seconds = $diffrence / 1000; mysql_connect('localhost','user...
This is likely related to missing quotes in your query. Check out the answer to this question. UPDATE Stats SET Usage = '1970-01-01 00:00:12' You should surround the date time value passed in single quotes.
0.888889
This is likely related to missing quotes in your query
Why doesn't Owen Lars recognize C-3PO during ANH?
As shown in this answer, Owen and Beru Lars should be very familiar with C-3PO (he stayed with Shmi Skywalker till her death, and was present at her funeral). Yet, Lars (not sure if Beru saw him during ANH) never recognizes C-3PO in the first part of A New Hope, despite presumably having lived with him during the time...
Because George Lucas doesn't have a clue, it really can not be made sense of in any other way. It just doesn't make sense, because: 1) The only reason Owen would not recognize C-3PO is if 3PO is, as suggested, one of a mass-produced series of droids. However... 2) C-3PO was not part of a mass-produced line, he was ...
1
How do the droids not remember who Obi-Wan is when the message is recorded?
Is there a comprehensive life science techniques/methods database?
There are so many techniques/methodologies in the life sciences that we can use to interrogate interesting questions. The thing is, most of us are completely unaware of the available methods we can employ. Rather, we go with the techniques we are familiar with or that are popular in our subdomains at the time. But that...
There's Benchfly, which is a video-based protocol library: http://www.benchfly.com/video-protocols.php There's also JOVE, which is a peer-reviewed video journal that sometimes covers protocols: http://www.jove.com/
0.888889
Benchfly is a peer-reviewed video-based protocol library .
Understanding of Relays and associated circuitry
I needed a simple understanding of how this circuit works. I understand everything about this circuit apart from the diode. I also know the function of the diode is to protect the transistor but from what exactly? Is it something to do with back EMF from the coil? I'm not too sure. Also I needed to confirm if the re...
First the diode. An inductor resists to changes in current. So if you switch off the transistor the relay coil will try to keep the current flowing, it becomes a current source. If there would be a low resistance path that would only create a low voltage, according to Ohm's Law. But if there's no way out for the curren...
0.666667
The diode provides a low resistance path to changes in current
Trying to recreate graphic from image as a vector
I am trying to recreate the rings from the following image into a vector graphic. I have made several attempts using various shapes and the pen tool with no luck. Any help on which steps I could take would be greatly appreciated! Here is the image in question (on pinterest):
You simply draw one ellipse. Duplicate it. Draw a rectangle for the sides. Then use the Shape Builder Tool to combine specific pieces (Holding the Option/Alt key down with the Shape Builder Tool will remove parts.) Then add color.
0.888889
Draw one ellipse.
Why are my recovered images only 160x120 pixels?
I am trying to recover some lost images, and with all the programs I've tried, some of the photos resulted to be in a 160x120 pixel resolution. What does this mean, and is there any possibility to recover photos in original dimensions? Any help is appreciated.
As others have noted, you are seeing "thumbnails". The originals are very likely to be there and depending on what was done to the storage medium after the photos were written, some or all may be still recoverable. File recovery programs vary widely in capability. Some are fully free, some cost substantial money. ...
1
File recovery programs are as good as you could hope for
Can an affidavit be used in Beit Din?
An affidavit, from what i understand, is basically a signed document given by a witness to be used as evidence in a trial, without the witness themselves needing to take a stand. Can an affidavit be used in Beit Din? Or must witnesses take the stand in person for their testimony to count? (In case i'm misunderstandin...
Sending an "affidavit" it is a dispute between Rashi and Rabbeinu Tam. Devarim 19:15: ืœื ื™ืงื•ื ืขื“ ืื—ื“ ื‘ืื™ืฉ ืœื›ืœ ืขื•ืŸ ื•ืœื›ืœ ื—ื˜ืืช ื‘ื›ืœ ื—ื˜ื ืืฉืจ ื™ื—ื˜ื ืขืœ ืคื™ ืฉื ื™ ืขื“ื™ื ืื• ืขืœ ืคื™ ืฉืœืฉื” ืขื“ื™ื ื™ืงื•ื ื“ื‘ืจ Rashi: ื•ืœื ืฉื™ื›ืชื‘ื• ืขื“ื•ืชื ื‘ืื’ืจืช ื•ื™ืฉืœื—ื• ืœื‘ื™ืช ื“ื™ืŸ And not that they write their testimony in a letter and send it to Beis Di...
0.888889
Sending an "affidavit" to Rabbeinu Tam
Using a ski helmet for winter biking
I am curious if anyone uses a skiing helmet for winter biking? Would this be safe? Are skiing helmets designed to protect you from the same kind of accidents that you would have on a bike? My thinking is that a ski helmet would: Help to keep your ears warm Would fit well with ski goggles (which fit poorly with my ...
I wear a Bern Brentwood with a winter liner in cold weather. It's a certified bike helmet, but designed more like a ski helmet. The winter liner does a great job of keeping my ears warm without wearing any other protection, but doesn't block traffic noise. It is vented, but not well enough that it makes my head cold. I...
1
Winter liner keeps my ears warm without wearing any other protection
reference a view page with entity reference
I have an entity reference field for referencing and rendering a teaser display of nodes. I would like to be able to include a View page in the list. I this possible in some way?
View Reference Module makes it possible Defines a field type View reference which creates a relationship to a Views display and allows the view to be displayed as the content of the field. OR Entityreference View Widget Module is another solution This module provides an advanced Entity Reference widget t...
1
View Reference Module allows Views to be displayed as content of the field
Finding Facebook profile ID from an image URL
I was forwarded an anonymous concern about a photo or group site. I want to find the user id as the photo appears to have been removed. The link is https://www.facebook.com/photo.php?fbid=10155011880340063&set=gm.891218424251397&type=1&theater. From that URL, is there a way to find the Facebook user?
If the photo has been removed there will not be a way to trace back to the ID (that's a good thing in terms of privacy) https://www.facebook.com/photo.php?fbid=10155011880340063&set=gm.891218424251397&type=1&theater broken down is fbid=10155011880340063 The Photo ID gm.891218424251397 The Group Permalin...
1
If the photo has been removed there will not be a way to trace back to the ID
How can I make an X-Y scatter plot with histograms next to the X-Y axes?
I just saw a nice plot there: How could I implement that in Mathematica โ€” by which I mean the plot structure, not so much the styling.
This doesn't have the styling and it doesn't yet enforce the plot ranges or implement the regression line, but it's a start: fakeBloombergThing[data:{{_?NumericQ, _?NumericQ}..}] := Grid[{{Histogram[data[[All, 2]], BarOrigin -> Left , AspectRatio -> 5, ImageSize -> 80], ListPlot[data, Frame ->...
1
FalseBloombergThing[data:_?NumericQ, _?numricQ]
Multiple orders in a single list
I have a problem with a ranking system I am using. Scenario: An online game with around 10k players calculates a real time ranking of points when a certain event occurs. Events don't occur that often, around 1 time per minute. This ranking is kept in the cache for quick calculations, sorting and access. Now players ...
As you say yourself, the best solution is to do the counting in the output, instead of storing it in the various lists. That way you don't have to store (and recalculate) the ranking numbers on each event for each (sub-)list, but you only calculate them when needed. For the "You are on position # in the ranking" text,...
0.555556
Calculate the ranking numbers in the overall list
How do they shoot long underwater scenes (especially the even longer stylistic ones)?
How do they shoot the music videos where people are singing inside water? What confuses me if that is plain special effects is their clothes, they behave exactly how clothes behave in water. The motion of the cloth is slow, like it's supposed to be in a fluid, whereas the motion of the person is normal (or slow, but ...
It really depends on the film, but the best example I can think of is the James Cameron's The Abyss, and I suspect they did the same thing in the music video you mentioned. As detailed in this Time article about the film, there is a large tank of water for the scene to be filmed in, with all the crew using oxygen tank...
1
James Cameron's The Abyss is an underwater oxygen refilling station .
C++: Access embedded resource from dll
I have a c++ dll project, in which, I have embedded some raw data through "resource.rc" file. IDR_TEMPLATE1 RCDATA "areaTemplate.bin" Now I want to access the data of "areaTemplate.bin" file from the dll. How can I read the contents of "areaTemplate.bin" in a byte array?
As Manuell says, you use FindResource(), LoadResource() and probably LockResource() and SizeofResource() I happen to have some code which does pulls out a resource and writes it to a file, and may help with your understanding of the API in question. void WriteResourceToFile( HANDLE hFile, const _tstring &re...
0.777778
FindResource(), LoadResource, LockResource and SizeofResource.