summary
stringlengths 15
147
| text
stringlengths 1
19.3k
| answer
stringlengths 32
22.6k
| labels
float64 0.33
1
| answer_summary
stringlengths 5
164
|
---|---|---|---|---|
Keeping values in textboxes permanently until changed by user in a sharepoint webpart | I am working on a Visual Web Part for a SharePoint 2013 site that is a "scoreboard" for people to track progress on a project. Basically what I have is a lot of textboxes that users will enter values in. I want the values to stay in the textbox until someone changes it.
<tr>
<td>&nbsp;</td>
<td>A-Crew</td>
<td>B-Crew</td>
<td>C-Crew</td>
<td>D-Crew</td>
</tr>
<tr>
<td>Daily</td>
<td>
<input id="msaCrewDaily" type="text" />
</td>
<td>
<input id="msbCrewDaily" type="text" />
</td>
<td>
<input id="mscCrewDaily" type="text" />
</td>
<td>
<input id="msdCrewDaily" type="text" />
</td>
</tr>
A few things I have tried are using PHP inside the input tag to save the value but it doesn't keep it after closing and re-opening the page with webpart on it. I've thought about using local storage but i'm not sure if that will work.
My Question
Is there a way to keep the the input even if the page is closed? If not would it be better to set up a list as a Data Source? Is the something I could do in C# to keep the values?
Other Information
This is a temporary solution until a database is set up then the values will come from there. However its going to take some time to set that up. Also as of now all my code is HTML and CSS. Any help or ideas are very much appreciated and thank you in advanced!!!
| You can use local storage "jStorage" write a javascript which will be called onkey of textbox and store value on local storage and call it on page load. Just check on page load if local storage contains any value if yes then set the textbox with that value
| 0.888889 | Local storage "jStorage" write a javascript |
How to set Alternate Row Color in a Gridview Android? | How to set alternate row color in a gridview? I have searched a lot of tutorial about how to set grid view row colors,but nothing about gridview row color. I got list view with alternate row color only. I need alternate row should be white and black. Here I Include my codes. Please help me!!!!!!!!!!
Here is Java Class:
public class MainActivity extends Activity {
GridView gridView;
static final String[] numbers = new String[] { "A", "B", "C", "D", "E",
"F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R",
"S", "T", "U", "V", "W", "X", "Y", "Z", "A", "B", "C", "D", "E",
"F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R",
"S", "T", "U", "V", "W", "X", "Y", "Z", "A", "B", "C", "D", "E",
"F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R",
"S", "T", "U", "V", "W", "X", "Y", "Z", "A", "B", "C", "D", "E",
"F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R",
"S", "T", "U", "V", "W", "X", "Y", "Z", "A", "B", "C", "D", "E",
"F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R",
"S", "T", "U", "V", "W", "X", "Y", "Z", "A", "B", "C", "D", "E",
"F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R",
"S", "T", "U", "V", "W", "X", "Y", "Z", "A", "B", "C", "D", "E",
"F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R",
"S", "T", "U", "V", "W", "X", "Y", "Z" };
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
gridView = (GridView) findViewById(R.id.gridView1);
ArrayAdapter<String> adapter = new ArrayAdapter<String>(this,
android.R.layout.simple_list_item_1, numbers);
gridView.setAdapter(adapter);
}
}
Here is xml:
<?xml version="1.0" encoding="utf-8"?>
<GridView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/gridView1"
android:numColumns="10"
android:gravity="center"
android:columnWidth="50dp"
android:stretchMode="columnWidth"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
</GridView>
Please provide good tutorial or sample Example. Thanks in Advance!!!!!!!!!!!
| Use custom Adaptor and in Custom adaptor
you will be having method getView
Use this code in your getView Method
if(position % ( 2*columnCount ) == 0)
{
// set first color
}
else
{
// set alternate row's color
}
| 0.666667 | Use custom Adaptor and in Custom adaptor |
How can toddlers expend seemingly boundless energy when they eat so little? | A toddler's food intake seems very little: only milk and water and some solid food. Therefore, from where does this energy come?
| They don't eat little. Consider the volume of milk / food they consume as a ratio of their weight. Quite the contrary they are ravenous machines and their consumption is much higher than an average adult. All cellular energy comes from the hydrolysis of ATP, and the production of ATP comes from the breakdown of glucose. The glucose comes from a sugar found in breast milk, called lactose.
| 1 | All cellular energy comes from the hydrolysis of ATP and the breakdown of glucose |
perl how to print out a hash with multiple keys? | i'm setting my hash in my function as
$hash{$loginId}{$month}=$hash{$loginId}{$month}+$time1;
and I can print the value in one spot as
print "$hash{maclawty796}{Sep}\n"; #just some name and date in the text file i imported
But I want to print out all the values.
When i use
print "@{[%hash]}\n";
I get a bunch of weird results and what looks like memory addresses. How can i print out the loginId's Months and times?
Here's the full code if you need it
#
# adapted from regex9.pl
#
$file ='timelog.txt';
open(INFO, $file) or die("Could not open file.");
use strict;
my ($loginId, $month, $time1, $time2, $pts, $line, $time1T, $time2T);
my %hash=();
while (<INFO>)
{
$line=$_;
#assignment of Login ID's
if( ($loginId) = /([a-y]*(\d|\w)*)/ ){
printf("%-15s", $loginId);
}
if( ($month) = /((Jan)|(Fed)|(Mar)|(Apr)|(May)|(Jun)|(Jul)|(Aug)|(Sep)|(Oct)|(Nov)|(Dec))/ ){
printf("%-5s", $month);
}
if(($time1, $time1T, $time2,$time2T)= /(\d\d):(\d\d)\s-\s(\d\d):(\d\d)/ ){
#print($time1, " ", $time1T, " ", $time2," ", $time2T,"\n"); #for testing
$time1=($time2*60+$time2T)-($time1*60+$time1T);
printf ("%-5s minutes\n" ,$time1);
}
$hash{$loginId}{$month}=$hash{$loginId}{$month}+$time1;
print "hash $hash{$loginId}{$month}\n";
}
print "@{[%hash]}\n";
print "$hash{maclawty796}{Sep}\n";
| A hash can't have multiple keys. A hash only has a single level of keys, but the values of those keys can point to other hashes.
You have a hash called %hash that is keyed by $loginId. The values in this hash point to other hashes (each value is a completely separate hash) that are all keyed by $month. It's an important point to understand.
I find that I can help myself remember this by using the -> operator. This reminds me I'm talking about references and not merely other keys.
For example, instead of writing this:
$hash{$loginId}{$month} = $hash{$loginId}{$month} + $time1;
I would have write this:
$hash{$loginId}->{$month} = $hash{$loginId}->{$month} + $time1;
It's not much, but it's a good reminder that $month are keys to a hash reference and I need to dereference that hash before I can see its values.
Let's take a simple loop that prints out %hash:
for my $loginId ( sort keys %hash ) {
print qq(\$hash{$loginId} = "$hash{$loginId}"\n";
}
This will print out something like this:
$hash{bob} = "HASH(0x7f8e3b804ee8)"
$hash{david} = "HASH(0x...)"
$hash{sue} = "HASH(0x...)"
The HASH{0x...) are addresses to a hash reference. I need to dereference that hash to get the values:
for my $loginId ( sort keys %hash ) {
my %months = %{ $hash{$loginId) }; # Dereferencing the hash;
}
Now, that I've dereferenced the hash, I can print out the months for each user:
for my $loginId ( sort keys %hash ) {
my %months = %{ $hash{$loginId) };
for my $month ( sort keys %months ) {
print qq(\$hash{$loginId}->{$month} = ) . $hash{$loginId}->{$month} . "\n";
}
}
By the way, there's no reason I couldn't combine the referencing with the inner for loop:
for my $loginId ( sort keys %hash ) {
for my $month ( sort keys %{ $hash{$loginId) } ) {
print qq(\$hash{$loginId}->{$month} = ) . $hash{$loginId}->{$month} . "\n";
}
}
It looks like you were trying for a quick dump of all of your data. To do that, you can use the Data::Dumper module:
use strict;
use warnings;
use feature qw(say); # Better way to print than print
use Data::Dumper;
....
say Dumper \%hash; #Prints out the entire data structure.
| 1 | %hash is keyed by $loginId |
Should we allow or avoid non-standard pronouns? | This question brings up an important question:
Do we want to allow or avoid the use of non-standard English such as the words zie and zir as non gender specific pronouns on this site?
| Considering we are accepting all comers as far as self claiming Christians, we might as well accept all comers as far as self proclaimed pronouns too. It is in the spirit of religious and lingual tolerance that we accept them. This tolerance is of course limited by the fact that this is an English site, these however, while not exactly English are an attempt at correcting an issue in the English language..
| 0.666667 | Accepting all comers as far as self claiming Christians |
What might cause "junk after document element" error? | I have PHP errors redirected to log file. Only for WP installation so this definitely doesn't come from somewhere else. This is what started to come up recently (this is all of them, not cut):
[22-Sep-2010 14:30:41] junk after document element at line 2, column 0
[22-Sep-2010 16:17:08] junk after document element at line 2, column 0
[22-Sep-2010 17:19:42] junk after document element at line 2, column 0
[22-Sep-2010 18:30:19] junk after document element at line 2, column 0
[22-Sep-2010 20:19:23] junk after document element at line 2, column 0
[23-Sep-2010 14:51:40] junk after document element at line 2, column 0
[23-Sep-2010 15:54:33] junk after document element at line 2, column 0
[23-Sep-2010 17:23:02] junk after document element at line 2, column 0
This doesn't really look like PHP error (function blah-blah failed at line x), they are very infrequent and don't seem to be tied to page loads (maybe to some cron event?) and there hadn't been any major configuration changes in months other than keeping plugins up to date and one or two new ones (days before this started).
Googling results are mostly about XML parsing... Of which WP probably does plenty (feeds, updates, what else?..) but how to pinpoint what is going wrong?
This has me really puzzled.
| Solved. External feed idea was correct, figuring out feed was slightly more complex.
I had installed Core Control plugin and enabled log of HTTP requests.
Then it was just sitting and waiting until error re-occurs and checking which feed was downloaded at exactly same time.
Subject feed:
belonged to one of recently installed plugins;
was fried dead with PHP fatal error instead of content.
And feed validator was giving exact match on it:
line 1, column 0: Undefined root element: br
line 2, column 0: XML parsing error: :2:0: junk after document element
PS I am not sure which answer better to accept, this with exact solution or EAMann's with ideas and discussion? Edit: can't accept my own for two days anyway, that one it is.
| 0.888889 | External feed idea was correct, figuring out feed was slightly more complex |
Why isn't "Column ordering" available in my list settings? | I want to change the column order visible when viewing or editing a list item. I have accessed the "Column ordering" interface via the list settings page on other lists in the past, but it isn't visible in this list's settings.
Cheers!
| If you have Content Type management enabled for the list (if you see a list of content type with the option to add more), the display order of columns is set for each content type. Drill down into one of them and you'll see the option under the list of columns for that content type.
| 1 | Display order of columns for each content type |
Is Mac OS X in a VirtualBox VM suitable for iOS development? | I have finally successfully managed to install Mac OS X in a virtual machine on my Windows 7 laptop using VirtualBox and a tutorial from Lifehacker.
Performance is very slow, with Mountain Lion reporting that it is seeing just 4MB video memory (I didn't manage to load the Intel HD3000 driver). Youtube is essentially unplayable, with even the audio potion stuttering. That said, the interface and general UI is pretty acceptable.
Even with such slow performance, does it make sense to download and develop with Xcode? I am allocating 3GB of RAM. What would performance be like under those conditions?
| Essentially, you're running 2 virtual boxes if you use the iOS emulator and take this approach. 1 for OSX and 1 (essentially) for the emulator. This can get very cpu and ram intensive but it's doable. Best bet, give it a shot.
If you don't like, just remove the vm image.
| 1 | iOS emulator running virtual boxes for OSX |
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] {>} },
| Here's a very over the top approach that places a coordinate at a specified location along the path, places a circle with a specified diameter on that coordinate, calculates the intersections of the curve and the circle, and then draws a diamond between the two intersections.
Drawbacks: The diamonds will have slightly different sizes, depending on the curvature of the original path. The original path isn't interrupted, instead the diamonds are just drawn on top. With the current implementation, while you can have several diamonds on the same path, the options like diamond ratio, diamond length, and every diamond will apply to all diamonds equally.
\documentclass{standalone}
\usepackage{tikz}
\tikzset{
diamond helpers/.code={
\path [draw,name path=circle] (middle) circle [radius=0.1cm];
},
diamond/.style={
decoration={
markings,
mark=at position #1 with {
\coordinate (middle);
\path [name path=circle] (middle) circle [radius=0.5*\diamondlength];
\draw [every diamond, name intersections={of=curve and circle}]
(intersection-1) --
($($(intersection-1)!0.5!(intersection-2)$)!\diamondaspect!90:(intersection-2)$) --
(intersection-2) --
($($(intersection-1)!0.5!(intersection-2)$)!\diamondaspect!-90:(intersection-2)$) --
cycle;}
},
postaction=decorate,
name path global=curve
},
diamond/.default=0.5,
diamond aspect/.store in=\diamondaspect,
diamond aspect=0.75,
diamond length/.store in=\diamondlength,
diamond length=0.2cm,
every diamond/.style={draw,fill=white}
}
\usetikzlibrary{decorations.markings,intersections,calc}
\begin{document}
\begin{tikzpicture}
* \draw [diamond, diamond=0.1] (0,0) to [out=70, in=100] (1,-1);
\end{tikzpicture}
\end{document}
| 1 | The original path isn't interrupted, instead the diamonds are drawn on top . |
When can an article be omitted? | I am aware that articles are the modifiers, which introduce a noun/noun_phrase in a sentence, and by the rules of English grammar we should use an article before referring to a noun in a sentence.
However, I see that the above rule is not strictly followed. I have seen sentences where though a noun/noun_phrase is used in a sentence but an introductory article is not used.
Eg : Login to desktop and start the paint application [ Desktop is a noun, hence I expect either "Login to a desktop and ...." or "Login to the desktop at the corner and ....."]
So please help me understand, when can an article be omitted ?
Thanks in advance.
| The examples given by the original poster are written instructions, where a kind of "telegraph-ese" style is employed for the sake of brevity. That style does not reflect natural spoken idiom.
Place wax paper on countertop.
Place sandwich on wax paper.
Fold wax paper around sandwich.
Place sandwich in paper bag.
Roll bag shut.
Go to work.
| 1 | "telegraph-ese" style is used for the sake of brevity . |
PostGIS is rejecting an srid code for my projection. I've found a nearly identical projection w/ a legit srid. Will it work? | My projection is this: NAD 1983 StatePlane North Carolina FIPS 3200 Feet, which has a proj4 string that looks like this:
+proj=lcc +lat_1=34.33333333333334 +lat_2=36.16666666666666 +lat_0=33.75 +lon_0=-79 +x_0=609601.2199999999 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs
Its SRID is 102719. I've tried to create a db column in PostGIS with an srid option for this projection, but its rejecting the srid, calling it invalid.
I've found a similar projection with a valid srid code, NAD83 / North Carolina (ftUS) (srid=2264), which has a proj4 string nearly identical to the above:
+proj=lcc +lat_1=36.16666666666666 +lat_2=34.33333333333334 +lat_0=33.75 +lon_0=-79 +x_0=609601.2192024384 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs
As you can see, the only difference between these two is that the lat_1 and lat_2 degrees are swapped. They even use the same three degrees, only the first two are differently ordered.
Can I use this second projection?
UPDATE: The answer seems to be leaning towards 'yes', I just ran projection-to-projection transformations from a single projection to the NC projection using the "legitimate" and "illegitimate" proj4's and got similar results down to the 7th decimal place
| You have an ESRI projection (ESRI:102719) however PostGIS (and everyone else but ESRI) are expecting EPSG:2264 (or possibly EPSG:3359 or EPSG:3632). You can use the ESRI one (just be aware that this will not interoperate well with others) - just run the following:
INSERT into spatial_ref_sys (srid, auth_name, auth_srid, proj4text, srtext) values ( 9102719, 'esri', 102719, '+proj=lcc +lat_1=34.33333333333334 +lat_2=36.16666666666666 +lat_0=33.75 +lon_0=-79 +x_0=609601.2199999999 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs ', 'PROJCS["NAD_1983_StatePlane_North_Carolina_FIPS_3200_Feet",GEOGCS["GCS_North_American_1983",DATUM["North_American_Datum_1983",SPHEROID["GRS_1980",6378137,298.257222101]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["False_Easting",2000000.002616666],PARAMETER["False_Northing",0],PARAMETER["Central_Meridian",-79],PARAMETER["Standard_Parallel_1",34.33333333333334],PARAMETER["Standard_Parallel_2",36.16666666666666],PARAMETER["Latitude_Of_Origin",33.75],UNIT["Foot_US",0.30480060960121924],AUTHORITY["EPSG","102719"]]');
| 0.888889 | INSERT into spatial_ref_sys (srid, auth_name, proj4text) values |
Similar phrases meaning 'give kudos' | See, in one of our employee evaluation systems, we would like to implement a feature by which any employee can show appreciation to another employee that he has got help from or whom he thinks to be a good performer, mentor etc., and it has to be done every month. So, to give a name to this action, one of the suggestions was the phrase 'give kudos', but we expect to have a better one with a similar meaning. Something interesting!!
Update: It is not mandatory that we should use the word 'give' or 'kudos'! when we rephrase it.
Can anyone help me on this?
| Thumbs-up might be fun. They can give out thumbs-up "cards" for example, whenever an employee merits one; then add them up at the end of the month. (Much like grade-school teachers give those gold paper stars out to their pupils -or just use those same little stars!) Maybe there could be a small prize or other incentive at the end of the month to make it more interesting?
| 1 | Thumbs-up "cards" at end of month? |
What route do I use to refer to the path of the current user's profile? Devise | Users of my application upload an avatar when they create their profiles. Here is how I display a small version of their profile picture in the navbar:
<li><%= link_to image_tag current_user.avatar(:nav) %></li>
I want that link to to go to the profile page of the current user. Here are my routes:
Prefix Verb URI Pattern Controller#Action
things GET /things(.:format) things#index
POST /things(.:format) things#create
new_thing GET /things/new(.:format) things#new
edit_thing GET /things/:id/edit(.:format) things#edit
thing GET /things/:id(.:format) things#show
PATCH /things/:id(.:format) things#update
PUT /things/:id(.:format) things#update
DELETE /things/:id(.:format) things#destroy
new_user_session GET /users/sign_in(.:format) devise/sessions#new
user_session POST /users/sign_in(.:format) devise/sessions#create
destroy_user_session DELETE /users/sign_out(.:format) devise/sessions#destroy
user_password POST /users/password(.:format) devise/passwords#create
new_user_password GET /users/password/new(.:format) devise/passwords#new
edit_user_password GET /users/password/edit(.:format) devise/passwords#edit
PATCH /users/password(.:format) devise/passwords#update
PUT /users/password(.:format) devise/passwords#update
cancel_user_registration GET /users/cancel(.:format) devise/registrations#cancel
user_registration POST /users(.:format) devise/registrations#create
new_user_registration GET /users/sign_up(.:format) devise/registrations#new
edit_user_registration GET /users/edit(.:format) devise/registrations#edit
PATCH /users(.:format) devise/registrations#update
PUT /users(.:format) devise/registrations#update
DELETE /users(.:format) devise/registrations#destroy
users POST /users(.:format) users#create
new_user GET /users/new(.:format) users#new
user GET /users/:id(.:format) users#show
about GET /about(.:format) pagess#about
root GET / things#index
I am currently using Devise for authentication.
Here is my UsersController
class UsersController < ApplicationController
def show
@user = User.find_by_username(params[:id])
end
def user_params
params.require(:user).permit(:avatar)
end
end
| Try:
<li><%= link_to (image_tag current_user.avatar(:nav)), user_path(current_user.id) %></li>
You may also be able to get away with just 'current_user' and not 'current_user.id'
| 0.888889 | 'current_user' %<li>%= link |
What does mathematics have to do with programming? | I just started a diploma in software development. Right now we're starting out with basic Java and such (so right from the bottom you might say) - which is fine, I have no programming experience apart from knowing how to do "Hello World" in Java.
I keep hearing that mathematics is pertinent to coding, but how is it so? What general examples would show how mathematics and programming go together, or are reliant on one another?
I apologize of my question is vague, I'm barely starting to get a rough idea of the kind of world I'm stepping into as a code monkey student...
| Two examples that immediately come to mind are:
functions - The idea of applying a transformation to input variables to produce an output variable is strongly rooted in mathematics. The notion of passing a function around as a parameter to another function even more so. In general, the notion of abstract thinking associated with programing parallels mathematics quite closely.
bitMasks - This common programming approach to solving problems requires at least a basic understanding of boolean algebra to even grasp the concept.
| 0.888889 | functions - The idea of applying a transformation to input variables to produce an output variable |
How do I find a vacuum leak? I'd highly prefer not to use a carb cleaner spray | The car is a 1998 Oldsmobile Intrigue with 3.8L V6 engine (3800 Series). I've been doing my research and due diligence, but please understand I'm very inexperienced with automobiles.
I went to Autozone and the reading I got from the OBD II tool was a P0171 error code. A lean or rich condition on Bank 1. First, I don't know where Bank 1 is. I have a feeling it's a cracked intake-manifold, an intake-manifold gasket leak, or both. But let's assume I have no clue where the vacuum leak is coming from. And I don't want to use a carb cleaner -- I read that I could cause a fire and I don't think I'm experienced enough to use something like that. I'd prefer to err on the side of caution.
I've seen on youtube a long-time mechanic who uses a cigar as a cheap alternative to a smoke test machine. But I'm not sure if something like that could be used if you have no idea where the leak is coming from.
So I ask those who are far, far more experienced than me. What ares some methods I can use if I have a vacuum leak, but I literally don't have a clue where it could be?
Thank you.
| Bank 1 on your 3800 Series II Engine would be the set of cylinders that is closer to the front bumper of the vehicle (cylinders 1, 3, 5). Bank 2 (cylinders 2, 4, 6) would be against the firewall.
The Leak... Any vacuum-leak hunt shouldn't start without having a clear vacuum-hose diagram in-hand. There should be one on a placard inside the engine bay (possibly in the radiator mount area or the underside of the hood). Here's what it looks like.
If the vehicle does NOT have a supercharger then the vacuum system should look like this:
If the vehicle was equipted with a super charger then it should resemble the following:
Use this map to trace every vacuum line. Even if you cannot see the mall you should be able to feel them from start to finish to make sure they are connected at each end and do not feel fray'd or brittle or damaged in any way. When vacuum lines become "old" you can twist them in your hands and they'll being to break apart. You could also bend/kink them and they'll show cracks and signs of dryness. This means it's time to replace them. Remember that a lot of small leaks will have the same effect as a large leak.
The cigar trick actually works since a cigar has a very thick smoke. Also a fireextinguisher would work, but could get rather messy if you mess it up. You could also check differnet areas with a vacuum pump and pinch off areas to test sections at a time. But this could also get a bit trcky if you're not familiar with the system and don't know what you should be pinching off at what times. Either way any of the "quick" methods stated are all very "hackish" and nothing to be considered as "good practice"..
The vacuum leak is one of those issues that no mechanic loves to diagnose. It's usually either diagnoses in 10 seconds or it turns into quite the migraine. I'm sure that most mechanics would have to agree with me that in order to properlly diagnose an issue like this it must be done correctly and without any short cuts.
I've always attacked issues like these with a smoke tester. I have 3 of them personally. Even if the leak is obvious I will still smoke the vacuum system before and after the repair to ensure that there are no other obvious leaks. This will ensure that the vehicles doesn't come back with the same issue & the same cause. If the vehicle was to return without any leaks then it's time to look at one way check valves and switch-over valves that would cause internal leaks in the system. But, that's a whole other story.
So, check the hoses thoroughly, and if everything checks out. Then it's time to bring it to a reputable shop.
Hope this helps.
| 1 | a vacuum-leak hunt shouldn't start without having a clear vacuum-hose diagram in-hand |
How to dynamically override functions using Zend? | Is it possible to override a function dynamically in Zend?
class My_Core_Default_Api extends Zend_Mail_Transport_Sendmail
{
public function getApi()
{
echo "Old Api";
}
}
class My_Core_New_Api extends Zend_Mail_Transport_Sendmail
{
public function getApi()
{
echo "New Api";
}
}
Here I would like to override Core_Default_Api->getApi() with Core_New_Api->getApi(). Any suggestions please
| It's not real "Zend" question. It's more PHP & design patterns question.
Problem would be that you would need to switch the instances of the Mail Transport - you're looking for Dependency injection, maybe.... or Proxy or Facade design pattern. You need ONE PLACE where you will switch the class and it will change everywhere else. I'd set that in config and have a class that loads propper class name from config and returns new instance... something like this:
TransportSelector::getTransport()->send($mail);
| 0.888889 | PHP & design patterns |
Dried apricots smell of alcohol? | I recently opened a container of store-bought dried apricots and they smell vaguely of fermentation/alcohol. I've never noticed this before.
They taste fine, but should I be concerned? Do they need to be used soon?
Worst-case, would I end up sick, or just tipsy?
| Many fruits start to ferment a bit, some even while still on the trees. For example orange juice normally contains a small amount (normally < 0.1 % vol.) of alcohol too. And some berries that grow in the dunes here in Belgium can make the birds who eat them tipsy when they are ripe (the birds fly a bit erratic during that season...).
The "smell" might also be something you associate with alcohol because you often smell it while sensing/using alcohol (technically you can't "smell" alcohol, as it's odorless, but you can "sense" it in other ways).
| 1 | "smell" is something you associate with alcohol when sensing/using alcohol |
Effects of nuclear explosions in space? | In the Honor Harrington universe, ship-to-ship combat takes two forms: missiles and direct energy weapons.
Missiles come in two forms - bomb-pumped lasers and contact nukes. Both use multi-megaton nuclear initiations to damage enemy ships.
While this sort of event on a planetary surface will obviously have lasting effects, what long-term effects could be expected in a vacuum environment, aside from the destructive force associated with the explosions themselves, and the resulting EMP? Especially, would there be lingering (or spreading) radiation?
| Purely for informational purpose, there has/had been some consideration of using nuclear detonations as primary propulsion for a space-faring craft.
Wikipedia: Project Orion (nuclear propulsion)
Short term effects: propulsion (most likely)!
Long term effects: ?????
| 1 | Nuclear detonations as primary propulsion for space-faring craft |
Need help using vba to fill in blanks left by excel pivot table when using %difference from previous row | So, I'm not very knowledgeable at all yet when it comes to VBA. I have experience with Java, so I understand the concepts of structure behind coding and can read/understand basic-intermediate code. But when it comes to writing it myself, I'm definitely still a 1.5 out of 10 in terms of writing VBA myself. So, any help would be greatly appreciated.
So I have the following example pivot table (my actual is about 10 years of data with a few more columns):
The red and yellow dots are my problem areas. The columns with blank titles are just %differences from the previous row. However, as you can see, using that leaves blank spaces for the first month of every year (those are the yellow dots). Also, for the year lines, it doesn't calculate the %difference from the previous year (the red dots).
So, what I'm needing is (most likely) a PivotTableUpdate or PivotTableChangeSync (I still don't understand the difference actually by the way) to fill in data in those cells with the red and yellow dots. Any thoughts?
Edit: As requested, here's the data powering the pivot table:
For formatting purposes I moved the bottom half of the set up and to the right to fit it all into one picture.
| Without VBA you could try this attempt, i might extend it, but not today - it might be a way to solve this without VBA, but I am missing something.
E2=SUMIFS(D:D,C:C,C2)
F2=IFERROR(E2/E1;1)-1
On the PivotTable you add NP and Test2 to the section of values, then you can use Max or Sum for Test2 and it will look like this:
ATTENION here is an error, because summing the differences does not add up, when looking at the YEAR! But however, you can use the given formulas to get to the sums and differnces between the years ;)
| 0.888889 | F2=SUMIFS(D:D,C:C,C2) |
Tool for automatically generating and laying out an entity relationship diagram? | I've seen a lot of tools which can reverse engineer an ERD from an existing database, but I haven't been able to find one which is capable of automatically laying out the diagram in a reasonable way. Most of them just plop all the entities down on top of each other and call it a day. Some make an attempt at organizing the entities, but they don't do a very good job of it.
Is there any tool out there that will reverse engineer the structure of an existing database, and then automatically lay it out in a way which is easy to understand and reveals the organization of the database? If I were to make such a tool, I'd have it minimize the length of lines connecting entities, minimize the number of lines which cross each other, and make groups of related entities stand out from each other. I'd also try to deduce which tables are lookup tables, which ones are mana-to-many intermediate tables, etc and lay out the entities such that these roles are obvious to a person looking at the diagram.
I don't exactly have the funding to make the above, but I do have some funding to buy a tool like that if it's good.
Edit: I should mention that I'm trying to diagram a database with 100+ tables, so I'd like to automate as much of it as possible. The database is not one I'm very familiar with, so I'm looking to learn from looking at the diagram rather than dumping what I know into a diagram (which seems to be what most diagramming tools are designed for).
| As long as you've got foreign keys in your database I've found that Visio does a pretty good job. I had a postgresql database with about 150 tables from four different merged projects that were connected through various foreign keys and it did an awesome job of extracting all the relationships and grouping the tables together. The diagram had only a few overlapping lines despite extensive foreign keys. Also, because of the foreign keys logical elements were grouped together nicely it was clear which databases most of the tables originated in.
| 1 | Visio does a pretty good job of extracting all the relationships and grouping the tables together |
Show, sort , and limit by products based on subcategory on category page | How do I sort products on a category page by subcategory as well as limit the number of products from each subcategory:
For example if the category was Food I would want to display the following:
Drinks
Coke 12oz, Orange Juice 8oz, Milk Gallon,
Pasta,
Spaghetti 1lb, Pesto 12 pc, Tortellini 1 PC.
And so on, displaying each subcategory name followed 3 products (images etc.)
I currently have a custom template that displays the subcategories but can't figure out the products. Here is my current code:
<?php
$_category = $this->getCurrentCategory();
$collection = $_category->getCollection()
->addAttributeToSelect(
array('url_key','name','all_children','is_anchor','description','image')
)
->addAttributeToFilter('is_active', 1)
->addIdFilter($_category->getChildren())
->setOrder('position', 'ASC')
->joinUrlRewrite();
$helper = Mage::helper('catalog/category');
?>
<ul>
<?php foreach ($collection as $cat): ?>
<li>
<div class="level1descript">
<a href="<?php echo $helper->getCategoryUrl($cat); ?>">
<img src="<?php echo $cat->getImageUrl(); ?>" class="catlevel1image" />
<h2><?php echo $cat->getName(); ?></h2>
</a>
<p class="level1descript">
<?php
$catdesc = '';
$catdesc = strip_tags($cat->getDescription());
if (strlen($catdesc) > 300) {
$catdesc = substr($catdesc, 0, 300) . ' ...';
}
echo $catdesc;
?>
</p>
</div>
<?php
$childLevel2Category = $cat->getCollection()
->addAttributeToSelect(
array('url_key','name','all_children','is_anchor','description','image')
)
->addAttributeToFilter('is_active', 1)
->addIdFilter($cat->getChildren())
->setOrder('position', 'ASC')
->joinUrlRewrite();
?>
<ul>
<?php foreach ($childLevel2Category as $catLevel2) { ?>
<li class="level2cats">
<a href="<?php echo $helper->getCategoryUrl($catLevel2); ?>">
<img src="<?php echo $catLevel2->getImageUrl(); ?>" class="catlevel2image" />
<h4><?php echo $catLevel2->getName(); ?></h4>
</a>
<p class="level2descript">
<?php
$catdesc = '';
$catdesc = strip_tags($catLevel2->getDescription());
if (strlen($catdesc) > 60) {
$catdesc = substr($catdesc, 0, 60) . ' ...';
}
echo $catdesc;
?>
</li>
<?php } ?>
</ul>
</li>
<?php endforeach;?>
</ul>
| I hope you mean sort collection by category id, check this you may need to modify this code:
$products = Mage::getModel( 'catalog/product' )
->getCollection()
->addAttributeToSelect( '*' )
->addFieldToFilter( 'status', Mage_Catalog_Model_Product_Status::STATUS_ENABLED )
->addFieldToFilter( 'visibility', Mage_Catalog_Model_Product_Visibility::VISIBILITY_BOTH );
->addAttributeToFilter( 'category_id', array( 'in' => array( 'finset' => '[CATEGORY_ID_HERE]' ) ) );
->addAttributeToSort( 'category_id', ASC )
->addAttributeToSort( 'name', ASC );
| 0.666667 | Sort collection by category id |
How and when does SQL Agent update next_run_date/next_run_time values? | I've been working on code in T-SQL to add new schedules to a SQL Agent job using the sp_add_jobschedule proc in the msdb database. When I add a new schedule (typically a run-once at a specific date/time) and immediately look at the values in sysjobschedules and sysschedules, I can see that the new schedule has been added and is tied to the job_id for my SQL Agent job. However, the values for next_run_date and next_run_time have 0 in them. When I come back and look at them again in 2 or 3 minutes, they still show 0's in them. However when I come back another 5 or 10 minutes later, it now correctly shows the date and time values corresponding to the next scheduled run.
So my questions are:
How often do these values get updated?
What process is it that updates these values?
If I were to add a schedule that was, say, 1 minute in the future, does that mean that the job will not run since the next_run_date/time haven't been updated yet?
Example of the code I use to add a new schedule:
exec msdb.dbo.sp_add_jobschedule @job_id = @jobID
, @name = @JobName
, @enabled = 1
, @freq_type = 1
, @freq_interval = 0
, @freq_subday_type = 0
, @freq_subday_interval = 0
, @freq_relative_interval = 0
, @freq_recurrence_factor = 0
, @active_start_date = @ScheduleRunDate
, @active_end_date = 99991231
, @active_start_time = @ScheduleRunTime
, @active_end_time = 235959
where @jobID is binary(16) that holds the job_id of the job in question, @ScheduleRunDate and @ScheduleRunTime are INTs with the date and time respectively.
| Short Answer
It looks like the data in msdb.dbo.sysjobschedules is updated by a background thread in SQL Agent, identified as SQLAgent - Schedule Saver, every 20 minutes (or less frequently, if xp_sqlagent_notify has not been called and no jobs have run in the meantime).
For more accurate information, look at next_scheduled_run_date in msdb.dbo.sysjobactivity. This is updated in real-time any time a job is changed or a job has run. As an added bonus, the sysjobactivity stores the data the right way (as a datetime column), making it a lot easier to work with than those stupid INTs.
That's the short answer:
It could be up to 20 minutes before sysjobschedules reflects the truth; however, sysjobactivity will always be up to date. If you want a lot more details about this, or how I figured it out...
Long Answer
If you care to follow the rabbit for a moment, when you call sp_add_jobschedule, this chain of events is set into motion:
msdb.dbo.sp_add_jobschedule == calls ==> msdb.dbo.sp_add_schedule
msdb.dbo.sp_attach_schedule
msdb.dbo.sp_attach_schedule == calls ==> msdb.dbo.sp_sqlagent_notify
msdb.dbo.sp_sqlagent_notify == calls ==> msdb.dbo.xp_sqlagent_notify
Now, we can't chase the rabbit any further, because we can't really peek into what xp_sqlagent_notify does. But I think we can presume that this extended procedure interacts with the Agent service and tells it that there has been a change to this specific job and schedule. By running a server-side trace we can see that, immediately, the following dynamic SQL is called by SQL Agent:
exec sp_executesql N'DECLARE @nextScheduledRunDate DATETIME
SET @nextScheduledRunDate = msdb.dbo.agent_datetime(@P1, @P2)
UPDATE msdb.dbo.sysjobactivity
SET next_scheduled_run_date = @nextScheduledRunDate
WHERE session_id = @P3 AND job_id = @P4',
N'@P1 int,@P2 int,@P3 int,@P4 uniqueidentifier',
20120819,181600,5,'36924B24-9706-4FD7-8B3A-1F9F0BECB52C'
It seems that sysjobactivity is updated immediately, and sysjobschedules is only updated on a schedule. If we change the new schedule to be once a day, e.g.
@freq_type=4,
@freq_interval=1,
@freq_subday_type=1,
@freq_subday_interval=0,
@freq_relative_interval=0,
@freq_recurrence_factor=1,
We still see the immediate update to sysjobactivity as above, and then another update after the job is finished. Various updates come from background and other threads within SQL Agent, e.g.:
SQLAgent - Job Manager
SQLAgent - Update job activity
SQLAgent - Job invocation engine
SQLAgent - Schedule Saver
A background thread (the "Schedule Saver" thread) eventually comes around and updates sysjobschedules; from my initial investigation it appears this is every 20 minutes, and only happens if xp_sqlagent_notify has been called due to a change made to a job since the last time it ran (I did not perform any further testing to see what happens if one job has been changed and another has been run, if the "Schedule Saver" thread updates both - I suspect it must, but will leave that as an exercise to the reader).
I am not sure if the 20-minute cycle is offset from when SQL Agent starts, or from midnight, or from something machine-specific. On two different instances on the same physical server, the "Schedule Saver" thread updated sysjobschedules, on both instances, at almost the exact same time - 18:31:37 & 18:51:37 on one, and 18:31:39 & 18:51:39 on the other. I did not start SQL Server Agent at the same time on these servers, but there is a remote possibility that the start times happened to be 20 minutes offset. I doubt it, but I don't have time right now to confirm by restarting Agent on one of them and waiting for more updates to happen.
I know who did it, and when it happened, because I placed a trigger there and captured it, in case I couldn't find it in the trace, or I inadvertently filtered it out.
CREATE TABLE dbo.JobAudit
(
[action] CHAR(1),
[table] CHAR(1),
hostname SYSNAME NOT NULL DEFAULT HOST_NAME(),
appname SYSNAME NOT NULL DEFAULT PROGRAM_NAME(),
dt DATETIME2 NOT NULL DEFAULT SYSDATETIME()
);
CREATE TRIGGER dbo.schedule1 ON dbo.sysjobactivity FOR INSERT
AS
INSERT dbo.JobAudit([action], [table] SELECT 'I', 'A';
GO
CREATE TRIGGER dbo.schedule2 ON dbo.sysjobactivity FOR UPDATE
AS
INSERT dbo.JobAudit([action], [table] SELECT 'U', 'A';
GO
CREATE TRIGGER dbo.schedule3 ON dbo.sysjobschedules FOR INSERT
AS
INSERT dbo.JobAudit([action], [table] SELECT 'I', 'S';
GO
CREATE TRIGGER dbo.schedule4 ON dbo.sysjobschedules FOR UPDATE
AS
INSERT dbo.JobAudit([action], [table] SELECT 'U', 'S';
GO
That said, it is not hard to catch with a standard trace, this one even comes through as non-dynamic DML:
UPDATE msdb.dbo.sysjobschedules
SET next_run_date = 20120817,
next_run_time = 20000
WHERE (job_id = 0xB87B329BFBF7BA40B30D9B27E0B120DE
and schedule_id = 8)
If you want to run a more filtered trace to track this behavior over time (e.g. persisting through SQL Agent restarts instead of on-demand), you can run one that has appname = 'SQLAgent - Schedule Saver'...
So I think that if you want to know the next run time immediately, look at sysjobactivity, not sysjobschedules. This table is directly updated by Agent or its background threads ("Update job activity", "Job Manager" and "Job invocation engine") as activity happens or as it is notified by xp_sqlagent_notify.
Be aware, though, that it is very easy to muck up either table - since there are no protections against deleting data from these tables. (So if you decided to clean up, for example, you can easily remove all the rows for that job from the activity table.) In this case I'm not exactly sure how SQL Server Agent gets or saves the next run date. Perhaps worthy of more investigation at a later date when I have some free time...
| 0.777778 | SQLAgent - Schedule Saver is updated every 20 minutes if a job is changed . |
Are human males and females more genetically different than members of other species? | I'm looking at this Ted talk about a Saudi Arabia woman who dared to drive a car in the last few years. This reminds me that until the last century or so, women (all over the world?) enjoyed less rights and might've been pigeonholed into roles predetermined by society. Those roles might've encouraged certain traits, and discouraged others. Those who did not conform might've been punished, like the woman in the talk above received death threats and was jailed.
This sounds to me like selective pressure, did it really exist, and did it have any effect on the genetics/traits of modern women?
This makes me interested in the question - compared to other species, are men and women more genetically different because of selective pressure put on women to conform to male-dominated world for thousands of years before 19th century?
| Essentially, what makes a (mammalian) man a man is a small region on the Y-chromosome called SRY. If this region is deleted, a female phenotype having XY-chromosomes develops. If this region is translocated to an X-chromosome, a male phenotype with two X-chromosomes develops. Other than that, the Y-chromosome does not carry a lot of genes.
So apart from the Y chromosome, males and females are genetically very similar and more similar compared to other species.
| 1 | What makes a (mammalian) man a man is a small region on the Y-chromosome called |
Are there any disadvantages to encrypting the password hash? | Is encrypting the password hash in database more secure than storing only the hash?
Suppose we store encrypted SHA-256 result with AES instead of hash directly. Is this a good protection from a situation in the future when someone will break one of the algorithms?
| First of all, every stored password should be hashed with a different pseudo-random salt. Second, SHA-256 is not appropriate for storing passwords; instead, you want to use a key stretching algorithm, as has already been mentioned. There is a lot more detail at Crackstation.
An encrypted hash is also called a keyed hash, and the key is sometimes called a "pepper." There need not be a separate encryption step. Instead, the secret key is part of the input to the hash function. That can improve security somewhat. There are two ways attackers can get a copy of your password hashes. One is to compromise the storage mechanism, as with SQL injection. In that case, a keyed hash can make it effectively impossible to retrieve plaintext passwords from the hashes because the key can be compiled in to a program or otherwise kept outside the password storage mechanism. The other way is to compromise the OS itself. In that case, the key is compromised, and is no longer an impediment against attempts to attack the passwords.
So, the short answer is yes, but you have to do the underlying work right, first.
| 0.666667 | Key stretching algorithm is not appropriate for storing passwords |
Wiki-like tool for writing specifications and documentation | I am looking for a wiki or wiki-like system for writing and managing specification and documentation for a software project.
I know there are lots of wiki-implementations available, but are there some that are especially well-suited for this kind of task?
Actually it doesn't have to be a wiki, just a system that makes it easy to write and navigate specs and documentation, and which support change tracing.
| We're using LaTeX and SVN. Since LaTeX documents are just text files, it plays well with version control, unlike some binary or partially-binary formats.
You get all the advantages (and disadvantages, admittedly) of version control you're used to from using it with your code.
LaTeX takes a little setting up (to define your own styles/class), but once you've done so it's very good - you can concentrate solely on the content rather than its presentation (rather than being tempted to constantly tweak as you are with WYSIWYG), yet still get a slick, professional-looking PDF document at the end.
| 0.666667 | LaTeX and SVN documents play well with version control . |
How long does PhD Application Process take in the UK? | I submitted my application with a supervisor's name fora UK university last week. I plan to apply for a scbolarship after getting an offer. The scholarship application deadline is in March. I would like to know how long it takes to get an application result in a UK uni?
| This will depend on the university. You should tell them your situation.
| 1 | This will depend on the university. |
How complex are sprite tasks usually allowed to be? | What is the general consensus on how detailed a Sprite command can be? I know Sprite tasks aren't spent until the Technomancer changes the command, but does having conditional modifiers like "if" or "if/else" statements or specific details to objectives count as multiple Tasks? Can stuff like that count as a single Task until you give it other conditions, or would any change in activity count as a spent Task? Also, does a single task limit the sprite to use of a single Complex Form or Power, or can they use as many as they need to continue performing a task?
| Sprites are sentients, not drones. The task you give them can be as complex as you desire, though excessive conditional statements might not only frustrate your GM, but also result in your sprites performing emergent behavior that you did not intend them to preform (but 'coded' them to) and thus frustrate you as well. Any task that is complicated in the wrong ways (though if/then/else should be fine in this sense) also runs the risk of confusing your sprite, which is generally not good for the health of your electronics.
N.B.
Sprites are nicer than spirits, in general, and much more forgiving of behavior on the part of technomancers that would constitute "abuse" for summoners. Nonetheless, it is possible to piss off your sprites (or sprites in general) and angry sprites, while more likely to harrass you than kill you outright, are still not something you want to deal with. Sprites mildly resent having tasks, and making a massive if/then/else tree so you can keep them indentured for longer than normal is the kind of thing the book seems to indicate will result in them being mad at you.
Sources:
Sprites are semi-sentient
Technomancers also have the ability to create semi-autonomous entities out of the fabric of the Matrix, digital creatures that answer to the technomancer’s beck and call.
Tasks are continuous
A task is a continuous service the technomancer asks, cajoles, or demands from the sprite.
Spirits struggle against magicians who abuse the system to oppress them
[rules on page 187] This modifier should only be applied when roleplaying calls for it, such as when a magician has been abusive towards her bound spirits or has repeatedly
put them at risk or forced them to undertake draining tasks like
Spell Binding.
Those rules are also applicable to sprites
Registered sprites may be a drain on the technomancer’s mental
resources, if the gamemaster chooses, in the same way that bound spirits
might affect a magician (Bound Spirits, p. 187).
But Sprites are for forgiving and less violent than spirits, generally (compare the following passage to what Free Spirits do when they break free from a binding)
Free sprites that have been registered against their will are
not usually vindictive or determined to inflict harm on the operator,
but will go to any means to counterbalance an “unsatisfied
equation.” What this may mean in particular cases depends on the
nature and profile of the free sprite and is left to the gamemaster.
The sprite can be re-registered through a new registering session,
as long as the free sprite source code is not altered. This can
be done an unlimited number of times, but if the operator glitches
on the re-registering test, the free sprite will get 1 Combat Turn
to do anything it wants before it is brought back under control.
If the technomancer character scores a critical glitch on the reregistering,
he forfeits all remaining owed tasks and the sprite can
do anything it wants.
All quotes except the last one (from Unwired) are from the Core Rulebook.
| 1 | Sprites are forgiving and less violent than spirits, generally . |
Lebesgue measure of any line in $\mathbb{R^2}$. | What is the Lebesgue measure of a line in $\mathbb R^2$? I am guessing that this zero. But i couldn't prove it rigorously. Please help... From this can i conclude that any proper subspace of $\mathbb R^n$ has measure zero.
| Without loss of generality we can suppose that over line $l$ has the form $l=\mathbb R \times 0$.
This follows from the translation- and rotation invariance of the lebesgue-measure.
(We can move our line such that it contains zero. Then we can rotate it)
We write $l=\cup_{k=0}^{\infty}([-k,k]\times 0)$
Now we obtain:
$\lambda_2(l)=\lambda_2(\cup_{k=0}^{\infty}([-k,k]\times 0))\leq\sum_{k=0}^{\infty}\lambda([-k,k]\times 0)=0 $
| 0.888889 | Over line $l$ has the form $l=mathbb R times 0$ |
VPN server to access Samba4 | On my network I have an Ubuntu 12.04 server running Samba4, my domain is fully configured and functional.
Now, I would like to enable VPN access over the internet, and have another box to do so. I have been searching on the internet for guides and information etc, but have not been successful.
I have however found this guide http://www.howtogeek.com/51237/setting-up-a-vpn-pptp-server-on-debian/ but was wondering if I could adapt it somehow to enable access to my DC services.
EDIT: I would need to authenticate my VPN server with my DC, if that is possible of course.
Any insight would be wonderful.
Regards,
Jack Hunt
| How about setting up an (separate?Ubuntu) OpenVPN server? To get started, look here: http://ideasnet.wordpress.com/2012/02/19/ides-networking-creating-a-vpn-site-to-site-using-openvpn-between-2-server-with-ubuntu-10-04lts-server-edition/
OpenVPN.net also provides a OpenVPN Access Server Virtual Appliance that you could take a closer look at if you like to do a quick test setup.
There are plenty of information to find here at SF or via Google on how to setup a OpenVPN server on Ubuntu. OpenVPN server can also handle client connections from Windows, Linux, Andriod etc...) not only site-to-site connections.
| 0.666667 | How to set up an OpenVPN server on Ubuntu |
Water : Aquatic :: Sand : xxx? | Just as aquatic is to water and aerial is to air, what is an equivalent word for sand (or earth, I suppose)?
For context, I’m trying to describe the locomotion of worms within desert sand (as opposed to its surface). Ergo, terrestrial isn’t particularly suitable and neither is earthy.
| Well, fancy words for ‘sandy’ are arenarious and arenaceous, with the second apparently preferred. Perhaps one of those two will do.
You can also use arenaceo- as a combining form. Darwin did, when he wrote of arenaceo-calcareous loam.
Edit
Oh wait, there is one for just what you want here. From the OED:
arenicolous /-ələs/, a.
Etymology: f. as prec. + -ous.
Inhabiting sand.
1851-9 Owen in Man. Sc. Enq. 381 ― Arenicolous mollusks.
The preceding entry referenced above is:
arenicolite /ærɪˈnɪkəlaɪt/.
Etymology: f. mod.L. arēnicol-a sand-worm, lob-worm (f. arēna sand + ‑cola inhabiting) + ‑ite.
A worm-hole made originally in sand, and preserved in a sandstone rock.
1864 in Webster.
Once you remember that Latin had arena for sand (as do Spanish, Italian, Catalan, Portuguese, and various others), the rest is easy: just look for words that start with arena- or areni-, of which we have a fair number. As another example, arenosity is sandiness.
I also looked for things related to Latin sabulum for gravel, modern French sable for sand, but it was not productive, as all our English uses of sable are related to the furry critter, to black, or to heraldry. We have no sabl- words related to sand.
| 1 | Arenicolous mollusks, a sand-worm, lob-worm and arenosity . |
What's wrong with my launchctl config? | I'm trying to auto-run SickBeard on login
python /Applications/Sick-Beard/Sickbeard.py
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC -//Apple Computer//DTD PLIST 1.0//EN http://www.apple.com/DTDs/PropertyList-1.0.dtd >
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.sickbeard.sickbeard</string>
<key>ProgramArguments</key>
<array>
<string>/usr/bin/python</string>
<string>/Applications/Sick-Beard/SickBeard.py</string>
<string>-q</string>
<string>-d</string>
</array>
<key>RunAtLoad</key>
<true/>
</dict>
</plist>
When I run launchctl com.sickbeard.sickbeard.plist it gives me the message:
launchctl load com.sickbeard.sickbeard.plist launchctl: no plist was
returned for: com.sickbeard.sickbeard.plist launchctl: no plist was
returned for: com.sickbeard.sickbeard.plist nothing found to load
| I'm assuming the paths to the python script and its parameters are valid, otherwise you'd most likely be seeing errors in the Console instead.
The last time I saw that error was because there were spurious characters in the plist, e.g. extra spaces, causing syntax errors and therefore making it fail to load. If you run plutil -lint on your plist, this will check the syntax for you and also handily report back the line on which the error occurred.
plutil -lint com.sickbeard.sickbeard.plist
If that doesn't help, the (OSX) How To Start SickBeard at Login or boot on OSX thread on the sickbeard forums has a slightly different plist to yours (sickbeard running from /usr/local as opposed to /Applications - so it could be a permissions thing) and also some people with seemingly the same problem as you
| 1 | syntax errors in python script |
custom form validation class for a module I am building | I am building a module for EE2 and I want to extend CI's form validation library. I also want a separate language file too, kept within my module's directory so it's separate from future EE updates.
I created a libraries folder within my module's folder within the third_party folder.
I named the file: My_Form_validation.php
<?php defined('BASEPATH') OR exit('No direct script access allowed');
class MY_Form_validation extends CI_Form_validation {
/**
* Constructor
*
* @access public
*/
function __construct($rules = array())
{
parent::__construct($rules);
}
public function is_valid($value)
{
$this->form_validation->set_message('is_valid', 'The %s field can not contain any spaces');
return FALSE;
}
}
$this->EE->form_validation->set_rules('short_name', 'Short name', 'required|max_length[30]|is_valid');
I set the rule in the mcp.module_name.php file, I also swapped out $this->EE->form_validation... with $this->CI->form_validation and nothing.
it is not erroring out, it just doesn't seem like it is loading it correctly.
I tried loading the my form validation library in the mcp.module_name.php constructor and it returns this error: Fatal error: Class 'CI_Form_validation' not found
I shouldn't have to load it since it should load along with the default form validation library.
Below is my constructor for the mcp.module_name.php file
public function __construct()
{
$this->EE =& get_instance();
$this->CI =& get_instance();
$this->EE->config->load('config');
$this->conf = $this->EE->config->item('restaurant_menu_defaults');
$this->CI->load->helper('file');
$this->EE->load->helper('html');
$this->EE->load->model('restaurant_menu_model');
$this->base = BASE.AMP.'C=addons_modules'.AMP.'M=show_module_cp'.AMP.'module=restaurant_menu';
$this->base_url = BASE.AMP.'C=addons_modules'.AMP.'M=show_module_cp'.AMP.'module=restaurant_menu';
$this->EE->cp->add_to_head('<link rel="stylesheet" href="/themes/third_party/restaurant_menu/css/restaurant_menu.css" type="text/css" media="print, projection, screen" />');
$this->base_short = 'C=addons_modules'.AMP.'M=show_module_cp'.AMP.'module=restaurant_menu';
$this->data['base_url_short'] = $this->base_short;
$this->data['base_url'] = $this->base;
$this->site_id = $this->EE->config->item('site_id');
$this->EE->cp->set_breadcrumb($this->base, $this->EE->lang->line('Restaurant Menu'));
// setup navigation
$this->EE->cp->set_right_nav(array(
'module_nav_home' => $this->base_url.AMP.'method=index',
//'module_nav_settings' => $this->base_url.AMP.'method=settings',
));
}
UPDATE:
added this to my construct on mcp.module_name
$this->EE->load->library('form_validation');
$this->EE->load->library('MY_Form_validation');
then in my methods, I run the form validation using: if($this->EE->my_form_validation->run() === FALSE)
Then I set my form field rules:
$this->EE->my_form_validation->set_rules('title', 'title', 'required|max_length[75]');
$this->EE->my_form_validation->set_rules('short_name', 'Short name', 'required|is_valid|max_length[30]');
$this->EE->my_form_validation->set_error_delimiters('', '');
MY_Form_validation.php
<?php defined('BASEPATH') OR exit('No direct script access allowed');
class MY_Form_validation extends EE_Form_validation {
/**
* Constructor
*
* @access public
*/
function __construct($rules = array())
{
parent::__construct($rules);
$this->EE =& get_instance();
}
public function is_valid($value)
{
$this->EE->form_validation->set_message('is_valid', 'The %s field can not contain any spaces');
return false;
}
}
It won't post the form unless all the rules are met, but it won't display the form error messages, why do you think that is?
| First, no need to ever load directly from CI - you can always use EE. (So, $this->EE->load->helper('file').)
Same with your validation class - I'd extend Form_validation, not CI_Form_validation.
(Generally, EE should serve as your path to anything CI-related to avoid any conflicts.)
You'll need to load your custom validation library, and call it by its unique name as well. You may also have to load the form validation class before loading your custom library.
$this->EE->load->library('form_validation');
$this->EE->load->library('my_form_validation');
// $this->EE->my_form_validation->run();
| 0.666667 | EE should serve as your path to anything CI-related to avoid conflicts |
How many domains can you configure on a Sun M5000 system? | We have a few Sun M5000 servers with the following configuration:
Each system has 2 system boards each containing 2 x 2.5Ghz quad core processors
Each system board has 16GB of RAM
Each system has 4 x 300GB disks
I would like to know how many hardware domains can I configure per system? Do I need one system board per domain (implying a total of 2 domains), or can I create 4 domains, each with one cpu each?
| The maximum number of domains on an M5000 is four.
http://www.sun.com/servers/midrange/m5000/specs.xml
| 0.666667 | Maximum number of domains on an M5000 |
Are Mintakans related to Vulcans? | In TNG "Who Watches the Watchers" we learn about the Mintakans, who are described as "proto-Vulcan humanoids". Does this mean that the Mintakans come from a common ancestor to the Vulcans, or does it mean that the two species have evolved coincidentally to share many of the same features? (Or not so coincidentally if you take into account that genetic-seeding by the super ancient humanoids.)
We have been shown many species that look completely like humans, and even entire planets that mirror Earth (TOS "Miri") and maybe some of those species could be considered "proto-human humanoids".
I don't think it has been defined how long Vulcans have had space travel, or if it's even possible the Vulcans evolved from some other species that had space travel earlier, and the Mintakans are some off-shoot of that species. This could possibly be justified from what Spock says in TOS "Return to Tomorrow" where he seems to suggest in response to Sargon and the astrobiology doctor that there are unexplained issues with Vulcans evolving on the planet Vulcan, that they might have been colonized by Sargon's people instead.
Interesting reading:
http://en.memory-alpha.org/wiki/Vulcan_history
| Nobody knows.
In "Return to Tomorrow" Spock speculated that Vulcans might be descended from Sargon's people more than 600,000 years ago. In any case there might be descendants of other colonies of Sargon's people on other planets, who would look a lot like Sargon's people - whose biological bodies were never seen but believed by Sargon to resemble Earth Humans or Vulcans.
"Balance of terror" implies that Vulcan conquered and colonized other planets once, and Romulans seemed to be descendants of those warlike and unreformed ancient Vulcans. It is logical to assume that society on Vulcan and Romulus reverted to barbarism as civilization collapsed during the fall of the Vulcan Empire and it took countless thousands of years for Vulcan and Romulus to rebuild civilization and become space traveling societies again.
STTNG "Gambit" mentions ruins of Romulan off-shoot cultures on various planets one being two thousand years old. Thus we may deduce that probably the Romulans regain spaceflight abilities several thousand years ago and later lost them and regained them again just a few centuries ago.
Of course many fans believe in a far different chronology based on Diane Duane's novels, with Vulcan and Romulus both keeping interstellar travel abilities for over two thousand years until the time of STTNG. But that contradicts the chronological implications of the various episodes.
In "The Paradise Syndrome" Spock mentions that some Vulcan offshoot cultures use musical notation alphabets. That implies that there were at least two known ones which did so and at least one known one which did not.
The people of Rigel V might be descended from Vulcans and/or Sargon's people, since in "Journey to Babel" it was said that their physiology was similar to, but not identical with, Vulcan physiology.
And that is about all the information available to decide whether the Mintakans are descended from Vulcans and/or Sargon's b people or evolved independently to be similar to Vulcans.
Except of course that it hardly needs saying that a planet orbiting a star such as Mintaka would not have time to evolve intelligent life and the Mintakans and/or their planet must have been imported from elsewhere, perhaps by the Preservers.
| 0.888889 | In "Return to Tomorrow" Spock speculated that Vulcans might be descended from Sargon's people more than 600 |
Can I expect my e-mail to be routed securely? | If I connect to my e-mail server via SSL (SMTP/SSL) and the recipient also only checks his e-mail via SSL (web/https or IMAP/SSL), does this - generally speaking - increase the security for the message content in any way?
That is, will the communication between my providers e-mail server and the recipients e-mail server be "secure"(*), or will the e-mail be delivered plain text between the servers?
(*) Secure in the context of: encrypted throughout it's transit. Not secure in the sense that I'd put any really sensitive info in there.
| The SMTP servers may (probably will) still transfer the email as plain text. Sometimes SSL is used, but you cannot count on this being the case unless you specifically know the configuration of the specific servers on both ends. This means that in your scenario, an adversary capable of monitoring Internet backbone traffic could intercept the email. (Generally adversaries with this level of capability are state actors.)
SSL is still important on both ends to protect account credentials, and it will protect you against adversaries monitoring the traffic on your local network. Many attacks are going to be at this level - someone on the same wireless network as you, for instance, or who has compromised a local server on your LAN. However, SSL will do nothing to protect you against a compromised SMTP server. Message-level encryption is required if you want to avoid any transmission of the message in plaintext, and importantly means that the message will not be stored in plaintext on either server. For non-state adversaries this is the biggest attack vector - just compromise the SMTP server on either end and you can read all the plaintext mail even if every transmission along the way used SSL.
S/MIME and PGP (GnuPG) are the two standards for doing this. Even then, the message envelope will be visible. You cannot prevent an adversary who can sniff the traffic between the SMTP servers from reading the envelope, so they would know things such as the to, from, and subject line.
To directly answer your question, both parties using SSL to send and retrieve their email does improve your security - and it improves your security versus non-state adversaries a lot - but to secure the message content as much as possible you should use message-level encryption to fully encrypt the message body, and accept that the email headers will still be transmitted in the clear. An adversary capable of seeing the traffic between the SMTP servers would still be able to tell who you were emailing and what the subject line was - there's no way around that besides "don't use email" - but they would not be able to read the body of the message.
| 0.888889 | SSL is still important on both ends to protect account credentials . |
How are electromagnetic waves differentiated? | I would like to know how the signals for remote controlled cars, radios, etc.. That use radio waves are told apart from each other. I know that the radio waves are modulated to encode data and the frequency or amplitude are changed, so then the waves are propagated through the air and received at another location via a receiver that is tuned to a certain frequency that the waves were emitted, but I'm sure in most places in the world by now there are numerous amounts of waves traversing at any point, why doesn't the receiver of this device happen to catch another wave of the same frequency instead of the one that was intended? or is there anything that stops me from having a device that emits a wide range of frequencies or amplitudes that would manipulate nearby electronics?
| Radio wave receivers are designed to resonate at a particular frequency. If you look at the response of a resonant device as a function of frequency you get something like (this image is from the Wikipedia article):
This is a rather busy plot, but the point to take away is that the response of the resonant system is greatest when the frequency matches the resonant frequency. The more resonant the system is (the higher its Q factor) the more sharply peaked the response is.
So if you want your radio to pick up just 98.4MHz (the frequency of the radio station I'm listening to at the moment) you tune your receiver to resonate at 98.4MHz. It will still pick up other radio frequencies as well, but because of the resonance it's far more sensitive to the resonant frequency than to the other frequencies.
| 1 | The more resonant the system is, the higher its Q factor, the sharper the response is |
On surjections, idempotence and axiom of choice | The following assertion is trivial in ZFC, or even in much weaker theories. Is it also true in ZF?
(I couldn't find it in the Consequences site so far.)
If $A$ is an infinite set such that $A$ can be mapped onto $A\times 2$ then $|A\times 2|=|A|$
The problem is that we cannot necessarily choose from every fiber of $f$, so we cannot construct an injection from $A$ to $f^{-1}(A\times\lbrace 0\rbrace)$, which will prove the assertion.
While I'm on the topic, is it possible for a D-finite set to have such property? It is possible for a D-finite set to be surjected onto a larger set than itself, but what about that large?
| The answer is no.
First, I argue that it is consistent with ZF that a Dedekind
finite set $A$ can map onto $A\times 2$, and much more.
To see this, begin with any infinite Dedekind finite set $B\subset 2^\omega$, which is furthermore dense in the sense that any finite binary sequence has extensions in $B$. It is consistent with ZF that such a dense set $B$ exists, since in fact the usual symmetric-model arguments produce infinite Dedekind-finite sets that are dense.
Let $A$ consist of the finite non-repeating sequences from
$B$. Note that $A$ is still Dedekind finite, since any countably
infinite subset of $A$ can be used to produce a countably infinite
subset of $B$. Moreover, I claim that $A$ surjects onto
$A\times 2$ and indeed, onto $A^{{\lt}\omega}$.
To see that $A$ surjects onto $A\times 2$, given $a=\langle b_0,\ldots,b_n\rangle\in A$, let $j$ be the first bit of $b_0$ and define $f(a)=(\langle b_1,\ldots,b_n\rangle,j)$. This is onto, since given any $(\langle b_1,\ldots,b_n\rangle,j)$, we just adjoin $b_0$ starting with digit $j$ to form $a=\langle b_0,\ldots b_n\rangle$, which maps to the original pair.
For fun, let me show somewhat more, namely, that $A$ actually surjects onto $A^{{\lt}\omega}$. I shall define a function $f:A\to A^{{\lt}\omega}$ as follows. Suppose that we are given $a=\langle
b_0,\ldots,b_n\rangle\in A$. In order to define $f(a)$, we look at a certain finite initial segment of $b_0$, which we take to code a number $k$ and maps $\pi_i:n_i\to n$ for $i\lt k$. This can be coded in some canonical way, whose details are not important. (For example, perhaps $b_0$ starts with $k$ many $0$s, and after this there are $k$ blocks of $1$s, with the $i^{th}$ block of length $n_i$, and after this the bits are given to define the maps $\pi_i:n_i\to n$.) We use these maps to assemble $f(a)$ from the rest of the reals $b_1,\ldots,b_n$. Specifically, let $f(a)=\langle
\vec x_0,\ldots,\vec x_k\rangle\in A$, where $\vec x_i=\langle
b_{\pi_i(0)},\ldots,b_{\pi_i(n_i-1)}\rangle$. That is, each $\vec x_i$ enumerates a subset of $b_1,\ldots b_n$ in the order specified by $\pi_i$. In summary, a finite part of $b_0$ tells us how to assemble $f(a)$ according to a definite procedure from the other reals $b_1,\ldots,b_n$ appearing in $a$. (And if $b_0$ happens not to code things correctly, then we default to some constant value.) This defines $f:A\to A^{{\lt}\omega}$ without using the axiom of choice.
Furthermore, the map is surjective, since for any finite sequence
of injective tuples $\langle \vec x_0,\dots,\vec x_k\rangle$ from $B$, we may consider the reals appearing in those tuples and enumerate them $b_1,\ldots,b_n$, deleting repetitions, and then assemble a suitable $b_0$, using the fact that $B$ is dense in order to know that our desired collection of maps $\pi_i$ for $i\lt k$, which is coded by some finite binary sequence, can be extended to an element $b_0\in B$. It follows that $f(b_0,b_1,\ldots,b_n)$ is exactly the desired sequence of tuples. This surjectivity argument does not use the axiom of choice.
In summary, $A$ surjects onto $A\times 2$ and even $A^{{\lt}\omega}$, but it is not bijective with $A\times 2$ or indeed with any superset of $A$, since it is Dedekind finite.
Thus, one cannot deduce in ZF that $A$ is bijective with $A\times 2$, just from knowing that it surjects onto $A\times 2$. This is true even when $A$ is a set of reals, since the example provided above has a bijection to a set of reals.
| 0.666667 | Dedekind finite set $A$ can map onto $Atimes 2$, and much more. |
Wireless link frequency choice (900Mhz vs 5.8Ghz) for 2-3km distance | I have recently been contracted by a client of mine to facilitate the wireless communication of his "home" offices and a secondary site.
The primary site is the top two floors of a 5-story office building (15m height more or less) an the secondary is one of two open "lots" (which one is TBD by management). The ground distance from the secondary sites is a little more than 2km for the one closer and around 2.9km for the one furthest.
The link will be used to transmit the video feed of 1 (or even possibly two) IP cameras and some kind of Ethernet-enabled environmental or weather sensor. I have checked the necessary b/w for the cameras and both 900Mhz and 5.8Ghz are more than adequate for even 4 of them, much more for 2. I have also verified that there is clear line-of-sight to both possible installation points and that the 60% Fresnel Zone clearance is more than covered. Bear in mind that this is my first long distance link (long with or without quotes) and I hate to admit that wireless physics is far from my strong suit.
The ultimate point of my question is that although I have read a lot about frequency choice the last few days, I continue to find some ambiguity (I know it is just me that finds it ambiguous). Most sources, like this one, agree that although the lower frequencies have less losses over a given distance (free-space-loss I learned it is called) they need larger antennae for the same "strength" of trasmission (is "gain" really the same as "strength"?).
So, for the given distance of 2-3km and given also that all typical requirements are met, which is preferable (or do I dare say "better") frequency? Should I choose 900Mhz with a relatively "small" antenna on the basis that 3km is not really "long distance" and that it will provide a link with less attenuation ergo less retransmits ergo higher overall speed? Or should I choose the 5.8Ghz option for the superior b/w (I am still not very sure about this, please correct me if wrong) on the basis that at this distance there is no real difference so why not take the "better" one?
On a side note, should I stay to the beaten path of true WiFi or should I consider proprietary bridging solutions like the ones from Ubiquiti? I have a lot of experience with their Access Points and am really satisfied, so I would not mind integrating one more of their products in my client. In any case, I am looking for an optimal solution, choice of vendor is of very little concern at this point.
Forgive my ignorance and the possible mistaken use of language.
UPDATE:
I arranged to have a spectrum analyzer on loan for a couple of days. I will make sure that the 900Mhz band is reasonably clear and proceed down that way.
UPDATE 2:
I had the aforementioned equipment available to play with for a day and a half. The conclusive finding is that the 9Mhz band is almost "empty" in the area, as one suggested here, so that takes care for the frequency choice issue.
Concerning the equipment now, I am going with Ubiquiti AirMax Yagi antennae and matching RM900 2x2 radios. Preliminary testing on my part and from the client's employees shows that performance exceeds expectations.
On a side note, the chosen "lot" is the one that is 3km away.
| Chris S's answer is incorrect in several areas.
3km is not approaching the limit of 5.8GHz. Similarly, that's not as big of a distance as for 2.4GHz wifi either. Chris says 10X, I say 100X the distance is possible. The longest range 5.8GHz wifi that I've heard of is 304KM with a 1.2M hand made antenna (See: Long Range Wifi). I believe it went over water so there were not any thing in the way of the signal. It used Ubiquity radios. I don't know if it was reliable, but to get a connection and send data over that distance is nothing short of amazing.
I used to work for a wisp carrier and had wifi radios about twice the size of your hand easily going 10KM with good line of site. I personally had wifi on my house going 8KM without any issues. Amazingly, they were only 500mW.
We were using 5GHz radios and a mixture of Ubiquity and Microtik hardware. They work almost flawlessly.
While it is true that with lower frequencies you need bigger antennas. You'll notice that your home wifi doesn't have large antennas. Neither do 5GHz ones.
In reality, 2.4GHz should perform better, but 5GHz in my experience works just as well.
In theory, 5GHz could be affected by rain fade, but I didn't find that even over the 8KM link.
As for 2.4GHz and other devices like microwaves and cordless phones inside the office, it doesn't even factor in. The reason it doesn't factor in is that you'll be using directional antennas. Better still, if the antenna is on an iron roof you will be shielded from all that noise coming from inside the office/house.
Having said all of that, I will say that it's not perfect for every situation.
You need:
Line of site between the two buildings. Factoring in the freznel zone (good open clearance)
A suitable place to mount the antenna to achieve point 1.
Hopefully not much wifi traffic facing your directional antennas (no gaurantees there, but it should be workable) even in a reasonably crowded wifi space.
Freznel zone looks like this:
By the way, I've had trees in the way of the freznel zone and in some cases right in the middle and it still worked, although it does affect the performance a lot. Install your antennas as high as practical/possible.
You can still get interference issues. Usually because of other devices transmitting in your direction at the same frequency. So it's not perfect. Directional antennas help a lot with that.
I can recommend the 5.8GHz radios simply because I know they work well. And yes, provide good bandwidth! From memory I used a Ubiquity Bullet M5 with a patch antenna (another brand). The other end was a less directional antenna feeding multiple clients but used a similar Microtik radio.
I don't know of anyone who uses 900MHz. But I do see you can buy them at around 3X the cost than 2.4 or 5.8. Stick away from it, it seems uncommon. In several countries the 900MHz spectrum is quite crowded anyway.
Update: You've been looking at the airmax antennas and the 900MHz radios. While I think performance should be great. I think you may be spending much more than you need to... perhaps a little overkill!? 3KM is not a long distance. I'd try some of these if you can.
http://www.gowifi.co.nz/antennas/5-ghz/directional/5.8-ghz-27-dbi-cast-reflector-grid-antenna.html combined with a Bullet M5.
Update2: You can also mitigate interference issues using polarized antennas. Here's a good write up that explains the concept. From memory, we used horizontal polarization. As I recall sometimes if I set the client radio to vertical polarization I could see maybe 12 AP's. But when setting it to horizontal I only saw 3 or 4 and half of them were ours.
| 0.888889 | directional antennas are not perfect for a crowded wifi space. |
If $f: \mathbb Q\to \mathbb Q$ is a homomorphism, prove that $f(x)=0$ for all $x\in\mathbb Q$ or $f(x)=x$ for all $x$ in $\mathbb Q$. | If $f: \mathbb Q\to \mathbb Q$ is a homomorphism, prove that $f(x)=0$ for all $x\in\mathbb Q$ or $f(x)=x$ for all $x$ in $\mathbb Q$.
I'm wondering if you can help me with this one?
| There is also a related result that can be useful (see Atiyah Macdonald): If $A$ is a field, then every homomorphism of $A$ into a nonzero ring $B$ is injective. So, you can conclude that necessarily $f(1)=1$ (otherwise is the zero homomorphism), then $f(n)=n$, for $n$ integer, and the result follows, since $f(n/m)=f(n)f(m)ˆ{-1}=n/m$.
| 0.777778 | If $A$ is a field, then every homomorphism of $B$ into a nonzero ring $B |
How do I restore my wolf's health in minecraft? | I have a few pet wolves' in creative mode on minecraft (Pc) and one of them is on very low health (Its tail is sagging). Is there any way I can heal him?
| You could always throw a Splash Potion of Healing at it.
| 1 | Splash Potion of Healing |
use of verb "accord" |
One would never defeat one’s circumstances by working and saving one’s
pennies; one would never, by working, acquire that many pennies, and,
besides, the social treatment accorded even the most successful
Negroes proved that one needed, in order to be free, something more
than a bank account.
Letter from a Region in My Mind
Can I understand the bold word as "accorded that"?
Thank you.
| This meaning is closer to "given to". I'll edit when I figure out why.
Edit: yeah, I have no clue why. This is a very dated meaning, but it still came to me immediately. It's passive, so it means "that is given to" here.
| 0.777778 | This meaning is closer to "given to" |
Do citizens of Hong Kong living in Canada - still need a visa to enter Russia for <2 weeks? | From what I understand, citizens of Hong kong (i.e. holders or HK Special Administrative Region passports) do not require a visa to go to Russia for short trips less than 14 days, according to this page. Does it make a difference if that person currently lives in another country, such as Canada, citizens of which - do require a visa to go to Russia? The same person is also holding a Canadian passport.
Does current residency play a role in this matter at all, if the person tries to enter Russia as a Hong Kong citizen?
| According to Timatic, a Hong Kong citizen does not require a visa to visit Russian for up to 14 days, even if they are a resident of Canada. Note that you will require an onward ticket in order to be granted entry.
In general, residency does not affect visa requirements, however it's always a good idea to check.
| 1 | Hong Kong citizen does not require a visa to visit Russian for up to 14 days . |
Defining a persistent static route on Mac OS X | How does one define a static route on MacOS X which persists through reboots? The only suggestion I've found on Google advises setting up a launchd service to run at boot, which seems like a horrible hack (does it survive a network restart without rebooting, for instance?)
To set up the route I need temporarily, I can run the following:
route add -net ${network} ${gateway} ${netmask}
How would I make this persist?
| I have to disagree on the order of goodness - if the OP uses launchd (either with a manually created plist or one created with lingon), they can have it run at boot. If they use an AppleScript based solution like RouteSplit, they won't be able to run it without a user logged in.
Charles, I'm curious, why does using an OS vendor sanctioned tool like launchd seem hackish to you?
| 1 | Why does using an OS vendor sanctioned tool like launchd seem hackish? |
GPO/Script setting screen Resolution to all domain | Hi I have a closed domain that I can not add any new utility/software and I would like to set the same resolution to all the computers but have found there no good way using GPO is there a another way? Hopefully using VBS. I have read about changing the regestriy keys but will it work for different computers with different hardware? Is there any other option?
| You could either use Powershell or VBScript to call the appropriate Windows API functions. If you do not want to mess with scripting, you could use a third-party utility like qres/resswitch
| 1 | Powershell or VBScript to call the appropriate Windows API functions |
Write a python script that goes through the links on a page recursively | I'm doing a project for my school in which I would like to compare scam mails. I found this website: http://www.419scam.org/emails/
Now what I would like to do is to save every scam in apart documents then later on I can analyse them.
Here is my code so far:
import BeautifulSoup, urllib2
address='http://www.419scam.org/emails/'
html = urllib2.urlopen(address).read()
f = open('test.txt', 'wb')
f.write(html)
f.close()
This saves me the whole html file in a text format, now I would like to strip the file and save the content of the html links to the scams:
<a href="2011-12/01/index.htm">01</a>
<a href="2011-12/02/index.htm">02</a>
<a href="2011-12/03/index.htm">03</a>
etc.
If i get that, I would still need to go a step further and open save another href. Any idea how do I do it in one python code?
Thank you!
| You could use HTML parser and specify the type of object you are searching for.
from HTMLParser import HTMLParser
import urllib2
class MyHTMLParser(HTMLParser):
def handle_starttag(self, tag, attrs):
if tag == 'a':
for attr in attrs:
if attr[0] == 'href':
print attr[1]
address='http://www.419scam.org/emails/'
html = urllib2.urlopen(address).read()
f = open('test.txt', 'wb')
f.write(html)
f.close()
parser = MyHTMLParser()
parser.feed(html)
| 0.888889 | HTML Parser import urllib2 class MyHTMLParser |
Is apt-get upgrade a dangerous command? | When I use apt-get update and apt-get upgrade,there are some packages should installed in newest version,like below:
The following packages will be upgraded:
accountsservice apparmor apport apt apt-transport-https apt-utils binutils
cloud-init cpp-4.8 dpkg fuse g++-4.8 gcc-4.8 gcc-4.8-base gdisk gnupg gpgv
grub-common grub-legacy-ec2 grub-pc grub-pc-bin grub2-common initscripts
isc-dhcp-client isc-dhcp-common libaccountsservice0 libapparmor-perl
libapparmor1 libapt-inst1.5 libapt-pkg4.12 libasan0 libatomic1 libbsd0
libcurl3-gnutls libdrm2 libedit2 libfuse2 libgcc-4.8-dev libgd3 libgomp1
libitm1 libjson-c2 libjson0 libnuma1 libpam-systemd libpolkit-agent-1-0
libpolkit-backend-1-0 libpolkit-gobject-1-0 libquadmath0 libstdc++-4.8-dev
libstdc++6 libsystemd-daemon0 libsystemd-login0 libtsan0 libudev1 libxext6
linux-libc-dev ntpdate openssl overlayroot patch policykit-1 ppp
python-urllib3 python3-apport python3-problem-report python3-update-manager
rsyslog systemd-services sysv-rc sysvinit-utils tcpdump tzdata udev
update-manager-core
75 upgraded, 0 newly installed, 0 to remove and 4 not upgraded.
If I didn't know every one of there packages what will happen if there update in newest version.I shouldn't execute this command(apt-get upgrade).
For example:
This php version is before I upgrade
yzxu@ubuntu:/tmp/git-2.1.2$ php --version
PHP 5.6.6-1+deb.sury.org~precise+1 (cli)
Copyright (c) 1997-2015 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2015 Zend Technologies
with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2015, by Zend Technologies
and after I upgrade:
yzxu@ubuntu:/tmp/git-2.1.2$ php --version
PHP 5.6.10-1+deb.sury.org~precise+1 (cli)
Copyright (c) 1997-2015 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2015 Zend Technologies
with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2015, by Zend Technologies
The php version is changed.And if I didn't what what was change in two version,should I upgrade it?Is it will influence product?
| When you run apt-get upgradeit updates all installed packages on your system.
It is perfectly safe (unless you cut it off before it finishes) as all packages are from the repos (you should only install one's you trust) and are (probably) well tested before uploading.
The only small risk is a risk of bugs within the packages there self, but this could happen to any thing on any OS that was upgraded as bugs are common in any software and come and go based on version.
Should you upgrade ? Well thats up to you, I would say yes, if you don't like upgrade use the application-updater app, same thing no output to make you worried.
Here is some documentation for apt so you can find out more
| 0.555556 | apt-get upgradeit updates all installed packages on your system |
How to split very long equation in two pages? | I need to split this equation in two pages. Can you help me? Thanks
\documentclass[11 pt,a4paper,oneside,openany, notitlepage]{article}
\input epsf
\usepackage{amsmath, amssymb, graphics}
\newcommand{\mathsym}[1]{{}}
\usepackage{amsthm}
\usepackage{amsfonts}
\marginparwidth 0pt
\oddsidemargin 0pt
\evensidemargin 0pt
\marginparsep 0pt
\linespread{1.5}
\topmargin 0pt
\textwidth 6.5in
\textheight 8.5 in
\begin{document}
\begin{equation}
\begin{aligned}
\Theta^\diamond_o:=\{\theta & \in \Theta | \\
&
\begin{pmatrix}
H_l^{(1)}(x;\theta) \mathbb{P}(X=x) \leq \mathbb{P}(G_{\cdot j}=g_{\bullet}^{(1)},X=x) \leq H_u^{(1)}(x;\theta)\mathbb{P}(X=x) \\
H_l^{(2)}(x;\theta)\mathbb{P}(X=x) \leq \mathbb{P}(G_{\cdot j}=g_{\bullet}^{(2)},X=x) \leq H_u^{(2)}(x;\theta) \mathbb{P}(X=x)\\
\vdots\\
H_l^{(h)}(x;\theta)\mathbb{P}(X=x) \leq \mathbb{P}(G_{\cdot j}=g_{\bullet}^{(h)},X=x) \leq H_u^{(h)}(x;\theta)\mathbb{P}(X=x) \\
\vdots\\
H_l^{(2^{n-1})}(x;\theta)\mathbb{P}(X=x) \leq \mathbb{P}(G_{\cdot j}=g_{\bullet}^{(2^{n-1})},X=x) \leq H_u^{(2^{n-1})}(x;\theta)\mathbb{P}(X=x) \\
\end{pmatrix}\\
&\forall x \in \mathcal{X}\}=\{\theta \in \Theta | \\
&
\begin{pmatrix}
H_l^{(1)}(x;\theta) \mathbb{P}(X=x)-\mathbb{P}(G_{\cdot j}=g_{\bullet}^{(1)},X=x) \leq 0\\ \mathbb{P}(G_{\cdot j}=g_{\bullet}^{(1)},X=x)-H_u^{(1)}(x,n;\theta)\mathbb{P}(X=x) \leq 0\\
H_l^{(2)}(x;\theta) \mathbb{P}(X=x)-\mathbb{P}(G_{\cdot j}=g_{\bullet}^{(2)},X=x) \leq 0\\ \mathbb{P}(G_{\cdot j}=g_{\bullet}^{(2)},X=x)-H_u^{(2)}(x;\theta)\mathbb{P}(X=x) \leq 0\\
\vdots\\
H_l^{(h)}(x;\theta) \mathbb{P}(X=x)-\mathbb{P}(G_{\cdot j}=g_{\bullet}^{(h)},X=x) \leq 0\\ \mathbb{P}(G_{\cdot j}=g_{\bullet}^{(h)},X=x)-H_u^{(h)}(x;\theta)\mathbb{P}(X=x) \leq 0\\
\vdots\\
H_l^{(2^{n-1})}(x;\theta) \mathbb{P}(X=x)-\mathbb{P}(G_{\cdot j}=g_{\bullet}^{(2^{n-1})},X=x) \leq 0\\ \mathbb{P}(G_{\cdot j}=g_{\bullet}^{(2^{n-1})},X=x)-H_u^{(2^{n-1})}(x;\theta)\mathbb{P}(X=x) \leq 0\\
\end{pmatrix}\\
&\forall x \in \mathcal{X}\}\subseteq\{\theta \in \Theta | \\
&
\begin{pmatrix}
\sum_{x \in \mathcal{X}}^{}\left(H_l^{(1)}(x;\theta) \mathbb{P}(X=x)-\mathbb{P}(G_{\cdot j}=g_{\bullet}^{(1)},X=x)\right)\mathbb{P}(X=x) \leq 0\\
\sum_{x \in \mathcal{X}}^{}\left(\mathbb{P}(G_{\cdot j}=g_{\bullet}^{(1)},X=x)-H_u^{(1)}(x;\theta)\mathbb{P}(X=x)\right)\mathbb{P}(X=x) \leq 0\\
\sum_{x \in \mathcal{X}}^{}\left(H_l^{(2)}(x;\theta) \mathbb{P}(X=x)-\mathbb{P}(G_{\cdot j}=g_{\bullet}^{(2)},X=x)\right)\mathbb{P}(X=x) \leq 0\\
\sum_{x \in \mathcal{X}}^{}\left(\mathbb{P}(G_{\cdot j}=g_{\bullet}^{(2)},X=x)-H_u^{(2)}(x;\theta)\mathbb{P}(X=x)\right)\mathbb{P}(X=x) \leq 0\\
\vdots\\
\sum_{x \in \mathcal{X}}^{}\left(H_l^{(h)}(x;\theta) \mathbb{P}(X=x)-\mathbb{P}(G_{\cdot j}=g_{\bullet}^{(h)},X=x)\right)\mathbb{P}(X=x) \leq 0\\
\sum_{x \in \mathcal{X}}^{}\left(\mathbb{P}(G_{\cdot j}=g_{\bullet}^{(h)},X=x)-H_u^{(h)}(x;\theta)\mathbb{P}(X=x)\right)\mathbb{P}(X=x) \leq 0\\
\vdots\\
\sum_{x \in \mathcal{X}}^{}\left(H_l^{(2^{n-1})}(x;\theta) \mathbb{P}(X=x)-\mathbb{P}(G_{\cdot j}=g_{\bullet}^{(2^{n-1})},X=x)\right)\mathbb{P}(X=x) \leq 0\\
\sum_{x \in \mathcal{X}}^{}\left(\mathbb{P}(G_{\cdot j}=g_{\bullet}^{(2^{n-1})},X=x)-H_u^{(2^{n-1})}(x;\theta)\mathbb{P}(X=x)\right)\mathbb{P}(X=x) \leq 0
\end{pmatrix}\\
&\}=\{\theta \in \Theta | \\
&
\begin{pmatrix}
\mathbb{E}_X\left(H_l^{(1)}(X;\theta) \mathbb{P}(X)-\mathbb{P}(G_{\cdot j}=g_{\bullet}^{(1)},X)\right) \leq 0\\
\mathbb{E}_X\left(\mathbb{P}(G_{\cdot j}=g_{\bullet}^{(1)},X)-H_u^{(1)}(X;\theta)\mathbb{P}(X)\right)\leq 0\\
\mathbb{E}_X\left(H_l^{(2)}(X;\theta) \mathbb{P}(X)-\mathbb{P}(G_{\cdot j}=g_{\bullet}^{(2)},X)\right)\leq 0\\
\mathbb{E}_X\left(\mathbb{P}(G_{\cdot j}=g_{\bullet}^{(2)},X)-H_u^{(2)}(X;\theta)\mathbb{P}(X)\right)\leq 0\\
\vdots\\
\mathbb{E}_X\left(H_l^{(h)}(X;\theta) \mathbb{P}(X)-\mathbb{P}(G_{\cdot j}=g_{\bullet}^{(h)},X)\right)\leq 0\\
\mathbb{E}_X\left(\mathbb{P}(G_{\cdot j}=g_{\bullet}^{(h)},X)-H_u^{(h)}(X;\theta)\mathbb{P}(X)\right) \leq 0\\
\vdots\\
\mathbb{E}_X\left(H_l^{(2^{n-1})}(X;\theta) \mathbb{P}(X)-\mathbb{P}(G_{\cdot j}=g_{\bullet}^{(2^{n-1})},X)\right) \leq 0\\
\mathbb{E}_X\left(\mathbb{P}(G_{\cdot j}=g_{\bullet}^{(2^{n-1})},X)-H_u^{(2^{n-1})}(X;\theta)\mathbb{P}(X)\right) \leq 0
\end{pmatrix}\\
&\forall n \in \mathbb{N}\}
\end{aligned}
\end{equation}
\end{document}
| If really need to this then you should use a simple align* environment rather than aligned inside equation, and issue \allowdisplaybreaks first, preferably contained in a group.
\documentclass[11 pt,a4paper,oneside,openany, notitlepage]{article}
\usepackage{mathtools, amssymb, graphics}
\newcommand{\mathsym}[1]{{}}
\usepackage{amsthm}
\usepackage{amsfonts}
\marginparwidth 0pt
\oddsidemargin 0pt
\evensidemargin 0pt
\marginparsep 0pt
\linespread{1.5}
\topmargin 0pt
\textwidth 6.5in
\textheight 8.5 in
\DeclarePairedDelimiterX{\Set}[2]{\{}{\}}{\, #1 \,\delimsize\vert\, #2 \,}
\begin{document}
{\allowdisplaybreaks
\begin{align*}
\Theta^\diamond_o&:=\Set*{\theta \in \Theta}{
H_l^{(h)}(x;\theta)\mathbb{P}(X=x) \leq \mathbb{P}(G_{\cdot
j}=g_{\bullet}^{(h)},X=x) \leq H_u^{(h)}(x;\theta)\mathbb{P}(X=x)\ h=1,\dots,2^{n-1},\
\forall x \in \mathcal{X}}\\&=\Set*{\theta \in \Theta}{
\begin{pmatrix}
H_l^{(1)}(x;\theta) \mathbb{P}(X=x)-\mathbb{P}(G_{\cdot j}=g_{\bullet}^{(1)},X=x) \leq 0\\ \mathbb{P}(G_{\cdot j}=g_{\bullet}^{(1)},X=x)-H_u^{(1)}(x,n;\theta)\mathbb{P}(X=x) \leq 0\\
H_l^{(2)}(x;\theta) \mathbb{P}(X=x)-\mathbb{P}(G_{\cdot j}=g_{\bullet}^{(2)},X=x) \leq 0\\ \mathbb{P}(G_{\cdot j}=g_{\bullet}^{(2)},X=x)-H_u^{(2)}(x;\theta)\mathbb{P}(X=x) \leq 0\\
\vdots\\
H_l^{(h)}(x;\theta) \mathbb{P}(X=x)-\mathbb{P}(G_{\cdot j}=g_{\bullet}^{(h)},X=x) \leq 0\\ \mathbb{P}(G_{\cdot j}=g_{\bullet}^{(h)},X=x)-H_u^{(h)}(x;\theta)\mathbb{P}(X=x) \leq 0\\
\vdots\\
H_l^{(2^{n-1})}(x;\theta) \mathbb{P}(X=x)-\mathbb{P}(G_{\cdot j}=g_{\bullet}^{(2^{n-1})},X=x) \leq 0\\ \mathbb{P}(G_{\cdot j}=g_{\bullet}^{(2^{n-1})},X=x)-H_u^{(2^{n-1})}(x;\theta)\mathbb{P}(X=x) \leq 0\\
\end{pmatrix}
\forall x \in \mathcal{X}}\\&\subseteq\Set*{\theta \in \Theta}{
\begin{pmatrix}
\sum_{x \in \mathcal{X}}^{}\left(H_l^{(1)}(x;\theta) \mathbb{P}(X=x)-\mathbb{P}(G_{\cdot j}=g_{\bullet}^{(1)},X=x)\right)\mathbb{P}(X=x) \leq 0\\
\sum_{x \in \mathcal{X}}^{}\left(\mathbb{P}(G_{\cdot j}=g_{\bullet}^{(1)},X=x)-H_u^{(1)}(x;\theta)\mathbb{P}(X=x)\right)\mathbb{P}(X=x) \leq 0\\
\sum_{x \in \mathcal{X}}^{}\left(H_l^{(2)}(x;\theta) \mathbb{P}(X=x)-\mathbb{P}(G_{\cdot j}=g_{\bullet}^{(2)},X=x)\right)\mathbb{P}(X=x) \leq 0\\
\sum_{x \in \mathcal{X}}^{}\left(\mathbb{P}(G_{\cdot j}=g_{\bullet}^{(2)},X=x)-H_u^{(2)}(x;\theta)\mathbb{P}(X=x)\right)\mathbb{P}(X=x) \leq 0\\
\vdots\\
\sum_{x \in \mathcal{X}}^{}\left(H_l^{(h)}(x;\theta) \mathbb{P}(X=x)-\mathbb{P}(G_{\cdot j}=g_{\bullet}^{(h)},X=x)\right)\mathbb{P}(X=x) \leq 0\\
\sum_{x \in \mathcal{X}}^{}\left(\mathbb{P}(G_{\cdot j}=g_{\bullet}^{(h)},X=x)-H_u^{(h)}(x;\theta)\mathbb{P}(X=x)\right)\mathbb{P}(X=x) \leq 0\\
\vdots\\
\sum_{x \in \mathcal{X}}^{}\left(H_l^{(2^{n-1})}(x;\theta) \mathbb{P}(X=x)-\mathbb{P}(G_{\cdot j}=g_{\bullet}^{(2^{n-1})},X=x)\right)\mathbb{P}(X=x) \leq 0\\
\sum_{x \in \mathcal{X}}^{}\left(\mathbb{P}(G_{\cdot j}=g_{\bullet}^{(2^{n-1})},X=x)-H_u^{(2^{n-1})}(x;\theta)\mathbb{P}(X=x)\right)\mathbb{P}(X=x) \leq 0
\end{pmatrix}
}\\&=\Set*{\theta \in \Theta}{
\begin{pmatrix}
\mathbb{E}_X\left(H_l^{(1)}(X;\theta) \mathbb{P}(X)-\mathbb{P}(G_{\cdot j}=g_{\bullet}^{(1)},X)\right) \leq 0\\
\mathbb{E}_X\left(\mathbb{P}(G_{\cdot j}=g_{\bullet}^{(1)},X)-H_u^{(1)}(X;\theta)\mathbb{P}(X)\right)\leq 0\\
\mathbb{E}_X\left(H_l^{(2)}(X;\theta) \mathbb{P}(X)-\mathbb{P}(G_{\cdot j}=g_{\bullet}^{(2)},X)\right)\leq 0\\
\mathbb{E}_X\left(\mathbb{P}(G_{\cdot j}=g_{\bullet}^{(2)},X)-H_u^{(2)}(X;\theta)\mathbb{P}(X)\right)\leq 0\\
\vdots\\
\mathbb{E}_X\left(H_l^{(h)}(X;\theta) \mathbb{P}(X)-\mathbb{P}(G_{\cdot j}=g_{\bullet}^{(h)},X)\right)\leq 0\\
\mathbb{E}_X\left(\mathbb{P}(G_{\cdot j}=g_{\bullet}^{(h)},X)-H_u^{(h)}(X;\theta)\mathbb{P}(X)\right) \leq 0\\
\vdots\\
\mathbb{E}_X\left(H_l^{(2^{n-1})}(X;\theta) \mathbb{P}(X)-\mathbb{P}(G_{\cdot j}=g_{\bullet}^{(2^{n-1})},X)\right) \leq 0\\
\mathbb{E}_X\left(\mathbb{P}(G_{\cdot j}=g_{\bullet}^{(2^{n-1})},X)-H_u^{(2^{n-1})}(X;\theta)\mathbb{P}(X)\right) \leq 0
\end{pmatrix}
\forall n \in \mathbb{N}}
\end{align*}}
\end{document}
However, your side conditions contain many repeated patterns, and could be replaced by expressions such as
H_^{(h)}.... for h=1,\dots,2^{n-1}...
obviating the need for such a large display.
| 1 | mathbbE_Xleft(H_l(2n-1),X= |
Do airlines replace cancelled short-haul flights by buses? If not, why not? | When trains are cancelled (at least in Europe), and there are no alternative ways to get travellers to their destination by train a little bit later, there are often replaced by buses to get travellers to their destination.
Currently, I've been rebooked twice to get on a flight to a destination that is only 383 km by road. Originally I should have flown on Monday evening, and currently I'm booked on a flight Wednesday morning, effectively a 36 hour delay. If the airline had booked a bus, all Monday evening passengers would have arrived to the other airport by Monday night, with perhaps a 4–5 hour delay. To me, it would make sense from the perspective of customer satisfaction.
Does it happen that airlines offer to bus passengers to their destination when cancellations lead to multi-day delays, but a bus would take only several hours? If not, why not?
Many passengers, including me, travel to destinations beyond the airport that is 383 km by road, but travelling the short-haul flight segment by bus in order to wait for the first available connection would still benefit travellers.
| I've been offered train connections (rather than bus) in two intra-German cases with Lufthansa where the flight was cancelled, but a good ICE (high speed train) connection between the two cities exist. Basically airline staff gave me the choice: be re-booked for next day, or take the train and arrive a few hours late.
(The fact that Lufthansa often cooperates with Deutsche Bahn anyway may play a role here, including that some connections marketed with regular flight numbers are actually high speed train connections - especially short hops from Frankfurt, e.g. Frankfurt-Stuttgart. But: the particular trains I was given were NOT such trains and I was simply given a normal train ticket + reservation by the airline.)
In this case I suppose cost for accommodation or train would have worked out roughly the same for the airline, so they offered the choice to the customer - but that's a guess of course.
| 1 | ICE (high speed train) connections between Lufthansa and Deutsche Bahn . |
Turn On Off GPS in ICS |
Possible Duplicate:
ICS Android enable gps programmatically? [closed using an alternative approach]
I was using the code below to enable and disable GPS programmatically and worked perfectly in 2.2 and 2.3.
Intent i = new Intent();
i.setClassName("com.android.settings", "com.android.settings.widget.SettingsAppWidgetProvider");
i.addCategory(Intent.CATEGORY_ALTERNATIVE);
i.setData(Uri.parse("3"));
context.sendBroadcast(i);
However, when trying to use the ICS (4.0) realized it did not work. Then I discovered that it was a bug as link below.
http://code.google.com/p/android/issues/detail?id=7890
I believe we have fixed in ICS.
Could anyone tell me if there is an alternative to solve this in ICS?
I think an OS ridiculous "open source" have so many restrictions. I'm already starting to regret having opted to develop our applications on Android.
| I believe it is a security feature that you cannot programmatically alter the GPS state.
Why does open source mean it shouldn't have restrictions? I'm confused. Open source just means you have access to the source code.
On a personal note, developing for Android was much less painful than developing for iOS using Cocoa Touch.
EDIT:
Try using this to let the user know they need to enable GPS.
(source: http://manishkpr.webheavens.com/android-syste-gps-setting-intent/)
private void checkGPS(){
locationManager = (LocationManager) getSystemService(LOCATION_SERVICE);
locationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER, 1000L,1.0f, this);
boolean isGPS = locationManager.isProviderEnabled (LocationManager.GPS_PROVIDER);
if(isGPS){
showToast("Gps On");
}else{
startActivityForResult(new Intent(android.provider.Settings.ACTION_LOCATION_SOURCE_SETTINGS), 0);
}
}
| 0.888889 | Why does open source mean you cannot programmatically alter the GPS state? |
How to customize Windows "Performance Monitor"? | I'm wondering if that's possible to set a customized action counter that is not listed as one of the counters? e.g. a batch script that measure a time for running my application, and then notify the real-time graph the time it took to load it. Also I'd like to set its frequency.
If possible, please let me know how to apply.
Thank you
| You can create perfmon counters using .NET code and thus using PowerShell too. A moderate amount of coding is required.
| 0.777778 | Perfmon counters are created using .NET code and PowerShell too |
Will this wall wart supply enough power? | I am building a little pen plotter.
It is powered by a 12V 1.0A wall wart, as well as by a standard USB connection.
There is an Arduino Duemilanove, which will draw 120mA for the Atmega328 as well as 50mA for the control pins.
Attached to the control pins are three Easydrivers, that are supposed to draw 150mA apiece, and they are connected to stepper motors with 6 Ohm windings. these easydrivers are powered from VIN.
Also powered from VIN is a 12V 2.08W fan, which will run continuously.
Will this run without blowing something up?
| If the drivers are good, they are constant current drivers so the coil resistance is irrelevant. The fan draws 2W/12V = 170 mA. So far that is 150*3 + 170 = 620 mA. If the Arduino draws another 170 on top of that, then you're looking at 790 mA. That leaves 210 mA of margin. So it will probably work, but I would check on exactly how much current the motors draw to make sure you're not going to get any large transients. The Arduino may end up drawing most of its current from USB, which would give you a bit more margin.
Edit: I suppose the Arduino will not draw any current from the USB connection. However, 170 mA is likely worst case and the actual draw will be significantly less. The I/O figure will probably be far less if you're just sending logic signals as those are not actualy sourcing any significant current.
| 0.777778 | How much current the Arduino draws from USB? |
Extract data from DateListPlot, limited by PlotRange | Extracting the points from a line in a ListPlot in this answer uses
points = Cases[Normal@plot, Line[pts_] :> pts, Infinity];
This works in DateListPlot (provided Joined->True) (example below, using Last to get the y-axis data only)
Clear[test,plot,points];
test={{"2010",1},{"2011",2},{"2012",3},{"2014",4},{"2015",5},{"2016",6}};
plot=DateListPlot[test,Joined->True]
points=Last/@Flatten[Cases[Normal@plot,Line[pts_]:>pts,Infinity],1]
(*OUTPUT
{1.,2.,3.,4.,5.,6.}
However, when the plot is limited by PlotRange using date values (lower plot), the function returns the entire list of points.
plot2=DateListPlot[test,Joined->True,PlotRange->{{"2012","2015"},{0,6}}]
points2=Last/@Flatten[Cases[Normal@plot2,Line[pts_]:>pts,Infinity],1]
(*OUTPUT
{1.,2.,3.,4.,5.,6.}
Is there a function, like points which can return only the points displayed on the plot in DateListPlot under 'PlotRange` ?
| A variant of Pickett's answer:
using new-in-10 RegionMember
with a terse way to extract the plot range
extended to either Line or Point data
written as a reusable function
Code:
inrangeData[gr_Graphics] :=
Select[Rectangle @@ (PlotRange[gr]\[Transpose]) // RegionMember] /@
Cases[Normal @ gr, _Point | _Line, -1][[All, 1]]
Test:
inrangeData[plot2]
{{{3.53436*10^9, 3.}, {3.59752*10^9, 4.}, {3.62906*10^9, 5.}}}
ListPlot[Prime @ Range @ 25, PlotRange -> {20, 40}]
% // inrangeData
{{{9., 23.}, {10., 29.}, {11., 31.}, {12., 37.}}}
The extra bracket depth is there to allow the function to handle plots with multiple lines or sets:
ListLinePlot[
Table[{k, PDF[BinomialDistribution[50, p], k]}, {p, {0.3, 0.5, 0.8}}, {k, 0, 50}],
PlotRange -> {0.08, 0.15},
Filling -> Axis
]
% // inrangeData
{
{
{11.838, 0.08}, {11.8528, 0.08035}, {12., 0.0838297}, {13., 0.105017},
{14., 0.118948}, {15., 0.122347}, {16., 0.1147}, {17., 0.0983144},
{17.8527, 0.08035}, {17.8693, 0.08}
},
{
{22.0685, 0.08}, {22.089, 0.08035}, {23., 0.0959617}, {24., 0.107957},
{25., 0.112275}, {26., 0.107957}, {27., 0.0959617}, {27.911, 0.08035},
{27.9315, 0.08}
},
{
{37.1629, 0.08}, {37.1755, 0.08035}, {38., 0.103275}, {39., 0.127108},
{40., 0.139819}, {41., 0.136409}, {42., 0.116922}, {43., 0.0870116},
{43.2105, 0.08035}, {43.2216, 0.08}
}
}
| 0.777778 | Using new-in-10 RegionMember with a terse way to extract plot range |
Is it possible to encrypt a file so that it can not be brute forced? | Is there any program or method that allows encryption that can not be brute forced or is it just that any encrypted file can be decrypted by brute force?
| Check out http://www.theregister.co.uk/2014/01/21/shapeshifter/ and the wiki entries for Oligomorphic Code and Polymorphic Code. I think ultimately, encoding is a means of representing infinite possibilities in a finite set... at the end of the day, there are collisions of the infinite set in the finite representation, ergo "decoding" via brute-force could lead to collisions that aren't actually the decoded file.
warning: I haven't slept in a couple of days.
| 1 | wiki entries for Oligomorphic Code and Polymorphic code |
If $f: \mathbb Q\to \mathbb Q$ is a homomorphism, prove that $f(x)=0$ for all $x\in\mathbb Q$ or $f(x)=x$ for all $x$ in $\mathbb Q$. | If $f: \mathbb Q\to \mathbb Q$ is a homomorphism, prove that $f(x)=0$ for all $x\in\mathbb Q$ or $f(x)=x$ for all $x$ in $\mathbb Q$.
I'm wondering if you can help me with this one?
| I understand that we're looking at rationals as a ring (as a group it is obviously false).
Pick an arbitrary homomorphism $\varphi:\mathbf Q\to \mathbf Q$. Put $e:=\varphi(1)$.
If $e=0$, then for any $x\in \mathbf Q$ we have $\varphi(x)=\varphi(1)\varphi(x)=0\cdot\varphi(x)=0$, so $\varphi$ is zero.
If $e\neq 0$, then $e\cdot e=\varphi(1)\varphi(1)=\varphi(1\cdot 1)=e$, so $e=1$ (since $e\neq 0$ and $0,1$ are the only solutions of the equation $x^2-x=0$). Furthermore, for any $\frac{p}{q}$ we have $1+\ldots+1=p\cdot 1= p=\frac{p}{q}+\ldots \frac{p}{q}=q\cdot \frac{p}{q}$, so $e+\ldots +e=p\cdot e= q\cdot \varphi(\frac{p}{q})$, so $\varphi(\frac{p}{q})=e\cdot \frac{p}{q}=\frac{p}{q}$ and we're done (for negative $p$ we can use $\frac{p}{q}=(-1)\cdot \frac{-p}{q}$ so $\varphi(\frac{p}{q})=-e\cdot\varphi(\frac{-p}{q})=\frac{p}{q}$).
| 1 | Put an arbitrary homomorphism $varphi: |
Is catching DocumentException a good idea? | I have a utility method which reads an xml file and converts to string as below:
public static String readFile(String xmlFileName) throws IOException, DocumentException{
String xmlMsg = null;
Resource resource = null;
InputStream inputStream = null;
try{
resource = new ClassPathResource(xmlFileName);
inputStream = resource.getInputStream();
SAXReader reader = new SAXReader();
Document doc = reader.read( inputStream );
xmlMsg = doc.asXML();
}finally{
if(inputStream != null){
inputStream.close();
}
}
return xmlMsg;
}
Is it a bad idea if I catch the DocumentException in the above code and rethrow it as below:
public static String readFile(String xmlFileName) throws IOException, DocumentException{
String xmlMsg = null;
Resource resource = null;
InputStream inputStream = null;
try{
resource = new ClassPathResource(xmlFileName);
inputStream = resource.getInputStream();
SAXReader reader = new SAXReader();
Document doc = reader.read( inputStream );
xmlMsg = doc.asXML();
}catch (DocumentException e){
throw new DocumentException("some message");
}finally{
if(inputStream != null){
inputStream.close();
}
}
return xmlMsg;
}
So, is it a bad idea to leave the responsibility of handling the DocumentException to the caller?
| catch (DocumentException e){ // here you are catching exception
throw new DocumentException("some message");// now you are changing
// exception message
}
That is a bad practice you have to throw originally thrown exception to upper level then you can handle the Exception there.
This way is better
catch (DocumentException e){
throw new DocumentException("some message",e);
}
| 0.888889 | catch (DocumentException) |
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 Roomba has a 'device detect' pin that you must pulse low to turn on the Roomba and initialize the connection. Sometimes people connect this to the RTS (or was it the CTS?) pin of the serial adapter. Device detect might be the same as pushing the Roomba's power button. After the Roomba prints the model and firmware version over the serial port it should be ready to receive commands.
I wouldn't recommend connecting the 5V device detect pin directly to the 3V Pi. You could just short it to ground manually (and briefly) to get started.
| 1 | The Roomba has a 'device detect' pin that you must pulse low to start the connection . |
php scripts run only after renaming | That's really strange :So after i upload a folder with php files on another service,and try to execute them from a browser,i get 500 error.If i open a file in a text editor,save it with different name like file1.php,then erase the original,and rename the file1.php to the previous name,it works.
| The sequence "upload, fail, edit, save, rename, succeed" tells me that it's likely a line-ending issue. Try running:
dos2unix original-uploaded-file
to see if that fixes the problem.
| 0.777778 | Dos2unix original-uploaded-file |
Problem in blitting a clean, crisp sprite | I am having a bit of a tooling problem...and I am unsure of how to solve it.
I am currently using PyGame to try and write a simple Minesweeper clone, except my sprites that I made are hexagon based and therefore have diagonal lines.
I drew up a nice, clean, crisp vector sprite set which looks very nice in Inkscape, however once I export it everything goes to hell. I'm going to outline what I've done below and hopefully somebody here can set me straight :D
Disclaimer: Unfortunately I'm behind a proxy and cannot provide screenshots at the moment..I'll do my best to describe.
If I attempt to use a color key (0xFF00FF), then when I set the color key in PyGame I get a bunch of jagged pink edges along my sprite. I believe this could be an anti-aliasing issue with Inkscape, but unfortunately my Googling didn't turn up a way to disable it.
If I import my PNG into Photoshop or the Gimp and delete the background, then I run into an issue where the background appears to be black when running the game. I have tried to follow the instructions I saw on SO, but to no avail.
I am open to suggestions, but at this point I'm debating importing another library which can handle SVG graphics, in order to keep my clean, crisp diagonal lines.
| For your pink halo-ing, the issue is exactly what you described: anti-aliasing. If you have Photoshop, just create the hexagon with two layers, one with all pink (0xFF00FF) and another with the hexagon. Make sure when you create the hexagon all feathering and anti-aliasing settings are set to zero for all the tools you use, and all brushes are set to 100% hardness. Save as a PNG.
For best results, stick to the pencil and paint bucket tools.
| 0.666667 | Anti-aliasing for pink haloing |
I am not sure whether to put a comma after "so", which is at the beginning of a sentence | Some people say since "so" is a transitional word, it should have a comma after it like all the transitional words have. And some say if "so" is there for logical continuity, then no comma should be used.
The particular sentence I am writing is:
Moreover, I have completed my senior secondary studies in English and won 1st place at the regional stage of English Olympiad. So, I am confident that I will be able to complete a degree in English.
| I would leave the comma out: if the two sentences were written as a single sentence, there would be no comma: "Moreover, I have completed my senior secondary studies in English and won 1st place at the regional stage of English Olympiad, so I am confident that I will be able to complete a degree in English." This is fairly formal English.
I'd reserve commas after so only when so seems to come out of nowhere: "So, are you coming or not?" A woman walks into the living room and asks, "So, how do you like my new dress?" This is hardly formal English.
| 1 | if the two sentences were written as a single sentence there would be no comma |
Shared memory: shmget fails: No space left on device -- how to increase limits? | I call shmget many times in my program, to get shm of of average size 85840 bytes. I obtain about 32771 shm ok, then shmget doesn't return a shm, but the error: "No space left on device".
I have increased the kernel limits to:
$ sysctl -A|grep shm
kernel.shmmax = 33554432
kernel.shmall = 1677721600
kernel.shmmni = 409600
But still get the issue. Why?
Do I have to put something into /etc/security/limits.conf too? I only have
"user - nofile 1000000"
because the program also opens about as many files as shms.
This is the output of free
$ free
total used free shared buffers cached
Mem: 8150236 7261676 888560 0 488100 3270792
-/+ buffers/cache: 3502784 4647452
Swap: 12287992 554692 11733300
And ipcs
$ ipcs -lm
------ Shared Memory Limits --------
max number of segments = 409600
max seg size (kbytes) = 1638400
max total shared memory (kbytes) = 6710886400
min seg size (bytes) = 1
Since I assume shm is capable of being swapped out, there should be enough space.
| Use ipcs -l to check the limits actually in force, and ipcs -a and ipcs -m to see what is in use, so you can compare the output. Look at the nattch column: are there segments with no processes attached that were not removed when processes exited (which normally means the program crashed)? ipcrm can clear them, although if this is a test machine, a reboot is quicker (and will make sure your changes to limits are picked up).
Your kernel parameters seem odd. In particular, shmall is a count of pages, not bytes, and 4kB is the default page size (run getconf PAGESIZE to check what you are using). How many terabytes of RAM do you have?
Now, you say you get about 32771 shared memory segments, which is also about 32768 (or 2 to the 15) which suggests a signed 16-bit int is the limiting factor. And what kernel are you running (as this will have its own limits)? The two may be related.
| 0.777778 | How many terabytes of RAM do you have? |
NIC throughput monitoring by process | Does anyone know of a decent tool for XP to monitor the throughput of a NIC by process? Something similar to the Resource Monitor baked into Windows 7 would be perfect. I’ve considered WireShark but don’t need to analyse down to the packet level, just need a good real-time bytes per second tool.
| Perfmon can do this for you in a gross way, but it might just be enough for what you need. Try the "Process" object, choosing the process you want to monitor, and graphing / recording the "IO Other Bytes / sec" counter. The "Explain" text for this counter in Windows XP is:
The rate at which the process is
issuing bytes to I/O operations that
do not involve data such as control
operations. This counter counts all
I/O activity generated by the process
to include file, network and device
I/Os.
If the process is doing Microsoft "file and print sharing" access via SMB, then you'll want the "IO Read Bytes / sec" and "IO Write Bytes / sec", though if the process is also doing IO to the local disk then those IO counts will be mixed in, too.
| 0.888889 | Perfmon can do this for you in a gross way, but it might just be enough for what you need |
Is there a word for something loved by the masses but whose true value is lacking? | Is there a general word for someone or something popular or loved by the masses but that has not been proven to be effectual (like how some would use the term "pop psychology" pejoratively)? Examples would be how things like popular psychology or holistic medicine are accepted excitedly by numerous people while not being proven to be useful to the majority.
UPDATE: Thanks for you responses. I think the word "fad" (or "hype") would come closest to what I was looking for (thank you for that).
But is there a more general or appropriate term? I'm not American so apologies in advance (this is strictly for the sake of discussion): the only example I can think of is certain voters who were initially excited about Obama, but came to be disappointed after he failed to meet their expectations. Is there a word that could be used to describe Obama in this context? Something well-loved which turns out to be a disappointment.
| Not sure why nobody said this. Is "overrated" the word you are looking for?
| 1 | "overrated" the word you are looking for? |
Can you make a hash out of a stream cipher? | A comment on another question made me wonder about something:
Assume you're on a rather constrained platform — say, a low-end embedded device — with no built-in crypto capabilities, but you do have access to a simple stream cipher; say, RC4 or one of the eSTREAM ciphers. What other crypto primitives can you build out of that stream cipher? In particular, are there any practical ways to build a cryptographic hash function and/or a MAC out of just a stream cipher?
We already have questions about turning a hash into a stream cipher and about turning a stream cipher into a block cipher, but this particular transformation doesn't seem to have been covered yet.
Obviously, if the platform constraints permit it, one could ignore the stream cipher and just implement a standard hash function from the ground up. What I'm wondering is whether having the stream cipher available might let one do better than that in terms of code size, memory usage and/or speed.
While a construction that treats the stream cipher as a black box would be nice, schemes that only use parts of the stream cipher (like RC4-Hash, which, alas, has practical collision attacks) would be interesting too, at least if they're simple enough.
| This is a really bad idea. Most stream ciphers, certainly RC4 and anything in a Counter Mode construction are ultimately a PRNG XORed onto the plaintext. This is fine for encryption -- the information theory is pretty easy to understand -- but is no basis for a hash function.
The goals of a hash function and a cipher are different. As it turns out, you can make a block cipher into a hash function, but even then not any block cipher makes for a good hash function.
Think of it this way -- a cipher is like a game of cards. It relies upon the fact that you can't see what's in your opponent's hand, and what makes it hard or intractable is the uncertainty. But a hash function is like a game of chess. Everyone knows everything, and the goal of the hash function is to make it so complex that you can't go backwards and that there's no easy way to predict forwards.
| 0.666667 | a hash function is like a game of cards, but not a cipher. |
Prevent a user from viewing another user's profile based on a field value | I'm a Drupal veteran, but this one has me stumped . . .
I have two Profile2 profiles, one for a company and one for a job seeker. In the job seeker profile, there is an entity reference field where they add companies they don't want to view their profile. The way companies finds people is by searching via Search API. Another way, would be by browsing. I need to block both ways. Basically, the job seeker should be invisible to the companies that they've blocked.
I have Panels, Panelizer, Rules, and Views all at my disposal and know how to use them, just not in this case. Or am I better going with my own custom module?
I saw this answer Hide Profile2 fields depending on it's value when viewing user profile and that's only for specific fields, I want to block the whole profile.
This question is along the same lines of mine, but I don't see a complete answer -How to filter a view based for the current user based the value of custom fields in his profile and fields in the list of items viewed
| You can control profile2 access with
hook_profile2_access
Views listens to node access so you might be able to use to exclude rows from the view.
/**
* Implements hook_profile2_access
*/
function MY_MODULE_profile2_access($op, $profile = NULL, $account = NULL) {
if (isset($profile)) {
// Use wrapper for field access
$profile_wrapper = entity_metadata_wrapper('profile2', $profile);
// Check if $account uid is set in field_invalid_users
if(isset($profile_wrapper->field_invalid_users)){
if(in_array($account->uid, $profile_wrapper->field_invalid_users->raw())){
// Deny access
return FALSE;
}
}
// Example: Explicitly deny access for a 'secret' profile type.
if ($profile->type == 'secret' && !user_access('custom permission')) {
return FALSE;
}
// In other cases do not alter access.
}
}
One consideration is caching. Cache will need to vary enough to not serve the same cached content to valid and invalid users. Perhaps those pages aren't cached at all, it depends on your application.
| 1 | Explicitly deny access for 'secret' profile type |
Which programs are using my USB flash drive? | Sometimes when I follow the process to safely remove a USB flash drive, I get told that I can't remove the drive because some programs are using it. However I'm unable to tell which programs these are, so I end up having to close programs - sometimes even randomly.
How do I find out which program is using my USB flash drive?
I've searched the Internet but have found nothing promising; one solution might be via Process Explorer since it shows handles, but I don't know how to use it to solve my problem.
The best solution would be to have a program that can automatically close these programs for me, or at least tell me which programs these are.
| I use EjectUSB (working download link):
EjectUSB could be considered the
nuclear option of USB drives that just
won't properly eject in Windows,
because there's an "application or
process" accessing it. Put EjectUSB on
your thumb drive and run it, and the
program will mercilessly kill every
program, process, or anything else
touching your drive, letting you
safely remove it without any fear of
data loss.
| 1 | EjectUSB is considered the nuclear option of USB drives that won't properly eject in Windows |
Finding columns that do not match existing primary key | I'm trying to add a Foreign Key to a table, but database, Sql Server 2005, does not like it.
It says that columns do not match an existing primary key or unique constraint.
How can I find the columns in question so I can delete/change them and add the foreign key?
| SELECT
ForeignKey
FROM
FK_TABLE f
LEFT JOIN
PK_TABLE p ON f.ForeignKey = p.PrimaryKey
WHERE
p.PrimaryKey = NULL
That should do it.
ForeignKey = the column you want to make into a foreign key
PK_TABLE = the table you want the foreign key to reference
PrimaryKey = the column ForeignKey will be a foreign key to.
| 0.888889 | SELECT ForeignKey FROM FK_TABLE f LEFT JOIN ForeignKey |
Framing section headings | I'm attempting to put a frame around my section headings. I am using the package mdframed which adds functionality to the framed package. It basically draws a box around an object, in an environment. So I wonder how I can do this. Can I use \renewcommand, for example? I'd really like to use mdframed to create the frame.
| If you also need the \Section* version, then the definition has to be extended
\documentclass{article}
\usepackage{mdframed}
\makeatletter
\newcommand\Section[2][]{\begin{mdframed}[linewidth=5pt]%
\ifx\relax#1\relax\section{#2}\else\section[#1]{#2}\fi
\end{mdframed}}
\makeatother
\begin{document}
\Section{A section}
\end{document}
| 0.888889 | SectionA section enddocument |
Ubuntu 14.04 Dell Inspiron 15R Unable to adjust Brightness | When trying to adjust brightness on my Dell Inspiron 15R, I see brightness icon moving up or down however the actual brightness remains the same. please help me.
| I wrote a small script which I use to control the brightness. Basically you want to poke a value into /sys/class/backlight/intel_backlight/brightness. The max value can be found in /sys/class/backlight/intel_backlight/max_brightness
My simple script is:
#!/bin/bash
echo $1 | sudo tee /sys/class/backlight/intel_backlight/brightness
An alternate answer is suggested by itsfoss, however I had to modify it slightly as the pci bus ID seems to have changed since Ubuntu 13.10:
Create the file 20-intel.conf
sudo touch /usr/share/X11/xorg.conf.d/20-intel.conf
Edit the file so that the contents are
Section "Device"
Identifier "card0"
Driver "intel"
Option "Backlight" "intel_backlight"
BusID "PCI:0:02:0"
EndSection
| 0.666667 | How to poke a value into /sys/class/backlight/intel_backlight_brightness |
How much choice should I give users? | I am considering adding an update to my iPhone app that allows the user to choose many new features such as the background image, where certain buttons are located, button colors, button design, certain label colors, etc. While I have a lot of ideas on where I could allow the user to change things, I wonder how much choice I should give them.
If I give them too much choice is it possible they will give me bad reviews, or is the opposite more often true?
Also, if I give them that choice, should I put that all in a single preference panel, or should I split it up somehow? (I don't like using the Settings App, so I'm not asking about that here)
|
How much choice should I give users?
As little as possible that can net as large users as possible. As a rule of thumb, don't add choices when it does not matter.
If the selling point of your app is productivity, only add choices when it affects workflow significantly. Again, don't add trivial customizations, things like position of buttons, colors, etc usually does not really matter.
If the selling point of your app is customization and personalization (most apps should not have this as the main selling point), things are a little different, put a set of different options as complete "themes" instead of individual options. Most people cannot make good themes, even if they think they do; you'll be having people walk around showing off your app with their crappy customizations.
If the selling point of your app is ease of use, then less is more. Less means everyone will be using the same app the same way and there is less mine traps for the less proficient users.
Giving too many options is often born out of laziness, you're not doing your user research enough to actually know what they really needed so you give everything.
| 0.888889 | How much choice should I give users? |
A symbol for the quotient of two objects | One needs often a symbol to denote the quotient of two (algebraic) objects. (e.g. quotient by a subgroup, subring, submodule etc.). In simple cases people use A/B. But when both A,B are complicated to write, this doesn't look good. e.g. \mathcal{O}_{(V',0)}}/\mathcal{O}_{(V,0)}}
For some reasons people do not use just \frac{A}{B}. Is there some way to achieve the following:
$A$ raised a bit, then \Big/ then $B$ a bit lowered.
| Something like:
\documentclass{article}
\def\quotient#1#2{%
\raise1ex\hbox{$#1$}\Big/\lower1ex\hbox{$#2$}%
}
\begin{document}
\[
\quotient{\mathcal{O}_{(V',0)}}{\mathcal{O}_{(V,0)}}
\]
\end{document}
Update, here is a real plain example:
\def\quotient#1#2{%
\raise1ex\hbox{$#1$}\Big/\lower1ex\hbox{$#2$}%
}
$$
\quotient{{\cal O}_{(V',0)}}{{\cal O}_{(V,0)}}
$$
\bye
| 0.833333 | enddocument Update |
What is a good click through rate (CTR) | I'm new to adwords and I'm trying to figure out what a good click through rate on my ads would be. Does anyone have any guidelines?
| The numbers quoted below seem about right for campaigns which I've run (I'd add that the most abysmal CTR I've seen was 10k:1 for a banner ad on a site which ran multiple banner ads - it ran for three months, had millions of views, and resulted in three conversions, all of which canceled within their first month).
Low conversion rate 1:500.
Ordinary 1:100
Good 1:5
Unbelievable 1:1
Low CTR: 0.5%
Ordinary: 2.5%
Good: 10%
Outstanding: 60%
Source: What is the typical CTR and conversion ranges?
| 1 | What is the typical CTR and conversion range |
Shortening the coax on UHF CB antenna caused SWR to get worse, why? | I shortened the coax cable on my car's 477MHz CB antenna because the braid was frayed at the transciever connector end, and a metre or so of spare coax was coiled up behind the dash. I thought if I cut the coax shorter, I would remove a little cable loss.
I measured SWR with a meter before and after: Before was 1.3:1, after 1.7:1. This seems quite a bit worse. I don't know how much this will affect performance.
I think I assembled the new connector pretty well, good solder joints to centre and braid.
Could my antenna setup be sensitive to the length of the coax? I have not heard of tuned lengths but my understanding of antenna and feeds is limited.
My vehicle's antenna is mounted at the front, it has a short solid base tube with a standard threaded mount onto which I fitted a 60cm 4.5dBi whip (the original antenna was missing). I don't know exactly what the antenna mount is but it looks similar to this one.
I'd like to understand what has happened, if I have significantly affected the performance of my antenna system, and how I might be able to fix it if so (splice the cut part of the coax back on?)
| As long the antenna and the xmitter have the same impedance and they are connected with coax with same characterics impedance, then the length of coax has minimal impact on SWR.
You did measure the SWR before, now this means that from point you have measured it was a factor 1.3, this could mean that antenna was not tunned good and the cable itself was radiating acting like antenna, in sum the SWR was 1.3. Now you have cut of some piece of cable, normaly now it should perform better as the loss is smaller, but the whole impedance has now changed as the xmitter see. Therefore the antenna was never tuned properly, tune it.
| 0.777778 | Long antenna and xmitter have same characterics impedance then length of coax has minimal impact on SWR |
Getting Strange Readings From a Multiplexer | I'm trying to build a simple gamepad controller to learn more about multiplexers (in this case a SN74LS251. This is how I'm wiring it:
And this is the code I'm using to get the button states:
// Pins.
unsigned int y = 8;
unsigned int a = 9;
unsigned int b = 10;
unsigned int c = 11;
// Gamepad states.
unsigned int gamepad[2][4];
/**
* The usual Arduino setup.
*/
void setup() {
// Set pin modes.
pinMode(y, INPUT);
pinMode(a, OUTPUT);
pinMode(b, OUTPUT);
pinMode(c, OUTPUT);
// Set select pins LOW.
digitalWrite(a, LOW);
digitalWrite(b, LOW);
digitalWrite(c, LOW);
// Begin the Serial connection for debugging.
Serial.begin(9600);
}
/**
* Set the select pins in the multiplexer.
*
* @param a_stt Select pin A state.
* @param b_stt Select pin B state.
* @param c_stt Select pin C state.
*/
void multiplex_set(unsigned int a_stt, unsigned int b_stt, unsigned int c_stt) {
digitalWrite(a, a_stt);
digitalWrite(b, b_stt);
digitalWrite(c, c_stt);
}
/**
* Get all the Gamepad states and put them into the result array.
*/
void get_gamepad_states() {
// Left Gamepad.
multiplex_set(LOW, LOW, LOW);
gamepad[0][0] = digitalRead(y);
multiplex_set(HIGH, LOW, LOW);
gamepad[0][1] = digitalRead(y);
multiplex_set(LOW, HIGH, LOW);
gamepad[0][2] = digitalRead(y);
multiplex_set(HIGH, HIGH, LOW);
gamepad[0][3] = digitalRead(y);
// Right Gamepad.
multiplex_set(LOW, LOW, HIGH);
gamepad[1][0] = digitalRead(y);
multiplex_set(HIGH, LOW, HIGH);
gamepad[1][1] = digitalRead(y);
multiplex_set(LOW, HIGH, HIGH);
gamepad[1][2] = digitalRead(y);
multiplex_set(HIGH, HIGH, HIGH);
gamepad[1][3] = digitalRead(y);
}
/**
* The usual Arduino loop.
*/
void loop() {
get_gamepad_states();
for (unsigned int i = 0; i < 2; i++) {
if (i == 0) {
Serial.println("LEFT");
} else {
Serial.println("RIGHT");
}
Serial.print(" Up: ");
Serial.println(gamepad[i][0]);
Serial.print(" Right: ");
Serial.println(gamepad[i][1]);
Serial.print(" Down: ");
Serial.println(gamepad[i][2]);
Serial.print(" Left: ");
Serial.println(gamepad[i][3]);
Serial.println("");
}
delay(500);
}
It was working last week when I tried it for the first time, but when I went to rebuild it today I started getting strange (and completely incorrect) readings like these (no buttons were pressed during this test and I still got some HIGHs for no reason):
LEFT
Up: 0
Right: 0
Down: 0
Left: 0
RIGHT
Up: 0
Right: 0
Down: 0
Left: 1
LEFT
Up: 0
Right: 0
Down: 0
Left: 0
RIGHT
Up: 0
Right: 0
Down: 0
Left: 0
LEFT
Up: 0
Right: 0
Down: 0
Left: 0
RIGHT
Up: 0
Right: 0
Down: 0
Left: 0
Also if I press a button nothing happens. Even if I put the Enable pin HIGH I'll still get the same pattern. What's wrong?
| There appears to be connection problems with your breadboard: -
Shouldn't one side of each switch be (say) at 0V whilst the other side has a pull-up?
| 0.888889 | Shouldn't one side of each switch be (say) at 0V while the other side has a pull-up? |
What is an adjective for "requires a lot of work"? | For example,
Starting a new business requires a lot of work.
What would be an adjective in: Starting a new business is _.
| Try this one: labor-intensive.
| 1 | Work-intensive: |
Can I pass along all properties when for a GradleBuild task? | I'm executing a GradleBuild task, and I'd like to maintain all the properties that the current script has been given. In other words, I want to package up "these startparameters" and pass them along to the build I'm calling.
Is there any way to do this cleanly?
| If you mean project properties:
task foo(type: GradleBuild) {
startParameter.projectProperties = gradle.startParameter.projectProperties
}
If you mean system properties, replace projectProperties with systemPropertiesArgs (on both sides).
| 1 | If you mean project properties, replace projectPropertiesArgs |
Google stopped indexing my site. Is there a substitute for a XML sitemap? | On my site is a page that hosts all my ad entries. Each URL and its content is different. Google was indexing all the different URLs until entry 4570. As I can see in GWT Google Index they also stopped crawling the new entries (70,000) at this moment.
I would like to understand why Google stopped. I added a sitemap at about this time. The sitemap generator doesn't produce the single ad URLs.
I had to change a page name and put a redirect in my .htaccess file:
Redirect permanent /aerzte/ http://www.example.de/arzt/
Google stopped about one week later to add new URLs. Can one of above be the reason?
Is there a different solution - without sitemap - to get Google to index these URLs?
P.S.: I can add URLs with Google Fetch and these URLs are immediately indexed.
| Without seeing your site, it sounds like you are getting hit with a low-quality content penalty and that's why Google is no longer indexing you. Adding URLs with Fetch will work in the short run but if the penalty is the cause then I would expect you to see those URLs being dropped out over over time.
Other problems may be indicated by the size of your sitemap file (70,000 entries). Individual XML files should be capped at 50,000 entries and if your file contains more than that, Google may be petulantly refusing to index. One way to be sure is to check the server's access log for requests for the site map and see if the Googlebot is still making requests for it.
| 1 | Adding URLs with Fetch will work in short run |
Can i transfer money via Indian bank atm to citibank account? | I have a Bank Account with Indian Bank.
Is it possible for me to transfer money from my Indian bank account via atm to Citibank Account?
If Yes what the steps to do this.
| Quite a few Bank in India allow Funds Transfer via ATM. One has to first register the beneficiary account and wait for 24 hrs before transacting.
However it looks like "Indian Bank" currently does not offer this service. You can call up Indian Bank and ask if they provide this service.
Alternativly use the Internet Banking to transfer funds to CitiBank or any other Bank in India.
| 1 | Quite a few Bank in India allow Funds Transfer via ATM |
Pictures don't show in IE6 after Windows XP updates | It was time to update the computer I'm using, and I ran all of the updates except for the upgrade from IE6 to IE8. I'm using a work computer, so I'm simply not allowed to upgrade from IE6 to anything useful (some of their stuff apparently still requires IE6). I use Chrome on the side, but I need IE for certain things.
After updating and restarting, I found that pictures in general stopped showing in IE6, except for occasional ads. Even the Google logo does not show up. In Chrome, however, everything works fine. I already tried going to Tools->Internet Options->Advanced->Multimedia and checking "Show Pictures" (which was already checked), and nothing on the "why your pictures won't show!" pages online seem to help.
Any ideas?
update:
When I'm on the Google homepage, the bar at the bottom of the IE window says "Downloading picture http://...", and I suspect it's not the only page that says that, but there's a red X in the place of the logo, which I thought meant the browser had already given up.
update (some time later):
I was able to upgrade to IE7 and I'm having the same issue. In both cases, there are certain images that show up, and certain ones that don't. I'm wondering if images got set to display: none !important somewhere. Looking into it.
update (even later; haven't had much time to deal with this):
Just discovered that all the missing images are apparently .png files.
| There are three options, I doubt if the first one will work:
Completely reset Internet Explorer, also try reinstalling Internet Explorer.
Turn the system back to a proper state using System Restore.
Not running every update at the same time could help to figure out which update caused this...
Upgrade to a newer version of Internet Explorer, perhaps the work things might still work.
Good luck, the most viable option seems to be 2...
| 0.888889 | Reinstall Internet Explorer |
God the Father's possession of a body of flesh and bones | There is a belief out there that God the Father has always possessed a body of flesh and bones. Some of the proponents of this belief don't find it contradictory to John 4:24 ("God is a Spirit") as the verse may be referring only to one part of God without limiting God to being only that one part - just like, for example, in 1 Pet 3:20 ("eight souls were saved by water") Peter called some humans "souls", but he didn't mean by that that they didn't posses bodies.
The example of Jesus after His resurrection, Who, while possessing a body of flesh and bones, still retains all the qualities that are usually ascribed only to God, for example, His omnipresence, could go along with this belief.
I wonder if Biblical hermeneutics, namely the hermeneutics of the Old Testament, allows for this belief. If not, please, point out those places that speak against the validity of this belief.
| How could the Creator of the universe have a body of flesh and bones which are products of that universe? Only by later humbling himself into that form and taking on the nature of the creation. The OT never states that God the Father did this, and the NT quite consistently reaffirms that only Jesus has ever done this, and that the Father is invisible eternal spirit only.
| 1 | How could God the Father have a body of flesh and bones which are products of that universe? |
How to fix a Macbook Pro trackpad where the mouse pointer is randomly moving? | The trackpad on my Macbook Pro just started acting oddly. It's randomly clicking (which might cause me to switch programs), right-clicking and even once my screen even showed the swiping animation as if I was trying to switch to a different desktop.
Part of me fears that this is some sort of joke hacking attempt (I know of a USB device you plug into someones computer and it randomly moves their mouse and types on their keyboard), but there is nothing plugged into my machine and I just turned off the Wi-Fi and watched as this web page tried to close, the mouse right clicked twice, highlighted a word and clicked "Paste and Match Style" in the Chrome right-click menu.
Also as I've been typing (with my Wi-Fi turned off) the mouse has randomly been clicking inside this question and changing where I am typing.
I just plugged in a USB mouse which seems to work fine but the trackpad is now nearly useless. I can't even move the mouse cursor more than a few centimeters with it.
Is this a common issue?
EDIT
I think it is dying actually. I can now click but not move at all with the trackpad, while a regular mouse works fine.
EDIT 2
And now it seems to be working again. I turned on the option for "Ignore Trackpad when Mouse is plugged in" under Universal Access. I cleaned the trackpad with rubbing alcohol, I whined and complained for a few minutes to my dog, turned off the "Ignore Trackpad" setting, unplugged the USB mouse, and the Trackpad appears to be working mostly normally.
If I run my finger across it at the top or bottom portion of the mouse, it works, but there is a line horizontally across it (almost exactly where a physical trackpad button would end on the old trackpads) that is "dead". The mouse stops moving, or moves sluggishly when hitting that spot and that "spot" goes across the whole trackpad.
| This was driving me crazy, too. It just started happening yesterday, but was dangerous as the cursor kept selecting everything--making selection rectangles especially on the desktop, opening programs I didn't want to open on the dock, and generally jumping around like a drunk rabbit.
Searched forums, read about others saying this happened to them after updating their Mac software, etc., etc. Got so frustrated I literally slapped the trackpad with my open palm. And what do you know--that fixed it. Now my trackpad is working perfectly again. Must have been something pinching or pressing against the underside of the trackpad.
Don't know if you're all going to believe me 'cause it sounds ridiculous, and if you do believe me I don't know if you're willing to do it. But I swear on my soul it's true and I'm posting this solution for all to see because I want to help.
| 0.888889 | What do you know--that fixed my trackpad? |
OSX ssh-agent: no password pasting, and problem with PKCS#8? | I use ssh on my machine, and have set up a long not-human-friendly passphrase which is saved in my password manager.
What makes me crazy every time is that I cannot paste into the window pictured below. I know the Remember password in my keychain option and use it. Sometimes I have to enter a new one though. Why can't I paste into a password field? We're in the 21th century and password managers have been invented! Apple...
Same thing for the dialog which pops up when plugging in encrypted disks.
And yes, I'd rather write a post on stack exchange than type the passphrase even once.
Some updates:
I found out how i can circumvent the stupid dialog: just use ssh-add ~/.ssh/id_rsa, and then I can paste the passphrase into the terminal.
However, it does not work with my passphrase... using openssl rsa -text -in id_rsa I can decrypt the key without problems, but the same phrase does not get accepted by OSX's ssh-agent. My Key is encrytped using pkcs8 (read here), mattmcmanus seems to be right...
using ssh-add still not fixes the thing for encrypted disks, and my curiosity for why apple would do such something.
I answered the question regarding PKCS#8 below.
| You can run a script like this in AppleScript Editor:
tell application "System Events" to tell process "SecurityAgent"
set value of text field 2 of scroll area 1 of group 1 of window 1 to "pa55word"
click button 2 of group 2 of window 1
end tell
| 0.5 | How to run a script like this in AppleScript Editor |
How can I hear if something is behind or in front of me? | I wonder how I can hear what direction a sound is coming from.
I believe that the brain calculates relative to the volume from each ear, meaning I'm unable to know what direction a sound is coming from if one of my ears are not working.
But what if the sound is perfect in front of me? Or Above? (Both ears are hearing exact the same) Can I then still hear where the sound is coming from?
| Sound localization is a very complex phenomenon and in fact your brain uses a few methods to localize sound, some of which work better at high frequencies and some at low frequencies. The basic bits of information that your brain makes use of is interaural time differences (the difference in time taken for a sound to reach different ears), as well as interaural level differences (one ear hears a louder sound than the other). Furthermore, the outer ear, or pinna, modulates sound so that it sounds different depending on whether the sound is coming from in front of you or behind. This seems to be the dominant effect for sound sources that lie on the median plane, as pointed out by dmckee.
| 1 | Sound localization is a very complex phenomenon |
Lyx itemize returning to last number | I would like to have the following output:
Text
(a) Text
Text
Text
That is, after a subitem, I want to return to the last number without creating a new one. Is there any way to do this without ERT?
| Yes, simply use Ctrl-Enter to break the item text. This is like insert \\ in LaTeX.
Lyx MWE:
LyX 2.0 created this file. For more info see http://www.lyx.org/
\lyxformat 413
\begin_document
\begin_header
\textclass article
\use_default_options true
\maintain_unincluded_children false
\language english
\language_package default
\inputencoding auto
\fontencoding global
\font_roman default
\font_sans default
\font_typewriter default
\font_default_family default
\use_non_tex_fonts false
\font_sc false
\font_osf false
\font_sf_scale 100
\font_tt_scale 100
\graphics default
\default_output_format default
\output_sync 0
\bibtex_command default
\index_command default
\paperfontsize default
\use_hyperref false
\papersize default
\use_geometry false
\use_amsmath 1
\use_esint 1
\use_mhchem 1
\use_mathdots 1
\cite_engine basic
\use_bibtopic false
\use_indices false
\paperorientation portrait
\suppress_date false
\use_refstyle 1
\index Index
\shortcut idx
\color #008000
\end_index
\secnumdepth 3
\tocdepth 3
\paragraph_separation indent
\paragraph_indentation default
\quotes_language english
\papercolumns 1
\papersides 1
\paperpagestyle default
\tracking_changes false
\output_changes false
\html_math_output 0
\html_css_as_file 0
\html_be_strict false
\end_header
\begin_body
\begin_layout Enumerate
Text
\end_layout
\begin_deeper
\begin_layout Enumerate
Text
\begin_inset Newline newline
\end_inset
\begin_inset Newline newline
\end_inset
Text
\end_layout
\end_deeper
\begin_layout Enumerate
Text
\begin_inset Newline newline
\end_inset
\end_layout
\end_body
\end_document
LaTeX version:
\documentclass[english]{article}
\usepackage[T1]{fontenc}
\usepackage[latin9]{inputenc}
\usepackage{babel}
\begin{document}
\begin{enumerate}
\item Text
\begin{enumerate}
\item Text \\
\\
Text
\end{enumerate}
\item Text
\end{enumerate}
\end{document}
Edit: If you want the text aligned with the item (a), you are looking for a linguist package as linguex, but there are no module for LyX (but using ERT boxes are not very intrusive in this case):
\documentclass{article}
\usepackage{linguex}
\begin{document}
\ex. Text
\a. Text
\z. Text
\ex. Text
\end{document}
| 1 | Use Ctrl-Enter to break the item text |
Lego Star Wars - The Complete Saga: How do I save the game? | I just got Lego Star Wars - The Complete Saga for my son. It seems to autosave in some fashion. But it also warns me on exit that my progress will be lost since the last save. How can I save manually?
| Don't worry about it - many games that use an autosave feature give a warning like this, even if it's just saved the game. You can read it as 'make sure you hit a checkpoint before you quit, otherwise you'll lose everything you've done since the last one'.
As long as you quit after hitting a checkpoint your progress will be saved.
| 1 | Autosave feature saves progress if you quit after hitting checkpoint |
Spokes keep breaking - bad hub or bad build? | Background information
A bit of background information (I'll try keep it brief): Last year I bought an old but unused bike, 5 speeds with internal gearing.
Apparently the shop bought a lot of bikes somewhere in the 90's (not sure), but never got around to selling them. When I bought it, it was wrapped in plastic, had been stored in the shop's stock house for about 20 years and free of corrosion.
I'm about 95 kilos, thread quite hard but rides exclusive to paved bike paths. The original, 20(?) year-old wheel lasted me a year with no problems. The front wheel is still fine and true.
Spokes breaking - and getting replaced
After a little under a year, I suddenly noticed that a few spokes had broken. On closer inspection, quite a few were too loose. Should have noticed sooner but didn't.
I took it to a shop, where they advised me to have the wheel rebuilt which I paid them to do. The gearing being internal, the new rims and spokes were built on the existing hub.
After just two weeks, the back wheel suddenly began to feel wobbly on my way to work. As careful as I could, I drove the bike back to the shop. Almost all spokes were terribly loose.
They retensioned the wheel free of charge (of course) and sent me on my way. The following weeks, I periodically checked that all spokes were still tensioned.
2,5 months later, I noticed three of the spokes were broken close to the hub. Went back to the shop and had the spokes replaced (free or charge). 1 month later I noticed 2 broken spokes and had those replaced as well. They seemed less eager to keep fixing the wheel free of charge, and when I asked why the spokes kept breaking, the guy muttered something about the hub holes maybe had burrs due to wear.
Now, a few weeks later, I find another spoke broken.
My gut tells me this all stems from a bad build, that quickly lost tension and thus damaged the spokes. I find the explanation about a worn hub a bit far fetched, but I don't have the knowledge to dismiss the theory.
Questions
Is there any way this is not the shop's fault? - A bad build? Cheap spokes? Improperly tensioned?
Given the wheel's history, is there any point in keep replacing spokes, a couple at a time, or should I get the wheel rebuilt (preferably at the shop's expense)?
Could the hub in any way be to blame for this?
Thank you!
Update Oct 24th
I've been trying to get in touch with the manager of the shop throughout the week. Failed again to reach him this morning, so I figured I'd have a chat about my problem with one of the guys on the floor.
Tried to get him to provide at least a theory of why my spokes keep breaking, but not much came out of it really. He mentioned that he've seen, on rare occasaions, that a worn hub could cut the spokes (could be the same guy as I spoke to last time).
I'll check the hubs as soon as possible, as @Daniel R Hicks suggested. Due to plumbing work in our appartment, I haven't been home or able to check my bike all week.
If I don't see any indicatations that the spokes were put in the wrong way, I'm going to follow the advice most of you have, and take my bike to another shop for advice and repair.
Thanks so far! - I'll update you after I've payed the other shop a visit.
Update Nov 3rd
Took the bike to the other shop, told them the story. Let them decide to replace the broken spoke or them all.
They decided to replace just the broken spoke with a DT spoke (what ever that means). They also trued the wheel, which had gotten a slight "eggy" shape.
My fingers are crossed that this wheel will last now.
Once again, thank you all for your input!
Anecdotal Update
In case anyone follows... Since the last repair at the other shop, the wheel kept being in good shape. Finally, my spokes stayed tensioned, wheels stiff and true - the long struggle was finally over. Alas, the joy didn't even last a month...
Going home from a company party, I returned to my bike I parked at the train station, only to find out that some punk kids had apparently tossed it to the ground, and jumped both wheels badly out of shape. Front wheel had to be replaced and back wheel was in desperate need for a trueing. sigh
Sorry for the melodrama, just thought I'd update you the faith of my bike ;-).
| If the wheel keeps on failing - for some unidentified reason - you have to review the variables:
- the rim
- the hub
- the spokes
- the construction
From your description it's probably not the rim and, like @Daniel says, 'burrs on the hub' sounds like some fake techno-jargon you're being fobbed off with.
It certainly sounds like the spokes are failing to do the job the wheel builder is expecting of them. I'm a similar size and when I had some wheels made recently the builder used tandem spokes for their extra strength. Every little helps.
That said, it sounds like, unless you've a particular reason to keep with them, finding another shop might keep you safe and sane - and a second opinion is rarely a bad thing in this sort of situation.
| 0.777778 | 'burrs on the hub' sounds like some fake techno-jargon you're being fobbed off with |
When we talk about an 88/76/etc Key piano, does that include all keys or just white notes? | I have an old cheap keyboard which spans 5 octaves plus one extra C, so it goes from C2-C7 (I think).
Does that make this a 41 (5 x 8 +1) key or a 61 (5 x 12 + 1) keyboard?
When we talk about a standard 88-key piano is that the total number of white and black notes, meaning it covers just over 7 octaves?
While I'm here, what are the standard keyboard configurations if any other than a traditional piano can be said to be standard?
| It is not hard to work out a number of keys when avoiding remembering this by heart.
A full piano has:
4 full octaves up from the middle C (C3)
3 full octaves down also from the middle C
plus 3 additional keys at left next to C0.
An octave (e.g. from C3 to B3) contains 12 keys.
The number of keys:
3 extra keys at the left
3 octaves at the left, excluding the middle C, 12*3 = 36
the middle C (C3)
4 octaves up make, excluding the middle C, 12*4 = 48
All together: 3 + 36 + 1 + 48 = 88
| 1 | A full piano has 4 full octaves up from the middle C (C3) 3 full oktaves down also from the |
How common is it for cameras to have a gyroscope? | How many cameras apart from the iPhone have a gyroscope for orientation?
Am I right to assume that there is a standard way to “tag” an image with the direction the camera was pointing in, as well as the GPS position?
Do any cameras have positional tracking better then a GPS?
I am thinking about a method to join photos when the subject does not have enough “random” detail for the current software.
| Among the current cameras with GPS you will notice that more than half also record orientation. Just look at the row towards the bottom of the table that says GPS at the above link.
Now, I have no idea if they use accelerometer or gyroscopes but all those record the orientation of the camera. At least the Casio H20G, which is also among the digital cameras to include a built-in GPS with orientation, is known to use accelerometers because it actually tracks your position indoors (or other places where GPS do not reach) too by measuring direction and speed from the last known GPS location. They call this Hybrid GPS.
| 1 | Casio H20G is among the digital cameras to include a built-in GPS with orientation . |
Managed Package and dealing with Standard Objects? | I want to build a managed packaged and ultimately deploy it on the AppExchange. My app is targeted for the B2C model (Business to Consumer).
Since in salesforce public contacts are required to be tied to an account, I'm wanting to put a trigger on both the standard Account/Contact objects so that way when a new contact is created I also create a corresponding account and vice-versa (similar to the way the Non-Profit Starter Package) works. I'm concerned about doing this though as these are standard objects and it seems it could cause some conflicting behavior for customers if I've added a trigger like this on the key standard objects like Accounts and Contacts.
When developing a managed package should I consider creating all custom objects? I hate to recreate the standard account/contacts, but it seems like it may be my only option if I want to have full flexibility to do what I want and also not affect the way a customer is currently using salesforce Accounts and Contacts.
Does anyone have any thoughts on the impact of building functionality on top of standard objects when creating an appexchange app? It seems like tinkering with the standard objects might be a bad idea?
| Create your own Record Type for Accounts and Contacts that will indicate the records are applicable to your managed package.
Then check if the Account/Contact has the required Record Type before applying the trigger.
I.e. The triggers only make changes if the Account/Contact is of a configured RecordType
This will also help isolate your customizations from any other installed packages that are also working with Account/Contact.
Note: Avoid hardcoding any RecordTypeIds in the trigger. It is better to look them up as required or make them configurable.
If you want your triggers to work for multiple record types you could examine a particular field to see if it indicates the record is applicable. This could be as simple as having a Checkbox on the Account or Contact that indicates your code should be applied to the record.
With triggers I also make it a habit to provide a bypass custom setting. Create a hierarchy checkbox custom setting that indicates if the trigger should be bypassed. Then an admin can configure the custom setting to skip the trigger for certain profiles/users as required. This can be extremely useful when loading data into the system.
| 0.777778 | Check if Account/Contact has the required Record Type before applying the trigger |
Where did Kagami Taiga live when he lived in the US? | We see a flashback to when Kagami lived in the US in episode 1 of season 2 (26Q).
Judging from all the palm trees, I'd hazard a guess that he was probably in California. California also seems like the most likely option on a demographic basis (i.e. where are Japanese temporary immigrants most likely to end up?).
Is it ever explicitly stated where he lived? And if it is California, is it ever stated whether he's in SoCal or NorCal (or somewhere else)?
| The only indication offhand gets kinda spoilery but
Character Spoiler:
Unrevealed yet in the anime as of episode 1 of Kuroko no Basket S2, Alexandra Garcia, was a college champion in the NCAA from UCLA. In her retirement, she frequented betting courts on the streets (which could technically be anywhere) and eventually runs into Taiga & Himuro.
Event Spoiler:
Alexandra trains Taiga & Himuro as kids. Later on Taiga decides to receive training once more from his old master by returning to Los Angeles, so it's pretty suggested that everything took place in SoCal. Here's a pic of an announced airline destination: Chapter 111, page 19 from Batoto.net
I tried to minimize unnecessary spoiling information. Overall, a bit circumstantial, but still enough for me to presume that they're in Southern California.
| 1 | Character Spoiler: Unrevealed yet in anime |
Just finished installing Ubuntu Desktop 13.10, mouse clicking problem | Installed on my MacBook Pro Early 2011, and I've encountered this problem before where my mouse will move around the screen but won't select anything. I can't click to navigate anything and all has to be done through my keyboard. Just a little frustrating.
Any help?
Update: I found the problem to be linked to my mad catz gaming mouse. When I have it plugged in, the cursor does as mentioned, but when I unplug it, everything's fine. But in-case this problem ever happens to me, an answer will still work for me.
| I knew exactly what your problem was before your comment because I also own a RAT and took me forever to figure out what to google for.
Basically what you need to do is manually map all the buttons in the xorg.
Here is the link to the solution.
What is happening is your RAT needs a driver and linux isn't taking the button inputs correctly. Your symptom is due to the fact that it doesn't know how to click off. This gives it the illusion that none of your buttons are working. One workout around until you fix this is to unplug/replug or change mouse modes (RAT 7 and 9 only). You will get one click each time. Or just use a different mouse until you make the changes.
| 0.888889 | How to map all the buttons in xorg? |
What are the relativistic effects of expanding spacetime? | This is a question I've been mulling over for a while and I'm hoping someone here can point me in the right direction. Sorry if it's a bit of a novice question. For the record, I don't fully know GR, but don't let that stop you from using it in the answer.
Since the universe is expanding - that is, the spacetime metric is expanding by way of a near-exponentially increasing scale factor - we can say that the distance between any two non-bound objects is increasing over time. Herein lays my dilemma; if there were two objects separated by a large distance that had no relative velocities initially, after a long time, the effects of expansion would cause them to have large apparent velocities away from each other. Given that there hasn't been any acceleration to cause these velocities, are there still relativistic effects in play? That is, is there time dilation between the two frames?
Furthermore, given long enough time, the rate of increasing distance between the two objects could place them outside of their visible horizon (ie they are travelling away from each other at superluminal velocities). Since there was still no acceleration to achieve this feat, what can one say about the relativistic effects in this case?
At first I thought this was an easy question. I thought of course there would be relativistic effects and when the objects go superluminal, the visible horizon is there to ensure there can never be causal contact and thus preserve physics. But then I thought what if spacetime stopped expanding abruptly (seems crazy but as far as I know, nothing makes this completely impossible)? Since there was no initial relative velocities, wouldn't the two objects return to being in the same inertial frame? And seeing as none of them experienced any sort of acceleration, how then could we describe their two final states? By which I mean, if we were to assume there were relativistic effects during transit, how would we overcome such simple paradoxes like the twin paradox, or other relevant ones?
At this point, I'm stumped. I even attended a lecture by Miguel Alcubierre since he would have had to consider these types of effects in his design... No help. Equations are great to illustrate a point, but I'm really going to need a conceptual answer as well to fully understand this.
|
Given that there hasn't been any acceleration to cause these velocities, [...]
As a side issue, even in Newtonian mechanics, accelerations don't cause velocities. Accelerations are just a measure of how rapidly velocities are changing.
What you're running into here is the fact that general relativity doesn't have any notion of how to measure the motion of object A relative to a distant object B. It is neither true nor false that A and B gain relative velocity due to cosmological expansion. It is neither true nor false that A and B have nonzero accelerations relative to one another. Frames of reference in GR are local, not global. It's valid to say that distant galaxies are moving away from us at some velocity. It's also valid to say that everything is standing still, but the space between us and the distant galaxy is expanding.
[...] are there still relativistic effects in play? That is, is there time dilation between the two frames?
Kinematic time dilation is well defined in SR, which means that in GR it's only defined locally. Gravitational time dilation is only well defined in GR in the case of a static spacetime, but cosmological spacetimes aren't static. So it is neither true nor false that there is time dilation between us and a distant galaxy. Concretely, you could measure Doppler shifts. If you feel like interpreting these shifts in purely kinematic terms, you can assign a velocity to the distant galaxy relative to us. But this is not mandatory and actually doesn't really work very well, in the sense that the velocity you get is usually several times smaller than the rate at which the proper distance between the galaxies is increasing. (Proper distance is defined as the distance you would measure with a chain of rulers, each at rest relative to the CMB, at a moment in time defined according to a notion of simultaneity defined by cosmological conditions such as the temperature of the CMB.) In particular, there are galaxies that we can observe that are now and always have been receding from us at $v>c$, if you define $v$ as the rate of change of proper distance. The fact that we can observe them tells us that their Doppler shifts are finite and correspond to $v<c$.
Here is a nice popular-level article that explains a lot of this kind of stuff:
Davis and Lineweaver, "Misconceptions about the Big Bang," http://www.scientificamerican.com/article.cfm?id=misconceptions-about-the-2005-03
It's paywalled, but there are lots of copyright-violating copies floating around on the web.
The following is a presentation of the same material at a higher level:
Davis and Lineweaver, "Expanding Confusion: common misconceptions of cosmological horizons and the superluminal expansion of the Universe," http://arxiv.org/abs/astro-ph/0310808
| 0.777778 | Are accelerations still a measure of how rapidly velocities are changing? |
User @include url Precedence over Script @include url | I don't like scripts that use:
// @include http://*
they overload many pages, where we didn't want to, also because I had problems in past, while writing a script, console was full of errors produced by scripts of this kind. I recognize scripts like these ones anti-adblock , noPicAds are on my required list, but in order to use them I change the includes to the specific page I use. Let's suppose, I entered on a webpage and it says: "You need to disable Adblock" so I grab the url, go manually and edit the anti-adblock script adding
// @include http://example.com/*
refresh the page and it's working.
Now when the scripts update, everything is lost. No I don't want to stop updating, because I think these kind of scripts are essentially needed to stay updated.
My question is, there's anyway to keep include changes after update?
| I was told and verified that with scriptish extension it is possible to solve.
This topic.
I hope the greasemonkey developers implement this.
So the best answer so far would be, migrate to scriptish and use the check box that disables script include patterns. Unfortunately, I've already experimented scriptish in past and didn't familiarize.
While greasemonkey doesn't has a solution, I'm going to use both, scriptish only for the scripts with @include http://*
| 1 | scriptish extension |
Get an IFRAME element by name does not work anymore? | I have this very old JS that worked in IE8 that was doing this:
window.document.getElementById("frameModalityList")
Here is what I want to fetch:
<iframe name="frameModalityList" src="iframe_advanced_list.jsp" frameborder="0" marginheight="0" marginwidth="0" class="advanced_list" width="100%" height="300"></iframe>
Now, when I try it in IE9/10, Chrome, I get an error:
SCRIPT5007: Caught exception occurred : Unable to get property 'contentWindow' of undefined or null reference
What is the new proper way to get the IFRAME element?
| because you haven't set the id but name try this:
window.document.getElementByName("frameModalityList")
or insert the id into the html:
<iframe id="frameModalityList" name="frameModalityList" src="iframe_advanced_list.jsp" frameborder="0" marginheight="0" marginwidth="0" class="advanced_list" width="100%" height="300"></iframe>
window.document.getElementById("frameModalityList")
| 1 | If you haven't set the id but name try this: window.document.getElementByName |
Show "Raise Notice" and "Raise Warning" in QGIS | Is there a way to catch "Raise Warning" and "Raise Notice" (while editing PostGIS-Layers) from a PostgreSQL/PostGIS-Trigger-Function within QGIS?
One example: I have a trigger that reacts to insert or update-events and sends back notices to the client.In QGIS i just get messages from raise exeption but not notices or warnings.
I found a old question ( How do I catch PostGIS/PostgreSQL RAISE messages in QGIS? ) but I can't imagine that QGIS is still not capable of catching these important "feedbacks" from the Database, especially as it has its origin in working together with PostGIS.
Does anyone know more about that?
| This seems to be implemented in the meantime: http://hub.qgis.org/issues/12184#change-59414
| 0.888889 | This seems to be implemented in the meantime |
Black hole collision and the event horizon | Will the event horizons of a two black holes be perturbed or bent before a collision? What will the shape of the event horizon appear to be immediately after first contact?
| The apparent horizon is only affected to the point that the curvature around one black hole is modified by the gravitational field of the other.
The event horizon as defined by the boundary of the causal past of future conformal infinity gets modified in advance of significant changes in curvature, but this precisely what you would expect from a global teleological definition. See Hawking and Penrose for more details.
| 1 | The event horizon as defined by the causal past of future conformal infinity |
Arrow tip for curved arrow in xymatrix | Inserting () in A on diagram #3 corrects the arrow tip at C.
But replacing C by a fraction, the problem comes back.
MWE
\documentclass[11pt,a5paper]{report}
\usepackage[all]{xy}
\SelectTips{cm}{11}
\begin{document}
$\xymatrix{%
A \ar[r] \ar `d/8pt[r] `[rr] [rr]
& \displaystyle\frac{A}{B} \ar[r]
& \frac{A}{B}
}$
$\xymatrix{%
A \ar[r] \ar `d/8pt[r] `[rr]_{s} [rr]
& \displaystyle\frac{A}{B} \ar[r]
& C
}$
$\xymatrix{%
(A) \ar[r] \ar `d/8pt[r] `[rr]_{s} [rr]
& \displaystyle\frac{A}{B} \ar[r]
& C
}$
$\xymatrix{%
(A) \ar[r] \ar `d/8pt[r] `[rr]_{s} [rr]
& \displaystyle\frac{A}{B} \ar[r]
& \frac{A}{B}
}$
\end{document}
(original post)
I have no idea how to correct the arrow tip for s arrow. The strange is that I just copied the code for s from another diagram I have in the same file, which works perfectly, as you can see below:
How to move the s arrow down without increasing the radius for the circle? I mean, I'd like to have a bigger space between the arrow and B. I know that I could add a new line but I'd like to keep only one.
Why \displaystyle is lifting A? How to write correctly the middle fraction? I tried \dfrac but no success.
MWE
\documentclass[12pt,margin=0mm]{standalone}
\usepackage[all]{xy}
\begin{document}
$\xymatrix{%
A \ar[r] \ar `d/8pt[r] `[rr]_{s} [rr]
&
\displaystyle\frac{A}{B} \ar[r]
&
\frac{A}{B}
}$
\end{document}
|
The arrow head gets broken when touching the target. You have to shift the whole arrow down until it fits again. If you replace the fraction by just A, it works.
You have just the possibility to shift the arrow like in \ar@<-1ex> or to increase the radius. I would not do both but just increase the vertical height of the first cell.
I loaded amsmath and \dfrac works as expected. \xymatrix gets set in inline math style. No matter if you put it in $$ or in \[\] ([preview] option to standalone needed)
Here is my approach. I just found out that the depth of the first cell has to be a little bit bigger than the depth of the last cell. The bigger the subscript, the bigger the distance between s and \dfrac{A}{B}
% arara: pdflatex
\documentclass[12pt]{standalone}
\usepackage[all,cmtip]{xypic}
\usepackage{mathtools}
\begin{document}
$\xymatrix{%
A\vphantom{\dfrac{A}{B_x}} \ar[r] \ar@<0ex> `d/8pt[r] `[rr]_s [rr]
&
\dfrac{A}{B} \ar[r]
&
\dfrac{A}{B}
}$
\end{document}
The result may not be pleasing due to the big gap on the left. Will be better when just using \frac{}{}. And, you guessed it, it would be nicer with tikz-cd!
% arara: pdflatex
\documentclass[12pt, border=2mm]{standalone}
\usepackage{tikz-cd}
\usepackage{mathtools}
\begin{document}
\begin{tikzcd}
A \arrow{r} \arrow[rounded corners, to path={ -- ([yshift=-3ex]\tikztostart.south)\tikztonodes -| (\tikztotarget.south)}]{rr}{s} & \dfrac{A}{B} \arrow{r} & \dfrac{A}{B}
\end{tikzcd}
\end{document}
| 1 | The arrow head gets broken when touching the target |
Color diff should be the default view on pending edit review pages | The color diff should be the default view on pending edit review pages.
| Well yes it is now ... the rendered diff comes in technicolor.
The markdown side-by-side diff is also much improved.
| 0.666667 | the rendered diff comes in technicolor |
Hanging boot and cannot boot to disk | I'm having a very puzzling problem with my PC. Recently I have not been able to boot very consistently. The boot will hang during the Windows 7 splash screen and will not go further. The same thing happens when trying to run Startup Repair. At this point in time, I cannot boot, period.
I've tried booting in safe mode. Safe mode boot hangs after loading disk.sys and will not go further. I've tried using LKGC, which also had no affect.
Normally in this situation, I would do some hardware testing (memtest, chkdsk, windows recovery), but for some reason I cannot boot to any disks whatsoever. The DVD drive I'm trying to boot with is only a few weeks old (my old one died recently), and I've used these disks to boot with before, so I know they are good.
At this point, I'm a bit stymied as to what I should do next. I'm downloading Ubuntu now to try and backup some stuff, but again, I doubt the boot will be successful. If anyone has any advice on what to try now, I would really appreciate the help.
| Try removing and reseating your memory modules one at a time with just your primary drive connected. It is also worth removing any expansion cards you might have too. If this gets you to the login screen, have a look through event viewer for any erroneous entries - you can then start shutting down, adding back hardware and starting up, one item at time until you find the offending piece of kit - assuming its hardware based.
| 0.666667 | removing memory modules one at a time with just your primary drive connected |
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.
| Your syntax is rather clunky, I'm afraid. Refactoring to avoid dozens of superfluous external processes should also make the script more readable and maintainable, although you need to understand the new constructs.
Instead of doing a for loop over the output of cat, the usual idiom to read a file line by line is to use while read ...; do ...; done <file and this also buys you the significant simplification that read will split the input into tokens for you.
Instead of calling $RANDOM three times, it would seem a lot more straightforward to call it once with a modulo of 1000 and add leading zeros if necessary.
And no, your arrays were not working right, but you don't even really need arrays here -- just do the stuff you want to do inside the main loop for each user.
As ever, you should properly quote every string unless you specifically require the shell to perform wildcard expansion and token splitting on the value.
I also took the liberty to fix the grep; if [ $? = 1 ]; then... to just if ! grep; then... which is both simpler and more idiomatic, as well as more readable. But then we should not use grep for examining passwords, so I replaced that with getent instead. The construct getent || groupadd is basically shorthand for if ! getent; then groupadd; fi.
You were redirecting standard error from useradd to /dev/null but I took that away -- if there is a failure, you need to see the error message; otherwise you could spend hours debugging an error which would be obvious if you knew what's wrong. (We see that here on StackOverflow a lot more than we should.)
One last note -- Bash has a simple built-in syntax for substring extraction; ${string:0:3} extracts a substring of length 3 at offset 0. Similarly, ${string//foo/bar} returns the value of string with all occurrences of foo replaced with bar.
#!/bin/bash
while read last first middle groups; do
rsy=$(prinf '%03i' $(($RANDOM % 1000)))
username="${first:0:1}${last:0:3}$middle$rsy"
echo "$username"
for group in $groups; do
getent group "$group" >/dev/null || groupadd "$group"
done
password=$(LC_ALL=C tr -dc '!-~' </dev/urandom | head -c 14)
enc=$(openssl passwd -1 "$password")
useradd -n -G "${groups// /,}" -m "$username" -p "$enc" -d "/home/${groups%% *}/$username" #2> /dev/null
# Print generated user's first, last, UID, and password
echo "$first $last $(id -u "$username") $password"
done <"$1"
I have not attempted to enhance the useradd command -- as noted in the answer by @asimovwasright you probably need to do additional things to perform this properly. If you are on a Debian-based distro, you should look into adduser as a higher-level replacement which takes care of many of these chores for you.
The password creation is a bit of a crock. I adapted one of the answers from How to automatically add user account AND password with a Bash script? but it's probably not optimal from either a usability or a security standpoint. But then, you should really not create passwords anyway -- just create users without passwords, put their SSH public key in place, and let them log in that way.
(I used /dev/random at first but it was taking forever in my tests so I switched to /dev/urandom. I'm hoping you are making your users change their password first thing when they log in, so this should be an acceptable compromise.)
| 0.888889 | How to add user account AND password with Bash script? |
Identify my Motobécane racing bike | I bought a Motobécane last year (pics below), and now that the bottom bracket is broken, I really need to know the model of the bike, to help me change that piece.
It would also be helpful if someone could redirect me to the Motobécane catalogs of the years 82, 83, I can't find them, and I suspect my bike is from this period.
Technical specifications:
frame color: green and black (How customizable was that? I think they didn't sell the same colors each year)
frame: tubing inexternal 707, "trainer" (I don't find the appropriate info about it)
brakes: Weinmann
derailleur: Sachs - Huret. 12 gears
Wheel: Maillard
Bottom Crank: ?? width of the shell: 74mm. From this page http://sheldonbrown.com/vrbn-g-n.html, the old french ones have special dimensions. Also on Motobécane, they are swiss type (left-threaded). I don't know if this is a cotterless one, shimano octalink, or if I can put something more standard?
[EDIT: As suggested by @Blam, I took the bottom bracket out.
First mistake: shell width doesn't correspond to the red line on the pic, but less, so width should be 68mm, I'll double check on the bike.
The Brand is Stronglight, french brand, but the threading is the normal one (left-threaded on the right side, and right-threaded on the left side).
The axle is 120mm long, tapered square. Like this model: http://www.ebay.com/itm/VP-Components-Bottom-Bracket-120mm-Square-Taper-Unsealed-Bike-NEW-/311359596201?pt=LH_DefaultDomain_0&hash=item487e7a66a9
But anyway, I'm still interested in knowing the model of this bike, and/or finding the Motobécane catalogues of years 1982-83]
Important Note: The rear wheel is not the original (was broken). I also changed the part of the crank where I put the feet when I bought it (maybe I shouldn't have...).
Sorry if it looks quite dirty, I didn't have time to clean.
Pics:
| Turbulent times for Motobecane.
You can find the (last that I have found) French Motobecane for 1985-6 (dated Sept. 85) on forum.tontonvelo.com (with the French model designations).
However, no Trainer in them and there are not many models listed - MBK/Motobecane was producing many other models many with older tube types from the past (decals similar to Peugoet - later with red/orange/yellow colors) during 85-6. The Motobecane name appears to have been dropped late 1986 the same year Yamaha became the main shareholder.
I suspect your Trainer is one of the earlier ones possibly late 85/early 86, the later "Trainers" I've seen have either a "Reseau Motobecane" badge on the steerer tube or "MBK Motobecane" on the down tube. If you check the components and the serial numbers with data on the web, you should be able to get a good idea. I stumbled on a few sources out there on the Motobecane/MBK Trainer when searching for info on another bike of that period.
Recently got caught up into this period as well due to a Motobecane "Ranger" (no MBK on the frame) from the same period, picked it up for the missing Espace bars on a 1984 Mt. Becane. Oddly and apprently the MBK label had already been used for the "Mt. Becane" in 85 (MBK model=Ranger) with the same specs as the '84 Motobecane (with the platform tandem fork and Espace handlebars through 86), the same time Motobecane Ranger was made with a different frame and unicorn fork. The later 1987 MBK Ranger model looks the same as the earlier Motobecane Ranger including the unicrown fork. All very odd.
Hope this helps and good luck!
Geo
| 1 | Motobecane/MBK Trainer for 1985-6 |
Subsets and Splits