summary
stringlengths
15
147
text
stringlengths
1
19.3k
answer
stringlengths
32
22.6k
labels
float64
0.33
1
answer_summary
stringlengths
5
164
How can I cook chicken in a similar way to how it was done in Biblical times?
I want to make a historically accurate biblical meal for a group. I'm using chicken, and serving it with flatbread and an Israeli salad (sans tomatoes and other new world vegetables) Does anyone have a recipe for a historical barbecue chicken or an idea of what sorts of spices were used back then? edit: Just thought I'd let you guys know I marinated the chicken in a mixture of rosemary, thyme, oregano, toasted sesame, garlic, salt and a bit of mint/pepper overnight. Then put them on skewers. Maybe not 100% authentic, but tasty.
Chicken, heat, oil, salt, honey if you feel a need for sweetness. Spices were rare and expensive in biblical times, with even black pepper being used a commodity for gifts between nations.
1
Spices were rare and expensive in biblical times .
Piezo as a switch to flash an led when disturbed
An LED embedded in a small translucent item (say half the size of a pack of cards) that would flash on briefly if the object was disturbed or tipped over. I immediately responded that a piezoelectric sensor/generator inside the object wired to an LED would do it. However, when I tried to demonstrate this concept using a piezo buzzer I liberated from an old phone, I could only get the LED to register a dim blip when I smashed the piezo buzzer with a blunt object. How would I ensure that a piezo sensor/generator would actually light up the LED adequately without the application of blunt force trauma. As I mentioned, space would be an issue so no large parts, breadboards, or really complex circuitry. I'm just trying to figure out the easiest and smallest way to accomplish this simple task. Thanks a lot for any help you can give me!
A tilt sensor would probably do. All the large component vendors stock varying types of these. A simple DIY solution might be something like a small spring (from a pen?) placed around a stiff wire so any disturbance causes the spring to contact the wire and close the circuit (connections at bottom of spring and wire like a SPST switch) The above would obviously need a small battery/solar cell/energy harvesting solution of some sort. If you are trying to do this without a battery then I don't think it's possible with a piezo, as they only produce tiny amounts of current. A shake to charge torch type circuit might be made to work (e.g. magnet slides through coil on tilt) EDIT - With the requirement of no battery now confirmed, I think I would try the coil idea mentioned above. If all you need is a brief flash then when the thing is tilted and the magnet slides through the coil it should work, You can downsize as necessary (within reason) Couple of links: DIY Shake flashlight Shake Flashlights - how they work This will likely be pretty difficult to do well with no "intelligence" or energy reserve (e.g. cap charged very slowly with something like a tiny solar cell, discharged through LED on spring sensor closing)
0.777778
a small spring (from a pen?) placed around a stiff wire
Was there confirmed opposition to Willow's relationship in Buffy season 5?
In season five of Buffy the Vampire Slayer Tara and Willow pursue a romantic relationship There's lots of hugging and smiling and talking about their feelings, but up to the sixth episode, they do not kiss. Was there studio/PR/political objection to the nature of this relationship? How much? What was the nature of it- was it deemed too controversial, inappropriate for younger viewers, were executives worried that it would perform poorly?
According to The Strange And Incredible Saga Of Willow and Tara On "Buffy the Vampire Slayer", there was initially at least some backlash from some fans about the relationship. The storyline received a great deal of attention in the press and sparked a controversy that divided the show’s most loyal fan base. In fact, Amber Benson who played Tara experienced first hand just how nasty the fans could get. She would visit the Buffy posting boards on the web on a regular basis and discover that negative comments were not only being made about the Willow/Tara relationship in general, but that the fans were targeting both the character of Tara as well as Amber Benson herself. “It was just so surreal to have people using my name and Tara’s name interchangeably and saying nasty things about both,” she said in the October 2000 issue of the English Science Fiction/horror magazine Dreamwatch. Benson also went on to say in the interview that ” it hurt for people to make nasty comments about Willow and Tara’s relationship and about my weight and what I looked like as a whole. Whether someone says that your ugly to your face or on a posting board, it still hurts horribly. I mean, you wouldn’t just go over to Joe Blow and say, ‘I think you’re a fat, ugly sexual pervert.” Almost immediately websites showing their support for Benson began popping up all over the web . “I have gotten so many supportive letters from fans,” Benson said. They have been so kind, she said. “they make me feel better about everything , especially when they share their experiences. They make me realize that I am not alone. We are all beautiful no matter what we look like on the outside.” The article also goes on to explain why there was no on-screen kiss between Willow and Tara until season 6. Hannigan also went on to talk in the interview about how the WB network would not allow an onscreen kiss between the two actresses ” In America we’ve not been allowed to have the kiss on screen. As actors, we sometimes get the squished down version of reactions, so it could be that The Powers That Be are freaking, but to us it doesn’t seem like a big deal. The show goes out at 8:00 p.m., the first hour of prime time. If it went out at 9:00 p.m., we could probably show a kiss, but why bother ? I don’t think we need to see it. It’s just the annoying fact that we see Buffy and Riley having full--- on sex all day and all night (in Where The Wild Things Are.), but these two girls can’t even kiss ?” The show moved from the WB to UPN after season 5, so apparently that network was a little bit more progressive-minded about the relationship.
1
The Strange And Incredible Saga Of Willow and Tara On "Buffy the Vampire Slayer"
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() }
Try escaping the "in your url string: var url= "contr_entry_pkg.sales_center_dropdown?&pnSalesCenterID=document.getElementById(\"pnSalesCenterID\").value +&pvCurrCd='||CURRDEF||'"; That will fix the syntax error, although I think you meant something like this: var url= "contr_entry_pkg.sales_center_dropdown?&pnSalesCenterID=" + document.getElementById("pnSalesCenterID").value + "&pvCurrCd='||CURRDEF||'"; Also, you should (though it's not strictly required) place semi-colons after each statement: ajaxReq = (window.XMLHttpRequest)? new XMLHttpRequest() : new ActiveXObject("MSXML2.XMLHTTP"); // <-- added ; here ... ajaxReq.send(); // <-- added ; here
0.777778
var url= "contr_entry_pkg"
Dialog is partially shown when SoftKeyBoard is shown
I have a custom Dialog as shown below: When I click on the Edit Text, The dialog is shifted upwards but half of the dialog becomes invisible as shown below: I verified the issue on Android ICS and Gingerbread but it doesn't happen on Android Lollipop. I appreciate your help for figuring out why. Here is the custom dialog layout XML: <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/layoutChatInGame" android:layout_width="305dp" android:layout_height="190dp" android:background="@drawable/dialog_table_border" android:orientation="vertical" android:visibility="visible"> <LinearLayout android:orientation="horizontal" android:layout_width="match_parent" android:layout_height="wrap_content" android:background="@color/roomlist_title_background"> <ProgressBar android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/progressBar" android:layout_margin="5dp"/> <LinearLayout android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_gravity="center" android:layout_margin="5dp"> <LinearLayout android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_gravity="center_vertical"> <TextView android:layout_width="fill_parent" android:layout_height="fill_parent" android:text="Game is on hold because the host paused the app" android:id="@+id/lblOnHoldDialogMessage" android:textColor="@color/progress_dialog_on_hold_text" android:textSize="18dp" android:singleLine="false" android:layout_gravity="center_horizontal"/> </LinearLayout> </LinearLayout> </LinearLayout> <TextView android:id="@+id/lblChatHistoryGameOnHold" android:layout_width="match_parent" android:layout_height="fill_parent" android:layout_weight="1" android:gravity="bottom" android:maxLines="5" android:scrollbars="vertical" android:textColor="@color/edit_text_general_text" android:textColorHint="@color/edit_text_general_hint" android:paddingRight="2dp" android:paddingLeft="2dp"/> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content"> <EditText android:id="@+id/textChatGameOnHold" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_marginLeft="2dp" android:layout_marginStart="2dp" android:layout_weight="1" android:ems="10" android:hint="@string/edit_text_send_chat_message" android:imeOptions="flagNoExtractUi|actionDone" android:inputType="text" android:maxLength="100" android:maxLines="1" android:textColor="@color/edit_text_general_text" android:textColorHint="@color/edit_text_general_hint"/> <Button android:id="@+id/btnSendGameOnHold" style="@style/lightboxButton.Blue" android:layout_width="wrap_content" android:layout_height="wrap_content" android:onClick="sendChatMessageInGame" android:text="@string/btn_send"/> </LinearLayout> </LinearLayout>
You can get the desired behavior by making adjustResize flag for the windowSoftInputMode of the dialog in the manifest if your dialog is declared as an activity. Like This: android:windowSoftInputMode="adjustResize|stateHidden" You can also directly try something like this directly on the dialog: alertDialog.getWindow().setSoftInputMode( WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE);
0.888889
AdjustResize flag for windowSoftInputMode of the dialog
An existing package by the same name with a conflicting signature is already installed
I'm trying to update (Documents to go Main app) in my device. When I'm trying to install it an error comes out says an existing package by the same name with a conflicting signature is already installed. I have root access on my device. Is there anything I can do?
First, if there's a signature mismatch and I'm sure the original app comes from a trusted source, I'd doubt the source the "update" comes from: the .apk very likely is manipulated, and might include malware -- so be warned! I do not know the "one mobile market" you've downloaded it from, so I cannot tell for sure. If you still want to install the new .apk: Yes, removing (uninstalling) the previously installed app and the installing the downloaded version should work. If the first one was installed as a system app, you will need the appropriate system tools to uninstall it (e.g. Titanium Backup -- which you then could also use to create a backup before removing the app, just in case). Alternatively, if you know the right command line tools, you can do it also via adb shell. As the app in question does not require to be made a system app, installation can be done normally without any root stuff: just tap the .apk in your file explorer, and let the normal installer do its job. After that, watch out for any strange behavior -- just in case the .apk introduced malware.
1
Installing the .apk from a trusted source
12V relay circuit, converted to 5V relay, under uC control
Few questions about a little Home-Automation project I am trying. Below is the schematic which I found in an article, slightly modified to suit the parts I have in hand -- Original had, Q1 = BC548 Relay = 12V coil voltage Mine has, Q1 = BC547B Relay = 5v coil voltage Q1) Is that an acceptable conversion ? Note: The BC547B has Vcbo:50V, Vceo:45V, Vebo:6V, where-as the BC548 in original circuit has Vcbo:30V, Vceo:30V, Vebo:5V, rest of the parameters being pretty same as per datasheet (hFE:220-450). The relay is the SPDT PCB-mount kind (rated for 10A @230VAC), also called "sugar cube". Q2) The load I am trying to drive is resistive (60W 220VAC incandescent lamp). What changes might I need if I would like to drive loads like -- Fluorescent lamp Fan (220VAC, 60W) 1HP Water pump (220VAC, 800W) -- One thought is to use higher current rated (e.g. 30A) relay. But, I think I need to worry about EM feedback which might cause arcing and destroy the EM relay. Q3) Right now I am making this on a veroboard (el-cheapo phenolic kinds). While I understand that this may be sufficient for the lamp/fan control, I am wondering if I need something better for higher loads, s.a. the Water-pump control ? What is the minimum gauge wire to be used for this purpose ? What kind of connectors (terminal blocks) could be used ?
DO NOT USE MAINS AC ON STRIP BOARD / VEROBOARD that your days may be long on the face of the land. This is in fact doable with reasonable safety with proper care. BUT learning what "proper" means in this context is something best arrived at by some years of general experience. Destruction of equipment and / or life is easily achieved by applying AC mains to stuff and to people and it should not be dealt with lightly, ever. Wire the mains wiring to the relay contacts directly using appropriate connectors or hard soldering as appropriate.l If the relay is mounted on the veroboard, leave largish full holes in the veroboard around the contacts ad ALWAYS provide means of preventing user or other contact with live mains. Note that I said above IF the relay is mounted on the veroboard,...". I do not and did not recommend it. That was just for people who like to ignore good advice and to live dangerously. Better not to do it till you have lived longer and prospered somewhat. As you know, wax on wings tends to melt when flying too close to sunwards and mains shocks can be as lethal. If you MUST do this (1) use high temperature wings when flying close to sun - TEFLON may help. (2) 8mm / 0.33 inch gaps all round MINIMUM between contact and anything else on board. A GAP is a hole with air in it !!!! Veroboard and similar = Phenolic board = PAPER plus a resin. Relying on paper board to not track, carbonise, absorb moisture or make deals with Murphy is placing your life at risk. Or somebody else's. Leaving an AIR gap is the equivalent to an 8mm creepage distance which is what most regulatory authorities prescribe in similar cases Leaving 8mm of Veroboard as an AC mains barrier is like tossing a coin 10 times and calling heads. You will probably get at least one head and would be surprised when you didn't. The difference is, with a coin you have a silly look on your face when you fail, whereas with AC mains you may end up with a silly look on your dead face. (Q1) Your driver is good EXCEPT The base drive resistor is far too low. ee below. they have used a very non standard and confusing symbol for the output contacts. I assume this is a SPDT = sngle pole double throw (= single changeover ) contact with isolation between output circuit and 5V. The transistor may or may not be OK depending on coil current - see below. You do not specify the coil current, but say it is 200 mA. Icollector = Icoil = 200 mA Ibase >> to > Icollector/Beta = 200 mA / 200 = 1 mA I base = (Vdrive - Vbe) / Rbase or Rbase = (Vdrive - Vbe ) / Ibase. For Vdrive = 5V, Rbase = (5-0.7) / 0.001 = 4300 ohms. A resistor that gives substantially more than 1 mA is desirable 9allows beta to be low etc). So R1 = 1k = 1000 ohms would be fine. Even with say 3V drive. Ib = (Vdrive - Vbe)/R1 = (3-0.7)/1000 = 2.3 mA. With a Beta of 200 Icmax = beta x Ib = 200 x 2.3 = 460 mA. If relay current < 200 mA then 1K is stioll good. If relay current is higher the value of R1 MAY need adjusting - probably not. (Q2) Your basic circuit is good for load power at any sensible level, subject to suitable coil drive power AND possibly some sort of snubbing of the contacts. The relay or contactor has to have contacts rated for the load carried - which will be in the relevant datasheet. A "snubber" is a circuit designed to absorb transient AC energy which may othewise cause contact arcing when the contacts open. It usually consists of a series C and R such that the C limits the current to a low value in the R under normal conditions but when high voltage and/or high frequency transients occur the R current and dissipation increase and absorb the transient energy. There have been various other stack exchange questions re snubbers eg here & here & here & here and there is lots of on-web resources eg Wikipedia Good intro Good. Slightly more complex Good - with online calculator Non dissipative version (from above link) and manufacturer of relays etc will often specify what is needed for their product with a given load. [Q3} Wire size. Terminal block size. Too general for easy answer. Many wire tables are available re current/gauge. "As thick as you can sensibly handle with no great effort" is usually enough. Occasionally you need thick enough to be hard or annoying, but that is usually at low voltage, not at mains voltages. Transistor selection: The BC547b is rated at only 100 mA Ic. Datasheet here This may be OK BUT a much better transistor is available which is often as cheap and sometimes cheaper. This is the BC337 (NPN). BC327 (PNP). Also availabl in SOT23 SMD as BC817/BC807. I use these as my standard "jellybean" transistors. They will meet almost any need that you'd sensibly use them for, and in most cases a better transistor is not available without paying a lot more. These are available in several beta ranges. I always buy the highest beta bin range = BC337-40 which has beta in the range 250 - 600 with mean of 400. BC337-40 etc 800 mA*, 50V. (* rated current varies with supplier 600 - 800 mA typical). 800 mA in datasheet cited). Digikey has them at $US0.14 / 100 here Keep watch a you will sometimes ee them for far less - maybe under 5 cents in 100's. BC337 datasheet Creepage / Mains clearance Phenolic PCB has its specialist uses but really really should be avoided for most purposes. The savings in cost are not vast compared to eg FR4 fibreglass. Phenolics main advantages are cost (minor gain) and "punchability". It is amenable to having holes or slots etc cut by punching tather than drilling or routing. In general use it is a nasty PCB material. It break and shatters. It risks breakdown. It is not fire or moisture proof. Caveat emptor! Excellent creepage & clearance page here Excellent TI power supply safety design paper here - Image from this shown below. Excellent creepage & celarance page here. Note they say: When designing a switch-mode power supply for use in information technology (IT) equipment, a typical rule of thumb is to allow an 8-mm creepage distance between primary and secondary circuits, and a 4-mm distance between primary and ground. If these dimensions are allowed for during the design stage, there is a high probability (95%) that no failure will occur with respect to creepage or clearance when the final product is submitted for test. All the above are liable to lead you to conclude that my advice was too conservative and that you can use lower limits with Vero board. It wasn't. You can't with any safety.
0.666667
Leaving a AIR gap is the equivalent to an 8mm creepage distance
Client Object Model - How can I access a List using relativeServerUrl
I am using the client object model and I want to access a List using the server relative Url. Folders can be accessed using the web.GetFolderByServerRelativeUrl but no such function exists for lists. The available API is web.Lists.GetByID and web.Lists.GetByTitle which I can't use (The list title is different from the listname/listpath)
Try this: public List GetListByRelativeUrl(String relativeUrl) { List existingList; Web web = context.Web; ListCollection lists = web.Lists; IEnumerable<List> existingLists = context.LoadQuery( lists.Where( list => list.RootFolder.ServerRelativeUrl == relativeUrl) ); context.ExecuteQuery(); existingList = existingLists.FirstOrDefault(); return existingList; } Each list has a root folder - you can find it by using the ServerRelativeUrl property.
0.5
List GetListByRelativeUrl
Are achievements per Steam account or per character?
Are achievements in Skyrim per character or per account on steam? If the Achievements are per account is there a way I reset them? When I say per character I mean can the Achievements I earn on one character be re-earned with another character?
They are per account. Once you've earned an achievement with one character, you can't earn it again with another character as its now unlocked for your steam account. And there is no known legitimate way of resetting steam achievements (From here). Resetting Achievements Unfortunately, achievements can not be reset at this time.
1
Resetting Achievements
Is copyediting good for an academic career?
I have recently been involved in managing a special issue in a scientific journal. The chief-editor was somehow appreciative of my work and now wants me to join the journal's board as a copyeditor. I am puzzled by this request since I have no example of an academic being involved in such a task. Usually, being an editor (see Why become a journal editor?) involves more content evaluation. Would my academic career take advantage of such a duty?
The only benefit you'll get as a copyeditor is clear: money (assuming he offered to pay you). The downsides are numerous: it takes a lot of time, it will not be considered a plus to your CV (it's a technical job, not a scientific one)… none of the benefits from being a journal editor apply to a copyeditor. Also, I don't know exactly what you did when you say “I have recently been involved in managing a special issue”, but if you were guest editor, offering you a copyeditor job is clearly not showing appreciation for your job as a scientist.
0.888889
The only benefit you get as a copyeditor is clear: money (assuming he offered to pay you)
Gmail's filter for SPAM folder and/or keywords in multiple fields
Gmail's filters are either very weak or I don't understand, how to create just a bit more complex ones. In particular, how can I create a filter, that will match: messages in SPAM folder (as well as in others or only in SPAM folder), messages, that contain specified keyword in many fields (i.e. From field and message's body). I'm able to match messages, that contain more than one keyword in given field (for example, to match many keywords in From field, I use one OR two OR three). But, can I write one filter, that will match these keywords in both From field and message's body? So, it will apply given filter rule, no matter, if keyword was found in this or that field? Or do I have to write separate filters for each field, which I want to search for matching keywords?
Gmail filters may not be sophisticated enough for that. Further, filtering stuff that has the "spam" label may not work reliably. (Filters act when a message arrives; a message marked spam may have been processed before that. You'll even be warned to that effect. Works fine for search, though.) The best I can come up with based on your question is a filter that looks like this: Matches: (from:(one OR two OR three) (one OR two OR three) in:spam) Do this: Never mark it as important When you create the filter you'll essentially put the whole string from:(one OR two OR three) (one OR two OR three) in:spam in the Has the words field. There are some flaws. The general text (one OR two OR three) could match against the subject (or possibly other places), because there's no way to limit the text search to the body of the message. More at Google Support.
0.666667
Filters act when a message is marked spam
jquery conflict with videobox and custom code
Ok I have a page that uses 3 plugins and custom code. Fullscreenr ScrollTo VideoBox my custom code is just to change css style of items in menu(I'll post that code aswell). My issue is that Fullscreenr and ScrollTo were working fine but when I want to add VideoBox the video popup doesn't want to work all it does is redirect to the youtube page. When I inspect the page(Chrome) it shows this error: Uncaught TypeError: Object #<Object> has no method 'setProperty' on this line: this.overlay = new Element('div').setProperty('id', 'lbOverlay').injectInside(document.body); I have tried using $.noConflict(); Now if I removed all the other plugins then it works but that doesn't work for me cause I need everything to work. Well hope somebody knows what I can do to fix this. <script type="text/javascript" src="js/mootools.js"></script> <script type="text/javascript" src="js/swfobject.js"></script> <script type="text/javascript" src="js/videobox.js"></script> <!-- IF I REMOVE FROM HERE DOWN VIDEOBOX WORKS --> <script src="js/jquery-1.3.2.min.js" type="text/javascript"></script> <script src="js/jquery.fullscreenr.js" type="text/javascript"></script> <script type="text/javascript"> <!-- // You need to specify the size of your background image here (could be done automatically by some PHP code) var FullscreenrOptions = { width: 1024, height: 439, bgID: '#bgimg' }; // This will activate the full screen background! jQuery.fn.fullscreenr(FullscreenrOptions); //--> </script> <script type='text/javascript' src='js/jquery.min.js'></script> <script type='text/javascript' src='js/jquery.scrollTo-min.js'></script> <script type='text/javascript' src='js/init.js'></script> <script language="javascript"> function GotoSection(divid) { $('#realBody').scrollTo( '#' + divid, 800, {duration:3000} ); switch(divid) { case "home": $("#mhome").attr('class', 'selected'); $("#mvids").attr('class', 'non'); $("#meventos").attr('class', 'non'); $("#mfotos").attr('class', 'non'); $("#mcontact").attr('class', 'non'); break; case "vids": $("#mhome").attr('class', 'non'); $("#mvids").attr('class', 'selected'); $("#meventos").attr('class', 'non'); $("#mfotos").attr('class', 'non'); $("#mcontact").attr('class', 'non'); break; case "eventos": $("#mhome").attr('class', 'non'); $("#mvids").attr('class', 'non'); $("#meventos").attr('class', 'selected'); $("#mfotos").attr('class', 'non'); $("#mcontact").attr('class', 'non'); break; case "fotos": $("#mhome").attr('class', 'non'); $("#mvids").attr('class', 'non'); $("#meventos").attr('class', 'non'); $("#mfotos").attr('class', 'selected'); $("#mcontact").attr('class', 'non'); break; case "contact": $("#mhome").attr('class', 'non'); $("#mvids").attr('class', 'non'); $("#meventos").attr('class', 'non'); $("#mfotos").attr('class', 'non'); $("#mcontact").attr('class', 'selected'); break; } } </script> If there is a better script I can use I welcome any and all suggestions aswell.
This will work if multiple libraries use the same $ in a webpage. (function($){ //Write your jQuery code here as usual using $. })(jQuery); We define an anonymous function here, which takes jQuery as its only argument. It gets mapped to $ in the above function and your code will work just as expected. You can very well do things like this. (function($){ $(document).ready(function(){ //Write your jQuery code here as usual using $. }); })(jQuery);
1
if multiple libraries use the same $ in a webpage
Why does my bike make a noise when I pedal hard?
When I pedal forcing a little with my right leg, the bike makes a noise that I don't know how to describe. I'll try to do it. It's like: a short "ting" a tiny bell if a small rock hits the down tube I don't know what is causing this noise, but I think that it could be any of this things: pedal crank arm/pedal connection crankset I think the material of all these things is alluminium. I don't feel anything (like a bad shifted chain) when I hear the noise. It happens when there is movement and when there is NO movement (I use the brake, so the bike doesn'e move, stand using all weight on right pedal, and it makes the noise) The pedals could be in any position, It is not in a particular position. Just pressing the right pedal. Has someone else has this "problem"? Any ideas of where this comes from? Update: Yesterday I took out the chain and stood on the right pedal, and made the noise. Then is not the chain, nor the transmission system. I put oil in the pedal axis, but had no luck. Also tried to loose the pedal, but the juncture point is too tight, and I couldn't. Today I will try to use oil in the bottom bracket. Update: here is a link to info on the bike http://www.diamondback.com/2012-sorrento maybe it helps to know the model of all the components.
My opinion is to make sure your bearings are still okay and that you are not missing any. If not put grease in the area of the bearing. Put the cranks back on and tighten it as much as you can.
1
Make sure your bearings are still okay and that you are not missing any
fetch PDO::FETCH_ASSOC multiple checkboxes
usually i help people with whatever they need, this time i'm asking for your help. i'm trying to get a specific row from my database after preforming multiple checkbox select i spend 50 hours on that and i couldn't manage to do that. each time i'm changing something in my code i get a different ERROR. i was looking for an answer in every HTML page that exist on the INTERNET ! please show me the light.. here is a part of my form.... value means "size" of the toy <div class=""><input type="checkbox" name="toys[]" value="6X2" /><label></label></div> <div class=""><input type="checkbox" name="toys[]" value="4X3" /><label></label></div> <div class=""><input type="checkbox" name="toys[]" value="8X2.5" /><label></label></div></strike> here is the PHP code... if (isset($_POST['toys'])) { foreach($_POST['toys'] as $each_check) { } } $query = $db->query = 'SELECT * FROM `toys` WHERE SIZE = '.$each_check; echo "<table>"; echo "<tr> <th>ratio</th> <th>size</th> <th>built</th> <th>description</th> </tr>"; while ($row = $query->fetch(PDO::FETCH_ASSOC)) echo "<tr><td>" . $row['ratio'] . "</td><td>" . $row['size'] . "</td><td>" . $row['built'] . "</td><td>" . $row['description'] . "</td></tr>"; echo "</table>";
This is so very far from being valid: if (isset($_POST['toys'])) { foreach($_POST['toys'] as $each_check) { } } $query = $db->query = 'SELECT * FROM `toys` WHERE SIZE = '.$each_check; More like: if (isset($_POST['toys'])) { foreach($_POST['toys'] as $each_check) { $query = $db->query("SELECT * FROM `toys` WHERE SIZE = '".$each_check."'"); } } But should be more like: if (isset($_POST['toys'])) { $query = 'SELECT * FROM `toys` WHERE SIZE = ?'; $sth = $db->prepare($query); foreach($_POST['toys'] as $each_check) { if( ! $sth->execute(array($each_check)) ) { die('MySQL Error: ' . var_export($sth->error_info(), TRUE); } while ($row = $sth->fetch(PDO::FETCH_ASSOC)) { // code here } } }
0.777778
if (isset($_POST['toys'])) $query = $db-
How can I fully automate the creation and configuration of a SharePoint virtual machine?
I typically require multiple SharePoint virtual machines for development purposes. I currently manually build these every time I need one, either starting from a fresh OS install or using sysprep when working with SharePoint 2010 and SQL Server 2008 R2. I currently use VMWare, but am open to VirtualBox or Hyper-V. I'd like to be able to go from zero to a working VM with SharePoint, SQL and Visual Studio all through script. Is this a feasible task? Or are there more practical methods which would start from a VM with a fresh installation of an OS, and then use more standard unattended installs. Although general, I'd like to know which direction to focus my efforts. Thanks in advance, vnat
What I usually do in situations like this, especially if I have a virtual machine system running, is to create one that looks like I want it -- then copy that VM when I need a new copy. Make changes to the copy so that it looks as different from the original as you need. Note this won't work if you are trying to iteratively create sharepoint instances (ie each instance is different due to something you learn while playing with the previous one).
1
Make changes to the copy so that it looks as different from the original
Are Mintakans related to Vulcans?
In TNG "Who Watches the Watchers" we learn about the Mintakans, who are described as "proto-Vulcan humanoids". Does this mean that the Mintakans come from a common ancestor to the Vulcans, or does it mean that the two species have evolved coincidentally to share many of the same features? (Or not so coincidentally if you take into account that genetic-seeding by the super ancient humanoids.) We have been shown many species that look completely like humans, and even entire planets that mirror Earth (TOS "Miri") and maybe some of those species could be considered "proto-human humanoids". I don't think it has been defined how long Vulcans have had space travel, or if it's even possible the Vulcans evolved from some other species that had space travel earlier, and the Mintakans are some off-shoot of that species. This could possibly be justified from what Spock says in TOS "Return to Tomorrow" where he seems to suggest in response to Sargon and the astrobiology doctor that there are unexplained issues with Vulcans evolving on the planet Vulcan, that they might have been colonized by Sargon's people instead. Interesting reading: http://en.memory-alpha.org/wiki/Vulcan_history
Probably not. The Vulcans have historically been very aware (if not forthcoming) about members of their gene pool and where they may be found. In this case, the term Proto-Vulcan humanoid implies the species has many of the same mental, physical and social traits originally seen exhibited by early pre-spaceflight Vulcans. This may include psychic ability such as telepathy, logical and disciplined minds, and a superior (to human) physiology. They may also share similar blood chemistry and the ability to be affected by similar diseases. Since Rombulas (and Remans) WERE once Vulcans they have a direct descent line from the planet Vulcan in the distant past. The Mintakins were not likely initially Vulcan and may have been descended from Sargon's species before they lost their original bodies. There were also said to have been Proto-Vulcan humanoids. Other such proto-Vulcan humanoids include the Rigilans and the Halanan.
1
Proto-Vulcan humanoid implies the species has many of the same mental, physical and social traits originally seen exhibited by
can´t save new field in magento(1.9) customer registration checkout form
I followed the instructions to add a new field in customer registration from add new field in magento(1.9) customer registration, works perfect! I need help to add this field to customer registration on checkout page also. I added this to my module xml (ea_dni is the name of my module): <checkout_onepage_index> <reference name="checkout.onepage.billing"> <action method="setTemplate"> <template>ea_dni/billing.phtml</template> </action> </reference> </checkout_onepage_index> And I added the field in billing.phtml <li> <label for="eadni"><?php echo $this->__('DNI') ?></label> <div class="input-box"> <input type="text" name="eadni" id="eadni" value="<?php echo $this->htmlEscape($this->getCustomer()->getDNI()) ?>" title="<?php echo $this->__('DNI') ?>" class="input-text" /> </div> </li> So, I see the new field in checkout registration form, but this field is not saving to the database! This is my install-1.0.0.php <?php $this->addAttribute('customer', 'eadni', array( 'type' => 'varchar', 'label' => 'DNI', 'input' => 'text', 'position' => 120, 'required' => false,//or true 'is_system' => 0, )); $attribute = Mage::getSingleton('eav/config')->getAttribute('customer', 'eadni'); $attribute->setData('used_in_forms', array( 'adminhtml_customer', 'checkout_register', 'customer_account_create', 'customer_account_edit', )); $attribute->setData('is_user_defined', 0); $attribute->save(); Can you help me? What am I missing? Here is my app/code/local/EA/DNI/config.xml <?xml version="1.0"?> <config> <modules> <EA_DNI> <version>1.0.0</version> </EA_DNI> </modules> <global> <helpers> <ea_dni> <class>EA_DNI_Helper</class> </ea_dni> </helpers> <resources> <ea_dni_setup> <setup> <module>EA_DNI</module> <class>Mage_Customer_Model_Resource_Setup</class> </setup> </ea_dni_setup> </resources> </global> <frontend> <layout> <updates> <ea_dni> <file>ea_dni.xml</file> </ea_dni> </updates> </layout> <translate> <modules> <EA_DNI> <files> <default>EA_DNI.csv</default> </files> </EA_DNI> </modules> </translate> </frontend> </config>
Replace your code in install-1.0.0.php with the following code <?php $installer = $this; $installer->startSetup(); $setup = Mage::getModel('customer/entity_setup', 'core_setup'); $setup->addAttribute('customer', 'eadni', array( 'type' => 'varchar', 'input' => 'text', 'label' => 'DNI', 'position' => 120, 'required' => 0, 'is_system' => 0, 'user_defined' => 1, )); if (version_compare(Mage::getVersion(), '1.6.0', '<=')) { $customer = Mage::getModel('customer/customer'); $attrSetId = $customer->getResource()->getEntityType()->getDefaultAttributeSetId(); $setup->addAttributeToSet('customer', $attrSetId, 'General', 'eadni'); } if (version_compare(Mage::getVersion(), '1.4.2', '>=')) { Mage::getSingleton('eav/config') ->getAttribute('customer', 'eadni') ->setData('used_in_forms', array('adminhtml_customer','customer_account_create','customer_account_edit','checkout_register')) ->save(); } $tablequote = $this->getTable('sales/quote'); $installer->run(" ALTER TABLE $tablequote ADD `customer_eadni` VARCHAR( 255 ) NOT NULL "); $installer->endSetup(); and add this code in your config.xml under <global> tag <fieldsets> <customer_account> <eadni><create>1</create><update>1</update><name>1</name></eadni> </customer_account> <checkout_onepage_quote> <customer_eadni> <to_customer>eadni</to_customer> </customer_eadni> </checkout_onepage_quote> <customer_account> <eadni> <to_quote>customer_eadni</to_quote> </eadni> </customer_account> </fieldsets>
1
Replace your code in install-1.0.0.php
Are scientifically detached professors referred to as ‘clinical’?
I have come across this term fairly often, where full/associate/assistant professors are referred to by the term ‘clinical’. Given that their departments had nothing to do with medicine, I thought the term referred to the second meaning of clinical: scientifically detached; strictly objective Is this interpretation correct? If yes, isn’t such a branding offensive?
Many universities are now forced by their budgetary situations to hire people at low wages on temporary contracts to teach classes. Then they have the problem of figuring out what title to give these employees. Since medical schools have a longstanding practice of hiring people (though not at low wages) on temporary contracts to teach classes and (accurately in their case) call such people Clinical Professors, some universities have adopted the terminology for all such cases.
0.888889
Medical schools have a longstanding practice of hiring people at low wages on temporary contracts to teach classes
What is fundamental difference between wave and its 180 flip phase?
I'm studying property of sound wave and I was wondering what is difference between two waves (one is original and one is 180 flip phase of original) ? Amplitude and frequency remains same and also wavelength is same, so are they same?? I could not detect any difference from hearing two sounds. If different what is different and can human/computer detect it? What is basically difference between two waves?
The difference is that at each instant in time, the 180-degree delayed wave has exactly the opposite value of the original wave. If $y_1(t) = \sin(2\pi{}ft)$ and $y_2(t) = \sin(2\pi{}ft + 180^\circ)$, then $y_1(t)=-y_2(t)$ for all t. If you are talking about a sound wave, then whenever one wave has a minimum of pressure, the other has a maximum and vice versa. As other answers said, this difference is not perceptible to human hearing because the ear is not sensitive to phase differences or delays on the scale of a single cycle of a sound wave.
1
The difference is that at each instant in time, the 180-degree delayed wave has exactly the opposite value of the original wave
Bound of norm of the operator $T(f)=fg$ on $L^p$ space
Prove that: if $g \in L^{\infty}$, the operator $T$ defined by $Tf = fg$ is bounded on $L^{p}$ for $1\leq p\leq \infty$. Its operator norm is at most $||g||_{\infty}$, with equality if $\mu$ is semifinite, where $\mu$ is the measure on $\mathcal{M}$, the measure space. My approach: I consider $\hat{g(x)}(f) = f(g(x))$, which is a linear operator on $L^{p}$. Clearly $||\hat{g(x)}|| = ||g(x) || \leq ||g||_{\infty}$ , which gives me the first part of the proof. I am clueless about the second part, involving semifinite measure.
If $f\in L^p$, then $$\lVert{Tf}\rVert_p^p=\int|fg|^p=\int|f|^p|g|^p\leq\lVert g\rVert_\infty^p\int|f|^p=\lVert g\rVert_\infty^p \lVert f\rVert_p^p,$$ because $|g|\leq\lVert g\rVert_\infty$, so $\lVert Tf\rVert_p\leq\lVert g\rVert_\infty\lVert f\rVert_p$ and therefore $\lVert T\rVert\leq\lVert g\rVert_\infty$. Thus $T$ is bounded.
0.777778
$fin Lp$, then $$lVertTfrVert_pp=
Why does Rufus think De Nomolos is dead?
In Bill and Ted's Bogus Journey, Rufus presumes that his old teacher, De Nomolos is dead....Why?
Although it's not mentioned canonically, I think it's most likely that he faked his own death so that he could work on his plan to change the past by stealing a time booth and building his (presumably illegal) evil Bill and Ted robots without attracting the attention of the authorities. Per the BBC review of the film "2691, San Dimas, California. Three years on, and the future might not be looking so great for Bill and Ted. Chuck De Nomolos (Joss Ackland), presumed dead, isn't happy about his present being built upon the legacy of two fools and he wants to change all that. In the future, our Rufus (George Carlin) is teaching the 'physics of acoustical reverberation' at the Bill and Ted University with special guest speakers thanks to the time travelling phone booth."
0.888889
Bill and Ted's future might not be looking so great for him, says a reviewer .
Find orphaned users
In SQL Server 2005, is there a way to find users that either don't exist at the server level (an account that was deleted at server level but wasn't disassociated from databases before it was deleted) or accounts that aren't linked (an account may have been deleted at the server level but not db level, then readded but the db level was never cleaned up). I've got a very messy server and it would be awesome if there was a query to run to find these.
This sp_change_users_login is depreciated as of SQL 2008 but still works well. If you pass in the 'report' option then it will list all of the users that don't have an associated login. EXEC sp_change_users_login 'report' If you want to run it for all of your databases you can do it like this. EXEC sp_msforeachdb 'use [?]; PRINT ''?''; EXEC sp_change_users_login ''report'';' If you look it up in BOL you will also find options for fixing "orphaned" users.
0.888889
EXEC sp_change_users_login 'report'
Is it possible to add house numbers using the Mapbox Street Vector Tiles source in Tilemill2?
Title says it all. Does anyony know if the house number is included in Mapbox’ vector tiles, and if so how to access it for styling? Thanks for any advice!
As far as I know, house numbers are not currently included in MapBox's vector tiles. If you need to render a small region, you can get them in GeoJSON with Overpass Turbo (press "Run", then "Export" and "geoJSON"), which you can use in TileMill as a layer. For bigger regions you might need to process planet extracts or the planet file itself.
1
GeoJSON with Overpass Turbo
What are the benefits of owning a physical book?
I have seen this question about updates of the D&D 4th Edition books, and it got me thinking. Since I got my Kindle I have not read a single paper novel; they have fewer drawbacks compared to digital copies than rpg rulebooks. Dead-tree types have some benefits like looking good on a bookshelf, but any ebook reader weighs less with 100 novels than the usual hard-cover book. If you want to look for the damage of Ares Alpha, even with a half-decent tablet it takes less than 2 seconds. Digital copies do not get worn, they never get unwanted earmarks, but you can bookmark them. Rulebooks do get updates, and unless you are willing to take a pen to your book, your hard copies will never contain them. The pdfs can be edited and resent to the buyers. Even better is the WotC approach with the DDI, you can look up any monster or item or (almost any) rule, in the most recent form, for 3 years at the cost of seven books. I think this is the way to go, even considering the horribly slow character builder. Although I must admit good illustration can help build the athmosphere. So what am I missing? Why are people buying rpg rulebooks in paper format? Why are books even published, I do not need to know if feats are supposed to be on the right page and skills on the left, I just want a list of them, filterable any way I want. Is this just a necessary part of earning money? I understand that pdfs are copied illegally, but the Compendium is not.
I speak from experience, having DMed several D&D internet-published adventures both by printing them (when I had a working printer on my old PC), by reading from published books and by reading from my laptop. When playing at my laptop I had problems with the following: showing images to players (easier with a tablet, or with a second linked screen) I had to do all the searches on the SRD myself. Sometimes, other players brought their laptops too, but they started being more distracted since laptops can also be used for gaming. Despite using a program to separate the maps, statblock and room description chapters in three different files, flipping pages was hard. Sometimes, finding the right file between those I had opened was time consuming. Having two or three monsters in a manual on different, distant pages, makes it hard to track the flipping. Scrolling is way less countable than flipping.
1
Flipping pages is less countable than flipping
Only showing the_date and the_excerpt for first entry in get_posts
this code below shows the titles and links for 5 posts in get_posts no problem but only displays the date and excerpt for first post... any help please? <?php $args = array( 'posts_per_page' => 5, 'post_type' => 'my', 'order_by' => 'post_date', 'tax_query' => array( array( 'taxonomy' => 'mycategory', 'field' => 'id', 'terms' => array(36, 38, 83, 84), 'operator' => 'NOT IN' ), ), ); $last_five_posts = get_posts( $args ); foreach ( $last_five_posts as $post ) : setup_postdata( $post ); ?> <div><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>" id="frontpagelatestposttitle"><?php the_title(); ?></a></div> <div><?php the_date(); ?></div> <div id="frontpagelatestpostexcerpt"> <p> <?php the_excerpt(); ?> </p> </div> <?php endforeach; wp_reset_postdata(); ?>
I think you are having same issue as I was having earlier. In this question. So here is the fixed code. This should work. I replaced both of these functions with get_the_date and get_the_excerpt. For the detailed explanation why/why not this work, read @kaiser's answer in same question. <?php $args = array( 'posts_per_page' => 5, 'post_type' => 'my', 'order_by' => 'post_date', 'tax_query' => array( array( 'taxonomy' => 'mycategory', 'field' => 'id', 'terms' => array(36, 38, 83, 84), 'operator' => 'NOT IN' ), ), ); $last_five_posts = get_posts( $args ); foreach ( $last_five_posts as $post ) : setup_postdata( $post ); ?> <div><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>" id="frontpagelatestposttitle"><?php the_title(); ?></a></div> <div><?php echo get_the_date(); ?></div> <div id="frontpagelatestpostexcerpt"> <p><?php echo get_the_excerpt(); ?></p> </div> <?php endforeach; wp_reset_postdata(); ?>
0.888889
How to replace both functions with get_the_date?
How to count the array from specific JSON object value?
here is my javascript: var json = '{"GetReportIdResult":[{"bulan":"4","total":"1728","type":"CHEESE1K","uang":"8796383"},{"bulan":"4","total":"572476","type":"ESL","uang":"5863408410"},{"bulan":"4","total":"33507","type":"WHP","uang":"235653242"},{"bulan":"5","total":"4761","type":"CHEESE1K","uang":"134877865"},{"bulan":"5","total":"245867","type":"UHT","uang":"1446787280"},{"bulan":"5","total":"47974","type":"WHP","uang":"631929807"},{"bulan":"6","total":"5762","type":"CHEESE1K","uang":"293393832"},{"bulan":"6","total":"236803","type":"UHT","uang":"2219506085"},{"bulan":"6","total":"24853","type":"WHP","uang":"386175022"}]}'; obj = JSON.parse(json); var arrayobj = obj.GetReportIdResult.length; alert (arrayobj); I want to count how many type in the same bulan value, (e.g. there are 3 type = CHEESE1K, UHT, and ESL in bulan = 4) how to do that?
There's still a typo in your JSON: you've got two commas in a row between the first two "bulan":"6" objects. But assuming you fix that... If you're asking how to count distinct types for a particular bulan value you can do something like this: function countTypesForBulan(resultArray, bulanVal) { var i, types, count = 0; for (i=0, types = {}; i < resultArray.length; i++) if (resultArray[i].bulan === bulanVal && !types[resultArray[i].type]) { types[resultArray[i].type] = true; count++; } return count; } console.log( countTypesForBulan(obj.GetReportIdResult, "4") ); // logs 3 The above loops through the array looking for a particular bulan value, and when it finds one it checks if it has already seen the associated type - if not, it adds it to the types object and increments the counter. Demo: http://jsfiddle.net/pAWrT/
0.833333
How to count different types for a particular bulan value?
A more convenient concatenation with a string literal in Rust
In the nightly Rust it is no longer possible to designate a string literal as String with a "~" character. In C++, for example, I'm using user-defined literals to concatenate string literals without the crust of mentioning std::string every time: inline std::string operator"" _s (const char* str, size_t size) {return std::string (str, size);} foo ("Hello, "_s + "world!"); Is there a similar feature existing or planned in Rust to make string literal concatenation less painful than String::from_str ("Hello, ") + "world!"?
You can use the format! macro. It is more readable, more translation-friendly, more efficient, and more powerful (you can concatenate more than just strings, just like C++'s ostringstream). It is also completely type-safe. foo(format!("Hello, {}", "world!")); Rust does not have user-defined literals. I think adding such a feature is backward-compatible, so maybe this feature will be added after Rust 1.0.
0.777778
Format! macro is more readable, more translation-friendly, more powerful, and more powerful
Using regular expressions to find img tags without an alt attribute
I am going through a large website (1600+ pages) to make it pass Priority 1 W3C WAI. As a result, things like image tags need to have alt attributes. What would be the regular expression for finding img tags without alt attributes? If possible, with a wee explanation so I can use to find other issues. I am in an office with Visual Web Developer 2008. The Edit >> Find dialogue can use regular expressions.
This worked for me. ^<img(?!.*alt).*$ This matches any string beginning with <img that doesn't contain any number of characters before an alt attribute. It even works for src="<?php echo $imagename; ?>" type of attributes.
0.888889
This matches any string beginning with <img that doesn't contain any number of characters before an alt attribute
Silent, extremely portable instrument to learn music
I am currently off work for more or less a month, so I decided it could be a great time to learn an instrument and how to compose some simple tunes. I am 29, never played anything meaningful in my life, know very little to nothing about music theory but I can comfortably read notes on a score. Asking a search engine for suggestions brought me to the music section of stackexchange and particulary to this question. After some thought I am planning to buy the Kaossilator 2 becase I feel/think: it is not too expensive for me (less than 200$) (otherwise I would have fancied a Teenage engineering OP1; it can be completely silent (commuting home->work->home takes quite a long time, I would like to be able to practice in crowded places (without annoying anyone); it is extremely portable (for the above commuting); it can be played even without being plugged to a pc (otherwise I would have chosen this korg nano keyboard); it can study some music theory with it; in some six months I will be able to show some decent performance with it (so to say, I hope it has a bit of depth and is not just a toy). Since (as I said), I know nothing of music and musical instruments, I would like to have someone savvy to 'validate' my points; alternative suggestions/idead would be appreciated, too! I am sorry I haven't 'linkified' but, as it is my first question, stackexchange only allows me to have two hyperlinks.
This may just be my opinion but I don't think a kaossilator will help with learning music theory, as it isn't an instrument as such. It is likely to help with rhythm though. If you do want to learn, get an electric instrument and use headphones.
1
kaossilator isn't an instrument as such.
Proxy.pac myIpAddress() returns local address and not ethernet adapters
This is kinda a Part two from here. When clients VPN into my network they get assigned an Ip address which in turn gives them the 252 option from the DHCP. The auto detect then grabs this file What I need essentially is a way for the proxy.pac to figure out if a client is on a VPN connection so that it can resolve a DIRECT for them. So if I do a simple var myIp = myipAddress() and then just have it match it from a list of these fixed addresses then it would be solved. However the myIpAddress() function seems to be picking up the local Ip to the machine (eg: 192.168.10.1) and not the network adapter. In my case that local address is my MS Loopback which is needed for some of my local VMs. If I disable my Loopback adapter it starts resolving the correct address. This is not an ideal workaround. So how do I go about resolving the Ip address I want from the correct adapter? I have been conducting this testing from my local machine for now. I am aware that it is not a closed VPN solution, it is just what has been decided at the moment. Thanks in advance...
Unfortunately, getting myIpAddress() to return the correct address in Windows does involve changing the priority of the NICs (in Windows XP this is in the "Advanced Settings..." dialog of the "Advanced" menu of the "Network Connections" dialog). Here's someone else's problem that looks like what you're seeing: http://www.geurtsrus.com/gerke/2005/01/proxy-auto-configuration-blues.html You might do better to detect the IP address that need proxying, rather than the ones that don't (i.e. local subnets in the company) and assume DIRECT otherwise. Another alternative would be to pass a different PAC DHCP option to clients on the VPN. That might be easy if your VPN users are coming out of a dedicated subnet, but it might not be if they're coming out of a LAN subnet.
0.5
IpAddress() returns the correct address in Windows XP
Long Haul flight with 9 month old with potential no Bassinet
I will be flying with my wife and daughter to the US and back again from New Zealand. Going there should be no issue, we should be able to use a bassinet but there is no guarantee we will get one on the flight back. We are flying Air New Zealand and they state that babies over 8 months could get a bassinet but if there are babies under 8 months they take priority, even if you request one well in advance. So we won't know until we get to the airport whether we get a bassinet or not which will cause us an issue. An additional infant ticket is quite a lot and there is no guarantee there will be a free seat in case we get no bassinet. So, what is the best way to handle this? Bite the bullet and purchase a seat (we will have a car seat with us anyway) or hope there is a bassinet available? Is there a third option where we have no additional seat and no bassinet? 13 hours on the lap is probably out of the question. Thanks
I don't know where you are flying and therefore which plane you will be on. If you look at your ticket it might say which plane you will be flying. With this information, you can check on seatguru the details of the plane that Air New Zealand will operate. Looking at the different planes Air New Zealand uses (777 or 767 a priori on your route), there seems to be a minimum of 3 bassinets and up to 6, so I suppose you will likely have one - unless New Zealanders make way more babies than I have seen on flights in general. Checking in early would probably help as you would get priority over other passengers for these seats.
1
Air New Zealand will operate 777 or 767 on your route
Should users be forced to go through a walkthrough?
We've found that our users have almost universally benefited from actually going through our walkthrough. Obviously, we have some more ux work to do on our service. But, based on this information, we decided to force users through the short walkthrough in the interim. Somewhat unsurprisingly, people have protested a bit :) So, what do you think, is it ok to force users through a brief walkthrough when you know it will benefit them in the end? Edit We are going to add some mixpanel hooks to find out if users are leaving when presented with a walkthrough they can't exit out of.
A question I would ask: "Why do your users protest going through the walk through"? Do they not find it useful? Is it boring? Do they already know the information? Is it unexpected? Are you asking for more than you are giving? They feel a loss of control? Is the language hard to read? Did they have a bad morning? You get the idea. As others have said, forcing your user to do something is not generally recommended. Getting the answer to the question above will help. For example if users say "I do not find it useful" a potential solution would be to tell them the benefit of the training and encourage/lead (but don't force) them through the training.
1
Why do you protest going through the walk through?
Ball structuring element representation
Regarding the ball structuring element mentioned here, how can we represent it as a matrix, the same as some structuring elements represented at the same page?
strel('ball',radius,height) Type this into matlab and it will display a matrix: strel('ball',5,10) The first matrix you get is the area and size of the ball as a matrix. The second matrix is the height of the each element of the ball.
1
strel('ball',radius,height)
Can a single bad letter of recommendation ruin my chances of getting admitted to grad school?
I am dealing with one very mercurial professor and I had a bit of an incident with him. I think I might have offended him slightly (I told him about the deadline to submit a letter of recommendation (LOR) in the nicest possible way and yet he flared up on me). My seniors tell me that he has the habit of extracting revenge on people who ask him for a LOR if they irritate him. I am afraid I might have offended him; he kinda scares me. But he is a very good researcher in computer networks and I performed well in his class. I don't want to drop him and choose another faculty. Now I know very well that the other two lecturers are going to rate me well, but if this lecturer gives me a bad rating will it harm my chances of getting admitted?
Pick someone else if it isn't already too late. The actual answer to your question is this: It is far better to have a good letter from a faculty member who is relatively unknown than a bad letter from someone they recognize and respect. In fact, the latter is probably the worst thing that could happen. If it is already too late, i.e. you have asked Professor X, he's agreed, and you've sent him the material (which is probably an online link these days) then work hard to make writing the letter easy. Put together the following information and send it fast: Include your student number. Remind him which of his classes you have taken, and when. How did you distinguish yourself in those classes? How would you describe yourself? What are your strengths? What are your weaknesses? He is going to have to answer those questions when he writes your reference, so the more details the better; but these must be things your referee knows himself. What are some of your academic and nonacademic accomplishments that he may not remember? What makes him particularly qualified to write a letter for you? That is, why should the recipient of the letter value it over a letter from someone else? This goes in an email that says, "Thank you very much for agreeing to write a reference for me on very short notice. I hope the following will be of use to you when you write it."
1
What is a good letter from a faculty member?
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?
Yo-ho-ho is related to yoho, which is in the Oxford Dictionary of English: An exclamation used to call attention: orig. in nautical use, hence generally; also sometimes used like yo-heave-ho int., q.v. It dates from the 1700s: 1769 W. Falconer Universal Dict. Marine (1780) 11, Hola-ho, a cry which answers to yoe-hoe. Yo ho ho may either have been extended to fit in the song, or an alternative version of yo heave ho or yoho.
1
Yo-ho is related to yoho, which is in the Oxford Dictionary of English
Does "surfeit" have an adjectival counterpart?
I’m thinking of something like surfeitous, but obviously that’s not a word.
Excessive, intemperate, superfluous.
1
Excessive, intemperate, superfluous
Proper word for "understood"
I want to communicate to a person that her situation and conditions are understandable and I get it. Is: You're being understood. the most accurate one? Is "understood" the best word in this context?
Why not just "I understand." It conveys personal contact, empathy, understanding, care. Whereas... "You're being understood" just emphasises the distance between you & the victim …err… subject.
0.888889
Why not just "I understand"
keywords and description for front-page of drupal 7 site
I managed to set page titles with the "Page Titles" module and keywords and description with the "Meta Tags (Quick)" plugin, however it seems like there is currently no way of having custom keywords/description for the front-page. Does anybody knows of a work around this?
You can use Path-Based Metatags option in Meta tags quick module, enable module and go to front page, you will see Path-Based Metatags option...when you click on the option, you can fill in the fields that you want, you can also set the fields that you want to display (admin/config/search/metatags_quick)...
0.888889
Path-Based Metatags option in Meta tags quick module
How can I draw these pictures with TikZ?
I have the following images: Binary Decision Diagram (BDD): Binary Decision Tree (BDT): and I would like to draw them in LaTeX with TikZ. Furthermore, I would like to make them "consistent" between each other (i.e., 0-edges becomes dashed arrows in both images, the two pictures must be in black and not in grayscale, no need for the labels on the arrows of the BDD). How can this be done ? So far I can only make the BDT with one style of arrow, and I have absolutely no idea how to make the BDD :| \documentclass{article} \usepackage{tikz} \usetikzlibrary{calc,arrows,positioning} \begin{document} \tikzset{ treenode/.style = {align=center}, c/.style = {treenode,circle,draw=black,minimum width=1.5em,minimum height=1.5em,text centered,font=\footnotesize}, r/.style = {treenode,rectangle,draw=black,minimum width=1.5em,minimum height=1.5em,text centered,font=\footnotesize}, level 1/.style={sibling distance=60mm}, level 2/.style={sibling distance=30mm}, level 3/.style={sibling distance=15mm}, level 4/.style={sibling distance=7mm} } \begin{tikzpicture}[->,>=stealth',thick] \node[c] {a} child{ node[c] {b} child{ node[c] {c} child{ node[c] {d} child{ node[r] {0}} child{ node[r] {0}} } child{ node[c] {d} child{ node[r] {0}} child{ node[r] {1}} } } child{ node [c] {c} child{ node[c] {d} child{ node[r] {0}} child{ node[r] {0}} } child{ node[c] {d} child{ node[r] {0}} child{ node[r] {1}} } } } child{ node[c] {b} child{ node [c] {c} child{ node[c] {d} child{ node[r] {0}} child{ node[r] {0}} } child{ node[c] {d} child{ node[r] {0}} child{ node[r] {1}} } } child{ node [c] {c} child{ node[c] {d} child{ node[r] {1}} child{ node[r] {1}} } child{ node[c] {d} child{ node[r] {1}} child{ node[r] {1}} } } } ; \end{tikzpicture} \end{document}
How about this: \documentclass[tikz,border=2pt]{standalone} \usepackage{tikz} \usetikzlibrary{positioning} \tikzset{% zeroarrow/.style = {-stealth,dashed}, onearrow/.style = {-stealth,solid}, c/.style = {circle,draw,solid,minimum width=2em, minimum height=2em}, r/.style = {rectangle,draw,solid,minimum width=2em, minimum height=2em} } \begin{document} \begin{tikzpicture}[node distance=1cm and 1cm]\footnotesize \node[c] (a) {a}; \node[c] (b) [below right=of a] {b}; \node[c] (c) [below left=of b] {c}; \node[c] (d) [below=of c] {d}; \node[r] (final-one) [below right=of d,xshift=-2pt] {1}; \node[r] (final-zero) [below left=of d] {0}; \draw[onearrow] (a) -- (b); \draw[onearrow] (b) -- (final-one); \draw[onearrow] (c) -- (d); \draw[onearrow] (d) -- (final-one); \draw[zeroarrow] (a) -- (c); \draw[zeroarrow] (c) -- (final-zero); \draw[zeroarrow] (b) -- (c); \draw[zeroarrow] (d) -- (final-zero); \end{tikzpicture} \begin{tikzpicture}[ level 1/.style={sibling distance=60mm}, level 2/.style={sibling distance=30mm}, level 3/.style={sibling distance=15mm}, level 4/.style={sibling distance=7mm} ] \node[c] {a} child{ node[c] {b} edge from parent[zeroarrow] child{ node[c] {c} child{ node[c] {d} child{ node[r] {0}} child{ node[r] {0} edge from parent[onearrow]} } child{ node[c] {d} edge from parent[onearrow] child{ node[r] {0} edge from parent[zeroarrow]} child{ node[r] {1}} } } child{ node [c] {c} edge from parent[onearrow] child{ node[c] {d} edge from parent[zeroarrow] child{ node[r] {0}} child{ node[r] {0} edge from parent[onearrow]} } child{ node[c] {d} edge from parent[onearrow] child{ node[r] {0} edge from parent[zeroarrow]} child{ node[r] {1}} } } } child{ node[c] {b} edge from parent[onearrow] child{ node [c] {c} edge from parent[zeroarrow] child{ node[c] {d} child{ node[r] {0}} child{ node[r] {0} edge from parent[onearrow]} } child{ node[c] {d} edge from parent[onearrow] child{ node[r] {0} edge from parent[zeroarrow]} child{ node[r] {1}} } } child{ node [c] {c} edge from parent[onearrow] child{ node[c] {d} edge from parent[zeroarrow] child{ node[r] {1}} child{ node[r] {1} edge from parent[onearrow]} } child{ node[c] {d} edge from parent[onearrow] child{ node[r] {1} edge from parent[zeroarrow]} child{ node[r] {1}} } } } ; \end{tikzpicture} \end{document} You might want to fine-tune it a bit, e.g. if you want to have curved edges in the BDD. I had to manually shift the final 1 node in order for the edge from b being truly vertical.
1
endtikzpicture
Can a number have both a periodic an a non-periodic representation in a non-integer base?
Fix an algebraic number $\beta$ and consider a complex number $\alpha$ which admits multiple representations in base $\beta$. If one representation of $\alpha$ is ultimately periodic, must every other representation of $\alpha$ be ultimately periodic? Bonus question: Does this depend on the choice of the set of digits? Edit: John Bentin showed that this is false in general, even with $\beta \in \Bbb{Q}$. Is this true at least for $\beta$ algebraic integer? Edit 2: This question came up when trying to solve this problem of mine. All I know so far is that if $\beta$ is a Pisot integer, i.e. if it is a real algebraic integer greater than $1$ with every conjugate lying in the unit circle, then $\alpha \in \Bbb{Q}(\beta)$ if and only if it has an ultimately periodic expansion (which is stronger than my question).
We have $2=\frac23+\frac49+\cdots+(\frac23)^k+\cdots$, which is clearly periodic. Let us write, alternatively, $$2=1+\dfrac23+\dfrac{8}{27}+\dfrac{512}{19683}+\cdots,$$or$$1=\dfrac23+\dfrac{8}{27}+\dfrac{512}{19683}+\cdots=\sum_{k=1}^{\infty}\dfrac{2^k}{3^k}a_k,$$ where $a_1=1,a_2=0,a_3=1,a_4=\cdots=a_{8}=0,a_{9}=1,$ and generally $a_n=1$ if $$1-\sum_{k=1}^{n-1}\dfrac{2^k}{3^k}a_k>\dfrac{2^n}{3^n},$$ with $a_n=0$ otherwise. A proof that $\sum_{k=1}^{\infty}\left(\frac23\right)\!^ka_k=1$ is appended below. We will show that the sequence $(a_1,a_2,...)$ cannot be eventually periodic. To do this, suppose the contrary. Then there are integers $l\geqslant0$ and $m\geqslant1$ such that$$1-\left(\dfrac23+\dfrac{8}{27}+\dfrac{512}{19683}+\cdots+\dfrac{2^l}{3^l}\right) =\dfrac{2^{l+1}}{3^{l+1}}\sum_{k=1}^{m}\dfrac{2^{k-1}}{3^{k-1}}a_{l+k}\sum_{k=0}^\infty\dfrac{2^{mk}}{3^{mk}}$$ $$\qquad\qquad\qquad\quad\qquad\qquad\quad=\dfrac{2^{l+1}p}{3^l(3^m-2^m)},$$ where $p$ is an integer. Now the fraction on the LHS, in its lowest terms, has an odd numerator, while the fraction on the RHS has an even numerator: a contradiction. Edit: To prove that $\sum_{k=1}^{\infty}\left(\frac23\right)\!^ka_k=1,$ we show by induction that $$0<1-\sum_{k=1}^{n-1}\dfrac{2^k}{3^k}a_k<2\frac{2^n}{3^n}\quad(n=1,2,..).$$This is true for $n=1,$ since $0<1<\frac43.$ Now suppose that it has been established for $n=j,$ namely $$0<1-\sum_{k=1}^{j-1}\dfrac{2^k}{3^k}a_k<2\frac{2^j}{3^j}.$$(Case 1) If $$1-\sum_{k=1}^{j-1}\frac{2^k}{3^k}a_k>\frac{2^j}{3^j},$$then $a_j=1,$ and $$0<1-\sum_{k=1}^j\frac{2^k}{3^k}a_k=1-\sum_{k=1}^{j-1}\dfrac{2^k}{3^k}a_k-\frac{2^j}{3^j}<2\frac{2^j}{3^j}-\frac{2^j}{3^j}=\frac{2^j}{3^j}<2\frac{2^{j+1}}{3^{j+1}}.$$(Case 2) If $$1-\sum_{k=1}^{j-1}\frac{2^k}{3^k}a_k<\frac{2^j}{3^j},$$then $a_j=0,$ and $$0<1-\sum_{k=1}^j\frac{2^k}{3^k}a_k=1-\sum_{k=1}^{j-1}\frac{2^k}{3^k}a_k<\frac{2^j}{3^j}<2\frac{2^{j+1}}{3^{j+1}}.$$This completes the inductive step.
1
frac23+frac49+cdots$ is clearly periodic
Timings of Mana Costs vs Mana Payments
If I have 7 lands and a Wild Cantor (or another creature that sacrifices to produce mana, e.g. an Eldrazi Spawn token) in play, and there are no other creatures on the battlefield, can I cast Blasphemous Act? I seem to have hazy memories that a Wild Cantor didn't interact particularly well with cards with Convoke, so I was wondering if it was a similar story here...
From my interpretation, it should work. 601 Casting Spells 601.2e The player determines the total cost of the spell. Usually this is just the mana cost. Some spells have additional or alternative costs. Some effects may increase or reduce the cost to pay, or may provide other alternative costs. Costs may include paying mana, tapping permanents, sacrificing permanents, discarding cards, and so on. The total cost is the mana cost or alternative cost (as determined in rule 601.2b), plus all additional costs and cost increases, and minus all cost reductions. If the mana component of the total cost is reduced to nothing by cost reduction effects, it is considered to be {0}. It can't be reduced to less than {0}. Once the total cost is determined, any effects that directly affect the total cost are applied. Then the resulting total cost becomes "locked in." If effects would change the total cost after this time, they have no effect. 601.2f If the total cost includes a mana payment, the player then has a chance to activate mana abilities (see rule 605, "Mana Abilities"). Mana abilities must be activated before costs are paid. Example: You cast Altar's Reap, which costs {1}{B} and has an additional cost of sacrificing a creature. You sacrifice Thunderscape Familiar, whose effect makes your black spells cost {1} less to cast. Because a spell's total cost is "locked in" before payments are actually made, you pay {B}, not {1}{B}, even though you're sacrificing the Familiar. So first you determine and lock the mana cost, then you can activate mana abilities, then you have to pay the mana cost. As for the definition of a Mana Ability: Mana Abilities 605.1a An activated ability is a mana ability if it meets three criteria: it doesn't have a target, it could put mana into a player's mana pool when it resolves, and it's not a loyalty ability. (See rule 606, "Loyalty Abilities.") The cantor meets all 3 criteria, so its ability is a mana ability. Therefore, you should gain both the cost reduction and the mana through saccing. As for why a cantor should not play nicely with Convoke, I don't know - do you have an authoritative source that it really doesn't work? "Tapping a creature" is an optional, additional cost by Convoke, and after tapping for convoke you should still be able to sac the Cantor with its mana ability. Here is an explanation why the cantor can only reduce convoke spells by 1. However, that does not affect my answer to your actual question. The subtle difference between the two is that Blasphemous Act has a cost reduction, which is locked after you determined it. Convoke, OTOH, offers an alternative way of paying the mana costs and requires you to tap creatures to pay for its cost. You can announce to tap the cantor, but once you sacced it for mana, you can of course no longer do so, and the game rewinds to before you announced Blasphemous Act.
0.888889
Cantor can only reduce convoke spells by 1
Should I Cite a Journal's Page Number, or an Article's?
When I'm citing a page in a journal, and the article has an independent page numbering system, should I cite the page number of the journal or the article?
I'm not certain what you mean by an article with an independent page numbering system, but I assume you mean the following. The published journal article is, say, on pages 25-48 of the journal, but there is also a preprint available online with different formatting, and it is numbered from 1-23. Not only the page divisions, but even the number of pages differ, so there's no easy way to transfer a reference between these numberings except approximately. The most important rule is to be clear and correct: you should leave no doubt or ambiguity about which numbering system you are using. If you cite only one version of the paper, then you should use the same numbering used there. If you cite several versions, then you need to make sure your references are clear. The second rule is that you should focus on the "most official" version of the paper, whatever that is. In most cases, a journal paper is more official than a conference paper, which is more official than a numbered technical report in a series, which is more official than a random preprint. You want to cite the most final, complete, and authoritative version, and the one most likely to be accessible to future readers. There may occasionally be subtle cases (for example, a paper that has been reprinted in books with corrections or additions), but this generally means the journal version. P.S. The only other interpretation of the question I can think of is for journals like Physical Review, where an article has its own page number (like 032326) and then the individual pages are given subsidiary numbers (like 032326-1 through 032326-8). In that case, if you want to cite a specific page you could refer to it as 032326-3, or maybe just 3 if the context is clear. In the bibliography, you would write 032326:1-8 or just 032326, depending on your bibliography style.
1
How to cite an article with an independent page numbering system?
Apple Push Notification - all messages get sent but not all get delivered
I have a problem with sending Apple Push Notifications. When I send a message to two devices only, everything is working. But When I send a message to all devices in the Database, then not all Push Message get delivered, but I get no error for any device. Sending was ok! And one of the devices which gets a message in the first test, didn't get a message, when I post the message to all devices. The send procedure is working, because I get a message on my phone at the first test and when I send to all devices it works too. Can there be any other problem which cause this problem?? Or is this a Apple bug/problem. I have no idea what the problem could be. Does anyone have this problem too??
When you were working for 1 device, I guess you were using development profile. And for multiple device, you must be using distribution profile. So just check all your provisioning profiles and registered devices according to provisioning profile. Delete the profile which you are not using and that should solve your problem.
1
Check all provisioning profiles and registered devices according to provisioning profile
When cellphone providers give "unlimited social networking", how do they identify the traffic?
Some providers will give unlimited traffic for things like Facebook, Twitter, LinkedIn and even YouTube in some rare cases on smartphones. I'm wondering if there's any documented way they identify this traffic. Not for malicious purposes but from an ethical standpoint I'm curious as to how they keep the data at bay. On first glance, I would assume an IP filter and payload size checks but I wonder if anyone has any better theories or resources?
Strictly speaking, the phones are not completely restricted because of IP over Facebook. Whatever the medium, there's always someone to think about transporting raw IP packets in it, and then go ahead and actually implement it. For the actual restriction, this can be done with IP filtering, or by enforcing an unescapable Web proxy which filters on the URL (preferably a transparent proxy rather than something in the phone software, so that jailbroken phones may not evade the restriction).
0.888889
IP filtering on Facebook or enforcing a web proxy
Disable the save button until changes are made?
We have a list of complicated things, which the user can click on to get a new view in which they can edit all the details stored for that thing. The edit view already has a Cancel exit mechanism (default for all our edit forms) and it has a save button (which both saves and exits back to the list). Should the Save button be disabled until changes are made to any of the details?
In an app I created some 10 years ago, disabling is the approach I took. Each form has a Save, Cancel and Close button. Save and Cancel are both disabled until changes have been made. Close is always available and will prompt to save or cancel when changes were made. At the time I thought it was the right way to do things. Now, every time I open an edit form and want it to go away, it irks me that I have to use close and can't just use ok or cancel. I think the form should figure out what to do: ok + changes => save ok + no changes => close cancel + changes => close cancel + no changes => close close + changes => prompt close + no changes => close The close button will be removed in the near future, but the functionality and behaviour remain as on a desktop you will always have the "X" button by which you can close a form. The inclusion of a separate close button was really to provide a bigger target... Edit Just for good measure, here is Joel's view on disabling/hiding menu items (which is "DON'T") http://www.joelonsoftware.com/items/2008/07/01.html I have come to the conclusion that it applies to buttons as well. In response to JohnGB's comment The back button in a browser never submits a form, it always has the implicit meaning of a cancel. Any app, whether on a desktop, in a browser or on a mobile, that supports "back" navigation should really stick to that unwritten standard. And it doesn't even matter whether you follow an explicit save or an auto-save paradigm. It just means that using an explicit save paradigm you will have to provide a "save" button and in an auto-save paradigm "back" is just that "back".
0.777778
Disabling is the approach I took 10 years ago .
Voltage ratings of capacitors: ceramic vs electrolytic
Now I know when it comes to electrolytic capacitors it's usually good practice to use a voltage rating 1.5x - 2.5x the maximum rating you ever expect the capacitor to be exposed to, as the lifetime can be significantly reduced by running it near its limits. But does the same protocol apply to ceramic capacitors? For example, assume a 25V ceramic capacitor - will running it at 24V reduce its lifespan significantly? I'm currently designing a PSU which needs to be reliable, so at the moment I'm using 50V caps for a maximum 20V input (35V caps aren't available), but I'd like to switch to 25V caps if possible.
ceramic caps are really durable, MLCC's are often tested at rated to 200% rated voltage for ~1000 hours before failure. That being said, I often find that higher voltage MLCC's can actually be cheaper than the lower voltage for a given capacitance due to higher industry volume for the higher voltage ratings. For instance finding 16v 0.1uf MLCC is never a problem, but something like 100pF may be cheaper at 50V than it is at 16V
0.777778
MLCC's are often tested at 200% rated voltage for 1000 hours before failure
Should I always hibernate instead of shutting down?
I'm using Windows XP and I hate the long start up time when I shut down and then turn on my laptop. However if I hibernate instead of shutting down it starts up much faster. Are there any harmful effects / disadvantages if I always hibernate whenever I'm done for the day instead of shutting down?
There is nothing wrong with Hibernating, it is an option in windows for all of the reasons you have just listed! I have been using it for years.
1
Hibernating is an option in windows
Unusual Differential Equation
I have the differential equation $$y''y+n(y')^2=0\tag 1$$ I haven't found any references to equations of this type by searching. Does anyone have a suggestion as to how to proceed? It comes about from the following progression: $$y=(y')^n-\frac 1n\tag 2\\ y'=ny''(y')^{n-1}\implies1=ny''(y')^{n-2}\\ 0=n(n-2)(y'')^2(y')^{n-3}+ny'''(y')^{n-2}\\ 0=(n-2)(y'')^2+y'''y'$$ Taking $y$ in place of $y'$ and $n$ in place of $n-2$ I get the form shown in $(1)$. Are there any good ways to solve any of the other intermediate forms, or even the initial form shown in $(2)$? Further constraints: $y(0)\approx 1.27$ is an otherwise-unknown constant that I am attempting to build an expression for. The initial problem is the recurrence relation with $a_1\approx 1.27$ the unknown constant and $$a_{n+1}=(a_n)^{n+1}-\frac 1{n+1}$$ with the additional constraint $\lim_{n\to\infty}a_n=1$.
For Cauchy problem with initial data in zero you can multiply everything by $(n+1)y^{n-1}(t)$ because, as you say, the initial data is not zero. You get $$(y^{n+1})''=0,$$ therefore, $y^{n+1}(t)=a+bt$. Now you solve for $a$, $b$, which should give $$y(t) = \left(y^{n+1}(0)+t(n+1)y^{n/(n+1)}(0)y'(0)\right)^{1/(n+1)}.$$
0.777778
Cauchy problem with initial data in zero
I can get visual studio for free through school, should I?
I am currently using dev++, I am a complete beginner, (Freshman CS major) learning C++. I can get one of the newest versions of visual studio (2008 or 2009 i think) for free through my school. Not sure if it is worth the trouble of getting. thoughts?
I can't speak more highly of any IDE than Visual Studio. It's useless for Java and such, but it is great for C++ and incredible if you get into .NET. With a price point of Free, there's absolutely no reason it's not worth checking out at the minimum. I suppose it's not for everyone but odds are you'll love it.
1
Visual Studio is great for C++ and C++
Good backup options for Mac pre-TimeMachine
I have a friend with an iBook G4 who is looking for a cheap backup option for her Mac running OS 10.4. Money is tight, so getting 10.5 is not really an option (in addition to buy a backup drive etc, yes money is really that tight). What suggestions can you offer for backups that's better than trying to remember to burn a CD once a month?
Use snapshot. Free and functions effectivelly like TimeMachine. There's a writeup on how to get it going on older Macs somewhere on the Web.
1
How to get snapshot going on older Macs
Learning the musical concepts in the book "Gödel, Escher, Bach"
I am reading the book "Gödel, Escher, Bach", in which the author tries to present concepts in mathematics, drawings and music as instances of a certain "pattern", that he calls "strange loops". He makes several comments about Bach's music, in particular, as the title suggests. So, he talks about the fugues, sonatas and partitas, modulation, themes played against themselves, how Bach manages to get two or more musical lines going simultaneously and so on. But I don't understand a thing about these musical concepts. I have tried to listen on YouTube to some of the compositions he mentions in the book, but my stupid brain only hears a stream of notes flowing. I can't recognize the patterns he talks about, nor can I grasp, for example, the fact the the "Canon per Tonos" rises successively until it reaches the key C again. So how can I learn more about these musical concepts, so as to better follow the book's main ideas? To make this question narrower, I'm not asking for general references to learn about music, but something very specific to the content of the book, so that I don't miss important information (and fun) from his exposition.
A key to following the polyphonic music of Bach is to be able to single out the individual voices. You will be very much helped by having a score at hand. In a fugue, the theme is presented in one voice, then repeated on the dominant with slightly modified intervals (but same rhythm and pitch profile) in another voice, then introduced in the tonic in a third voice and so on. A good pianist will bring out these entries, but seeing them in the score will most likely aid your understanding of what goes on. Keeping track of modulations throughout a piece can be quite challenging even for experienced musicians, but in the score these different tonal regions can be easily identified. By the way, I think the ideas about self reference and Gödel's incompleteness theorem are much harder to grasp for most readers of GEB, but still the book is just as enjoyable.
0.888889
A key to following the polyphonic music of Bach is to have a score at hand
Does the question mark mean this is a question?
Imagine the following written conversation, as recently occurred via SMS between me and a friend (edited for brevity): A: What are you going to do today? B: I don't know. Go shopping? What is the meaning of the question mark in the reply? Is person B asking a question of person A? If so, why would person B expect person A to know the answer in this case? If not, why use the question mark?
I interpret this as B's question to himself, not to A, meaning "maybe I should consider going shopping?" And it's probably not even a real question, although the vocal pattern is the same as for a question; when written, a question mark at the end is the only way to indicate that intonation.
0.888889
a question mark is the only way to indicate that intonation.
Best CMS for review-type sites
Is there an ideal CMS for making a review site? By review site, I mean like a restaurant review site where you have each entry belonging to different major categories like Cuisine and City. Then users can browse and filter by each or by combination (Chinese Food in Los Angeles, with suggestions of other Chinese restaurants in LA, etc). Furthermore, I'd want it to support other fields like price, parking, kid-friendliness, etc. And to have users be able to filter by those criteria. I've been told that with a combination of custom taxonomies, plug-ins and many clever little queries, that Wordpress 3.x can handle this. But I'm having a heck of a time with it getting into the nitty gritty, and that's where I find the community support is lacking. The sort of stuff you'd think would work in WP, like making one parent category for Cuisine and one for City, don't really work once you get further in and start trying to pull it all together. Then you find these blog posts where people say, "This example shows that one could create a huge movie review site using custom taxonomies..." but when you go and try it you hit all sorts of challenges and oddities that point a big long finger at Wordpress being in fact a blogging platform. The best I came up with was one category for the cuisine and one tag for the city, then I created a couple of custom tag-like taxonomies for the other features. It's quite a mess to try to figure out how to assemble all of that into a natural, intuitive site. I expect a few versions down the road WP will be able to do these sorts of sites out of the box. So I thought I'd take a step back before I run back into the Wordpress fray and find out if maybe there is another platform better suited to this sort of relational content site. Directory scripts in some ways offer many of the features I'm looking for, but I need something more flexible and, hopefully, interactive (comments, reviews). I'm especially looking for feedback from people who've crafted sites like this. Thanks!
There are many directory scripts out there, although many are made by PHP script-kiddies and not great quality. Hot Scripts will have a good selection I'm sure. There is a "professional" extension for Joomla called Mosets Tree, which I have used and is pretty good. It can take a little effort to customize it, if you want to change the layout a lot, but the default set up looks fine in most cases. Incidentally, as I asked on SO, you don't have to pay for it since it is an open source license. If you can find it anywhere (it's quite prevalent on torrent sites), then it's perfectly legal to install and use. There may be similar plugins for Wordpress and Drupal too, so shop around.
0.888889
Hot Scripts is a "professional" extension for Joomla
Trying to publish ASP.NET project, but VS can't find a particular file
One of the css files disappears from the publish obj/Release/Package/PackageTmp/ folder during publishing and then VS tells me it can't find the file. It's as if one portion of the project says to delete the file and the other tries to find the file. Any ideas? I hope I gave enough info. It's short, but pretty much sums up the issue to my knowledge. csproj file. The only file I'm having an issue with is the survey.css file. It appears just twice in the csproj file. <Content Include="greybox\logo.gif" /> <Content Include="greybox\next.gif" /> <Content Include="greybox\night_valley.jpg" /> <Content Include="greybox\night_valley_thumb.gif" /> <Content Include="greybox\night_valley_thumb.jpg" /> <Content Include="greybox\prev.gif" /> <Content Include="greybox\salt.jpg" /> <Content Include="greybox\salt_thumb.gif" /> <Content Include="greybox\w_close.gif" /> <Content Include="layout.css" /> <Content Include="obj\Debug\Survey.csproj.FileListAbsolute.txt" /> <Content Include="obj\Debug\Survey.dll" /> <Content Include="obj\Debug\Survey.pdb" /> <Content Include="obj\Release\Package\PackageTmp\bin\Survey.dll" /> <Content Include="obj\Release\Package\PackageTmp\default.aspx" /> <Content Include="obj\Release\Package\PackageTmp\layout.css" /> <Content Include="obj\Release\Package\PackageTmp\survey.css" /> <Content Include="obj\Release\Package\PackageTmp\ThankYou.aspx" /> <Content Include="obj\Release\Survey.csproj.FileListAbsolute.txt" /> <Content Include="obj\Release\Survey.dll" /> <Content Include="obj\Release\Survey.pdb" /> <Content Include="obj\Release\_WPPLastBuildInfo.txt" /> <Content Include="survey.css" /> <Content Include="SurveyAdded.aspx" /> <Content Include="ThankYou.aspx" /> <Content Include="Web.config" />
I would open your CSProj file up in a text editor and see if you can find where that file is referenced. A simple text search will help. Either you will discover where it is hiding inside your project, or you can just delete it using the text editor.
1
Search for CSProj file in text editor
What is Pointer-chasing and how it is related to BFS
While reading a PPT on BFS (Breadth First Searching) I found that BFS can be used where we have " pointer-chasing" . What exactly is a pointer chasing and how is it related to BFS?
I find it easiest to think of a Linked List example. Lets say we have a Linked List with 5 elements. To get to the 3rd element, you have to use Pointer-chasing to traverse through the elements.
0.666667
Pointer-chasing to traverse through the elements
How long before ASP.NET MVC becomes widely used in industry?
I am trying to decide whether to learn ASP.NET MVC (or to spend the time learning another technology that interests me). I know that it is an elegant framework, but I am trying to assess my future job opportunities if I invest in this skill. In your estimation, how long is it going to be before demand for ASP.NET MVC developers rivals that for developers in the other top web dev frameworks? Is it a matter of a year? 2 years? 3+? On a related note, do you see use of ASP.NET MVC surpassing classic ASP.NET in the foreseeable future? Scott Guthrie says the two will exist side by side, but I'm curious just how much of the mind share ASP.NET MVC is expected to grab. I know this is a speculative question; I'm just interested in your subjective hunches.
"but I am trying to assess my future job opportunities if I invest in this skill" If you want to increase your future job opportunities then what you rather should ask yourself is; "What is the hysterically coolest and funnyest thing I could possibly work on today?" Because if you think of "what will make you valuable" you will always end up being mediocre. If you however do what's FUN to do you will end up creating competency few others have the capacity to outperform - which always seems to be valuable in the world... ;) Not to mention that your professional life will be so much better! Do what's FUN and what you get the most "kicks" out of, then your "value" will increase!
1
What is the hysterically coolest and funnyest thing I could possibly work on?
Is there an algorithm to generate digitally signed URL links?
Scenario: Alice prepares an URL link to Bob's web service (e.g., http://www.bob.com/sensitiveData/123?login=mallory). Alice gives the URL link to Mallory. Mallory follows the link to trigger an action in Bob's system. Alice's link is intended for Mallory. Note that Mallory is authenticated by Alice but not by Bob. Bob does not know Mallory, but he trusts Alice. So if Alice has authorized Mallory to perform the action, Bob will blindly execute it. The problem: How can Bob be sure that it is really Alice's link and that Mallory has not modified it in step 2? In theory, such problems can be solved by a digital signature with a public-key algorithm. Alice could generate a signature of the link with her private key and append it to the URL, for example, http://www.bob.com/sensitiveData/123?login=mallory&signiture=<SOME-SIGNITURE>). How do you generate the signature? As an experiment, I just tried gpg --encrypt but the results are quite huge. Additionally, it has to be encoded to use it inside an URL (e.g., with Base64), which will make it even larger. As I'm not very experienced with cryptographic algorithms and protocols, I wanted to ask whether there is an well-known solution to the problem of generating signed URLs? If not, do you see any flaw in my approach? Do you have any recommendation for the generation of the signature that can be appended to the link? If possible, it should be relatively short. Just for clarification: Unfortunately, it is not possible to change the overall protocol. Of course, it would be safer if Alice and Bob could directly communicate over an encrypted connection. Additionally, Mallory should have to ask Alice to tell Bob to trigger the action, or Bob should have the option to ask Alice to authorize the action.
A RSA signature has the length of the modulus: if using the usual 2048-bit key size, then signatures are 256-byte long. Since you want to fit the signature within a URL, which is text-based, you must have some sort of encoding such as Base64, which implies some size overhead; with Base64, 256 bytes will become 342 characters -- that makes for URL of quite respectable length. DSA (and its highly fashionable elliptic-curve variant ECDSA) offers smaller signatures; you can get very decent security (as much as 2048-bit RSA) with signatures of size 60 bytes or so -- there again, Base64 encoding inflates that to 80 characters. If you need even smaller signatures, then you must go to less mainstream algorithms, e.g. BLS, which offers signatures twice smaller than DSA. But the maths are fiendishly more complex, and there is no standard, only scientific papers. Alternatively, you may want to use RSA with ISO 9796-2 signatures (not PKCS#1). You will get 256-byte signatures, but you may then smuggle some of your application data within the signature itself. As a rough approximation, you will get your n-bit security with a total overhead of about 3n bits; albeit with a minimal message size of 256 bytes. Theoretical limit: if you want a security level of n bits (meaning that attackers are assumed not to be able to run computations which need more than 2n elementary operations), then the signature size cannot be less than n bits either. Indeed, an attacker could try brute force on the signature, trying out all possible signature values and using the signature verification algorithm (which uses Alice's public key, which is public, hence known to the attacker) until a matching signature is found. However, there is no currently known secure digital signature algorithm which offers n-bit security with n-bit signatures. DSA needs to use 4n-bit signatures to offer n-bit security. BLS lowers that to 2n bits. There have been proposals for some other algorithm types which could reach down to 1.5n bits or so, but right now they all turned out to be flawed in some way. It may be possible that you could change your model slightly. For instance, Alice and Bob may share some secret value; Bob then does not really trust "Alice" but rather "whoever knows the secret value, which happens to be known to both Alice and Bob". In that case, you can rely on a MAC algorithm instead of a digital signature; you can think of MAC algorithms as signatures where the key to sign and the key to verify are the same. It is a change of context. Depending on who Alice and Bob are in your system, sharing a secret may or may not be possible. Using a MAC forfeits most chances at non-repudiation. It also means that Bob can himself produce URL that he will accept. Yet, if you can tolerate the use of a MAC, then you can get very short verification elements. In fact, you can even get below n bits because exhaustive search can no longer be applied: since the MAC verification key is secret, the attacker cannot try MAC values and decide whether they are correct on his own machines. To "try" a potential MAC value, the attacker MUST then send it to Bob, and see if Bob is happy with it or not. After a million tries or so, Bob may begin to suspect foul play and apply countermeasures (e.g. cease to respond to that decidedly dodgy requester). In that sense, a MAC value of length 64 bits ought to be sufficient. That's just 8 bytes -- encodable with Base64 as 11 characters. HMAC is a widely implemented MAC algorithm with good repute. There is no well-established standard for "signed URL". Every site designer works out his own scheme, which is unfortunate because homemade cryptography is one of the surest paths to disaster. The conceptual model, though, is sound: basically, you want Mallory to convey a message from Alice to Bob, such that Bob can know that the message really comes from Alice, and was not altered or even invented altogether by Mallory. That the message travels as a "URL" is a mere encoding constraint which has no impact on the concept. A MAC or a signature is indeed the right tool here. Beware, though, of replay attacks: if Mallory has an Alice-signed URL that Bob will accept, Mallory may try to send that URL twice to Bob, to get twice the effect. Depending on your context, this may or may not be a problem. If it is, then Bob MUST enforce some protection mechanism, e.g. remembering past requests to reject duplicates. A time stamp within the URL data (under cover of the MAC or signature) can help Bob keep track of seen URL (i.e. Bob can forget "expired" URL since he won't accept them any more).
0.777778
A MAC or a signature is indeed the right tool here .
How do I make my camera follow my cube?
I've recently started to learn some C# scripting in Unity. I've been able to make my PlayerCube move around using Vector3 Transform.translations, but I want my camera to follow my cube while moving around, and it's not working since Unity can't find PlayerCube. How do I make make it so it understands that there's a PlayerCube? using UnityEngine; using System.Collections; public class CameraScript : MonoBehaviour { Player = GameObject.Find("PlayerCube"); // Use this for initialization void Start () { // GameObject.Find(PlayerCube); } // Update is called once per frame void Update () { Transform.LookAt (PlayerCube); } }
You can use this script. Attach it to your camera, and place your cube in the Target spot in the inspector. using UnityEngine; using System.Collections; public class TargetFollower : MonoBehaviour { [Tooltip("Target to be followed")] public Transform Target; [Tooltip("Mimic the Target's changes in x coordinate")] public bool FollowTargetX = true; [Tooltip("Mimic the Target's changes in y coordinate")] public bool FollowTargetY = true; [Tooltip("Mimic the Target's changes in z coordinate")] public bool FollowTargetZ = true; // Update is called once per frame void FixedUpdate() { if (Target) { Vector3 targetMovement = GetTargetMovement(); UpdatePosition(targetMovement); } } private Vector3 oldTargetPosition; private Vector3 GetTargetMovement() { if (oldTargetPosition == Vector3.zero) { oldTargetPosition = Target.transform.position; } Vector3 newTargetPosition = Target.transform.position; Vector3 targetMovement = newTargetPosition - oldTargetPosition; oldTargetPosition = new Vector3(newTargetPosition.x, newTargetPosition.y, newTargetPosition.z); return targetMovement; } private void UpdatePosition(Vector3 targetMovement) { float xPosition = transform.position.x; float yPosition = transform.position.y; float zPosition = transform.position.z; if (FollowTargetX) { xPosition += targetMovement.x; } if (FollowTargetY) { yPosition += targetMovement.y; } if (FollowTargetZ) { zPosition += targetMovement.z; } Vector3 updatedPosition = new Vector3(xPosition, yPosition, zPosition); transform.position = updatedPosition; } }
0.888889
Attach your cube to your camera and place it in Target spot in the inspector
Building hand strength for when tapping on the guitar
I've been practicing on my tapping ability. An example of what I mean by tapping can be viewed here, notice how the right hand hits the strings. I'm currently using all four fingers excluding the thumb to tap the guitar. I find my pinky is not as strong as my other fingers when it comes to applying the appropriate strength on the string. What are some exercises I can do to increase my overall finger strength when tapping? More tapping? As a sidenote, I've noticed that I use the momentum of my forearm to help apply the appropriate pressure on the string I'm trying to hit. If I remove that momentum and only use force created by the movement of my finger the pressure is significantly less. I was hoping these exercises would also help me to not rely on my forearm as much.
In moments where you have nothing to do (sitting on the bus, watching tv), you could train your hands by tapping on you knee for example. You could also stretch your fingers backwards and try to counter that with your finger muscles to basically train them. Also, what really helped me building strength in my left pinky was starting to play the piano. I have pretty small hands and for me it really really helped a lot :). On top of that, I can play a bit of piano now :).
1
How do I train my hands by tapping on you knee?
How does Christianity deal with biblical criticism related to the Old Testament?
As an orthodox Jew I have seen quite a stir lately regarding the topic of biblical criticism, specifically towards the Old Testament (Torah). I have perused several questions in this stack which seem to address this topic in general, and learned a lot about apologetics, but I have not seen answers that address some of the major claims of biblical criticism, especially as it pertains to the Old Testament. For example: The story of Noah and the flood seems to be contradicted by archaeological evidence as well as having been 'borrowed' from earlier flood narratives such as the Gilgamesh story Many of the portions of the Old Testament seem to be borrowed from earlier near eastern texts such as the Hammurabi code The notion that there are multiple authors (documentary hypothesis) of the Old Testament. In short, how does Christianity deal with some of the major contentions of biblical criticism towards the Old Testament? I apologize if any parts of my question offend any sensibilities to which I am unaware.
Archaeology does not contradict a worldwide flood. There are different opinions on the matter. For more in-depth information watch these presentations as they present an alternate view. Especially presentations 2 (A Universal Flood) and 3 (Bones in Stones). The complete presentation can be seen here, they are by a Researcher and Professor in Zoology. This is also a matter of opinion. Many different people could write about a different event and that does not necessarily mean they borrowed from one another. They merely wrote about the event. The Epic of Gilgamesh could just easily be a story "based on true events." Just like today's movies, much of it could've been made up just for entertainment value, or to fit into a certain belief system. One more thing about this. Just because they were written first, does not necessarily mean they are more truthful. The reason we believe that the Genesis account is truthful is because we believe that the whole Bible is inspired. Jesus spoke about Noah, Lot, Adam, and other Old Testament characters as historical figures, not simply characters from a fable. Also along with what Narnian said about literary analysis that suggests that there were multiple authors, in the New Testament some of the writings are attributed to the people that we believe today. For example, Luke attributes the quotation from Isaiah to Isaiah; Luke 4:16-18.
1
Archaeology does not contradict a worldwide flood
When should a supervisor be a co-author?
What are people's views on this? To be specific: suppose a PhD student has produced a piece of original mathematical research. Suppose that student's supervisor suggested the problem, and gave a few helpful comments, but otherwise did not contribute to the work. Should that supervisor still be named as a co-author, or would an acknowledgment suffice? I am interested in two aspects of this. Firstly the moral/etiquette aspect: do you consider it bad form for a student not to name their supervisor? Or does it depend on that supervisor's input? And secondly, the practical, career-advancing aspect: which is better, for a student to have a well-known name on his or her paper (and hence more chance of it being noticed/published), or to have a sole-authored piece of work under their belt to hopefully increase their chances of being offered a good post-doc position? [To clarify: original question asked by MrB ]
It really depends: I had two doctoral advisors, I wrote papers under the direction of both (separately): my first supervisor did not have her name on the paper; one of the papers I worked on with my second supervisor is joint, another has just my name (and yet a third has both our names plus a co-author). The details are boring and not very enlightening, so I won't go into them, but the important thing in that in every case, there was a different, rational and very good reason why the supervisor name did or did not appear. It had to do with the cultural differences between France and the US, publication medium, and how the work was conducted. In that respect, the etiquette question is similar as what happens when a colleague chats with you about your current research, or even better when they provide a crucial lemma or idea for your research. You should definitely acknowledge, but when do you offer co-author credit? In that case also, hierarchical considerations can easily come to the fore (if a person is clearly higher then the other in the pecking order, they can easily pass for a bully if they're not careful). Even the area of math you work with is relevant (I've heard stories of people solving a problem in a group and the paper being published under a single name simply because the culture in that specific field does not give rise to many joint papers).
0.888889
When do you offer co-author credit?
ASP.Net WebForms requiredfieldvalidator not working in FireFox?
I have a WebForms app that uses a field validator on a dropdownlist. It works in IE but not FireFox. This is pretty straightforward stuff I'm doing. Here are the setups for the dropdown and validator: <asp:DropDownList ID ="dmbFileActNo" runat="server" CssClass="DROPDOWN_MEDIUM" AutoPostBack="True"></asp:DropDownList> <asp:requiredfieldvalidator EnableClientScript="true" id="rfvFileActNo" Display="None" ControlToValidate="dmbFileActNo" Runat="server" InitialValue="-1"></asp:requiredfieldvalidator> I'm running ASP.Net 2.0 on the web server. Javascript is enabled on the FireFox browser-- this problem happens on all FF browsers I've tested, on multiple everyday machines, so I don't believe it's due to a locked down install.
I got this working by modifying the web.config. As it turns out, someone had <xhtmlConformance mode="Legacy"/> in there, which is an older setting (the current default is "transitional"). Thanks for everyone's help.
0.777778
modifying the web.config
SQL OUTPUT entire row after update
With the following: UPDATE ITS2_UserNames SET AupIp = @AupIp OUTPUT INSERTED.PrimaryKeyID WHERE @Customer_ID = TCID AND @Handle_ID = ID I get the primary key, but how do I get all columns?
Try this --TO get updated values of columns UPDATE ITS2_UserNames SET AupIp = @AupIp OUTPUT INSERTED.* WHERE @Customer_ID = TCID AND @Handle_ID = ID --TO Get both new and old values UPDATE ITS2_UserNames SET AupIp = @AupIp OUTPUT INSERTED.*,Deleted.* WHERE @Customer_ID = TCID AND @Handle_ID = ID
1
Get updated values of columns UPDATE ITS2_UserNames SET AupIp OUTPUT INSER
Where to store uploaded images from perspective of security
It is quite common that uploaded files (images, videos, etc.) are stored on a file server because of performance and database-recovery-time reasons. But is there a benefit of storing such files in database in terms of security?
Most large web applications need to limit database usage, and there is an additional burden by using the database as a file store. Most databases are not really designed for file access, MongoDB is a document store, and is commonly used to store files and related data. Another option is using Amazon S3 to store and distribute content. Regardless of where you store the files, there is a lot that can go wrong with file storage and retrieval.
1
MongoDB is a document store, and is used to store files and related data
using the new facebook payments reports API
been trying to get data from the facebook payments reports API, since they say on november 7th no more reports will be sent by email. tried php and got an error - "SSL connection timeout". this is the php curl code i'm using: $set_action_url = "https://paymentreports.facebook.com/".$company_id."/report?date=".$date."&type=".$type."&access_token=".$company_token; $ch = curl_init($set_action_url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch,CURLOPT_TIMEOUT,5); curl_setopt($ch, CURLOPT_CONNECTTIMEOUT ,0); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); $result = curl_exec($ch); i logged the url and query string just before the call, and if i use it in a browser i do get the file. what am i doing wrong?
to fetch the zip file, file_get_contents also works
0.777778
file_get_contents
Word for the opposite of "hypochondriasis"
Is there a word for the opposite condition of hypochondriasis? For example, someone who denies being sick when they clearly are? I would just say that they are "in denial". Is there any other adequate word? I thought about the obvious 'hyperchondria' but it doesn't seem to be used anywhere and doesn't look suitable as—from checking the origin of the word—just replacing 'hypo' by 'hyper' wouldn't fit well: 1555–65; < Late Latin < Greek, neuter plural of hypochóndrios pertaining to the upper abdomen (supposed seat of melancholy), equivalent to hypo- hypo- + chóndr ( os ) ensiform cartilage + -ios adj. suffix
I think egosyntonic comes reasonably close: Egosyntonic is a psychological term referring to behaviors, values, feelings that are in harmony with or acceptable to the needs and goals of the ego, or consistent with one's ideal self-image. Many personality disorders are considered to be egosyntonic and are, therefore, difficult to treat. Anorexia nervosa, a difficult-to-treat Axis I disorder, is also considered egosyntonic because many of its sufferers deny that they have a problem. Its counterpart is egodystonic.
1
egosyntonic is a psychological term referring to behaviors, values, feelings that are in harmony with or acceptable to the needs
Decoding Matrix Encoded Surround Sound Through Convolution
I wish to create a finite impulse response filter to decode a dolby digital matrix encoded 2 channel signal into 5 channels. These filters would then be used in a realtime pipeline on a Linux machine using jack and jconvolver to do the convolution. The equation is as follows: The reference for the above equation is: http://en.wikipedia.org/wiki/Matrix_decoder It would seem this should be able to be done but I haven't the faintest how. Any help, and in particular working code that could generate the filters (Octave or other open source preferred) would be much appreciated!
Jbarlow's answer is excellently derived but misses a major issue: Almost all of the "better" surround sound decoders such as Dolby Prologic, DTS Neo 6, Lexicon, Bose Videostage are "dynmaic", i.e. they looks constantly at the signal conditions and adjust the decoding matrix in the fly based on an estimate what the original signals may have been. The main problem here is that the encoder is "lossy", i.e. a lot of information is lost during the encoding process and you can't fully recover the original signal. A simple example: let's say you start a "left" signal. That encodes to Lt = 1 and Rt = 0. Decoding this again then leads to signal in all five channels and not just in the left like the original condition. The only way around this is to dynamically look at correlation and panning of the input signals and adjust the decoder matrix on the fly. Finally, while jbarlow's equations are mathematically correct, it's typically not done this way, even if it's only a static decoder. The main issue is that this creates side to side cross talk, i.e. signals that where original in the left front can end up partially in the right front which highly undesirable from a perceptual point of view. What's typically used is roughly something like this (properly normalized that is) L= Lt, R = Rt; C = .707*Lt + .707Rt; Ls = .6*Lt - .3*Rt; Rs = .6*Rt - 0.3 *Lt; In practice most people also don't bother with the Hilbert Transformer since most encoders that do a real time downmix (such as Blu ray players, set top boxes, or TVs) don't implement it in anyway.
0.777778
Jbarlow's answer is excellently derived but misses a major issue .
Disable the save button until changes are made?
We have a list of complicated things, which the user can click on to get a new view in which they can edit all the details stored for that thing. The edit view already has a Cancel exit mechanism (default for all our edit forms) and it has a save button (which both saves and exits back to the list). Should the Save button be disabled until changes are made to any of the details?
I kindof like Microsoft's approach to use the OK-Cancel-Apply combination on their input forms. The Apply button is disabled as long as nothing has changed, and the OK button will automatically Apply the changes if there are changes. It's intuitive and clear what each button does and it's familiar to a lot of people.
1
Apply button disabled as long as nothing has changed .
Turn On Off GPS in ICS
Possible Duplicate: ICS Android enable gps programmatically? [closed using an alternative approach] I was using the code below to enable and disable GPS programmatically and worked perfectly in 2.2 and 2.3. Intent i = new Intent(); i.setClassName("com.android.settings", "com.android.settings.widget.SettingsAppWidgetProvider"); i.addCategory(Intent.CATEGORY_ALTERNATIVE); i.setData(Uri.parse("3")); context.sendBroadcast(i); However, when trying to use the ICS (4.0) realized it did not work. Then I discovered that it was a bug as link below. http://code.google.com/p/android/issues/detail?id=7890 I believe we have fixed in ICS. Could anyone tell me if there is an alternative to solve this in ICS? I think an OS ridiculous "open source" have so many restrictions. I'm already starting to regret having opted to develop our applications on Android.
Those restrictions are because of security issues. You should not try to achieve this case because it works now, but in next few days can be fixed - for example custom roms. The best solution to manage GPS is to open Android's GPS preferences and let user to enable/disable GPS manually.
0.777778
How to manage GPS in Android?
Scatterplots for subsets of multivariate data [Updated]
Update/Re-write There has been a lot of ambiguity over what i'm am trying to do with this question so I have decided to give it a full rewrite. I'm really sorry for the confusion. If you want to see the background please see the edit history. I hope things are clearer now.. I have some data made up into the following fashion: datac = { data1 = RandomReal[1, {7, 3}], data2 = RandomReal[1, {13, 3}], data3 = RandomReal[1, {19, 3}], data4 = RandomReal[1, {16, 3}], data5 = RandomReal[1, {5, 3}] }; data1 through data5 are subsets of a multivariate dataset with 3 independent variables. data1, for example, is composed of 7 individual data points (each with 3 variables). If I use the following function: Needs["StatisticalPlots`"] pairwisecol[data_, col_] := PairwiseScatterPlot[data, PlotStyle -> col, DataTicks -> True, DataLabels -> {"x", "y", "z"}] I can create a combined plot comparing the various subsets. E.g. Show[{pairwisecol[data1, Red], pairwisecol[data2, Blue], pairwisecol[data3, Green], pairwisecol[data4, Purple], pairwisecol[data5, Orange]}] This curently has the major drawbacks that each subset has to be defined and have a colour explicitly assigned to it. Also, Show in this instance overlays all of the DataTicks etc, rather than just the elements from the first plot (as is normally the case with Show[{Plot1,Plot2}]). What I'm looking for is a way to use the whole (partitioned) dataset datac to generate such a plot/diagram. i.e. something like, Show[pairwisecol[#, Red] & /@ datac] but, with Red being replaced by a series of colours to represent each subset (like in the plot shown). ...Alternatively, starting with a 2-level list e.g. datap = RandomReal[1, {60, 3}]; and a definition of sublist partitions, parts = {7, 13, 19, 16, 5}; or partspos = {[[1;;7]], [[8;;20]], [[21;;39]], [[40;;55]], [[56;;60]]}; then defining a function something like: pairwiseP[data_, partlist_] := ... that would partition datap into appropriate sublists, create a series of PairwiseScatterPlot's (each with a different plot colour) and then combine them using Show. Note that this example has n = 3 independent variables. I am looking for a method that works for 1 < n < ~20. Can anyone suggest how to do this?
Problem with Ticks can be solved by fixing DataRange. I don't know what is the problem with color specification for You, I hope I have not missunderstood anything: Needs["StatisticalPlots`"] datap = RandomReal[1, {60, 5}]; (*it works for any n*) parts = {12, 13, 12, 13, 5}; (* remember that Total@parts == Length@datap *) colors = {Red, Green, Orange, Blue, Black}; (*or some random, as You like*) data = Take[datap, {1, 0} + #] & /@ (Partition[Prepend[Accumulate@parts, 0], 2, 1]) Show[ PairwiseScatterPlot[data[[ #]], DataRanges -> {{0, 1}, {0, 1}}, DataTicks -> True, PlotStyle -> colors[[ #]], ImageSize -> 500 ] & /@ Range[Length@parts] ] I suspect datap can be splitted in simpler way but I have blockout now in my head.
0.777778
Problem with Ticks can be solved using DataRange
Can excited electrons fall back to their ground state without the emission of photons?
In gas discharge lamps, for example, a current composed of ionized atoms excites the electrons of the atoms of the gas, and when they fall back to their ground state photons are emitted. Why is the reverse process (energy transfer of an excited electron to a free electron) never mentioned? Is it not possible or is the characteristic time involved too low for the electron to "wait" for an electron to pass? I have read about losing excitation energy as heat in chemistry oriented articles, but they don't go too deep. Here is an example.
You are wanting to know about the Auger process. The answer is yes. An excited electron can emit a photon when it falls to a lower orbital, or it can give its energy to another electron in the atom and eject it instead. The chances of this occurring are dependent on which atom, which energy transition, and to a very small extent the chemical environment.
1
Auger can emit a photon when it falls to a lower orbital .
Alternative Date/Time Libraries for Go
Are there any alternatives to Golang's time package? I can't come to grips with its clunky interface and strange way of doing things. The language overall is great, but this part of it just never clicked with me. Anyone? A really good, thorough tutorial would work too (I have not managed to find one yet) What I'm trying to do right now is a goroutine that updates only 10 times per second (or any variable interval that I set it to). I've not yet implemented it, as the package is not playing nice. Here's the psuedo code. function GoRoutine(updatesPerSecond int) { interval = 1000msec / updatesPerSecond for { if enoughTimeHasPassed { doThings() } } }
Did you read the documentation at http://golang.org/pkg/time/? You need to use a Ticker: func Loop(fps int) { t := time.NewTicker(time.Second / time.Duration(fps)) for t := range t.C { fmt.Println("tick", t) } } func main() { go Loop(60) time.Sleep(10 * time.Second) } then use it like go Loop(60).
0.777778
Ticker: func Loop(fps int)
How best can I discover what is up with my electrical bill?
This might be subjective, I don't know. However, it's a serious problem for me. My electrical bill is outrageous. It's three times as large as my next-door neighbor, and four or five times the size of my neighbor's across the street. It's worse in the summer (I live in central TX), but I've had the air conditioner inspected, and while the house is right at the maximum capacity for our unit, the unit should still be able to take care of the load. That also doesn't explain why our winter bills are larger than the comparables. What I would like to do is check the amount of current drawn by each running appliance and calculate where all my money is going. I just don't know how to go about doing this.
One thing not addressed in your question is how many kW-hrs you are using compared to your neighbors. You can't just compare on dollars. In TX with the deregulated electrical industry, you could very easily be paying 2-3 times what your neighbors are paying per kW if you haven't checked it recently. Last summer I switched companies to get from ~$0.19 to $0.092, while keeping the 100% renewable energy sources that I had before. Go to www.powertochoose.org, a site set up by the TX Utility Commission, to compare rates.
1
How many kW-hrs you are using in TX?
Wordpress and isotope filtering
Im trying to use Isotope(http://isotope.metafizzy.co/) to filter my Wordpress posts, http://i44.tinypic.com/fco55k.jpg this is how my site looks like, i would like to filter posts depending on a post category so i need to add a class name to each post and then filter it using isotope <li><a href="#" data-filter="*">show all</a></li> <li><a href="#" data-filter=".design">design</a></li> <li><a href="#" data-filter=".typo">typography</a></li> those are the names of my categories, and then i would like to add class name of a post depending on a category he is in. <div id="main"> <?php $args = array('orderby' => 'rand' ); $random = new WP_Query($args); ?> <?php if(have_posts()) : ?><?php while($random->have_posts()) : $random->the_post(); ?> <a href="<?php the_permalink() ?>"> <div id="img" class="<?php $category = get_the_category(); echo $category[0]->cat_name; ?>"> <?php the_post_thumbnail();?> <h1><?php the_title(); ?></h1> </div></a> and javascript im using <script type="text/javascript"> jQuery(window).load(function(){ jQuery('#main').isotope({ masonry: { columnWidth: 20 }, }); $('#filters a').click(function(event){ var selector = $(this).attr('data-filter'); $('#main').isotope({ filter: selector }); return false; }); }); </script>
Not sure you got Isotope and filters working yet ?? There are 2 things I think you missed the Filters need to be wrapped in a class (so that the jquery can be actioned by the click on the a links) like so: <ul id="options"> <li><a href="#" data-filter="*">show all</a></li> <li><a href="#" data-filter=".web">web</a></li> <li><a href="#" data-filter=".mobile">mobile</a></li> </ul> NB the data-filter are CaSe sensitive (so they won't work if they don't match your WordPress categories or whatever you use. The isotope jquery needs to be made safe for WordPress - to run in no-conflict mode Here's the original code from Isotope documentation // filter items when filter link is clicked $('#filters a').click(function(){ var selector = $(this).attr('data-filter'); $container.isotope({ filter: selector }); return false; }); Here's the code changed for WordPress // filter items when filter link is clicked jQuery('#options a').click(function(){ var selector = jQuery(this).attr('data-filter'); mycontainer.isotope({ filter: selector }); return false; }); NB put this in after the rest of your isotope script and note that #options is the class from your filter list in the HTML :) You can see it working at damien.co/isotope Hope that helped you?
0.666667
Isotope jquery needs to be made safe for WordPress
How to draw a double-ended arrow between the numerator and denominator in a frac inside a sqrt, and an arrow labeled by an otimes pointing to that?
Here's what I have, and I've hand drawn what I seeking: I'm after (a) a double-ended arrow with the two ends pointing to the numerator and denominator of a fraction under a square root, and (b) an arrow pointing to the double-ended arrow labeled by an \otimes. I'm typesetting old lecture notes in LaTeX and need to be as accurate as possible, so this is what I need to do. But it doesn't strike as straightforward. I tried using baseline in tikz, but it didn't come out symmetric, and I wouldn't even know where to begin with the arrow pointing to the double-ended arrow. \documentclass{article} \usepackage{amsmath} \usepackage{tikz} \begin{document} \begin{equation*} \sqrt{\frac{N}{p(1-p)}} \end{equation*} \end{document}
Here is something that should get you started on using tikzmark: Notes: This does require two runs. First one to determine the locations, and the second to do the drawing. There probably are easier ways to determine the locations. Code: \documentclass{article} \usepackage{amsmath} \usepackage{tikz} \usetikzlibrary{calc} \newcommand{\mytikzmark}[1]{\tikz[remember picture] \node[baseline, inner sep=0pt] (#1) {};} \begin{document} \begin{equation*} \sqrt{\frac{N\mytikzmark{top}}{p(1-p)\mytikzmark{bottom}}} \end{equation*} \begin{tikzpicture}[remember picture, overlay] \coordinate (Top Start) at ([yshift=0.25\baselineskip]top -| bottom); \coordinate (Bottom End) at ([yshift=0.2\baselineskip]bottom); \draw [latex-latex, red, thick] (Top Start) to[out=-5, in=5, distance=0.75cm] (Bottom End); \node (MidHeight) at (Top Start |- Bottom End) {}; \node at ([shift={(1.5cm,0.5\baselineskip)}]Bottom End) (OTIMES) {$\otimes$}; \draw [blue, -stealth, thick] (OTIMES) -- ++(-0.8cm,0); \end{tikzpicture}% \end{document}
0.5
How to use tikzmark?
God the Father's possession of a body of flesh and bones
There is a belief out there that God the Father has always possessed a body of flesh and bones. Some of the proponents of this belief don't find it contradictory to John 4:24 ("God is a Spirit") as the verse may be referring only to one part of God without limiting God to being only that one part - just like, for example, in 1 Pet 3:20 ("eight souls were saved by water") Peter called some humans "souls", but he didn't mean by that that they didn't posses bodies. The example of Jesus after His resurrection, Who, while possessing a body of flesh and bones, still retains all the qualities that are usually ascribed only to God, for example, His omnipresence, could go along with this belief. I wonder if Biblical hermeneutics, namely the hermeneutics of the Old Testament, allows for this belief. If not, please, point out those places that speak against the validity of this belief.
The OT is very clear that any static image or representation of the Divine is a very bad thing. The first two commandments are prohibitions of idolatry and the primary charge of the Prophets is against the same. To ascribe flesh and image to God would be heretical to the Jewish writers and authors of the books. As such, using a "primary sense to the primary recipient" hermeneutic would completely fail. Idolatry was so antithetical to the Jewish understanding would have made giving God any flesh or image heretical to unthinkable. That said (and I say this as a non-Mormon), the primary problem and setting in which Joseph Smith either wrote or was called in (depending on your belief), was not one in which idolatry was an issue. As such, it is difficult to apply a Jewish understanding to a Mormon prophet. Would a Jew think this silly? Sure. But then again, the idea that God would ever take on flesh even temporarily as the Messiah is equally repugnant, so as an argument there is not much to gain.
0.777778
The OT is very clear that any static image or representation of the Divine is a very bad thing . To ascribe flesh and
How many creatures should be in a draft deck?
How many creatures should the average, typical draft deck contain? Obviously this depends on a multitude of factors, including the kinds of creatures in your deck, the kinds of non-creatures you have available, and the overall composition of the block you're drafting. Nonetheless, what's a good baseline for the number of creatures in a draft deck? And how should I decide if I need to run more or fewer creatures than the baseline?
Decks usually have a number of control/defensive cards, evenly balanced between anti-creatures, anti-instants, anti-enchantments etc. I found more useful to put my attacking cards only in one category (creatures, enchantments, sorceries, etc.), so that a big part of my opponent's deck defenses becomes useless or less useful. You can see that, if you follow this phylosophy, there is no "proportionate" or "disproportionate" number of creatures, but it would be rather more interesting having significantly more or significantly less creatures than "normal". Or even no creatures at all. :-)
1
Contrôle/defensive cards are evenly balanced between anti-creatures and anti-instants .
Does 'The plot thickens' make the game easier or harder?
Just curious for games going forward. Because the expansion allows you to see how people have played on missions, can reveal people's cards, etc, it seems like these are all an advantage mostly to the resistance. In people's experience - does it make it easier for the resistance?
I would agree that it makes the game slightly easier for the resistance side, but as a comment mentions it can vary a lot depending on the play style of the group. In my experience and opinion, it makes the game more strategic and interesting. Since it provides some extra information, allows for a better focusing of the speculation and decision making processes. After discovering the expansion, I wouldn't play without it unless I'm teaching new people how to play thus making an exception for the first game.
0.777778
The expansion makes the game more strategic and interesting
why is 'child of' modifier scaling my bone?
I'm a Blender noob and I'm having so many issues with parenting bones. I'm trying to use the 'child of' modifier to parent a 'lightsaber bone' to a 'hand bone'. But when i apply the modifier, the lightsaber bone and its mesh is shrunk down to half it's size for some reason. And completely misplaced. Has anyone come across this problem before? Thanks so much in advance for any ideas.
A child of constraint is the same as parenting an object, when you move the parent the child also moves, scale the parent and the child also scales. By using the constraint instead of direct parenting you can control some of this behaviour. By turning off the scale options you can stop the lightsaber scaling with your armature. This does highlight one point though, you have an armature that is scaled, you most likely scaled the armature while in object mode to get it to fit your model. Having an armature that is scaled can cause odd behaviour like this at times so you may want to apply the scale to your armature by pressing CtrlA and choosing scale while in object mode.
0.333333
a child of constraint is the same as parenting an object
Next & Previous (Pagination in this case) Not Appearing
I am using a custom page template for my portfolio. The code is calling the correct number of posts per page but for some reason the pagination links won't show up :-S My query <?php $loop = new WP_Query(array('post_type' => 'portfolio', 'posts_per_page' => 2)); ?> <?php while ( $loop->have_posts() ) : $loop->the_post(); ?> <?php $custom = get_post_custom($post->ID); $screenshot_url = $custom["screenshot_url"][0]; $website_url = $custom["website_url"][0]; ?> The entire markup <?php /* Template Name: Portfolio */ ?> <?php get_header(); ?> <div id="full_container"> <div id="portfolio_content"> <div id="portfolio_wrap"> <div id="content"> <?php $loop = new WP_Query(array('post_type' => 'portfolio', 'posts_per_page' => 2)); ?> <?php while ( $loop->have_posts() ) : $loop->the_post(); ?> <?php $custom = get_post_custom($post->ID); $screenshot_url = $custom["screenshot_url"][0]; $website_url = $custom["website_url"][0]; ?> <a href="<?php the_permalink() ?>"> <span class="img"> <?php if ( has_post_thumbnail() ) { the_post_thumbnail( 'thmb-portfolio' ); } ?> <span class="under"> <!-- Excerpt title --> <span class="title"><?php the_title(); ?></span> <!-- Excerpt description --> <span class="desc"> <?php my_excerpt('short'); ?> </span> </span> </span> </a> <?php endwhile; ?> <!-- Next/Previous Posts --> <?php if (function_exists("pagination")) { pagination($additional_loop->max_num_pages); } ?> </div> </div> </div> </div> </div> <?php get_footer(); ?>
I don't see the variable $additional_loop being set anywhere in your code. If you're comfortable with WP-Pagenavi, install it and modify your code as follows: <?php //You need to handle the 'paged' query var for pagination! $paged = (get_query_var('paged'))?get_query_var('paged'):1; $loop = new WP_Query(array('post_type' => 'portfolio', 'posts_per_page' => 2, 'paged' => $paged)); ?> Replace the following: <!-- Next/Previous Posts --> <?php if (function_exists("pagination")) { pagination($additional_loop->max_num_pages); } ?> With: <?php if(function_exists('wp_pagenavi')) { wp_pagenavi(); } else { ?> <div class="navigation"> <div class="alignleft"><?php next_posts_link('Previous entries') ?></div> <div class="alignright"><?php previous_posts_link('Next entries') ?></div> </div> <?php } ?> Hope this helps!
0.666667
Variable $additional_loop
What preposition should be used in "Moving something __ M meters"?
I have four guesses so far: none, "on", "for", and "by".
They are all fine, also: move something over N meters.
0.888889
Move something over N meters and move something over the N meters
Counter-warding: how to know where wards are?
Pro players seem to have some sixth sense when counter-warding, but I always seem to fail. For observer wards, you can try the usual ward spots (runes/rosh/hills).... however, if your five-man push fails because the enemy saw you coming, there are a lot of possible ward spots you may have walked by. And how about countering sentry wards to protect a riki/gondar/brood?
The true answer is not to guess, but to know. Watch your minimap and your opponents' inventories constantly. In most games, it will be the enemy support heroes placing the majority if not all of the wards so you'll know where to focus your attention. If they are carrying wards you need to monitor their hero as much as possible and notice when that ward count drops by 1. When it does, you should know where they've been and where the common ward spots in that area are. If you've kept Observer Wards up yourself, you can determine exactly where they've placed it because doing so causes an animation. If you don't see this, you can usually narrow it down to one of a few spots and counterward appropriately. Most good counterwarding locations will reveal multiple frequently warded spots in an area- the reveal range of 950 is much larger than the vision range. It's also worth noting that many of the common support heroes have spells that reveal high ground (allowing you to counter wards on hills or high ground that you couldn't otherwise see). AA's slow, Dazzle's ultimate, VS's howl, and others. The other way to counterward requires a lot of experience and an expectation of high level opposition. Judging from how your opponents react to movement and gank attempts by your own team, you can tell when they've spotted someone moving between lanes and thus where they've warded. This is much more difficult and really only applicable if you're playing against competent opponents, weaker players are usally too sporadic for their reactions to be of much use. For example, I know that after a successful teamfight win in midgame by a good opposing team their supports will probably be spending the downtime placing offensive wards. With a combination of everything you've read above, I can make the chances of succesfully counterwarding worth the 100 gold chance to possibly catch a ward even if I don't know exactly where one has been placed. As for the second part of your question, you will never really deliberately counter Sentry Wards unless it's to protect your own Observer Wards since doing so requires that the area be clear of opponents and thus their Sentry wards are unlikely to be used again anyway, they only last 3 minutes. If you really want to do so because your team is relying heavily on invisibility, a Gem is preferable because it will allow you to both reveal Sentries as you move around the map and also allow you to counter Observer Wards. This is only viable if carried by a hard to kill member of your team or the invisible hero they're countering, however. You don't want to die and give the other team the gem.
0.666667
In most games, it will be the enemy support heroes placing the majority if not all of the wards so you'll know where
My.Computer.FileSystem.DeleteDirectory() with read only files?
I recently came across a problem with My.Computer.FileSystem.DeleteDirectory(). It will not delete read only files. I found out by Googling that I could delete the read only files by changing the file attributes to 'Normal'. So I wrote a recursive function, as below. Private Sub DeleteDir(ByVal dir As DirectoryInfo) For Each d In dir.GetDirectories DeleteDir(d) Next For Each f In dir.GetFiles Try f.Attributes = FileAttributes.Normal f.Delete() Catch ex As Exception Log(ex.Message) End Try Next dir.Delete(True) End Sub It seems to work fine, but it would be nice if My.Computer.FileSystem.DeleteDirectory() had another parameter to delete read only files, or there was an easier way to do this.
The short answer is there isn't a method provided in the framework. You have to develop your own. What you have written is good. I prefer the following as it make use of extension methods and more clearly describes what the method does. Imports System Imports System.IO Imports System.Runtime.CompilerServices Imports System.Linq Public Module DirectoryExtensions <Extension()> Public Sub Delete(directory As DirectoryInfo, recursive As Boolean, forceReadOnlyDelete As Boolean ) directory.ForceDelete() End Sub <Extension()> Public Sub ForceDelete(ByVal directory As DirectoryInfo) directory.RemoveReadOnlyAttributeFromFiles(True) directory.Delete(True) End Sub <Extension()> Public Sub RemoveReadOnlyAttributeFromFiles(ByVal directory As DirectoryInfo, ByVal recursive As Boolean) Dim readOnlyFiles = From f In directory.GetFiles() Where (f.Attributes And FileAttributes.ReadOnly) = FileAttributes.ReadOnly For Each file In readOnlyFiles file.Attributes = FileAttributes.Normal Next If recursive Then For Each subDirectory In directory.GetDirectories() subDirectory.RemoveReadOnlyAttributeFromFiles(True) Next End If End Sub End Module
0.777778
How to develop a framework
Can tab just mean "insert tab character"?
Is there a way to set the tab key to simply insert the tab character in a notebook? I often find the sometimes mysterious "features" bound to that key detrimental.
You can try (for a single notebook) CreateDocument[{}, NotebookEventActions -> {{"KeyDown", "\t"} :> NotebookWrite[SelectedNotebook[], "\t"]}] or (for global application) SetOptions[$FrontEnd, FrontEndEventActions -> {{"KeyDown", "\t"} :> NotebookWrite[SelectedNotebook[], "\t"]}] Does this meet your needs? For me it had an effect in Input cells but didn't block autocomplete behavior, though if that's what's getting in your way it can be disabled in Preferences.
0.888889
How to disable autocomplete behavior in Preferences
Refinance FHA 203k to conventional
I am thinking of getting a streamlined FHA 203k loan for a home. The loan is for $101,300. The best offer I could find is 4% interest, but because of required insurance fees, I would pay $630.13 a month for 360 months. In the end, I will end up paying $226,846.8. I was told that after a year I could refinance to a conventional loan with a lower rate (currently at 3.75%) and ditch the mandatory FHA mortgage insurance fee (currently $113.05). Assuming the interest would be lower than what I have now 4%, hopefully staying at 3.75%, would it be wise to refinance after a year so I can loose the $113.05 required mortgage insurance fee and hopefully lower my monthly payments or just keep the loan as it is. Since I guess the new refinance will take into account the original loan amount plus the interest. Please correct me if I am wrong. There is a $25 Hazard insurance fee in the monthly payment which I doubt I can get rid of.
There is no guarantee that interest rates will stay at their historic lows. The Federal Reserve is ending their bond buying program, so rates will likely rise. It's also possible that for any number of reasons your home may lose value in the next year, so you won't be able to sell or refinance for several years more. As with any market, you should make your decision based on the fundamental value of the deal to you personally, and you should not depend on being able to make a deal or refinance in the future. During the years that the housing bubble was inflating very few were considering what a downturn in the market would mean for them and the loans they couldn't afford.
0.777778
Federal Reserve is ending their bond buying program, so rates will likely rise .
What does chain worn indicators 75% mean?
I've bought a chain wear checker made by BBB, but not sure what the percentage of worn is about? It has 2 sides, one of them indicates that the chain is worn 75% and I should replace it in the near future. The other side shows, that the chain is 100% used and should replace it as soon as possible. My detailed question : What does these percentage mean? What is the equivalent of it in the metric system? Will 75% worn state affect my cogwheels also? Can I replace the chain to a new one without changing the drivetrain's other elements? I use a single-speed bike. Chain width is 1/8 inch. It consists 94 chain. (400km (250miles) / month)
On a non-single speed bike, rear cogs are pretty pricy, and when chain measure tool showing 1.0 it's probably already affected cogs. At 0.75 it's probably didn't affect the cogs yet. So it's preferable to change the chain before. On a single speed bike it will not greatly affect cogs. Thou it sensible when riding and you should feel the ride better with new chain. Personally, I don't use this tool, but a meter. As @kisp brought from wiki, if every 2 half-links equals 1 inch (20 half links are 10 inches), if those 2 half links become 2.56cm, it's up to change the chain. It's a bit hard to measure 2 half links, but when you take 20 it become easier. Yet, if you have a ruler with inches, it's very easy to measure 2 half links.
0.888889
When chain measure tool showing 1.0 it's probably already affected cogs .
Paradoxes without self-reference?
Most paradoxes involves self-reference, the only exception known to me is Yablo's paradox, however it is still debated if it is really without self-reference. So, I was wondering, are there other known paradoxes that works without self-reference?
A famous one was given by the Harvard logician WVO Quine (look up Quine's paradox for more information): "Yields falsehood when preceded by its quotation" yields falsehood when preceded by its quotation. When I first saw it I had to take a minute to parse what it was saying and why it wasn't self-referencing.
0.888889
"Yields falsehood when preceded by its quotation"
Can water be magnetized?
This may be a stupid question, so feel free to shoot it down. Assuming all atoms have a magnetic moment, I would assume the water molecule too would have a resultant magnetic moment; ergo, it may be possible to magnetize a body of water. Can water be magnetized?
Water is a diamagnetic material and like most other non-ferromagnetic materials it does interact with magnetic fields but with much weaker interactions than you are used to from fridge magnets and the like. However, if you crank up the field to something like hundreds of thousands of the Earth's magnetic field - about 10 Tesla will do - then you do get sizable forces that can compare with the weight of the water. Since all living beings contain a large fraction of water, this was used with considerable impact by Michael Berry and Andre Geim to levitate frogs as a demonstration of the effect that took most physicists by surprise, and which won them an Ig Nobel prize back in 2000. Pictures are nice, but the really striking thing is to watch it on video.
1
Water is a diamagnetic material and does interact with magnetic fields but with weaker interactions than from fridge magnets and the like
How to use MouseListener event
I have a main class implements MouseListener and a TimerTask inside this class.How can i run this code inside MouseEnter event .I mean when mouse over the frame Timer task will exacute specified times (I am so sory for my english ) public class NewClass extends JPanel implements MouseListener { public NewClass() { JFrame frame=new JFrame(); addMouseListener(this); Timer t=new Timer(); TimerTask task=new TimerTask() { @Override public void run() { System.out.println("heloo"); } }; t.schedule(task, 1000); } @Override public void mouseEntered(MouseEvent me) { } public static void main(String[]args){ JFrame frame=new JFrame(); frame.add(new NewClass()); frame.setSize(300,300); frame.setVisible(true); } }
Always use Swing Timer for GUI related tasks, as in javadoc mentioned: In general, we recommend using Swing timers rather than general-purpose timers for GUI-related tasks because Swing timers all share the same, pre-existing timer thread and the GUI-related task automatically executes on the event-dispatch thread. However, you might use a general-purpose timer if you don't plan on touching the GUI from the timer, or need to perform lengthy processing. After reading the tutorial you will understand what I did: import java.awt.event.*; import javax.swing.*; import java.awt.*; public class TimerDemo extends JFrame { private static final long serialVersionUID = 1L; private javax.swing.Timer timer; public TimerDemo() { super("Panel Timer Demo"); //initialing swing timer timer = new javax.swing.Timer(100, getButtonAction()); JPanel p = new JPanel (); p.addMouseListener(new MouseAdapter(){ @Override public void mouseEntered(MouseEvent ev){ timer.start(); } @Override public void mouseExited(MouseEvent ev){ timer.stop(); } }); p.setBackground(Color.blue); getContentPane().add(p,BorderLayout.CENTER); setDefaultCloseOperation(3); setLocationRelativeTo(null); pack(); } private ActionListener getButtonAction() { ActionListener action = new ActionListener() { @Override public void actionPerformed(ActionEvent e) { System.out.println("Heloo"); } }; return action; } public static void main(String... args) { javax.swing.SwingUtilities.invokeLater(new Runnable() { @Override public void run() { new TimerDemo().setVisible(true); } }); } }
0.833333
Swing Timer for GUI-related tasks
How did they start sending messages to other's phone?
When the anime starts and until episode 8, they attached a cell-phone to the phone-microwave and sent a message to that specific phone to trigger sending D-Mails. But in episode 8 Ruka sent a D-Mail to her mother pager and then in episode 9 Faris sent a D-Mail to (probably) herself So I'm wondering if there is a plot whole somewhere in the story, or did they figure out a way to send D-Mails from any phone to any phone? As a side question previously it was mentioned that how they can set D-Mail's time of Arrival: each second on Phone-Microwave meant an hour going back, so I'm wondering how did they manage to set microwave time to 87600 (10 years)?
You just send the message from one phone/pager to another one. All you need is the microwave running and a running CRT (Cathode Ray Tube), plus the phone number of the receiver. You configure the microwave, turn it on and wait for the message to be sent. Earlier in the story, they needed to connect the phone with the microwave, to determine, which message should be affected by time-travel. However, Daru wrote a program, with which you could set the number and various different things, so it was possible to send these D-Mails without the need of connecting the phone to the microwave. Regarding your time-question: Daru applied many modifications to the microwave, so you could set any running-time. The microwave won't run the whole 24 hours, it just needs to be set to that time.
0.888889
Sending a message from one phone/pager to another
Red flags of unpaid IT internship
I read the following question: Tips for a first year CS student looking for a summer internship to gain experience? But rather than how to get and/or look for internships, my questions concerns of how to filter companies looking for free labor to do their website VS companies that might not offer a paid check, but it will offer you mentorship and skills. I have a cousin that is a college freshman and she is looking for Sofware development internships, but at this point, she is desperately looking for any internship that is IT related. Besides the big software names and elite small software shops, How do you recognize a good internships in non-it-companies(large or small) doing IT maintenance vs the bad ones? If you don't have work experience, what questions a college student should ask to prevent ripoff? Are there any red flags that you can spot before accepting an offer?
Fair warning - in my opinion, her biggest detriment is years of college experience. While it's quite true that you can be a great programmer and be a college freshman - big companies with established internship programs that offer the kind of things you are speaking of typically have a set of hardened criteria for reviewing applicants. One of them is years of college experience and most companies don't readily accept interns that are freshman - the earliest is usually after Sophomore year. This is partially because interns - even if they are free - are an investment. They need computers, space to work, and the time of a senior person to supervise them. The cost of this has to be weighed against the value the intern will bring to the team. IMO - most interns are a good deal, but you can't take everyone so a company has to find some set of criteria. So, knowing your cousin is a freshman tells me that if she wants a technical internship, she's already going to have to get creative - it's time to start using every under-the-wire resource and personal connection. You'll want to maximize your contact with people who will see working with her as a plus - and that's a heck of a lot easier with people who know your cousin. The other venue that is ALWAYS worth maximizing is her college's internship system. Most colleges have internal internship job boards where the college and the internship providers have worked together to build a set of opportunities for students. In these cases, the companies realize that they need to give interns a good opportunity. I'm assuming that at this point, though, your cousin has tried everything and she's really scrounging - going to just about every job board and trying just about every opportunity. Assuming she gets an interview, she'll want to remember that interviewing is as much about checking out the company as it is about showing potential. Here's some things I'd look for when going on an internship interview (now that I'm well past my intern years and I know from the other side exactly what a manager can do with an intern!). I'm keeping it broad as IT is a heck of a lot more than just software work! What will I be working on? - good signs are work that involve either making things work or verifying that they are working. Bad signs are doing paperwork while other people make things work. Having to service customer problems (front line tech support) isn't all bad, it may all she can snag, but if that's the case, she should be getting paid. Who will I be working for? - preferably it's someone on the interview list or someone on the interview list is "sample manager" - ie a manager who needs interns, but the company may assign the candidate to a similar but different manager in the end - it's just that managers have to handle pools of interviews and often matchmaking is done later on. Ask this manager what they expect from an intern and what they are willing to give. Good signs are "I expect you to take responsibility", "I expect you to ask lots of questions", "I expect you'll keep me appraised of your status", "I expect that by the end of the internship you'll be able to take on a 3-4 week chunk of work and work with minimal assistance". Bad signs are - "you'll follow me around and do exactly what I tell you", or "I won't have time to give much guidance, and I don't have anyone that can help, we'll have to figure it out as we go". How big is the technical team? - hopefully it's a team of 5-10 people with varying degrees of expertise, with at least a few senior people. Also - how much time will the senior people have to spare to answer questions? Good = 15 minutes a day, with a known rampup of longer than that early on. Bad = "what senior people?" or "it's just you". What are the major goals of the team? What are the key ingredients to success on this project? - this is my particular way (when I do volunteer work) of figuring out whether I've found people I can work with. If it takes 20 minutes to answer this question, we have a failure. Even if I am working alone, with a non-technical person, I may learn a lot of good stuff. But that requires that the people I'm working with have a real clue of what they want to get done. It's amazing how many people really don't know what the problem they are trying to solve is, or what qualifies as a solution. Without that core vision, no matter how technical the team is, it's likely that the internship will be frustrating. All that said - seriously - don't feel awful if an internship doesn't happen in the summer of Freshman year. I had pretty great grades, 3 languages under my belt and a programmer mother and I STILL didn't swing an internship my Freshman summer. I used my touch typing skills to qualify as a Temp and worked answering phones, typing and filing microfiche (boy am I old!) my Freshman summer... at least I got to hang out in A.C.!
1
What are the major goals of a technical internship?
Plotting two functions with dependent input function
I have defined a function: myJ2[n_] := 1/n* Total[RandomVariate[NormalDistribution[0, 1], n]^2] This is basically an approximation to the gaussian integral. I want to plot this and the error graph (difference between the approximation and the exact value) at the same time. Using a random variable makes this difficult. I tried this: DiscretePlot[{myJ2[n], 1 - myJ2[n]}, {n, 1, 1000}, Filling -> None, Joined -> True] However, this is not quite correct, since the myJ2 function is called twice and hence gives different values due to the randomness. I improved this by using: DiscretePlot[{x, 1 - x} /. x -> myJ2[n], {n, 1, 1000}, Filling -> None, Joined -> True, PlotStyle -> {Red, Blue}] This gives me the correct values but both in the same color. How can I get both the function and the error function displayed in two graphs or with two different colors? Thanks Charly
As I noted in an answer to another recent question, there are several different ways to generate a list that depends on an iterator index, including Table and Array. In this particular case, I think Array is more succinct. (On my machine, there seems to be a very slight speed advantage over Table, as well, but it is too small to care about for this particular problem. data = Array[myJ2, {1000}]; It is worth knowing that arithmetic operations are Listable, so you can just write 1-data to get the second series. This is almost always the fastest (and most succinct code) to get things done, as it avoids all the loop, iterator and Map paraphernalia. You also don't need to transpose anything. Notice I have used ListLinePlot instead of ListPlot, which removes the need to specify the Joined option. ListLinePlot[{data, 1 - data}]
0.888889
How to generate a list that depends on an iterator index?
What is the difference between unicast, anycast, broadcast and multicast traffic?
I have never had the privilege of working in an environment that required complicated routing or if it did require it, it was handled upstream of me. I've always used very simple static routing configurations and never needed to do any multipath routing -- hence my general confusion regarding this subject. I would like to understand multicasting and anycasting better. What is the difference between unicast, anycast, broadcast and multicast traffic? What situations are they generally used in and why (e.g., what applications use which method)? How do you calculate how much broadcast traffic is too much for a given network segment or broadcast domain? What are the security implications of allowing broadcast and multicast traffic?
Here's some basic info: Unicast: Unicast traffic is traffic that is meant for a single host. All other hosts will ignore unicast traffic not meant for themselves. In a switched environment, unicast traffic is generally not "heard" by any hosts other than the host that the traffic is intended for. In an environment that uses hubs (shudder) all hosts will "hear" unicast traffic meant for every other host, but they'll ignore all traffic not intended for themselves. Broadcast: Broadcast traffic is traffic that is sent with the intent of being "heard" by all hosts on a particular network segment. Examples of broadcast traffic would be an ARP request, which is a broadcast at the physical layer (MAC address FF-FF-FF-FF-FF-FF) or a NetBIOS name query, which is a broadcast at the network layer (whatever happens to be the broadcast address for that particular network, such as 64.28.42.63 for the network 64.28.42.0/26). Multicast: Multicast traffic is traffic that is sent with the intent of being "heard" by a particular group of hosts on a network segment. Some multicast traffic can be considered broadcast traffic, such as traffic to the multicast address 224.0.0.1, which is multicast traffic meant for all hosts on the same network segment. Another example of multicast traffic would be traffic sent to the multicast address 224.0.0.9 which is what RIP routers use to send routing information to other RIP routers on the same network segment. I'll leave Anycast to someone else as I really don't know that much about it.
0.888889
Unicast: Unicast traffic is meant for a single host .
Equivalent Key Signatures
I've noticed that a variety of pieces in the classical repetoire (certainly at least the piano repetoire), label what seems to be effectively the same key signature differently. That is, I am not aware of any differences in terms of key between a piece in "G Sharp major" and "A flat major" (or their equivalent minors). Is there any reason that sometimes a sharped key signature is used while at other times the equivalent flatted key signature is used? As a related point, I have undoubtedly noticed the preference of certain "equivalent" key signatures over others. For example, one encounters "E flat" significantly more than "D sharp" and likewise "C sharp" significantly more than "D flat". Is there any particular reason for this, or is it simply a convention that has been handed down to use through musical history?
This is a great question that is subtlely different from the usual "what is the difference between A♭ and G♯?" Apart from frequency differences in non-12-et tunings, that question relates to the function of the note within the chord/scale/key. But if we're talking about choice of key, then there are other factors at work. Obviously in non-12-et tunings, the choice of A♭ major vs G♯ major does have to do with how it will sound. But let's assume 12-et for the rest of this answer. There are three general factors that, I would have thought (but see below about Bach), led a composer in the common practice era to choose one key over another enharmonic one: avoid double sharps and double flats in the key signature itself reduce double sharps and double flats in the keys to be modulated to reduce double sharps and double flats in the keys used by transposed instruments As others have mentioned, the Well-Tempered Clavier is interesting here. The point of the piece was to demonstrate the 12-major and 12-minor keys on an instrument where enharmonic notes have the same frequency. So frequency-wise there really can only be 12 major keys. But from a naming point of view (assuming you wouldn't be as crazy as to have double sharps or double flats in your tonic) you have 21 possible key names for each of major and minor. How would one go about choosing which 12 key names out of 21 to use? First step might be to avoid double sharps and double flats in the key signature itself. Note that the result is different between major and minor keys (as WTC demonstrates). That reduces your choice from 21 to 15 (so G♯ D♯ A♯ E♯ B♯ F♭ majors are out) Then it likely just comes down to what you're going to modulate too. If you are going to modulate to V, you might want to avoid having to introduce the double-sharp to do so (which means C♯ major is out). If you are going to modulate to V of V, then F♯ might be out too). All that said, it makes it particular interesting that WTC does use C♯ major and F♯ major and instead eschews D♭ G♭ C♭ to get from 15 possibilities to 12. The C♯ major prelude and fugue does indeed need a double-sharp in modulated passages, even though the note is diatonic. In the case of ensemble pieces with transposing instruments: imagine a clarinet part in concert C♯ major :-)
1
What is the difference between A and G?
Changing package names before building in Bamboo
I recently discovered that BlackBerry treats all classes with the same fully-qualified name as identical--regardless of whether they are in entirely different apps or not--causing apps that use different versions of our shared libraries to break when they are installed on the same phone. To solve this problem, we are planning on changing the package names to include a version number, then building. Can someone explain how, using Bamboo, I can insert a step in our build process that: changes certain packages names replaces all code references to the old package name with references to the new package name?
I'm not familiar with Bamboo and you did not include much information about your build system. If you are using maven, you could use the shade plugin: This plugin provides the capability to package the artifact in an uber-jar, including its dependencies and to shade - i.e. rename - the packages of some of the dependencies. The second example here shows how to configure package renaming. The resulting jar file would then have to be processed by rapc as in Chris Lerchers comment to his answer. It should be possible to also integrate this in a maven build using the exec plugin.
0.888889
Shade plugin for maven build system
Should users be forced to go through a walkthrough?
We've found that our users have almost universally benefited from actually going through our walkthrough. Obviously, we have some more ux work to do on our service. But, based on this information, we decided to force users through the short walkthrough in the interim. Somewhat unsurprisingly, people have protested a bit :) So, what do you think, is it ok to force users through a brief walkthrough when you know it will benefit them in the end? Edit We are going to add some mixpanel hooks to find out if users are leaving when presented with a walkthrough they can't exit out of.
Force users to start an optional walkthrough. To me, it seems most important to give users the option to opt out of the walkthrough. Some little no thanks button to exit the walkthrough should suffice. The users that are annoyed by the walkthrough are most often those, that know the service and feel like they will not profit from it - so the percentage of "helpless" users actually going through the walkthrough and profiting from it will remain high, while the negative feedback from "versed" users already somewhat familiar with your product will go down as they can opt out. Additionally, I think @MJJ has a point in his answer saying that eventually it also comes down to decreasing the need for a walkthrough that your users will profit from the most. Furthermore, @yisela's answer also gives an example of how a less intrusive walkthrough with just little tooltips can also improve the tutorial acceptance.
1
How to opt out of a walkthrough?
Native Exchange Email app does not synchronize folders properly
Recently I created/removed some folders on Outlook desktop app. When I synchronized my corporate account by manually refreshing under the folders screen, it didn't bring the new folders, nor removed the removed ones. Is this a known bug? I have a Motorola Milestone, and I remember in the past, at least the folder addition worked.
I know you were going for the "onboard" solution for Exchange e-mail, but at my workplace a bunch of folks use Touchdown: http://www.appbrain.com/app/exchange-by-touchdown-key/com.nitrodesk.touchdownpro Only problem is that is is $19.99. It works well with ActiveSync policies and doesn't force you to encrypt your whole device if your SysAdmin has required as such.
0.888889
Touchdown is the "onboard" solution for Exchange e-mail
Disk became full, had to force shutdown, now it doesn't boot
Don't know why I didn't get a warning about disk being almost full... It came down to zero free space and I couldn't do anything except force-shutdown it. I booted into Windows, deleted some files from OSX drive, but now on boot there is a progress bar every time and when it reaches the end (in 15 min), the computer shuts down. I went into the recovery mode and tried to repair the disk, but it says "The Disk Utility cannot repair the drive... backup files and reinstall the OS" -- something like that. I have a time machine backup but I'm currently not at home - going home in 3 weeks. Is it "normal" that system gets borked like this because of full disk + force shutdown? Seems too fragile to me. I have Mavericks 10.9.4 on this system. Is there anything I can do?
I used Disk Warrior and it fixed the problem.
0.888889
Disk Warrior
What order do multiclass characters spend Hit Dice at the end of a short rest?
This is a followup question to "What Hit Dice do multiclass characters spend at the end of a short rest?". Under the rules for Short Rest (PHB 186): A character can spend one or more Hit Dice at the end of a short rest, up to the characters maximum number of Hit Dice, which is equal to the character's level. For each Hit Die spent in this way, the player rolls the die and adds the characters Constitution modifier to it. The character regains hit points equal to the total. I have a multiclass character - level 1 Monk (d8 Hit Die), levels 2 - 4 Wizard (d6 Hit Die). At the end of a short rest I can spend up to 1d8 and 3d6 Hit Dice to regain hit points. Can I spend the dice from my pool in any order? Or do I have to spend them in the order that I got my class levels - so always a d8 first, then the d4's?
Generally, for things like this, if the book doesn't give you a suggested for enforced order, you can do it in any order. There is no rule that you have to use your 1st level HD die first, and your 2nd level hit point die second. There is no game balancing, or narrative reason to use one hit die over the other, it's all going to depend on what sort of wounds you have at the time.
1
Use your 1st level HD die first, and your 2nd level hit point die second
2-D Wavelet output changing when using 'figure' command in Matlab
I am having trouble understanding what is causing the problem to my Wavelet output when i am trying to display the image with the figure command. I want to display both the Original image and its Wavelets decomposition, but when I'm using this code the original image is not displaying in a separate figure. Here is my code, im = imread('cameraman.tif'); imshow(im),title('Original Image') [cA1,cH1,cV1,cD1] = dwt2(im,'bior3.7'); A1 = upcoef2('a',cA1,'bior3.7',1); H1 = upcoef2('h',cH1,'bior3.7',1); V1 = upcoef2('v',cV1,'bior3.7',1); D1 = upcoef2('d',cD1,'bior3.7',1); % To display the results of the level 1 decomposition, type: subplot(2,2,1); image(wcodemat(A1,192)); title('Approximation A1') subplot(2,2,2); image(wcodemat(H1,192)); title('Horizontal Detail H1') subplot(2,2,3); image(wcodemat(V1,192)); title('Vertical Detail V1') subplot(2,2,4); image(wcodemat(D1,192)); title('Diagonal Detail D1') and the output of this code is just one figure with four plots (Digonal, Horizontal, Vertical details and Approximations) but when I'm using figure command to display the original image in a separate figure, im = imread('cameraman.tif'); imshow(im),title('Original Image') figure it messes up the wavelet output, Why does it happens that my output is changed to blue and red color ?
The reasoning is simple. MATLAB defaults to a 'jetblue' colormap when you use imshow(im). Typically you need to specify the colormap being used when you use imshow. For this, add another command like: $$colormap(gray(256));$$ to your current script.
1
MATLAB defaults to 'jetblue' colormap when using imshow(im)