How do I prove this function is bijective?  $$v(s,p)=2^{p-1}(2s-1). $$  The domain is the natural numbers and the codomain is also the natural numbers So I have to somehow show that every natural number can be written as a product of the power of 2 and an odd number.
How do I prove this function is bijective? $$ v(s,p)=2^{p-1}(2s-1). $$ The domain is natural numbers and the codomain is also the natural numbers.  And this one: $$ f(s)=2s-1. $$ The domain is the natural numbers, and the codomain is the odd numbers in the natural numbers.  With this one I would do this to show it's injective: $$ \begin{align} v(s)&amp;=v(s_1)\\ \implies 2s-1&amp;=2s_1-1\\ \implies (2s_1)/2&amp;=(2s_2)/2\\ \implies s=s_1 \end{align} $$ So it's injective since if $v(s)=v(s_1)$ then $s=s_1$.  And to show it's surjective $f(s)=y$: $$ \begin{align} y&amp;=2s-1\\ \implies s&amp;=(y+1)/2 \end{align} $$ Then the function must be surjective since every $y$ is the same as the codomain for $f$.  Am I correct?
How do I specify a pointer to an overloaded function? Do potions use concentration for their effects? I add js file with drupal_add_js in hook_form_alter, it is ok and I see it in list of js loaded in page, but when I submit form and form not validate and return to that form (after validation failed) I don't see js files that added to form, why this happened? and how can add my js file in that form after validation failed ?   some part of my code   function mymodle_form_alter(&amp;$form, $form_state, $form_id) {   if ($form_id == 'news_node_form') {     drupal_add_js(drupal_get_path('module', 'mymodule') . '/js/mymodulejsfile.js'); //, array('scope' =&gt; 'footer','weight' =&gt; 10));   } }   code work correctly in add and edit form, but when form submit and validation failed it show validation error but my js file not loaded in page (I checked html source and check firebug script files), but there is not my js file, Why doesn't pressing enter return '\n' to getch()? #include &lt;stdio.h&gt; #include &lt;conio.h&gt; main() {     char ch,name[20];     int i=0;     clrscr();     printf("Enter a string:");     while((ch=getch())!='\n')     {         name[i]=ch;         i++;     }     name[i] = '\0';     printf("%s",name); }   When I give "abc" as input and if I press enter it's not working. Can anyone let me know why the condition ch=getch() != '\n' is not becoming false when I press enter? I have also observed that ch is taking \r instead of \n. Kindly let me know. Thanks How do the EV stats work? #1115 - Unknown character set: 'utf8mb4' When I Import Mysql from local server to web ser it is showng me error 1115 - Unknown character set: 'utf8mb4' in Creating wordpress wp_comment table CREATE TABLE IF NOT EXISTS  `wp_commentmeta` ( // // ) ENGINE = INNODB DEFAULT CHARSET = utf8mb4 AUTO_INCREMENT =1;  #1115 - Unknown character set: 'utf8mb4'  My mysql version is Version information: 4.0.4, latest stable version: 4.4.10 (local version)  Version information: 4.0.10.7, latest stable version: 4.4.10( server version)  Please help me to solve out the error How to concatenate characters in java? How do you concatenate characters in java? Concatenating strings would only require a + between the strings, but concatenating chars using + will change the value of the char into ascii and hence giving a numerical output. I want to do System.out.println(char1+char2+char3... and create a String word like this.  I could do   System.out.print(char1); System.out.print(char2); System.out.print(char3);   But, this will only get me the characters in 1 line. I need it as a string. Any help would be appreciated.  Thanks I'm trying to make a systemd timer that runs every 15 minutes. Right now I have:     timer-fifteen.timer:  [Unit] Description=15min timer  [Timer] OnBootSec=0min OnCalendar=*:*:0,15,30,45 Unit=timer-fifteen.target  [Install] WantedBy=basic.target    timer-fifteen.target:  [Unit] Description=15min Timer Target StopWhenUnneeded=yes    This runs over and over again without stopping. Does it need to be *:0,15,30,45:* instead? How can I make this work? Brokerage accounts are seen as relatively tax-inefficient, since you invest with post-tax dollars, and growth is taxed upon realizing gains. The traditional IRA allows you to deduct contributions and defer taxes until you take distributions in retirement ...  Unless you are covered by a retirement plan from work and make over   $71,000/year if single, or $118,000/year if married filing jointly.   The numbers above come from . Above those thresholds, you can still make contributions to a traditional IRA, but those contributions will be post-tax. Distributions are taxed as ordinary income, excluding post-tax principal.  Similarly, eligibility to make direct Roth IRA contributions phases out to zero according to a :   $131,000 if single, or $193,000 if married filing jointly.   Looks to me that someone who cannot make direct Roth IRA contributions also cannot deduct traditional IRA deposits from income.  Assume   investment period is 20 years, is some garden variety ETF (VTI/VXUS/etc), those investments return 5%, the current marginal tax rate is 28%, the expected marginal tax rate at retirement is 25%, the long term capital gains rate is 15%, the entity is not eligible to make Roth IRA contributions, and 401k contributions are already maxed out.   A $5000 of gross income contribution into a traditional IRA at retirement might grow to an after-tax sum of:  (5000) * (1 - 0.28) * (1 + (1.05 ** 20 - 1) * (1 - 0.25)) = $8064   Instead, since contributions were going to be taxed anyway, why not put it in a brokerage account? Then you could claim the favorable long-term capital gains rate.  (5000) * (1 - 0.28) * (1 + (1.05 ** 20 - 1) * (1 - 0.15)) = $8659   All I found was , and the accepted answer says to still make a traditional IRA contribution, but I still don't see why that would be a good idea. What am I missing here? Smart guides aren't smart TL:DR Smart guides aren't accurate - even though the snap, (end up causing more problems in the long run) is there a way to fix it?  Maybe there are some settings that I'm missing (need to be changed)    I use my smart guides all the time (and am overall pleased with them). I do have my issues with it, as explained here:  A lot of times, when I'm trying to make a bunch of triangles like this:    Done by making a triangle, cloning, flipping, rotating etc. Repeat until full  (Perfect) Snapping using Smart Guides    Ends up looking likebetween the triangles (Outline Mode)    Now I personally (with a strong attention to detail) will notice that there is something off after making just 1 or 2 triangles (Even before outline mode... strokes look oh so slightly thicker/off)   And then I check in outline mode... and sure enough:    Notice the line spaces (and this is in outline mode, so if I didn't notice it before, now it's sitting right in front of my nose)  The way I (seemingly) "fixed" the first image was by adding in a thick stroke outline so that masks out the difference, however, in a lot of my cases I don't want to have a stroke at all (and then you really notice the problems). and is such interpretation the norm?  When something went from 4 units to 8 units, most authoritative sources seem to agree with the use of "a two-fold increase", even though what was actually increased is more like "one-fold", i.e. the original quantity.  But if the "two-fold increase" is the correct usage, why most people seem to interpret "a 100% increase" the same thing? Very large log files, what should I do? What are underfull hboxes and vboxes and how can I get rid of them? Often, TeX outputs underfull hbox and vbox warnings when running and in the generated log file. What are these and how can I get rid of them? Is it possible to edit the Audit fields on UPDATE? What does [param: NotNull] mean in C#? How prove :         $$ {31}^{11}&lt;{17}^{14} $$       help please! Applying graduated renderer in PyQGIS? Just trying to run the following code already given in the pyqgis cookbook to create graduated colors symbology (as in example with 2 classes)  I define the source info for the shapefile but when I run execute the code within my test-plugin, it just adds the layer without classifiying. Just adds as usual, all polylines appear same.  Any solution or working code/method?  link to code in cookbook   from qgis.core import  (QgsVectorLayer, QgsMapLayerRegistry, QgsGraduatedSymbolRendererV2, QgsSymbolV2,QgsRendererRangeV2)  myVectorLayer = QgsVectorLayer('C:/my_test_shape_file.shp', 'test_shp_file', 'ogr')  myTargetField = 'target_field' myRangeList = [] myOpacity = 1  # Make our first symbol and range... myMin = 0.0 myMax = 50.0 myLabel = 'Group 1' myColour = QtGui.QColor('#ffee00') mySymbol1 = QgsSymbolV2.defaultSymbol(myVectorLayer.geometryType()) mySymbol1.setColor(myColour) mySymbol1.setAlpha(myOpacity) myRange1 = QgsRendererRangeV2(myMin, myMax, mySymbol1, myLabel) myRangeList.append(myRange1)  #now make another symbol and range... myMin = 50.1 myMax = 100 myLabel = 'Group 2' myColour = QtGui.QColor('#00eeff') mySymbol2 = QgsSymbolV2.defaultSymbol(myVectorLayer.geometryType()) mySymbol2.setColor(myColour) mySymbol2.setAlpha(myOpacity) myRange2 = QgsRendererRangeV2( myMin, myMax, mySymbol2, myLabel) myRangeList.append(myRange2)  myRenderer = QgsGraduatedSymbolRendererV2('', myRangeList) myRenderer.setMode(QgsGraduatedSymbolRendererV2.EqualInterval) myRenderer.setClassAttribute(myTargetField) myVectorLayer.setRendererV2(myRenderer) QgsMapLayerRegistry.instance().addMapLayer(myVectorLayer)      @Kelly's code works perfectly.   However I noticed that both the code (one I have typed in my first message and yours in the 2nd message) DO NOT work in QGIS v1.7.3 but WORKS in QGIS v1.8.0. I think this was a bug(?) that already resolved in v1.8.0  And one more question;  Do you have any sample code for (natural breaks, Jenks) classification of the "numeric_attribute_field" based on given number of classes (i.e. no of classes will be a variable in the code, say "n", and I will pass that from the plugin GUI i.e. n = spinBox.value() ) Let $D$ be an integral domain and let $a^m=b^m$ and $a^n=b^n$ where $m$ and $n$ are relatively prime integers, $a,b \in D$.   How do I show $a=b$? How to run a command that involves redirecting or piping with sudo? Do not disturb mode - but allow certain apps