summary
stringlengths
15
147
text
stringlengths
1
19.3k
answer
stringlengths
32
22.6k
labels
float64
0.33
1
answer_summary
stringlengths
5
164
Can one say kiddush levana by day?
Can someone say "kiddush levana" by day if he sees the moon clearly, in full? Or is there a reason why we only say it in the evening other than the fact that the day starts at night.
The Rama rules that one can only recite Kiddush Levana "at night when the moon is shining and we benefit from its light" (OC 426:1).
0.888889
Rama rules that one can only recite Kiddush Levana "at night when the moon is shining and we benefit from its
Battery Drains Every 1-3 Weeks
I have been experiencing a slow draining of the battery for the past 1-2 months wherein the vehicle will be fine and suddenly the vehicle will not start. First thought was the battery, as the vehicle has about 90000 on it. I could have tested it, but didn't; just bought another one thinking it would save the trouble soon enough if it wasn't the battery. On installing the battery, I checked for the usual: lights left on, doors left open, etc. But there was nothing out of the ordinary. Two weeks later, the new battery drained. I charged up the old one swapped it in. One week later, that one was drained. Determined now that it was not the battery, I searched high and low for some good tests. I did a ground test (all less than 2-1ohm), point to point resistance check(all 1-2ohm), parasitic draw test (30mA after entering sleep mode), and charging voltage test. Everything looked satisfactory. The only thing that I noticed was, if I left the nominal voltage charging test run, for minutes, I would slowly watch the voltage creep down. After twenty minutes I was seeing 13.8V after starting at 14.3V (measured across the battery terminals). I ran out of time to swap out the battery on my multimeter (thinking this might be the culprit), so it could just be that. But, I'm curious. Does a slow fall of the charging voltage (across the battery terminals) indicate an alternator problem? Belt tensioner problem? Looking for thoughts on this slow decline in charging voltage across the battery to determine where to dig into next. I didn't see how low it could go, but if the community thinks it's worth a shot, I'll do it (even if it means an hour to find it). The vehicle: '08 Nissan Rogue, AWD. 90k miles.
I would place this as being an issue with the alternator. Take it in and have it checked, but I bet the reason is one (or more) of the diodes in the alternator is not working, which does not allow for a charge to occur correctly. Any of the major parts chains (AutoZone, Advance Auto, O'Reilly's, etc.) can and will check it for you for free. This seems like normal behavior for an alternator with issues.
1
AutoZone, Advance Auto, O'Reilly's
If $f(x) \in F[x]$ is a polynomial solvable by radicals, does this imply that its Galois group is solvable when $F$ has characteristic $p > 0$?
We know the following theorem from Galois theory: Let $F$ be a field of characteristic $0$ and $f(x) \in F[x]$. Then $f(x)$ is solvable by radicals if and only if the Galois group of $f(x)$ is solvable. For fields of characteristic $p > 0$ one direction of this theorem is not true. We could take $F = \mathbb{F}_p(t)$ and $f(x) = x^p - x - t \in F[x]$. Then the Galois group of $f(x)$ is $\mathbb{F}_p$ which is solvable, but $f(x)$ is not solvable by radicals. What about the other direction? If $f(x) \in F[x]$ is solvable by radicals, is the Galois group of $f(x)$ solvable even when $F$ has characteristic $p > 0$?
There is a possibility the the polynomial is not separable, and hence has no Galois group. The standard example is $F=\mathbb{F}_p(t)$, $f(x)=x^p-t$. Here $f(x)$ is solvable by radicals, as $z=t^{1/p}$ is its only root, of multiplicity $p$. But the splitting field of $f(x)$ is $F(z)$, and that is not a Galois extension of $F$.
0.666667
Polynomial is not separable, and hence has no Galois group
JavaScript to paste form input in-line into body text
I have an HTML form with input text fields which i would like to have pasted back into the HTML body resulting in a text string returned by a JavaScript function i.e. in the place where the input fields are sequentially. A simple example would be: <html> <body> This is the first field <input type="text" id="first"/> and this is the second <input type="text" id="second"/> one. </body> </html> When i now view this page and enter ABC into field 1 and XYZ into field 2, i'd like to know how to use JavaScript to create a piece of text like so: This is the first field ABC and this is the second XYZ one. So just to be clear, the web page itself need not change dynamically, i only want to be able to call the JavaScript function from elsewhere and then get the resulting text back with whatever is currently entered, pasted into the body text. Any help much obliged. Tiaan
You can use the DOM to loop through the child nodes of body (probably recursively), collecting the nodeValue properties of the text nodes (those are the bits containing "This is the first field " and such) and, where you encounter an input element, getting its value property instead. Build all of that text up into a string and you're there. Some references: DOM2 Core DOM2 HTML DOM3 Core HTML5 Web Application APIs
0.777778
Use the DOM to loop through the child nodes of body
Should I tell other interviewers where else I've interviewed?
I am currently travelling for faculty interviews. Some professors and other interviewers have asked me where else I have interviewed. Should I tell interviewers where else I've interviewed? Intuitively I would like to give them less information, but I also don't want to appear guarded and defensive as a person, either.
I don't know about regulations here. Personally, I think that being open and honest is the best thing (and this is how I handled it). Telling that you have been interviewed for some other positions shows that other committees consider you as a possible candidate which is good for you, especially if you have been interviewed at places with higher prestige. One the other hand, I do not think that a committee will think "Oh this guy has been interviewed there, so we should we hire him...". But probably I am wrong. Moreover, I agree that it does not harm to say that you do not want to disclose your other interviews.
0.888889
Telling that you have been interviewed for other positions shows that other committees consider you as a possible candidate .
I can't get MySQL56 service to start after i stopped it
I am having an issue on my server. I am running MySQL on Windows Server 2008 R2. I have done some changes to my.ini file so I had to restart the MySQL for the changes to take effect. and when I went to services and tried to start MySQL56 windows gives me this error: Windows could not start the MySQL56 service on Local Computer. Error 1067: The process terminated Unexpectedly. I tried rebooting my server and that did not work. I restored the changes that I made to my.ini and that did not work. What can I do to bring MySQL back up?
I had the same issue the other day. Try this, it should work! Right click on MySQL Notifier -> Actions -> Manage Monitored Items Highlight the MySQL56 entry and click the delete button Click the add button -> windows service Scroll down and look for MySQL56 Highlight it and click ok
1
MySQL Notifier -> Actions -> Manage Monitored Items Highlight
Flying and sorcery
Rashi (Sanhedrin 44b, s.v. D'ba'ya) relates the story of Shimon ben Shetach's capture of 80 witches. He instructed his students to pick up the witches because the sorcery would be powerless against the students if the witches were ungrounded. Is this to say that sorcery does not work unless the practitioner is grounded? If so, how can we interpret the Midrash (Bamidbar Rabba, 20:20) that states that Bilaam used sorcery to fly through the air?
Perhaps one need be grounded only to cast the spell (as @DoubleAA said here). If so, Bilaam could have cast the spell on the ground. They were then able to fly, which they did.
0.777778
If so, Bilaam could have cast the spell on the ground
Adapt fatFS library to PIC32
I'm developing an application with PIC32MX, that record 3 WAV sounds and store theme into SD. Unfortunately the speed that I have reach is 155 kB/s and is insufficient for my application. Then I have to move fatFS, that use multi sector write speed wich seems to solve my problem. I download the latest library for fatFS here (bottom of the page). I read on the internet that this code is generic and only some part of code needs to be adapted, based on microcontroller in use. I have spent many time trying to understand what are this portions of code, but I still dont'find theme. Anyone can help me? EDIT: Finally I understand how to modify the fatFS for adapt it to my system. But I have a little poblem. After I properly modified the "platform dependent" section with correct SPI and chip select pin, I tryied to compile. I obtained an error about windows.h and tchar.h, included in file integer.h. But in integer.h I see the ifdef, and I want compile the "embedded" section, not the windows section. If I try to delete the ifdef, I obtained this error: " ';' expected but 'fs_type' found ". This come from typedef struct of ff.h. On internet there are project with the identical structure, why this doesn't compile?
Microchip Harmony and MLA both contain good fast file access libraries, supporting multiple backing stores including SD, MMC, CF-II, USB MSD, etc. I suggest you give them a go since they are already tailored to the PIC32 chips.
0.777778
Microchip Harmony and MLA both contain good fast file access libraries .
Adding merchants/sellers to magento site
We have to add sellers/merchants to our site. It means, through our site, sellers have to sell the products & we have to get commission from the sellers. demo example : https://seller.flipkart.com/ If there are 5 sellers , buyer have to see all 5 sellers in checkout page or related page. Also Buyers have to check the nearest shop to buy the product using pin code or search box. after they selecting nearest store, than products list should display. IS there any good extension for this. please guide me.
There are lots of extensions available to serve your purpose Google "magento marketplace extension" If you are using free extension, then modifications on those free extensions will definitely help you to achieve exactly what you want Theming, designs improvements also can be done over those modules If you want your customers to search the nearest shop using pin code, http://www.magestore.com/magento-store-locator-extension.html http://www.fmeextensions.com/magento-google-maps-store-locator-find-a-store.html https://www.iwdextensions.com/magento-dealer-store-locator.html If you're in budget, custom development could also be a good option
0.888889
Google "magento marketplace extension"
Can I lock down custom taxonomies on a parent term level, but not a child term?
I've created a taxonomy called "topics" which has 4 top level terms: science environment technology cant remember the last one and each of those terms will have child terms. I want to be able to lock down the top level terms but not the child term. Basically editors should be able to create as many terms as they want for each of those top level terms.. But those top level terms cant be deleted or modified. Is that possible?
This not a complete and ready-made answer, but the below should get you started. First thing to note is, deleting and modifying are different functionalities, so different functions and hooks are relevant to it. Namely we are talking about wp_delete_term() - source and wp_update_term() - source - regarding the functions. So lets take a look at wp_delete_term(), you have to at least consider two hooks: edit_term_taxonomies and delete_term_taxonomy. They are both relevant because of the bulk action and because of the handling of hierarchical taxonomies. Below some exemplary code how to approach this. I've tried to explain the most important things inside the code. The rest you have to read up on yourself. First the edit_term_taxonomies hook: add_action( 'edit_term_taxonomies', 'wpse160191_top_level_lock_down_edit_term_taxonomies', 10, 1 ); function wpse160191_top_level_lock_down_edit_term_taxonomies( $edit_tt_ids ) { $screen_obj = get_current_screen(); $base = $screen_obj->base; $taxonomy = $screen_obj->taxonomy; if( // these are the conditions we are checking against // is this a tag edit page $base == 'edit-tags' // we want this only for a specific taxonomy && $taxonomy == 'category' // not super and/or admin && ! current_user_can( 'manage_options' ) // a least an editor && current_user_can( 'manage_categories' ) ) { // these are the terms up for deletion $terms_queue_for_deletion = $_POST['delete_tags']; $term_parents_ids = array(); // we need information if or not one of the terms is a top level one foreach ( $terms_queue_for_deletion as $term_id ) { $term_obj = get_term_by( 'id', $term_id, 'category' ); $term_parent = $term_obj->parent; $term_parents_ids[] = $term_parent; } if( empty( $edit_tt_ids ) ) { return; } if( ! empty( $edit_tt_ids ) ) { if ( in_array( 0, $term_parents_ids ) ) { $msg = new WP_Error( 'parent_terms_are_forever', __('Sorry, you are not allowed to delete top level terms.') ); wp_die( $msg ); } else { return; } } } } Second the delete_term_taxonomy hook: add_action( 'delete_term_taxonomy', 'wpse160191_top_level_lock_down_delete_term_taxonomy', 10, 1 ); function wpse160191_top_level_lock_down_delete_term_taxonomy( $tt_id ) { $screen_obj = get_current_screen(); $base = $screen_obj->base; $taxonomy = $screen_obj->taxonomy; if ( // these are the conditions we are checking against // is this a tag edit page $base == 'edit-tags' // we want this only for a specific taxonomy && $taxonomy == 'category' // not super and/or admin && ! current_user_can( 'manage_options' ) // a least an editor && current_user_can( 'manage_categories' ) ) { $term_obj = get_term_by( 'term_taxonomy_id', $tt_id, 'category' ); $parent_id = $term_obj->parent; if ( // this applies only to top level terms $parent_id == 0 ) { $msg = new WP_Error( 'parent_terms_are_forever', __('s:Sorry, you are not allowed to delete top level terms.') ); wp_die( $msg ); } } } As mentioned above, it gets a bit more complicated, mainly because of the AJAX actions. If you are thinking about doing this with the well known and simple check: if ( defined('DOING_AJAX') && DOING_AJAX ) { // code } I can tell you right now, that I'm pretty certain it won't be sufficient enough. Mostly because you won't be able to do all the checks you need. If you are fine with just disabling or, to be exact, removing the link to the AJAX action, you can do it somewhat like this: add_action( 'admin_head' , 'wpse160191_remove_ajax_delete_link' ); function wpse160191_remove_ajax_delete_link() { $screen_obj = get_current_screen(); $base = $screen_obj->base; $taxonomy = $screen_obj->taxonomy; if( // lets just remove the link on that one page and not everywhere $base == 'edit-tags' && $taxonomy == 'category' ) { ?> <script type="text/javascript"> jQuery(document).ready(function($) { var element = 'span.delete'; $(element).each(function(){ $(element).css('opacity', '0'); $(element).css('pointer-events', 'none'); $(element).remove(); }); }); </script> <?php } } Of course you shouldn't do it inline and so on, but you can optimize yourself. This of course is not very satisfying, because we just removed the functionality. One way I imagine to deal with the AJAX action would be to make use of debug_backtrace(). This would offer a way to determine and handle the AJAX action correctly. It could be implemented into the above shown code. A caveat of course is that debug_backtrace() is performance-wise expensive and in a larger scale surely not recommendable. Another way would be to implement your own AJAX action as replacement for wp_ajax_delete_tag(), but to do so you have to additionally either have to extend the WP_Terms_List_Table or use some hooks in there to achieve this. Not exactly sure at the moment, so you have to inspect that further yourself. The procedure for wp_update_term() and disallowing updating/modifying is analogous to the above shown. With the same considerations concerning the AJAX part, especially because of the inline quick edit possibility. At first I totally misread the question and gave this as an answer. Keeping it because it might be useful to others. What you can do is hooking into the pre_insert_term to do the checks needed. Code: add_action( 'pre_insert_term', 'wpse160191_restrict_top_level_term_creation', 10, 2 ); function wpse160191_restrict_top_level_term_creation( $term, $taxonomy ) { if( // these are the conditions we are checking against // we want this only for a specific taxonomy $taxonomy == 'topics' // a value of 0 or -1 does indicate the top level && $_POST[ 'parent' ] <= '0' // not super and/or admin && ! current_user_can( 'manage_options' ) // a least an editor && current_user_can( 'manage_categories' ) ) { // the user is an editor and not allowed to add parent terms // so return a friendly message so the user at least knows return new WP_Error( 'parent_terms_not_allowed_for_editors', __('Sorry, you are not allowed to add parent terms.') ); } else { // a super and/or admin, s|he is allowed to do what s|he wants return $term; } } The pre_insert_term hook is part of the wp_insert_term() function. Some Notes: The parent value of the $args is 0, when no parent is selected. But we have no access to those inside the action, the form does return the value of -1 for $_POST[ 'parent' ] if »None« is selected. So <= '0' should work in any case. We are not passing the user role to the current_user_can() function, because that is just wrong - although you see it a lot, it still is bad. Instead capabilities are used to determine, which kind of user we are dealing with.
0.888889
wp_update_term() and delete_term_taxonomy are different functions .
How can natural selection occur at species level whilst not occuring at the individual level?
The chapter by Douglas Futuyma in 'Evolution' (Losos et al 2013, Princeton) states that natural selection can occur at the species level. Futuyma states that if natural selection occurs at the species level it does not occur at the individual level: Neither gene selection nor species selection has molded the advantageous characteristics of individual organisms; rather, they have affected properties at the gene level or at the species level. But how does natural selection occuring at the species level not affect individuals? Surely any selective advantage of a particular species must occur among particular individuals of that species. For example, if Species A is selected because it is browner than Species B, this will be because individuals of Species A are browner than individuals of Species B.
I think you have misunderstood the passage. Here is a larger section (found at google books): Natural selection can also occur at the level of species, for certain characteristics enhance the rate of origin of new species or diminish the likelihood of species extinction. For instance, the number of species in lineages of herbivorous insects has generally increased faster than in closely related lineages that have other feeding habits. Neither gene selection nor species selection has molded the advantageous characteristics of individual organisms; rather, they have affected properties at the gene level or at the species level. But individual selection, selection among individual organisms within populations, is at the center of evolutionary theory. It is at this level that selection explains most of the adaptive features of organisms. Going through this part-by-part; the first two sentences state that lineage/species selection can occur, in the sense that species traits can enhance the speciation rate of a lineage or decrease their risk of extinction, relative to other lineages (e.g. in herbivorous insects). He is then saying that the traits that are the target of this selection are not traits of individuals but traits/properties of the species/lineage. An example might help to explain the point. For instance, it has been argued that pelagic larvae in sessile ocean species will lead to higher dispersal rates, which means that species can colonize new environments, and this can lead to speciation through adaptive radiation (Jablonski & Hunt, 2006). A larger range will also correspond to lower extinction rates (everything else equal). The trait might also be fixed within a lineage (so there is no variance at the individual level within-species), and if so, this lineage as a whole could have higher speciation rates and lower extinction rates compared to a sister lineage that lacks pelagic larvae. The individuals within species will naturally have the underlying traits (pelagic larvae), but the traits that are selected at the lineage level (extinction risk & speciation rate) are not properties of individuals but are traits of the lineage/species. He then ends by continuing with "normal" individual selection, and states that processes at this level is responsible for most adaptive features of organisms. It should also be noted that lineage selection is still considered controversial, and it has been shown that it is inherently much weaker than selection at the individual level. Personally, I think there are some very good examples of how species/lineage selection can function, but to what extent it is an important process for species and organisms is an open empirical question. If you are interested to look further, Jablonski (2008) and Okasha (2007) are two good starting points.
1
Natural selection can also occur at the level of species .
Get REQUEST_URI and don't overwrite
I tried storing the REQUEST_URI in a session with the code below. I need to store the very first REQUEST_URI when a visitor lands on a page on our site and not have it overwritten when they begin browsing pages. This isn't working as I browse the site i'm seeing a new URI displayed by the echo. session_start(); if ( !isset( $_SESSION['theuri'] ) ) { if ( !empty( $_SERVER['REQUEST_URI'] ) ) { $_SESSION['theuri'] = $_SERVER['REQUEST_URI']; } } echo $_SESSION['theuri'];
Clear your cookie and try again. It was probably set the first time when you never had the !empty() conditional and never changed since
1
Clear your cookie and try again
Tooltip : Mapping list of Tooltip values to list of functions while plotting
How is it possible to map a list of Tooltip values to the functions being plotted? For example: Assume, f1[x], f2[x], f3[x]... are functions defined. {t1, t2, t3, ...} are the list of tool-tips to display. Then to plot: Plot[ Tooltip[{f1[x], f2[x], ... }], {x, a, b}]; Which will just display the functions as tool-tip OR Plot[ {Tooltip[f1[x], t1], Tooltip[f2[x], t2], ...... }, {x, a, b}] Which is the required behavior, but, is there another shorter or direct way of mapping the functions f1, f2, f3, ... to t1, t2, t3, .... rather than manually?
funcs = {Sin[x], Cos[x], Sin[x] Cos[x]}; tips = {"t1", "t2", "t3"}; Plot[Thread[Tooltip[funcs, tips]], {x, -2 Pi, 2 Pi}, Evaluated -> True] Plot[Evaluate@Thread[Tooltip[funcs, tips]], {x, -2 Pi, 2 Pi}] Plot[Evaluate@MapThread[Tooltip, {funcs, tips}], {x, -2 Pi, 2 Pi}] Plot[Tooltip @@@ Transpose[{funcs, tips}], {x, -2 Pi, 2 Pi}, Evaluated -> True] all give
0.888889
funcs = Sin[x], Cos[x] Cos [x]
Is there added value in having your own presentation layout and using it consistently?
From the perspective of a Ph.D. student, how much of an added value is it to have your own presentation slides layout, that is used consistently throughout your Ph.D. conference presentations and other talks (and possibly throughout your academic career afterwards)? Here is one such example from the Computer Science community. This as as opposed to using existing Beamer templates with LaTeX, or built-in PowerPoint templates, or simply preparing each presentation on its own (without a specific layout). A couple of axes I can think along: Creating a signature layout that distinguishes one in their community Ease of preparation of presentations (especially over time), maybe overcoming constraints with existing templates. Note that I am not concerned with the question of content, but just design and layout.
First of all, I do not think that having a signature layout is any good for its own sake. In most fields, few people (apart from your workgroup) will attend more than one of your talks and even those who will, will likely not notice the consistency of your layout¹ – unless it’s particularly memorable, which is almost certainly not a good thing². And even if somebody notices, they will likely (and hopefully) value the quality of your design more, let alone the quality of your content. Considering the required work, there are two aspects: (1) Creating (or choosing) a layout and (2) Using the layout throughout your presentations. Aspect 1 takes a few hours, if you are sufficiently apt with your presentation program (and it does not suck) and know some basics of graphic design (which I suppose you do, if you are asking such a question). Mostly it’s selecting a colour scheme, one or two fonts and a default arrangement of your slides and realising them in your presentation program and in the programs you use to generate your figures. Regarding the constraints of existing templates, remember that (unless your problems are very individual) if no templates are the way you want them, it is very likely that you should be careful what you are wishing for. Also beware that the fact that you have to rely on (usually unknown) projectors imposes some constraints on your font and colour selections. Aspect 2 will usually save you some time, whether you are using a prebuilt design or your own: For example, you are very likely to reuse some material – in particular figures. And if you care about your slides being consistent (which I suppose you do), you avoid spending some time in adapting colour schemes, for example. In particular, there is usually no benefit in switching designs. From personal experience, I have spent some time in working out a design and have not regretted it yet. ¹ Just think about, how few people give horribly designed presentations and thus can be assumed not even to notice the flaws in their own presentations, let alone the qualities of your’s. ² As you should not notice good design that much.
1
Creating (or choosing) a layout and Using the layout throughout your presentations
Can I use a package manager of one distribution on another?
I want to use Gentoo's packages on Fedora. Is this possible? EDIT: I meant that I want to use Gentoo's portage tree. UPDATE: How about Ubuntu's packages on Fedora? Or Fedora's on Gentoo? Or any other distribution's packages/package manager on another?
If you want to use portage to install packages as a user, have a look at Gentoo prefix. It works pretty well for me, but it also tends to need more space than I would like. For system-wide package installation you should take into account that Fedora and Gentoo have totally different ideas about what is a package and how it should be installed -- actually way more different than the difference between deb and rpm files than can be converted and installed to some extent into other distributions. Save yourself the hassle and decide upfront what you want and then go with that.
1
Gentoo prefix is more different than deb and rpm files
Can you book hotels on a prepaid credit card worldwide?
I tend to stay at smaller boutique hotels or local apartments when I visit a city but recently due to some credit card issues I will need to depend on prepaid Visa. But I noticed when I try to shop online a lot of retailers don't accept prepaid credit cards so I'm thinking hotels would be even stricter. Is there a list somewhere of countries or particular hotel chains than ban prepaid cards? If so, how does one book online or reserve a room without a card? Do all hotels worldwide accept cash?
I did some research and could find information about the standards of Hilton Hotel Chain. They are one of the leading hotel chains and might set the standards for smaller hotel chains. Hilton offers also an American Express Prepaid credit card. See link: Hilton AMEX prepaid card. And you would expect that their own prepaid credit card would be acceptable for Hilton, but think again. In their FAQ they state: Where can the Card be used? Are there any usage restrictions? THE CARD MAY ONLY BE USED AT THE FOLLOWING SELECT MERCHANTS AND RETAILERS AROUND THE WORLD THAT ACCEPT THE AMERICAN EXPRESS CARD ("SELECT MERCHANTS"): Hilton Worldwide portfolio of brands, which include Waldorf Astoria™ Hotels & Resorts, Conrad® Hotels and Resorts, Hilton Hotels and Resorts, Doubletree by Hilton™, Embassy Suites by Hilton™, Hilton Garden Inn™, Hampton by Hilton™, Homewood Suites by Hilton™, Home2 Suites by Hilton™, and Hilton Grand Vacations™. RESTRICTION: Card may not be used to hold hotel reservations. We reserve the right at any time to add other merchants to the list of Select Merchants or to remove merchants that cease business, change locations or stop accepting the American Express Card from the list of Select Merchants.Please note that while the Card is usable at the Select Merchants listed above, it may not be usable internationally at non-affiliated third party establishments that are located within or on the same property as Select Merchants (e.g. coffee shops, boutiques). I have checked many other hotel chains and I can`t find anything else about this. I do notice based on the information on the internet that if a hotel would accept it. They would hold at a minimum the total amount of your stay + 15% + additional amount for minibar and other used services as an guarantee. Some hotel would hold up to 3x the amount of your stay (I cant verify if that is really true). Just realize that a prepaid credit cards usually (not always) for people who have a bad credit record. Hotels take more protection when dealing with these kind of risks. Im not sure if the information will help, but at least you know Hilton Hotel is not an option.
1
What is the standard of Hilton Hotel Chain?
Does tagging content affect SEO?
Tagging content (i.e. categorizing content using "tags") is a sensible way to group content on a web site, but does tagging actually affect SEO? From an SEO standpoint, how does tagging content affect search ranking? Is there any way to optimize the set of tags for SEO? Should I limit the number of tags in any way?
Here's what Matt Cutts from Google has to say on the subject. http://www.youtube.com/watch?v=A96yDPqa2rs
1
Matt Cutts from Google has to say on the subject
Compile .tex file to a pdf on os X
I installed mactex and I wrote a resume in Vim, but I can't figure out how to compile the .tex file into a pdf using the command line. I have a program called TexWorks that does it, but I'm more comfortable just using the command line. How does one compile .tex to .pdf? Thanks.
The MacTeX installer makes a soft link /usr/texbin pointing to the directory containing the binaries relative to the current release of TeX Live (although in a somewhat indirect way). On my system, if I try ls -l /usr/texbin, I get /usr/texbin@ -> /Library/TeX/Distributions/.DefaultTeX/Contents/Programs/texbin where /Library/TeX/ contains a clever set of soft links. At the end of the story, /usr/texbin points to /usr/local/texlive/2013/bin/x86_64-darwin If you have multiple TeX distributions (or want to switch to the universal-darwin binaries, you can use the “TeX Distribution” panel in the System Preferences application. The MacTeX installer also adds a file called TeX in /etc/paths.d that contains the single line /usr/texbin, so that this directory will be included in the PATH environment variable. All the above amounts to saying that you simply issue, on a Terminal window, the command pdflatex <filename> in order to compile the LaTeX file. Change the engine using xelatex or lualatex.
0.888889
The MacTeX installer makes a soft link pointing to the directory containing the binaries relative to TeX Live .
Throwing a ball upwards in an accelerating train
If I throw a ball upwards to a certain height in an accelerating train, will it end up in my hand? At the moment I release the ball, it will have a velocity equal to that of the train at that instant. But because the train is accelerating, the train will have a greater velocity and thus the ball will travel lesser distance and should fall behind me. Is my reasoning correct?
User Sahil Chadha has already answered the question, but here's the math and a pretty picture for anyone who is unconvinced that you're right. Since the train is accelerating, from the perspective of an observer on the train, the ball will experience a (fictitious) force in the direction opposite the train's travel having magnitude $ma$ where $m$ is the mass of the ball and $a$ is the magnitude of the acceleration of the train. If we call the direction of travel the positive $x$-direction, and if we call the "up" direction the positive $y$-direction, then the equations of motion in the $x$- and $y$-directions will therefore be as follows: \begin{align} \ddot x &= -a \\ \ddot y &= -g. \end{align} The general solution is \begin{align} x(t) &= x_0 + v_{x,0} t - \frac{1}{2}a t^2 \\ y(t) &= y_0 + v_{y,0} t - \frac{1}{2}g t^2 \end{align} Now, let's say that the origin of our coordinate system lies at the point from which the ball is thrown so that $x_0 = y_0 = 0$ and that the ball is thrown up at time $t=0$ with velocity $v_{y,0} = v$ and $v_{x,0} = 0$ in the positive $y$-direction, then the solutions becomes \begin{align} x(t) &= -\frac{1}{2}a t^2\\ y(t) &= vt - \frac{1}{2} gt^2 \end{align} So what does this trajectory look like? By solving the first equation for $t$, and plugging this back into the equation for $y$, we obtain the following expression for the $y$ coordinate of the particle as a function of its $x$ coordinate along the trajectory: \begin{align} y(x) = v\sqrt{-\frac{2x}{a}} +\frac{g}{a} x \end{align} Here's a Mathematica plot of what this trajectory looks like for $v = 1.0\,\mathrm m/\mathrm s$ and the list $a = 9.8,5.0,2.5,1,0.1\,\mathrm m/\mathrm s^2$ of values for the train's acceleration From the point of view of someone on the train, the ball flies backward in a sort of deformed parabola, but the smaller the acceleration is, the more it simply looks as it would if you were to throw a ball vertically in an un-accelerated train.
1
How does this trajectory look like if you were to throw a ball vertically in a train?
Is there an app similar to Pandora for movies/television?
I enjoy how Pandora can recommend new titles based off songs I already like. Is there a similar app that can take a few movies/shows I like and give me suggestions for similar ones? EDIT: Showing the vids would be nice but what I'm really looking for is suggestions for other good flicks to watch, just the similar-theme aspect.
You might take a look at GetGlue as well. GetGlue is an innovative social recommendation network for movies, books, and music. The GetGlue website provides a recommendation stream based on personal tastes, what friends like, and what's most popular right now. The GetGlue browser addon brings filtered friend reviews, personal recommendations, and contextual content to popular sites around the web, such as Wikipedia, Amazon, IMDB, and hundreds more.
1
GetGlue is an innovative social recommendation network for movies, books, and music
How does owning a home and paying on a mortgage fit into family savings and investment?
I'm in my mid-20's, and so I am aiming at long-term growth with higher risk in my portfolio. My financial adviser is showing me some investment allocations that put my money in some growth, mid, and value-retention locations. He doesn't seem to be taking into the equation the fact that I am putting a huge percentage of my paycheck into my home. I know home values fluctuate, but long term, it seems to be a pretty good way to at least retain value, and at best make a small return. If I am already contributing so much to my "home" investment, why would I also invest in stocks or bonds with a low rate of return, even though they are considered a "safe" part of my portfolio? Update: I think the question really has two parts. 1) How does owning a home fit into my financial portfolio? Most seem to agree that at best it is a hedge against rent or dollar inflation, and at worst it should be viewed as a liability, and has no place alongside other real investments. 2) How should one view payments on a home mortgage? How are they similar or different to investing in low-risk low-reward investments?
Unless you plan to sell your home and live in a box during your retirement I wouldn't consider it an investment that is a viable replacement for a retirement account. Consider this: Even if housing prices DO go way up, you still need a place to live. When you sell that house and try to buy another one to live in, you will find that the other houses went up in price too, negating your gain. The only way this might work is if you buy a much bigger house than you will need later and trade down to pull out some equity, or consider a reverse-mortgage for retirement income.
0.888889
Unless you plan to sell your home and live in a box during your retirement I wouldn't consider it an investment that is a
What is temptation?
Temptation, in the common secular sense, seems to indicate an attraction to something. Temptation The act of tempting The condition of being tempted. Something attractive, tempting or seductive; an inducement or enticement. Pressure applied to your thinking designed to create wrong emotions which will eventually lead to wrong actions. Tempting attractive, appealing, enticing seductive, alluring, inviting Tempt (transitive) To provoke someone to do wrong, especially by promising a reward; to entice. She tempted me to eat the apple. (transitive) To attract; to allure. Its glossy skin tempted me. (transitive) To provoke something; to court. It would be tempting fate. But, as with many secular concepts that overlap religious concepts, there are often explicit theological definitions which allow the terminology to fit into religious, dogmatic, and theological discussions with less ambiguity. In this case, is there any predominating Christian/theological definition? In particular, how is temptation defined or explained in such a manner that allows Christ to have been tempted? To clarify the problem, if Christ is to be attracted to some thing, there must be some part or aspect of Christ to which some thing appeals. More significantly, Christ, in order to be tempted, must desire that thing if we are to say He is attracted to it. And if Christ is to contain a part or aspect to which some evil may be a temptation, thus arousing a desire, there could be said to be a sinful nature or component in Christ -- a contradiction of His Godliness. To illustrate the problem, one might select magnetism (or any natural force) as a natural analogy. For the effect of magnetism (sin) to attract (tempt) a material (person), the material must contain, at least to some extent, a magnetic (sinful) component. Thus, if we say that Christ is tempted in this understanding, we say that He has a sinful component. How do we Christians, Catholics, or any denomination that has a well-established concept, define or explain temptation in a non-trivial manner without requiring Christ to have a sinful nature?
It is what satan throws at you if you bite you sin. How to stop it. Don't take the bate. There is no such thing as sudden sin. It happen just like this you hear it in your ear, or you see it with eyes, then you want it with you heart so much you say it out your mouth then you do it "sin", seed time, it grew, then bam harvest you just did the will of satan. Turn that the right way and do the will God of Hearing the word, see the word want in your heart say it out your mouth harvest comes your not falling into temptation any more because the word is taking up all the space in your heart. And he that has even more shall be given.
1
How to stop satan's sin
SPI and clock active low or high
I am trying to get SPI working on an MCU. The SCK on the MCU is labelled \$\overline{SCK}\$ which means it active low but my device has no overline on the SCK. Can I use the same clock. If not what can I do?
Clocks don't generally have an active "level" per say; in many cases clock outputs will specify that they'll only stop when they're at a certain level, but otherwise clocks have active edges. Typically, SPI devices will use one clock edge as a signal to output each bit of data, and the following clock edge as a signal that to latch the data from the other device. In some cases, SPI devices will asynchronously place the first bit of data; the first clock transition will latch that and the second will output the second bit, the third will latch the second bit and the fourth will place the next, etc. The fifteenth transition will latch the last bit, and the sixteenth will indicate that the device should start outputting the first bit of the next byte sometime before the next clock transition.
0.777778
Clocks don't have an active "level" per say
HowTo: Add Class to Sidebar Widget List-Items
The newest version of Bootstrap (v3.0) adds a new List Group component which has the following structure: <ul class="list-group"> <li class="list-group-item">Cras justo odio</li> <li class="list-group-item">Dapibus ac facilisis in</li> <li class="list-group-item">Morbi leo risus</li> <li class="list-group-item">Porta ac consectetur ac</li> <li class="list-group-item">Vestibulum at eros</li> </ul> I would like to be able to add a class to the ul (i.e. <ul class="list-group">) I would like to style my Category sidebar widget to support this new component, but as you see, this requires classes on each li item. In reading some similar posts, one option I found is to use jQuery to add the class to each li, but I am concerned about the dreaded FOUC. Is there some WordPress function that gets me to my goal? Please advise, Update: I was able to add classes to the individual li's by creating a Custom Walker which extends Walker_Category (see code below), but this still does not get me to the ul which also needs a class added (eg <ul class="list-group">). class Walker_Category_BS extends Walker_Category { function start_el( &$output, $category, $depth = 0, $args = array() ) { extract($args); $cat_name = esc_attr( $category->name ); $cat_name = apply_filters( 'list_cats', $cat_name, $category ); $link = '<a href="' . esc_url( get_term_link($category) ) . '" '; if ( $use_desc_for_title == 0 || empty($category->description) ) $link .= 'title="' . esc_attr( sprintf(__( 'View all posts filed under %s' ), $cat_name) ) . '"'; else $link .= 'title="' . esc_attr( strip_tags( apply_filters( 'category_description', $category->description, $category ) ) ) . '"'; $link .= '>'; $link .= $cat_name . '</a>'; if ( !empty($feed_image) || !empty($feed) ) { $link .= ' '; if ( empty($feed_image) ) $link .= '('; $link .= '<a href="' . esc_url( get_term_feed_link( $category->term_id, $category->taxonomy, $feed_type ) ) . '"'; if ( empty($feed) ) { $alt = ' alt="' . sprintf(__( 'Feed for all posts filed under %s' ), $cat_name ) . '"'; } else { $title = ' title="' . $feed . '"'; $alt = ' alt="' . $feed . '"'; $name = $feed; $link .= $title; } $link .= '>'; if ( empty($feed_image) ) $link .= $name; else $link .= "<img src='$feed_image'$alt$title" . ' />'; $link .= '</a>'; if ( empty($feed_image) ) $link .= ')'; } if ( !empty($show_count) ) $link .= ' (' . intval($category->count) . ')'; if ( 'list' == $args['style'] ) { $output .= "\t<li"; $class = 'list-group-item cat-item cat-item-' . $category->term_id; if ( !empty($current_category) ) { $_current_category = get_term( $current_category, $category->taxonomy ); if ( $category->term_id == $current_category ) $class .= ' current-cat'; elseif ( $category->term_id == $_current_category->parent ) $class .= ' current-cat-parent'; } $output .= ' class="' . $class . '"'; $output .= ">$link\n"; } else { $output .= "\t$link<br />\n"; } } /* end start_el */ } /* end Walker_Category_BS */ Update 02: After viewing default-widgets.php in the core, I decided to create a new widget (WP_Widget_Categories_BS, see code below) wherein I basically, copied all the code from the default category widget and simply modified the the UL to add the necessary class. <?php /** * Categories widget class * * @since 2.8.0 */ class WP_Widget_Categories_BS extends WP_Widget { function __construct() { $widget_ops = array( 'classname' => 'widget_categories_bs', 'description' => __( "A list or dropdown of categories for Bootstrap 3.0" ) ); parent::__construct('categories', __('Boostrap Categories'), $widget_ops); } function widget( $args, $instance ) { extract( $args ); $title = apply_filters('widget_title', empty( $instance['title'] ) ? __( 'Categories' ) : $instance['title'], $instance, $this->id_base); $c = ! empty( $instance['count'] ) ? '1' : '0'; $h = ! empty( $instance['hierarchical'] ) ? '1' : '0'; $d = ! empty( $instance['dropdown'] ) ? '1' : '0'; echo $before_widget; if ( $title ) echo $before_title . $title . $after_title; $cat_args = array('orderby' => 'name', 'show_count' => $c, 'hierarchical' => $h); if ( $d ) { $cat_args['show_option_none'] = __('Select Category'); wp_dropdown_categories(apply_filters('widget_categories_dropdown_args', $cat_args)); ?> <script type='text/javascript'> /* <![CDATA[ */ var dropdown = document.getElementById("cat"); function onCatChange() { if ( dropdown.options[dropdown.selectedIndex].value > 0 ) { location.href = "<?php echo home_url(); ?>/?cat="+dropdown.options[dropdown.selectedIndex].value; } } dropdown.onchange = onCatChange; /* ]]> */ </script> <?php } else { ?> <ul class="list-group"> <?php $cat_args['title_li'] = ''; wp_list_categories(apply_filters('widget_categories_args', $cat_args)); ?> </ul> <?php } echo $after_widget; } function update( $new_instance, $old_instance ) { $instance = $old_instance; $instance['title'] = strip_tags($new_instance['title']); $instance['count'] = !empty($new_instance['count']) ? 1 : 0; $instance['hierarchical'] = !empty($new_instance['hierarchical']) ? 1 : 0; $instance['dropdown'] = !empty($new_instance['dropdown']) ? 1 : 0; return $instance; } function form( $instance ) { //Defaults $instance = wp_parse_args( (array) $instance, array( 'title' => '') ); $title = esc_attr( $instance['title'] ); $count = isset($instance['count']) ? (bool) $instance['count'] :false; $hierarchical = isset( $instance['hierarchical'] ) ? (bool) $instance['hierarchical'] : false; $dropdown = isset( $instance['dropdown'] ) ? (bool) $instance['dropdown'] : false; ?> <p><label for="<?php echo $this->get_field_id('title'); ?>"><?php _e( 'Title:' ); ?></label> <input class="widefat" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" type="text" value="<?php echo $title; ?>" /></p> <p><input type="checkbox" class="checkbox" id="<?php echo $this->get_field_id('dropdown'); ?>" name="<?php echo $this->get_field_name('dropdown'); ?>"<?php checked( $dropdown ); ?> /> <label for="<?php echo $this->get_field_id('dropdown'); ?>"><?php _e( 'Display as dropdown' ); ?></label><br /> <input type="checkbox" class="checkbox" id="<?php echo $this->get_field_id('count'); ?>" name="<?php echo $this->get_field_name('count'); ?>"<?php checked( $count ); ?> /> <label for="<?php echo $this->get_field_id('count'); ?>"><?php _e( 'Show post counts' ); ?></label><br /> <input type="checkbox" class="checkbox" id="<?php echo $this->get_field_id('hierarchical'); ?>" name="<?php echo $this->get_field_name('hierarchical'); ?>"<?php checked( $hierarchical ); ?> /> <label for="<?php echo $this->get_field_id('hierarchical'); ?>"><?php _e( 'Show hierarchy' ); ?></label></p> <?php } } // end WP_Widget_Categories_BS Combined with a Custom Walker I created (Walker_Category_BS) I now have what I wanted. Analysis Is this the best way to do it? Don't know as I have have received zero feedback so far, and this is the first time i've done this (hence the question), but ...it works! I could use a review. Debug Warning Concerning my Custom Category Walker Walker_Category_BS, i'm seeing this message "Strict standards: Declaration of Walker_Category_BS::start_el() should be compatible with Walker::start_el(&$output, $object, $depth = 0, $args = Array, $current_object_id = 0) in C:\wamp\www\mysite\wp-content\themes\mytheme\assets\inc\Walker_Category_BS.php" It appears to be a warning, of some sort.
Update: I fixed the debug warning and everything appears to be working. In the absence of any other comments, I will accept my own solution outlined in the original questions updates.
1
Fix the debug warning and everything appears to be working
CS paper rejected for lack of technical contribution; what does this mean, and how can I fix it?
I recently got two papers rejected with the reviewers asserting a lack of technical contribution. They contained good ideas, at least in my eyes, and used common methodologies in the experimentation. So my question related to the CS field is, what is the difference between a good idea that was tested and a technical contribution? What should an idea have to become a technical contribution? Another observation I had is that other papers, that got accepted, were actually worse from the research methodologies and were previously published in similar form (so the idea was not very original) at that conference, so the “contribution” of these papers is much lower than mine would have been (again it’s just from my perspective). So I don’t understand why those papers got accepted and if the reviewer’s decisions actually make sense, what is it that makes such papers accepted? I aim at enhancing my now rejected papers because I still think they contain original ideas that should be published, I just don’t know where to start.
Since you ask those questions, I assume you are relatively new to CS research. I do not know if you have previous research experience in any other scientific area, but let's assume you are new to research all together. Correct me if I am wrong. When your paper gets rejected, the feeling of rejection sucks. It sucks a lot. But in research you have to deal with this rejection and move-on. It does not matter if other people's works that you consider worse have been accepted. Maybe they are better than yours maybe not. But that is really irrelevant. Focus on your work and how to improve it. The questions you should be asking: Is this problem you are trying to solve interesting? Is your solution substantially better than previous state-of-the-art? Are you certain that you described related and recent literature thoroughly? Are you up-to-date on related literature? Did you make clear the benefits on your approach? Is your paper well presented and written? Have you explained your approach thoroughly (with pseudocode, figures) and not just with words? Were your experiments thorough? Did you use many datasets for your experiments? Have you used the datasets that the related papers use or at least similar if not bigger in size and scope? Have you compared your results with previous approaches? Have you many charts demonstrating the various aspects of your solution? Have you advertised your work by finding many test-cases for your problem? If any of those answer is NO, then you must turn them to YES, before resubmitting your work. You must understand that if your paper or the problem you try to solve is boring, then it gets rejected. It is as simple as that. In that cases, the most usual reason for rejection is "not enough contribution". So, probably it is also your presentation that needs to be fixed. Also, it seems rather strange that although you are probably new to research, you have submitted two papers at the same time. Perhaps this is too ambitious and it would be better to focus on one of them, improve it and resubmit it. Perhaps, they should be sent to different venues that are more tailored for each one of them. And last but not least. Do not worry. It gets better with time. Both the way you handle rejection and the way you write papers. So, improve what needs to be fixed and everything will work out.
1
Are you new to CS research?
Fail2ban for Windows 7?
My server is getting hit pretty hard by (what appears to be) script kiddies in China. I'm just looking for some thoughts/ideas on how to potentially setup some type of Fail2ban proc?
An answer to a similar question links to a tool to protect Cygwin's sshd in Windows. As fail2ban works for all sorts of programs that write (login) log files, this won't necessarily be adequate solution. As you didn't specify what service are you securing, I assume that it is ssh...
1
How to protect Cygwin's sshd
Exception when Importing .csv file from CLI
I am able to import my .csv file using Apex Data Loader. When I try importing the same file from CLI I am getting an exception attached in the file. When the file contents are copied into a new csv file and try importing this new .csv file, this succeeds. Also If I open my .csv file, click on save, a pop-up comes up "MyFile.csv may contain features that are not compatible with CSV(Comma Delimited). Do you want to keep the workbook in this format? " And if I click on "Yes" or "No"and close the file without saving it and then try to upload the same file. The data gets uploaded. This is something weird and I am not able to get any logic out of it.. This is the error msg i am getting.
Since you don't save your CSV file during your open/close trick, my assumption is that the CSV file stays bitwise identical and therefore consequently is not the reason for your problem at all. It looks more like one of these weird java issues (configuration, memory, etc) You should try the same on a different computer or in a VM. An other idea would be to check that the csv is not open (eg. by Excel) when you try it the first time. Open file handles my lead to trouble. Instead of using dataloader cli you might also consider to have a look at TalenD: http://www.talend.com
0.777778
Open/close CSV file handles my lead to trouble
Three tier Validation Rule / Validation chain?
I am stumped so I hope I can present my question in a manner that allows me to get some support. I am creating a Lead validation rule that in essence is 3 tiers i.e. if tier 1 is selected require that tier 2 is selected and if this value in tier 2 is selected require tier 3 text to be completed. Here are my picklist requirements Lead Source Lead Source Details Complete Text Field Wholesaler >ABC Wholesaler >XYZ Wholesaler >Other if other is selected complete [text field] Personal Referral nothing else here Trade Show/Event nothing else here but we need to > [text field] TBP Event nothing else here but we need to > [text field] Website nothing else here Other nothing else here but we need to > [text field] When this was only a 2 tier picklist I used this validation rule but now I can't figure out how to rewrite for 3 tier ISBLANK(Lead_Source_Details__c) && ( ISPICKVAL(LeadSource, "Distribution Partner") || ISPICKVAL(LeadSource, "Event/Trade Show") || ISPICKVAL(LeadSource, "TBP Event") || ISPICKVAL(LeadSource, "Other") )
This would be a cleaner way to see what is going on and easy to extend AND('1'= CASE(LeadSource, /* set Case result to '1' if text field is required */ 'Wholesaler',CASE(Lead_Source_Details__c, 'Other','1', '0'), 'Personal Referrer','0', 'Trade Show/Event','1', 'TBP Event','1', 'Website','0', 'Other','0', '0') , ISBLANK(TextField__c) )
0.777778
'1'= CASE(LeadSource, /* set Case result to '1,'
How do you give cells in a TableView a unique reference
I'm still very new to iOS development, so bear with me. I've got a TableView using static cells to contain options (click to check), I am able to select the cells fine. I'd like to assign a value (identifier) to each cell, so that when a cell is selected or de-selected I can add/remove it from an array. Then, once the editing has finished, use the references stored in the array to update the respective CoreData attributes. My google skills have failed me today, so a push in the right direction would be very much appreciated. Thanks.
You can add details regarding a cell when a cell is selected within method - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath And for removing the details when a cell is deselected in delegate method - (void)tableView:(UITableView *)tableView didDeselectRowAtIndexPath:(NSIndexPath *)indexPath
1
How to remove details when a cell is selected in delegate method
What kind of metrics should I collect for a website/web app
I have a website that allows users to register for accounts, login, and renew an annual membership fee. They can also update their personal profile, their personal profile, look at a list of their employees, make bulk payments for their employees, view receipts and invoices, etc. For non-members it's a regular website with a lot of pages, but for members, it has quite a few member only areas, with more to come (Such as forums). It also has a job listings page, course registrations, etc. What are some useful "metrics" I can collect to give me meaningful information about the site, that I can share with my clients. I really don't know a lot about collecting data about this kind of thing, and would like to learn. I already have a dashboard where the admins can view/export registrations this week and registrations by week for the past 30 weeks. I've been able to show them that registrations spiked after sending out an email about the new system. I'm think I'll also be adding stats about how often users update their profiles and how many users have updated their profile that day/week. Thanks
What do your clients want to know? Collect data on that. That said, at a minimum I would collect (per web page): Number of first-page views. Number of pages viewed until abandonment (user leaves site). This can be graphed to give an idea of how long people stay on the site. Number of view per page. Which pages are attracting more interest than others? Stats will differ depending on whether it is a web app or web page. Most sites are a combination of both; Amazon is a web page until you want to buy something, then it is a web app. It wouldn't surprise me if it turned out that most websites have certain "hot spots," i.e. pages that are overwhelmingly viewed more than others. Your clients want to know things like that, so they can attempt to reproduce the attraction effect for other pages/products.
1
What do your clients want to know?
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?
You've found the correct result; you just have to prove it. HINT: There's a bijection between the sets that contain $1$ and the sets that don't: if $1\in A$, pair $A$ with $A\setminus\{1\}$. Alternatively, each set that does not contain $1$ is a subset of the $(n-1)$-element set $\{2,\ldots,n\}$, and you know how many subsets that has.
1
Pair $A$ with $Asetminus1$ if $1in A$
Layman's guide to getting started with Forex (foreign exchange trading)?
How should I get started with Forex (foreign exchange trading)? How should I prepare myself for it? Please give your answer thinking of me as a layman.
I definitely can recommend you a site called babypips. Their beginner course section is great to get a good overview what you "could" do in FOREX trading. For starting out I definitely recommend a dummy account! (NEVER use real money in the beginning!)
1
a site called babypips for beginners
Can search engine robots read file with permission 640?
I am on a shared web hosting linux server. I want search engine robots/spiders to be able to read the robots.txt but not any one typing www.mysite.com/robots.txt. As per the following google group post, the user specifies that by setting file permission to 640, it's possible to deny access to robots.txt file by the world but still enable search engine robots to read them. Is that true? If not how it's possible to deny general public access to robots.txt but still allow Search engine robots to read them.
No, it's not true. Whether a bot or a person is accessing your site they all go through the webserver software (Apache for example) which accesses the robots.txt file in the same way for every request. It will either always be able to read it, or never. If it's never then something's probably configured wrong.
1
No, it's not true.
Why do airlines (typically?) require customers to phone for special meals, and not provide this option online?
When travelling on flights where meals are included, travellers who need special meals, such as vegetarian or kosher, are, in my experience, typically required to make such a request by phone. For the traveller, this might mean a 15 minute hold, followed by a 1 minute phonecall. After all, the operator simply needs to make an entry into a database somewhere. Why don't airlines offer seem to offer travellers the option to select their special meal request through an online interface? Or do I just have the bad luck to happen to fly with airlines where this request can only be made by phone? Examples: Air Transat, Korean Air both require to contact the service centre by telephone.
I am no definite expert on the topic but this customization of a flight, called ancillary services, are usually marketed to travel agents as a profit generator. First let's clarify the different actors. The airlines offer and operate flights, the GDS (Global Distribution System) companies distribute the flights to travel agents and the latter sell to the traveller (you). The travel agents can be your local travel agent in his office, the online travel agent (OTA) like Expedia, Opodo or Kayak, or the airline itself through its website, phone service or offices. In all cases the travel agent decides which ancillary service to sell to the customer. The travel agent probably pays to implement the service distribution (to the GDS) and receives a fee per transaction made. As meal selection is not generally a lucrative option - it is usually free of charge and I think religious or allergic people would react badly if they had to pay to get a specific meal - it is not worth offering for the travel agents. As @drat commented, the airlines have also little incentives (and higher logistic costs) to offer them. So it makes sense not to offer meal choice directly online. Note that some OTAs offer a free text field at the end of the booking without promising it will be read by anyone (I have seen that on govoyages, for example). In the case of Emirates and Singapore Airlines, I have in mind that their image is based on open-mindedness, globalization and respect of the culture of the travellers. I insist on the fact that it is the image I have, you might not feel the same. But offering a choice of meal is a good marketing argument for a world-wide growing airline. On the opposite, Air Transat mostly targets Canadians visiting the Caribbean and transatlantic travellers, with less of a variety of travellers. Offering a large variety of meals would be more a burden than a marketing argument to them. And Air Transat offers ancillary services on their website like seat selection, so it is a deliberate choice not to offer meal selection. In the end, I suppose that the reasons are economical. It costs less to offer less choice and not to prepare too many meals. It depends on the travel agent you buy your tickets from, but there is no rule for who offers meal selection or does not. If it matters a lot, you can try to buy your ticket from another travel agent, it might work better.
1
ancillary services are marketed to travel agents as a profit generator
use of verb "accord"
One would never defeat one’s circumstances by working and saving one’s pennies; one would never, by working, acquire that many pennies, and, besides, the social treatment accorded even the most successful Negroes proved that one needed, in order to be free, something more than a bank account. Letter from a Region in My Mind Can I understand the bold word as "accorded that"? Thank you.
In this sense, verb "accord" means to grant. The sentence means that the societal recognition automatically granted to rich white people was withheld from black citizens no matter how rich. The noun "accord" means an agreement that often includes two parties mutually granting or withholding rights and privileges. Thus the phrasing "accorded to" in the passive and the word "social" modifying "treatment," tell us that this is a societal agreement.
0.333333
"accord" means to grant societal recognition .
iphone 3G data network timeout?
My iPhone app sends data persistently over the network, and can handle having the network completely unavailable for a time. However I do my dev on an ipod and have difficulty testing 3G connectivity issues; My question: is there period of non-connectivity, while an app is in the foreground, after which the iphone will stop checking for the network, such that there are no bars and reachability returns 0 until the user "wakes" the phone, e.g. by locking/unlocking? Or can e.g. 1 hr without data network pass and the iphone will recognize that the network is back and reachability will start returning true (I am polling every 1 minute while there is not connection to my server). This is my experience with wifi: if, while running my app, the ipod hasn't connected to a wifi network for 1/2 hr, it stops looking for networks, and I need to lock and unlock it to stir the device into looking again. One other thing: the iPhone has the screen dimmed by the proximity sensor while all this persistent network use is happening.
Wi-Fi going down after 30 min of inactivity is a documented behavior. Cellular network is always active, unless turned off by the user. So if it goes down for a while it should get back online automatically when possible even if there was no user activity.
0.666667
Wi-Fi going down after 30 min is a documented behavior
Vixion IRUX Tablet battery will not charge
I bought this tablet recently in Tenerife. Can find no information about the manufacturer. Now the battery will not charge through the mains adapter. It did charge at first. However, I have found it does charge through USB connection to my PC. When it charged previously a light at the connector would be red. When it was not charging it would be green. It is red while USB connected. Also it tells me now that it is charging, but if I remove the USB connection it stops charging. It has a screen showing battery condition in the form of a graph. I could see the graph of battery % decreasing gradually. A few days ago there was a sudden drop as if some App had used a lot of power. I decided to remove all Apps and did a factory reset. This made no difference regarding the failure to charge. I have tried shutting down completely (hold the off button for a while and it asks if I want to power off) This made no difference. Any advice please? Edit #1: Thanks ce4 for your response. The charger is stated to be 5v and when I check it with a voltmeter, it shows 5.2v. Also I have tried pushing the plug into the tablet to varying amounts and makes no difference. Another point maybe I didn't make clear is that when I connect with USB only, the light does not come on but the device tells me it is charging. But when I connect the power supply as well, the light comes on red as if indicating charging. But when I remove the USB leaving the power supply connected, the light goes back to green and is not charging from the power supply. Despite apparently charging on USB, the percentage of battery left charged has not yet increased from 10%. I understand that USB cannot deliver high current. It appears you are right - something wrong with the charger - maybe it is not the correct one for this model - I guess it needs to be able to deliver power at a higher current level?
Today I was able to load the battery to 100% after the PC was totally crashed due to low voltage. With a charger and a USB 5V/500 mA output (Carrera accessories for a helicopter) this has worked normally. Through the USB connection to another PC, I had reached only 50%. The representation of the charge and discharge in the diagram is now understandable and I can use the PC to normal. When using the main charging port with the same charger, burns the green light on the tablet and the battery will not charge.
0.777778
Using a charger and a USB 5V/500 mA output, I reached only 50%
Grapple + Totemic Attunement (Eagle) = Zangief's Spinning Atomic Piledriver?
Could a Barbarian with Totemic Attunement (eagle) use grapple to perform the iconic move by dragging the enemy straight up as far as the fly speed allows and ending the turn in the air? If so, who would take fall damage?
Yes, you can do this. No you won't get very far, and I'd definitely rule that both of you take the falling damage. First, yes you are allowed to move a target you are grabbing. So you can feasibly grab them with your action, then use your movement to fly with them. However, since you are moving with a grabbed target, your movement speed is halved, so you only get 15 feet up. This means that the falling damage is at most 2d6 damage (though some DMs may rule it to be 1d6, I'd be inclined to) and you'll be prone.. Ultimately, it looks like you both fall. I'd definitely rule that since you're falling the grab is up. And, since there is not a direct way to negate falling damage, unless your caster friend is shooting feather fall as a reaction, you're both taking damage here. If I may editorialize here: this is not a good strategy. It consumes your action with the grab which is then most likely broken, and only does 1d6, maybe 2d6 damage, which is what your weapon does, and it's likely less reliable since it relies on an opposed check rather than an attack against AC. Stick to what you're good at: hitting things with metal attached to sticks.
0.888889
You can feasibly grab a target and use your movement to fly with them .
The Greatest Commandment - Loving God with all our 1) heart, 2) soul, and 3) strength
Jesus highlights Deuteronomy 6:5 as the greatest commandment in the law. This commandment highlights three aspects of loving God, specifically with our hearts, our souls, and our strengths. Love the LORD your God with all your heart and with all your soul and with all your strength. Deuteronomy 6:5 NIV What is distinct about each of these? Specifically, what does it look like to love God with all our hearts? What does it mean to love God with all our souls? What does it mean to love God with all our strengths?
Matthew 22:37-38 (NIV) 37 Jesus replied: “‘Love the Lord your God with all your heart and with all your soul and with all your mind.’ 38 This is the first and greatest commandment. This is the first and greatest commandment. I think that it's pretty ironic that nobody can answer what this means, considering the biggest forgivable sin is probably breaking the first and most important commandment. 1 John 5:3 (NIV) In fact, this is love for God: to keep his commands. And his commands are not burdensome, The Bible tells us that Love for God is obedience to Him. With all your heart Romans 2:15 (NIV) They show that the requirements of the law are written on their hearts, their consciences also bearing witness, and their thoughts sometimes accusing them and at other times even defending them.) The commandments and laws of God are no longer obeyed by one nation, but instead these things are written on the individual believers hearts. So that each believer may be governed by the spirit and not by the flesh. To love God with all of your heart is to allow all of His laws to govern you. Matthew 5:28 (NIV) But I tell you that anyone who looks at a woman lustfully has already committed adultery with her in his heart. With all of your mind Romans 8:6 (NIV) The mind governed by the flesh is death, but the mind governed by the Spirit is life and peace. We are also told that we need to think about good things and not evil things. We are to focus our entire mind on the things that please God. Not planning evil against a brother or doing things in private. With all of your Strength 1 John 3:18 (NIV) Dear children, let us not love with words or speech but with actions and in truth. God tells us that we need not just SAY that we are Christian, but actually BE Christian. The parable of the two farmers sons is the perfect example of this. Jesus gives two examples of Children that were told to go work in the field. On said ok but didn't go. The other said no, but then eventually went. Jesus asks the people, Who actually obeyed? The one that DID or the one that DIDN'T? It's an obvious answer, the son that DID is the son that DID. To love God with all of your strength is to DO as He has asked you to do.
1
The Bible tells us that Love for God is obedience to Him .
Does this statement make any sense?
I am asking this question completely out of curiosity. The other day, my roommate, by mistake, used 'Light year' as a unit of time instead of distance. When I corrected him (pedantic, much), he said the following: "Units are relative. And according to Fourier Transforms, units can be changed so Light year is a unit of time." That got me thinking and I read up Fourier Transforms on wikipedia but couldn't find anything about using a unit in one domain as a unit for another measurement. I do agree that units (particularly, base units are relative. eg: the meter), but does his statement make any sense? EDIT Thank you everyone for all the answers. It isn't so much to in it in or prove a point as it is to understand the concept better. Anyways this is his response after I showed him this thread. Any comments would be appreciated. His response: Nevermind, for the first time I accept I was wrong. BUT using lightyears to measure time is possible. My example didn't make sense bacause I was wrong when I meantioned that I'm still measuring dist. If you have a signal in time domain and ...take the FT, I get a signal which DOES NOT HAVE to be in frequency domain. Clarify this to the guy who posted last. Now the new signal is in a domain defined by me and so is its units. This signal although not equal to the original signal, still represents that if ya take an inverse FT. So, the idea of time will still be there. Now coming back to our case: lightyears here is not the lightyears you are used to read when dealing with distance. It represents time.
If you FT from time domain, you end up in frequency domain, not in space domain. Of course you can use the relativistic interpretation by dividing a lightyear by a factor of c to end up with - oh, a year! But instead of that FT explanation one could of course just say "it's a figure of speech as a synonym to half an eternity"...
0.777778
FT from time domain, you end up in frequency domain, not space domain
jQuery: missing ] after element list
I have that error in the code below. What's wrong ? I have no ideas left. missing ] after element list [object XMLHttpRequest] $(function () { setInterval($.post('/Sale/UpdatePrice', {SaleId : @Model.Id}, function(data){ $('#mPrice').val(data); } ) ,5000); //refresh every 5 seconds }); C# public JsonResult UpdatePrice(int SaleId) { ... return Json(NewPrice, JsonRequestBehavior.AllowGet); //NewPrice is a decimal number }
Sorry for being Capt. Obvious here, but it seems that the JSON returned is missing a ] to end the array, Can you please post the JSON?
0.888889
Can you please post the JSON to end the array?
How can I adjust tax withholding so that I don't get a large Tax Refund?
I'm a few years out of college now. I've filled out my W4 accurately and I still get a tax refund every year of a pretty sizable sum. The thing is, I have student loans and I would much rather have been paying that extra money on a monthly basis (to prevent interest charges) than have given it to the government to 'hold' for me. I've spoken to the HR department about lowering my tax deductions and they suggest putting more exemptions on my W4. However this seems off because I would essentially be purposely filling out a form incorrectly. Also, I don't see anything on this one sheet to take into consideration my student loan interest deduction, which is a large part of where my refund comes from. How do I pay my taxes correctly throughout the year so that I don't owe or receive any money when I file?
However this seems off because I would essentially be purposely filling out a form incorrectly. Note that the only part of the W-4 form that is required to be filled out and given to the employer is the small certificate at the bottom that you tear off. In this part, it only asks you for "Total number of allowances you are claiming". You don't have to fill out any of the worksheets in the other parts of the form, which actually ask for specific information. Since there are different allowed ways of computing the "Total number of allowances you are claiming", I doubt that any number you put there can be said to be "incorrect". I think that the best to use the IRS Withholding Calculator. If you use it, the calculator will probably tell you to claim a few more exemptions. And you don't have to feel bad about "filling the form incorrectly" if you follow the IRS calculator.
1
How to calculate the "Total number of allowances you are claiming"?
Parsing a Text to only see specific data
I have the following text lines: .add 7971 [Player: Sunfire (Account: 11309) X: 5839.623047 Y: 600.437439 Z: 650.839722 Map: 571 Selected player: Llubia (GUID: 19369)] .add 43956 [Player: Sunfire (Account: 11309) X: 5277.887695 Y: 2862.181641 Z: 446.735931 Map: 571 Selected none: (GUID: 0)] .add 43956 [Player: Sunfire (Account: 11309) X: 5281.407715 Y: 2864.844482 Z: 446.735931 Map: 571 Selected player: Staticbaby (GUID: 19826)] .add 43956 [Player: Sunfire (Account: 11309) X: 5231.464844 Y: 1437.029175 Z: 648.498535 Map: 571 Selected player: Sunfire (GUID: 15295)] .add 44077 [Player: Sunfire (Account: 11309) X: 5231.464844 Y: 1437.029175 Z: 648.498535 Map: 571 Selected player: Sunfire (GUID: 15295)] .add 49285 [Player: Sunfire (Account: 11309) X: 16225.323242 Y: 16252.759766 Z: 12.790466 Map: 1 Selected none: (GUID: 0)] .add 44115 175 [Player: Elmasguapo (Account: 11309) X: 1659.845093 Y: -4198.589844 Z: 56.382870 Map: 1 Selected none: (GUID: 0)] .add 34078 [Player: Sunfire (Account: 11309) X: 16227.969727 Y: 16280.081055 Z: 13.175169 Map: 1 Selected none: (GUID: 0)] .add |cffffffff|Hitem:41427:0:0:0:0:0:0:0:80|h[Fuego de Artificio de Dalaran]|h|r 50 [Player: Sunfire (Account: 11309) X: 16221.392578 Y: 16260.944336 Z: 13.255954 Map: 1 Selected none: (GUID: 0)] .add |cffffffff|Hitem:45932:0:0:0:0:0:0:0:80|h[Gelatina Negra]|h|r [Player: Sunfire (Account: 11309) X: 5874.347168 Y: 679.056763 Z: 167.483719 Map: 571 Selected player: Assasins (GUID: 19438)] .add |cffffffff|Hitem:45932:0:0:0:0:0:0:0:80|h[Gelatina Negra]|h|r [Player: Sunfire (Account: 11309) X: 5873.767090 Y: 679.386841 Z: 167.435257 Map: 571 Selected player: Assasins (GUID: 19438)] .add |cffffffff|Hitem:45932:0:0:0:0:0:0:0:80|h[Gelatina Negra]|h|r [Player: Sunfire (Account: 11309) X: 16226.880859 Y: 16247.247070 Z: 12.286857 Map: 1 Selected player: Irmtarget (GUID: 18521)] .add |cffffffff|Hitem:45932:0:0:0:0:0:0:0:80|h[Gelatina Negra]|h|r [Player: Sunfire (Account: 11309) X: 16229.297852 Y: 16251.202148 Z: 13.081388 Map: 1 Selected player: Irmtarget (GUID: 18521)] .add 41600 2 [Player: Sunfire (Account: 11309) X: 16223.138672 Y: 16250.496094 Z: 12.431313 Map: 1 Selected player: Eifreen (GUID: 20341)] .add 41600 1 [Player: Sunfire (Account: 11309) X: 16223.138672 Y: 16250.496094 Z: 12.431313 Map: 1 Selected player: Eifreen (GUID: 20341)] .add 40516 [Player: Sunfire (Account: 11309) X: 16223.138672 Y: 16250.496094 Z: 12.431313 Map: 1 Selected player: Eifreen (GUID: 20341)] .add 44661 [Player: Sunfire (Account: 11309) X: 16223.138672 Y: 16250.496094 Z: 12.431313 Map: 1 Selected player: Eifreen (GUID: 20341)] .add 40518 [Player: Sunfire (Account: 11309) X: 16223.138672 Y: 16250.496094 Z: 12.431313 Map: 1 Selected player: Eifreen (GUID: 20341)] .add 44005 [Player: Sunfire (Account: 11309) X: 16223.138672 Y: 16250.496094 Z: 12.431313 Map: 1 Selected player: Eifreen (GUID: 20341)] .add 45867 [Player: Sunfire (Account: 11309) X: 16223.138672 Y: 16250.496094 Z: 12.431313 Map: 1 Selected player: Eifreen (GUID: 20341)] .add 45316 [Player: Sunfire (Account: 11309) X: 16223.138672 Y: 16250.496094 Z: 12.431313 Map: 1 Selected player: Eifreen (GUID: 20341)] And I want to parse it so it outputs something like this: Line 1 For example - 7971 Llubia Line 3 For example - 43956 Staticbaby Line 9 For Example - 45932 Assassins And so on.. This is done in the terminal with commands like cut, grep, cat, etc.. UPDATE: Here is the whole file: http://paste2.org/p/1744102 to parse in that way. UPDATE2: Please forgive me if I do not accept an answer just yet. Am waiting for the bounty option to appear since for me, stuff like this deserve a bounty. So I will add a bounty and give it to the correct answer or answers.
It's not really feasible to use command line tools to parse irregular ouput. Would be better to use python, etc.. If you had complete regularity, e.g., you could use something as simple as: awk '{print $2 " " $17}' INPUT This misses the 'Hitem' lines from your example. This is an ugly hack, but it takes the 'Hitem' lines into account: sed 's/^.*Hitem:\([0-9]*\):0/\1/' INPUT | awk -F: '{print $1 " " $0}' | sed 's/\.add //' | sed 's/^\([0-9]* \).*Selected player: \([A-Za-z]* \).*$/\1 \2/' | egrep -v 'Selected none' Which gave me: 7971 Llubia 43956 Staticbaby 43956 Sunfire 44077 Sunfire 45932 Assasins 45932 Assasins 45932 Irmtarget 45932 Irmtarget 41600 Eifreen 41600 Eifreen 40516 Eifreen 44661 Eifreen 40518 Eifreen 44005 Eifreen 45867 Eifreen 45316 Eifreen This fails on the additional info you've added, however, which is why I've added the comments/caveat about regularity here.
0.777778
How to parse irregular ouput?
How to allow users to choose different theme?
Some of my site users prefer a light theme, others prefer dark one. In drupal 6, is there a way to allow users to choose their favorite theme? How? Thanks
I just found Switchtheme, which will give you a block that allows users to switch.
1
Switchtheme is a block that lets users switch.
how to set up wired and wireless to be used by different applications
My wired interface (eth0) is connected to a corporate VPN (which disallows all sorts of things via a proxy) while at the same time the wireless interface is connected to a guest wireless network on eth1 which has no restrictions. How can I configure things (Ubuntu) in such a way that my wireless handles all browser connections while my wired handles the rest (nfs, etc.).
Since you're using an Ubuntu desktop, I presume you're managing your connections with NetworkManager. You will need to do two things: Edit your Ethernet interface in NetworkManager, choose Routes and then select Use this connection only for resources on its network. Add static routes here for all of the IP address ranges in use on your corporate network that you need to access. The gateway for these should be your current gateway IP address for the eth0 interface. You can obtain a list of these networks from your network admin staff. Once you have completed this, all of your traffic will go out via your wireless connection unless it's on one of the networks you specified a static route for. You will probably need to set up your browser as well, so that it only proxies traffic bound for IP address ranges inside the corporate network. Better yet, use two Firefox profiles: one for the corporate network and one for general Internet usage. (Part of this answer, and the above image, borrowed from the Ask Ubuntu question Force network-manager to use wireless for an Internet connection.)
1
Connect to NetworkManager with Ubuntu desktop
how to stop my html page resize
i made an HTML page with all widths and heights as percentage "that's primary for my design to work with all resolutions" but when i re-size my web browser everything will be damaged. is there a way that when i re-size my web browser i can scroll the page?
The only way to handle this is with script. Take a look at other examples where people float a footer at the bottom of the page for example. Using jQuery you might do something like:- <script type="text/javascript"> $(document).ready(function() { setPanels(); }); window.onresize = function() { setPanels(); } function setPanels() { var windowHeight = $(window).height(); var content1Height = $('#topDiv').height(); var content2Height = $('#bottomDiv').height(); // Now calculate the new splits and adjust heights ... </script>
1
How to handle a footer with script
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."
The difference between “so far, so good” and simply “good” is that the former implies a lack of guarantees about the future. “So far, so good” connotes that things can go wrong later, but not that they will go wrong later — unless used in an ironic or humorous context such as “I plan to live forever; so far, so good.”
1
The difference between “so far, so good&rdquo
how to Remove payment method, shipping information and shipping method
I want remove Shipping Information, Shipping method, and Payment method for now i don't need to add all of this, i only want customer can view product detail and go for checkout. i tried to remove it at time of checkout it giving me error message that process can not go further for checkout.
Amasty give a good idea.But if you want checkout all type of Product using checkout Then follow below steps: step1: make shipping same as billing address. Step2:On Billing save action programmatically set free shipping as shipping method. may like: add below code which set shipping method on checkout after $this->getOnepage()->saveBilling($data, $customerAddressId); $this->getOnepage()->getQuote()->getShippingAddress()->setShippingMethod($shippingMethod); $this->getOnepage()->getQuote()->collectTotals()->save(); Step3: Also on billing save action programmatically save Zero Subtotal payment as payment or any available payment gateway. exmaple: $quote=$this->getOnepage()->getQuote() $paymentData = $this->_preparePaymentData($paymentData); if ($quote->isVirtual()) { $quote->getBillingAddress()->setPaymentMethod('free'); } else { // check if shipping address is set if (is_null($quote->getShippingAddress()->getId())) { // error } $quote->getShippingAddress()->setPaymentMethod( isset($paymentData['method']) ? $paymentData['method'] : null ); } if (!$quote->isVirtual() && $quote->getShippingAddress()) { $quote->getShippingAddress()->setCollectShippingRates(true); } $total = $quote->getBaseSubtotal(); try { $payment = $quote->getPayment(); $payment->importData(array('method' => 'free')); $quote->setTotalsCollectedFlag(false) ->collectTotals() ->save(); } catch (Mage_Core_Exception $e) { } Step4: Goto review step using json return like: try { // get section and redirect data $redirectUrl = $this->getOnepage()->getQuote()->getPayment()->getCheckoutRedirectUrl(); if (empty($result['error']) && !$redirectUrl) { $this->loadLayout('checkout_onepage_review'); $result['goto_section'] = 'review'; $result['update_section'] = array( 'name' => 'review', 'html' => $this->_getReviewHtml() ); } if ($redirectUrl) { $result['redirect'] = $redirectUrl; } } catch (Mage_Payment_Exception $e) { if ($e->getFields()) { $result['fields'] = $e->getFields(); } $result['error'] = $e->getMessage(); } catch (Mage_Core_Exception $e) { $result['error'] = $e->getMessage(); } catch (Exception $e) { Mage::logException($e); $result['error'] = $this->__('Unable to set Payment Method.'); } $this->getResponse()->setBody(Mage::helper('core')->jsonEncode($result))
1
Step1: Make shipping same as billing address
What is "perspective" in the 3D Extrude and Bevel Options?
I was watching a tutorial on the 3D Extrude & Bevel Options and I did not understand how Perspective work. I know it's viewing something at an angle, but I don't see from where it references it from. I placed the object in front and left position, and at these basic positions, the perspective option only becomes more mysterious to me. What exactly is going on? Thank you.
To provide the Idiot's Guide version of Scott's answer ;) Think of the perspective as your vanishing point from basic drawing. Bigger numbers create a more dramatic vanishing point angle. They'll give you a closer more epic impression. Lower numbers will more accurately represent the geometry of your original object. Remember to expand the lighting options and play around with the light angle to better control the effect. Regardless of what vanishing point you use, you can make big improvements with the light.
0.777778
What's your vanishing point angle?
CMS Uses http and so sends password in plain text
A well known CMS called Joomla allows users to register and the password appears hidden as you register with dots a normal experience online - at this point you think just you know it. But if the site is using http then in fact the password is POSTed using plaintext. This shouldn't be allowed! I can understand that passwords are stored as salted hashes in good systems so even if the passwords are discovered on the db you cant use them to login. Is that pretty much it? Before we talk about password reset - in this case a good system cannot remind you of your password as it is not recoverable! It can only reset it for you and again isn't this sent plaintext over the net ??? So why cant that get stolen.. The issue is when the real plain text passwords are known by anyone or any system other than the user then identity is lost.
Joomla has had a "Force SSL" setting since version 1.5. You can set it up by changing either the configuration.php file, or using the admin web GUI. Its set to "None" by default, mostly because several hosts don't support SSL/HTTPS out of the box. You probably want to change it to "Administrator Only" to secure only the admin interface, or "Entire Site" if you want to secure even the public facing front-end (useful if you have front-end logins.)
0.666667
Joomla has had a "Force SSL" setting since version 1.5
How to construct a closed, filled, path made of semi-circles and attach annotations to it with TikZ?
I have very limited LaTeX knowledge. I am trying to plot the following figure using "tikz" and I appreciate if anyone can help me to finish plotting my figure. I did the following so far: \documentclass{article} \usepackage{tikz} \begin{document} \begin{tikzpicture} \draw (0,0) arc (0:180:6); \draw (-12,0) - -(0,0); \draw (-8,0) arc (0:180:2); \draw (0,0) arc (0:180:4); \draw (-6,-0.1) - - (-6,0.1); \end{tikzpicture} \end{document} There is a BIG semi-circle and two inner SMALL semi-circles. I want to label the right endpoint of the BIG semi-circle by "A" and the left endpoint of the BIG semi-circle by "B". I want to label the center of the BIG semi-circle by "O", and I want to label the point where the two SMALL semicircles meet by "P". I also want to shade the area inside the BIG semi-circle and outside the two SMALL semi-circles. I also want to mention on the figure that the radius of the big circle is: 6. and the distance between the point "O" and the point "P" is "x" Any help is much appreciated
You can also draw that path at one go so you don't need to fill white to restrict the fill if you have something else underneath it. And while you are at it you can also place the labels and coordinates too. \documentclass[tikz,border=5mm]{standalone} \usetikzlibrary{decorations.pathreplacing} \begin{document} \begin{tikzpicture} \filldraw[fill=blue] (0,0) coordinate[label=-90:$B$] (B) arc (180:0:3cm) coordinate[label=-90:$A$] (A) arc (0:180:2cm) coordinate[label=-90:$P$] (P) arc (0:180:1cm); \draw (B)--(A) coordinate[midway,label=-90:$O$] (O); \draw[decoration={brace,raise=5mm},decorate] (A) -- (O) node [midway,yshift=-6mm,below] (R) {$6$}; \draw[decoration={brace,raise=5mm},decorate] (O) -- (P) node [midway,yshift=-6mm,below] (r) {$x$}; \end{tikzpicture} \end{document}
0.666667
Draw path at one go so you don't need white to restrict the fill if you have something else underneath it
When are Unity scripts actually disabled?
When I disable an active script in unity, will it be disabled then and there, or will it only be disabled at the end of the frame? For example, if I disable a certain script from within a "OnCollisionEnter" event method, will the "disabled" script still perform it's Update method for this frame?
I think this document from the Unity help should be useful. Look to the diagram at the bottom of the page. Physics and collisions are processed before the game logic so if you disable an object during collision it will become disabled after its next update.
0.888889
How to disable an object during collision
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) \leq M(p)$? I'm not sure whether this is obvious and I'm just missing something, or whether my train of thought is just completely off...
This question has been studied a bit because it is actually of practical relevance to computer algebra. The tightest known bounds are surprisingly large. A good review is Bounds on factors in $\mathbb{Z}[x]$, John Abbott, which according to his CV has been accepted for publication by the Journal of Symbolic Computation. His paper also contains a number of examples and an argument for why the bounds must necessarily be larger than you might hope. When I wrote this answer there was another one with a couple of small examples, but it's been deleted, so I'll add some small examples in different categories from Abbott's paper. Large height reducible factor of $x^d-1$: $$\begin{eqnarray}x^{12} - 1 & = & (x-1)(x^2+1)(x^2-x+1)\; (x+1)(x^2+x+1)(x^4-x^2+1)\\ & = & (x^5 - 2x^4 + 3x^3 - 3x^2 + 2x - 1)(x^7 + 2x^6 + x^5 - x^4 - x^3 + x^2 + 2x + 1)\end{eqnarray}$$ Large height irreducible factor of polynomial of height $1$: $$x^4 + x^3 - x^2 - 1 = (x-1) (x^3 + 2x^2 + x + 1)$$ Large height reducible factor of polynomial of height $1$: $$x^3 + x^2 - x - 1 = (x-1)(x+1)^2 = (x-1)(x^2 + 2x + 1)$$
1
The tightest known bounds are surprisingly large
what is exactly the difference between the Selberg class and the set of Artin L-functions?
The question is in the title: from what I read in the answer to another question, Artin L-functions are conjecturally cuspidal automorphic L-functions for some algebraic group that can be transfered to $GL_{n}$. On the other hand, elements of the Selberg class are widely believed to be (cuspidal?) automorphic L-functions for $GL_{n}$. So where exactly lies the difference between those two sets of L-functions? Thanks in advance.
The essential answer has already been given but here are a few extra thoughts. Artin L-functions are defined from a representation of a Galois group on a compex vector space, wheras Hasse--Weil (which are motivic) L-functions are defined by a Galois action on an l-adic one. In the former case, for topological reasons a complex representation of the infinite Galois group Gal$(\overline{\mathbb{Q}}/\mathbb{Q})$ factors through the Galois group of a finite extension $K/\mathbb{Q}$. This is not so for the $l$-adic representations. Hasse--Weil $L$-functions, much like Artin's, are expected to be the $L$-functions of cuspidal automorphic representations. I notice you query the word "cuspidal" in your question. There are automorphic forms, such as Eisenstein series, which are not cuspidal. Basically this means there is a non-zero constant term in the Fourier expansion. This constant term is closely related to a pole of the $L$-function. To see this, all one needs is Mellin inversion and the residue theorem. Artin $L$-functions can be easily proved meromorphic, as a simple application of the Brauer induction theorem, but they are expected to moreover be holomorphic, and this is not known in generality. This holomorphy is crucial in the application of the so-called converse theorems which would give automorphy of Artin $L$-functions.
0.666667
Artin L-functions are defined by a Galois action on an l-adic representation .
How prove this equation $\alpha=\aleph_{0}\alpha$
Question: let $\alpha$ be a infinite cardinal , show that: $$\alpha=\aleph_{0}\alpha$$ where $\aleph_{0}$ is the cardinality of the natural numbers is denoted aleph-null this equation is from a book,and I can't prove it,and the author say this is important equation,and can't prove it.Thank you for you help
Recall that $\aleph_\alpha$ is the cardinality of the $\alpha$-th [infinite] initial ordinal, denoted by $\omega_\alpha$. For this proof you will need an extra fact: If $\alpha$ is an uncountable ordinal then $|\alpha|=|\{\delta<\alpha\mid\delta\text{ is a limit ordinal}\}|$. If $\alpha=0$ then you can prove directly that $\aleph_0\cdot\aleph_0=\aleph_0$ by using a pairing function. Now define an equivalence relation on the ordinals below $\omega_\alpha$, $\xi\sim\zeta$ if there are only finitely many ordinals between $\xi$ and $\zeta$. I will leave you to verify that this is an equivalence relation. $\omega_\alpha$ is well-ordered, each equivalence class has a least element, and it is a limit ordinal, or zero. Otherwise its predecessor is in the same equivalence class, which is a contradiction to the minimality. And of course, different limit ordinals cannot be in the same equivalence class, because they have infinitely many ordinals between them. So we have $\aleph_\alpha$ equivalence classes; and $\aleph_0$ points in each of the classes. Therefore $|\omega_\delta|=\aleph_\alpha\cdot\aleph_0$. Note that the axiom of choice wasn't used here, because we have a canonical ordering of each equivalence class. Now. How to prove the fact? Usually the proof goes through defining the above equivalence relation and using the fact that $\aleph_0\cdot\aleph_\alpha=\aleph_\alpha$. So we can't really use that here. But we can use transfinite induction. It suffices to prove this for the initial ordinals, because every limit ordinal which is not an initial ordinal is either countable, or equipotent with its initial ordinal. Suppose that for $\alpha$ it is true that for all $\beta<\alpha$, either $\beta=0$ or there are $\aleph_\beta$ limit ordinals below $\omega_\beta$. Then it holds that $\aleph_0\cdot\aleph_\beta=\aleph_\beta$ for those $\beta$'s. By contradiction there are less than $\aleph_\alpha$ limit ordinals below $\omega_\alpha$, then there is some $\beta<\alpha$ such that $|\{\delta<\omega_\alpha\mid\delta\text{ is a limit ordinal}\}|=\aleph_\beta$. Consider the above equivalence relation defined on $\omega_\alpha$, then it only has $\aleph_\beta$ equivalence classes, and therefore $\aleph_\beta=\aleph_\beta\cdot\aleph_0=\aleph_\alpha$, but $\beta<\alpha$ and that is impossible. $\square$ So at the end we have to resort to transfinite recursion if we want to use the structure of ordinals, but it's just a scary term, it's not that scary once you understand this extremely useful technique. Now, using the axiom of choice if $\alpha$ is an infinite cardinal then it is an $\aleph$ number. However, some people define "cardinal" as an $\aleph$ number to begin with, in which case you don't use the axiom of choice. In the general form, where cardinal need not be an $\aleph$ number, it is consistent with the failure of the axiom of choice that there are cardinals which do not satisfy this property.
1
How to prove equivalence relation with limit ordinals
Stop JS-event propagation on table row click
I have the following HTML-table: <table> <tr> <td> Row 1 </td> <td> <!-- Hidden JSF-button --> <button class="hide" /> </td> </tr> </table> When I click on a tr, I trigger a click on the hidden button with JS: $('table tr').on('click', function(e) { var $button = $(this).find('button'); console.log('trigger click on', $button); $button.trigger('click'); }); The click event propagates up, and will cause a never ending loop (can be seen here: http://codepen.io/anon/pen/kDxHy) After some searching on SO, it is clear that the solution is to call event.stopPropagation, like this (can be seen here: http://codepen.io/anon/pen/BnlfA): $('table tr').on('click', function(e) { var $button = $(this).find('button'); // Prevent the event from bubbling up the DOM tree. $button .off('click') .on('click', function(e) { console.log('click'); e.stopPropagation(); return true; }); console.log('trigger click on', $button); $button.trigger('click'); }); The solution above works. But it feels like a hack, and I don't like it. Do I have to register a click handler on the on the $button just to call event.stopPropagation? Are there any better way(s) of preventing the click event from bubbeling?
Modifying buttons behaviour, expecially in frameworks, can cause some unexpected issues. You could add a flag to the row and use it to check if the button should be clicked. But you have to know how many click are automatically generated and should be omitted. var handleClick = function(e) { var $button = $(this).find('button'); console.log('triggerring click on...', $button); if (this.clicked !== true) { console.log('and clicked!') this.clicked = true; $button.trigger('click'); } else this.clicked = false; }; Here's the code: http://codepen.io/anon/pen/dJroL
0.666667
Modifying buttons behaviour in frameworks can cause unexpected issues .
E_COMPILE_ERROR when enabling Magento compilation
I'm trying to enable compilation on Magento via the control panel and while compilation is enabled the main page fails to display properly and I find that index.php has repeatedly raised the following error in logs: E_­COMPILE_­ERROR: require_­once­(­)­: Failed opening required '­Config­File­Manager­Model.­php' ­(include_­path='/­var/­www/­vhosts/­<domain_name_redacted>/­httpdocs/­includes/­src­:.­:'­)­ The site returns to normal immediately after disabling compilation but I'd really like to have the performance benefits. Does anyone know how to fix this?
It sounds like one of your extensions, or some custom code in your system, is incompatible with Magento's compilation mode. The exact solution will vary depending on your PHP system. Here's an explanation of the problem and some troubleshooting tips that should help you. A file in your system contains a line that looks something like this //the string 'ConfigFileManager-Model.php' may be //a constant or variable as well require_once 'ConfigFileManager-Model.php'; The file ConfigFileManager-Model.php is not part of Magento, or any publicly distributed package as far as I can tell. It sounds like when you're running in "non-compiled mode", Magento can find this file without issue. That means it's somewhere in the normal Magento include paths /path/to/magento/app/code/core/ConfigFileManager-Model.php /path/to/magento/app/code/community/ConfigFileManager-Model.php /path/to/magento/app/code/local/ConfigFileManager-Model.php /path/to/magento/path/to/calling/files/own/folder/ConfigFileManager-Model.php #possibly more, depending on your system's default include path However, when Magento runs in compiled mode, the core, local, and community code pool paths are not added as include paths. Only the folder /path/to/magento/includes/src is added as an include path. Additionally, what compilation mode does is make copies of all the class files and drops them into the includes/src folder. That means the file's own original folder is no longer in the include path. Because of this, when Magento runs the require code in compilation mode, it can't find the ConfigFileManager-Model.php file, and fails. The best thing to do would be recode the module and/or custom code such that the functionality of ConfigFileManager-Model.php is incorporated into a standard Magento helper of model class. The less good, but quicker thing would be to identify all the places ConfigFileManager-Model.php is required and change the path so it's absolute instead of relative.
1
ConfigFileManager-Model.php is incompatible with Magento's compilation mode .
How to replace jquery attr rel with id
I would like to make my webpages a w3c valid.so i rectifying the errors step by step to be valid , i used html5 doctype, I found an error Line 348, Column 81: RDFa Core attribute rel is not allowed on the li element in HTML5 + RDFa 1.1 Lite documents. Consider checking against the HTML5 + RDFa 1.1 schema instead. so i tried to replaced id instead of rel , w3c valid but the code doesn't work . How to work the below code without using rel? <script type="text/javascript"> $(document).ready(function() { $(".tab_content").hide(); $(".tab_content:first").show(); $("ul.tabs li").click(function() { $("ul.tabs li").removeClass("active"); $(this).addClass("active"); $(".tab_content").hide(); var activeTab = $(this).attr("rel"); $("#"+activeTab).fadeIn(); }); }); </script> <ul class="tabs"> <li class="active" rel="tab2">  Reviews  </li><li rel="tab3">News</li><li rel="tab4">  Articles </li></ul> <div id="tab1" class="tab_content" style="width:326px;">data</div> <div id="tab2" class="tab_content" style="width:326px;">data tab2</div>
For all li elements assoicated with the tabs, change this: <li class="active" rel="tab2">  Reviews  </li> to: <li class="active" data-target="tab2">  Reviews  </li> And change var activeTab = $(this).attr("rel"); to: var activeTab = $(this).data("target"); Note this uses jQuery default behavior in pulling the HTML5 data-* attributes into the dataset for the object.
0.777778
Change var activeTab = $(this).attr(rel)
Does this statement make any sense?
I am asking this question completely out of curiosity. The other day, my roommate, by mistake, used 'Light year' as a unit of time instead of distance. When I corrected him (pedantic, much), he said the following: "Units are relative. And according to Fourier Transforms, units can be changed so Light year is a unit of time." That got me thinking and I read up Fourier Transforms on wikipedia but couldn't find anything about using a unit in one domain as a unit for another measurement. I do agree that units (particularly, base units are relative. eg: the meter), but does his statement make any sense? EDIT Thank you everyone for all the answers. It isn't so much to in it in or prove a point as it is to understand the concept better. Anyways this is his response after I showed him this thread. Any comments would be appreciated. His response: Nevermind, for the first time I accept I was wrong. BUT using lightyears to measure time is possible. My example didn't make sense bacause I was wrong when I meantioned that I'm still measuring dist. If you have a signal in time domain and ...take the FT, I get a signal which DOES NOT HAVE to be in frequency domain. Clarify this to the guy who posted last. Now the new signal is in a domain defined by me and so is its units. This signal although not equal to the original signal, still represents that if ya take an inverse FT. So, the idea of time will still be there. Now coming back to our case: lightyears here is not the lightyears you are used to read when dealing with distance. It represents time.
He's BS-ing you to the extent that an explanation of the fourier transform is not necessary to point this out ("units are relative" - what like length and time are the same thing? then all unit definitions would be circular as length is defined in terms of time at present. is mass also length? can you give my height, weight, and age in one number and define each as the same number in different units? =) ). I'll be specific though, anyway. The fourier transform of a scalar number is simply not defined (no such thing as a fourier transform of a distance, for instance). Typically fourier transforms give you a function of frequency for every function of time or of space. Under certain conditions, where there is a relationship between spatial frequency and temporal frequency (like waves propagating in a nondispersive medium here wavelength*frequency = speed of waves) you can then get a function of time for any function of space using a fourier transform, indirectly. But this is a special case, involves functions, not numbers, and this fourier transform of the original function is NOT THE SAME as the original function, so it's irrelevant to your original argument. So your friend is screwing with you. Have a good one
1
Fourier transform of a scalar number is simply not defined .
What's the best method to responsibly dispose of used alkaline batteries?
Years ago, I would have typically tossed typical, Alkaline batteries in the trash. I have been reading more and more on this topic, and while I see that rechargeable batteries should be recycled, I'm finding conflicting evidence on how best to dispose of Alkaline batteries. For example, Duracell claims that since they removed the mercury from batteries, they're safe for disposal. But others claim (see Disqus comments at the bottom) that since all batteries contain various kinds of heavy heavy metals and should thus be recycled.
In the UK (and most, if not all, of the EU): some supermarkets have recycling bins for small batteries. Every community has a household waste recycling centre with containers for old batteries (including both lead-acid car batteries and small appliance batteries like AA batteries). EU Directive 206/66/EC says In order to protect the environment, waste batteries and accumulators should be collected. For portable batteries and accumulators, collection schemes achieving a high collection rate should be established. This means setting up collection schemes so that end-users can discard all waste portable batteries and accumulators conveniently and free of charge
1
Waste batteries and accumulators should be collected in the UK .
Can you match a Windows XP product key to a service pack release?
I have a Windows XP product key on my PC, but I'm not sure which release of Windows XP it belongs to SP1, SP2, or SP3. Is there a way I can tell without trying each one? Note: In this case, I have an old PC which had an OEM XP Pro license. I don't have the media for it any more. However, I do have a media for XP Pro (off the shelf non-OEM). The Product Key on the case doesn't want to validate. So I'm presuming that there is something encoded in it as to the release it works with. I can get media, I just don't want to try each one.
You need to download or get access to OEM XP Pro media. The service pack version does not matter in the least. I've had good success downloading this media from torrent sites. Some others would say this is unwise, but so long as you download a file that is highly rated, you're unlikely to have issues. Non-OEM media will not recognize or validate your product key.
0.888889
OEM XP Pro media cannot recognize or validate your product key
What does “bupke” mean?
There was the following passage in the New Yorker's (August 27) article titled, “A scandal at the C.I.A. May be.” : In January I (David Shafer, novelist) filed a Freedom of Information Act request with the C.I.A., asking for any information relating to my grandfather and Thomas Whittemore and the events of June 1950. They took two months to give me bupkes. But to give me bupkes, they were required to invoke a FOIA exemption, and the exemption that C.I.A. involved were (b)(3), which means the records are protected by another federal statute, and (b)(1) --- Though I was unable to find the definition of “bupke” in OED (10th ed.), OALD (2000), and Collins Cobuild (4th ed.) at hand, I happened to find its definition at bageldrive.com, which says “bupke” is; A mini-bagel deliciously baked to perfection with fully functional USB 2.0 flash memory and a shmeer. It’s the world’s first electronic bagel. The Bagel Drive is ideal for storing files, photos, video, music and all of your digital tchochkes. The site also shows photos of USB attached to plastic bagel models. What does bupke mean? Is it a flash memory in a bagel shape as described in bagldrive com.? Does it pass as the generic term of flash memory? Beside, I wonder why CIA takes bother of using such a funky shape of all flash memories to provide data to the requester.
Is the question a joke? If not, google bupke (or bupkis). You will find descriptions such as the one on this page: bupkis (also bupkes, bupkus, bubkis, bubkes): emphatically nothing, as in He isn't worth bupkis (indeterminate, either 'beans' or 'goat droppings', possibly of Slavic, Vlach, or Greek origin; cf. Polish bobki 'animal droppings')[2] (MW, OED) I'm guessing that what you cite is a description of a hard drive that looks something like a bupke.
0.888889
Is the question a joke?
Privacy of Gmail for business?
Considering the recent litigation in which Google apparently claimed that all the emails, all the data in them, are Google's property and can do with the data whatever they want, I get frequent questions from our employees how does this translate into Gmail for business which we're using. Is the data in our corporate account also Google's property? http://www.theregister.co.uk/2013/08/14/google_cloud_users_have_no_legitimate_expectation_of_privacy/
If you're not encrypting your email, then you really can't be said to have any expectation of email privacy, so the flap about whether or not they scan your emails makes little sense to me. That email is scanned at every step of its journey, by various virus and spam scanners. Google claims various rights regarding your content in their TOS, but the inherent copyrights, etc. stay with you. I've worked with Fortune 500 companies whose email was put through Google specifically because they could be relied on to keep it (it vastly simplifies SOX compliance, for example). But if you're really worried about privacy, email is not the best medium.
1
Email is scanned at every step of its journey, by various virus and spam scanners
What is best practice to handle whitespaces when letting the user edit the configuration, the name=value pairs?
For instance, you let the user define the notorious path variable. How do you interpret apppath = C:\Program Files\App? This looks like a programming language adopted practice to ignore the white spaces and you leave them around the equality mark for readability, but it might be a valid variable value with white space in the application (consider, it is a suffix). Even keys can contain whitespaces, can't they? What is the general best practice for my application? If I have: key-example = value-example should I interpret the key being "key-example" or "key-example " and the value as being "value-example" or " value-example"?
As a user, I don't expect the whitespace on either side of the equals sign to change the value of the key or the value. See this related question on unix.SE as too how confusing the situation can be. Don't make it harder on your users, trim whitespace from both the key and the value. If leading whitespace has a real use case for either, then let the user wrap the key or value in quotes.
0.666667
Whitespace on either side of equals sign to change key or value
BJT switch connections
If an NPN BJT is being used as a switch, why is the load usually connected between +Vcc and collector? How is the performance affected if the load is connected between emitter and ground?
If the load is connected between the emitter and ground then the configuration is what is known as common collector and in that configuration the emitter voltage is approximately 0.6v lower than the base voltage. It is also called an emitter follower because the emitter voltage always "follows" the voltage of the base minus the base-emitter diode voltage drop (about 0.6v). This mode is not convenient when you try to switch a load that uses a voltage higher than the voltage you connect to the base, so if you try to drive a 12v relay connected to the emitter with a microcontroller that feeds the base of the transistor with 3.3v or 5v then you will see that the relay actually gets 2.7v or 4.4v (for 3.3v and 5v input) which is much lower than needed. On the other hand it can be very useful if you want to make a regulator, you can use a zener to drive the base with a constant voltage and the emitter output will keep a constant voltage approximately 0.6v lower than the base.
0.888889
If the load is connected between the emitter and ground then the configuration is what is known as common collector
Can search engine robots read file with permission 640?
I am on a shared web hosting linux server. I want search engine robots/spiders to be able to read the robots.txt but not any one typing www.mysite.com/robots.txt. As per the following google group post, the user specifies that by setting file permission to 640, it's possible to deny access to robots.txt file by the world but still enable search engine robots to read them. Is that true? If not how it's possible to deny general public access to robots.txt but still allow Search engine robots to read them.
As long as your robots.txt is accessible by search engines on your server, any user can directly access it by typing its address. You could block its access via .htaccess using specific user-agent filters, though, namely authorizing only search engines user agents to access it. As long as no one is fooling around with a fake user agent to blind guess your robots.txt file, you should be safe. The real question is: why don't you want your users to see it? If any informaton is too important to be visible on the web, it should not be published online (unless behind a password-protected wall).
1
Why do you want your robots.txt to be accessible by search engines?
Parallel circuit and Ohms law
Theoretical questions with ideal components.(R2 is 10 Ohm) 1) parallel circuit. R1 and ammeter, If I have a parallel circuit of 2 resistances, both zero Ohm, the current would split to 2 and each current would be half. If the resistor R1 would be 1 pico Ohm, and the ammeter zero Ohm, there would be no current through the resistor, and all the current would go through the ammeter? 2) Ohms law. R2 is 10 Ohm, current is 1A. voltage between point A and B is 0 volt, resistance between A and B is 0 Ohm, according to Ohms law, I = V / R = 0 / 0 = 0 A. Correction, 0/0 is not 0, it is undefined.(edited after posting) Is it telling me that it sees this as 2 circuits, with a common wire, and the circuit between A and B has no current, but the circuit between (+) and (-) has 1 Amp. Correction, the current between A and B is undefined. (edited after posting) Both questions are theoretical with ideal components, and the voltmeter and ammeter are connected this way on purpose. I would like to get some feedback on this topic.
If I have a parallel circuit of 2 resistances, both zero Ohm, the current would split to 2 and each current would be half. "Zero ohms" is an idealization. If you say you have two zero-ohm resistors in parallel, it just means your model is not accurate enough to determine how the current is split. If the resistor R1 would be 1 pico Ohm, and the ammeter zero Ohm, there would be no current through the resistor, and all the current would go through the ammeter? If "zero ohms" means much much less than 1 picoohm, then yes, essentially all the current would go through the ammeter. But real ammeters have burden resistance that's much much more than a picoohm (more like a few milliohms). 2) Ohms law. R2 is 10 Ohm, current is 1A. voltage between point A and B is 0 volt, resistance between A and B is 0 Ohm, according to Ohms law, I = V / R = 0 / 0 = 0 A. You have a false conclusion. Zero divided by zero is not zero. It is an undetermined value. Could be zero or could be infinite, depending on the situation. To analyze this circuit, restate Ohm's law as V = I R. You know the current is 1 A due to the other circuit elements. You know the voltmeter doesn't pass current. Therefore there's 1 A passing from B to A, and because it's a perfect wire, the voltage is zero.
0.666667
"Zero ohms" is an idealization .
Read dot matrix printer data through parallel port
Current setup: I have a PLC that, under certain conditions, will print information to a dot-matrix printer that it is connected to. Desired setup: Replace the printer with a PC (which has a parallel port) that can read the data and save it to a file. Does anybody know of any software that can accomplish this? The platform would be Windows XP.
Here is a link to a device (and software) to do that. I don't have any experience with it.
0.888889
Using a device to do this
What is the best introductory Bayesian statistics textbook?
Which is the best introductory textbook for Bayesian statistics? One book per answer, please.
Sivia and Skilling, Data analysis: a Bayesian tutorial (2ed) 2006 246p 0198568320 books.goo: Statistics lectures have been a source of much bewilderment and frustration for generations of students. This book attempts to remedy the situation by expounding a logical and unified approach to the whole subject of data analysis. This text is intended as a tutorial guide for senior undergraduates and research students in science and engineering ... I don't know the other recommendations though.
1
Data analysis: a Bayesian tutorial for undergraduates and research students
Who did/do I met today on the way to work?
Lets say you have the sentence Today I've met an old coleague on the way to work. What is the question going to be: Who did/do I met today on the way to work? did or do, and why? EDIT: Also, in the first sentence, is the I've right? Or should it be I met?
It should be: Today I met an old colleague on the way to work. And, for the question: Who did I meet on the way to work today? It's did and not do because it is in the past tense. You aren't currently meeting the colleague on the way to work. Also, because it is the verb to do, the verb to meet stays in present tense because do, along with be and have, is a primary auxiliary verb. Edit: I'm assuming you aren't talking about your escapades in daily life as if they were a story. If you were, it would be Who do I meet on the way to work today? because narratives are recounted in the present tense. But since you shouldn't talk about your day in normal conversation like it's part of a story, you should use the past tense.
1
Who do I meet on the way to work today?
WLAN roaming on same, or different channel
I've setup a router in my basement, and an access point in my attic floor. They are connected with a patch cable. Both have the same SSID and WPA2 security. Roaming does work. But, what I want to know is, if I need to set them on different channels, or do they need the exact same channel to share. I've read many community forums and manuals, but yet it is not clear what to do because they have different opinions. Router: Fritz!Box 7270 Accesspoint: Netgear WN604
Your access points are using WDS to bridge the network. It requires you have to have same channel, ssid and encryption settings on both APs.
0.888889
WDS to bridge the network
Will enclosing my porch keep my house warmer?
Will enclosing my porches during the winter help keep my house warmer? There is a lot of wind hitting the house, and I'm afraid that is causing a drop in temperature.
Unlikely. If your house is too cold in the winter, ans especially if it's very windy, you need to start by sealing off places where cold air is coming in. That will often help a ton. The next time it's very windy, just go around the house feeling for drafts and air currents. After doing that, you can then start to improve your house's insulation. The attic floor is often low-hanging fruit since you can blow a bunch of cellulose onto the floor very inexpensively. If you have hollow walls, those can be blown full of cellulose as well (in the wall, it needs to be dense-packed) through holes cut in the top of the wall. Basement walls can also be a big win, but to do that properly, you need to add rigid foam insulation boards and make it airtight so moist air can't blow through the insulation boards touch the wall. After that, new windows or low-e storm windows can help.
1
If your house is too cold in the winter, ans especially if it's very windy, you need to seal off places where
How can I put page through printer without cartridge?
It might sound like a strange question, but I noticed that my printer is folding paper. So I would like diagnose it, whether it's because of cartridge or the problem is somewhere else. If I could put paper through printer without cartridge inside, and it still would be folded then it would clearly be the problem with printer itself. Printer is HP M125nw. Basically I would like to make sure, that folding is not because of cartridge.
looking at images of this printer, it doesn't look like there is a manual paper feed button. Your best bet is to remove the cartridges one by one and do a print. First remove black and do a print, then remove another and replace black and print again etc... The printer may or may not allow this. The alternative is to simply print a blank document. If there is no need for the print head to be lowered, it won't crumple the paper. It won't be down to the type of ink in the cartridge... it may give you poor print performance, but the ink won't jump out of the cartridge, screw up your page and then go back into the cartridge. It won't be the dimensions of the cartridge either - if it was too big, it wouldn't fit in the printer - or would at least smear ink across the page where it over-contacted if the cartridge was only too big by a mm or two.. I highly doubt that it is the cartridges that are chewing up your paper. If I were you, I'd call them back and tell them you've tried original cartridges and it didn't work.
1
How to remove cartridges and do a print
Why is MapReduce in CouchDB called "incremental"?
I am reading the O'Reilly CouchDB book. I am puzzled by the reduce/re-reduce/incremental-MapReduce part on page 64. Too much is left to rhetory in the O'Reilly book with the sentence If you're interested in pushing the ede of CouchDB's incremental reduce functionality, have a look at Google's paper on Sawzall, ... If I understand the word "incremental" correctly, it refers to some sort of addition -operation in the B-tree data structure. I cannot yet see why it is somehow special over typical map-reduce, probably not yet understanding it. In CouchDB, it mentions that there is no side-effects with map function - does that hold true with reduce too? Why is MapReduce in CouchDB is called "incremental"? Helper questions Explain the quote about incremental MapReduce with Sawzall. Why two terms for the same thing i.e. reduction? Reduce and re-reduce? References A Google paper about Sawzall. Introduction to CouchDB views in the CouchDB wiki and a lot of blurry blog references. CouchDB O'Reilly book
Just to add slightly to what user1087981 said, the reduce functionality is incremental because of the way the reduce process is performed by CouchDB. CouchDB uses the B-Tree that it creates from the view function, and in essence it performs the reduce calculations in clumps of values. Here's a very simple mockup of a B-Tree from the O'Reilly Guide showing the leaf nodes for the example in the section you quoted from. So, why is this incremental? Well, the final reduce is only performed at query time and all the reduce calculations are stored in the B-Tree view index. So, let's say that you add a new value to your DB that is another "fr" value. The calculations for the 1st, 2nd and 4th nodes above don't need to be redone. The new "fr" value is added, and the reduce function is re-calculated only for that 3rd leaf node. Then at query time the final (rereduce=true) calculation is performed on the indexed values, and the final value returned. You can see that this incremental nature of reduce allows the time taken to recalculate relative only to the new values being added, not to the size of the existing data set. Having no side-effects is another important part of this process. If, for example, your reduce functions relied on some other state being maintained as you walked through all the values, then that might work for the very first run, but then when a new value is added and an incremental reduce calculation is made it wouldn't have that same state available to it - and so it would fail to result in the correct result. This is why reduce functions need to be side-effect free, or as user1087981 puts it "referentially transparent"
0.777778
Reduce functionality is incremental because of how the reduce process is performed by CouchDB .
How to identify if sentence is passive Voice or Indicative sentence?
Examples: "One car was parked outside of the gate." "Your work volume is increased or not" "He was arrested" "She was raped" "After accident he was taken to hospital" "He was informed about this" “My heart was broken” All above statements can be in the stative form if we do not mentioned the agent. But if we use the agent i.e. By Driver, By Boss, By Police, By boyfriend, By friend, By father, By husband respectively, then sentence become as passive voice. My questions are a) How to quickly make out whether a sentence is in the passive voice or just a simple sentence (Stative)? B) If i use had been in above sentence does it mean the same?
You said "if we use the agent, the sentence becomes passive voice". I have to disagree. In every one of your examples, the subject of the verb is the patient of the action. Regardless of whether the agent is mentioned, those statements employ the passive voice. You're asking how to distinguish something that doesn't need to be distinguished. The question of passive vs. active voice is completely different than the question of stative vs. dynamic verbs -- in the same way that the question of how curly your hair is happens to be completely different than the question of how dark your hair is. In an active voice construction, the subject causes the action. In a passive voice construction, the subject receives the action. It's easy to see that all of your sentences are passive voice constructions because its easy to find the active voice equivalents: Someone parked the car. Something increased your work volume. Someone arrested him. and so on. Although the stative vs. dynamic distinction exists in English semantics, it isn't present in English grammar. One rule of thumb is that stative verbs do not work well when employing the continuous aspect. For example, "I am knowing the answer" is a poorly-formed sentence because the verb to know is stative. It seems that every one of your passive voice examples uses a dynamic verb. One car was being parked outside the gate when I left. Your work volume is being increased during the holidays. He was being arrested while I calmly walked away. and so on. A stative verb can be used in either the active or the passive voice: My manager knows me to be an excellent employee. I am known to be an excellent employee. A dynamic verb can be used in either the active or the passive voice: I parked the car outside the gate. The car was parked outside the gate. So, how do you distinguish between passive and stative? You don't. You distinguish between active and passive. You distinguish between dynamic and stative. You do those two things separately. They are not related to each other.   Now, as to your follow-up question, let's use the dynamic verb to park in the passive voice and indicative mode: The car was parked -- past tense, indefinite aspect The car is parked -- present tense, indefinite aspect The car will be parked -- future tense, indefinite aspect The car had been parked -- past tense, perfect aspect The car has been parked -- present tense, perfect aspect The car will have been parked -- future tense, perfect aspect Does the meaning change? Yes. Aspect carries a different kind of meaning than tense, but both aspect and tense carry meaning. Tense has to do with location in time. Aspect has to do with a relationship with time. Often tense and aspect are taught as a single, combined thing, but I find them easier to understand when they are examined as separate properties. Changing the aspect does not change the tense. Changing the aspect does not change the voice. Changing the aspect does not change the nature of the verb, whether stative or dynamic. Because the perfect aspect has an explicit relationship with time, it makes the most sense when the time frame is also made explicit, as in "The car has been parked there for several weeks" or "The car had been parked there for a month before anyone noticed it."   Whether a verb is stative or dynamic has very little impact on English grammar. Certain verb forms don't make sense for stative verbs, and that's about it. The properties of voice, tense, aspect and mode have a great deal of impact. Changing any one of those requires changing something about the verb's form. Let me see if I can clearly summarize all of that. Which of the example sentences are passive voice? All of them. Which of them are indicative sentences? All of them. Which can be interpreted as having a participial subject complement? All of them. Which are stative? None of them. Most of those are unrelated items. One pair is an identity. The passive voice construction is a subset of the participial subject complement construction.
0.888889
How do you distinguish between stative and static verbs?
Meaning and best case usage of 'Out of the blue'
what is the meaning of Out of the blue? I just heard a conversation like below; Jesus. Out of the blue, man. What brought that up? what are the other possible cases that this phrase might be used?
It means "coming on you without warning" as if falling from the sky directly onto your head. "The blue" in this case is the blue of the sky. EDIT out of the blue happening suddenly and unexpectedly Then one day, completely out of the blue, I had a letter from her. : The attack came out of a clear blue sky. This is probably derived from the old idiom "a bolt from the blue": bolt from the blue Fig. a sudden surprise. (Alludes to a stroke of lightning from a cloudless sky.) Joe's return to Springfield was a bolt from the blue. | The news that Mr. and Mrs. King were getting a divorce struck all their friends as a bolt from the blue. I have heard this did not originally refer to lightning, but to crossbow bolts in medieval times raining down after having been shot vertically. I'm not close to my reference materials at the moment, however, so I will look later.
1
"The blue" is "coming on you without warning"
where is the missing , before statement?
in this funciton when i use firebug i get "syntaxerror: missing ; before statement on the var url line. function makeRequest(){ var url= "contr_entry_pkg.sales_center_dropdown?&pnSalesCenterID=document.getElementById("pnSalesCenterID").value +&pvCurrCd='||CURRDEF||'"; ajaxReq = (window.XMLHttpRequest)? new XMLHttpRequest() : new ActiveXObject("MSXML2.XMLHTTP") ajaxReq.open("POST",url ,true); ajaxReq.onreadystatechange =currencychange; ajaxReq.send() }
function makeRequest(){ var url= "contr_entry_pkg.sales_center_dropdown?&pnSalesCenterID=document.getElementById(\"pnSalesCenterID\").value +&pvCurrCd='||CURRDEF||'"; ajaxReq = (window.XMLHttpRequest)? new XMLHttpRequest() : new ActiveXObject("MSXML2.XMLHTTP") ajaxReq.open("POST",url ,true); ajaxReq.onreadystatechange =currencychange; ajaxReq.send(); }
1
function makeRequest()
How can I upgrade my processor from X3065 to X3220?
I have a Dell Poweredge R200 server which has an ancient Xeon 3065 processor. I see in the servers specs that it can accommodate Xeon 3200 series, but not sure if I buy a bare-boned Xeon 3220 processor (without heatsink etc.) , will it fit easily on motherboard? If not, what exactly should I buy to upgrade my processor? Thanks
It will physically fit yes, they're both LGA775 chips but the 3220 has a TDP of nearly twice that of the 3065, you may have heat management issues that would affect the life of your server.
0.888889
The 3220 has a TDP of nearly twice that of the 3065
How does weight affect the game?
I'm seeing weight of guns, armor, and even coins listed, but no rules seem to really make weight have any effect - other than on someone's speed. For example: When you are drowning. I can tell you that swimming is pretty much easier when you are naked than when you are wearing heavy armor. However, the rules don't seem to care what armor do you use. Just simple DC 10/15/20 check. So, in what situations does weight really matter? Or is it just fancy gimmicks?
Basically, weight is used to calculate one thing. Whether or not your adventurer is overburdened with all the stuff he is carrying. How much you can carry is determined by the following formulas: Normal Load: Multiply the creature’s Strength score by 10. The result is the weight, in pounds, that the creature can carry around without penalty. Heavy Load: Double the normal load number (that is, Strength × 20) to find a creature’s heavy load, the maximum weight it can lift off the ground. While a creature is carrying more than its normal load, it is slowed. Carrying such a load requires both hands. Maximum Drag Load: Five times a creature’s normal load (that is, Strength × 50) is the most weight it can push or drag along the ground. The creature is slowed if it pushes or drags more weight than its normal load, and it can’t push or drag more than its heavy load over difficult terrain. So basically, if you have too much stuff (but not more than your heavy load), your adventurer is slowed. This is a big problem. For most adventurers this isn't much of an issue, fairly early on in your career you should be able to pick up a Bag of Holding, and not have to worry about load except for the gear your wearing or actively using. It's been pointed out in the comments that there are a couple of game mechanics that do use the weight of an item. Prestidigitation can lift up to a pound, Mage Hand can lift up to 20 (Psions and Wild Talent Masters have similar powers). So it comes into play occasionally on this stuff as well.
0.777778
How much weight can you carry is determined by the following formulas
Setting initial value in a Kendo UI Cascading Combobox with server filtering
I need to make a cascading combobox with server filtering but I'm having trouble setting the initial value. The dropdownlist on which the combobox depends looks like this: @(Html.Kendo().DropDownListFor(model => model.SelectedCompany) .Name("UserDetailSelectedCompany") .HtmlAttributes(new { style = "width:115px;" }) .BindTo(Model.CompanyList) .Value(Model.SelectedCompany)) Where: model.SelectedCompany is a string Name attribute is set because I need that in the combobox (I've read on the Kendo UI forums I'm not supposed to specify it, but I don't know how to do the cascading combobox without it) Model.CompanyList is a List<string> An here's the combobox: @(Html.Kendo().ComboBoxFor(model => model.SelectedDealer) .Name("UserDetailSelectedDealer") .DataTextField("Name") .DataValueField("ID") .HtmlAttributes(new { style = "width:325px" }) .Filter(FilterType.Contains) .AutoBind(false) .Enable(false) .MinLength(3) .DataSource(source => source.Read(read => read.Action("GetDealers", "Administration").Data("Administration.GetUserDealerParameters")) .ServerFiltering(true)) .CascadeFrom("UserDetailSelectedCompany") .SelectedIndex(Model.SelectedDealer.ID)) Where: model.SelectedDealer is a Dealer Dealer class contains a Name(string) and an ID (int) MVC action GetDealers return a JSON converted List<Dealer> Does anyone have an example that demonstrate how I can get this to work? The Kendo UI doc has example for a cascading combobox, server filtering and setting initial value, but not for the 3 at same time.
You can set the text property of the comboBox. .Text(Model.SelectedDealer)
1
Set the text property of the comboBox
English equivalent for 'امریه'
In Iran there is another way to do the mandatory military service and it is working for a governmental organization or company instead. It is simply called 'امریه' in Persian. Is it called CPS (Civilian Public Service)? Civilian Military Service? what exactly?
Back in my day the US Selective Service System (conscription, "the draft") provided for two Conscientious Objector statuses: available for non-combatant military service), available for alternate community service). The present classifications seem to be more complicated; but it appears that if the draft is ever revived qualifying registrants will be required to perform alternative service. These are distinct from occupational deferments, under which registrants in certain vital occupations will not be inducted ("called up" or "Greetingsed" as we used to call it).
1
registrants in certain vital occupations will not be inducted .
Should an adverb go before or after a verb?
For example: The word rarely turns up outside of those contexts. The word turns up rarely outside of those contexts. Which one is correct and why?
Positioning adverbs is a complex affair. There are some rules of thumb, but for many adverbs, it is quite acceptable to place it before or after the verb. In this case, I think either way is acceptable, though I would probably find the former more natural, i.e. The word rarely turns up outside of those contexts. but the following is also acceptable, if a bit less natural: The word turns up rarely outside of those contexts. Two side notes: a) you want those (the plural of that), since contexts is plural, b) of is required in both cases here, as it belongs with the word outside.
1
Positioning adverbs is a complex affair .
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 & 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.
I've just read "The Clean Coder" by R.C. Martin (Uncle Bob). The main point of the book is that programmers in general don't get much respect because they are not behaving professionally. That means mainly that they don't communicate effectively with management about the status of the project. Lying is certainly a very very bad form of communication. Your colleague is being extremely unprofessional and so are you. You both are doing nothing good to improve the perception of programmers. I would advise you to go right away to management. However, I have gotten in trouble in the past for having been too "honest" (in some unrelated situation), so I'm not sure you should take my advice. Also, as many have pointed out, maybe your perception of the situation is not as accurate as you think.
1
"The Clean Coder" by R.C. Martin (Uncle Bob)
Do volcano blast changes earth's course?
Volcano blasts are one of the most powerful calamities on earth. When they blast they release large amount of mass in the air just like a jet does. Does such a blast have any effect on the course of the Earth? Does it change the Earth's orbit in any way? If not then how big a blast is needed to do it? Would a full eruption of the Yellowstone Supervolcano do it?
I do not think volcanic eruptions can change the course of the earth. This is because whatever materials a volcano ejects ultimately land back to the ground, so the earth remains on its path. So no change in course/radius. If, however, you can manage to create a blast which sends particles with such a force and such a speed that they never come back again (the speed will have to be $\geq 11.2 km/s$), then we can think about the change of course of the earth. Can Yellowstone do it? But even if that DOES happen, the mass which it will be able to eject completely out of earth's gravitational field will be very less compared to the mass of the earth. So we can neglect and tiny change, since it's almost nothing. However, if a volcano could blast off even $1/10^{th}$s of the earth's mass, then we'd have some change in course/radius. Addendum: I just thought of one thing though- The material thrown up in a volcanic eruption emerges from inside the earth. When the eruption is over and the material is back on the ground, there has been a slight net displacement of the materials. What was first a few kilometres under the surface is now lying on the surface. Therefore, there may as well be a tiny change in course. HOWEVER, as pointed out before, the mass thrown up by a volcano is very very very less compared to the mass of the earth and the displacement of the material is very very less compared to the radius of the earth ($\approx 6400 km$), we can safely neglect this tiny change in course. Even if there is a change, the radius of the earth's orbit around the sun is 150,000,000 km. A change in course by a fraction of a centimetre will make NO difference at all. Addendum-2: Akash points out that the materials striking the ground don't apply the same force as the force at which the volcano erupts. That is not true. It may seem that the force is less, but that is because the materials are fragmented and a lot of the force is applied onto air too. The force is distributed between all the particles and the air. When each particle strikes, it imparts its force to the earth. The air 'falls' back too, applying a force too. If you add up the forces, it will be equal to the force of the volcano. Unless, of course, the materials are propelled out of the earth's gravitational field.
1
Change in course/radius in volcanic eruption
Powerpoint vba to change text gradient?
Is there anything in Powerpoint vba (2007 or 2010) that lets you set or change the gradient colors on a text object (the text itself)? All I can find are presetTextEffect settings. Thanks.
Is this what you need?... If so, here is the code which I made it with. You will need to improve it accordingly. There are plenty of formatting possibilities when applying gradient formation. Therefore I will suggest to experiment and checking VBA help for additional information. Sub Test() Dim TXTbox As Shape Set TXTbox = ActivePresentation.Slides(1).Shapes(1) With TXTbox.TextFrame2.TextRange.Font.Fill .ForeColor.RGB = RGB(0, 128, 128) .OneColorGradient msoGradientHorizontal, 1, 1 End With End Sub
1
Is this what you need?
Any open source alternative to Roboform
Are there any open source apps for password management like Roboform in Win 7 or can Roboform be used in 11.04 64 bit? If so how?
KeePassX KeePassX is a free/open-source password manager or safe which helps you to manage your passwords in a secure way. You can put all your passwords in one database, which is locked with one master key or a key-disk. So you only have to remember one single master password or insert the key-disk to unlock the whole database. The databases are encrypted using the algorithms AES or Twofish.
0.888889
KeePassX is a free password manager or safe
To what extent does the Law of Moses still apply?
Matthew 5:17-18 (KJV) 17 Think not that I am come to destroy the law, or the prophets: I am not come to destroy, but to fulfil. 18 For verily I say unto you, Till heaven and earth pass, one jot or one tittle shall in no wise pass from the law, till all be fulfilled. As I understand it, the Law of Moses is fulfilled in Christ. We don't make sacrifices anymore, and many other of the finer points in the Pentateuch are no longer preached. Yet, I still see people reference these books for doctrine (for example the 10 Commandments). How much of the Law of Moses still applies?
How much of the Law of Moses still applies? First we must understand why we have the Law. Originally, the only rule was to not eat from the fruit of the knowledge of Good and Evil (Genesis 2:17). Then what followed because that happened. Cain killed Able (Genesis 4:8). Then eventually the flood. The answer is found in the reason for the flood. "The LORD saw how great the wickedness of the human race had become on the earth, and that every inclination of the thoughts of the human heart was only evil all the time. (Genesis 6:5)" So God's desire can be explained in the inverse: "God would see it great if the human race was kind on the earth, and that every inclination of the thoughts of the human heart was only good all the time." This idea is also proven by Jesus himself: Jesus said to him, “‘Love the Lord your God with all your heart, with all your soul, and with all your mind.’ This is the first and greatest commandment. The second is like it: ‘Love your neighbor as yourself.’ All the law and the prophets depend on these two commandments.” -Matthew 22:37-40 The description of kindness and good thoughts of a human heart: If you where set to the task of ruling people toward God's desire. What might you put on your list? (Ok, nobody kill each other, don't steal, etc.) Why the List didn't work? Pride, Ego, Natural Rebellion (Simply because the list exist). How Faith leads to kindness and good thoughts and replaced the list. If you want people to have good thoughts about each other. More analysis needs to be focused on what makes people have bad thoughts. If you could stop the bad thoughts, then you have a world of only good thoughts. Lets take a look at psychology and pinpoint what causes anger. What we find is that anger is caused by the decision to fix the threatening behavior. So if we never took negative matters into our own hands, and relied only on God to justly handle the situation. We can prevent ourselves from getting angry. Does this ideology match with the teachings? Do not take revenge, my dear friends, but leave room for God's wrath, for it is written: "It is mine to avenge; I will repay," says the Lord (Romans 12:19). But I tell you, do not resist an evil person. If anyone slaps you on the right cheek, turn to them the other cheek also (Matthew 5:39). But now ye also put off all these; anger, wrath, malice, blasphemy, filthy communication out of your mouth (Colossians 3:8). When they kept on questioning him, he straightened up and said to them, "Let any one of you who is without sin be the first to throw a stone at her." (John 8:7) What evidence do we have that God will take care of it for me? When they began to shout and praise, the Lord suddenly attacked the Ammonites, Moabites, and men from Mount Seir who were invading Judah, and they were defeated (2 Chronicles 20:22). Oh so the Law is still active? Yes (Luke 16:17). Oh so God fulfills the law! Yup, if someone cuts out my eye, if God feels that it is necessary, he will cut that eye out for me. This is done so that my thoughts are "good" and that "evil can avoid my heart". Now what if everyone followed the Law But everyone didn't. "When Jesus went outside, the Pharisees and the teachers of the law began to oppose him fiercely and to besiege him with questions," (Luke 11:53). The outcome of the law and the thoughts in their heart. So the Law is inferior to faith? Yes, because it didn't accomplish God's Desire.
0.666667
How much of the Law of Moses still applies
Making a C++ app scriptable
I have several functions in my program that look like this: void foo(int x, int y) Now I want my program to take a string that looks like: foo(3, 5) And execute the corresponding function. What's the most straightforward way to implement this? When I say straightforward, I mean reasonably extensible and elegant, but it shouldn't take too long to code up. Edit: While using a real scripting language would of course solve my problem, I'd still like to know if there is a quick way to implement this in pure C++.
Does your system have to "take a string"? You could expose COM (or CORBA, or whatever) interfaces on your application and have whatever is generating these commands call into your application directly.
1
Does your system have to "take a string"?
Word describing the reversal of emotions
A boy is highly confident one day and the next day scared, timid and shy. A girl is emotional one day and emotionless the next. Is there a term for a drastic switching of emotions? A term for the switching to practically opposite emotions? EDIT: Just to clarify the emotional changes are not rapid, and are permanent. This rules out bi-polar, because bi-polar involves multiple periods of change. EDIT2: I'm looking for a work to demonstrate the steepness or contrasts of change, but having no relationship to the speed of change. Example: Over a course of 3 years a once quiet boy become the spokesmen of the school.
How about capricious. My wife tolerates my capricious nature
1
How about capricious nature
Bake particle system animation and delete few particles
I want to delete few particles from particle system. After baking the animation still I cant select particle objects, it selects all of them.
The only way I know to edit already emitted particle objects would be to Make Duplicates Real Shift-Ctrl-A accessible in Object Menu after that you could select the mesh and invoke Separate by loose parts in Edit Mode P. This wouldn't help on animations.
0.888889
How to edit already emitted particle objects?
MS SQL Stored Procedure for counting Dynamic table items
I had wrote this below stored procedure and getting incorrect statement. ALTER PROCEDURE dbo.[Counter] @TableName VARCHAR(100) AS BEGIN DECLARE @Counter INT DECLARE @SQLQ VARCHAR(200) SET NOCOUNT ON; --SET @TableName = 'Member'; SET @SQLQ = 'SELECT COUNT(*) FROM dbo.[' + @TableName + ']'; --Preparing the above sql syntax into a new statement(get_counter). --Getting an error here I had googled the prepare statement but don't know why facing this error. PREPARE get_counter FROM @SQLQ; @Counter = EXEC get_counter; -- here @resutl gets the value of the count.@TableName DEALLOCATE PREPARE get_counter; -- removing the statement from the memory. END Then I had wrote another one: ALTER PROCEDURE dbo.[Counter] @TableName VARCHAR(100) AS BEGIN DECLARE @Counter INT DECLARE @SQLQ VARCHAR(200) SET NOCOUNT ON; --SET @TableName = 'Member'; SET @SQLQ = 'SELECT COUNT(*) FROM dbo.[' + @TableName + ']'; --Preparing the above sql syntax into a new statement(get_counter). Execute @SQLQ; -- here @resutl gets the value of the count.@TableName --DEALLOCATE PREPARE get_counter; -- removing the statement from the memory. Return @Counter; END It is running fine but I can't get the result in the Counter , anyone please help me(I know that I haven't assigned any value to the counter but if I do I get error). After your answer martin I had replace my code with yours now its : ALTER PROCEDURE dbo.[Counter] @SchemaName SYSNAME = 'dbo' , @TableName SYSNAME AS BEGIN SET NOCOUNT ON; DECLARE @SQLQ NVARCHAR(1000) DECLARE @Counter INT; SET @SQLQ = 'SELECT @Counter = COUNT(*) FROM ' + Quotename(@SchemaName) + '.' + Quotename(@TableName); EXEC sp_executesql @SQLQ , N'@Counter INT OUTPUT', @Counter = @Counter OUTPUT Return SELECT @Counter END Now I had retrieved it . ALTER PROCEDURE dbo.[CreateBusinessCode] @MemberID bigint, @len int, @RewardAccountID bigint, @ConnectionStatusID tinyint, @Assign smalldatetime AS BEGIN SET NOCOUNT ON; DECLARE @counter INT EXEC @counter = dbo.Counter 'dbo','member'; Select @counter; END
In SQL Server, if you want to get a result into a variable, you have two choices. The first is to use cursors. The second is to do dynamic SQL: declare @sql varchar(max) = whatever; declare @cnt int; declare @cntTable table as (cnt int); insert into @cntTable exec(@sql); select @cnt = t.cnt from @cntTable It is cumbersome, but one or the other does work.
0.888889
Dynamic SQL Server
What does “yo-ho-ho” mean?
The pirate song “Fifteen Men on a Dead Man’s Chest” from Treasure Island contains the expression yo-ho-ho. Fifteen men on the dead man’s chest— Yo-ho-ho, and a bottle of rum! Drink and the devil had done for the rest— Yo-ho-ho, and a bottle of rum! Does this signify laughter, a piratical variation of ho-ho-ho? It doesn’t seem like an amusing little ditty but then pirates probably would have a dark sense of humour. Or is it simply a more piratey song filler than na-na-na?
I think james is correct. In the patrick stewart version of a christmas carol, maybe in the book also, when fezziwig is closing shop, he says " yoho ebinezer, yoho dick", to signal shift is over.
1
james stewart says "yoho ebinezer, yoo dick"
Get phones on all members in a customer group
I am working on a custom Magento extension. I am working around the Adminhtml part and i've created a custom form there. Here is the form code: <?php class VivasIndustries_SmsNotification_Block_Adminhtml_Sms_Sendmass_Edit_Form extends Mage_Adminhtml_Block_Widget_Form { public function _prepareLayout() { $ExtensionPath = Mage::getModuleDir('js', 'VivasIndustries_SmsNotification'); $head = $this->getLayout()->getBlock('head'); $head->addJs('jquery.js'); $head->addJs('vivas.js'); return parent::_prepareLayout(); } protected function _prepareForm() { $form = new Varien_Data_Form(array( 'id' => 'edit_form', 'action' => $this->getUrl('*/*/save', array('id' => $this->getRequest()->getParam('id'))), 'method' => 'post', )); $fieldset = $form->addFieldset('edit_form', array('legend'=>Mage::helper('smsnotification')->__('SMS Information'))); $CustomerGroups = Mage::getResourceModel('customer/group_collection')->toOptionArray(); $smsprice_value = Mage::getStoreConfig('vivas/smsprice/smsprice_value'); $smsprice_tag = Mage::getStoreConfig('vivas/smsprice/smsprice_tag'); $customerArray=array(); foreach($CustomerGroups as $each){ $count=Mage::getResourceModel('customer/customer_collection') ->addAttributeToFilter('group_id',$each['value'])->getSize(); $SMSPrice = $count * $smsprice_value; $customerArray[]=array('value'=> $each['value'],'label'=> $each['label'].' - ('.$count.' Members) - ('.$SMSPrice.' '.$smsprice_tag.')'); } $CustomerGroups = array_merge(array('' => ''), $customerArray); $fieldset->addField('customergroups', 'select', array( 'name' => 'customergroups', 'label' => Mage::helper('smsnotification')->__('Customer Group'), 'class' => 'required-entry', 'after_element_html' => '<br><small>If customer group is not selected the SMS will be sended<br> to all store members!</small>', 'values' => $CustomerGroups ) ); $fieldset->addField('smstext', 'textarea', array( 'label' => Mage::helper('smsnotification')->__('SMS Text'), 'class' => 'required-entry', 'required' => true, 'name' => 'smstext', 'onclick' => "", 'onkeyup' => "CheckLetterSize(this)", 'after_element_html' => '<br><b style="color:brown;"><span id="charNum"></span><span id="charNum1"></span></b><br><small>SMS text must <b>NOT</b> be longer then 160 characters!</small>', 'tabindex' => 1 )); if ( Mage::getSingleton('adminhtml/session')->getsmsnotificationData() ) { $form->setValues(Mage::getSingleton('adminhtml/session')->getsmsnotificationData()); Mage::getSingleton('adminhtml/session')->setsmsnotificationData(null); } elseif ( Mage::registry('smsnotification_data') ) { $form->setValues(Mage::registry('smsnotification_data')->getData()); } // Add these two lines $form->setUseContainer(true); $this->setForm($form); //// return parent::_prepareForm(); } } Here is the code that i have in my save action: $groupId = $this->getRequest()->getPost('customergroups', ''); if (!empty($groupId)) { //Get customers from a group $customers = Mage::getModel('customer/customer') ->getCollection() ->addAttributeToSelect('*') ->addFieldToFilter('group_id', $groupId); } else { //Get all customers $customers = Mage::getModel('customer/customer') ->getCollection() ->addAttributeToSelect('*'); } This code is supposed to give me the group id when i press the submit button. But i have to get all the phones of these members in array like that: $phones = array($phone); How can i get all the phone numbers and make them in array?
this code is give you collection of customer in this group.. you can get by this code. $customers = Mage::getModel('customer/customer') ->getCollection() ->addAttributeToSelect('*') ->addFieldToFilter('group_id', $groupId); $phone=array(); foreach($customers ans $customer) { $phone[]=$customer->getTelephone(); }
0.666667
collection of customer in this group
Unclean -- Consequences
I know that there are multiple things (food, corpses, menstruation, etc.) that can make one unclean. I'm just uncertain as to what being unclean meant in practicality, especially for touching the carcass of an unclean animal, or a corpse (it's fairly clear what uncleanness for menstruation looks like, according to Leviticus). In short: what are the consequences of being unclean? Does one have to be isolated from the community? Can anyone touch them, etc.?
Nowadays there is mostly no implication of not being Tahor (spiritually clean). Only 2 related laws still apply: A Cohen may not come in contact with a corpse, nor be under the same roof as a corpse, nor come within 4 Amot (~2 meters) of a grave. If he does, he has transgressed, and needs to repent, but no other practical consequences. Nidah - menstruation, as you already mentioned. Nowadays, after menstruation a wife may not have relations (or any other physical contact) with her husband until after she has counted 7 clean days and gone to a Mikvah. In the time of the Bet HaMikdash (the Temple, may it be speedily rebuilt in our times) it was important to remain Tahor for various reasons. Here are some: You were not allowed into the Temple unless you were Tahor. You could not touch Terumah and Challah (the tithing and piece of dough given to a Cohen) unless you were Tahor. Otherwise they became impure and had to be burned. Nowadays we burn them, as we are all considered impure. You had to keep away from people and items which were Tahor in order not to make them impure. The only person who was sent into isolation was a person who had Tzara'at (Biblical-leprosy). All other people were expected to act civilly and not make each other (or their items) impure.
1
No implication of not being Tahor (spiritually clean)
Why would one shoot a fully blurred picture?
Focus and blur have a reason in a picture when they come together. Blur alone is just a loss of an important element in the photography art, unless it has a reason, like obscuring nudity or creating an additional value... but what is the value of an entirely blurred picture?
Shooting blurred photos can be considered opposite of black and white photography - while black and white is about hiding colors to bring out shapes and shadows, blurring helps to reveal colors by hiding shapes and shadows. An interesting subcategory is a combination of the opposites - black and white blurs - where distractions by both details and colors are hidden away to bring out larger shapes or patterns. Blurred images could be used for several purposes, like to hide boring shapes that have interesting colors; to hide unwanted details on interesting shapes; to give feeling of mind-boggling motion; to evoke memories - colors/shapes alone can trigger some memories stronger than same image with details - because only the colors/shapes match memories of other people, not the details; to initiate curiosity - a blurred image and a catchy title might induce a person into taking some action, like reading accompanying article; to differ from the ubiquitous super-sharp photography; to suggest a hurried "caught moment"; to suggest that someone is leaving (walked out of focus); to create some new shapes with light sources leaving stripes in the frame. As an example, Michael Orton is a photographer who has taken lots of great blurred images. The roots of creating blurry images are, however, much older, starting with (pre-)impressionist painters like Joseph Mallord William Turner (aka "the painter of light") and Claude Monet.
1
blurred images can be considered opposite of black and white photography . blurring helps to hide colors to bring out shapes and shadows
Does syncing more Google accounts decrease a phone's battery life?
I recently got a Motorola Moto G (4.3 upgraded to 4.4.2), and I wasn't getting the battery life that my vendor claimed I would get (Through mixed usage: 2-3 hours of music, some web browsing, a lot of Whatsapp, a little bit of gaming, and Wifi/mobile network completely turned off in the night (for some 8-9 hours), I barely touch 20 hours of battery life) I was wondering whether this has got to do with the 3 google accounts that I've kept in sync for GMail and some other Google services. I may be a bit paranoid because my previous Android phone suffered from woeful battery near the end of its life, but still I would like to know if syncing more accounts drains the battery more or not.
Short answer: yes and no. Using three accounts won't run the battery down in itself: by far the bigger factor is how much activity there is. To take an example, Gmail uses push messages (via Google Cloud Messaging, GCM) to notify your phone of new mail, so the phone doesn't have to repeatedly poll the server for new messages for each account. Because of this, adding a new account that never gets any email will have hardly any effect on battery use. OTOH, doubling the amount of email you get will have a much bigger effect, because GCM is waking up your phone twice as often. While adding a new account makes little difference on its own, you're probably adding the account because it's going to get mail, so you will end up using the battery more. The same applies to other services too. Even for anything that does poll instead of using GCM, Android is clever enough to do all the polling tasks at the same time, to avoid repeatedly waking up your phone. This means that checking two accounts uses a little more battery than checking one, but less than twice as much: again, the amount of work it's doing each update (how much data it's fetching) is a bigger factor. To address your particular situation, I'd guess that the background updates on your phone aren't using nearly as much battery as the foreground things you're doing. Don't forget you check the battery use of each app in the device settings.
1
Using three accounts won't run the battery down in itself
Optimizing wireless router speed and minimizing interference
I've been experiencing problems with my wireless connectivity lately, and want to make sure that it's not related to the abundance of other wireless routers here in my building. So, what I'm looking for is a method (probably via some application or another) to audit the wireless channels (and other factors that might be important that I don't even know of yet) that are floating through the aether around me. Ubuntu or other linux apps are preferred, but some kind of windows/mac solution is possible, since I do have other OSes around me that I could install & test on. Router: netgear WGT624 v3 Hearsay tells me that channels 1, 6, and 11 are "non-overlapping" (I expect they aren't used for non-wireless-router purposes or something, not sure how they couldn't overlap with other routers using other channels), so perhaps my best choices of channel are limited, so if channels aren't really a big concern, I'd be happy to get links to other optimizations that I should look into.
If you are running a Unix of some kind, try sudo iwlist wlan0 scan | grep Channel http://en.wikipedia.org/wiki/Wireless_tools_for_Linux#iwlist iwlist is used to scan for available wireless networks and display additional information about them that is not displayed by iwconfig. The main argument is used to select a category of information, iwlist displays in detailed form all information related to this category, including information already shown by iwconfig. The command is primarily used to generate a list of nearby wireless access points and their MAC addresses and SSIDs.
1
sudo iwlist wlan0 scan | grep Channel
user-defined parentheses command breaking across lines
I usually define command of the kind \newcommand{\paren}[#1]{\left(#1\right)} to make the use of parentheses more agile. Now, if in the body of my document I do this \begin{align} z = \paren{y\\+z} \end{align} I get a long list of complaints on the last line of the align environment, while I would expect the same output as for the following code, \begin{align} z = \left(y\\+z\right) \end{align} Anybody can let me know how to this sort of parentheses commands robust over line breaks? \documentclass{article} \usepackage{amsmath} \newcommand{\paren}[1]{\left(#1\right)} \begin{document} % This works, but I don't like it. \begin{align} z = \left(y\right.\\ \left.+z\right) \end{align} % This is lovely, but does not work. %\begin{align} %z = \paren{y\\+z} %\end{align} % No complaints, of course, if the line break is removed \begin{align} z = \paren{y+z} \end{align} \end{document}
As mentioned in the comments it is not recommended, and such a solution will make the code much less readable. That being said, it can be done. This use a trick suggested by Sebastien Gouezel cited from the mathtools manual \documentclass[a4paper]{memoir} \usepackage{amsmath} \newcommand\MTkillspecial[1]{% helper macro \bgroup \catcode`\&=9 \let\\\relax% \scantokens{#1}% \egroup } \newcommand\paren[1]{ \left(\vphantom{\MTkillspecial{#1}}\kern-\nulldelimiterspace\right. #1 \left.\kern-\nulldelimiterspace\vphantom{\MTkillspecial{#1}}\right) } \begin{document} \begin{align*} A = {} & \paren{ \frac12 \\ & +3 } \end{align*} \end{document} I would still manually scale fences in such a situation, as in \begin{align*} A = {} & \biggl( \frac12 \\ & +3 \biggr) \end{align*} which in my opinion is a lot more readable.
0.777778
How to scale fences in such a situation?
How can I alter an existing Primary Key on SQL Azure?
I want to modify an existing primary key on a SQL Azure table. It currently has one column, and I want to add another. Now, on SQL Server 2008 this was a piece of cake, just did it in SSMS, poof. Done. This is how the PK looks like if I script it from SQL Server: ALTER TABLE [dbo].[Friend] ADD CONSTRAINT [PK_Friend] PRIMARY KEY CLUSTERED ( [UserId] ASC, [Id] ASC ) However, on SQL Azure, when I try to execute the above, it will of course fail: Table 'Friend' already has a primary key defined on it. Fine, so I try to drop the key: Tables without a clustered index are not supported in this version of SQL Server. Please create a clustered index and try again. Ok, so I try to create a temporary clustered index in order to drop the PK: CREATE CLUSTERED INDEX IX_Test ON [Friend] ([UserId],[Id]) Which results in: Cannot create more than one clustered index on table 'Friend'. Drop the existing clustered index 'PK_Friend' before creating another. Great, a catch22 moment. How do I add the UserId column to my existing PK?
Note: as of Azure SQL Database v12, these restrictions no longer apply. The is no such thing as a 'primary index'. There is such a thing as a 'primary key' and also there is such a thing as a 'clustered index'. Distinct concepts, often confused. With this distinction in mind, lets revisit the question: Q1) Can the clustered index in a SQL Azure table be modified? A: Yes. Use WITH (DROP_EXISTING=ON): create table Friend ( UserId int not null, Id int not null); go create clustered index cdxFriend on Friend (UserId, Id); go create clustered index cdxFriend on Friend (Id, UserId) with (drop_existing=on); go Q2) Can the clustered index of a table that has a primary key constraint be modified? A: Yes, same as above, as long as the primary key constraint is not enforced via the clustered index: create table Friend ( UserId int not null, Id int not null identity(1,1), constraint pk_Friend primary key nonclustered (Id)); create clustered index cdxFriend on Friend (UserId, Id); go create clustered index cdxFriend on Friend (Id, UserId) with (drop_existing=on); go Q3) Can the primary key constraint of a table be modified? A: Yes, as long as the primary constraint is not enforced via the clustered index: create table Friend ( UserId int not null, Id int not null identity(1,1), constraint pk_Friend primary key nonclustered (Id)); go create clustered index cdxFriend on Friend (UserId, Id); go alter table Friend drop constraint pk_Friend; alter table Friend add constraint pk_Friend primary key nonclustered (UserId) go Q4) Can the primary key of a table be modified when is enforced via the clustered index? A: Yes, if the table never had any rows: create table Friend ( UserId int not null, Id int not null identity(1,1), constraint pk_Friend primary key clustered (UserId, Id)); go alter table Friend drop constraint pk_Friend; alter table Friend add constraint pk_Friend primary key clustered (Id, UserId) go Q5) Can the primary key of a table be modified when is enforced via the clustered index if the table is populated? A: No. Any operation that converts a populated clustered index into a heap will be blocked in SQL Azure, even if the table is empty: create table Friend ( UserId int not null, Id int not null identity(1,1), constraint pk_Friend primary key clustered (UserId, Id)); go insert into Friend (UserId) values (1); delete from Friend; go alter table Friend drop constraint pk_Friend; As a side note: the constraint can be modified if the table is truncated. The workaround to change the PK constraint of a populated table is to do the good old sp_rename trick: create table Friend ( UserId int not null, Id int not null identity(1,1), constraint pk_Friend primary key clustered (UserId, Id)); go insert into Friend (UserId) values (1); go create table FriendNew ( UserId int not null, Id int not null identity(1,1), constraint pk_Friend_New primary key clustered (Id, UserId)); go set identity_insert FriendNew on; insert into FriendNew (UserId, Id) select UserId, Id from Friend; set identity_insert FriendNew off; go begin transaction exec sp_rename 'Friend', 'FriendOld'; exec sp_rename 'FriendNew', 'Friend'; commit; go sp_help 'Friend'; The sp_rename approach has some issues, most importantly being that permissions on the table do not carry over during the rename, as well as foreign key constraints.
1
Can the primary key of a table be modified when is enforced via the clustered index?
How do I chose a good camera for texture hunting?
Texture hunting is the photography of walls, surfaces, artefacts, etc, typically outdoors, with the intention of using the photos in a computer game. The photo could be of a brick or concrete wall, a chain link face, a door / window, or whatever. It is also possible to photograph a white wall that has been damaged or stained in some way, process it in various ways, and use this as a mask on top of other textures, in order to get a new damaged variant. Textures are typically lighting-neutral and extremely sharp. The computer game will compute its own lighting and shadows. One must avoid having a shadow across the subject, as this will only have to be removed in post-processing. Typically, texture hunting is done on cloudy days where there is a uniform soft light from the sky. 1024×1024 is a reasonable size of the final texture, but it's usually photographed at a higher res, photoshopped considerably, and then sized down. The subject of the photo could be something like 5 metres × 5 metres. The idea is that every pixel is being used to the fullest effect to convey the character of the surface. Textures are often photoshopped to become seamless so they can be repeated across a large surface in game. Textures are usually shot perpendicular to the wall as much as possible, otherwise distortion correction is required. Sometimes you can take a photo from further away and zoom in to get a better view of a high wall. It is often quite hard to find a surface in the real world that has an interesting texture and is easy to photograph from the right angle. In particular, taking photos of the floor is challenging because you need to be several metres above it, looking down. Leaning out of windows / over bridges, or holding up a tripod are solutions. One thing that concerns me is that some cameras do image processing on the digital image. Really, the artist has to be doing all of the image processing offline, in photoshop or similar. I often see digital camera photos with edge enhancement artefacts in high contrast areas. Perhaps raw shooting mode is the answer to this? Shooting digital photos with greater colour depth than "8 bit per channel" might also be useful to avoid banding when increasing contrast during post-processing. Another thing is lens distortion — since we need to photograph flat surfaces. Either the camera has to be good at it, or it should be possible to turn it off so the processing can be done manually by an artist. How do I find a camera which meets these requirements?
Your main concerns are going to be: As you say, the ability shoot in RAW. Relatively noise-free output (but this requirement is mitigated by the ability to heavily post-process and downsize). A good, sharp, distortion-free lens. For the resolution you suggest, you should be able to get good results from a high-quality point & shoot (like the Canon G12 or similar). However, you'll get even better results from a larger-sensor interchangeable-lens camera — like a DSLR. I don't think you need anything expensive — an entry-level model should do. But you should look into spending some money for a very nice lens. Maybe a 70-200mm zoom or a 100mm macro. Probably an f/4 lens will be fine, rather than a more expensive f/2.8 version — since you'll probably want to stop down for sharpness and to increase depth of field and reduce focus error. If you can use a tripod, awesome, but having image stabilization will give more flexibility. Pretty much any brand or model of DSLR should be fine for this purpose. They all give high-quality results and have the lenses you might need for this available.
1
A good, sharp, distortion-free lens.