qid int64 10 74.7M | question stringlengths 15 26.2k | date stringlengths 10 10 | metadata list | response_j stringlengths 27 28.1k | response_k stringlengths 23 26.8k |
|---|---|---|---|---|---|
38,770,403 | I am doing my project and ran into a weird error of git. I clone a private project of a company named X by setting the user.name by following these commands :
```
git config --global --unset-all user.name
```
and then :-
```
git config --global --add user.name <whatever>
```
was able to clone the project. After t... | 2016/08/04 | [
"https://Stackoverflow.com/questions/38770403",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3338909/"
] | Seeder usually just adds some data. It's just a simple class which does something like this:
```
// Insert one row of random data into the 'users' table
DB::table('users')->insert([
'name' => str_random(10),
'email' => str_random(10).'@gmail.com',
'password' => bcrypt('secret'),
]);
```
So no, it will no... | To create migration of seeding use the following laravel package
<https://github.com/slampenny/SmartSeeder>
It creates versioned seeding and will only seed new files that are not migrated just like the default table migrations |
11,544 | I recently posted this question about character optimization:
[What class has the most damage output per round at level 6?](https://rpg.stackexchange.com/questions/185443/what-class-has-the-most-damage-output-per-round-at-level-6)
I made several revisions to it, and it received the required 5 votes to be re-opened,... | 2021/05/25 | [
"https://rpg.meta.stackexchange.com/questions/11544",
"https://rpg.meta.stackexchange.com",
"https://rpg.meta.stackexchange.com/users/71240/"
] | Repeated close and reopen rounds occur in a narrow range of circumstances.
One of the most common situations is that a question is simply contentious: several people think it ought to be closed for some reason or another, several other people think it ought to be open.
The situation your question is in, however, is d... | ### Whose vote is most valuable?
No one user’s vote is most valuable. Every user with access to close votes gets one vote, and no vote is more valuable than any other.
In a comment, you wrote:
>
> It's much better for questions to simply follow the close-edit-reopen cycle once, and at that point (once members have ... |
47,839,438 | I have two arrays of numbers that have the same size. How can I tell if there is any element in the second array that is greater than the first array at a given index? With this example:
```
a = [2, 8, 10]
b = [3, 7, 5]
```
`3` is greater than `2` at position `0`. But in the following:
```
a = [1, 10]
b = [0, 8]
`... | 2017/12/15 | [
"https://Stackoverflow.com/questions/47839438",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] | No need for indices. Just pair them and check each pair.
```
b.zip(a).any? { |x, y| x > y }
=> true or false
```
And a tricky one: Check whether at every position, `a` is the maximum:
```
a.zip(b).map(&:max) != a
=> true or false
```
And a very efficient one (both time and space):
```
b.zip(a) { |x, y| break tru... | If there's a number in `b` greater than the number in `a` at the given index, this will return the number in `b`. If no numbers in `b` are greater, `nil` will be returned.
```
b.detect.with_index { |n, index| n > a[index] }
```
For example, if you have the following arrays.
```
a = [3, 4, 5]
b = [6, 7, 8]
```
You... |
60,567,949 | I have static website hosted in S3 which is served by Cloudfront.I invoke lambda functions through API gateway Rest API from my website.The API calls return 200 ok response and everything works ok,but sometimes the call fails with the message in X Amazon Header read as Authorizer Configuration Exception. I have configu... | 2020/03/06 | [
"https://Stackoverflow.com/questions/60567949",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11011113/"
] | One `dplyr` possibility could be:
```
df %>%
rowwise() %>%
mutate(ID = +(sd(c(A, B, C)) == 0 & D == 11))
A B C D ID
<int> <int> <int> <int> <int>
1 12 12 13 4 0
2 12 13 12 11 0
3 12 12 12 11 1
``` | An option with `pmap`
```
library(dplyr)
library(purrr)
df1 %>%
mutate(ID = pmap(., ~ +(sd(head(c(...), 3)) == 0 & ..4 == 11)))
# A B C D ID
#1 12 12 13 4 0
#2 12 13 12 11 0
#3 12 12 12 11 1
```
### data
```
df1 <- structure(list(A = c(12L, 12L, 12L), B = c(12L, 13L, 12L), C = c(13L,
12L, 12L), D = c... |
8,158,153 | I've used rvm to install rails..no problems.
Created a new app successfully
Running bundle install without issues.
Although, trying to run any command further (rails s, rails g controller.., etc)
I'm getting this error
```
/home/USER/.rvm/gems/ruby-1.9.2-p290/gems/execjs-1.2.9/lib/execjs /runtimes... | 2011/11/16 | [
"https://Stackoverflow.com/questions/8158153",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/967070/"
] | This happens when your ubuntu installation does not have a javascript runtime installed.
Try:
```
sudo apt-get install nodejs
``` | I had the same issue.
Gemfile ->
```
gem 'execjs'
gem 'rubytheracer'
```
bundle install |
35,811,939 | ```
#include <stdio.h>
#include <math.h>
int binary(int);
void main()
{
int num;
printf("Enter the number:\n");
scanf_s("%d", &num);
binary(num);
}
int binary(int num)
{
int rem;
rem = num % 2;
num = num / 2;
if(num == 0)
{
printf("\nThe binary equivalent is %d", rem);... | 2016/03/05 | [
"https://Stackoverflow.com/questions/35811939",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5930398/"
] | The variable in the global namespace will have much poorer performance, but not precisely for the reasons that @Freddie mentions. A variable in the global namespace could potentially be changed by something external, forcing the interpreter to reload the value each time through the loop. Using a local variable, the JIT... | Have a look at this under Technique 1 - <http://www.webreference.com/programming/javascript/jkm3/index.html>
>
> Global variables have slow performance because they live in a highly-populated namespace. Not only are they stored along with many other user-defined quantities and JavaScript variables, the browser must a... |
22,879 | Some sites allow you to register and only provide a single password box, which is protected with stars.
Traditionally a "confirm password" box is used when registering which allows you to confirm that the password entered is indeed the password the user wishes to use.
I know that an interface is only complete when th... | 2012/06/26 | [
"https://ux.stackexchange.com/questions/22879",
"https://ux.stackexchange.com",
"https://ux.stackexchange.com/users/11862/"
] | The idea behind masking is that **someone may be watching you**r screen (from behind you).
(Couldn't find an existing answer with this, even though I am sure I saw it here once, the is the closet I found is [Ben Brocka's answer here](https://ux.stackexchange.com/a/20958/687).)
You could let the users **elect** to unm... | Smashing Magazine's article on [Innovative Techniques To Simplify Sign-Ups and Log-Ins](http://uxdesign.smashingmagazine.com/2011/05/05/innovative-techniques-to-simplify-signups-and-logins/) provides some interesting thinking around this where they have a section:
>
> **[REQUIRE USERS TO TYPE THEIR PASSWORD ONLY ONCE... |
34,589,919 | I am trying to understand one PHP OOP concept, lets say i have two classes A and B. B extends A there fore A is Base/Parent class. If class A has a \_\_construct class B will automatically inherit it...?
Example:
```
class Car
{
public $model;
public $price;
public function __construct()
{
... | 2016/01/04 | [
"https://Stackoverflow.com/questions/34589919",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5127919/"
] | When one class `extends` another, it inherits all its methods. Yes, that includes the constructor. You can simply do `class Engine extends Car {}`, and `Engine` will have a constructor and all other properties and methods defined in `Car` (unless they're `private`, which we'll ignore here).
If you define a method of t... | Overriding a constructor in a child class is exactly that, **overriding**... you're setting a new constructor for the child to **replace** the parent constructor because you want it to do something different, and generally you won't want it to call the parent constructor as well..... that's why you need to explicitly c... |
20,353,945 | I try to modify a value that is stored at a certain memory address.
The address is stored in a certain pointer but altering it with a new int changes the memory address (of course).
```
int *toModify = (int *)(foo+5); //foo is a adress of a function.
//The val to alter is 5bytes after it
int newVal = 5;
toModify = &... | 2013/12/03 | [
"https://Stackoverflow.com/questions/20353945",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1283056/"
] | You cannot do this in a portable, standards compliant way. Even if you wanted to do this in a non-portable way (which you may be able to do by manipulating the machine code directly), `foo` is likely in read-only memory, and so can't be modified.
It would be better to define `foo` to access a global or static variable... | Perreal's (delete) answer is right:
```
*toModify = newVal;
```
... but... you're trying to write a into the application's code space, and modern operating systems go to great lengths to prevent this, as it's a *major* security risk. That's probably why you'll probably get a segmentation fault.
Also, you're writing... |
87,512 | I'm a fairly new user of wordpress.org. I have a wordpress.com site using the Confit theme and wish to transfer it to .org.
I exported the site from .com and into imported to .org successfully, only to find that .org did not offer the Confit theme.
I have since downloaded the directory for the Confit theme from here:... | 2013/02/19 | [
"https://wordpress.stackexchange.com/questions/87512",
"https://wordpress.stackexchange.com",
"https://wordpress.stackexchange.com/users/27711/"
] | WordPress.com has now made the theme downloadable via a ZIP file from the theme's page at: <http://theme.wordpress.com/themes/confit/>
After installing the theme from within your dashboard, it will then show a message asking if you also want to install their "WordPress.com Theme Updates" plugin. | Sure, you can svn the theme. But there will be some differences between running it on .com and self-hosted. You need to enable debugging <http://codex.wordpress.org/Debugging_in_WordPress> and see what's wrong.
I've svn'd many themes from .com and the differences vary. You will need to debug and learn some php to remo... |
26,365,570 | Using a library called Velocity JS for animating: <http://julian.com/research/velocity/>
I am using it as follows:
```
var velocity = new Velocity(element, {
translateX: 250,
complete: function() {
return true;
}
}, 5)... | 2014/10/14 | [
"https://Stackoverflow.com/questions/26365570",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2920441/"
] | If I understood the question properly, you are not really concerned about the *values* in the second row, but the number of occurrences of the elements in row 1. This can be obtained with the `unique` and `histc` functions:
```
C(1,:)=unique(A(1,:));
C(2,:)=histc(A(1,:),C(1,:));
C =
1 2 3 4 5
... | The answer depends on whether repeated columns should be counted repeatedly or not. Consider the following data:
```
A = [1 2 1 3 1 2 4 3 5 1;
2 3 4 5 6 6 6 5 7 8]; %// col [3;5] appears twice
```
1. If repeated columns should be **counted according to their multiplicity**: you can use [`accumarray`](http://ww... |
18,050,918 | not long ago twitter stopped supporting rest 1.0 and I had to find some suloutions using new OAuth system. I found **[this](https://stackoverflow.com/questions/17067996/authenticate-and-request-a-users-timeline-with-twitter-api-1-1-oauth/17071447#17071447).**
That worked well and was simple in use. But recently I face... | 2013/08/05 | [
"https://Stackoverflow.com/questions/18050918",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1049397/"
] | I would personally like to choose
```
if (condition) {
return x;
} else {
return y;
}
```
This is much more readable for me, with or without the braces. These are return statements, so it might not make much difference. But lets say they are just statements, like the example below:
```
if (condition){
... | There is no difference in code's logic and I believe it could be even compiled into exactly the same bytecode in both cases. It's more about personal preferences. Here is a short list of factors involved in favor of the former approach:
1. There's no "third option" as in the first example. Although Java compiler is sm... |
34,091,749 | I have a table in my database like this :
```
id date origine
1 2015-12-04 16:54:38 1
```
Now I want to get only data witch have the date = `2015-12-04`. So I tried like this :
```
select * from table where id = 1 and date = "2014-12-04"
```
But I ha... | 2015/12/04 | [
"https://Stackoverflow.com/questions/34091749",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5289843/"
] | A good rich-text editor is one of the harder things to do currently, and is pretty much a project by itself (unfriendly API, huge number of corner cases, cross-browser differences, the list goes on). I would strongly advise you to try and find an existing solution.
Some libraries that can be used include:
* Quill (<h... | This is what you asked for, in your bounty: on the following example you can see how to detect the exact number of characters of the actual point where you clicked the mouse on:
```
<!-- Text Editor -->
<div id="editor" class="divClass" contenteditable="true">type here some text</div>
<script>
document.... |
2,588,425 | I am using the split view template to create a simple split view that has, of course, a popover in Portrait mode. I'm using the default code generated by template that adds/removes the toolbar item and sets the popover controller and removes it. These two methods are splitViewController:willShowViewController:... and s... | 2010/04/06 | [
"https://Stackoverflow.com/questions/2588425",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/151894/"
] | So, the barButtonItem will have the UISplitViewController as the target and showMasterInPopover: as the action. I can't find it in the documentation, so I'm a bit worried it's not okay to call it, but I got it to work by changing the target to self (the view controller) and the action to a custom method, like this:
``... | Elisabeth writes:
>
> You can make the popover disappear without selecting an item if you tap anywhere outside the popover, but I would also like to make it disappear if the user taps the button again.
>
>
>
First of all, let me say that none of what I am about to say is to be taken personally -- it is not meant ... |
34,534,927 | Let's say I have a program in which I must use a global variable (of some class type).
I would like to be able to use smart pointers so I won't have to worry about deleting it.
in some file `Common.hpp` file I have the declaration:
```
extern unique_ptr<CommandBuffer> globalCommandBuffer;
```
and in my main.cpp:
... | 2015/12/30 | [
"https://Stackoverflow.com/questions/34534927",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] | You want either:
```
globalCommandBuffer.reset(new CommandBuffer());
```
Or:
```
globalCommandBuffer = std::make_unique<CommandBuffer>();
```
Global variables are very rarely a good idea. | If you want a global (you probably don't, but just in case you do), just create a global. The whole point of a smart pointer is to manage ownership and lifetime. In the case of a global, those are generally quite trivial--you want them to exist before anything else happens, and continue existing until everything else q... |
6,820,565 | Can I pass `false` as a needle to `in_array()`?
```
if(in_array(false,$haystack_array)){
return '!';
}else{
return 'C';
}
```
The `$haystack_array` will contain only boolean values. The haystack represents the results of multiple write queries. I'm trying to find out if any of them returned false, and theref... | 2011/07/25 | [
"https://Stackoverflow.com/questions/6820565",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1149/"
] | PHP won't care what you pass in as your 'needle', but you should probably also use the third (optional) parameter for in\_array to make it a 'strict' comparison. 'false' in PHP will test as equal to `0`, `''`, `""`, `null`, etc... | There's [got to be a better way](http://www.ideone.com/j9v1D).
```
<?php
echo (in_array(false,array(true,true,true,false)) ? '!' : 'C');
echo (in_array(false,array(true,true,true,true)) ? '!' : 'C');
Output:
!C
``` |
4,403,781 | I did a clean jCarousel setup, meaning I didn't use the provided stylesheet or any of the skins and styled it from scratch. But the Next button isn't working. The weird thing is that it *does* work after I inspect it with FireBug or the built-in element inspector on Chrome. I assume it has something to do with the elem... | 2010/12/09 | [
"https://Stackoverflow.com/questions/4403781",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/532742/"
] | Heres' a translation.
```
Dim random = New Random()
Dim number = random.Next()
Console.WriteLine(number)
Dim GenerateRandom = Function ()
Dim random = New Random()
Dim number = random.Next()
End Function
Console.WriteLine("Begin Call")
GenerateRandom.DoAsync(Sub (number) Console.WriteLine(number))
Console.... | [Reflector](http://www.red-gate.com/products/reflector/ "Reflector") is an easy and free way to convert between .NET languages. |
48,763,985 | I am trying to deploy my microservice in EC2 machine. I already launched my EC2 machine with Ubuntu 16.04 LTS AMI. And also I found that we can install Docker and run containers through Docker installation. Also I tried sample service deployment using Docker in my Ubuntu. I successfully run commands using -d option for... | 2018/02/13 | [
"https://Stackoverflow.com/questions/48763985",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/8655052/"
] | What you are describing is a "traditional" single server environment and does not have much in common with a microservices deployment. However keep in mind that this may be OK if it is only you, or a small team working on the whole application. The microservices architectural style was introduced to be able to handle h... | >
> Can I choose this EC2 + Docker for deployment of my microservice for actual production environment?
>
>
>
Yes, this is totally possible, although I suggest using **kubernetes** as the container-orchestrator as it manages the lifecycle of the containers for you:
1. [Running Kubernetes on AWS EC2](https://kuber... |
30,197,213 | How can i make two bindings on a column in grid, in the way that if first binding is empty or null, second binding will be used. I have tried to do that with FallbackValue property but you can't make binding inside it only static values.
Here some code, which is more than words!
```
<telerik:RadGridView x:Name="radGri... | 2015/05/12 | [
"https://Stackoverflow.com/questions/30197213",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4519970/"
] | Use a function which will return a value at the specific key of each object in array:
```
$scope.filterFunc = function (obj){
return obj['ga:sessions'];
}
```
And in the HTML:
```
<div ng-repeat="page in pages | orderBy:filterFunc:true">
```
See also [this SO post](https://stackoverflow.com/a/12041694/2046306... | You can't use it this way because angular parser will not allow you.
You can write your own filter or fix keys before converting them to object.
UPD: Technically it's not valid attribute name according to ECMAScript 5.1 <https://es5.github.io/#x7.6> |
982,628 | [Google Earth was installed using this procedure on 16.10.](https://skagitsignal.com/how-to-install-google-earth-64-bit-in-ubuntu-16-04-lts-x64/) What is the file to invoke from the command line to launch the application?
[](https://i.stack.imgur.com/... | 2017/12/03 | [
"https://askubuntu.com/questions/982628",
"https://askubuntu.com",
"https://askubuntu.com/users/545291/"
] | I suggest to find Google Earth executable by listing all installed files and searching here its executable or desktop file.
I do not have Google Earth Pro installation, so here are examples for normal version:
* list all installed files and find placed in *bin* here:
```
$ dpkg -L google-earth-stable | grep bin/
/us... | You also can find it in the GUI: click on `Show Applications` (in 17.10 at the bottom of the Dashboard, in former version at the top) and begin typing `google earth`. While typing you should see Google Earth. While it is running, it appears with its icon in the Dashboard and you may pin it if you want to use it more of... |
10,039,275 | I'm writing a program that listens to the System Clipboard for changes. The listener runs on a separate thread and performs some action (say, write to file) when the contents of the Clipboard changes.
I'm polling the clipboard using the [ClipboardOwner interface](http://www.javapractices.com/topic/TopicAction.do?Id=82... | 2012/04/06 | [
"https://Stackoverflow.com/questions/10039275",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/793803/"
] | I suspect that OSX doesn't provide notification of clipboard changes, so Java is doing the best it can by notifying you whenever it gets woken for some other reason.
My suspicion comes from the [NSPasteboard](http://developer.apple.com/library/mac/#documentation/Cocoa/Reference/ApplicationKit/Classes/NSPasteboard_Clas... | Seems Keith is right. However, you can do a workaround by sending the application to the background (on \*Nix):
```
java -jar clipboard-1.0.jar &
```
This opens the Java application in the background and does not need window focus for notifications to fire. |
1,308,177 | This may be a dumb question - and the title may need to be improved... I think my requirement is pretty simple: I want to send a request for data from a client to a server program, and the server (not the client) should respond with something like "Received your request - working on it". The client then does other work... | 2009/08/20 | [
"https://Stackoverflow.com/questions/1308177",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/408718/"
] | Try to employ "Websocket Method" by using "SuperWebSocket" for server side, and "WebSocket4Net" for client side. It is working perfectly for my current project. | Are you trying to do this on the HTTP protocol? It sounds like you're talking about a web application here, but it's not clear from the question. If so, then there are a variety of techniques for accomplishing this using AJAX which collectively go under the name "Comet". Depending on exactly what you're trying to accom... |
452,502 | I was reading the some contract termination terms, and came across a phrase that I could not derive the exact meaning of and it's still bothering me. Can somebody please explain 'without prejudice to damages' in other words? As far as I understand, it is a truncated version of 'without prejudice to claim for any damage... | 2018/06/29 | [
"https://english.stackexchange.com/questions/452502",
"https://english.stackexchange.com",
"https://english.stackexchange.com/users/305369/"
] | Can't is widely considered an abbreviated form of 'cannot', and 'cannot you tell?' is a grammatical expression.
>
> Most contractions represent the joining of two words. “Can’t” is an
> exception however. Following the rules that apply to most
> contractions, you probably find yourself tempted to replace “can’t”
> wi... | "...can't you tell?" is valid usage.
It would be understood as a contraction representing
"... can you not tell?"
even though the "n't" for "not" is moved left of the word "you" to join the word "can". |
356,695 | I work for a small company.
We get computers in batches and every batch differs hardware-wise. When we get new PC's in I spend about half an hour on each one, wiping the hard drive, putting a fresh copy of Windows 7 on there (using the license key on the side of the machine which doesn't always work so I sometimes hav... | 2011/11/12 | [
"https://superuser.com/questions/356695",
"https://superuser.com",
"https://superuser.com/users/100543/"
] | Since you have an SBS2003 domain available to you, then why not check out the in-built [Software Distribution system](http://support.microsoft.com/kb/816102), at least for the application deployment part.
>
> * Assigning Software
>
>
> You can assign a program distribution to users or computers. If you
> assign th... | You can also look at using SysPrep. That's what I use, then I can mirror the Hard Disk to other machiines, and it's like doing the first boot period again (enter name, password, time, done) |
31,778,790 | Situation I have a form where the user selects from a few options in a select box.
When the user select the option 'other' i want to select box to transform into an input box.
This is my code.
Head
```
<script>
function chargeother(select) {
if (select=="other") {
document.getElementById('chargeother').innerHTML= '... | 2015/08/03 | [
"https://Stackoverflow.com/questions/31778790",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3993589/"
] | You needed to specify a `<table>` and `<tr>` tag for `<td>` in the HTML, and use innerHTML on the element and make sure you comment out the double quotes for the attribute values
//CODE
```
<!DOCTYPE html>
<html>
<head>
<script>
function chargeother(ele){
switch(ele.parentNode.id){
case "... | You can achieve it like this:
>
>
> ```
> function chargeother ( select ) {
> if (select == "other")
> {
> var elem = document.getElementById(" selectId ");
> elem.parentElement.removeChild (elem);
> var inputElem= document.createElement ('input');
> inputElem. type='text';
> ... |
33,718,048 | I'm trying to learn how to create responsive design and actually have a few questions. First of all, can I move BLOCK2 under BLOCK4 in samller resolution? (my media queries have 736px max-width[](https://i.stack.imgur.com/uqFSK.png)
Here's css:
```
... | 2015/11/15 | [
"https://Stackoverflow.com/questions/33718048",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4330010/"
] | If it's a real project (something that will be deployed in the real world) then yes, you absolutely need to care about byte ordering. You'll also need to care about other serialization issues including data type sizes and structure field alignment.
You can eliminate some headaches by using types explicit sizes, for ex... | You probably should, everyone expect network bytes order when receiving data. Another problem that you have is the padding. The compiler is allowed to put empty space between struct members, cause of required alignment. You have to send just one, network-byteordered, struct member at the time to work around this proble... |
18,066 | Weiß jemand, woher der Begriff
>
> Baulöwe,
>
>
>
laut Duden ein
>
> "Bauunternehmer oder Bauherr, der [mit zweifelhaften Methoden] durch Errichten, Verkaufen o. Ä. vieler Bauten großen Profit zu machen versucht"
>
>
>
kommt? | 2014/11/25 | [
"https://german.stackexchange.com/questions/18066",
"https://german.stackexchange.com",
"https://german.stackexchange.com/users/10760/"
] | They are two totally separate verbs. *Steigen* means to rise, climb, ascend, soar, etc. whereas *steige**r**n* means to raise, boost, augment etc. | **1. steigen (Verb)**
The word "steigen" is often used to describe a physical activity for climbing up somewhere.
For example: *Den Berg besteigen.*
However, there are several other possible usages for different scenarios.
**2. steigern (Verb)**
The most common usage for this Verb is in the sense of increasing or e... |
55,153,490 | I currently have the variables below and want to know how much time elapsed in seconds. So CURRENT\_TIME - TEST\_START
```
TEST_START=$(date '+%d/%m/%Y %H:%M:%S')
sleep 4
CURRENT_TIME=$(date '+%d/%m/%Y %H:%M:%S')
```
I tried below, but keep getting illegal action
```
START_IN_SECONDS=$(date --date "$(TEST_START)" +... | 2019/03/14 | [
"https://Stackoverflow.com/questions/55153490",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5106912/"
] | Editing the `file`a bit to be more descriptive:
```
$ cat file
username=user1
api=pass1
username=user2
api =pass2
```
Notice the 2 spaces added to records 3 and 4. First with `==`:
```
$ awk -F= '$1=="username"||$1=="api"{print$2}' file
user1
pass1
```
Only records 1 and 2 were were matched. Now, if you use `=`,... | Could you please try following too. I am removing the starting space and ending space in line considering that you may not need it. Then checking if first field is either `username` or `api` then print last field of that line.
```
awk -F'=' '{gsub(/^[[:space:]]+|[[:space:]]+$/,"")} $1~/^username$|^api$/{print $NF}' In... |
2,530,744 | How do I extract **foo** from the following URL and store it in a varialbe, using regex in php?
```
http://example.com/pages/foo/inside.php
```
I googled quite a bit for an answer but most regex examples were too complex for me to understand. | 2010/03/27 | [
"https://Stackoverflow.com/questions/2530744",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/82985/"
] | Well, there could be multiple solutions, based on what rule you want the `foo` to be extracted. As you didn't specify it yet, I'll just guess that you want to get the folder name of the current file (if that's wrong, please expand your question).
```
<?php
$str = 'http://example.com/pages/foo/inside.php';
preg_match( ... | *If* the first part is invariant:
```
$s = 'http://example.com/pages/foo/inside.php';
preg_match('@^http://example.com/pages/([^/]+).*$@', $s, $matches);
$foo = $matches[1];
```
The main part is `([^/]+)` which matches everything which is *not* a slash (`/`). That is, we're matching until finding the next slash or e... |
25,529,951 | I am fairly new to CKEdtior and have just installed it on this website I'm working on, the version is 4.4.4
The editor itself loads into the page, but custom properties like language or uiColor aren't working, and with or without properties, I keep getting the error:
```
Uncaught TypeError: Cannot read property 'getE... | 2014/08/27 | [
"https://Stackoverflow.com/questions/25529951",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1105417/"
] | You cannot call `CKEDITOR.replace()` before the place where the relevant `<textarea>` is in the code. You can see this in the [replace by code sample](http://cdn.ckeditor.com/4.4.4/standard/samples/replacebycode.html):
```
<textarea cols="80" id="editor1" name="editor1" rows="10">content</textarea>
<script>
// Th... | You can write a function named `setTimeout()`.
Example:
```
setTimeout(function(){CKEDITOR.replace('id-textarea')},time);
``` |
257,205 | After a recent WP update I get this error message in the back-end. Front-end is working without issues:
>
> Fatal error: Call to a member function add\_filter() on array in /...
> /wp-includes/plugin.php on line 111
>
>
>
I already tried updating WP manually but the issue persists. Ideas anyone? | 2017/02/20 | [
"https://wordpress.stackexchange.com/questions/257205",
"https://wordpress.stackexchange.com",
"https://wordpress.stackexchange.com/users/113778/"
] | Why images don't get imported
=============================
It's the export step that causes the issue here with image attachments. WordPress’ export function doesn’t include the “attachment” post type unless you select the “All content” export option. But if you only want to import and export your posts from one site... | I´ve tried mentioned plugins and "DeMomentSomTres Export" - worked on featured images + some but not all regular images and "Auto Upload Images" - worked on all regular images but not on featured images. If you combine the two of them problem would be solved but not ideal to have two plugins for the same purpose. Inste... |
30,250,215 | I tried to create folder in my local git repo using mkdir. It didn't work, but
`mkdir -p` works.
Why?
I'm using Mac OS by the way. I checked the definition of mkdir -p. But I still don't quite understand. | 2015/05/15 | [
"https://Stackoverflow.com/questions/30250215",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4808432/"
] | Say you're in the directory:
```
/home/Users/john
```
And you want to make 3 new sub directories to end up with:
```
/home/Users/john/long/dir/path
```
While staying in "/home/Users/john", this will fail:
```
mkdir long/dir/path
```
You would have to make three separate calls:
```
mkdir long
mkdir long/dir
mk... | That flag will create parent directories when necessary. You were probably trying to create something with subdirectories and failing due to missing the -p flag |
40,641,648 | I am trying to make a php/html5 sound player that will:
1. scan the files in a folder called "sound" and select only mp3 files
2. at each page load, play a random sound from the ones in the "sound" folder.
So far it works pretty well, except sometimes the path of the source is not a .mp3 but also "/sound/" and some ti... | 2016/11/16 | [
"https://Stackoverflow.com/questions/40641648",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/302577/"
] | Data.table runs in the environment of the data table itself right, so you might need to specify where you want to get the value from
```
DT[cyl == get("cyl", envir = parent.frame())]
``` | Just specify the scoping:
`DT[cyl == globalenv()$cyl]` |
3,053,181 | I've just upgraded a VS 2008 project to VS 2010, converting the project but keeping the target as .NET 3.5 (SP1 is installed). My project worked without issue under VS 2008 on another machine.
I've added references to System.Web.Extensions.dll but I'm still getting the following errors from code in the App\_Code folde... | 2010/06/16 | [
"https://Stackoverflow.com/questions/3053181",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/250254/"
] | In Visual Studio 2012, be sure to add reference for `System.Web.Extensions` as that is the one that holds `System.Web.Script.Serialization`. | * Check your web.config assembly
entries.
* Check your .NET Framework [target](http://weblogs.asp.net/scottgu/archive/2009/08/27/multi-targeting-support-vs-2010-and-net-4-series.aspx) in your Visual Studio
2010 project, default is 4.0
* Check IIS, make sure you are using the appropriate framework for
your site. The new... |
54,402 | Could anyone point me to a place where I could find Deligne's letter to Piatetskii-Shapiro from 1973? It is cited for example in Berkovich's "Vanishing cycles for formal schemes II". | 2011/02/05 | [
"https://mathoverflow.net/questions/54402",
"https://mathoverflow.net",
"https://mathoverflow.net/users/10701/"
] | I have typeset Deligne's letter, and placed the result here:
<http://www.math.ias.edu/~jaredw/DeligneLetterToPiatetskiShapiro.pdf>
I have made some minor edits so that the text reads more naturally to a native speaker of English. Also I made a few annotations where I truly believe there is an error in the original. A... | I think it was published obscurely and in a Russian transcription (the original is in English) .
In endnote 25 of the review of Harris-Taylor on his website
[here](http://www.jmilne.org/math/articles/2002b.pdf), Milne writes:
[Deligne proved it] in an eleven-page handwritten letter to Piatetskii-Shapiro dated March ... |
30,851,729 | I just installed the latest beta of Xcode to try **Swift 2** and the improvements made to the Apple Watch development section.
I'm actually having an hard time figuring out WHY this basic `NSUserDefaults` method to share informations between **iOS** and **Watch OS2** isn't working.
I followed [this *step-by-step* tut... | 2015/06/15 | [
"https://Stackoverflow.com/questions/30851729",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3588489/"
] | With watch OS2 you can no longer use shared group containers. [Apple Docs:](https://developer.apple.com/library/prerelease/watchos/documentation/General/Conceptual/AppleWatch2TransitionGuide/UpdatetheAppCode.html#//apple_ref/doc/uid/TP40015234-CH6-SW1)
>
> Watch apps that shared data with their iOS apps using a share... | As mentioned already, shared NSUserDefaults no longer work on WatchOS2.
Here's the swift version of @RichAble's answer with a few more notes.
**In your iPhone App**, follow these steps:
Pick the view controller that you want to push data to the Apple Watch from and add the framework at the top.
```
import WatchCon... |
938,991 | in a windows environment and in several applications, when we create a new file with the same name of an existing file, the user is not prompted with a message that the output file already exists, but it creates a new file with (1) at the end of the filename...
```
name.doc
```
will be
```
name(1).doc
```
I'm tr... | 2009/06/02 | [
"https://Stackoverflow.com/questions/938991",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/28004/"
] | You can use SysInternals [Strings](http://technet.microsoft.com/en-us/sysinternals/bb897439.aspx) tool to view the strings in executables and object files. | Simple C# utility that extracts all **user strings** from a .NET assembly (.exe or .dll) by examining bits of a binary file.
The source code from **vladob**'s answer can now be found [on github here](https://gist.github.com/vbelcik/01d0f803b9db6ec9b90e8693e4b0493b#file-extractexenetstrings-cs). The link from the origi... |
21,489,775 | I am learning FullCalendar JS plugin by Adam Shaw now. And first at all I want to say *"Thanks a lot"* to the plugin author.
What is a Calendar view? This is **a list of records** (calendar events). And I have to control this list size, or I hit limits (no more than 1000 records can be passed from Controller to View).... | 2014/01/31 | [
"https://Stackoverflow.com/questions/21489775",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3258779/"
] | fullCalendar already have this feature, check this out, <http://arshaw.com/fullcalendar/docs/event_data/events_json_feed/> | you are looking for gotoDate (<http://arshaw.com/fullcalendar/docs/current_date/gotoDate/>) which will refetch your events for the given date object or year and month.
From documentation:
```
.fullCalendar( 'gotoDate', year [, month, [ date ]] )
``` |
759,401 | On 3x4 chessboard (see below) there are 3 Black knights (B B B) and 3 white knights (WWW), exchange knights in the min # of turns (hint: use graph representation)
B B B -> WWW
0 0 0 -> 0 0 0
0 0 0 -> 0 0 0
WWW -> B B B | 2014/04/18 | [
"https://math.stackexchange.com/questions/759401",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/144068/"
] | Preliminary, let us do a slight change in notation: I will indicate with $k \in \mathbb{Z}$ the discrete time, with $K$ the $k$ present in the summation and the period (if it exists) with $N \in \mathbb{N}\_0$.
Firstly, let us refresh the following concepts. Let $\theta \in \mathbb{R}\_+$, $k \in \mathbb{Z}$, $i = \sq... | It is possible that your professor is assuming all the frequencies in the sum are multiples of one, given, fundamental frequency and forgot to state this assertion. If they are all multiples, then indeed almost all paths are periodic.
But even if they are not multiples, the paths are "quasi-periodic" in the sense of H... |
29,110,161 | Trying to convert this code for a for loop into a while loop:
```
int endData = myScanner.nextInt();
int row = 0;
int cell = 0;
int rowcell = 0;
System.out.println("FOR LOOP: ");
for (row = 1; row <= endData; row++) {
if (row%2 == 0) {
for (cell = 0; cell < row; cell++) {
... | 2015/03/17 | [
"https://Stackoverflow.com/questions/29110161",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4595060/"
] | One of the mistakes i see is the initialisation
```
rowcell2 = 0;
```
it should be under
```
while(cell2<row2){
``` | All you have to do to convert it is declare the index before the while loop and add the incrementer to the end of the while loop.
```
int endData = myScanner.nextInt();
int row = 0;
int cell = 0;
int rowcell = 0;
System.out.println("FOR LOOP: ");
row = 1;
while(row <= endData) {
if (row%2 == 0) {... |
39,523 | I have an old Thinkpad X60 that I'd like to wipe clean and rebuild. Seeing as this machine doesn't have an optical drive, what's the easiest way of installing Windows XP?
I have an external USB hard drive available. Would it be possible to run the install from that instead? Otherwise, what options do I have?
Edit: as... | 2009/07/12 | [
"https://serverfault.com/questions/39523",
"https://serverfault.com",
"https://serverfault.com/users/6681/"
] | As long as the BIOS supports booting from USB, you can use an external drive. If you're got a RIS server, you could do a netowrk install, or you could get a similar image, sysprep it, ghost it across (USB boot of clonezilla, ghost from a network share), and then set it up for the new machine.
Edit:
You might need to ... | 1. If you have USB CD Drive then just use it to install windows the way one does with normal CD drive.
2. If you have access to similar laptop then you can install Windows on similar laptop. And clone the harddisk of other laptop to laptop with no cdrom drive.
3. if you dont have access to USB CDROM or similar laptop w... |
7,485 | In StarCraft2, Protoss can change their gateways into warp gates. However, I'm puzzled that they can be changed *back* into gateways.
Is there any advantage for gateways over warp gates ? What am I missing ? | 2010/09/15 | [
"https://gaming.stackexchange.com/questions/7485",
"https://gaming.stackexchange.com",
"https://gaming.stackexchange.com/users/3436/"
] | One that hasn't been mentioned is that you don't need pylons to create units at a gateway. So if you're heading into enemy territory, want constant reinforcement, and don't want to mess with creating a pylon or flying around a warp prism, you can just waypoint your gateways to one of your units and have all your new un... | Once in a game I used the warp prism to deploy a smal force on the platform where my opponent had his starting base (without destroying the garbage layed out before the main entrance). Before he realized that it is not-so-unreachable as he thought my five warp-gates released a nice army to overwhelm his base. But for m... |
20,148,857 | I'm trying to check if an element exists before I can execute this line:
`driver.findElement(webdriver.By.id('test'));`
This throws an error "no such element" if the id `test` doesn't exist in the document, even in a `try`-block.
I've found answers for Java, where you can check if the size is 0, but in Node.js this t... | 2013/11/22 | [
"https://Stackoverflow.com/questions/20148857",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1493415/"
] | You can leverage the optional error handler argument of `then()`.
```
driver.findElement(webdriver.By.id('test')).then(function(webElement) {
console.log('Element exists');
}, function(err) {
if (err.state && err.state === 'no such element') {
console.log('Element not found');
}... | [Aaron Silverman's answer](https://stackoverflow.com/questions/20148857/check-if-an-element-exists-with-selenium-javascript-and-node-js/20977989#20977989) did not work as expected (`err.state` was `undefined` and a `NoSuchElementError` was always thrown)—though the concept of using the optional callbacks still works.
... |
69,869,181 | I've downloaded Android Studio from the official website, the one for M1 chip (arm).
Basically running it for the first time, the error is the following:
```
An error occurred while trying to compute required packages
```
I was searching about it the whole day to figure out a way to make Android Studio work, but th... | 2021/11/07 | [
"https://Stackoverflow.com/questions/69869181",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/17346713/"
] | This is what solved it for me on my M1.
1. Go to Android Studio [Preview](https://developer.android.com/studio/preview) and download the latest Canary build for Apple chip (Chipmunk). Don't worry this is just to get through the initial setup.
2. Unpack it, run it, let it install all the SDK components, accept licenses... | I tried over a dozen 2021 stable and Canary builds from <https://developer.android.com/studio/archive> and couldn't get any of them to work.
This is the only thing I could find that worked:
1. Download, unpackage and run Android Studio 3.6.3 **android-studio-ide-192.6392135-mac.zip** from [here](https://developer.and... |
38,323,226 | I am using React JS to create a responsive UI. I want to create a collapsible sidebar like the following:
[](https://i.stack.imgur.com/hMqth.png)
[](https://i.stack.imgur.com/M8ume.pn... | 2016/07/12 | [
"https://Stackoverflow.com/questions/38323226",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1267491/"
] | You can have a button just like in the fiddle, but have it in the sidebar component.
[I've updated the fiddle](https://jsfiddle.net/davidg707/cc96ku6t/1/)
The beauty of React is separating the state. I think like this:
1. I want some global state (like, in a store) that says if the sidebar should be showing or not
2... | I have implemented the side drawer without using any of these packages like slide-drawer or react-sidebar.
You can check out **[Side Drawer](https://github.com/GhostWolfRider/ReactSideDrawer)** in my GitHub account **[GhostWolfRider](https://github.com/GhostWolfRider?tab=repositories)**.
>
> **Output Images for refe... |
71,509,993 | I am having trouble running my import statement in VS code Jupyter. I split them into individual cells. I find when I run
```
import numpy as np
```
the cell hangs and I get a message
>
> Connecting to kernel: Python 3.6.9: Waiting for Jupyter Session to be idle
>
>
>
How do I fix this? | 2022/03/17 | [
"https://Stackoverflow.com/questions/71509993",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/125673/"
] | I found my solution was to select the correct version of Python. I had 2 choices for Python 3.6.9. I chose the one called "base(Python 3.6.9)" which had a different location to "Python 3.6.9" and the base version worked. Something odd if going on here, maybe I should remove the other version? | For me, upgrading `ipython` to version 7.34.0 (from 7.32.0) fixed it. I'm using `jedi` version 0.18.1. [Related](https://stackoverflow.com/a/65862512/18758987)
Update: this broke again for me when I upgraded my virtual environment to Python 3.8. I just upgraded my `ipykernel` package and now the notebook runs. |
15,959,856 | I'm just starting with Backbone.js. I'm building a Single Page Application and trying to figure out how I can handle this situation.
Depending on the view I'm rendering, I need to output multiple templates, meaning I have a wrapper that I use for the main template, and other 2 templates that go on other parts of the H... | 2013/04/11 | [
"https://Stackoverflow.com/questions/15959856",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1161745/"
] | I'd check out Addy Osmani's walkthrough for developing with backbone.js.
<http://addyosmani.github.io/backbone-fundamentals/>
It walks through the example todo app, and then one more complicated one. What I think you want specifically is to use a framework such as Marionette.js to orchestrate and automate some of the... | You need a layout with a couple of regions.
Then put your sub-views in these regions. |
57,819 | My landlord fixed a leak from the baseboard heating system using a plumber who decided to run the red [guessing PEX pipes] from the water heater/boiler to the baseboards along the ceiling. The pipes are exposed on the inside [hall, closet, and 2 bedrooms]. There is no insulation around the pipes and they are held in pl... | 2015/01/14 | [
"https://diy.stackexchange.com/questions/57819",
"https://diy.stackexchange.com",
"https://diy.stackexchange.com/users/31690/"
] | It is safe. No dangers lurk. Relax and be happy you don't own the place (so deciding what to spend money on when it breaks is not your problem.) | The only issue I see with this is the liability of the pipes themselves. It kind of sounds like a cheap hack job. When pipes are inside walls - 99.9% of the time - and they break the water just travels down. Usually the initial damage is minimal.
Now when you have pipes in the open there is a chance that it could init... |
477,250 | The Helmholtz function $F$ is defined:
$$F = U - TS$$
$$\implies dF = dU - TdS - SdT$$
Since by the Thermodynamic identity, $dU - TdS = - PdV$:
$$\implies dF = -PdV - SdT$$
My textbook then notes that given the form of the above equation, $F$'s natural variables are $V$ and $T$. However, my last equation was just ... | 2019/05/01 | [
"https://physics.stackexchange.com/questions/477250",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/153135/"
] | Playing with differentials in the way you report, can be done but with some care about the mathematical meaning of the manipulation.
When we write a differential, we should know in advance which are the independent variables the function we differentiate depends on and there is no substitute for it coming from formal... | If some function $f$ is a function of three variables $x,y,z$, then $x,y,$ and $z$ need to be independent of one another in the sense that changing one while holding the others constant needs to make sense.
This is not the case here. $U$ is not independent of $S$ and $T$ (in fact, it is just proportional to $T$ for an... |
67,109,657 | What is the difference in returning state in default case in redux reducer between `return state` and `return { ...state }` ? | 2021/04/15 | [
"https://Stackoverflow.com/questions/67109657",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6209704/"
] | Like React, Redux uses immutability to efficiently check updated object references for updated state, which is why you should never modify/mutate state directly. In the default case of most reducers no actions have modified the state so you can return the original state object (`return state`), this is safe as it won't... | When you use `return state` you are returning the variable, this is bad because if that variable changes, the value delivered in the return will also change (this is known as a side effect).
On the other hand, if you use `return { ... state }` what you are returning is a copy of the value of the variable at that momen... |
9,959 | How to ask a good question.
---------------------------
This thread has advice on the following aspects of writing a good question on this site. Each item in this list links to an answer below about that specific aspect of question writing.
* [Provide context](http://meta.math.stackexchange.com/questions/9959/how-to-... | 2013/06/14 | [
"https://math.meta.stackexchange.com/questions/9959",
"https://math.meta.stackexchange.com",
"https://math.meta.stackexchange.com/users/1543/"
] | Provide Context
---------------
**Context matters**. A question can sometimes be answered in one sentence when the discussion is between two experts familiar with each other's background, while the same question may take many paragraphs of detailed computation when being shown to an undergraduate student. By providing... | A good title
------------
The title of a question is the first thing people see. Like headings in newspapers, book, song and album titles, their importance is not to be underestimated -- the presence of a good, descriptive title for your question often greatly improves the exposure (and hence the amount and quality of... |
45,052,772 | I have a SCNScene rendering in a SCNView. I have some \*.dae models that are rendered/moving in the scene.
I have a transparent cube, when one of my models goes behind it, I would like the model to not be rendered, because at the moment, as the cube is transparent, you can see it through the cube.
Is there any proper... | 2017/07/12 | [
"https://Stackoverflow.com/questions/45052772",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/174955/"
] | Here's a solution
1. For the cube, use a material with [`constant`](https://developer.apple.com/documentation/scenekit/scnmaterial.lightingmodel/1462538-constant) as its [`lightingModel`](https://developer.apple.com/documentation/scenekit/scnmaterial/1462518-lightingmodel). It's the cheapest one.
2. This material will... | Based on [@mnuages answer](https://stackoverflow.com/a/45167391/1327557), you can use this class :
```
import SceneKit
class OccludingNode : SCNNode {
convenience init(geometry: SCNGeometry) {
geometry.materials = [OccludingMaterial()]
self.init()
self.geometry = geometry
self.ren... |
46,999,467 | I need to pass function as a parameter like this:
```
procedure SomeProc(AParameter: TFunc<Integer, Integer>);
```
When I have this function...
```
function DoSomething(AInput: Integer): Integer;
...
SomeProc(DoSomething);
...
```
...the code works. But with parameter modificators like const, var, or default valu... | 2017/10/29 | [
"https://Stackoverflow.com/questions/46999467",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/8851241/"
] | You can wrap it in an *Anonymous Method* like this:
```
SomeProc(function(Arg: Integer): Integer begin Result := DoSomething(Arg) end);
``` | Only if you declare it as a Method reference:
```
type TDoSomething = reference to function(const AInput: Integer = 0): Integer;
function SomeProc(AParameter: TDoSomething): Integer;
begin
Result := AParameter;
end;
function CallSomeProc: integer;
begin
Result := SomeProc(function(const AInput: Integer = 0): Int... |
975,153 | I am using jQuery's toggle() to show/hide table rows. It works fine in FireFox but does not work in IE 8.
`.show()`/`.hide()` work fine though.
[slideToggle()](https://stackoverflow.com/questions/903576/colums-resize-when-using-jquery-uis-toggle-in-ie) does not work in IE either - it shows for a split second then dis... | 2009/06/10 | [
"https://Stackoverflow.com/questions/975153",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/53236/"
] | I've experienced this same error on tr's in tables. I did some investigation using IE8's script debugging tool.
First I tried using toggle:
```
$(classname).toggle();
```
This works in FF but not IE8.
I then tried this:
```
if($(classname).is(":visible"))//IE8 always evaluates to true.
$(classname).hide();... | Just encountered this myself -- the easiest solution I've found is to check for:
>
> :not(:hidden)
>
>
>
instead of
>
> :visible
>
>
>
then act accordingly . . |
15,051 | In the 70s I read group of books. They were not quite conventional novels. There were references to science fiction/fantasy elements although they were not hard core genre stories. The protagonist was a bartender in a neighborhood bar in a large city, which is where most of the activity took place. There were some regu... | 2012/04/18 | [
"https://scifi.stackexchange.com/questions/15051",
"https://scifi.stackexchange.com",
"https://scifi.stackexchange.com/users/5885/"
] | **Short Answer:** The *Destiny*'s FTL drive system had been compromised and one of its 16 drives had been damaged and unable to be replaced. Rush presumed that any use of the system without proper calibration and without allowing the 3 hour recovery time could endanger the systems causing permanent damage.
**Longer An... | The explanation given was the drive would burn out/overload if it did not remain active for 4 hours after starting a jump and remain inactive 3 hours after completing an FTL jump.
I believe this occurred with one of the Ancient "Seed Ships" during a battle with the Drones. |
55,292,008 | Can this be refactored into boolean? `board` is an array and `move` is and index. `position_taken?(board, move)` should return `false` if `board[move]` is `" "`, `""` or `nil` but return `true` if `board[move]` is `"X"` or `"O"`.
```
def position_taken?(board, move)
if board[move] == " "
false
elsif board[move... | 2019/03/22 | [
"https://Stackoverflow.com/questions/55292008",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/10732837/"
] | If only X or O is allowed, Why don't you specify them in the condition like this:
```
boared[idx] == 'X' || board[idx] == 'O'
```
I think it is much better for readability and simple. | Found the solution. It can be refactored to this:
```
def position_taken?(board, move)
board[move] != " " && board[move] != ""
end
``` |
8,459,841 | Since a week I've set up 2 cronjobs. One is executed every minute, the other once per night. After checking in via FTP I noticed many files were created. These files are named after the cronjob-files. Atm I've cleaned up 6.000 unwanted files but I'm curious what's wrong?
I'm executing the files via wget and they are s... | 2011/12/10 | [
"https://Stackoverflow.com/questions/8459841",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/213633/"
] | Sounds like `wget` is saving its output as it does by default. You can specify `/dev/null` as the output file, and it will not save anything.
```
wget http://example.com/yourfile.php -O /dev/null
``` | If you add the `-O` option to `wget`, and put `> /dev/null` to the end of your crontab entries, the problem will go away.
`wget` downloads the file you point it to, but `-O` writes the file to STDOUT instead of disk, and `> /dev/null` blackholes the data. |
2,207,393 | I need help in indexing in MySQL.
I have a table in MySQL with following rows:
ID Store\_ID Feature\_ID Order\_ID Viewed\_Date Deal\_ID IsTrial
The ID is auto generated. Store\_ID goes from 1 - 8. Feature\_ID from 1 - let's say 100. Viewed Date is Date and time on which the data is inserted. IsTrial is either 0 or ... | 2010/02/05 | [
"https://Stackoverflow.com/questions/2207393",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/243766/"
] | The resource consumption is way more influenced by the algorithmic approach than the language chosen. If you are comfortable with Java, program your application in that language - even though a C++ implementation might be 10% faster.
That being said, you might be interested with [Artificial Intelligence API's for Java... | I did a similar AI project a couple of years ago. I don't know what solution you will be implementing, but AI programs can generally be both resource consuming and may take a long time to run, but on the other hand, you'll need a language you're familiar with to get it done in time.
Therefore, my advice is that if you... |
57,222,897 | I'm working with the basic Gatsby starter site and it compiles just fine, but the browser just shows the error mentioned in the title as well as a couple warnings.
It's probably important to note that the error is gone when I completely remove the StaticQuery piece so the IndexPage component is just the opening and cl... | 2019/07/26 | [
"https://Stackoverflow.com/questions/57222897",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/9975338/"
] | Finally, I got velocity like this.
(I wonder why I can't access the velocity of DragGesture.value when print value)
```swift
struct ContentView: View {
@State private var previousDragValue: DragGesture.Value?
func calcDragVelocity(previousValue: DragGesture.Value, currentValue: DragGesture.Value) -> (Double,... | You honestly don't even need the velocity. Just use `DragGesture.Value`'s `predictedEndTranslation` |
635,779 | I'm trying to configure the extension mcrypt in my Ubuntu Server VirtualBox for work in my phpMyAdmin page.
I ran `vi /etc/php5/mods-available/mcrypt.ini` and then I changed `extension=mcrypt.so` to `extension=/usr/lib/php5/20121212/mcrypt.so` and when I tried to save changes it said this:
```
E45 readonly option is... | 2015/06/12 | [
"https://askubuntu.com/questions/635779",
"https://askubuntu.com",
"https://askubuntu.com/users/419586/"
] | First come out of the vim editor using: `:qa!`
Next, use `sudo vim filename` and later: `:wq` | This happens when the user is trying to write on a file without the right permissions. Login as root using `sudo su` and now you can do the edit... |
56,596,752 | As part of our CI testing we install a virtualenv with some pip packages from a constant requirements.txt file.
this installation process randomly fails from time to time with no apparent reason as the requirements.txt file doesn't change. And each time it's for a different random package.
The CI is on an AWS machine... | 2019/06/14 | [
"https://Stackoverflow.com/questions/56596752",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/972014/"
] | I have that problem when I have a heavy dependency, so I updated the timeout for pip and problem solved. i.e my .pip/pip.conf has a timeout of 30 seconds
```
[global]
timeout = 30
``` | **Problem:**
Their may be problem with your python and other libraries version. May be your django wheel require some-other library which is installed in your anaconda environment but not satisfying the versions. when you use pip command it just try to download the wheel not care about version and not if version are no... |
193,645 | I just bought a used iMac, and updated to 10.6.8 from 10.5.8.
I created my first Apple ID, and verified it. Now I am trying to update to Yosemite, so that I can install Xcode. When I try to give my Apple ID it ends up telling me I need to give it credit card info. I do not own a credit card, for religious reasons, a... | 2015/06/30 | [
"https://apple.stackexchange.com/questions/193645",
"https://apple.stackexchange.com",
"https://apple.stackexchange.com/users/120162/"
] | For AirDrop to work, you need
1. Wi-Fi and Bluetooth on —although you don't need to be connected to the same network for AirDrop to work.
2. AirDrop activated —probably the "Everyone" setting will help with visibility on iOS.
3. If your Mac is older than 2012, you may have some issues.
4. You have to be closer than 3... | Didn't work with Wifi & Bluetooth & Airdrop turned on in both Mac and iPhone.
After a while trying to figure this out: Turn of Firewall on mac, that's it! |
539,610 | I can only find examples of setting Readline key bindings using Control (`\C-`) or Escape (`\e`) as prefixes.
In my case, on macOS, the `\C-` space is completely filled up by default key bindings, and the `\e` space is not practical on a Macbook with a touchbar.
Entering `"\M-f": kill-word` in `~/.inputrc` results in... | 2019/09/08 | [
"https://unix.stackexchange.com/questions/539610",
"https://unix.stackexchange.com",
"https://unix.stackexchange.com/users/128739/"
] | The utility would be:
```
showkey (1) - examine the codes sent by the keyboard
```
but this seems to be missing on mac-os...here it is "Key Codes"...?
Or you type ctrl-V (qouted insert) and then some special key. In bash, this prints `^[OP` in xterm and `^[[[A` in the console for the F1 key.
The readline ... | If I understood your question correctly:
```
bind '"^[f": kill-word'
```
Will define `Option+F` to invoke `kill-word` |
9,961 | This is related to [another question](https://mathoverflow.net/questions/5143/pushouts-in-the-category-of-schemes).
I've found many remarks that the category of schemes is not cocomplete. The category of locally ringed spaces is cocomplete, and in some special cases this turns out to be the colimit of schemes, but in ... | 2009/12/28 | [
"https://mathoverflow.net/questions/9961",
"https://mathoverflow.net",
"https://mathoverflow.net/users/2841/"
] | **Edit:** [BCnrd](https://mathoverflow.net/users/3927/bcnrd) gave a proof in the comments that this example works, so I've edited in that proof.
A ~~possible~~ proven example
-----------------------------
~~I suspect~~ There is no scheme which is "two $\mathbb A^1$'s glued together along their generic points" (or "$\... | Sounds to me like you don't want to hear the proof, but you want to hear "the point". The point is that a scheme must by definition be covered by affine schemes, and sometimes when doing exercises in Hartshorne the proofs go like this: first do the question for affine schemes, where the question becomes ring theory, an... |
32,984,180 | Background
----------
For a technical interview I was tasked with implementing a missing algorithm in JavaScript. The interviewer supplied me with some code and 18 failing unit tests that once the algorithm was successfully implemented would pass. I'm sure there is a more efficient way to have solved this problem as I... | 2015/10/07 | [
"https://Stackoverflow.com/questions/32984180",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/814038/"
] | There's no need to assign a variable isStraight at all.
```
PokerHand.prototype._check_straight_function = function(arr) {
for (var i = i = 4; i++) {
if (arr[i].value() - 1 != arr[i-1].value()) {
return false;
}
};
return true;
};
``` | Well, this is maybe a tiny bit tidier. I don't see a Ninja way ;( As far as comparing the solutions -- I'm an employer, and for my part, I'd prefer the answer which was clear and elegant over one which was a few nanoseconds faster :)
```
for (var i = 0; i < 5; i++) {
if (a[i].value() != i + a[0].value())
return ... |
12,094,326 | How can I match variations on words in MySQL, for example a search for accountancy should match accountant, accountants, accounting etc. I'm on shared hosting so can't add any functions to MySQL such as levenshtein.
I want something similar to how Google matches '**accounting course**' and '**accountancy courses**' wh... | 2012/08/23 | [
"https://Stackoverflow.com/questions/12094326",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2674284/"
] | MySQL isn't very good at full text search and you'd probably want to use other engines. My favorite one is Sphinx (<http://sphinxsearch.com/>) but there are others as well. Most of these support stemming out of the box.
If you have large tables and are going to use stemming the performance of MySQL will probably be v... | I don't know much about `MATCH`, when I want to select a column with variations I do the following
```
SELECT pjs.title
FROM pxl_jobsearch AS pjs
WHERE pjs.title LIKE 'account%'
```
I work mostly in SQL Server but do some MySQL. I imagine that this works in MySQL as well. |
6,534,193 | So my first explanation was difficult to read nad It was'nt fully correct as well. I'll try to explain it again. I have a strongly typed view where you enter a number. This view also has several strongly typed partial-views created in a for-loop. Each partial view is strongly typed and the model-item of each partial ha... | 2011/06/30 | [
"https://Stackoverflow.com/questions/6534193",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/810475/"
] | The linker isn't complaining about `pow((double) 2, (double) 3)` because the compiler is replacing it with a constant `8.0`. You shouldn't depend on this behavior; instead, you should always use the `-lm` option properly. (BTW, that's more clearly written as `pow(2.0, 3.0)`.
Consider the following program:
```
#inclu... | Are you including `<math.h>` everywhere?
Notice that the names in the library are prefixed with `__ieee754_`, but the ones the linker can't find are not.
What happens when you compile this code?
```
#include <math.h>
int main(void)
{
double d = pow(2, 3);
double e = asin(1.0 / d);
return (int)(e+1);
}
... |
10,739,016 | Hopefully, this is an easy one. I have an array with lines that contain output from a CSV file. What I need to do is simply remove any commas that appear between double-quotes.
I'm stumbling through regular expressions and having trouble. Here's my sad-looking code:
```
<?php
$csv_input = '"herp","derp","hey, ge... | 2012/05/24 | [
"https://Stackoverflow.com/questions/10739016",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1415176/"
] | Original Answer
---------------
You can use [`str_getcsv()`](http://php.net/manual/en/function.str-getcsv.php) for this as it is purposely designed for process CSV strings:
```
$out = array();
$array = str_getcsv($csv_input);
foreach($array as $item) {
$out[] = str_replace(',', '', $item);
}
```
`$out` is now a... | Not exactly an answer you've been looking for - But I've used it for cleaning commas in numbers in CSV.
`$csv = preg_replace('%\"([^\"]*)(,)([^\"]*)\"%i','$1$3',$csv);`
"3,120", 123, 345, 567 ==> 3120, 123, 345, 567 |
46,696,658 | I need a formula in Excel, not VBA please, forbidden to have such functions on my work machine. My situation is I need a number from cell A, which is a result from Today(), combined with a number from cell B, which is a result from Now(), combined with a number from cell C which is a text number, to output as a single ... | 2017/10/11 | [
"https://Stackoverflow.com/questions/46696658",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/8761294/"
] | ```
=TEXT(O21,"yymm")&""&TEXT(P21,"hhmm")&""&VALUE(Q21)
```
Placed in quotes the number format and removed extra quote though not sure why you are adding null to the string.
To match the sample output OP provided the formula would be:
```
=TEXT(A1,"mmdd")&""&TEXT(B1,"hhmm")&VALUE(C1)
``` | If you **do not** need leading zeroes to fill 5 digit placeholders for the value in Q21,
```
=TEXT(NOW(),"yymmhhmm")&TEXT(Q21, "0")
'possibly,
=TEXT(NOW(),"mmddhhmm")&TEXT(Q21, "0")
```
If you **do** need leading zeroes to fill 5 digit placeholders for the value in Q21,
```
=TEXT(NOW(),"yymmhhmm")&TEXT(Q21, "00000"... |
14,622,342 | I am a little confused by the **elitism** concept in Genetic Algorithm (and other evolutionary algorithms). When I reserve and then copy 1 (or more) elite individuals to the next generation,
* Should I consider the elite solution(s) in the parent selection of the current generation (making a new population)?
* Or, sho... | 2013/01/31 | [
"https://Stackoverflow.com/questions/14622342",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/336557/"
] | Elitism only means that the most fit handful of individuals are guaranteed a place in the next generation - generally without undergoing mutation. They should still be able to be selected as parents, in addition to being brought forward themselves.
That article does take a slightly odd approach to elitism. It suggests... | In nutshell the main points about using elitism are:
1. The number of elites in the population should not exceed say 10% of the total population to maintain diversity.
2. Out of this say 5% may be direct part of the next generation and the remaining should undergo crossover and mutation with other non-elite population... |
126,227 | I do interior photography occasionally. I'd like to replace my Canon M50 with the iPhone 13 Pro Max but I'm concerned about an external flash.
* Is it possible to use an external flash with iPhone?
* What's the best external flash dedicated?
* I already own a great Canon Speedlite 430EX II. Can I use it with the iPhon... | 2021/09/22 | [
"https://photo.stackexchange.com/questions/126227",
"https://photo.stackexchange.com",
"https://photo.stackexchange.com/users/101870/"
] | >
> I do interior photography occasionally. I'd like to replace my Canon
> M50 with the iPhone 13 Pro Max but I'm concerned about an external
> flash.
>
>
>
You should be. The rolling electronic shutters in most phone cameras eliminates using flash at all, since it [lowers the camera's flash sync speed](https://ww... | Look up Potech's TricCam. I use my speedlites with it on my iPhone 13. Sync speed is 1/60th. You have to use TricCam's app, which costs about $8.00. The device itself costs under $60.00. Once you can fire one speedlite, you can set the up others as optical slaves. The LED flash on the iPhone will trigger an optical sla... |
21,236,049 | I am unable connect my Android to Ubuntu. I have added rule to `udev`, I have added device to `adb_usb.ini` and I'm still getting same empty list.
My lsusb:
```
`Bus 002 Device 124: ID 04e8:6860 Samsung Electronics Co., Ltd GT-I9100 Phone [Galaxy S II]`
```
adb\_usb.ini
```
# ANDROID 3RD PARTY USB VENDOR ID LIST ... | 2014/01/20 | [
"https://Stackoverflow.com/questions/21236049",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2265932/"
] | For those who are having intermittent problems with adb. Here's a simple procedure you can use to rectify the issue.
Keep the device connected.
run
```
sudo adb kill-server
```
then go into your mobile device and
revoke all usb authorizations in your android developer section in settings on your mobile device.
... | Adding device in android rules file:
------------------------------------
### Use the following commands in Ubuntu:
How to get the device vendor id:
```
lsusb
```
Command for adding device rules, run the following commands:
```
sudo gedit /etc/udev/rules.d/51-android.rules
sudo chmod a+r /etc/udev/rules.d/51-and... |
4,193 | I'm looking for an activity for highschoolers/college-freshmen that will demonstrate crypto topics (e.g., encryption, signatures, zero-knowledge), and will be fun and motivating. It is supposed consist of small tasks that the audience can do by themselves (=no complicated math).
I vaguely remember seeing a website wit... | 2018/01/19 | [
"https://cseducators.stackexchange.com/questions/4193",
"https://cseducators.stackexchange.com",
"https://cseducators.stackexchange.com/users/4002/"
] | Have you considered a practical example like teaching PGP email encryption?
[Keybase.io](https://keybase.io) has a browser based crypto solution for doing encryption / decryption and while I don't recommend for "real" crypto, it is a great convenience tool for showing how public/private key encryption works without th... | When it comes to explaining asymmetric cryptography, I've seen an incredibly simple yet potent analogy used time and time again. This analogy can be found in this [Art of the Problem video](https://www.youtube.com/watch?v=YEBfamv-_do "Public key cryptography") around 2:40.
This simple example could easily be done in t... |
25,524,638 | I want to disable a button (`UIButton`) on iOS after it is clicked. I am new to developing for iOS but I think the equivalent code on objective - C is this:
```
button.enabled = NO;
```
But I couldn't do that on swift. | 2014/08/27 | [
"https://Stackoverflow.com/questions/25524638",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2966808/"
] | Swift 5 / SwiftUI
-----------------
Nowadays it's done like this.
```
Button(action: action) {
Text(buttonLabel)
}
.disabled(!isEnabled)
``` | in order for this to work:
```
yourButton.isEnabled = false
```
you need to create an outlet in addition to your UI button. |
19,050,921 | I filled array list with values. Each row is item with properties. Now I would like to sort items by one of properties and "print" them to textview.
```
ArrayList<String[]> arrayList = new ArrayList<String[]>();
final String[] rowToArray = new String[7];
rowToArray[0] = itemName;
rowToArray[1] = itemProperties1;
rowTo... | 2013/09/27 | [
"https://Stackoverflow.com/questions/19050921",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2463173/"
] | Well. You do
```
tmp.milisecondsCount = tmp.milisecondsCount - 1;
if(tmp.milisecondsCount == 0){
tmp.milisecondsCount = 100;
tmp.secondsCount -= 1;
}
```
And right after that
```
if ((tmp.secondsCount == 0) && tmp.milisecondsCount == 0) {
//stuff
}
```
How could it ever happen that they're both 0 if, a... | In your code, a first condition is met
```
if(tmp.milisecondsCount == 0){
tmp.milisecondsCount = 100;
```
so that the next conditional statment
```
&& tmp.milisecondsCount == 0
```
will never be true. |
4,627,952 | I need help finding all positive integer solutions to the following Diophantine equation:
$$\frac1x+\frac1y+\frac1z=\frac12$$
---
What I figured out so far was that we essentially need to find $3$ divisors, $a$, $b$, and $c$ of some number $k$ such that $$a+b+c=\frac k2$$This is so that when we divide $k$ on both sid... | 2023/01/29 | [
"https://math.stackexchange.com/questions/4627952",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/743034/"
] | A common first step in solving such a problem is to clear denominators to get a polynomial equation. Multiplying by $2xyz$ yields
$$2yz+2xz+2xy=xyz,\tag{1}$$
so every solution to $(1)$ with $xyz\neq0$ yields a solution to the original equation, and conversely every solution to the original equation yields a solution to... | It was necessary to write the solution in a more General form:
$$\frac{t}{q}=\frac{1}{x}+\frac{1}{y}+\frac{1}{z}$$
$t,q$ - integers.
Decomposing on the factors as follows: $p^2-s^2=(p-s)(p+s)=2qL$
The solutions have the form:
$$x=\frac{p(p-s)}{tL-q}$$
$$y=\frac{p(p+s)}{tL-q}$$
$$z=L$$
Decomposing on the factors... |
35,557,759 | Take a random set of coordinates (x, y, z) that will be the center of my 3x3x3 matrix( considered local minimum as well). I have a function J that takes those coordinates, does the calculations and returns me a number. If any of those 26 points will be smaller, that would be the center for my next matrice. In case I do... | 2016/02/22 | [
"https://Stackoverflow.com/questions/35557759",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5952619/"
] | You need to compare it the same way, but with `double` values. Instead of using 0 (`int`) use 0.0 (`double`):
```
if ( n == 0.0 || c== 0.0 ){
System.out.println("What do i write instead of \"?\" ");
}
``` | You are comparing with
```
if ( num1 = 0 || num2 = 0)
```
when it should be
```
if ( num1 == 0 || num2 == 0)
```
One `=` is assignment, not comparison. |
32,735,229 | We are working on migrating data from different source systems(Firebird, Oracle, SQL Server) to one target system (SQL Server).
We are getting *Error reading data from the connection* exception from Firebird connections.
Code we are using
>
> Static DbFactory Class to Create SourceSystem Object
>
>
>
```
public... | 2015/09/23 | [
"https://Stackoverflow.com/questions/32735229",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3086075/"
] | I just got this error. I have a program working with Firebird 2.5.9 written using Delphi 10.3 and Fibplus 7.6. Recently I migrated this program to Lazarus using IBX library. Now I just returned from absence live and found that Delphi program after connect to Firebird database refuses to open any datasets returning subj... | I get this error when execute query that length > **max query length**
in FireBird 4.x i get Error reading data from the connection
after update to 6.6 i get new error "**335544721** : Unable to complete network request to host..."
it was fixed by split query to some less query
(default 8191 characters when using UT... |
14,982,066 | I am using ajax to dynamically load XML from a web service, the returned records are limited to just 25 items for each url 'load' or 'call'.... to work around that I have a process whereby the user scrolls down the page and when they reach 90% of the page height (or when they reach page bottom - not sure which I'll cho... | 2013/02/20 | [
"https://Stackoverflow.com/questions/14982066",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1306792/"
] | The problem is I am betting `docall()` is an asynchronous call, so setting of `processing` to `false` after that call does nothing to block the future scroll events.
The setting of false is happening before the results are returned. You want to set `processing` back to false when `docall()` is done doing its task.
... | In addition to epascarello's post...
you don't need the $(document).scroll(fn) and the window.onscroll, which you are attaching to every time your document scroll handler is executed. A few things:
1) Firstly, take a look at this scroll post by John Resig. [Scrolling by J.Resig](http://ejohn.org/blog/learning-from-tw... |
1,086,658 | There is a nice dialog that helps to search for Active Directory groups in Windows called `Find Users, Contacts, and Groups`.
Unfortunately, I only know how to open it with this command:
```bsh
Rundll32 dsquery.dll OpenQueryWindow
```
Is this dialog available from the Start Menu or Control Panel? I cannot find it.
... | 2016/06/08 | [
"https://superuser.com/questions/1086658",
"https://superuser.com",
"https://superuser.com/users/81913/"
] | If you want something clickable, you can create a .bat file with the following:
```
@echo off
start Rundll32 dsquery.dll OpenQueryWindow
``` | Windows OS version : 8.1
>
> * Newtork and Internet -> Click on "View network computers and devices"
> * Top Menu bar view -> Search Active Directory
> * Find Users, Contacts and Groups popup would appear
>
>
>
You search for any user or group in this window and their access level to the folders. |
31,689,360 | Though I have `ui-boostrap` installed, the browser shoots me an error `Error: [$injector:unpr] Unknown provider: uniqueFilterProvider <- uniqueFilter`
**json objects**
```
{
"_id" : ObjectId("55b81956fde835be46f22294"),
"life" : true,
"domain" : { "hidden" : true, "name" : "Eukarya" },
"kingdom" : { "hidden" : tr... | 2015/07/29 | [
"https://Stackoverflow.com/questions/31689360",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4893485/"
] | I found an answer. All we have to do is, instead, simply installed the wonderful, genius, un-replaceable [a8m](https://github.com/a8m/angular-filter) angular-filter library with `bower`/`npm`, added to my array of dependencies (@Joy), and used the syntax `ng-repeat="animal in animals | unique: 'domain.name'"` and every... | [Unique Filter example](http://plnkr.co/edit/kxJFSw?p=preview) will help you using unique filter. I think version of angular-ui you are using may not have unique filter. try to change the version of ui-bootstrap.
As you see in example, filter accepts property of record item.
```
<tr ng-repeat="record in items | uniqu... |
3,639,342 | I've always thought of `git reset` and `git checkout` as the same, in the sense that both bring the project back to a specific commit. However, I feel they can't be exactly the same, as that would be redundant. What is the actual difference between the two? I'm a bit confused, as the svn only has `svn co` to revert the... | 2010/09/03 | [
"https://Stackoverflow.com/questions/3639342",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/260127/"
] | The key difference in a nutshell is that `reset` **moves the current branch reference**, while `checkout` does not (it moves HEAD).
As the Pro Git book explains under [Reset Demystified](https://git-scm.com/book/en/v2/Git-Tools-Reset-Demystified),
>
> The first thing `reset` will do is **move what HEAD points to**. ... | Here's a clarification of the ambiguity:
* git checkout will move the HEAD to another commit(*could be* a change using a branchname too), **but**:
1. on whatever branch you are, the pointer to the tip of that branch(e.g., "main") will remain unchanged (so you might end up in a *detached head* state).
2. Also, the st... |
73,934,426 | I provide different services for my job, but my rates vary from client to client, I'd like a formula to get the rate value (0.04, in this case) using two values, the name of the client "Client 3" and the service in question "Service 2".
I have created a spreadsheet to better illustrate what I am trying to accomplish, ... | 2022/10/03 | [
"https://Stackoverflow.com/questions/73934426",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20149018/"
] | This works regardless of how many **clients** or **services** you have.
```
=MAP(B1:B,C1:C, LAMBDA(c,s,
IFERROR(INDEX(Rates!B2:D, MATCH(c,Rates!A2:A,0), MATCH (s,Rates!$B$1:1,0)),"")))
```
[](https://i.stack.imgur.com/Ce6Dj.png)
**Demo**
[](https://i.stack.imgur.com/XnHbj.png)
or arrayformula of it:
```
=INDEX(IFNA(VLOOKUP(B1:B&C1:C,
SPLIT(FLATTEN(Rates!A2:A&Rates!B1:E1&"×"&Rates... |
43,269 | According to the Ford-Fulkerson algorithm, I thought that if there was no path from $s$ to $t$, then the flow would be a max flow. In the flow below, there are two paths between $s$ and $t$. Then, how can this be the max flow?
 | 2015/06/05 | [
"https://cs.stackexchange.com/questions/43269",
"https://cs.stackexchange.com",
"https://cs.stackexchange.com/users/34307/"
] | The flow is maximum if there is no augmenting(i.e. improving) path between `s` and `t`. A path would contribute to the maximum flow if all its edges have strictly positive capacity left. In your case although you have some paths between `s` and `t`, all of them will have at least one edge that has used its whole capaci... | There is another way to see it that might help you:
if you cut the net in two subnets, i.e. s,a,c and b,d,t you can see that the net flow from the source subnet to the sink subnet is maximized: there are two saturated paths and one empty one. In any net, if you can find such a bipartition that highlights such a proper... |
12,744 | Is there a way to 'mangle' a public data-source (for example, the current date in YYYYMMDD or the top New York Times headline) to form a one-time pad that will sufficiently hide the pad's source?
What other issues would such a scheme be running into?
Disclaimer: I am not an expert cryptographer and am just interested ... | 2014/01/06 | [
"https://crypto.stackexchange.com/questions/12744",
"https://crypto.stackexchange.com",
"https://crypto.stackexchange.com/users/1653/"
] | What you've described is generally called a "book cipher" or "Ottendorf cipher", where the "key" is knowing which publication is being referenced, as well as the algorithm for recovering information from it.
A hundred years ago they were quite secure because not only were books fairly rare, but trying every book agai... | I agree with [John Deter's answer](https://crypto.stackexchange.com/a/12746/12164). If you attempt to access some website to get some public information from it, then your favourite intelligence agency is going to have a record of that due to their extensive spy network which has taps on every internet backbone. If two... |
29,565,670 | I'm working on a project that allows a user to create a company. If a user creates a company, the user will be the admin.
However I would also like that user to then be able to invite users to sign up. So that all the users will belong to that company.
So my question is that the company would technically I guess bel... | 2015/04/10 | [
"https://Stackoverflow.com/questions/29565670",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3826844/"
] | Try looking further up your stack trace too. I got this error due to a misconfigured logger but I had to look further up the trace to find this issue!
In my case I had misnamed my environment variable `DJANGO_LOG_LEVL` as `DEGUB` instead of `DEBUG` (note the misspelling) and that caused the error. | Had troubles with this too, all I did was upgrade pip and it seemed to fix itself tried installing other dependencies but turned out I already had them all so if you are in the same position try upgrading your pip! |
10,533,742 | I have created a block which contains a link to another page. The block is in the footer on all pages.
```
<a href="terms_and_conditions">Terms and Conditions</a>
```
This works fine on pages with URLs of...
```
http://mywebs.localhost/site1/page1
```
The link correctly resolves to:
```
http://mywebs.localhost/s... | 2012/05/10 | [
"https://Stackoverflow.com/questions/10533742",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/612091/"
] | why not just `<a href="/terms_and_conditions">Terms and Conditions</a>` ? Try to put trailing slash before your path.
Just read a comment, sorry, i see other way with allowing PHP input
`<?php print l('Terms and Conditions', 'terms_and_conditions'); ?>`
But, without php input you can use a <http://drupal.org/proje... | You should use [url()](http://api.drupal.org/api/drupal/includes!common.inc/function/url/6) function or [$base\_url](http://api.drupal.org/api/drupal/developer!globals.php/global/base_url/6) for generating the link
```
<a href="<?php echo url('terms_and_conditions'); ?>">Terms and Conditions</a>
```
or
```
<a href=... |
63,237,081 | I try to launch a basic `npm start` to develop my reactnative project and I face the following report :
>
> ERROR: Node.js v13.13.0 is no longer supported.
>
>
> expo-cli supports following Node.js versions:
>
>
> * =>10.13.0 <11.0.0 (Maintenance LTS)
> * =>12.13.0 <13.0.0 (Active LTS)
> * =>14.0.0 <15.0.0 (Curre... | 2020/08/03 | [
"https://Stackoverflow.com/questions/63237081",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/14044416/"
] | ```
.container *:not([class^="mat"]) {
background: red;
}
```
That's the code you might be searching for.
`[class^="mat"]` will match to any element which has a class starting with `mat`.
`[class*="mat"]` will match to any element having `mat` anywhere in the class name.
Use either of them according to your si... | Well, what you want is a really really bad way to workaround things since it makes your stylings hard to maintain and may lead to unexpected issues, but hey, you can use this css to set `box-sizing` property to all elements except the ones starts with `mat-`.
```
.container *:not([class^="mat-"]) {
box-sizing: borde... |
6,497 | Personally, I don't like them. But maybe this is beyond the point.
Were we consulted about this? | 2016/01/18 | [
"https://tex.meta.stackexchange.com/questions/6497",
"https://tex.meta.stackexchange.com",
"https://tex.meta.stackexchange.com/users/3094/"
] | We tracked down the bug. The Tex community has a few special classes for text formatting and those happened to conflict with a recent mixin that was added to a global file. The change was unintentional and an update is rolling out soon. Thanks for the catch and your patience. | There's a difference in the colour of the tags. Here's a screen grab from the "legend" on the [tags page](https://tex.meta.stackexchange.com/tags):
[](https://i.stack.imgur.com/SEVcQ.png)
* `{required-tag}` has RGB = (68,68,68)
* `{tag}` has RGB = (8... |
2,200,102 | So given the following java class:
```
class Outer
{
private int x;
public Outer(int x) { this.x = x; }
public class Inner
{
private int y;
public Inner(int y) { this.y = y; }
public int sum() { return x + y; }
}
}
```
I can create an instance of the inner class from Java in the following manne... | 2010/02/04 | [
"https://Stackoverflow.com/questions/2200102",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/9859/"
] | ```
i = Outer::Inner.new(o,2)
``` | From what can be seen in [this discussion](http://markmail.org/message/go53w4hge4gczjji), you'll have to do `Outer:Inner.new(o, 2)` |
32,112,310 | ```
$this->Auth->user ( 'username' );
```
is working perfectly fine in controller but I want to check whether any user is logged in or not in default.ctp file using
```
$this->Auth->user ();
```
How can I achieve that? | 2015/08/20 | [
"https://Stackoverflow.com/questions/32112310",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5246416/"
] | try:
```
$this->request->session()->read('Auth.User');
``` | While it is possible to check for an authenticated user in your view using arilia method, you should do it in your controller and then send it to the view. One easy way is the following (in your AppController):
```
public function beforeRender (Cake\Event\Event $event) {
$this->set('isAuthenticatedUser', (bool) $t... |
61,499 | I usually burn dried coconut husk and thorny stems from my lemon plants and I winder if the ash produced from burning such stems and leaves or paper can be a good way to fertilize plants? Or I need to mix it with compost? How or what do I do with that ash? | 2021/11/22 | [
"https://gardening.stackexchange.com/questions/61499",
"https://gardening.stackexchange.com",
"https://gardening.stackexchange.com/users/14009/"
] | Wood ash traditionally has a small amount of potassium, like a per-cent. It depends on the wood. So if mixed with compost, it will add a trace of potassium (K). I have read that potassium from wood ash was used to make soap; the difference is that for soap making, the potassium is leached (dissolved) out of a "large" a... | "Wood ash is a source of potassium(K). But it (K) is easily washed away by water so if it has rained after the fire went out the potassium is gone." - a local gardening book in Bulgarian
"Wood ash is a strong source of carbon for a compost pile. If your compost pile is mostly greens - grass, manure, kitchen scraps - a... |
459 | I have one habit. Every time I stumble upon a good site, I bookmark it and search it on the Twitter. As I joined SuperUser. I searched for "superuser" on Twitter to follow it. But the search yielded nothing, so I want to ask **why isn't SuperUser on Twitter?** If it's there, then what is its user name?
I am really loo... | 2009/08/18 | [
"https://meta.superuser.com/questions/459",
"https://meta.superuser.com",
"https://meta.superuser.com/users/-1/"
] | We have many sites on twitter now.
<http://blog.stackoverflow.com/2011/01/twitter-question-feeds-for-stack-exchange/>
Oddly enough "@superuser" is some kind of reserved username on Twitter, and we still haven't been able to figure out why. | I don't know why some of you are in denial of the usefulness of Twitter.
There is no harm putting such a wonderful site on Twitter.
After all social networking is good for any site and its followers. |
42,344,356 | I just came across the same combination: Fabric.js and Vue.js and was wondering, but I'm working with VueJs few days and I don't know how to set up fabric in vue.
Can you share some experience for me? | 2017/02/20 | [
"https://Stackoverflow.com/questions/42344356",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/7587852/"
] | **Install Fabric**
```sh
yarn add fabric # or npm install -s fabric
```
**Basic component** (based on @laverick's answer):
```html
<template>
<canvas ref="can" width="200" height="200"></canvas>
</template>
<script>
import { fabric } from 'fabric';
export default {
mounted() {
const ref = this.$refs.can;
... | Fabric follows a pretty traditional distribution layout.
You want to use files from the `dist` directory. `fabric.js` for development work and `fabric.min.js` for the live site. |
3,683,681 | The points of the function graph are known. Need to find function formula.
All known points:
A(2, 70);
B(3, 66.5);
C(4, 63.0);
D(5, 59.5);
E(6, 56.0);
F(7, 52.5);
G(8, 49.0);
H(9, 45.5);
I(10, 42.0);
J(11, 38.5);
K(12, 35.0);
L(13, 31.5);
M(14, 28.0);
N(15, 24.5);
O(16, 21.0);
P(17, 17.5);
Q(18, 14.0)... | 2020/05/20 | [
"https://math.stackexchange.com/questions/3683681",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/790675/"
] | Hint: it's a straight line of the form
$$
f(x) = kx+b
$$
for some $k,b \in \mathbb{R}$. You can take any two points and solve for the coefficients $a$ and $b$, and you're done. Apparently you already found the value of $k$ ... | You need to know more about the function (is it a polynomial, is it monotonic, etc.) because otherwise there are infinitely many functions that pass those points and there is no single answer to your question. Effectively, any graph you draw that connects the points will be a function provided no $x$ value corresponds ... |
11,061,188 | I'm building a web site for marketing company. As per their requirement, when a customer makes a booking. A certain amount of bonus is distributed between employees based on
their hierarchy. The distribution starts from 60 days after booking and bonus is given
for 24 months.
The tables are
>
> bookings
>
>
>
``... | 2012/06/16 | [
"https://Stackoverflow.com/questions/11061188",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1460163/"
] | ```
double x, y;
```
Declares two local, class variables that make up the class.
```
PT() {}
```
Default constructor. Allows you to create a PT without any arguments.
e.g. --> `PT myObj;`
```
PT(double x, double y) : x(x), y(y) {}
```
Constructor to create a point from two doubles.
e.g. --> `PT myOb... | Lines 4 & 5 are **constructors**, and the syntax `x(x)` highlights an idiomatic way to invoke constructor of the member variables (pass down, to say).
Note that is *not* required a different identifier for a formal parameter. Assign from inside the body of the constructor would require a different naming, because a fo... |
45,179,108 | I have created a small application locally on my machine using HTML, CSS and JavaScript. I am using a plugin to run the JavaScript on the site. My small application loads different pictures from drop down lists and uses a SendMail JavaScript function as well. How can I add this page as one of my WordPress pages? I used... | 2017/07/19 | [
"https://Stackoverflow.com/questions/45179108",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5790896/"
] | Another solution:
```
<input type="file" @change="previewFiles" multiple>
methods: {
previewFiles(event) {
console.log(event.target.files);
}
}
``` | Try this.
```
<input type="file" id="file" ref="myFiles" class="custom-file-input"
@change="previewFiles" multiple>
```
and in your component options:
```
data() {
return {
files: [],
}
},
methods: {
previewFiles() {
this.files = this.$refs.myFiles.files
}
}
``` |
29,222,876 | I am trying to create a new NSTimer object to simply increment my counter by 1sec (To calculate the lifetime of my game) now I've seen demos and examples on how to go about this, and have done the same thing but the project continues to fail. Any suggestions to there?
This is the error message :
unrecognized selecto... | 2015/03/24 | [
"https://Stackoverflow.com/questions/29222876",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4413707/"
] | thank you so much for your answer **@kaho**, it helped me alot (even you calculated the distanceWidth and distanceHeight in the same way).
Clarification:
* **farLeft** LatLng object that defines the **top left corner** of the camera.
* **farRight** LatLng object that defines the **top right corner** of the camera.
* ... | edit: The following answer is for Google Maps JavaScript API v3
=-=-=-=-=-=-=
I think the answer would be: Yes, you can.
According to the [documentation](https://developers.google.com/maps/documentation/javascript/geometry#Distance), you can calculate distance between 2 points by: `computeDistanceBetween(LatLngFrom,... |
8,913,671 | I'm printing out a table with line totals but I also want to get the grand total of the columns. This following code doesn't work, instead of the grand totals it just prints out the values of the last iteration.
```
<% @shipments.each do |shipment| %>
<tr>
<td style="text-align:center;"><%= shipment.file_number ... | 2012/01/18 | [
"https://Stackoverflow.com/questions/8913671",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/912895/"
] | The reason your code isn't working is that your variables are defined in the block, so they're considered block-local variables. Once the block is exited those variables are marked to be cleared; each iteration re-defines those variables. It also doesn't help that you're reassigning them to 0 on each iteration, but tha... | You set the grand total to zero every time through the loop. move the initialization up before the loop. |
14,845,177 | HTTPS Displays on Chrome but not Safari unless I click on another page, and then click back. Then https displays, and I can click it and view the certificate. I installed both the the Webserver Certification and the Intermediate file. Has anyone experienced this problem, and if so, how did you fix it? | 2013/02/13 | [
"https://Stackoverflow.com/questions/14845177",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1636510/"
] | Probably you have some external resource (img, scripts, etc) loaded through plain http. To check try with Chrome or Firefox.
Chrome display a valid green lock on the navbar but on the right side you can see an icon of a shield if there are some resources loaded from an insecure source.
(Firefox display a grey world in... | I had the same problem, and fixed it by switching the user agent in the safari menu: Development-User Agent. You may choose any other UA, and for me , the site suddenly displays https. and after I change the UA to general version, it works fine. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.