summary
stringlengths
15
147
text
stringlengths
1
19.3k
answer
stringlengths
32
22.6k
labels
float64
0.33
1
answer_summary
stringlengths
5
164
Finding out how host names are resolved
I'm working on a network analysis tool (academic research), and I would like to find out what DNS is used on the machine the software is running on. I'm not a network admin, and I'm wondering: what's the easiest way to find that out; across platforms (that is, on each Linux, Mac and Windows), and preferably using something that's accessible in Python? Usually, systems seem to conveniently hide this stuff from the user -- I can set a fixed DNS, or I can use my router's settings via DHCP, or ... I'm sure there are other systems too (LDAP?). So just looking at resolv.conf may not always lead to the right answer -- or does it? Many thanks!
If you're on Linux, resolv.conf does cut it. Just for DNS, though. The other methods of resolving hosts are not associated with DNS. Check out your system's nsswitch.conf for more information. FYI, auto-DHCP config works by automatically editing resolv.conf. As for OS X, I don't use em enough. I believe that sort of thing gets stored in some binary databases which replace the local files but really don't know. For Windows, I believe a netsh interface ip show dns does what you want. Windows also uses name resolution mechanisms other than DNS: network broadcasts are especially annoying.
1
resolv.conf doesn't cut DNS
Add authors as footnote in lncs
please, I was asked to modify the .tex file of a manuscript. The problem is that I want to add "supervised by ..." as a footnote and when use \footnote{supervised by ...} in \author{} it does not work. I use a Latex lncs format. Thank you!
You might want to \protect the \footnote command. This one worked for me: \documentclass{llncs} \begin{document} \title{LaTeX Template for Your LNCS Paper} \author{Author 1\protect\footnote{Supervised by Author 9}, Author 2} \institute{Lab, University, Address} \maketitle \begin{abstract} Abstract is here. \end{abstract} \section{Introduction}\label{sec:Introduction} The rest goes here. \end{document}
0.888889
protect the footnote command
Recover Server 2008 R2 Domain Admin Password
So I did the ultimate silly thing: I lost my domain admin password for my Server 2008 R2 box. Sure, I could just re-install but that's going to be a huge pain. I tried rebooting with the Windows Install DVD and replacing utilman.exe with cmd.exe, but switching to C: displayed no files. I can still log into the machine as a regular user, though. And I see there's been some local privilege escalation vulnerabilities patched in the last couple months (specifically MS13-046 looks promising). And it's been a little while since I've logged in to apply MSFT patches (which oddly enough was what I was trying to log in to do). Are there any publicly available exploits for these bugs? I don't see any in Metasploit. Or is there just a better way altogether? I full physical access to the machine, but I think BitLocker is enabled (which is why I think replacing utilman.exe failed).
If you've got a local account but not a domain admin, IIRC you could try metasploit with the psexec payload to put meterpreter down on the server and then use the getsystem command to try and get admin on the box. EDIT Per @void_in this won't work with W2K8 and UAC, to you'd need to use an exploit to elevate privileges, e.g. the MS12-042 one linked in comments if that's succcessful you can dump the domain password hashes and try and crack them (this will be easier if you can remember anything about the password like length or character set that you did/did not include). What I'm not sure about, but which might work is, if you can use getsystem on the domain controller whether you can then use meterpreters add user commands to add a new domain admin, may be worth a try :)
0.888889
meterpreters add user commands to get admin on the server
Why is the last line of text separated in MS Visio shapes
In the image below, you can see two rectangles with some text inside. If you take a closer look you will notice a difference in spacing between lines. The spacing between the first and the second lines is smaller than the spacing between the second and the third. The last line is always separated. If you have 10 lines of text, the spacing between all the lines will be OK except the spacing between the next to last and the last line of text. The font is the same (in every aspect) accross the lines (except the title), and there are no custom paragraph properties set. Why does this happen and how to solve this?
The last line is separated because their is a blank character at the end of the bottom line that is the default font size. Highlight any blank spaces at the end of the bottom line and then change the font size to match the others and it will go away.
1
The last line is separated because of a blank character at the end of the bottom line that is the default font size
How do I ward properly in DotA 2?
I finally got my DotA 2 Beta invite. Now to learn the game I read it's a good start to play support heros (like I already loved to do in League of Legends). Even though I'm still pretty new to the game I suspect it's mostly the supports job to buy and set up wards. I am therefore interested in learning how to ward effectively. What are good/important spots for wards? How do I time wards? When should I leave the lane? And if there there different types of wards like in LoL: when to use which one?
The linked guide that Arremer posted here is absolutely awesome, but it's probably a bit much for a very new player. When I teach new players I gave them 8 good ward spots to use- some more basic than others. I've circled them on the image linked: First, there are the two obvious ward spots near the runes. These are your default spots, and they're thus the most likely to be counterwarded. You should use others if you start getting counterwarded. Next, there are the wards which block the pull camps. Blocking these should be done almost automatically in every game with the first set of wards bought. These are the circled spots in the image with the pink lines coming from them, which indicate the blocked camp. They can be a bit tricky to place, so try it out in a practice game. Finally, there are 4 offensive ward spots. These are more situational in their use, but they're also the most important to allow you to take advantage of your team being ahead. If you don't ward offensively when you have a lead, you're inviting the other team back into the game. The yellow spots are the most well known, but the other two spots are nearly as good. There is so much to warding that it's something you'll improve at for a very long time. For a complete new player, these are where I'd suggest starting. So an overview: with your 2 wards at the start place one that's able to see a rune location, and one to block the pull camp. Try to do this right around 0:00, but not before, so that your mid hero is able to see where the 6:00 rune spawns. (Observer Wards last 6 minutes). This is pretty important. From there, keep wards up in the middle and maybe place aggressive wards if you know you can do so safely. Mostly you're concerned with keeping an eye on gank attempts and Roshan in the midgame. After you take T2 towers with your team, worry about getting offensive wards placed after you win teamfights. This will let you secure the game. Good support players are way more influential in Dota2 than they are in LoL, but it's still the same thankless role and much harder to accomplish. I suggest you read my reply here too to know how to understand counterwarding, which is done with blue Sentry Wards (they last 3 minutes). Good luck, any questions feel free to reply.
0.777778
wards are the most likely to be counterwarded .
Serial connection between Raspberry Pi and Roomba
I have a Raspberry Pi with this FTDI cable and a Roomba 560. The Roomba has an SCI port to allow for control of the roomba via serial. I installed the PySerial library on the pi and send valid commands to Roomba, but the roomba doesn't respond. I have the TXD of the cable attached to the TXD of the roomba, the RXD on the cable wired to the RXD on the roomba, and a ground on the cable wired to the ground on the roomba (everything in it's respective port). I do not have power going from the cable to the roomba or vice-versa. What I can't figure out is why the commands aren't working. There's no error message upon running the python code. This is the information sheet for the Roomba's SCI port. Code: import serial ser = serial.Serial('/dev/ttyUSB0') # this is the defualt Roomba baud rate ser.baudrate = 57600 # Start SCI - puts into safe mode ser.write(chr(128)) # Enable full mode ser.write(chr(131)) # Spot clean ser.write(chr(134)) print 'Done'
The .pdf spec for the SCI port is either outdated or incorrect, the 5XX series uses port 115200, that's why it wasn't working.
1
.pdf spec for the SCI port
Change Product Quantity Without Edit on Magento
I have a question here, how to change product stock without click "Edit" on Magento ? Thanks Before
There are third party modules for that. Take a look at http://www.magentocommerce.com/magento-connect/catalogsearch/result/?q=grid+edit&pl=0
0.666667
Third party modules for third party modules
Choosing variables for Discriminant Analysis
I've 110 variables & 200 data points. Of this 110 variables, one is group variable (say "brown eye","blue eye"). I want to use discriminant analysis to classify the groups based on remaining 119 variables. Since the variables are large, to get a meaningful result I need to reduce the number of variables. So, the are 3 options to me: 1) Stepwise Discriminant Analysis: I don't want to use this method as I'm biased towards it. 2) Classification Tree Method: This method will give an idea about which variables affecting the eye color. Since the dataset is small, I'm apprehensive of using this method. 3) Principal Component Method: This method I can use. But I prefer to keep the original variables. My question is can anybody please suggest me some other method to select variables for discriminant analysis.
You can get rid of some by looking for pairs that are very highly correlated and randomly deleting one of the pair. Then you can look at partial least squares, and pick variables that are important in the PLS solution. I did this with a similar problem and it worked pretty well (that is, the resulting discriminant function did pretty well)
1
Discriminant function in PLS solution
Given Ohm's law, how can current increase if voltage increases, given fixed resistance?
According to Ohm's law, V=IR (voltage equals current times resistance). So if the voltage increases, then the current increases provided that the resistance remains constant. I know that Voltage or potential difference means work done per unit positive charge in bringing that charge from one point to another. So according to Ohm's law, if the work done per unit charge increases then current will increase. How can this be true? Point out my mistakes.
It is better to think of Ohm's Law as I=V/R. What it is telling you is that if you apply a voltage (V) to a resistive material (characterised by R), then that voltage is capable of driving a current I. The material could be anything, a piece of copper, or the plasma in a star. The voltage is constantly supplying energy to the electrons in the material, but the resistivity is constantly taking that energy back out (converting it to thermal energy). The higher the voltage, the more energy you can give to the electrons and hence the higher the current. On the other hand, the higher the resistance, the more energy is taken away from the electron flow and hence the lower the current.
1
The voltage (V) is constantly supplying energy to electrons in the material
How to correctly format multiline html using the .after function jQuery?
I am trying to add some html after a specific h1 tag. The line of html is long and I would like to break it down to multiple lines within the .after function. Below is the code: $(document).ready(function() { $('#content-main-cell h1').addClass('index-title'); $('.index-title').after('<div class="mds-logo"><img src="http://marines.mil/unit/marforres/4thMarDiv/23rdMar/1stBn/img/battalion-logo.jpg"/></div>'); }); How do I break this down into multiple lines within the code and have it work ? Do I use a ; at the end of each line ?
You can continue a string literal on a subsequent line with a backslash: $(document).ready(function() { $('#content-main-cell h1').addClass('index-title'); $('.index-title').after( '<div class="mds-logo">\ <img src="http://marines.mil/unit/marforres/4thMarDiv/23rdMar/1stBn/img/battalion-logo.jpg"/></div>' ); }); This is defined by Section 7.8.4 ("String Literals") of the spec. I don't know that I'd trust all parsers to get it right, not least because it was just introduced in the 5th edition specification, but it appears that the spec was codifying previous standard practice as even IE6 understands it. (As do — in my tests — IE7, IE9, Chrome, Firefox, Opera, and Safari.) Of course the whitespace at the beginning of the next line is part of the string, which probably isn't what you want. Alternately, just use string concatenation: $(document).ready(function() { $('#content-main-cell h1').addClass('index-title'); $('.index-title').after( '<div class="mds-logo">' + '<img src="http://marines.mil/unit/marforres/4thMarDiv/23rdMar/1stBn/img/battalion-logo.jpg"/></div>' ); }); You're not in a tight loop, so even if the parser doesn't concatenate on the fly (and a good one will), having the concat operation occur when you call after won't do any real harm.
1
String literal on subsequent line with backslash
Interacting with openCPU
I've stumbled across an awesome open source project called openCPU.org and I'm tremendously excited about the project. As a research scientist trying to create a website hosting my work, I would love nothing more than to be able to run R on the cloud to have my scripts run in real time and show up on my webpages. So a big time thanks to Jeroen for making this project happen. With that, onto my question. How the heck do I interact with openCPU? I can put an example function into "run some code" at: http://public.opencpu.org/userapps/opencpu/opencpu.demo/runcode/ And retrieve a PNG image of my code, which is great! But how do I do that in my own webpage, or via a URL? I can get the object of my original code upload from this page, something like: "x3ce3bf3e33" If it is a function similar to: myfun <-function(){ x = seq(1,6.28) y = cos(x) p = plot(x,y) print(p) # also tried return(p) } Shouldn't I be able to call it via: http://public.opencpu.org/R/tmp/x3ce3bf3e33/png What about with input variables? e.g.: myfun <-function(foo){ x = seq(1,foo) y = cos(x) p = plot(x,y) print(p) } I feel that perhaps there is something I am missing. How do I specify "GET" or "POST" with the url? EDIT Ok in response to @Jeroen below, I need to use to use POST and GET with the API. Now my question is extend to the following issue of getting PHP to interact with it correctly. Say I have the code: <?php $foo = 'bar'; $options = array( 'method' => 'POST', 'foo' => $foo, ); $url = "http://public.opencpu.org/R/tmp/x0188b9b9ce/save"; $result = drupal_http_request($url,$options); // drupal function ?> How do I then access what is passed back in $result? I am looking to get a graph. It looks like this: { "object" : null, "graphs" : [ "x2acba9501a" ], "files" : {} } The next step will be to GET the image, something along the lines of: $newurl = "http://public.opencpu.org/R/tmp/".$result["graph"]."/png"; $image = drupal_http_request($newurl); echo $image; But I don't know how to access the individual elements of $result? EDIT #2 Ok guys, I've gotten this to work, thanks to the answer below and to multiple other help sessions, and a lot of smashing my head against the monitor. Here we go, done with cURL <?php $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, 'http://public.opencpu.org/R/tmp/x0188b9b9ce/save'); curl_setopt($ch, CURLOPT_POST, 1); // Method is "POST" curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); // Returns the curl_exec string, rather than just Logical value $result = curl_exec($ch); curl_close($ch); $new = json_decode($result,true); // $result is in 'json' format, decode it $get = $new['graphs'][0]; // the 'hashkey for the image, "x2acba9501a" above $img = 'http://public.opencpu.org/R/tmp/'.$get.'/png'; // link to the png image echo <<<END // use this to display an image from the url <a href="$img"> <img src="$img"> </a> END ?>
Here is a complete example webpage I mocked up to use OpenCPU to demo a particular analysis using a R package I wrote (MARSS). I was monkeying with providing easy access to particular analyses--a live user guide so to speak. Caveat, my example relies heavily on JavaScript and I've no experience with JavaScript beyond this example; so the coding is clunky but it works for my purposes. Copy and paste the html into a file and open in a browser and it should work. <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <style> html, body { background: #6699FF; text-align: center; font-family : "Lucida Sans Unicode", "Lucida Grande", sans-serif; font-size:14px; } #container { background: #FFF; border: 0px #222 solid; margin: 0 auto; text-align: left; width: 10.25in; padding: 5px; overflow: auto; } #container form { margin: 0 auto; } label { float: left; width: 50px; } .leftCol { float: left; width: 3in; } .rightCol { float: left; width: 7in; } .references { font-size: x-small; text-indent: 20px; } </style> <base target="_blank" /> <title>Count-based population viability analysis (PVA) using corrupted data</title> <script type="text/javascript" src="http://code.jquery.com/jquery-latest.js"> </script> <script> baseurl="http://public.opencpu.org" // This is done on load since we need the function on the server to deal with the file upload function saveRFunction(){ //Run this bit of code and store the R function to run on OpenCPU var baseurl = "http://public.opencpu.org"; var url = "http://public.opencpu.org/R/pub/base/identity/save"; // #txtRCommands is the id of the text box in the javascript var rFunction = $("#RFunction").val(); // this bit sends the the RFunction in the hidden text area $.post(url,{ x: rFunction }, function (data) { var funloc = $.parseJSON(data).object; funloc = "http://public.opencpu.org/R/tmp/"+funloc; //set the action for the form document.getElementById('FunctionLocation').value = funloc; } ); setTimeout(function() { // Wait 2 seconds because of Chrome before loading default form var frm = document.getElementById("inputForm2"); subm2(frm,'/svg'); }, 1000); }; //function for first submit button; subm and subm2 same except the id function subm(f,ftype){ document.getElementById("inputForm").action=document.getElementById('FunctionLocation').value+ftype; f.submit(); } function subm2(f,ftype){ document.getElementById("inputForm2").action=document.getElementById('FunctionLocation').value+ftype; f.submit(); } </script> </head> <body onload="saveRFunction()"> <div id="container"> <h2>MARSS Case Study 1: Count-based PVA for data with observation error</h2> This web tool fits a count-based PVA model (sensu Dennis et al. 1991) from a univariate (one site) time series of abundance data with observation error (Holmes 2001, 2004). The result is an estimated long-term rate of population growth (λ), process variance estimate (σ<sup>2</sup>) and non-process or observation error variance. Extinction risk metrics sensu Dennis et al. (1991) along with an uncertainty plot sensu Ellner and Holmes (2008) are shown. </br></br> <div class="leftCol"> <form enctype="multipart/form-data" action="" method="POST" target="test" id="inputForm"> <fieldset> <legend><b>Upload a Dataset</b></legend> <i>Comma-delimited. 1st col time, 2nd col counts. Missing counts NA.</i></br> File: <input name="!file:file" type="file" /> <!-- param name has to be file --> Header: <select name="header"><option value=TRUE> TRUE </option> <option value=FALSE> FALSE </option> </select> </br /> <input name="!width" type="hidden" value=7 /> <!-- in inches --> <input name="!height" type="hidden" value=6 /> <!-- in inches --> <INPUT type="button" name="Submit" value="Run Analysis" onclick="subm(this.form,'/svg');"> <!-- svg so Firefox doesn't cache --> <INPUT type="button" name="Submit" value="Get PDF of Plot" onclick="subm(this.form,'/pdf');"> </fieldset> </form> <form action="" method="POST" target="test" id="inputForm2"> <fieldset> <legend><b>Select an Example Dataset</b></legend> Dataset: <select name="dataname"> <option value='"wilddogs"' selected >African Wilddogs</option> <option value='"prairiechicken"'>Prairie Chickens</option> <option value='"grouse"'>Sage Grouse</option> <option value='"graywhales"'>Gray Whales</option> </select></br /> <input name="!width" type="hidden" value=7 /> <!-- in inches --> <input name="!height" type="hidden" value=6 /> <!-- in inches --> <INPUT type="button" name="Submit" value="Run Analysis" onclick="subm2(this.form,'/svg');"> <INPUT type="button" name="Submit" value="Get PDF of Plot" onclick="subm2(this.form,'/pdf');"> </fieldset> </form> <fieldset class="references"> <legend><b>References</b></legend> <p>Dennis, Brian, Patricia L. Munholland, and J. Michael Scott. "Estimation of growth and extinction parameters for endangered species." Ecological monographs 61.2 (1991): 115-143.</p> <p>Holmes, E. E. 2001. Estimating risks in declining populations with poor data. Proceedings of the National Academy of Science 98: 5072-5077.</p> </fieldset> <fieldset class="references"> <legend><b>R Code</b></legend> <!-- if you do not want to see the R code, use this <textarea hidden="hidden" id="RFunction" style="display:none;"> --> <textarea id="RFunction" readonly="readonly" cols="27" rows="18" style="border:0px;margin:0px"> function(file=NULL, header=TRUE, dataname="wilddogs" ){ library(MARSS) if(is.null(file)){ dat=get(dataname) }else{ dat=read.csv(file, header=header) dat=as.matrix(dat) } CSEGriskfigure(dat, silent=TRUE) } </textarea> </fieldset> <input type="hidden" value="not set" id="FunctionLocation" /> <!-- this is where the function is stored --> <br /> </div> <!-- This iframe holds the output image. --> <iframe style='width: 7in; height: 6in; border: 0px solid #000000; padding: 10px;' name='test' id="image_iframe" class="rightCol"></iframe> </div> <!-- This is an onload script, but Chrome is not loading the whole page before running the onload script. Time out used above for this problem. --> </body> </html>
0.777778
Using OpenCPU to demo a particular analysis using a R package
Upgrade to 12.04 Failed due to held back packages
I run upgrade after installing all recommended updates from update manager, and I got dialog: Could not calculate the upgrade An unresolvable problem occurred while calculating the upgrade: E:Unable to correct problems, you have held broken packages. This can be caused by: * Upgrading to a pre-release version of Ubuntu * Running the current pre-release version of Ubuntu * Unofficial software packages not provided by Ubuntu If none of this applies, then please report this bug using the command 'ubuntu-bug update-manager' in a terminal. So I reported bug. I also tried umpirsky@umpirsky:~$ sudo apt-get update ... Fetched 16.6 kB in 1min 22s (200 B/s) Reading package lists... Done W: GPG error: http://archive.canonical.com oneiric Release: The following signatures were invalid: BADSIG 40976EAF437D05B5 Ubuntu Archive Automatic Signing Key <email address hidden> Any workaround for this? What is the easiest way to resolve apt-get BADSIG GPG errors? First and second solution didn't work, last one returned cd: /var/cache/apt-cacher-ng: No such file or directory. Still getting GPG error.
I had this problem too on my Lenovo Thinkpad due to ppa graphics dirvers. I solved it by installing ppa-purge and then removing the https://launchpad.net/~oibaf/+archive/graphics-drivers ppa: sudo apt-get install ppa-purge sudo ppa-purge ppa:oibaf/graphics-drivers
1
ppa graphics dirvers on Lenovo Thinkpad
My thesis advisor is absent in my final stage of completing my Ph.D. programme
I am a mathematics Ph.D. student who are in my final stage of completing my Ph.D. programme. My advisor is visiting an institute for a few months. The institute that he is visiting is in another country; because of the visa requirements and many other practical reasons, I cannot go there with him. Now my progress is, I have all the main results ready (most of them have been written down) and I need to finish writing my thesis in about three weeks. My advisor has guided my through all the mathematical difficulties; now he left me behind to write the thesis all by my own. Furthermore, he has clearly indicated that he will NOT help me with the writing process. Now I need to figure out many things all by myself, from LaTeX to the organization, from the usage of languages to drawing pictures, etc. Also I need to verify the correctness and validity of all the results; he mentioned that he will not carefully read my draft. And I do not have much time to finish everything. I am feeling somewhat stressed and overwhelming. In this situation, should I seek assistance from other professors/lecturers who do research in a similar field, or should I try to figure everything out by myself? Should I hire someone to proofread my thesis when the draft is finished?
You are about to finish a PhD thesis. Somebody who obtained a PhD title is supposed to be able to organize and conduct reasonable projects independently. I think that your adviser is not being unreasonable in his demands. Part of organization is also arranging to get more time, if your current time frame cannot be kept, or leads to serious degradation in quality and rigorousness. In some cases that might lead to working on your thesis without being funded. Personally, I would still advise to value doing a good job higher than meeting a deadline, but of course I cannot oversee all the consequences.
1
Doing a good job higher than meeting a deadline
Get current Activity with Android
I have a method that scans the position and gets called on every activity I have, everytime an actions trigger I need to show an alertDialog, this is the code: AlertDialog.Builder builder = new AlertDialog.Builder(mMainActivity.this); builder.setMessage("test") .setCancelable(false) .setPositiveButton("go", new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int id) { Intent intent = new Intent(mMainActivity.this,LocationDetails.class); intent.putExtra("placeId",1); startActivity(intent); } }) .setNegativeButton("cancel", new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int id) { dialog.cancel(); } }); AlertDialog alert = builder.create(); alert.show(); But How can I create the alert on the current activity? Because now it only gets created on AlertDialog.Builder(mMainActivity.this);
You have various options... what you have to know: You can show AlertDialogs from Activity only You have various options Pass your activity instance as parameter in constructor of other classes... then you can call activity from everywhere Use notifications (class does not need to be an Activity) Check this question. otherwise
0.777778
You can show AlertDialogs from Activity only
What is the torque and sequence for a '99 Jetta Oil Pan?
I have a '99 Jetta TDI (diesel) with a cracked oil pan. I'm looking for the sequence of tightening the bolts and the torque needed for each bolt. I've been doing to google-fu but can't seem to find it. Does anyone specifically know these details, or where I can maybe find this? Note: Can someone with priv please put 'oil-pan' and 'bolt-sequence' as tags :)
Do you have a workshop manual for the car? The torque figures should be listed in there. In the UK Haynes manuals they are at the beginning of the relevant chapter. I'm not aware of a specific order for oil sump bolts, but if there is one it should be listed in the approprate section of said manual. Normally it is only head bolts that need to be tightened in a certain sequence, but I don't know about modern VW engines.
0.666667
How to tighten oil sump bolts in a certain sequence
Bash script- Create usernames and passwords from txt file and store in group?
This script takes a .txt file with four columns- which contains LastName FirstName MiddleInitial Group-as an argument and needs to create a unique username and password for each person; and then assign each user the appropriate directory depending on their group: i.e. If "John Doe" is in "mgmt" group, and his username is jdoe1234, then his directory would be /home/mgmt/jdoe1234. It should then generate a .txt file which contains the following columns- LastName FirstName UID(userid) Password- . I have the following: #!/bin/bash IFS=$'\n'; for i in `cat $1`; do last=`echo $i|cut -f 1 -d ' '`; first=`echo $i|cut -f 2 -d ' '`; middle=`echo $i|cut -f 3 -d ' '`; groups=`echo $i|cut -f 4 -d ' '`; r=$(( $RANDOM % 10 )); s=$(( $RANDOM % 10 )); y=$(( $RANDOM % 10 )); username=`echo $first| head -c 1 && echo $last| head -c 3 && echo $r$s$y` echo $username done #check if group exists, if not then create one for group in ${groups[*]} do grep -q "^$group" /etc/group ; let x=$? if [ $x -eq 1 ] then groupadd "$group" fi done #try to add user to correct group x=0 created=0 for user in ${username[*]} do useradd -n -g "{groups[$x]}" -m $user 2> /dev/null done I want the username to contain: 1st letter of firstName, first 3 letters of the lastName, the middle initial, and then 3 randomly generated numbers. So not exactly the same as the above example with John Doe but similar. It can't be any more than 8 characters. I'm not sure if I'm creating the usernames properly. Of course, I'm having trouble with the password too; not sure if it needs to be created alongside the username or after. After the first 'for loop' I first try to add a group if it doesn't already exist, and then I make an attempt at putting the usernames into the correct groups. I got the syntax off a Youtube video but he was working with it as arrays and I'm not sure if I'm doing that or not. If it helps, let's say the .txt file contains: doe john a mgmt lee amy f temp smith tracy s empl If you have time, any help at all would be appreciated. Thank you.
Depending on which distro you are using, there are a few alterations to your script which will help. I have not had time to actually test this, so use with caution: #!/bin/bash # This will loop through the argumented txt file, and create the users as necessary. # You will need to run this as root, so be very careful. Start with a small user file. line=1 # Initiate variable for counting. count="$(cat $1 | wc -l)" # This counts the number of lines, which will decide how many times the loop itterates. until [ $line -gt $count ] do # Begin by grabbing one line (user to be added) newuser="$(head -$line $1 | tail -1)" # This gets just the one line at a time. # Now split the data as needed according to your original post: fname="$(echo $newuser | awk '{print $2}')" # AWK to get First Name lname="$(echo $newuser | awk '{print $1}')" # AWK to get Last Name minit="$(echo $newuser | awk '{print $3}')" # AWK to get middle initial group="$(echo $newuser | awk '{print $4}')" # AWK to get Group # Now create the random username. initial="$(echo $fname | head -c 1)" random="$(shuf -i 1-9 -z -n 3)" shortname="$(echo $lname | head -c 3)" username="$initial$shortname$random" # This will output exactly what is needed, although your example does not stick to what you want... # Now create the user. # Does group exist? if egrep -i "^$group" /etc/group then true # This is not the best way to do this, but my toddler kept me up all night... else groupadd $group fi if [ ! -d "/home/$group" ] then mkdir -m 774 /home/$group fi # Make the home dir. mkdir -m 777 /home/$group/$username # Actual useradd command useradd -g $group -d /home/$group/$username -p $(openssl passwd -1 $username) $username if [ $? = 0 ] then echo "User $username has been successfully created." chown $username:$group /home/$group/$username chmod 755 /home/$group/$username else echo "Something went wrong, user $username was NOT created." rm /home/$group/$username fi # Now generate line for txt output file output="$lname $fname $(id -u $username) $username" printf "\n$output" >>./output.txt # Now increment the counter line="$((line +1))" done exit Like I said in the beginning, I haven't tested this properly, because I don't really want to create a bunch of users :-) so be careful - test the useradd line first. The rest should be solid.
0.888889
Using txt as root to create users
Polite alternatives to "as soon as possible"
I’ve found myself writing the phrase “as soon as possible” just too often. Sometimes I wonder if it sounds a little rude. How can I convey the same meaning in a more polite way but without losing sense of urgency?
You could say "quick as you can", "expedite please". This is not as polite but you could say "immediately if not sooner".
1
"quick as you can", "expedite please"
xeCJK and paragraph indentation
I am using xelatex and want to use the xeCJK package, but without indenting the first paragraph of a section. I tried the setup directive below, which should do the trick. But it does not. The manual is in Chinese ... \documentclass{article} \usepackage{xeCJK} \setCJKmainfont{SimSun} \xeCJKsetup{indentfirst=false} \begin{document} \section{Section 1} I want to have a paragrpah without indentation. This one should be indented. \subsection{Section 2} Same here. This one should be indented. \end{document}
In the log file you find this warning: ************************************************* * xeCJK warning: "option-invalid" * * The `indentfirst' option only can be set in the optional argument to the * \usepackage command when xeCJK is being loaded. * * Please do not set it via the \xeCJKsetup command. ************************************************* which is self-explanatory: do \usepackage[indentfirst=false]{xeCJK} Be warned that languages loaded with Polyglossia may revert the setting (Italian, for instance).
1
xeCJK warning: "option-invalid"
How to load a properties file in java without calling laod method separately
How to load a properties file in java without calling laod method separately i want to load the file while instantiation of the properties object itself. like i have pasted below but i am not able to succeed in it. class test{ Properties configFile = new Properties(load(new FileInputStream("config.properties")); }
Just create a separate method to do that - potentially in a helper class you can use elsewhere: public class PropertiesHelper { public static Properties loadFromFile(String file) throws IOException { Properties properties = new Properties(); FileInputStream stream = new FileInputStream(file); try { properties.load(stream); } finally { stream.close(); } return properties; } } Note that due to the possibility of an IOException, you'll still need to be careful where you call this from. If you want to use it in an instance initializer, you'll need to declare that all of your constructors can throw IOException.
0.777778
Public class PropertiesHelper throws IOException
Why don't banks give access to all your transaction activity?
In the era of big data, I find it surprising that banks and credit card companies only offer access to a ridiculously small number of transactions - often only your last 180 days, if that. The longest I've seen was 720 days going back. I suspect they do store everything, but intentionally limit access. These transactions are text only, take up extremely little space, and storing an individual's lifetime worth of transaction would take less than 10MB of data; about the storage required by two MP3 files, and about 250k records per person per lifetime, if we generously assume everyone makes 10 transactions a day. But I'd be happy with only the last 10 years of transactions, so about 1MB per customer. One of the largest banks, JP Morgan Chase, has ~70MM credit card customers. That means 70TB of data for 10 years of records - hardly impressive for a corporation of that size, with $17B of net income in 2013, when 1TB of cloud storage costs $10 retail per month. By comparison, would you put up with Gmail or any online email provider keeping only the most recent 120 days worth of email? (And emails do take a lot more space than transactions, are far more numerous, and have to be instantly retrievable.) Storage requirements for transaction activity are trivial in an era where we're throwing around petabytes and zetabytes. Is there a sound reason for banks not offering access to all your transactions, other than legacy software on their side?
Heterogenous archives A big issue for historical data in banking is that they don't/can't reside within a single system. Archives of typical bank will include dozen(s) of different archives made by different companies on different, incompatible systems. For example, see http://www.motherjones.com/files/images/big-bank-theory-chart-large.jpg as an illustration of bank mergers and acquisitions, and AFAIK that doesn't include many smaller deals. For any given account, it's 10-year history might be on some different system. Often, when integrating such systems, a compromise is made - if bank A acquires bank B that has earlier acquired bank C, then if the acquisition of C was a few years ago, then you can skip integrating the archives of C in your online systems, keep them separate, and use them only when/if needed (and minimize that need by hefty fees). Since the price list and services are supposed to be equal for everyone, then no matter how your accounts originated, if 10% of archives are an expensive enough problem to integrate, then it makes financial sense to restrict access to 100% of archives older than some arbitrary threshold.
0.888889
Heterogenous archives A big issue for historical data in banking is that they don't reside within a single system
ASP.NET MVC Update part of the model
I have very complex model. The flow is like this: - in controller I populate the model from the database - in view I have several tabs. After I fill in the info on the first tab, the second tab enables (this works just fine) and on click on the second tab button I need to update some properties of the model. How can I do this WITHOUT calling the database again in order to populate the model on the controller? The model is very complex, so I can't store as "hidden" all the properties. I hope I managed to be clear enough. Thanks for any kind of help
I had the same situations with ASP.NET MVC. I used ViewBag's for sending the data in very magical ways, created Javascript strings and ran them with Html.Raw, used .executeSql in many places, done real magic. But after all I asked myself: is it worth the pain? No matter you don't have enough time (i mean this!), I strongly recommend reading some good documents and try some tutorials before diving into the dark sea of work-arounds. Don't forget, with a good design and using Model class' features well, you won't need work-arounds too much and this will give you, above all, happiness. For your situation; the best place is to create a Helper class such as: public abstract class Helper<T> : WebViewPage<T> { private dbContext db = new dbContext(); public virtual whatEver yourUpdateOperation(int? id, string data) { // you can do your update operations here return whatEver; } } To apply this class to all your WebPages, change the line in your web.config file in your Views directory: <pages pageBaseType="YourProject.HelperDirectory.Helper"> From now on you are able to call yourUpdateOperation from your Views such as: @foreach (var item in Model) { <tr> <td> <!-- View or operate things--> </td> @yourUpdateOperation(item.ID, data) </tr> } Hope this helps.
0.888889
How to create a Helper class for your WebPages?
How do you grapple in Dead Rising 3?
I just started playing Dead Rising 3 on the Xbox One. I got to the first grapple, and I can't figure out what I'm supposed to do. The top of the screen says "Perform a gesture to escape a grapple" - what does "gesture" mean in this context? Is it something to do with Kinect?
There will be a circle at the bottom off the screen with a red line around it. You have until the line runs out to either perform the gesture or to press the button onscreen.
0.888889
There will be a circle at bottom off the screen with a red line around it
Why would one shoot a fully blurred picture?
Focus and blur have a reason in a picture when they come together. Blur alone is just a loss of an important element in the photography art, unless it has a reason, like obscuring nudity or creating an additional value... but what is the value of an entirely blurred picture?
I'll add another possibility to @Imre's excellent list: full-image blur can give impressions of disconnectedness, loneliness, mental haze, etc. All of these are potential emotions that you wish to convey.
1
Full-image blur can give impressions of disconnectedness, loneliness, mental haze, etc.
In assasin creed 4 can we fast travel within cities?
For example, rather than running from places to places, I saw many fast travel icons on the map. Can I fast travel there? I know I can fast travel to save sailing time. What about if I am not sailing? Why are they so many fast travel icons on one city? If fast travel is only when sailing, then we need only one fast travel icons per city right? I am using PS4. In world map, I can fast travel with square key. What button I should press if I am within a city. I select a fast travel icon, press square, nothing happen.
I think this is where the confusion start. Within city, you can fast travel to synchronize point. You cannot fast travel to "fast travel" point. What you can do is you go by foot to "fast travel" points and you will have an option to teleport to another "fast travel" points. The fast travel points look like small boats that usually teleport us to our ship. Instead, it teleport us to other fast travel points.
1
You cannot fast travel to synchronize point
What is the distinction between a city and a sprawl/metroplex... between downtown and a commercial district?
I am trying to understand what kinds of places the spam values on p 231 refer to in the 5th Edition main book for Shadowrun. Per p 15, a sprawl is a plex, a plex is a "metropolitan complex, short for metroplex". Per Google a metroplex is " a very large metropolitan area, especially one that is an aggregation of two or more cities". A city downtown and sprawl downtown would tend to have similar densities, but for some reason the sprawl (which includes suburbs?) has a higher spam zone noise rating (p 231). Similarly, I'd think of a downtown as being more dense and noisy (e.g. Office buildings and street vendors) than a commercial district, e.g. an outdoor mall. The noise ratings make me think that I am thinking about this incorrectly. What is a better way of thinking of them?
When I interpret the Spam/Static Zone noise ratings, I see it as the following: The City spam rating is one because that is where the more affluent people live. They pay for access to the city's grid, and typically these locations are going to be other businesses or higher-end residential areas, where they don't want the advertising, given that it will have a negative effect. The sprawl downtown has the same idea, but since they aren't throwing as much nuyen around, there's a bit more leeway on what advertising will do. There are going to be more people around, of course, adding to the chatter, even more so when you consider that since more will be on the public grid, both businesses and people. For the commercial areas, even in an open air market, you're going to have everyone with a booth throwing out AROs and such to attract others. People are going to be doing searches for best prices, checking SINs, and all sorts of things. People are there to blow their nuyen, and marketers aren't going to miss out on the chance to grab your money before you have a chance to second-guess.
0.888889
Spam/Static Zone noise ratings are one because that is where the more affluent people live .
Is there any granular way to change decisions made in ME1/ME2 to see different outcomes in ME3?
In ME1 and ME2, I had to make decisions not really understanding their impact on the series as a whole. Now that I'm partway through ME3, I find myself curious as to what would have happened had I made a different choice previously. What if I'd done X? What if I'd let Y live/die? I can't just replay ME3, import my ME2 save, and make different choices to see these outcomes - I'd have to make changes to the way I played ME/ME2. Likewise, importing no save would make wholesale changes to my experience that I'm not sure I'd appreciate. Besides starting the entire series over again, and running through each game dozens of times to explore the various permutations, what can I do to change the way things play out in ME3? Do I get the option to edit the imported starting state on New Game+? I'm on the Xbox, so save file editing or importing from the internet is likely to be at least challenging, if not impossible.
Theoretically your best bet would be using a save game editor to change the flags regarding those pre-ME3 decisions and outcomes. There was one for ME2, but I admit I haven't checked if ME3 has one. Alternately, I recall an archive of all possible ME1 variant ending saves that people could import into ME2 to get the start they wanted, hang on.. Bingo. Your second best bet would probably be to use that site, download the save you want to import, play through, download next save, etc.
1
Theoretically your best bet would be using a save game editor to change the flags regarding pre-ME3 decisions and
How to allow someone else to send emails in my name?
I want to give another person the ability to send emails in my name. This person should be able to send mail using my email address, but not be able to read my email. Does anybody know a webapp or application that can do this? I use gmail, but am willing to try others.
Gmail will be perfect for that. In his Gmail account, tell him to follow the following steps: Sign in to Gmail. Click Settings and select the Accounts and Import tab. Under Send mail as, click Add another email address. In the 'Email address' field, enter the address from which he will be sending emails (your address) Click Next Step >> and then click Send Verification. Gmail will send a verification message to your email address to confirm that he can use it. Then you will receive the email verification, you just have to approve it. Warning: Be careful though, I don't think you can remove this privilege from his accounts yourself or force him to remove your email address later on. Source
1
Gmail will send a verification message to your email address to confirm that he can use it
How to make extra crispy and crunchy breading like KFC?
I'm wondering how I would go about making extra crispy chicken breading like they do at many places like KFC and the like. Is there a certain ingredient that makes the breading like that? Any assistance would be very much appreciated, and feel free to share any of your own recipes for crispy chicken breading if you have them. I'll be sure to put them to good use! Thanks!
Use bread crumbs and egg white for coating the chicken. First mix up corn flour, garlic powder, onion powder and little pepper powder. Then coat the chicken with this. Then dip the chicken in egg white, then bread crumbs coating. Fry it in medium flamed oil. Try this very crispy chicken which is equal to KFC chicken.
0.888889
Bread crumbs and egg white for coating the chicken
Windows 2008 service creation permission
What do I need to grant permission for creating a service in Windows server 2008 R2? I have added the user to the local "Administrators" group. This is the error message: C:\temp>sc create test binpath=c:\temp\test.exe [SC] OpenSCManager FAILED 5: Access is denied.
I have changed the Service Permissions Right Click on Service-> Properties -> Sercurity -> Give Full control to Users. Worked for me.
0.666667
Service Permissions Right Click on Service-> Properties -> Sercurity -> Give Full control to Users
How to have remote standby PostgreSQL server in different location (AWS)?
We have a primary PostgreSQL 9.4 server running multiple instances in our DC. It is using Continuous Archiving via WAL-E out to AWS S3. I would like to have a hot/warm standby server in our VPC within AWS EC2 that would be ready to take over should we need to DR. I can recover the server via WAL-E but can't seem to get it to work in hot_standby mode. What could I be missing? Docs I read seem to suggest that the standby needs to talk to the primary? Is this so? Is this required when log-shipping via WAL-E?
There are two ways to run a replica. You can use either, or both together: Streaming replication, where the replica makes a PostgreSQL protocol connection to the standby as configured with primary_conninfo in recovery.conf; or WAL shipping, where the replica runs a restore_command (set in recovery.conf that fetches WAL archives to replay. See recovery.conf. Both require that standby_mode be set in recovery.conf. WAL-E is designed to be used as an archive_command on the master, to store WAL into S3, then as a recovery_command on the replica to fetch WAL. There is no need for a streaming replication connection. You can add one anyway, and it will be used where available, and the system will fall back to WAL archive recovery if it can't connect over streaming replication. Or you can just use WAL-based archiving. The main advantage of using streaming replication as well is that it's more timely; you don't have to wait until an entire WAL archive is filled and shipped before the replica sees the changes. For more information see the manual.
0.888889
How to run a replica?
Past perfect sentence in "I would have killed the snake if I had hit him..."
Is the following a correct past perfect sentence? I would have killed the snake if I had hit him hard with a stick.
Yes, it is. It's the third conditional, where you talk about an action in the past that didn't take place. Aside from that, you are missing the or a in your sentence. I would have killed the snake if I had hit him hard with the or a stick.
1
I would have killed the snake if I had hit him hard with the or a stick
Drupal redirects to old url after moving to new server
I am in the process of moving a drupal site to a new server. I copied the drupal db and moved all the files of the drupal installation. The old url is http://www.sniffingmusicians.echidna-band.com/ and the new is http://www.sniffingmusicians.com/, which point to 2 different servers. Even though the frontpage of new is there when I login it redirects me to the old domain! Additionally, all the content is prefixed with the old url. I changed the $base_url in the settings php but there is no real impact. Where else can I reconfigure my site's url?
Maybe you can use this module: Path Redirect (Drupal 6) Redirect (Drupal 7)
0.888889
Path Redirect (Drupal)
What's the first physics textbook for undergraduate self-learner?
I am kind of studying physics on my own now. I choose University Physics (13th Edition) for myself,is it fine? I am also studying Calculus using Thomas' textbook. http://www.amazon.com/University-Physics-13th-Edition-Young/dp/0321696891/ref=sr_1_1?ie=UTF8&qid=1352260382&sr=8-1&keywords=university+physics+13th+edition
It depends on your background. For really starters, I'd suggest Paul Hewitt's book Conceptual Physics. For A to B high school students, I'd say Resnick and Halliday's book is great. For A+ high school students, I'd recommend Feynman's Lectures. These lectures serve as complement for the other books, but personally it's not for beginners Cheers.
1
Paul Hewitt's book Conceptual Physics
Keypad to set a counter
Is there a way to use a standard Matrix Keypad to set a synchronous counter IC without having to use a micro controller?
What are you looking at the counter to do, and what relationship do you expect between button position on the grid versus the count value? If you have a counter that produces a one-hot active low output (all other signals driven high), one could connect each output to a diode which would pull down the keypad row assigned to that count (put pull-ups on all keypad rows), as well as to the emitter of a dedicated NPN transistor whose base was connected, via resistor, to the column assumed to that count. Tying all the emitters together and attaching a pull-up will yield a signal which goes low whenever a button is pushed which doesn't correspond to the present count. If one's goal is e.g. to build a timer which can be pre-set for 1-9 minutes by pushing a button, one could use a 74HC17 wired as above, wired to the bit 5 of a counter which is fed by a 555 that normally ticks 64 times per minute, but can be accelerated to run many times faster. Net circuit requirements would be about ten transistors, nine diodes, about couple dozen resistors, a few caps, the 74HC4017, a counter (a 74HC4040 would be fine), and a 555.
0.777778
What is the counter to do, and what relationship do you expect between button position on grid versus count value?
Can't Delete iTunes Content
I have a MacBook Pro running the latest version of Yosemite and the most up to date version of iTunes. When opening iTunes up it shows that I have 6 songs, I've tried to delete these songs multiple times by right clicking, pressing 'show in finder' and then moving them to the trash, but they still won't disappear from iTunes no matter what I do. I've even removed the caches folder but no luck even after restarting.
Removing them from your hard drive has no bearing on whether they show up in iTunes. You have to actually remove them from iTunes, too. (Right-click > Delete or Edit menu > Delete while the song is highlighted) The (nearly) only time iTunes knows whether a file in the iTunes library actually exists on the hard drive is when you try to play it. Also, if you use the above method, it will offer to remove the song from your hard drive at the same time it is removing it from iTunes.
1
Removing the songs from your hard drive
'Insufficient space on the device'
So, I'm having problem downloading apps from Play Store because apparently, I have insufficient space on device. The app I want to download is of only 12.68 MB and my system storage has 113 MB, phone storage has 596 MB, and SD card has 1.46 GB available. I tried cache cleaning, uninstalling unwanted apps, moving the movable apps to SD card but it still won't work. The device I'm using Micromax Bolt A089 with a 4 GB SD card. Please help. Thank you.
Use a cleaning application like clean master to clean junk from your device, then move as much applications to sd-card to alleviate device storage (clean master does that too). If you're rooted try removing system applications that you are no using Can you fully remove Google system apps from Android including the Play Store updates?
1
Clean master remove system apps from Android
Right Drag on Mac
How do you perform a right-click-drag operation on Mac hardware? I know you can right click, but there does not seem to be a right click drag gesture. In my specific case I am using a MacBook Pro, and I am in a Windows environment. The question is more than just theoretical. I ask because there is functionality that uses this gesture, at least in the Windows world. For example, right now I'm trying to do a copy and rename in the TortoiseSVN repository browser. I think there are things you can do with a right drag in graphical editors like Photoshop as well. In windows you get a context menu when you right drag files. For those familiar with the software, I know I can do it in other ways; I'm not looking for workarounds to specific problems. I have tried this suggestion on the macrumors forums by Darth.Titan, but either have not been able to get it to work or do not understand what they are talking about: http://forums.macrumors.com/showthread.php?t=678836
It is in your best interest to leave the shackles of your old platform behind you and embrace the "new" way. If you keep looking for ways to get OS X to behave like Windows, and remain in your Windows Comfort Zone, you will never be happy with OS X, and/or you'll end up going back to Windows, effectively "wasting" your money as so many anti-Mac pundits claim. That said, you may explore the Trackpad preferences pane in System Prefs. There are options in there for multi-finger drags, selects, etc. According to what Darth says, it sounds like he's doing a 3-finger drag. Again, its easier to accept the Mac convention and embrace the toolset provided on the platform, rather than trying to bend the conventions until they break by wanting it to behave like Windows.
0.777778
How to get OS X to behave like Windows?
Why would analysts recommend buying companies with negative net income?
Can anyone explain why some analysts recommend companies in the biopharmacy sector as a "buy" even though they have high R&D costs and no real profit? I followed three companies and I see the same story. The only positive number is income, and only in one case does it cover expenses after net borrowing. For the next four in a row, the net income the net income is below zero. Why are these companies a buy?
The biotechnology sector as a whole is a popular buy recommendation among some analysts these days for a few reasons. Some analysts feel that the high costs in R&D, even without much profit, are a positive sign for growth because it means a company is working towards finding the next "blockbuster drug" or the next class of such drugs. There haven't been many new classes of blockbuster drugs since the development of SSRI's and statins, and many of the new drugs that have been developed have been tweaks to existing classes of drugs. Some analysts feel that "it's about time" for a new class of blockbuster drugs to hit the market. A new blockbuster drug means significant profits for the company that develops it; a new class of blockbuster drugs means significant profits for the whole industry. Since about 2009, the Food and Drug Administration has been more lenient in its approval of new drugs. This wave of new approvals has reduced R&D costs for companies because they don't need to go back to the lab or earlier phases of clinical trials and continually tweak their drugs in order to gain approval. This has also made some analysts optimistic. Genetic engineering is considered an up-and-coming field with potentially significant applications to the pharmaceutical industry. Advances in this field may increase profits for the pharm industry, but since biotech companies are often the ones producing the engineering equipment, research, etc. such advances could be a major source of revenue for the entire biotech industry. In the US and in the developed world as a whole, the elderly population is growing, and since people consume more medicine as they grow older, this could lead to higher profits for companies involved in the production of pharmaceuticals (which includes biotech companies, of course) in the long run. In the US, the passage of the Patient Protection and Affordable Care Act expanded insurance coverage, which gives more people the means to afford pharmaceuticals. Also, in general, people consume more healthcare services when they have insurance (this is called moral hazard), so some analysts expect that the expansion of insurance coverage will only lead to more profits for the pharmaceutical industry and biotechnology firms in general. The global food crisis. As the climate changes, companies like Monsanto, which use various forms of genetic engineering to produce crop strains that can survive in increasingly hostile environments, look more and more appealing to places that need crops designed to grow in such environments. Any methods that could increase yields look increasingly popular, and biotechnology companies often market such methods. (As a side note, I know Monsanto is a contentious example, and there are a lot of misconceptions about "genetically modified food" and the genetic engineering methods they do, so I won't get into a debate about that). In general, technology is a popular subject right now. I've read analyst reports (from analysts that clearly don't follow the biotech sector) that base their forecasts for the biotech sector on the activities of companies like Dell, Zynga, HP, LinkedIn, Facebook, etc. Clearly, it's problematic when an analyst sees the word "technology" and automatically assumes that the biotech sector is responsive to the same factors as social media firms, hardware manufacturers, etc. This isn't to say that the biotech sector is completely isolated from this, but when I read a report that talks about Facebook's IPO being bad news for companies like Gilead Sciences without mentioning upcoming FDA decisions about Gilead's products or any biotech-specific factors, I'm not convinced the analyst has performed due diligence. I keep using the phrase "some analysts" because I want to stress that the opinions stated above aren't universal. Although they're popular, not everyone is so optimistic. Also, I don't want you to see these reasons and think that I'm making a buy recommendation, because I'm not. I'm not making a recommendation one way or another. I'm happy to clarify my answer too; I follow the biotechnology sector extensively. If you want to get a rough feel for the daily movements of the sector as a whole, a good place to start is IBB, the iShares Nasdaq Biotechnology Index Fund. The four largest holdings are Regeneron, Gilead Sciences, Amgen, and Celgene, which are all big players in the industry (obviously). These are a little different from the big name pharma companies like Pfizer, Merck, Novartis, etc. but they're still considered pharma companies. It's also worthwhile to follow the FDA press announcements. By the time the news is published there, it's probably already leaked or known to people in the industry (the biotech/pharm sectors are rife with accusations of insider trading), so you might not find trading opportunities, but it's important to get familiar with the information the releases contain if you want to know more about the industry. Volatility trades are always popular trades around FDA drug approvals.
0.888889
The biotechnology sector as a whole is a popular buy recommendation among some analysts .
Goalkeeper Jumping Algorithm?
This may be a "best way to" question, so may be susceptible to opinion-based answers (which is ok for me). But I would also like if there are any tutorials , research papers , etc. I'm trying to make a 3D free kick game, and I want to decide on the Goalkeeper algorithm. Usually (and in my game) the shot is a function of direction , power and swerve. Maybe wind can be a factor too. So the shots trajectory is pre-deterministic, i.e., the point that intersects the goal (or out) plane is determined as soon as the shot fires. So what could be a good approach for the goalkeeper to jump (or walk) ? I have two approaches in mind : 1- determine the point, and jump to there. 2- when the ball is closer than a threshold distance, estimate the point by the ball's velocity vector, and jump to there. The problem with the first approach is, goalkeeper will always save the shot, which I want to prevent. So there should be some kind of randomness, or the goalkeeper's ability to jump and walk will be restricted. The problem with the second approach is, when there is a high amount of swerve, the goalkeeper will always fail to save the shot. So how could these approaches be better? Thanks for any help ! Edit: if you want to play the game, click here
The ways to handle this are different based on how you are assigning speed, swerve etc. I'm assuming you have a skill challenge to do that ("stop the moving needle in the right part of the gauge"-type thing or something similar). If so, then you want higher-swerve and higher-speed to equal higher-percentage chance of scoring. If they are just chosen values, then they shouldn't have such a direct effect, or the player will always choose them to be high. You could set a percentage of the time you want the goalkeeper to save (based on the speed and swerve), and simply pick a random number, if it's below that percentage, play the correct animation (diving the right way) for the save, if it's higher, play the wrong one and allow the score. This is simple, but also a little "cheating"-like. You could set an amount of time for the goalie to read the direction the ball is going, and then start moving him in that direction, and constantly allow him to adjust for the swerve until the last X% of the time it takes the ball to arrive, at which point the goalie can dive for the ball if it's within a range of where he is (and outside "move-to" range). "Better" goalies (higher levels?) will read sooner, move faster, and dive later(and further). This is more complicated, but more flexible, and more simulation-like.
1
How to handle speed, swerve and speed?
Cordova - Trying to execute a function inside a webview
I have a webview from my website working very well in my app. What I'm trying to do now is asking users when they hit Android Back Button if they really want to leave the app. I'm using the InAppBrowser plugin. Here's my code. document.addEventListener("deviceready", onDeviceReady, false); // Cordova is ready function onDeviceReady() { navigator.splashscreen.show(); var ref = window.open("http://m.estadao.com.br", "_self", "location=no"); ref.addEventListener('loadstop', function(){ ref.executeScript({ code: document.addEventListener("backbutton", onBackKeyDown, false); function onBackKeyDown() { navigator.notification.confirm( "Tem certeza que deseja sair?", function(buttonIndex){ confirmExit(buttonIndex); }, "Aviso", "Ok, Cancel" ); } function confirmExit(stat){ if (stat == "1"){ navigator.app.exitApp(); } else { window.open("http://m.estadao.com.br", "_self", "location=no", "zoom=no"); } }; }); }); } And here is the link of plugin http://cordova.apache.org/docs/en/2.7.0/cordova_inappbrowser_inappbrowser.md.html#executeScript Any idea what can i do to make it work ? Thanks!
I am assuming that your problem is back-button event is not getting triggered once the webview loads. This is a common problem with using in-appbrowser plugin for webview. It loads page but we loose control over the page. Use the following plugin https://github.com/Wizcorp/phonegap-plugin-wizViewManager/ for webView. It creates a custom webview inside your phonegap app and you still have control over back button and you can also define the size of the webView
0.666667
In-appbrowser plugin for webview
How to prevent the "Too awesome to use" syndrome
When you give the player a rare but powerful item which can only be used once but is never really required to proceed, most players will not use it at all, because they are waiting for the perfect moment. But even when this moment comes, they will still be reluctant to use it, because there might be an even better moment later. So they keep hoarding it for a moment which will never come. In the end, they will carry the item around until it is outclassed by other, more readily available resources, or even until the very end of the game. That means that such one-shot items don't provide any gameplay-value at all. They are simply too awesome to use. What can you do to encourage the player to make use of their one-shot items and not hoard them?
If you, as a game designer, know when the opportune moment arises (eg. boss battle), I would give a cue to the player. This could be a character saying "Sure could use that BFG right about now", or even a tool-tip reminding you that the weapon is awesome. Sometimes, players will just forget that the weapon is there, so a little reminder at the right time can help.
0.833333
When the opportune moment arises, I would give a cue to the player
How to crop a square at the exact centre of an image in Photoshop?
Given a square image, how can I crop, at the exact center, of the image? What if the image is not square itself? What if I'm using Photoshop CS6 or some older version? Is the procedure the same?
If your image is not square: Choose View > New Guide then tick the Vertical option and enter 50% in the box and click OK. Choose View > New Guide then tick the Horizontal option and enter 50% in the box and click OK. This provides a guide intersection at the image center. Grab the Marquee Selection Tool or the Crop Tool, hold down the Option/Alt and Shift key and click-drag starting at that center guide intersection. This draws a square selection (crop area) at the center of the image. Then simply choose Image > Crop, or hit the Enter to commit the crop (if using the crop tool) If the image itself is square... Choose Select > All from the menu. Then choose Select > Modify > Contract Tick the Apply effect from Canvas Bounds box and enter the amount of offset, from the canvas edge, you want and click OK. Then simply choose Image > Crop For versions of Photoshop where "contract" may not be available after selecting all, use the first method.
1
Choose View > New Guide then tick the Vertical option and enter 50% in the box and click OK
Where to create a shared media folder?
I'd like to place all my family's media in one shared folder for everyone to use from any computer. Whether it's a PC or home server. What is more appropriate: Create it in my home folder (/home/lamcro/media/) Create a new account called media (/home/media/) or just Create a new folder (/media/) As far as I know, there is no "Shared Folder" in Ubuntu, like in Windows. I'm just looking for the least cumbersome method, in case I ever want to do a full Linux re-install.
I would recommend creating and using a /srv mount point for "services provided by your system". Personally, I have the following: /srv /srv/mm (for "multimedia") /srv/mm/music (all shared music) /srv/mm/photos (all shared photos) ... ... I then mount these directories using NFS on all other family computers on the network. I use the same naming convention on each client to keep things simple.
0.888889
/srv mount point for services provided by your system
What's the best way to authenticate an user using a websocket?
I'm creating a multiplayer game(based in websockets) which runs directly from the browser and which has multiplayer functionality. Each player needs to have his own account(Username and password). When I was planning the game, I realized that the easiest way to migrate it to other platforms is writing it in HTML5. So, I need to create a login system using JS and websockets. But I'm not sure of how secure is to send a message with a content like username and password to the websocket server(which runs in a Java virtual machine).
If you want security, transmitting authentication data through TLS is a big start. But let's assume the websocket is already set up over TLS. A solution I would recommend would be based on a challenge-response mecanism : The server would set up a random set of bytes (the challenge), set a timeout at the end of which the challenge wouldn't be authorized. The client would send in "plain text" the username and the challenge and an hash (with a SHA2 or SHA3 algorithm) of challenge || username || f(password), f(password) being how the password is stored in the database (a SHA256 of password for instance The server verifies with the username's data and the challenge the response and if so, authenticates the user. It also invalidates the challenge to invalidate any future attempt using this challenge This method provides an anti-replay fonctionnality : an attacker could not capure the data and replay it later to authenticate. I however have one big problem with this method : f(password) has here the roughly same security as password : if the database leaks, any attacker could authenticate as anybody else. I say "roughly" because, if stored in clear text, since a lot of users are using the same password on multiple websites (which is bad), their accounts could be compromised elsewhere. I can't think of a method protecting against a database leakage and an anti-replay mechanism, but an anti-database leakage mechanism (send user password in clear text over TLS, hash password with database salt and compare with database) over TLS should be sufficient enough against most risks you will face
1
a challenge-response mechanism is already set up over TLS
Is it possible to cryptographically prove when was the last time a ciphertext was decrypted/encrypted?
I want to provide a service that encrypts and decrypts documents and I want to provide the users with proof that I haven't stolen their secret key and read their documents. I know I can prove when a document was last modified with cryptographic timestamping. Is it possible to prove a document was or was not encrypted/decrypted in a given time period? Off the top of my head, I'm thinking maybe there's some way to arrange that some kind of proof-of-work would be needed to encrypt/decrypt a document, but I'm not comfortable with inventing my own crypto.
It is possible for Bob and Alice to store many files on some host file server using a host-proof protocol -- i.e., in such a way that even the sysadmins of that server cannot decrypt and read the plaintext of those files. You may be interested in browsing the questions with the host-proof tag. As far as I know, there is only one way to prove that those sysadmins definitely have not read the plaintext of those files: Never send the plaintext of those files directly to the host. Bob always encrypts each file before he sends it to the host. Never send the file decryption key to the host. (Except perhaps in encrypted form, encrypted by some other key that is never sent in plaintext to the host server). One way to do that is for Bob to generate encrypted files in OpenPGP format, and send those encrypted files to the host server. (At the time of encryption, Bob uses his own public key and Alice's public key, in order to generate a file that can only be decrypted using either his own corresponding private key, or Alice's corresponding private key). OpenPGP includes a message authentication code that can be used to prove that the sysadmins definitely have not modified the files, or replaced them entirely with files they created. I hear that many people use other techniques that have some advantages and some disadvantages compared to standard OpenPGP. Those techniques include convergent-encryption, gzip --rsyncable, rsync, rsyncrypto, and various combinations. (There are many interesting ways of proving that a document was decrypted, but it sounds like that's not particularly useful in your application).
1
OpenPGP is a host-proof protocol that can decrypt and read plaintext of files .
How do I know if which leg is the emitter or the collector? (Transistor)
I'm new to electronics and here's a newbie question that I would like to ask: How do I know if which leg is the emitter or the collector in a Transistor (For both PNP and NPN) using only an analog multimeter?
Useful information to know (complements the other answers) which applies to both NPN+PNP bipolar transistors and N-channel and P-channel MOSFETs: TO92 transistors are almost always pinned-out as EBC (bipolar) / SGD (MOSFET) when you are facing the flat part of the transistor package and the leads are pointing down. TO220/TO247/DPAK/D2PAK transistors are almost always pinned-out as BCE (bipolar) / GDS (MOSFET) when you are facing the front part of the transistor (tab on the back side) and the leads are pointing down. This is easy to remember by the mnemonic GDS = Gosh Darn Son-of-a-gun. (Or something like that. :-) Transistors with metal tabs (TO220, TO247, DPAK, D2PAK, SOT-223, etc.) almost always have the tab as the collector or drain. This has to do more with the construction of the device than from any sort of convention; the collector/drain is the part of the die that is the most thermally coupled to the metal tab, so it's a natural point of electrical attachment. Surface-mount transistors with two pins on one side and the third standing alone on the other side (SOT-23, SOT-323) almost always have the collector / drain standing alone. This is because the gate-source / base-emitter voltage differential is small, whereas the collector / drain may be tens or hundreds of volts different, so it provides a larger clearance for that voltage differential to have the collector / drain off on its own. The same holds true for DPAK / D2PAK transistors, where the middle pin is cut short and sticks up in the air; it's done to provide voltage clearance and you connect electrically through the collector / drain via the tab, which is (usually) the same piece of metal as the center pin. I suppose there are certain transistor parts that are exceptions to these rules (most likely in the SOT-23 and SOT-323 packages) but I'm not aware of any -- still, always check the datasheet.
1
NPN+PNP bipolar transistors and N-channel and P-channel MOSFETs
Close all file descriptors in bash
Is there a way to close all the open file descriptors, without having an explicit list of them beforehand?
To answer literally, to close all open file descriptors for bash: for fd in $(ls /proc/$$/fd); do eval "exec $fd>&-" done However this really isn't a good idea since it will close the basic file descriptors the shell needs for input and output. If you do this, none of the programs you run will have their output displayed on the terminal (unless they write to the tty device directly). If fact in my tests closing stdin (exec 0>&-) just causes an interactive shell to exit. What you may actually be looking to do is rather to close all file descriptors that are not part of the shell's basic operation. These are 0 for stdin, 1 for stdout and 2 for stderr. On top of this some shells also seem to have other file descriptors open by default. In bash, for example, you have 255 (also for terminal I/O) and in dash I have 10, which points to /dev/tty rather than the specific tty/pts device the terminal is using. To close everything apart from 0, 1, 2 and 255 in bash: for fd in $(ls /proc/$$/fd); do case "$fd" in 0|1|2|255) ;; *) eval "exec $fd>&-" ;; esac done Note also that eval is required when redirecting the file descriptor contained in a variable, if not bash will expand the variable but consider it part of the command (in this case it would try to exec the command 0 or 1 or whichever file descriptor you are trying to close). NOTE: Also using a glob instead of ls (eg /proc/$$/fd/*) seems to open an extra file descriptor for the glob, so ls seems the best solution here. Update For further information on the portability of /proc/$$/fd, please see Portability of file descriptor links. If /proc/$$/fd is unavailable, then a drop in replacement for the $(ls /proc/$$/fd), using lsof (if that is available) would be $(lsof -p $$ -Ff | grep f[0-9] | cut -c 2-).
0.888889
To close all open file descriptors for bash: for fd in $(ls /proc/$$
Populate a JSON into a table in real time with JQUERY
I'm looking for a library which do this : Retrieve a JSON through an AJAX call Populate table with the JSON Update in real time the table with the JSON (call every x seconds) and only delete or hide the rows wich are deleted or insert the new rows. /Editing after first answer Ok i guess my first explanation was not good. Retrieving through jquery a json and build a table is good, i could do that, but my request was more on the other part. I'm looking for a library to display the result in a special way. Let me explain. Json request 1 send : 1;Tomato 2;Apple 3;Salad 4;Carot Json request 2 send : 1;Tomato 3;Salad 4;Carot 5;Potatoes I would like the second row disapear with a effect (fadeOut) and the rows below move Up. For the row 5, i just want a new row appears with a fade in. Is that more clear ? Is there any livrary existing doing this ? Thanks again I'm doing it in PHP, but i hope to write all this in JS. The user could just look the table and see the new rows appearing and the old rows deleting. Any ideas or am i supposed to write it from scratch ? Thanks a lots
If real-time updating is truly required, as Neal suggested, Comet or Stream-Hub would be one avenue worth checking into. As for the interface, I recently have been using JQuery Templates, and when reconciling added / removed / updated records, I use JQuery selectors to clear & update, and use Templates to add in new records. And because I'm using JQuery in all 3 events, I could easily integrate their motion / visual effects. JQuery Templates JQuery Selectors JQuery Effects Stream-Hub I myself only needed polling (every 15 seconds) so I'm using Robert Fischer's improved JQuery PeriodicalUpdater JQuery Periodical Updater
0.666667
JQuery Templates JQuery Selectors Stream-Hub
Will paprika taste good in my soup?
I've been making a soup that has an onion + garlic + carrot + celery + flour base, and then chunks of sweet potato and potato as well as barley added. I've been spicing it with salt, pepper, garlic powder, and basil. Now I want to substitute paprika for the basil. Would that ruin the soup?
Paprika brings out the best in savory flavors. I'd go with something a little hotter to compliment the sweetness of the sweet potato - but not too hot, or you'll loose the regular spuds.
1
Paprika brings out the best in savory flavors
Is it possible to print on 0.035 mm copper foil with a laser printer?
I have seen 0.035 mm copper foil. Until now I have used toner transfer method to etch my PCBs. If one could print on this foil directly it would be almost to good to be true. Any experience or thoughts on that matter?
A laser printer uses patterns of static electricity to control where the toner sticks to the paper. So the media cannot be conductive. Copper will not work.
1
A laser printer uses static electricity to control where the toner sticks to the paper
How to ask a question according to the specific sections?
(1)I get up early in order to catch a bus. (2)I get up early because I can catch a bus. How to ask a question according to “in order to catch a bus ” and "because I can catch a bus"?
Because of (or on account of) what circumstance do you get up early? is a question that (2) can answer, but (1) cannot. This takes advantage of the fact that in (2) you are indicating both a reason to get up early, and also a fact -- namely, that there is a bus to take (I 'can' catch a bus implies that there is a bus to take). In (1) you might try to get up early to catch a bus, without expecting that one is very likely to be there. You might think there's only a fifty-fifty chance. By contrast, I don't think that there is any question that (1) answers that (2) doesn't also answer. The reason is that (2) has 'extra information' but otherwise implicitly indicates a purpose, just like (1).
0.777778
What is a reason to get up early?
Why did OCP build Robocop?
It seems like building the Robocop was a really stupid business approach: You can't build them on industrial scale (to put it somewhat insensitively, OCP didn't have a ready supply of highly trained and freshly killed police officers) So, Robocop seemed like a prototype that could never have entered production. Total waste of R&D money. And having a police brain (because he already know police procedure) seems not necessary since at the same time OCP could build fully AI robots (from robot chicken, flawed as it was, in Robocop 1, to Ninja Androids in Robocop 3).
Robocop was their "Plan B". "Plan A" was ED-209. As explained by Johnson (in the script): When ED209 ran into serious delays the old man ordered a backup plan. Probably to light a fire under Jones' ass. Old Bob here gets the assignment. Nobody in Security Concepts takes it seriously. Note that part at the end which agrees with your question - initially the Robocop program was not taken seriously. However, when the ED-209 spectacularly failed during a boardroom meeting, Bob Morton took the initiative: Old Man: Dick, I'm very disappointed. Dick Jones: I'm sure it's only a glitch, a temporary setback. Old Man: You call this a glitch? We're scheduled to begin construction in six months. This "temporary setback" could cost us millions in interest costs alone. Bob Morton: Not necessarily, sir. You may be aware of the Robocop program designed by myself at Security Concepts as a contingency against just this sort of thing. Dick Jones: Thank you for your concern. This is something we could... Old Man: Wait a minute. Dick! Maybe what we need here is a fresh perspective. Tell me about your plan. How long will it take? Bob Jones: We've restructured the police department and placed prime candidates according to risk factor. I'm confident we can go to prototype within 90 days. Old Man: Very good. Get your staff together. I'll expect a full presentation in my office in 20 minutes. Bob Morton: Thank you, sir. Nevertheless, after only one month on the streets, Bob Morton predicted: Here at Security Concepts, we're predicting the end of crime in Old Detroit within 40 days. There's a new guy in town. His name's RoboCop. So, even though he couldn't be mass produced, that wasn't necessary. On his own, Robocop dramatically reduced crime, not least by killing the crime lord Clarence Boddicker and drug baron Sal and shutting down their respective operations. This also matches one of the themes of the film - American corporations' big, mass-produced machines (the ED-209 and 6000 SUX) versus the underdogs, most notably Alex Murphy / Robocop. The script link has some errors. I've tried to patch it from memory but there might be a few words wrong.
1
Robocop's "Plan B" was ED-209 .
Is it wise (and common) to publish in a peer-reviewed journal without an impact factor to prevent impairement of one's own mean impact factor?
I recently found out that a team of colleagues published in a journal without impact factor, though peer-reviewed. According to my supervisor this happens sometimes when the study cannot be published in a top journal, and then it could be better to do so than publish in a low profile journal whose impact factor would drag down the mean impact factor of the papers published by that team. Is this common? If so, which elements can specifically drive a research team to choose this option?
This reasoning is Wrong and Bad in several ways. First, computing "mean impact factor" for a person or group is insane and should be resisted at all costs. Even amongst IF-crazy groups, the metric is generally how many high-IF publications have been obtained (ignoring low-IF publications), not the fraction of high-IF publications. Second, even if you're going to commit yourself to such insanity, the reasonable mathematical interpretation of "no impact factor" is "IF = 0", not "omit from data." Thus, if you're using this crazy statistic, it should be worse to publish in a no-IF venue. Finally, a journal with no IF generally falls into one of two categories: either it is good but very new (or just not yet covered by ISI), in which case it will likely have an IF in a couple of years and the strategy will be undone, or else is it complete trash and likely predatory, in which case it will be a worse stain on your record than a moderate-IF publication, even amongst the most IF-crazy communities. My only possible conclusions are that either: your supervisor is seriously distorted in their thinking, or your supervisor is lying to you out of embarrassment to cover the fact that they published (intentionally or accidentally) in a trash/predatory journal.
1
"mean impact factor" for a person or group is insane and should be resisted at all costs
Maximal ideal in $\mathbb{Q}[x,y]$
I am trying to prove that $(x,y)$ is a maximal ideal of $\mathbb{Q}[x,y]$. Since an ideal $I \subseteq R$ is maximal if and only if $R/I$ is a field, it suffices to prove that $\mathbb{Q}[x,y]/(x,y)$ is a field. Let $\phi : \mathbb{Q}[x,y] \rightarrow \mathbb{Q}$ be the evaluation homomorphism that sends $p(x,y)$ to $p(0,0)$. $\phi$ is clearly surjective and if I prove that the kernel of $\phi$ is the ideal $(x,y)$, the result will follow by the First Isomorphism Theorem. $(x,y) \subseteq Ker(\phi)$ is obvious, but to prove the reverse inclusion, my idea is to take a polynomial $p(x,y) \in Ker(\phi)$ and to perform Euclidean division of $p(x,y)$ with $y$ and $x$ in $(\mathbb{Q}[x])[y]$ and $(\mathbb{Q}[y])[x]$ respectively. The problem is that neither of them is a polynomial ring over field. There is a theorem saying that if R is commutative and if $R[x]$ is a PID, then $R$ is a field. Since neither $\mathbb{Q}[x]$, nor $\mathbb{Q}[y]$ are fields, it follows that neither $(\mathbb{Q}[x])[y]$, nor $(\mathbb{Q}[y])[x]$ are PIDs, hence are not Euclidean domains. Obviously, Euclidean division does not solve the problem. If we consider $p(x,y)$ as an element in $(\mathbb{Q}[x])[y]$ and if we divide by $y$, then we get a quotient $q(x,y)$ and a remainder which is $0$ or of degree $0$ over $(\mathbb{Q}[x])[y]$, hence a polynomial $r(x)$ in $x$ only. Then, $p(x,y) = yq(x,y) + r(x)$ and the hypothesis $p(0,0)=0$ does not guarantee that $r(x)=0$. So, we cannot conclude that $y$ divides $p(x,y)$. Is there a way to remedy this proof, or is there another approach to this problem?
Take an element $p \notin (x, y)$. You can always represent it this way $p = xf + yg+ h$ where $f, g\in\mathbb{Q}[x,y], h \in \mathbb{Q}$. Then it follows that $h \neq 0$ since $p \notin (x, y)$. Then $h$, which is invertible is in $(x, y, p)$, which means that $(x, y, p) = (1)$. Then $(x, y)$ is maximal because the only ideal which strictly contains it is $(1)$.
0.777778
$p notin (x, y)$)
How to delete application data on install and reinstall
How to delete application data on install/reinstall application, so I can have a clean working environment on every reinstall ? I mean how to detect that this application has been reinstalled so I can clean the whole persistent store. Thanks.
In the 5.0 APIs there is a new class called CodeModuleListener which you could use to monitor when your modules are being uninstalled. Prior to 5.0 though, there are no hooks. However, here are a few ideas to think about and/or try: Use the CodeModuleManager methods getModuleDownloadTimestamp() or getModuleTimestamp() (not sure which one would give the proper information) to look up the "install time" of the module, then store it in persistence. Then each time the app is started, read the value from the module again and compare it to the persisted value. If the module value is newer, then the app was reinstalled. If you store a non-native class in the Persistent Store (i.e. a subclass of Hashtable), it will be removed from the persistent store when you uninstall the app (since without the app, the class is meaningless). So all you need to do is create a subclass of Hashtable and store that in your persistent store (with your actual data as keys), and it will be automatically removed from the store when the user uninstalls the app.
1
Using CodeModuleListener to monitor when modules are being uninstalled
Which is the older sense of the word "linguist"?
I have been listening to some rants on YouTube against people learning a bunch of languages calling themselves "linguists". I'm personally interested in both linguistics and languages as a hobby but I have no official training and certainly no qualifications in either. My instinct was that the ranter was kind of right in his opinion that people who speak many languages are not linguists. But I was uncomfortable with his opinion that you had to have certain pieces of paper to be called a linguist, I think "post doctorate" from memory. So I looked up "linguist" in some imperfect online dictionaries and was surprised to find both senses. Here's the defs from oxforddictionaries.com (chosen at random): A person skilled in foreign languages. A person who studies linguistics. Now I don't have access to a better dictionary on historical principles from my current location. I would like to know which of these senses is the original one? My original opinion was the latter sense but on thinking about it I now expect it to be the former. I doubt the word would be a back-formation from "linguistics". As a side question, would the first sense now be considered to be colloquial or at least nontechnical or outdated?
The earliest sense of linguist simply means a skilled speaker, such as a rhetorician (Online Etymology Dictionary): linguist (n.) 1580s, “a master of language, one who uses his tongue freely,” a hybrid from Latin lingua “language, tongue” (see lingual) + -ist. Meaning “a student of language” first attested 1640s. The original sense survives in the double entendre cunning linguist. The word didn’t refer to the study of language until later, and to linguistics much, much later: linguistics (n.) “the science of languages,” 1847; see linguistic; also see -ics. linguistic (adj.) 1856, from French linguistique (1833); see linguist + -ic. The use of linguistic to mean “of or pertaining to language or languages” is “hardly justifiable etymologically,” according to OED, but “has arisen because lingual suggests irrelevant associations.” Before that, the study of language was called philology. philology (n.) Meaning “science of language” is first attested 1716 (philologue “linguist” is from 1590s; philologer “linguistic scholar” is from 1650s); this confusing secondary sense has not been popular in the U.S., where linguistics is preferred. J.R.R. Tolkien was a renowned philologist.
1
The earliest sense of linguist means a skilled speaker, such as a rhetorician
Solving a two point boundary problem for a piecewise system of equations
I'm trying to solve a two point boundary value problem with a piecewise system of equations like: dx[t_] := Piecewise[{{0, y[t] <= 0}, {x[t]^(3/4) - x[t], y[t] > 0}}] dy[t_] := Piecewise[{{0, y[t] <= 0}, {(1 - y[t])/x[t]^(1/4) + y[t], y[t] > 0}}] NDSolve[{x'[t] == dx[t], y'[t] == dy[t], x[0] == 1, y[10] == 2}, {x, y}, {t, 0, 10}] which produces the error NDSolve::bvdisc: NDSolve is not currently able to solve boundary value problems with discrete variables. I tried the answers here by entering funs = ParametricNDSolveValue[{x'[t] == dx[t], y'[t] == dy[t], x[0] == 1, y[10] == yt}, {x, y}, {t, 0, end}, yt] FindRoot[funs[yt][end], {yt, 2}] which yields the same error. Is there any way to solve this system? Thanks for the help.
There is no need to use Piecewise because both $x(t)$ as well as $y(t)$ remain non negative. Furthermore, the equation for x is independent of y and can be solved analytically. The result $x(t)$ is then put into the equation for $y(t)$ which will be solved numerically. Finally we verify our first statement about the non-negativity. Ok, here we go. The eqution for $x(t)$ is sx = DSolve[x'[t] == x[t]^(3/4) - x[t] && x[0] == 1, x[t], t] We can safely ignore the error messages; they are just information which is not relevant here. (* Out[105] = {{x[t] -> E^-t (-2 + E^(t/4))^4}, {x[t] -> E^-t ((-1 - I) + E^(t/4))^4}, {x[t] -> E^-t ((-1 + I) + E^(t/4))^4}} *) Taking the real-valued solution xx[t_] = x[t] /. sx[[1]] (* Out[106]= E^-t (-2 + E^(t/4))^4 *) Plot[xx[t], {t, 0, 30}] Now solving numerically the equation for $y(t)$ using the previously obtained function $xx(t)$: sy = NDSolve[y'[t] == (1 - y[t])/xx[t]^(1/4) + y[t] && y[0] == 10, y[t], {t, 0, 50}][[1]] $\{y[t]\to \text{InterpolatingFunction}[\{\{0.,50.\}\},<>][t]\}$ Works out smoothly, no precision problems. Here's the function itself yy[t_] = y[t] /. sy $\text{InterpolatingFunction}[\{\{0.,50.\}\},<>][t]$ Finally ploting both functions together, magnifying $x(t)$ by a factor of ten for better visibility: Plot[{10 xx[t], yy[t]}, {t, 0, 30}, PlotRange -> {-1, 20}, PlotLabel -> "blue x(t), red y(t)"] Nice problem. Hope this helps. Regards, Wolfgang
0.666667
The non-negativity of the equation for $y(t)$ is solved numerically
Best way to move live site local
I'm trying to move a big site that's currently live onto my local machine so I can edit locally. I'm using Wamp Server. I've tried using the Duplicator plugin but I'm getting several warnings and errors when I try to unpackage it locally. Is there a more foolproof way to do this? Otherwise, would it be easier to move the live site onto a sub-domain on my personal site? Something like 'site.com/clients/test-site'? I just need an environment where I can make changes without affecting the live site.
Why didn't you try to copy your live website manually. It's not as easy as using a plugin but much more error proof. You will need to follow these steps. Make a dump of MYSQL database on server. mysqldump -u username -p -h localhost dbname > domain.sql Create a archive of your WordPress website on server. tar -czf domain.tar.gz domain.com Download both on local machine. And extract the archive. tar -xzf domain.tar.gz Import database at local machine. mysql -u username -p -h localhost dbname < domain.sql Now change wp-config.php values for local server. Change domain name in MySQL. You can run these mysql queries to replace it with local domain setup. UPDATE wp_options SET option_value = replace(option_value, 'http://www.oldurl.com', 'http://www.newurl.com') WHERE option_name = 'home' OR option_name = 'siteurl'; UPDATE wp_posts SET guid = replace(guid, 'http://www.oldurl.com','http://www.newurl.com'); UPDATE wp_posts SET post_content = replace(post_content, 'http://www.oldurl.com', 'http://www.newurl.com'); UPDATE wp_postmeta SET meta_value = replace(meta_value,'http://www.oldurl.com','http://www.newurl.com'); Or simply define these in wp-config.php, these will overwrite domain URLs in database. I think this will be better for local development. define( 'WP_HOME', 'http://example.com/blog' ); define( 'WP_SITEURL', 'http://example.com/blog' ); Done. I develop and move nearly 7-10 WordPress websites each month and this is what I do. I can't say it's better than using a plugin or any other migration tool but it's more controlled. And once you get familiar with the process, there are very less chances of error.
1
How to copy your live website manually?
Why are these files in an ext4 volume fragmented?
I have a 900GB ext4 partition on a (magnetic) hard drive that has no defects and no bad sectors. The partition is completely empty except for an empty lost+found directory. The partition was formatted using default parameters except that I set the number of reserved filesystem blocks to 1%. I downloaded the ~900MB file xubuntu-15.04-desktop-amd64.iso to the partition's mount point directory using wget. When the download was finished, I found that the file was split into four fragments: filefrag -v /media/emma/red/xubuntu-15.04-desktop-amd64.iso Filesystem type is: ef53 File size of /media/emma/red/xubuntu-15.04-desktop-amd64.iso is 1009778688 (246528 blocks of 4096 bytes) ext: logical_offset: physical_offset: length: expected: flags: 0: 0.. 32767: 34816.. 67583: 32768: 1: 32768.. 63487: 67584.. 98303: 30720: 2: 63488.. 96255: 100352.. 133119: 32768: 98304: 3: 96256.. 126975: 133120.. 163839: 30720: 4: 126976.. 159743: 165888.. 198655: 32768: 163840: 5: 159744.. 190463: 198656.. 229375: 30720: 6: 190464.. 223231: 231424.. 264191: 32768: 229376: 7: 223232.. 246527: 264192.. 287487: 23296: eof /media/emma/red/xubuntu-15.04-desktop-amd64.iso: 4 extents found Thinking this might be releated to wget somehow, I removed the ISO file from the partition, making it empty again, then I copied the ~700MB file v1.mp4 to the partition using cp. This file was fragmented too. It was split into three fragments: filefrag -v /media/emma/red/v1.mp4 Filesystem type is: ef53 File size of /media/emma/red/v1.mp4 is 737904458 (180153 blocks of 4096 bytes) ext: logical_offset: physical_offset: length: expected: flags: 0: 0.. 32767: 34816.. 67583: 32768: 1: 32768.. 63487: 67584.. 98303: 30720: 2: 63488.. 96255: 100352.. 133119: 32768: 98304: 3: 96256.. 126975: 133120.. 163839: 30720: 4: 126976.. 159743: 165888.. 198655: 32768: 163840: 5: 159744.. 180152: 198656.. 219064: 20409: eof /media/emma/red/v1.mp4: 3 extents found Why is this happening? And is there a way to prevent it from happening? I thought ext4 was meant to be resistant to fragmentation. Instead I find that it immediately fragments a solitary file when all the rest of the volume is unused. This seems to be worse than both FAT32 and NTFS.
3 or 4 fragments in a 900mb file is very good. Fragmentation becomes a problem when a file of that size has more like 100+ fragments. It isn't uncommon for fat or ntfs to fragment such a file into several hundred pieces. You generally won't see better than that at least on older ext4 filesystems because the maximum size of a block group is 128 MB, and so every 128 MB the contiguous space is broken by a few blocks for the allocation bitmaps and inode tables for the next block group. A more recent ext4 feature called flex_bg allows packing a number of ( typically 16 ) block groups' worth of these tables together, leaving longer runs of allocatable blocks but depending on your distribution and what version of e2fsprogs was used to format it, this option may not have been used. You can use tune2fs -l to check the features enabled when your filesystem was formatted.
0.777778
Fragmentation becomes a problem when a file of 900mb has more like 100+ fragments
Was the Second Doctor's "regeneration" actually a regeneration?
I recently saw a mix up of all of the Doctors regeneration scenes. When the second Doctor changes to the third (from Patrick Troughton to Jon Pertwee in "The War Games, Part Ten" (1969)), it is forced on him as punishment before being exiled to earth. The Doctor was not critically injured or dying. The transformation was the Time Lords doing. Does this really count as one of the 12 regenerations?
Yep, it was his first regeneration
1
Yep, it was his first regeneration regeneration
Two generated tones creates a side tone - how to avoid the side tone
I'm trying to create two tones at different frequencies. So I have one tone at 15000 Hz and one at 15400 Hz using Audacity. The problem i'm running into is there is a third tone created at a much lower frequency I can tell exists from both my ears and a spectrogram. How can I get rid of the lower tone? Where does it come from? I only have two tracks
As far as hearing goes, there are non-linearities in the human cochlea that can produce perceived difference tones at certain volume levels and frequencies. Quantization noise in small enough digital signals might also create enough non-linear mixing to show up in FFT results. Noise shaping in the quantization could help reduce this possibility. Any other non-linearities in the system are also potential difference/sum intermodulation/beat tone sources.
0.888889
Non-linearities in the human cochlea can produce perceived difference tones at certain volume levels and frequencies
Why is CuSO4 used as electrolyte while purifying copper?
During the electrolytic purification of copper, the electrolyte is taken as copper(II) sulphate ($\ce{CuSO_4}$). Is there any particular reason for this? Could another salt of copper, say $\ce{CuCl_2}$ work? I mean, I don't see any reason why it shouldn't. The only difference will be, that at the anode chlorine instead of oxygen will be evolved, which doesn't seem to be such a big thing. Why, then, is $\ce{CuSO_4}$ preferred?
During copper electrorefining, impure $\ce{Cu}$ from the anode is oxidized and dissolved, while $\ce{Cu^2+}$ is reduced at the cathode, forming the deposit of refined copper. Because anodic impurities which are less noble than copper – most notably $\ce{Ni}$, $\ce{As}$ and $\ce{Sb}$ – also dissolve in the electrolyte, the cell voltage is kept in the range of 0.2-0.4 V to avoid co-deposition of these metals at the cathode. Copper dissolution is the main oxidation half-reaction at the anode, and the oxidation of anions from the electrolyte needs to be minimized, since it is an unwanted side reaction which reduces current efficiency of the process. In a $\ce{CuSO4}$ electrolyte, this would be oxidation of $\ce{OH-}$ (from water dissociation, so concentration will be low) to $\ce{O2}$, while in a $\ce{CuCl2}$ solution, $\ce{Cl-}$ will be oxidized to chlorine gas, which would present a greater hazard because of its toxicity. The electric conductivity of the electrolyte is another important factor, which varies with different copper salts and their concentrations. $\ce{CuCl2}$ and $\ce{CuSO4}$ are both readily soluble in water; however, the relative molar conductivities of these solutions will be different. In this study, a copper chloride electrolyte proved to be inferior to copper sulfate and copper nitrate in terms of deposit quality and stability of cell potential.
0.833333
oxidation of anions from the electrolyte at the cathode
What is the difference between "section" and "part"?
What is the difference between "section" and "part"? The Longman Dictionary of Contemporary English says for "section": one of the parts that something such as an object or place is divided into and says for "part": a piece or feature of something such as an object, area, event, or period of time I know that "section" is smaller than "part" in size, but I'm totally confused about their usage in sentences. For example, is "the front section of the car was damaged" correct grammatically? Or is "in sections of Canada, French is the first language" correct?
These are general words that don't have concrete definitions in the sense that you seem to be driving at. Both are used when some large "thing" is divided into smaller "things". There's no rule that a section is 1/10 of the whole while a part is 1/20 of the whole or any such. Note that while "part" can be used generally to mean a subdivision, it also has the more specific meaning of a discrete mechanical component within a larger assembly. Like we routinely refer to "car parts" meaning spark plugs, oil filters, alternators, etc. But then these parts can often be broken down into yet smaller parts. Like an alternator may have a rotor, a stator, an armature, mounting bolts, etc. So in the case of a mechanical device, I'd avoid using "part" in the more generic sense. Like I'd say "the front section of a car" rather than "the front part of a car". It's not necessarily true that a section is smaller than a part. If you said, "For this discussion, we will divide the nation into three major sections, and each of those sections into several parts", I can't imagine that anyone would find that confusing on the grounds that parts should be divided into sections and not vice versa. Divide things up as is convenient in context.
0.888889
"part" can be used to mean a subdivision, but also a discrete mechanical component within a larger assembly
Is it possible to Cap a GridFS collection?
I'm trying to store my application results in a mongo database. There are some issues to this, first we generate a lot of data because it is raw image files, up to 50MB per record and 5 records per second at full speed, that's worst case though not typical. This isn't a problem using gridFS. In the mongod.cfg we are using directoryPerDB: true and I create a symlink for the Results database folder to a dedicated SSD where all the results database is kept. All the settings data is kept in a couple different databases on the OS drive, and the results data has a dedicated drive. This is all working great for our application. My problem is filling up the results disk. I need to basically have a capped collection to a max size, and then delete only the oldest files. But I don't see a way to do this with gridFS? Is there a setting or something I'm missing that would allow capping this? I found this answer GridFS disk management but that seems to apply to mongod, and i don't think you can set a quota per database as the Results database is the only one I need to be limited. At this point I guess i will write a task that cleans the oldest files out periodically if the total is over a threshold limit, i'm just afraid this is not going to be very efficient. Are there any recommendations on the best way to handle this?
To make a long story short: you can not cap GridFS in a useful way. Here is why: When you store a file in GridFS, it is split into chunks of 255kB, by default in a collection named fs.chunks, which absolutely can be capped by doing db.createCollection("fs.chunks",{capped:true, size:52428800}) The capping would apply to those chunks, which are individual documents. So when you add a file which would make the fs.chunks to exceed its cap, only chunks of the oldest files would be removed. Another problem would be that the files metadata, which is stored in fs.files by default, would not be updated, leaving stale entries in fs.files for which no entries in fs.chunks are present any more, or – worse – only a fraction of the chunks are still present. There are ways to overcome this (checking if the size in bytes of the chunks combined equals the length field of the fs.files document of the respective file, for example), but they are at least as complicated (and much slower!) as doing a check pre-insert wether the collection would exceed the threshold using the collections stats and delete as many of the oldest files as needed to fit the new file in without exceeding the threshold. The latter, by the way, is my suggestion on how to solve your problem. Another solution would be to use a dedicated instance with the limitations applied in my answer to the question you mentioned.
0.888889
How to cap GridFS in a useful way
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.
You must use noConflict as you are also using mootools <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 type="text/javascript"> $.noConflict(); // Code that uses other library's $ can follow here. //from here you must use jQuery instead of $ or you could do jQuery(document).ready(function($) { // Code that uses jQuery's $ can follow here. }); </script>
0.888889
Use noConflict as you are also using mootools
Why was this grammar & formatting edit rejected?
About: http://stackoverflow.com/review/suggested-edits/1962857 Recently, I've been suggesting a lot of edits - to make the site better. Scrolling through the list of my suggestions, I saw that this was rejected: http://stackoverflow.com/review/suggested-edits/1962857 - mostly with the This edit is too minor; suggested edits should be substantive improvements addressing multiple issues in the post. reason. However, if you look at the edit, it is substantial. It clarifies the question, and provides grammar and formatting fixes. Any help?
Most likely because of the unneeded inline code blocks. Those do not always make things easier to read. When used excessively for things that are easily identifiable as code, such as UITableView, they actually make the post harder to read. Reserve its use for segments of code that belong together or for keywords that would otherwise not make sense in the context of the post without being identified as inline code. I, personally, would have skipped this one because I don't have any strong feelings one way or the other. Just a note: changing "I am" to "I'm" is really not edit-worthy. I don't know why you even made that change.
0.888889
Inline code blocks make the post harder to read
TikZ: How to decorate a path with the open diamond arrow tip that "bends" with the path?
I have a curved path that I want to put an open diamond arrow tip on. Here is a MWE with my best attempt: \documentclass{article} \usepackage{tikz} \usetikzlibrary{arrows,decorations.markings} \begin{document} \begin{tikzpicture}[decoration={ markings, mark=at position .5 with {\arrow[>=open diamond] {>} } } ] \node (0) {}; \node (1) [right of=0] {}; \node (2) [below right of=1] {}; \path (0) edge[out=0, in=135, postaction={decorate}] (2); \end{tikzpicture} \end{document} As you can see, the bottom-right point of the diamond is perfectly on the path, but the top-left point is clearly above the path. It appears that the diamond lies on the tangent line of the path at the bottom-right point of the diamond. Question: How can I place this open diamond arrow tip so that both points of the diamond are on the path? Bonus Question: What is the best solution to make the area inside the diamond completely white? I don't want to see the path in the inside of the diamond. I currently have a solution that I feel is a hack, which is to place a white (closed) diamond arrow tip in the same spot first: mark=at position .5 with {\arrow[>=diamond, white] {>} },
You can mark the curve with a node with diamond shape and customize its aspect ratio for your needs. \documentclass{article} \usepackage{tikz} \usetikzlibrary{decorations.markings,shapes} \begin{document} \begin{tikzpicture}[decoration={ markings, mark connection node=connode, mark=at position 0.5 with { \node[transform shape,shape=diamond,fill=white,draw] (connode) {}; } } ] \node (0) {}; \node (1) [right of=0] {}; \node (2) [below right of=1] {}; \path (0) edge[out=0, in=135, postaction={decorate}] (2); \end{tikzpicture} \end{document} I have edited the code for a slightly better placement however it is still not perfectly following the curvature, this is due to the size of the diamond shape compared to the curvature in the markings library and I don't see a direct fix other than drawing to an intermediate diamond node and then drawing to the final point.
1
Mark the curve with a node with diamond shape
Drywall - final joint compound coat
While remodeling an older house (where nothing is quite straight) we used fiber glass mesh joint tape and 3 coats of joint compound. The first coat was applied with a 4 inch knife, the second with an 8 inch and ending the third on a 12 inch knife. I can still see the texture from the mesh tape I used on some of the joints. I hoped that a coat of primer would level it off, but after using Kilz 2 primer I can still see the tape in some spots. :( Sanding through the primer now proves difficult (doesn't work) with a medium grit sanding block. Should I add another coat? I could never quite get the joint compound to adhere over the mesh tape. I've always been taught to go as thin as I can on the joint compound to reduce the sanding part. Did I go too thin? I'm hoping a second coat of primer and 2 coats of the final latex paint hides it, but I know this isn't the right answer. How can I fix this? following what doresoom and shirlock said; i just applied a coat with the 12 inch knife practically against the wall (accidentally touching the wall with the handle once or twice) - more or less dragging the compound across the surface this produced the result explained - about 1/32nd ? thickness of mud, covering the tape that i'll need to feather round the edges i miss spoke earlier - i was using a sponge sanding block (not strait paper sand paper) now that the primer has dried (did it saturday) its not as bad as i thought it was, but this is the right way to do it (not covering it with paint) just as a side, we've used sherwin williams paint throughout the house and although its great paint (IMO) the plaster and lath walls that remain, even those repairs show through - and if those do, than this new work will... may as well do finish it right... thanks for the help guys - i'll check this coat tomorrow and give a last one with the soap and water if it needs it.
I know this isn't the answer you want to hear, but I don't think priming and painting will hide the tape. Before you apply any more primer, I'd add another thicker coat of mud. Slather on the mud thick first - it doesn't have to be smooth. Then smooth it out by angling your 12" knife so it's almost parallel with the drywall as you drag it along the surface. You'll have to press fairly firmly in order to avoid air gaps appearing in the thick coat you're smoothing out. You may have to get a feel for it. If you push too hard and can see the tape again, redo that section until you get it just right. Wait for the thicker coat to dry, then sand the edges as smooth as you can get them. Very carefully/lightly sand over area covering the tape if you didn't get it quite smooth. You may need to do a second coat along both sides of the thicker coat to make it join the drywall surface smoothly.
1
Slather on mud thick first - it doesn't have to be smooth .
How do native speakers 'guess' the pronunciation of the letters in a word they see for the first time?
I confess! Being a non-native speaker, I struggle a lot especially when I come across a new word. And I wonder how do native speakers pronounce perfectly even though they read the word for the very first time. There should be some rule/technique? I'm not sure. Let's take a case. If I see a word having 'ch' for the very first time, how do I guess it? Remember, I don't have dictionary. Nor do I have access to this great site when I encounter that word. For example, Take the word 'chariot'. Being a non-native with quite limited knowledge of orthography, I know that 'ch' is pronounced as in 'Charles' But then, imagine, I came across the word 'charade'. Undoubtedly, for me, it is 'ch (as in Charles)-re-d-s'. But then, actually, 'ch' there is 'sh' (as in Shane). It's not just 'ch' but it goes for 'g' as well. 'G' as in 'goat' or 'g' as in 'gymnastic'. Is there any source that teaches how to pronounce a letter if it is placed after/before certain letter? Is there any such rule? The one I remember is when a word ends with 'mb', you don't pronounce 'b'. 'Bomb', 'Comb', 'Tomb' and many other words ending with 'b'. There are a few more words that add another nail in the coffin of my pronunciation complexity! penis (pee, and not as in 'pen') asthma (no 'th' pronounced) Dengue (dengeee) and many more...
By analogy with words you already know. In more detail, you guess mainly by recognizing morphemes, taking into account the three main spelling systems that exist within English and taking into account common phonetic pressures that alter pronunciations. Educated guessing cannot be reduced to rules, of course, but I can give you a feel for it with a scattering of examples. Morphemes Morphemes are the smallest elements of a word that have a meaning. For example, -ing and -tion are morphemes, as in going and information. If you know a lot of morphemes, you will be good at guessing pronunciation, because morphemes are usually spelled in only one or two ways, and their pronunciation in one word usually works by analogy with their pronunciation in other words. For example, if you've seen -tion carrying that meaning in a number of words, you intelligently guess that it's pronounced the same way in a word you've never seen before, such as, say, transubstantiation. By analogy with relation, generation, acceleration, and many similar words, even transmission, which has the other spelling of the morpheme and is preceded by a different vowel, you can reasonably guess that conflagration has the stress on the second a. And you can intelligently guess that informational has the stress on -mā-. This doesn't give you the correct pronunciation in every single case—equation is slightly different—but this is fundamentally how English spelling and pronunciation work: by analogy with related words, where having the same morpheme is the most important kind of relation. Etymological spelling English actually has three main spelling systems, corresponding to its three main root languages: Anglo-Saxon, Latin, and Greek. Anglo-Saxon In an Anglo-Saxon word, a vowel needs to be followed by two consonants or a consonant at the end of a word in order to be short. For example, batted vs. bated, chipped vs. griped. You know that mob is /mǒb/, not /mōb/, because of this pattern. In Anglo-Saxon words, it's as if every vowel wants to be long, but gets cut short by a terminal consonant. In Anglo-Saxon words, ch is usually pronounced /tʃ/, the "native" pronunciation. Latin Not so in words from Latin. Risible is /ˈrĭz.ə.bl/, not /ˈrīz.ə.bl/, and there's really no way to guess that, except perhaps by a rather superficial analogy with divisible and visible. Words from Latin usually follow pretty regular spelling, but in many cases you can't tell whether a morpheme's vowel will be long or short from its spelling—though often you can make a good guess by analogy with other words. The soft pronunciations of c and g before i and e began in Latin, and were only introduced into English with the Norman invasion. So, Latin-derived words are normally pronounced that way, and most of the exceptions come from Anglo-Saxon, such as get, girl, and together. Anglo-Saxon words like bagged and bagging use the doubled g to indicate that the preceding vowel is short, so the g stays hard. Exaggerate and suggest come from Latin, so you know not to expect their soft g to make a good precedent for Anglo-Saxon words. Greek Words from Greek have a distinct spelling system, where English letters correspond to Greek letters: ch stands for the Greek letter χ; ph stands for the Greek letter φ; k stands for the Greek letter κ; th stands for θ; etc. The Greek sounds of these letters are approximated by English phonemes, as in chrysanthemum, metaphor, photon, system, synchronize, autarky, etc. Notice that ch in Greek-derived words is pronounced /k/. Greek consonant clusters that don't occur in English get reduced, as in psychology, bdellium, and pneumonia (but not sphere: we allowed /sf-/ to start a syllable in order to absorb that word). Eu- in Greek words is a morpheme meaning "good", and is pronounced /ju-/, as in eulogy and euphemism. Leonhard Euler is German, so you learn not to make an analogy between his name and Greek words. The main difficulties with Greek-derived words involve the letters g and y, especially when they occur together. In Greek-derived words, g stands for the Greek letter γ, which we would normally represent in speech with a hard g as in gynecology and gigabyte, but phonetic pressures and misunderstandings have usually set precedents that make it soft, as in gymnasium and gyroscope. It goes silent when it's part of a reduced, un-English consonant cluster, as in gneiss. In the middle of Greek-derived words, y stands for υ, but at the end, it stands for -εια, which means the same as Anglo-Saxon -ness. The Greek vowel υ doesn't correspond well to any English vowel. Usually it's pronounced as a short /ĭ/, but English phonetic pressures sometimes shape it into a long /ī/, as in hypothesis, psychology, and papyrus. The -gy ending is a morpheme, pronounced /-dʒē/ (unstressed), found in energy, synergy, biology and even analogy, the main concept that explains how English works! Can you really guess the origin of an unknown word? You might wonder, "How am I supposed to guess which language a word came from?" It's surprisingly easy. Anglo-Saxon, Latin, and Greek words tend to have a very different "feel" to them, and the spellings of the words tend to follow patterns that are fairly easy to recognize. Noticing the different styles of words from each main root language is an important part of mastering English, including its huge vocabulary of synonyms. There are, of course, a few words that picked up spellings by "false etymology", such as ache and ptarmigan, but happily, it doesn't matter, because if you guess these words' pronunciations by the usual analogies, you'll be right. These spellings were established by people trying to follow the same analogies. By the way, roughly 20–30 years ago, many schools stopped teaching children about classical roots and how they're spelled. Consequently, a lot of natives today don't know much about it consciously. So, with this clue, you can learn to do better than a lot of natives! Some kids are still being taught, though, as evidenced by the questions asked in this contest of guessing the spelling of a word (which is harder than guessing the pronunciation from the spelling). Here's an excellent article by an expert on dyslexia, about the true complexity of English spelling and what's involved in learning it. Conflicting precedents Precedents can conflict. For example, you can make a good educated guess about impious by noticing its three morphemes: im-, meaning negation; pi-, meaning reverence or dutifulness, by analogy with pious and piety; and -ous, making an adjective in a Latin style. So, a pretty good guess is to pronounce it /ǐm.ˈpī.əs/. However, impious can also be understood as following the precedent of the Latin word impius. The phonetic pressures in Latin put the stress on the first syllable, and we usually feel the same pressures in English words that come from Latin. In fact, the English word impious, pronounced /ˈǐm.pē.əs/, was borrowed directly from Latin in the 16th century. That pronunciation has been echoed ever since. The -ous spelling in impious is a slightly stretched analogy with Latin borrowings that follow a different pattern. Consequently, both pronunciations are in use today, /ˈǐm.pē.əs/ being more standard. (I prefer /ǐm.ˈpī.əs/, since it communicates the morphemes more clearly. Someone who's never heard it before will easily understand the meaning. /ˈǐmp.ē.əs/ misleadingly echoes imp.) Pressures I knew a native speaker who mispronounced fruition as /ˈfru.ʃən/. He was going by analogy with fruit. But /ˈfru.ʃən/ is a somewhat uneducated guess. The correct pronunciation, /fru.ˈǐʃ.ən/, better reflects both the etymology and the pressure from -tion to put stress on the preceding vowel. The spelling of fruit reflects the fact that it can break up when used as a morpheme in a larger word. And we see the same pattern established in circuit/circuitous and other -uit- words. There is another factor at work here, too, which helps a lot for guessing pronunciations. Experience teaches you that common pressures will likely have removed the second syllable from /ˈfru.ĭt/, but these pressures don't occur in fruition. In English, there's a pressure to merge those last two syllables at the end of a word, as in biscuit, pursuit and circuit. Explaining phonetic pressures is a complex subject, but it's like everything else in English: it works by analogies and precedents, and you get a feel for it from experience. What's relevant here is that the unstressed short vowel has a hard time holding its own against the preceding long, stressed vowel without help from another consonant; the terminal -t offers only very weak support. The word intuit is the only word of this pattern that has kept that unstressed syllable. I think people continue to pronounce it because the words intuitive and intuition are much more common, so when people use the unusual verb intuit, they feel some pressure to echo the corresponding syllable in the familiar words in order to be understood. I have heard people attempt /ǐn.ˈtut/, independently inventing the word during conversation, and then draw back from it because it sounds weird and doesn't clearly indicate the connection with intuition. There is also pressure to avoid echoing the slightly silly verb "toot". Since pronunciation is shaped by interaction between many pressures, if you pay attention to those pressures, you are in a good position to guess the pronunciations of unknown words. Analogies, not rules Some people harp on the fact that English spelling doesn't follow rules, as if this were proof that English is "illogical" or completely without order. Really, though, the English language works like English common law: by precedents, not rules. When deciding new cases, or when inventing new words, people try to be consistent with previous cases or with the spellings of words already in the language. Old cases and familiar words can't pre-decide every aspect of a new case, of course. Law and language accumulate over the centuries, one case and one word at a time, embodying subtlety and hopefully wisdom beyond what could be captured by any fully articulated system of rules. As you get to know the language better, you can often guess pronunciation from spelling pretty accurately, especially with "big" words. When I was in the 2nd grade (age 7), I was given a test where I had to guess the pronunciations of a long list of words, up to "college level". I got nearly all of them right, despite not knowing, at that age, anything about etymological spelling—and despite not having encountered most of the words before. I could usually see some sort of analogy with a word I already knew, and I made an educated guess. That's how it works. The moral of all this is that you should not memorize rules. You should not even memorize the few rules that happen to be true. Memorizing rules runs against the spirit of the language. What you should do is make analogies from specific words to specific words that you already know how to pronounce. Occasionally you'll guess wrong—and that will teach you a new precedent, which you will apply in new situations. Eventually, gradually, you learn to perceive English spellings with acuity. (You can probably guess that it's /ə.ˈcju.ĭ.tē/, despite the spelling's ambiguity, because of its congruity with annuity and gratuity.)
0.888889
How can I guess which language a word came from?
Can I block with my Llanowar elves and then tap it for mana immediately afterward?
My opponent attacks with a 3/3. I block with my 1/1 Llanowar Elves, and have all of my land tapped from my last turn. Can I now tap my Llanowar Elves after it has been declared as a blocker to play Giant Growth on it, make it 4/4 until end of turn, and destroy my opponent's attacking creature when damage is dealt?
Yes, this works just fine. Once a creature is declared as a blocker, it remains a blocker until it is specifically removed from combat (e.g. Regeneration) or the battlefield (e.g. Cloudshift). One thing to note: once a creature is blocked, it remains blocked even if the blocker is removed before damage is dealt. This works great against lifelinkers, since they deal no damage to a creature that is no longer there. It works less well on tramplers, since they just deal all their damage to the player instead.
0.777778
Once a creature is declared as a blocker, it remains a blocked even if the blocker is removed before damage is dealt
Mazda Air Mass Meter - where can I buy one?
I have a 1993 Mazda 323 estate (GLXI 1.6l petrol). It's not been terribly reliable and has suffered from inconsistent idle - sometimes idling fast (~1500 rpm) and sometimes erratically and sometimes cutting out when stopped at lights. The last mechanic I took it to said it was probably a problem with the air mass meter - he did some 'bodges' on it to try and get it working but the car has still failed to start on one occasion. It seems to start and drive ok at the moment, but I'm not sure how much longer it will continue to do so! Is this likely a problem with the air mass meter or is it likely to be something else? Also, does anyone know where I could get hold of a new one? (I'm based in the UK)
I don't know about Mazda, but some manufacturers still stock parts for older vehicles - it might be worth asking at the parts desk at your nearest dealer. It's not the sort of part I'd expect a normal motor factor to stock, although they might still be able to get hold of one. Your best bet is probably to try one of the bigger parts chains such as eurocarparts (who, despite the name, also sell bits of japanese cars), unipart or camberley auto factors (the latter is local to the Berkshire/Hampshire/Surrey area, but I think they do mail order)
0.888889
Some manufacturers still stock parts for older vehicles .
Do Cron_schedule table collects log cleaning status too?
Hi If magento fails to run the log cleaning process as per the configuration then where it does saves the error_log (or) failure status? Magento doesn't clean the log tables periodically. Note: I can't set Cron from cpanel(WHM) to do this automatically, as I don't have option. Any help will be appreciated Thanks
Normally Magento would push a cron error via email to the email address you have entered in the Admin for this. Optionally errors would be logged to exception.log in the var/log directory. [EDIT] You can monitor your cronjob activity with Aoe_Scheduler. That might also give you some more insight into whats going on. [END EDIT] I usually turn of logging since it's not very useful and does a lot of queries per page view. You can turn them off via a modules config.xml by adding <frontend> <events> <controller_action_predispatch> <observers><log><type>disabled</type></log></observers> </controller_action_predispatch> <controller_action_postdispatch> <observers><log><type>disabled</type></log></observers> </controller_action_postdispatch> <customer_login> <observers><log><type>disabled</type></log></observers> </customer_login> <customer_logout> <observers><log><type>disabled</type></log></observers> </customer_logout> <sales_quote_save_after> <observers><log><type>disabled</type></log></observers> </sales_quote_save_after> <checkout_quote_destroy> <observers><log><type>disabled</type></log></observers> </checkout_quote_destroy> </events> </frontend> Or just download the module I've build for this. https://github.com/sandermangel/sama_disablelog
0.777778
Magento pushes a cron error via email to the email address you entered in the Admin
After what period of time does a PhD position count towards the two possible attempts in Germany?
I am not sure if this holds true everywhere, but here in Germany you only get two attemps at getting your PhD. I am currently wondering at which point it counts towards those two attempts. If I were to start a position and quit during the first few weeks, would it still count?
I think you are conflating the issue of being a Wissenschaftliche Mitarbeiter (research personnel) with that of receiving a PhD. It is possible to work in a "research" position for an extended period of time without being part of a PhD process, so such positions obviously would not count towards "two attempts." In addition, it is entirely possible that people might have to move or change positions because of personal circumstances (health, parental leave, or the two-body problem, among other reasons). Restricting people to two "shots" in this manner would be unfair. Instead, I believe what you are referring to is the rule that there are at most two attempts at the thesis defense. If you fail the first one, then you must wait for a prescribed period of time (but not longer than another period of time), and attempt again to defend your thesis. If the second attempt fails, then you are not allowed further attempts. (However, if you work with your advisor, there shouldn't be a problem here, as you shouldn't be allowed to hold a defense if there's a substantial risk of failure!)
1
Restricting people to two "shots" in this manner would be unfair .
Setting a basic footer to a UITableView
How is a basic footer set to a UITableView programmatically? Just a centered text? EDIT: How can the bar color be set and the footer bar position fixed to the bottom of the screen or if the thumbs dont fill a screen, the footer isnt above the bottom of the screen.
You can use UITableViewDataSource callback (just text): - (NSString *)tableView:(UITableView *)tableView titleForFooterInSection:(NSInteger)section Or UITableViewDelegate (any custom view you like): - (UIView *)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section
0.888889
UITableViewDataSource callback
Which color scheme to choose for applications that require long work hours?
I'm working on a ERP / Accounting (lots of tables and data) web app and was wondering what color scheme would be appropriate for this type of application? Users will be sitting in front of their computers for 8+ hours enetering lots of data on daily basis and I would like to make that experience as comfortable as possible to their eyes. Most of these application I've seen are using some sort of a white/grey/blue scheme with white being dominant but I'm concerned that this color might strain their eyes to much especially considering different brightness of monitors and working in the dark. Any help would be appreciated.
I've always felt that for long copy, reversed text is really difficult to read but for long hours it's a godsend. Consider how most programmers look at their environment. There is a good reason for this: The JetBrains Darcula theme has been exceedingly popular as it is both high contrast and desaturated. You can offer a similar option in midnight blues that is equally pleasing on the eyes. Note that we throw out the top and bottom 20% of the brightness scale as well. Would I read a novel like this? Probably not. This style of interface is great for digesting blocks of information for hours on end. It's awful for paragraphs.
1
The JetBrains Darcula theme has been exceedingly popular .
Why was this grammar & formatting edit rejected?
About: http://stackoverflow.com/review/suggested-edits/1962857 Recently, I've been suggesting a lot of edits - to make the site better. Scrolling through the list of my suggestions, I saw that this was rejected: http://stackoverflow.com/review/suggested-edits/1962857 - mostly with the This edit is too minor; suggested edits should be substantive improvements addressing multiple issues in the post. reason. However, if you look at the edit, it is substantial. It clarifies the question, and provides grammar and formatting fixes. Any help?
I think I reject this edit on my bad day, maybe accepting it on my good day. I accept the edit if it makes an obvious improvement : code formatting, repair broken url. When it comes to grammar, spelling, the edit must cover the full post. From what I think, you have just correct the grammar. There is still room for improvement on at least two things: Split the big block of text into paragraph. The text as it stands is not readeable. Correct the indentation of the block code. Too much thing here. In fact, from my point of view, you have transform an unreadeable big block of text into another unreadeable big block of text. As a rule of thumb, if there is more room for improvement when an edit is correcting grammar, I reject as too minor.
1
Correct grammar, spelling and grammar
General error 1651 after a mysql migration
I finished migration from 5.1 to 5.6, and (with the same queries as before) mysql complains right away about: General error: 1651 Query cache is disabled; restart the server with query_cache_type=1 to enable it I don't want the query cache enabled (that's an app with lots of writting), and my file my.ini looks like this: # The MySQL server [mysqld] # ... other parameters... query_cache_type = 0 query_cache_size = 0 Also, on connect, my php connection wrapper always executes SET SESSION query_cache_type = OFF What I don't understand is Why the parameters apparently do not work Why does mysql even have to complain about a parameter that is disabled when it is the user's choice to do so. Enlightment needed - Thanks!
I think the SET SESSION query_cache_type = OFF is causing this. In the Query Cache Configuration page it states: If you set query_cache_type at server startup (rather than at runtime with a SET statement), only the numeric values are permitted. And since you are starting the server with cache disabled, there is no need to use that SET anyway. As to why it throws an error (both with = OFF and = 0), it may have to do with this note in Server System Variables page: query_cache_type ... If the server is started with query_cache_type set to 0, it does not acquire the query cache mutex at all, which means that the query cache cannot be enabled at runtime and there is reduced overhead in query execution. My interpretation is that the variable has both Global and Session scope but only if it not set to off at startup.
1
SET SESSION query_cache_type = OFF is causing this error
Conflicting information about the running kernel version in FreeBSD
I asked a related question about uname before and now want to ask from another angle, because the following simple yet obvious conflicting outputs may mean there is something many people did not think of (me included). I'm running FreeBSD 9 RELEASE; please see the following commands: # sysctl kern.bootfile kern.bootfile: /boot/kernel/kernel # strings /boot/kernel/kernel |grep RELEASE|grep 9 @(#)FreeBSD 9.2-RELEASE-p7 #0: Tue Jun 3 11:05:13 UTC 2014 FreeBSD 9.2-RELEASE-p7 #0: Tue Jun 3 11:05:13 UTC 2014 9.2-RELEASE-p7 The above kernel file suggests the running kernel is 9.2-RELEASE-p7. But... # dmesg Copyright (c) 1992-2012 The FreeBSD Project. Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 The Regents of the University of California. All rights reserved. FreeBSD is a registered trademark of The FreeBSD Foundation. FreeBSD 9.1-RELEASE #0 r243825: Tue Dec 4 09:23:10 UTC 2012 ... # uname -a FreeBSD localhost.localdomain 9.1-RELEASE FreeBSD 9.1-RELEASE #0 r243825: Tue Dec 4 09:23:10 UTC 2012 [email protected]:/usr/obj/usr/src/sys/GENERIC amd64 So dmesg and uname says it's 9.1-RELEASE. I also did an extensive find / -type f -exec grep -l "9.1-RELEASE" {} \;, but I found no possible kernel file that contains 9.1-RELEASE. What could lead to the above conflict, and what kernel am I actually running? Please note I run RELEASE and ran freebsd-update to do a binary update, so no compiled kernel is involved. And I have rebooted multiple times after freebsd-update. And the system is not in jail, etc., just the only system on that computer.
You have probably upgraded the system from 9.1 to 9.2 but failed to reboot it. You might also have simply booted a previous kernel, but given the output you've shown, this seems much less likely. One other possibility comes to mind, that the system is actually inside a jail, running on a 9.1 system, so that while the jail is upgraded to 9.2, the host system is still running 9.1.
0.666667
You upgraded the system from 9.1 to 9.2 but failed to reboot it
Looking for a high temperature potentiometer
Does anyone know of any potentiometers that are rated up to 500 degrees F?
Sure, the vitreous ceramic power type should be capable of 260°C, some are rated for it too. This one, for example, is rated for 320°C, which is more than 600°F.
1
the vitreous ceramic power type should be capable of 260°C, some are rated too .
Python Condensing Code
My code is pretty long and I need help condensing it to make it more convenient. The code I have is suppose to do the set of instructions I commanded it to do on a fluke robot. I am using python. The robot is suppose to do the following code using it sensors. I need help condensing it. EDIT: My code: from Myro import * from Graphics import * init('/dev/tty.IPRE6-366079-DevB') def markYellow(pic): for pix in getPixels(pic): r = getRed(pix) g = getGreen(pix) b = getBlue(pix) if r > 200 and b < 90 and g > 150: setRed(pix,255) setGreen(pix,255) setBlue(pix,255) else: setRed(pix,0) setGreen(pix,0) setBlue(pix,0) def pctMarked(pic): totalPixels = 0 whitePixels = 0 for pix in getPixels(pic): if getRed(pix) == 255: whitePixels = whitePixels + 1 totalPixels = totalPixels + 1 result = whitePixels / float(totalPixels) return result def findAvgX(pic): pixelCount = 0 totalXCount = 0 for pix in getPixels(pic): if getRed(pix) == 255: x = getX(pix) totalXCount = totalXCount + x pixelCount = pixelCount + 1 avgX = totalXCount / float( pixelCount) return avgX def turn(): findAvgX(pic) if wallLocation <= 85: turnLeft(1,0.25) elif ballLocation >= 170: turnRight(1,0.25) def celebrate(): move(0.25,1) beep(1,800) beep(1,1600) beep(1,800) stop() def main(): p = takePicture() markYellow(p) pctMarked(p) while pctMarked(pic) < 0.2: rotate(1,1) p = takePicture() markYellow(p) pctMarked(p) turn() while getObstacle('center')> 1000: # I'm not sure about the number. We can test it tomorrow forward(1,1) celebrate()
This implementation works on the idea that you have an ARGB pixel, if you have an RGB pixel replace: 0xFFFFFFFF with 0xFFFFFF What I am doing is this: pixel = A R G B A = 2 bytes R = 2 bytes G = 2 bytes B = 2 bytes so in hex that is: pixel = 0xFF000000; # black pixel = 0xFFFFFFFF; # white A has to be FF (255) to have no transparency. I should mention that I make an assumption with this code, that is, a pixel is in the form of a 32bit Integer. def markYellow(pic): for pix in getPixels(pic): if getRed(pix) > 200 and getBlue(pix) < 90 and getGreen(pix) > 150: pix = 0xFFFFFFFF; else: pix = 0xFF000000; def pctMarked(pic): totalPixels = 0 whitePixels = 0 for pix in getPixels(pic): if pix == 0xFFFFFFFF: whitePixels += 1 totalPixels += 1 return whitePixels / float(totalPixels) couple of comments: your pcMarked was only looking at red to find white, this meant it will pick up ALL fully red colours. your markyellow function is making the pixel white instead of yellow.
0.888889
pixel = A R G B A = 2 bytes R = 2 Bytes G = 2 partes
Possessive-S/apostrophe in a list, including the first and second person
When adding possessive-S/apostrophe to a list, the rule is only the last person has the apostrophe if the item is shared, or everyone has one if they have the items each, e.g. John and Mary's houses = the houses that belong jointly to John and Mary. John's and Mary's houses = the houses that belong to John and Mary as individuals, at least one each. However, I am curious if the rules are slightly different when possessive pronouns are used for a single item. You and Mary's house OR your and Mary's house? I'm even more unclear when the first person is involved. Mary and my house OR Mary's and my house? Finally, when there are at least three people, including the first person, does the last named person have the possessive-S/apostrophe, or all/none of them? John, Mary and my house John, Mary's and my house John's, Mary's and my house I'd be very grateful to anyone able to clarify this, ideally with a some form of reference, as I can't find it anywhere. There have been several suggestions to use "our", yet if the text refers to a group of people, all of whom own co-own houses with some others within the group*, then the above style wording would be necessary, so my question stands. * eg I own a house with John and Mary, I co-own another with Peter and yet another with Philip and Sarah.
If there is one house it is clear in any form, but if there are several houses, as you point out, then it can be ambiguous. "John, Mary, and my houses" would be different than "John's, Mary's, and my houses." That being said, "Our houses are all on Oak Street," tells us little about ownership. I get that you are not trying to avoid the rule, but to avoid ambiguity, which is the reason for rules, we need to provide additional information.
0.888889
"John, Mary, and my houses" can be ambiguous .
Are there any way to get (75V 1A) output from 78V input
Is there any way to get 75 V 1 A output from 78 V input? I found the TL783 high voltage adjustable regulator. But this can supply only 700mA output current. I had forgot to tell the details. Main purpose of this power supply is high precision sensor circuit. Previously, when required 5V : Step down to 8v with a switching regulator first, then step down to 5v with linear regulator. It is for the sake of stability of the power supply voltage. When required 12V : Step down to 15V with a switching regulator first, then step down to 12V with linear regulator. When required 24V : Step down to 27V with a switching regulator first, then step down to 24V with linear regulator. This time required 75V and step down to 78v with a switching regulator first, then step down to 75V. I've tried... This way I have wrong?
Maybe you ought to consider a buck-boost regulator like this device: - It's not a "beginners project" but it will do exactly what you want I believe and work with voltage supplies well below your 75V output voltage level. Top input voltage is limited to 80V.
0.666667
buck-boost regulator is limited to 80V output voltage
Decompiler Bytecode and Obfuscators
Can we completely reverse-engineer the source code from java bytecode ? Why this feature is allowed in Java and How successful are java decompilers against obfuscators.?
Can we completely reverse-engineer the source code from java bytecode ? Not completely, because some aspects of source code, such as whitespace, local variable names, and comments, are not preserved in bytecode. Otherwise, yes -- while you can't get the exact same source code out, you can almost always get something that can at least be compiled back to the same bytecode. Why this feature is allowed in Java It's not so much "allowed" as it is "not prevented". And it's not prevented because doing so is impossible -- the code must be runnable to be useful; if the code is runnable, then it is analyzable; if it is analyzable, then with sufficient analysis it can be converted back to source. How successful are java decompilers against obfuscators? Not very. Most obfuscators I've seen (esp. ProGuard) are primarily effective in removing meaningful function and class names; obfuscating the logic itself is not typically attempted.
0.777778
Can we completely reverse-engineer the source code from java bytecode
High-Tech Dungeon Crawling in Hard Sci-Fi
I've started playing Eclipse Phase with a group of friends. Most of them have a Dungeons and Dragon history, and love getting magic items and such. I've already made up my mind to take the party on more dungeon raids, but what specifically can I do in the way of loot? It is a hard science fiction setting; no magic. It's noted in the core book that some brand-name weapons and items will have special features, and there is something called Psi that is basically watered-down psychic abilities. What are some recommendations you would make for drops and treasure caches?
The biggest difference between fantasy and sci-fi notions of value is that: ideas have value Therefore, besides the standard stuff players receive, they can also discover what amounts to IP. One of the oddest forms of IP is actually Real Estate, as it's a purely symbolic agreement that X owns area Y, even though X may not sit on Y with guns. (Note how this doesn't exist in most fantasy worlds.) So one of the most interesting (from a cognitive dissonance point of view) rewards that players can get is the dungeon itself. They clear out an asteroid full of Nanoinfested Bots? They now own the asteroid and derive value from it. Our heros don't engage in Loot, Pillage, Burn any more, instead, they secure the objectives and get a stream of income. Sure, they can sell it, but it's far more interesting to present to them a tally of their "investment holdings" and recent events on each one. Plenty of plot hooks there and a way to get exactly the level of loot into their hands that you want without having to find ways of pushing the shiny things into the mission de jour. Other forms of IP are roughtly grouped into the "valuable memes" grouping. So, one thing of great value would be an ancient mpX player with some hit songs from the 20th century. This is, of course, only of great value if managed correctly, but enterprising players will see the value in rare memes. And if they don't, then the first few times they release the IP into the infosphere, they get flamed/praised for their generosity. And so on. The notion of value was hugely changed by the Industrial Revolution (that we're still in, arguably.) and by hitting home with the idea that "ideas have value" you can give them loot and emphasize the non-fantasy setting in ways that will make the less thinky players quite squeamish (yay! cognitive dissonance!). Of course, they can be compensated for their efforts with upgraded gear and stuff, but that's expected.
0.888889
The biggest difference between fantasy and sci-fi notions of value is that: ideas have value
Recieve datatable from code behind to Javascript two demintion array?
I have an application based on google map, in which I need to use a javascript matrix (2d array) for the map's parameters. I have a datatable with the information at my code behind file: ..query code, getting value from the db.. SqlDataAdapter adp = new SqlDataAdapter(cmd); DataTable dt = new DataTable(); adp.Fill(dt); How do I pass this datatable values into a js two denominational array? Thanks
You can use Ajax for retrieve the data table as an array from the server. public ArrayList ConvertDT(ref DataTable dt) { ArrayList converted = new ArrayList(dt.Rows.Count); foreach (DataRow row in dt.Rows) converted.Add(row); return converted; } then array list convert into array and send back as a response to the client http://www.dreamincode.net/forums/topic/91826-datatable-to-array/
0.666667
Ajax retrieves data table as array from the server
How do i measure the output voltage of lm35 with digital voltmeter?
I know this is a very stupid question. Lm35 has 3 pins: Vcc, Analog output voltage, Gnd. Is it ok to measure between analog output voltage and gnd? Im asking because Vcc and Gnd is a dc.
That's how the IC works: it outputs an analog voltage proportional to the temperature in °C. Output is 10 mV/°C, so at 20 °C you'll get 200 mV. Connect one pin of your voltmeter (analog or digital, doesn't matter) to the output, and the other to the ground pin, because that's the reference against which you want to measure.
1
IC outputs an analog voltage proportional to the temperature in °C
Java final variables changes at the execution time
I don't know the reason fo that. Maybe you could help me So code here creating a frame with 8 sliders. public class MyFrame extends JFrame { ImagePanel imagePanel; final int Minimum = 0; final int Maximum = 10; final int NumberOfSpheres = 8; final int NumberOfScales = 10; MyRandomAccessFile file; final String[] s = {"Друзья и Окружение", "Отношения", "Карьера и Бизнес", "Финансы", "Духовность и Творчество", "Личностный Рост", "Яркость Жизни", "Здоровье и Спорт"}; private final Color[] colors = {Color.RED, Color.ORANGE, Color.YELLOW, Color.GREEN, Color.BLUE, Color.PINK, Color.MAGENTA, Color.DARK_GRAY}; private final int[] array = {1, 0, 0, 0, 0, 0, 0, 0}; public MyFrame () { setTitle("Wheel Of Life"); MySlider[] sliders = new MySlider[NumberOfSpheres]; JButton saveButton = new JButton("Save"); MyActionListener listener1 = new MyActionListener(); saveButton.addActionListener(listener1); file = new MyRandomAccessFile(); //String s3 = "0 0 0 0 0 0 0 0"; //array = stringToIntArray(s3); array[1] = 4; JLabel[] labels = new JLabel[NumberOfSpheres]; imagePanel = new ImagePanel(colors, array); System.out.println(array[1]); JPanel mainPanel = new JPanel(); JPanel[] sliderPanels = new JPanel[NumberOfSpheres]; JPanel mainSliderPanel = new JPanel(new GridLayout(4, 2, 20, 20)); MyChangeListener listener = new MyChangeListener(); for (int i = 0; i < NumberOfSpheres; i++) { sliders[i] = new MySlider(s[i]); sliders[i].addChangeListener(listener); labels[i] = new JLabel(s[i]); labels[i].setForeground(colors[i]); labels[i].setFont(new Font("Droid Sans", Font.BOLD, 20)); sliderPanels[i] = new JPanel(); sliders[i].setMinimum(Minimum); sliders[i].setMaximum(Maximum); System.out.print(array[i]); sliders[i].setValue(4); sliders[i].setMajorTickSpacing(1); sliders[i].setMinorTickSpacing((int) 0.1); sliders[i].setPaintLabels(true); sliders[i].setPaintTicks(true); sliderPanels[i].setLayout(new GridLayout(2, 1, 5, 5)); sliderPanels[i].add(sliders[i]); sliderPanels[i].add(labels[i]); mainSliderPanel.add(sliderPanels[i]); } mainPanel.setLayout(new BorderLayout()); mainPanel.add(imagePanel, BorderLayout.CENTER); mainPanel.add(mainSliderPanel, BorderLayout.EAST); mainPanel.add(saveButton, BorderLayout.SOUTH); add(mainPanel); } And the output is this 4 99999999 How can final variable change its value at the execution time, what the hell??? Actual value of variable is depend on value that I writing at sliders[i].setValue(4); But I don't know how exactly... And I tried to set a watchpoint for this variable... Doesn't working. One time its zero and next time program stop in this for loop value is 9, 4 or whatever...
When you declare reference as final, you can't change the reference, but you can change underlying object state. You can't change int[] array = somethingelse; but array[1] = 5; is valid.
0.5
When you declare reference as final, you can't change the reference
What is the best icon to represent the shopping cart for an e-commerce store?
I'm looking for an icon that will clearly identify the "shopping cart" for an apparel store. A shopping bag? A Cart? Is there any other specific icon? If we go further, do you think it is better to display an icon? only text (bag / cart?) or both?
The three icons I commonly see in use are: A Cart (Amazon, Overstock, etc) A Bag (JCPenny, LL Bean, etc.) A Basket (err.. can't think of reference) Most online apparel stores I see use the "Bag" reference and some form of icon for a bag.
1
A Cart (Amazon, Overstock, etc.) A Bag (JCPenny, LL Bean)
Volume scatter shader causes black spots
I am following Andrew price's video on making clouds but my clouds are rendering with black spots on them. I have tried turning up the maximum transparency value under light paths but there is no difference between 50 and 200. What could be causing this?
These are caused by self-intersecting bits of the cloud particles showing the backsides of faces to the outside world: Rays going through the back of a face don't count as going into the volume, and so appear mostly transparent. To fix this you have a couple options: Lighten up on the displacement to avoid such intersections: Or add a remesh modifier (and optionally a decimate modifier to keep the vertex count down)
0.888889
Lighten up on the displacement to avoid such intersections
How to use Java to read/write data to/from the header pins?
I just got Java running on my Raspberry Pi which took a lot more screwing around than i had hoped. I want to be able to read/write data to/from the header pins from Java. How can I do this? Do I need to write a driver or some sort with C first in order to get the data from the header pins? I am running an instance of Soft-float Debian “wheezy." Is this even possible to do in Java? Are there any workarounds that I should know about? Thanks for reading!
That should be possible in Java, as referenced here. The library which is used is called rpi-gpio-java and is available at this URL. As stated in the notes, to make it work, please make sure your application is run as root. Note: Above project rpi-gpio-java is no longer available on google code. Alternate option is PI4J
0.777778
rpi-gpio-java is no longer available on google code
The places from my Google Maps do not show up in Google Maps Search
We have public Google Maps with lots of objects but when I do "Google Maps Search" these objects do not show up in the search results (even when I select 'user created maps only'). What should I do to make them appear? Link to the map: http://maps.google.com/maps/ms?ie=UTF8&hl=en&msa=0&msid=107873947602648971741.000465c62e537697c2371&z=7
It appears that Google removed some of the functionality for searching user created maps. http://www.google.com/support/forum/p/maps/thread?tid=4f150fb453c99abd&hl=en
1
Google removed some of the functionality for searching user created maps
How do you make a binary image in Photoshop?
I am trying to make a binary image. I want more than just the look of the image to be black/white, but I want the actual file to be a binary file. Every pixel should be either black, or white. I don't just want a monochrome image. I can't have varying shades of gray, every pixel needs to be black or white. Is this possible? I looked under Image > Mode but nothing there seems to indiciate a binary style image.
After using Image > Mode > Grayscale to convert to a grayscale image, you’ll be able to now select Image > Mode > Bitmap, which does exactly what you’re after. Many of Photoshop’s functions aren’t available in bitmap mode, but hopefully that’s not an issue. If it is, you can run them when still in grayscale, then convert to bitmap.
1
Image > Mode > Grayscale to convert to a grayscale image
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?
The Plot Thickens basically adds more opportunities to link players together, thus creating longer and more complex chains of information. What I mean by chain of information is something like this: Player A and Player B both were on a failed mission. Player B knows Player C's role card. Player C has declared players D and E to play success cards, but their mission with player A failed. Chains make it easier to deduce information, thus making the Resistance players' role easier. But of course, experienced Spy players can learn to work with, or around, such cards, to confuse people even more. Tl;dr: The Plot Thickens makes the game more balanced.
0.888889
The Plot Thickens creates more complex chains of information .
Chaining deferreds
I have a lot of functions that currently look like this: function LoadFromURL(url) { var d = $.Deferred(); $.get(url).then(function(text) { LoadFromText(text).then(function(obj) { d.resolve(obj); }, function(err) { d.reject(err); }); }, function(err) { d.reject(err); }); return d.promise(); } This function takes a URL and loads the text within a promise. The text is then passed to the LoadFromText function which returns another promise. If this succeeds, the outer deferred is resolved. If the URL cannot be loaded, or the LoadFromText function fails then the outer deferred is rejected. Is there a way that I can chain the result of the resolve / reject and end up with something like this: function LoadFromURL(url) { return $.get(url).then(function(text) { return LoadFromText(text); }, function(err) { return $.Deferred().reject(err); }).promise(); } I've seen some implementations of promises that allow this - returning a promise within 'then', means that the eventual result of the promise is used. I realise this doesn't work at the moment (the result is the promise, rather than the result of the promise), but hopefully someone can suggest a way to make this work so I can tidy up the sometimes confusing mess of the first example. I hope this makes sense. Thanks.
Is there a way that I can chain the result Yes, that is the default behaviour of then! function LoadFromURL(url) { return $.get(url).then(LoadFromText); } I've seen some implementations of promises that allow this - returning a promise within 'then', means that the eventual result of the promise is used. jQuery does support this behaviour since version 1.8. For 1.5 to 1.7 you could use .pipe.
0.888889
Returning a promise within 'then'
Get list of all files by mask in terminal
I want to find all *.h,*.cpp files in folders with defined mask, like */trunk/src*. So, I can find separately *.h and *.cpp files: find . -path "*/trunk/src/*.h" find . -path "*/trunk/src/*.cpp" What is the best way to get the file-list both of types (*.h and *.cpp)? PS I'd like to pipe the list to grep.
You can use -o for "or": find . -path '*/trunk/src/*.h' -o -path '*/trunk/src/*.cpp' which is the same as find . -path '*/trunk/src/*' \( -name '*.h' -o -name '*.cpp' \) If you want to run grep on these files: find . \( -path '*/trunk/src/*.h' -o -path '*/trunk/src/*.cpp' \) -exec grep PATTERN {} + or find . -path '*/trunk/src/*' \( -name '*.h' -o -name '*.cpp' \) -exec grep PATTERN {} +
0.888889
Find . -path '*/trunk/src/*.h'
Determining The Parameters Of A Wheatstone Bridge
Good day, I am trying to use a Wheatstone bridge to condition a thermistor. The arrangement i have is shown in below. I need the following specifications. 10V output max from the bridge at maximum temperature (50 degrees celcius) 0V output max from the bridge at minimum temperature (0 degrees celcius) I have determined the resistance of the thermistor at the minimum and maximum temperature to be as follows At max temperature R = 174 At min temperature R = 1.1K I know that for the wheatstone bridge to be balanced i need the following for my arrangement R1/R3 = R2/Rt So i have set R3 = 1.1K and Chose R1=R2=1500k (arbitrary value) With this i do get 0V output at 0 degrees. My problem is now, how do i ensure that the output voltage i get is 10V at 50 degree celcius, as i currently get 8.7V output with the source voltage set to 24V. Any help would be appreciated, Thanks.
With a 24 volt supply, the current thru the limb of the bridge containing the thermistor is: - Nearly 11mA at 0C Nearly 19mA at 50C At 0C this produces a power in the thermistor of 132mW and 63mW at 50C. To me this is a problem. The self-heating of the thermistor will create a significant measurment error at 0C compared to 50C. I'd use an instrumentation amplifier and keep the excitation levels much lower to prevent significant self-heating errors: - The picture above shows the AD620 powered from +5V and 0V but a better power regime (for the OP) is +/- 15V with 0V connected to pin 5 (the reference input). The excitation voltage can be much lower (say 2.5 volts) and this means the self-heating effects are 1.5mW at 0C and 0.7mW at 50C i.e. trivial. However, there is another potential problem of a single thermistor in a wheatstone bridge and that is linearity. You may design a circuit that produces the correct voltages at the extremes of temperature you require but, between these two points, there is a non-linear mapping between voltage and temperature over and above the basic non-linearity of the thermistor's resistance change with temperature. It might seem intuitive to place 2 thermistors at opposite sides of the bridge but, with voltage excitation, this won't improve linearity (but does double sensitivity). Here is a good document by ADI explaining all of this: - However, if you adopted a current driven bridge configuration then you could use two thermistors and get perfect linearity: - So, rounding up, try to avoid self-heating effects and, for greater linearity, use two elements in opposing faces of the bridge with the bridge excitation being a constant current like the one below: - The important voltage to keep constant in the above diagram is that across R1 and, for high accuracy a precision shunt voltage reference would be used in place of R1.
0.666667
The self-heating of the thermistor will create a significant measurment error compared to 50C .
How to install the gedit markdown-preview plugin on 14.04?
I've just installed the markdown preview plugin for gedit and I get the following error on the console when I try to activate it in the plugins tab: Traceback (most recent call last): File "/home/aarold/.local/share/gedit/plugins/markdown-preview/init.py", line 25, in import markdown ImportError: No module named 'markdown' (gedit:20735): libpeas-WARNING **: Error loading plugin 'markdown-preview Note that this is not the same question as the other one about gedit since its solution does not work for me. I've tried setting the Loader parameter in my /home/aarold/.local/share/gedit/plugins/markdown-preview.plugin file to python and python3 as well but none of them work. I tried reinstalling the plugin with all possible permutations of options and although it says install was succesful I always get this error. What could be the problem? I've checked the .py file and it seems that it cannot import markdown. Do I need to install some additional python modules? I've tried pip install markdown but although it Successfully installed markdown I still get the same error.
This plugin is written for Python 2, but since gedit 3.8, only Python 3 plugins are supported. So some small changes are required. Modify the installer (gedit-markdown.sh) to install the python3 markdown module: This is a patch that you can apply on the existing file (or you can just copy the full modified version available here): --- gedit-markdown_ori.sh 2014-05-14 16:14:58.386700310 +0200 +++ gedit-markdown.sh 2014-05-14 15:42:21.038783248 +0200 @@ -263,7 +263,9 @@ # Note: sous Archlinux, «/usr/bin/python» correspond à Python 3. On teste donc les # chemins pour Python 2 en premier. -if type -p python2.7 > /dev/null; then +if type -p python3 > /dev/null; then + binPython=$(type -p python3) +elif type -p python2.7 > /dev/null; then binPython=$(type -p python2.7) elif type -p python2.6 > /dev/null; then binPython=$(type -p python2.6) @@ -287,15 +289,15 @@ cheminPythonMarkdown=python-markdown/python2 cheminPythonSitePackages=$("$binPython" -m site --user-site) fi -# elif [[ ${versionPython:0:1} == 3 ]]; then -# compareVersions "$versionPython" "3.1" -# -# if [[ $? == 2 ]]; then -# bonneVersionPython=false -# else -# cheminPythonMarkdown=python-markdown/python3 -# cheminPythonSitePackages=$("$binPython" -m site --user-site) -# fi + elif [[ ${versionPython:0:1} == 3 ]]; then + compareVersions "$versionPython" "3.1" + + if [[ $? == 2 ]]; then + bonneVersionPython=false + else + cheminPythonMarkdown=python-markdown/python3 + cheminPythonSitePackages=$("$binPython" -m site --user-site) + fi else bonneVersionPython=false fi Run ./gedit-markdown.sh install You should see python 3.4 instead of 2.7: ############################################################ ## ## Installation of gedit-markdown ## ############################################################ ## First step: check dependencies - gedit: 3.10.4 - Python: 3.4 [...] Change the plugin loader to python3 Replace /home/aarold/.local/share/gedit/plugins/markdown-preview.plugin with: [Plugin] Loader=python3 Module=markdown-preview IAge=3 Name=Markdown Preview Name[fr]=Aperçu Markdown Description=Show the HTML version of the Markdown text you're editing Description[fr]=Affiche l'aperçu en HTML du document Markdown en cours d'édition Authors=Michele Campeotto <[email protected]>\nJean-Philippe Fleury <[email protected]> Copyright=Copyright © 2005, 2006 Michele Campeotto\nCopyright © 2009, 2011-2012 Jean-Philippe Fleury Website=http://www.jpfleury.net/logiciels/gedit-markdown.php Convert /home/aarold/.local/share/gedit/plugins/markdown-preview/__init__.py to python3: Run: 2to3 -w /home/aarold/.local/share/gedit/plugins/markdown-preview/__init__.py Finally open this file and edit line 86 (remove the binary mode, "wb" -> "w"): with open(confFile, "w") as confFile: Activate the plugin in Gedit as you did.
0.666667
Install python3 markdown module in Python 2
Thousands of backlinks from Meetup.com
I have been wondering something for a while now. We have a manual penalty from Google on unnatural linking. When I check out "Links to your site" in Webmaster Tools we have 11,387 links from Meetup.com. Is this harming us? After clicking through some of the links randomly I have discovered it is from one of our dealers that sells our products. He is sponsoring different groups and so the ad appears, the problem is he is linking back to our site and not his own. The anchor text is all the same it never changes.
Your dealer may be doing a good job of promoting your product! You have to decide. I am assuming that he is making the exact same link (cut and paste) each time he sets up a meeting or makes a connection. If this is the case, he is very aggressive about selling. That may be good or that may be bad. That is up to you to decide. Here is what I am assuming. On meetup.com there are 11,387 that all look exactly the same and of course, Google is concerned about unnatural linking. It is! I am assuming that your dealer would be the only one to modify or remove the links. You will have to begin working with the dealer to remove these links. This is important enough that you may want to consider suspending their ability to sell your products while this is being fixed. Then I would do a manual review of the dealers practices. I am not saying that the dealer is a bad one. They may be, or just unaware of the consequences of linking the way they do. They have likely crossed over to spamming meetup.com. It may have been intentional, but I doubt it. You will want to create or modify an existing page that defines these kinds of activity parameters that helps your dealers sell your product. I advise businesses in your situation to create a large variety of linking schemes, images, logos, and what not and make it a cut and paste option for re-sellers. You may also want to create varying marketing copy that they can use. Keep in mind that people tend to take just the top few of any choice you provide. This means that you will want to randomize your page so that selecting the top few will result in variety in the future. You have to remove these links somehow. Work with your dealer to remove them. Remember that you attract more bees with honey! (Remember that bees are good, they fertilize crops.) Do what you can to be kind and gentle and assume the best intentions. But remove these links! Perhaps, the re-seller can provide log in details and your staff can help. Removing these links has to become priority one since it is effecting your ability to conduct business.
0.888889
You have to decide if your dealer is doing a good job of promoting your product
How is this site different from Stack Overflow?
I've decided to check this site out since it was tweeted by the great Jeff Atwood himself. The first question I saw was "Advice on making ruby code more ruby-like", which is the kind of question I see all the time on Stack Overflow. So what is the difference between the questions on SO and the questions here? It seems to me there is enough overlap between the two that the difference is not clear, and I may not be alone in feeling this. So far this site seems redundant.
Did you not read the FAQ at all? About page What topics can I ask about here? As I said on Twitter, this site is about asking Does this code make my ass look fat? In other words, general broad-spectrum subjective feedback about blocks of code you've written. Stated another way, on Stack Overflow it would be Why doesn't this code compile? Whereas here it is Why is my code so ugly? I hope it is immediately obvious why the latter form would get closed instantly on Stack Overflow.
1
Why does this code make my ass look fat?
How to reduce vehicle swaying (body sway)
I have a stock 2010 acura tsx. I dont know what the official term is (maybe body sway) but i would like to reduce the amount of swaying it does as im going through turns, especially at higher speeds. Its that feeling of your head bobbing from side to side as your whipping through turns (and what makes me dizzy if i keep it up long enough). I had a 96 acura integra before that i put an aftermarket strut bar in the front. Not sure how much that helped but my teggy hugged the road and i could whip through turns quickly with very little sway. I realize that the tsx is higher up and i cant expect it to handle like an integra but what can i do to reduce the swaying? Do i replace the front or rear strut bar or something else?
You are very close to answering your own question: ... what can i do to reduce the swaying? What you're looking for is an upgraded sway bar. This is "... usually a torsion spring that resists body roll motions." This is in contrast to a strut bar "... designed to reduce ... strut tower flex by tying two parallel strut towers together." In general, if your goal is to reduce body roll, one of the cheapest ways to do so is to upgrade the sway bar(s). Strut tower bars will have a much more limited effect and should usually be considered after upgrading tires, sway bars, struts and springs (i.e., much later). Caveat: increasing the roll stiffness will change your under/oversteering biases. Specifically, a stiffer bar in the front generally increases understeer. Likewise, a stiffer rear will increase oversteer. That said, I had a 97 Integra some time back and installed an adjustable rear sway bar. I adored its steering responsiveness in the summer but also managed to scare myself several times in the winter....
1
What can i do to reduce swaying?