qid
int64
1
74.7M
question
stringlengths
0
58.3k
date
stringlengths
10
10
metadata
list
response_j
stringlengths
2
48.3k
response_k
stringlengths
2
40.5k
20,810,210
Consider the following class: ``` public class MyClass { private MyObject obj; public MyClass() { obj = new MyObject(); } public void methodCalledByOtherThreads() { obj.doStuff(); } } ``` Since obj was created on one thread and accessed from another, could obj be null wh...
2013/12/28
[ "https://Stackoverflow.com/questions/20810210", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2605245/" ]
For the `methodCalledByOtherThreads` to be called by another thread and cause problems, that thread would have to get a reference to a `MyClass` object whose `obj` field is not initialized, ie. where the constructor has not yet returned. This would be possible if you leaked the `this` reference from the constructor. F...
This class (if taken as is) is NOT thread safe. In two words: there is reordering of instructions in java ([Instruction reordering & happens-before relationship in java](https://stackoverflow.com/questions/16213443/instruction-reordering-happens-before-relationship-in-java)) and when in your code you're instantiating M...
20,810,210
Consider the following class: ``` public class MyClass { private MyObject obj; public MyClass() { obj = new MyObject(); } public void methodCalledByOtherThreads() { obj.doStuff(); } } ``` Since obj was created on one thread and accessed from another, could obj be null wh...
2013/12/28
[ "https://Stackoverflow.com/questions/20810210", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2605245/" ]
It depends on whether the reference is published "unsafely". A reference is "published" by being written to a shared variable; another thread reads the variable to get the reference. If there is no relationship of `happens-before(write, read)`, the publication is called unsafe. An example of unsafe publication is throu...
This class (if taken as is) is NOT thread safe. In two words: there is reordering of instructions in java ([Instruction reordering & happens-before relationship in java](https://stackoverflow.com/questions/16213443/instruction-reordering-happens-before-relationship-in-java)) and when in your code you're instantiating M...
20,810,210
Consider the following class: ``` public class MyClass { private MyObject obj; public MyClass() { obj = new MyObject(); } public void methodCalledByOtherThreads() { obj.doStuff(); } } ``` Since obj was created on one thread and accessed from another, could obj be null wh...
2013/12/28
[ "https://Stackoverflow.com/questions/20810210", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2605245/" ]
For the `methodCalledByOtherThreads` to be called by another thread and cause problems, that thread would have to get a reference to a `MyClass` object whose `obj` field is not initialized, ie. where the constructor has not yet returned. This would be possible if you leaked the `this` reference from the constructor. F...
It depends on whether the reference is published "unsafely". A reference is "published" by being written to a shared variable; another thread reads the variable to get the reference. If there is no relationship of `happens-before(write, read)`, the publication is called unsafe. An example of unsafe publication is throu...
20,810,210
Consider the following class: ``` public class MyClass { private MyObject obj; public MyClass() { obj = new MyObject(); } public void methodCalledByOtherThreads() { obj.doStuff(); } } ``` Since obj was created on one thread and accessed from another, could obj be null wh...
2013/12/28
[ "https://Stackoverflow.com/questions/20810210", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2605245/" ]
Your other thread **could** see a null object. A volatile object could possibly help, but an explicit lock mechanism (or a Builder) would likely be a better solution. Have a look at [Java Concurrency in Practice - Sample 14.12](https://stackoverflow.com/questions/10528572/java-concurrency-in-practice-sample-14-12)
The originally picked answer by @Sotirios Delimanolis is wrong. @ZhongYu 's answer is correct. There is the visibility issue of the concern here. So if MyClass is published unsafely, anything could happen. Someone in the comment asked for evidence - one can check Listing 3.15 in the book *Java Concurrency in Practice...
29,317
I have two network interfaces (one wired & one wireless). I have two internet accounts too (each 256 kBps; one from a modem that I use as wired connection & the other from a wireless network). Is it possible to connect to both networks and merge them and get twice the speed (512 kBps)? How? I'm using Ubuntu 10....
2012/01/17
[ "https://unix.stackexchange.com/questions/29317", "https://unix.stackexchange.com", "https://unix.stackexchange.com/users/11920/" ]
This is definitely feasible. Many of us were running mixed, load-balanced broadband configs for corporate years ago and they worked really well. Many probably still do! You can do it in a number of ways, including using `iptables` rules and/or `iproute2` (`ip(8)` command) to setup policy routing. The load balancing i...
Propably yes. My rough idea is to implement an outgoing load-balancer (via LVS) using a virtual IP that you could use as default-gateway. It is propably much more complicated than that and might involve putting up squid or something alike.
50,717,476
Fiddle: <http://sqlfiddle.com/#!18/5d05a/3> I have tables: ``` CREATE TABLE Table1( Date Date, Figure int ); INSERT INTO Table1 (Date, Figure) VALUES ('06-06-18','25'), ('05-12-18','30'), ('05-27-17','30'); ``` I am using this query to return the previous months data ``` DECLARE @PrevMonth int = MONTH(getdate()) ...
2018/06/06
[ "https://Stackoverflow.com/questions/50717476", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8412784/" ]
Querying the month and year parts of a query is a great way to slow it down. You're far better off with the date manipulation on the input parameter (in this case `GETDATE()`) not the column: ``` SELECT * FROM Table1 WHERE [Date] >= DATEADD(MONTH, DATEDIFF(MONTH, 0, GETDATE())-1,0) AND [date] < DATEADD(MONTH, DATEDI...
Don't use functions on your table's columnns (it makes them non-SARGable and can't use indexes properly). You can use a good date filter instead. ``` DECLARE @StartDate DATE = DATEADD(DAY, 1,EOMONTH(GETDATE(), - 2)) DECLARE @EndDate DATE = DATEADD(DAY, 1,EOMONTH(GETDATE(), -1)) SELECT Figure FROM Table1 WHERE [Date] ...
14,320,215
I was wondering if there is a way to create a black transparent overlay to basically cover the entire contents of the webpage? ``` <body> <div class="main-container"> <!--many more divs here to create webpage--> </div> </body> ```
2013/01/14
[ "https://Stackoverflow.com/questions/14320215", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1316524/" ]
use this css on a div to create a black transparent overlay: ``` #overlay { width: 100%; height: 100%; background: rgba(0,0,0,0.6); position: fixed; top:0; left: 0; } ```
This might be what you are looking for: <http://malsup.com/jquery/block/>
14,320,215
I was wondering if there is a way to create a black transparent overlay to basically cover the entire contents of the webpage? ``` <body> <div class="main-container"> <!--many more divs here to create webpage--> </div> </body> ```
2013/01/14
[ "https://Stackoverflow.com/questions/14320215", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1316524/" ]
use this css on a div to create a black transparent overlay: ``` #overlay { width: 100%; height: 100%; background: rgba(0,0,0,0.6); position: fixed; top:0; left: 0; } ```
The very basic overlay can be made using position absolute: ``` .overlay { position: absolute; top: 0; left: 0; right: 0; bottom: 0; opacity: .6; background-color: #000; } ``` <http://jsfiddle.net/dfsq/4Mn7Q/> UPD. As GSP pointed in comment this is not optimal solution when window height...
14,320,215
I was wondering if there is a way to create a black transparent overlay to basically cover the entire contents of the webpage? ``` <body> <div class="main-container"> <!--many more divs here to create webpage--> </div> </body> ```
2013/01/14
[ "https://Stackoverflow.com/questions/14320215", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1316524/" ]
The very basic overlay can be made using position absolute: ``` .overlay { position: absolute; top: 0; left: 0; right: 0; bottom: 0; opacity: .6; background-color: #000; } ``` <http://jsfiddle.net/dfsq/4Mn7Q/> UPD. As GSP pointed in comment this is not optimal solution when window height...
This might be what you are looking for: <http://malsup.com/jquery/block/>
2,349,006
$A$ be $3\times3$ matrix with $\operatorname{trace}(A)=3$ and $\det(A)=2$. If $1$ is an eigenvalue of $A$ find eigenvalues for matrix $A^2-2I$? In this question I got eigenvalues of $A=1,1+i,1-i$ . I was thinking to change $\lambda$ to $\lambda^2-2$ in characteristic equation of $A$ to get eigenvalues of required matr...
2017/07/06
[ "https://math.stackexchange.com/questions/2349006", "https://math.stackexchange.com", "https://math.stackexchange.com/users/453977/" ]
If $p(x)$ is a polynomial, the eigenvalues of $p(A)$ are the numbers $p(\lambda)$ for each eigenvalue $\lambda$ of $A$. What you are doing is instead taking the polynomial $f(p(x))$ where $f(x)$ is the characteristic polynomial of $A$, which is a totally different operation. The roots of $f(p(x))$ are numbers $a$ such ...
$A = P\pmatrix {1\\&1+i\\&&1-i}P^{-1}\\ A^2 = PDP^{-1}PDP^{-1} = PD^2P^{-1} = P\pmatrix {1\\&2i\\&&-2i}P^{-1}\\ A^2-2I = PD^2P^{-1} - 2PIP^{-1} = P(D^2-2I)P^{-1}\\ A^2-2I = P\pmatrix {-1\\&-2+2i\\&&-2-2i}P^{-1}$
38,014,675
I'm trying to modify a minecraft mod (gravisuite) that puts "Gravitation Engine OFF/ON" whenever I press F, however I want to change this string, I started with replacing "Gravitation Engine OFF" with "Gravitation Engine Turned OFF" by using a hex editor but the file was no longer valid afterwards :/ I tried to use too...
2016/06/24
[ "https://Stackoverflow.com/questions/38014675", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4931748/" ]
I compiled the same class twice with a minor tweak, firstly with "foo" and then with "foo-bar" ``` public class HelloWorld { public static final String HELLO = "foo-bar"; } ``` With "foo" ``` 000000b0 74 01 00 **03** 66 6f 6f 00 21 00 02 00 03 00 00 00 |t...foo.!.......| 000000c0 01 00 19 00 04 00 05 00 01 ...
A jar file is a zip file of classes, I guess you've figured that out already. Your best best is to load up a a java IDE with a decompiler addon (pretty sure Intellij has this built in). Once you've decompiled you can change the generated source and recompile it. This isn't trivial java stuff, but it's not so complicat...
38,014,675
I'm trying to modify a minecraft mod (gravisuite) that puts "Gravitation Engine OFF/ON" whenever I press F, however I want to change this string, I started with replacing "Gravitation Engine OFF" with "Gravitation Engine Turned OFF" by using a hex editor but the file was no longer valid afterwards :/ I tried to use too...
2016/06/24
[ "https://Stackoverflow.com/questions/38014675", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4931748/" ]
I compiled the same class twice with a minor tweak, firstly with "foo" and then with "foo-bar" ``` public class HelloWorld { public static final String HELLO = "foo-bar"; } ``` With "foo" ``` 000000b0 74 01 00 **03** 66 6f 6f 00 21 00 02 00 03 00 00 00 |t...foo.!.......| 000000c0 01 00 19 00 04 00 05 00 01 ...
There are checksums for the files: ``` Archive: dvt-utils.jar Length Method Size Ratio Date Time CRC-32 Name -------- ------ ------- ----- ---- ---- ------ ---- 332 Defl:N 226 32% 11.05.31 19:41 a745ad09 META-INF/MANIFEST.MF ```
38,014,675
I'm trying to modify a minecraft mod (gravisuite) that puts "Gravitation Engine OFF/ON" whenever I press F, however I want to change this string, I started with replacing "Gravitation Engine OFF" with "Gravitation Engine Turned OFF" by using a hex editor but the file was no longer valid afterwards :/ I tried to use too...
2016/06/24
[ "https://Stackoverflow.com/questions/38014675", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4931748/" ]
You could have a look at the [Apache BCEL (ByteCode Engineering Library)](https://commons.apache.org/proper/commons-bcel/). It contains a remarkably powerful class called [`BCELifier`](https://commons.apache.org/proper/commons-bcel/apidocs/org/apache/bcel/util/BCELifier.html). It is a class that can take an input class...
A jar file is a zip file of classes, I guess you've figured that out already. Your best best is to load up a a java IDE with a decompiler addon (pretty sure Intellij has this built in). Once you've decompiled you can change the generated source and recompile it. This isn't trivial java stuff, but it's not so complicat...
38,014,675
I'm trying to modify a minecraft mod (gravisuite) that puts "Gravitation Engine OFF/ON" whenever I press F, however I want to change this string, I started with replacing "Gravitation Engine OFF" with "Gravitation Engine Turned OFF" by using a hex editor but the file was no longer valid afterwards :/ I tried to use too...
2016/06/24
[ "https://Stackoverflow.com/questions/38014675", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4931748/" ]
You could have a look at the [Apache BCEL (ByteCode Engineering Library)](https://commons.apache.org/proper/commons-bcel/). It contains a remarkably powerful class called [`BCELifier`](https://commons.apache.org/proper/commons-bcel/apidocs/org/apache/bcel/util/BCELifier.html). It is a class that can take an input class...
There are checksums for the files: ``` Archive: dvt-utils.jar Length Method Size Ratio Date Time CRC-32 Name -------- ------ ------- ----- ---- ---- ------ ---- 332 Defl:N 226 32% 11.05.31 19:41 a745ad09 META-INF/MANIFEST.MF ```
644,043
I was sifting through some stuff I got from a friend whose uncle was a professor of electrical engineering and found a few of these 2.54 mm pitch prototyping cables (commonly known as 'Dupont' cables) which are female-to-female but have a removable male pin. I've looked for variations of the cable name with the word '...
2022/11/26
[ "https://electronics.stackexchange.com/questions/644043", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/10065/" ]
I believe this is a female single-pin connector along with a single 25 mil square pin, probably taken out of a pin header like this one: [![enter image description here](https://i.stack.imgur.com/RDACD.png)](https://i.stack.imgur.com/RDACD.png) ([image source](https://www.digikey.com/en/products/detail/harwin-inc/M20...
I suspect that the pin has broken off the rest of the contact inside the housing - I haven't seen that sort of contact with an intentionally-removable pin. The contacts for those plastic housings should be readily available from anyone selling the housings. There will be both male and female insertable contacts - you ...
38,714,238
As a part of learning process, I am roaming around angular js routing concepts. For this, I created one inner folder inside app with two sample test html pages .. When i run the app it should load first page from that folder but it does not not happening .. I am not sure where i have done wrong in this code... I am ...
2016/08/02
[ "https://Stackoverflow.com/questions/38714238", "https://Stackoverflow.com", "https://Stackoverflow.com/users/899271/" ]
`BrowserDomAdapter` is not supposed to be used. It's for Angular internal use only. I assume you want to query elements passed as children because you use `ngAfterContentInit`: ```ts @Component({ ... template: ` ... <div #wrapper> <ng-content></ng-content> </div> ... ` }) export class MyComponent { ...
> > this.containerBlock.nativeElement.getElementsByTagName("img") > > > Where containerBlock is template reference. This will return all the img tag inside div with template reference containerBlock.
1,435,766
Here is a particular scenario that I have been unclear about (in terms of scope) for a long time. consider the code ``` #include <stdio.h> typedef struct _t_t{ int x; int y; } t_t; typedef struct _s_t{ int a; int b; t_t t; }s_t; void test(s_t & s){ t_t x = {502, 100}; s.t = x; } int ma...
2009/09/16
[ "https://Stackoverflow.com/questions/1435766", "https://Stackoverflow.com", "https://Stackoverflow.com/users/177931/" ]
> > Is it because the "=" on the line s.t = x; copies the values of x into s.t? > > > Yes. By the way, this is C++. You've passed the "s" local to main as a reference to the function, which modifies it. Because it's a reference, and not a copy, it affects the caller's "s".
You're right, the line ``` s.t = x; ``` will copy the values over.
1,435,766
Here is a particular scenario that I have been unclear about (in terms of scope) for a long time. consider the code ``` #include <stdio.h> typedef struct _t_t{ int x; int y; } t_t; typedef struct _s_t{ int a; int b; t_t t; }s_t; void test(s_t & s){ t_t x = {502, 100}; s.t = x; } int ma...
2009/09/16
[ "https://Stackoverflow.com/questions/1435766", "https://Stackoverflow.com", "https://Stackoverflow.com/users/177931/" ]
> > Is it because the "=" on the line s.t = x; copies the values of x into s.t? > > > Yes. By the way, this is C++. You've passed the "s" local to main as a reference to the function, which modifies it. Because it's a reference, and not a copy, it affects the caller's "s".
> > > ``` > t_t x = {502, 100}; > s.t = x; > > ``` > > **In your first test**, you're instructing the compiler to *copy* the value of `x` into `s.t` - this works as expected. The local variable `x` goes out of scope, but is never referenced outside of the function - the data it initially contained is copied...
1,435,766
Here is a particular scenario that I have been unclear about (in terms of scope) for a long time. consider the code ``` #include <stdio.h> typedef struct _t_t{ int x; int y; } t_t; typedef struct _s_t{ int a; int b; t_t t; }s_t; void test(s_t & s){ t_t x = {502, 100}; s.t = x; } int ma...
2009/09/16
[ "https://Stackoverflow.com/questions/1435766", "https://Stackoverflow.com", "https://Stackoverflow.com/users/177931/" ]
> > Is it because the "=" on the line s.t = x; copies the values of x into s.t? > > > Yes. By the way, this is C++. You've passed the "s" local to main as a reference to the function, which modifies it. Because it's a reference, and not a copy, it affects the caller's "s".
Read This : [Default copy-constructors and assignment operators](http://www.uow.edu.au/~lukes/TEXTBOOK/notes-cpp/oop-condestructors/copyconstructors.html) By not providing an assignment operator, the struct \_s\_t will do a shallow-copy of all its members when it is assigned. Because you are storing everything in \_t\...
1,435,766
Here is a particular scenario that I have been unclear about (in terms of scope) for a long time. consider the code ``` #include <stdio.h> typedef struct _t_t{ int x; int y; } t_t; typedef struct _s_t{ int a; int b; t_t t; }s_t; void test(s_t & s){ t_t x = {502, 100}; s.t = x; } int ma...
2009/09/16
[ "https://Stackoverflow.com/questions/1435766", "https://Stackoverflow.com", "https://Stackoverflow.com/users/177931/" ]
> > Is it because the "=" on the line s.t = x; copies the values of x into s.t? > > > Yes. By the way, this is C++. You've passed the "s" local to main as a reference to the function, which modifies it. Because it's a reference, and not a copy, it affects the caller's "s".
An asignment copies the value from one variable into another variable. So although the original local x is gone, you've got a copy in s. It would be quite different when you've just assigned a pointer to x: ``` typedef struct _s_t{ int a; int b; t_t* t; }s_t; void test(s_t & s){ t_t x...
1,435,766
Here is a particular scenario that I have been unclear about (in terms of scope) for a long time. consider the code ``` #include <stdio.h> typedef struct _t_t{ int x; int y; } t_t; typedef struct _s_t{ int a; int b; t_t t; }s_t; void test(s_t & s){ t_t x = {502, 100}; s.t = x; } int ma...
2009/09/16
[ "https://Stackoverflow.com/questions/1435766", "https://Stackoverflow.com", "https://Stackoverflow.com/users/177931/" ]
> > > ``` > t_t x = {502, 100}; > s.t = x; > > ``` > > **In your first test**, you're instructing the compiler to *copy* the value of `x` into `s.t` - this works as expected. The local variable `x` goes out of scope, but is never referenced outside of the function - the data it initially contained is copied...
You're right, the line ``` s.t = x; ``` will copy the values over.
1,435,766
Here is a particular scenario that I have been unclear about (in terms of scope) for a long time. consider the code ``` #include <stdio.h> typedef struct _t_t{ int x; int y; } t_t; typedef struct _s_t{ int a; int b; t_t t; }s_t; void test(s_t & s){ t_t x = {502, 100}; s.t = x; } int ma...
2009/09/16
[ "https://Stackoverflow.com/questions/1435766", "https://Stackoverflow.com", "https://Stackoverflow.com/users/177931/" ]
Read This : [Default copy-constructors and assignment operators](http://www.uow.edu.au/~lukes/TEXTBOOK/notes-cpp/oop-condestructors/copyconstructors.html) By not providing an assignment operator, the struct \_s\_t will do a shallow-copy of all its members when it is assigned. Because you are storing everything in \_t\...
You're right, the line ``` s.t = x; ``` will copy the values over.
1,435,766
Here is a particular scenario that I have been unclear about (in terms of scope) for a long time. consider the code ``` #include <stdio.h> typedef struct _t_t{ int x; int y; } t_t; typedef struct _s_t{ int a; int b; t_t t; }s_t; void test(s_t & s){ t_t x = {502, 100}; s.t = x; } int ma...
2009/09/16
[ "https://Stackoverflow.com/questions/1435766", "https://Stackoverflow.com", "https://Stackoverflow.com/users/177931/" ]
> > > ``` > t_t x = {502, 100}; > s.t = x; > > ``` > > **In your first test**, you're instructing the compiler to *copy* the value of `x` into `s.t` - this works as expected. The local variable `x` goes out of scope, but is never referenced outside of the function - the data it initially contained is copied...
Read This : [Default copy-constructors and assignment operators](http://www.uow.edu.au/~lukes/TEXTBOOK/notes-cpp/oop-condestructors/copyconstructors.html) By not providing an assignment operator, the struct \_s\_t will do a shallow-copy of all its members when it is assigned. Because you are storing everything in \_t\...
1,435,766
Here is a particular scenario that I have been unclear about (in terms of scope) for a long time. consider the code ``` #include <stdio.h> typedef struct _t_t{ int x; int y; } t_t; typedef struct _s_t{ int a; int b; t_t t; }s_t; void test(s_t & s){ t_t x = {502, 100}; s.t = x; } int ma...
2009/09/16
[ "https://Stackoverflow.com/questions/1435766", "https://Stackoverflow.com", "https://Stackoverflow.com/users/177931/" ]
> > > ``` > t_t x = {502, 100}; > s.t = x; > > ``` > > **In your first test**, you're instructing the compiler to *copy* the value of `x` into `s.t` - this works as expected. The local variable `x` goes out of scope, but is never referenced outside of the function - the data it initially contained is copied...
An asignment copies the value from one variable into another variable. So although the original local x is gone, you've got a copy in s. It would be quite different when you've just assigned a pointer to x: ``` typedef struct _s_t{ int a; int b; t_t* t; }s_t; void test(s_t & s){ t_t x...
1,435,766
Here is a particular scenario that I have been unclear about (in terms of scope) for a long time. consider the code ``` #include <stdio.h> typedef struct _t_t{ int x; int y; } t_t; typedef struct _s_t{ int a; int b; t_t t; }s_t; void test(s_t & s){ t_t x = {502, 100}; s.t = x; } int ma...
2009/09/16
[ "https://Stackoverflow.com/questions/1435766", "https://Stackoverflow.com", "https://Stackoverflow.com/users/177931/" ]
Read This : [Default copy-constructors and assignment operators](http://www.uow.edu.au/~lukes/TEXTBOOK/notes-cpp/oop-condestructors/copyconstructors.html) By not providing an assignment operator, the struct \_s\_t will do a shallow-copy of all its members when it is assigned. Because you are storing everything in \_t\...
An asignment copies the value from one variable into another variable. So although the original local x is gone, you've got a copy in s. It would be quite different when you've just assigned a pointer to x: ``` typedef struct _s_t{ int a; int b; t_t* t; }s_t; void test(s_t & s){ t_t x...
24,208,909
I have a runtime error that is happening at this line of code: ``` _searchresults = [_beerNames filteredArrayUsingPredicate:resultPredicate]; ``` serchresuls is a NSArray (nil objects) beerNames is a NSArray M (196 objects) and result predicate is a NScomparison predicate and I don't really understand what that mean...
2014/06/13
[ "https://Stackoverflow.com/questions/24208909", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3307446/" ]
In order to turn on numbered-sections in latex output you need to use `numbersections` in your YAML block. If you ever want to "discover" things like this with pandoc just poke around the templates: ``` $ grep -i number default.latex $if(numbersections)$ $ grep -i number default.html* $ ``` As you can see this o...
In order to show section number in the produced output pdf, there are two choices. ### In YAML front matter Add the following setting to begin of markdown file ``` --- numbersections: true --- ``` ### In command line We can also use the command option to generate pdf with numbered section. According to [Pandoc do...
21,049,090
I just installed Git + TortoiseGit, created a new local repository on my PC, added a file, and now I'm trying to commit it (I guess that's Commit -> "master"). However it says: "User name and email must be set before commit. Do you want to set these now?" Ehh, this is supposed to be a local repository. What does any ...
2014/01/10
[ "https://Stackoverflow.com/questions/21049090", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1072269/" ]
The name and email are added to the commit by Git. It's not related to login credentials. It's useful to set at least the name, even if you don't want to set your email. If you want to leave them blank then you can enter these commands in a terminal: ``` git config --global user.name "" git config --global user.email...
In Git both a username and a mail address are associated to each commit, even for local repositories (In fact, in Git, all repositories are arguably local). It is, however, simply used as a label. It won't send you any mail. If you are concerned with your privacy, or you simply don't want to write your real e-mail fo...
29,682,561
I have an app in which markers can be added to the map using the Google Maps API, I'm trying to send a notification to all devices with the app installed when a new marker is added, this works for the device that is currently using the app but not my other device which does not have the app loaded, is there something e...
2015/04/16
[ "https://Stackoverflow.com/questions/29682561", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2757842/" ]
First you will need a Push service to warn other devices of your new marker, then you will need a BroadCastReceiver to receive the push message and emit the Notification on all devices that received it, I would love to explain this and write some example code for you but its widely explained in Android Docus so why rei...
I think you are not grasping how the two notifications type functions. The way you would do this is by storing on your server the device id of all your users that have requested to receive the notifications. Then you initiate the notification for all devices from the server not from the app. Notification initiated from...
29,682,561
I have an app in which markers can be added to the map using the Google Maps API, I'm trying to send a notification to all devices with the app installed when a new marker is added, this works for the device that is currently using the app but not my other device which does not have the app loaded, is there something e...
2015/04/16
[ "https://Stackoverflow.com/questions/29682561", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2757842/" ]
First you will need a Push service to warn other devices of your new marker, then you will need a BroadCastReceiver to receive the push message and emit the Notification on all devices that received it, I would love to explain this and write some example code for you but its widely explained in Android Docus so why rei...
What you need is some kind of support for push notifications, an obvious choice for Android is Google Cloud Messaging (GCM). Since you have a server available, you could tailor the server-side yourself for managing which devices that receive the notifications (plenty of tutorials out there). If you are in a hurry a...
5,400,733
I've been building a static library to share between multiple iOS projects, and I want to use gcov (or any code coverage analysis tool) to tell me where I'm missing my tests. However, when I enable gcov by following these directions: <http://supermegaultragroovy.com/blog/2005/11/03/unit-testing-and-code-coverage-with-x...
2011/03/23
[ "https://Stackoverflow.com/questions/5400733", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16445/" ]
Looks like I found a solution. Crazy XCode seems to treat static libraries completely different when invoking gcc. And I thought MSBuild was a build system from hell... it's a snap and at least there are books about it. Anyway, here's how you do it: Add `$(PLATFORM_DEVELOPER_USR_DIR)/lib` to your "Library Search Paths...
This may help in solving your issue, have a look in to it [GTM](http://code.google.com/p/google-toolbox-for-mac/wiki/SnowLeopardGCov)
12,071,679
I am trying to edit `SharedPreferences` of one app through another app, my code goes like this ``` try { Context plutoContext = getApplicationContext().createPackageContext("me.test",Context.MODE_WORLD_WRITEABLE); SharedPreferences plutoPreferences = PreferenceManager.getDefaultSharedPreferences(plutoContext); Editor ...
2012/08/22
[ "https://Stackoverflow.com/questions/12071679", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1501118/" ]
You need to add the permissions in your AndroidManifest.xml: ``` <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/> <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/> ``` I have the same problem with you, and I solved it with the above solution.
In my case rebooting Samsung device solved same issue.
12,071,679
I am trying to edit `SharedPreferences` of one app through another app, my code goes like this ``` try { Context plutoContext = getApplicationContext().createPackageContext("me.test",Context.MODE_WORLD_WRITEABLE); SharedPreferences plutoPreferences = PreferenceManager.getDefaultSharedPreferences(plutoContext); Editor ...
2012/08/22
[ "https://Stackoverflow.com/questions/12071679", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1501118/" ]
You need to add the permissions in your AndroidManifest.xml: ``` <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/> <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/> ``` I have the same problem with you, and I solved it with the above solution.
Just use a different package name in this app. That will create the preferences in a different directory.
12,071,679
I am trying to edit `SharedPreferences` of one app through another app, my code goes like this ``` try { Context plutoContext = getApplicationContext().createPackageContext("me.test",Context.MODE_WORLD_WRITEABLE); SharedPreferences plutoPreferences = PreferenceManager.getDefaultSharedPreferences(plutoContext); Editor ...
2012/08/22
[ "https://Stackoverflow.com/questions/12071679", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1501118/" ]
Just use a different package name in this app. That will create the preferences in a different directory.
If your first app wants to create a SharedPreference that can be read by another app, make sure you create the SharedPreference with the correct mode. Take a look at the [getSharedPreferences()](http://developer.android.com/reference/android/content/Context.html#getSharedPreferences%28java.lang.String,%20int%29) or the...
12,071,679
I am trying to edit `SharedPreferences` of one app through another app, my code goes like this ``` try { Context plutoContext = getApplicationContext().createPackageContext("me.test",Context.MODE_WORLD_WRITEABLE); SharedPreferences plutoPreferences = PreferenceManager.getDefaultSharedPreferences(plutoContext); Editor ...
2012/08/22
[ "https://Stackoverflow.com/questions/12071679", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1501118/" ]
By the way, (it's not related with the question, but any way) you wrongly use `createPackageContext()` method. You pass there `MODE_WORLD_WRITEABLE` flag which value is **2** and equals to `CONTEXT_IGNORE_SECURITY` flag, so this would be incorrectly interpreted by logic, IMHO.
In my case rebooting Samsung device solved same issue.
12,071,679
I am trying to edit `SharedPreferences` of one app through another app, my code goes like this ``` try { Context plutoContext = getApplicationContext().createPackageContext("me.test",Context.MODE_WORLD_WRITEABLE); SharedPreferences plutoPreferences = PreferenceManager.getDefaultSharedPreferences(plutoContext); Editor ...
2012/08/22
[ "https://Stackoverflow.com/questions/12071679", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1501118/" ]
By the way, (it's not related with the question, but any way) you wrongly use `createPackageContext()` method. You pass there `MODE_WORLD_WRITEABLE` flag which value is **2** and equals to `CONTEXT_IGNORE_SECURITY` flag, so this would be incorrectly interpreted by logic, IMHO.
If your first app wants to create a SharedPreference that can be read by another app, make sure you create the SharedPreference with the correct mode. Take a look at the [getSharedPreferences()](http://developer.android.com/reference/android/content/Context.html#getSharedPreferences%28java.lang.String,%20int%29) or the...
12,071,679
I am trying to edit `SharedPreferences` of one app through another app, my code goes like this ``` try { Context plutoContext = getApplicationContext().createPackageContext("me.test",Context.MODE_WORLD_WRITEABLE); SharedPreferences plutoPreferences = PreferenceManager.getDefaultSharedPreferences(plutoContext); Editor ...
2012/08/22
[ "https://Stackoverflow.com/questions/12071679", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1501118/" ]
Just use a different package name in this app. That will create the preferences in a different directory.
Issue - "Android : Couldn't create directory for SharedPreferences file" will come when you are already created default shared preference in project. So, one shared preference is exist and again, you are adding with same name default preference. Solution - Create only one default shared preference in app. If do you w...
12,071,679
I am trying to edit `SharedPreferences` of one app through another app, my code goes like this ``` try { Context plutoContext = getApplicationContext().createPackageContext("me.test",Context.MODE_WORLD_WRITEABLE); SharedPreferences plutoPreferences = PreferenceManager.getDefaultSharedPreferences(plutoContext); Editor ...
2012/08/22
[ "https://Stackoverflow.com/questions/12071679", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1501118/" ]
Just use a different package name in this app. That will create the preferences in a different directory.
In my case rebooting Samsung device solved same issue.
12,071,679
I am trying to edit `SharedPreferences` of one app through another app, my code goes like this ``` try { Context plutoContext = getApplicationContext().createPackageContext("me.test",Context.MODE_WORLD_WRITEABLE); SharedPreferences plutoPreferences = PreferenceManager.getDefaultSharedPreferences(plutoContext); Editor ...
2012/08/22
[ "https://Stackoverflow.com/questions/12071679", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1501118/" ]
You need to add the permissions in your AndroidManifest.xml: ``` <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/> <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/> ``` I have the same problem with you, and I solved it with the above solution.
Issue - "Android : Couldn't create directory for SharedPreferences file" will come when you are already created default shared preference in project. So, one shared preference is exist and again, you are adding with same name default preference. Solution - Create only one default shared preference in app. If do you w...
12,071,679
I am trying to edit `SharedPreferences` of one app through another app, my code goes like this ``` try { Context plutoContext = getApplicationContext().createPackageContext("me.test",Context.MODE_WORLD_WRITEABLE); SharedPreferences plutoPreferences = PreferenceManager.getDefaultSharedPreferences(plutoContext); Editor ...
2012/08/22
[ "https://Stackoverflow.com/questions/12071679", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1501118/" ]
You need to add the permissions in your AndroidManifest.xml: ``` <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/> <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/> ``` I have the same problem with you, and I solved it with the above solution.
By the way, (it's not related with the question, but any way) you wrongly use `createPackageContext()` method. You pass there `MODE_WORLD_WRITEABLE` flag which value is **2** and equals to `CONTEXT_IGNORE_SECURITY` flag, so this would be incorrectly interpreted by logic, IMHO.
12,071,679
I am trying to edit `SharedPreferences` of one app through another app, my code goes like this ``` try { Context plutoContext = getApplicationContext().createPackageContext("me.test",Context.MODE_WORLD_WRITEABLE); SharedPreferences plutoPreferences = PreferenceManager.getDefaultSharedPreferences(plutoContext); Editor ...
2012/08/22
[ "https://Stackoverflow.com/questions/12071679", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1501118/" ]
You need to add the permissions in your AndroidManifest.xml: ``` <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/> <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/> ``` I have the same problem with you, and I solved it with the above solution.
If your first app wants to create a SharedPreference that can be read by another app, make sure you create the SharedPreference with the correct mode. Take a look at the [getSharedPreferences()](http://developer.android.com/reference/android/content/Context.html#getSharedPreferences%28java.lang.String,%20int%29) or the...
64,121,826
I have a table of accounts that contains an edit option. When the edit option is clicked, an account edit modal dialog is displayed. The user has the option to close or cancel the edit by clicking the "X" in the top right corner or clicking a Close button. When the modal closes there are state properties that i would l...
2020/09/29
[ "https://Stackoverflow.com/questions/64121826", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2370664/" ]
I am nit sure what you are doing different than I am but based on your code and explanation I created this demo application and it is working as expected without any errors. May be you might want to compare it to your application and check what is different in your app. Find working [codesandbox](https://codesandbox.i...
One easy way to reset your component is to manage it with a key. See: <https://reactjs.org/blog/2018/06/07/you-probably-dont-need-derived-state.html#recommendation-fully-uncontrolled-component-with-a-key> More precisely: > > When a key changes, React will create a new component instance rather > than update the curr...
25,038,980
i'm building a traffic schedule application using Neo4J, NodeJS and GTFS-data; currently, i'm trying to get things working for the traffic on a single day on the Berlin subway network. these are the grand totals i've collected so far: `10 routes 211 stops 4096 trips 83322 stoptimes` to put it simply, GTFS (General Tr...
2014/07/30
[ "https://Stackoverflow.com/questions/25038980", "https://Stackoverflow.com", "https://Stackoverflow.com/users/256361/" ]
I just imported 12M nodes and 12M rels into Neo4j in 10 minutes using LOAD CSV. You should see your issues when you run profiling on your queries in the shell. Prefix your query with `profile` and look a the profile output if it mentions to use the index or rather just label-scan. Do you use parameters for your inse...
**detailed solution** i'm happy to report that @MichaelHunger's solution works like a charm. i modified the edge-building queries from the question with the below shapes that keep to the suggested query outline: ``` MATCH (route:`route`) MATCH (trip:`trip` {`route-id`: route.id}) CREATE (trip)-[:`trip/route` {`~label...
19,321,925
I have a query which I get as: ``` var query = Data.Items .Where(x => criteria.IsMatch(x)) .ToList<Item>(); ``` This works fine. However now I want to break up this list into x number of lists, for example 3. Each list will therefore contain 1/3 the amount of elements from query. Can it be ...
2013/10/11
[ "https://Stackoverflow.com/questions/19321925", "https://Stackoverflow.com", "https://Stackoverflow.com/users/524861/" ]
You can use PLINQ partitioners to break the results into separate enumerables. ``` var partitioner = Partitioner.Create<Item>(query); var partitions = partitioner.GetPartitions(3); ``` You'll need to reference the System.Collections.Concurrent namespace. `partitions` will be a list of `IEnumerable<Item>` where each ...
I think something like this could work, splitting the list into [`IGrouping`](http://msdn.microsoft.com/en-us/library/bb344977.aspx)s. ``` const int numberOfGroups = 3; var groups = query .Select((item, i) => new { item, i }) .GroupBy(e => e.i % numberOfGroups); ```
19,321,925
I have a query which I get as: ``` var query = Data.Items .Where(x => criteria.IsMatch(x)) .ToList<Item>(); ``` This works fine. However now I want to break up this list into x number of lists, for example 3. Each list will therefore contain 1/3 the amount of elements from query. Can it be ...
2013/10/11
[ "https://Stackoverflow.com/questions/19321925", "https://Stackoverflow.com", "https://Stackoverflow.com/users/524861/" ]
I think something like this could work, splitting the list into [`IGrouping`](http://msdn.microsoft.com/en-us/library/bb344977.aspx)s. ``` const int numberOfGroups = 3; var groups = query .Select((item, i) => new { item, i }) .GroupBy(e => e.i % numberOfGroups); ```
You can create an extension method: ``` public static IList<List<T>> GetChunks<T>(this IList<T> items, int numOfChunks) { if (items.Count < numOfChunks) throw new ArgumentException("The number of elements is lower than the number of chunks"); int div = items.Count / numOfChunks; int rem = items.Cou...
19,321,925
I have a query which I get as: ``` var query = Data.Items .Where(x => criteria.IsMatch(x)) .ToList<Item>(); ``` This works fine. However now I want to break up this list into x number of lists, for example 3. Each list will therefore contain 1/3 the amount of elements from query. Can it be ...
2013/10/11
[ "https://Stackoverflow.com/questions/19321925", "https://Stackoverflow.com", "https://Stackoverflow.com/users/524861/" ]
I think something like this could work, splitting the list into [`IGrouping`](http://msdn.microsoft.com/en-us/library/bb344977.aspx)s. ``` const int numberOfGroups = 3; var groups = query .Select((item, i) => new { item, i }) .GroupBy(e => e.i % numberOfGroups); ```
You can use `Skip` and `Take` in a simple `for` to accomplish what you want ``` var groupSize = (int)Math.Ceiling(query.Count() / 3d); var result = new List<List<Item>>(); for (var j = 0; j < 3; j++) result.Add(query.Skip(j * groupSize).Take(groupSize).ToList()); ```
19,321,925
I have a query which I get as: ``` var query = Data.Items .Where(x => criteria.IsMatch(x)) .ToList<Item>(); ``` This works fine. However now I want to break up this list into x number of lists, for example 3. Each list will therefore contain 1/3 the amount of elements from query. Can it be ...
2013/10/11
[ "https://Stackoverflow.com/questions/19321925", "https://Stackoverflow.com", "https://Stackoverflow.com/users/524861/" ]
I think something like this could work, splitting the list into [`IGrouping`](http://msdn.microsoft.com/en-us/library/bb344977.aspx)s. ``` const int numberOfGroups = 3; var groups = query .Select((item, i) => new { item, i }) .GroupBy(e => e.i % numberOfGroups); ```
If the order of the elements doesn't matter using an `IGrouping` as suggested by Daniel Imms is probably the most elegant way (add `.Select(gr => gr.Select(e => e.item))` to get an `IEnumerable<IEnumerable<T>>`). If however you want to preserve the order you need to know the total number of elements. Otherwise you wou...
19,321,925
I have a query which I get as: ``` var query = Data.Items .Where(x => criteria.IsMatch(x)) .ToList<Item>(); ``` This works fine. However now I want to break up this list into x number of lists, for example 3. Each list will therefore contain 1/3 the amount of elements from query. Can it be ...
2013/10/11
[ "https://Stackoverflow.com/questions/19321925", "https://Stackoverflow.com", "https://Stackoverflow.com/users/524861/" ]
You can use PLINQ partitioners to break the results into separate enumerables. ``` var partitioner = Partitioner.Create<Item>(query); var partitions = partitioner.GetPartitions(3); ``` You'll need to reference the System.Collections.Concurrent namespace. `partitions` will be a list of `IEnumerable<Item>` where each ...
You can create an extension method: ``` public static IList<List<T>> GetChunks<T>(this IList<T> items, int numOfChunks) { if (items.Count < numOfChunks) throw new ArgumentException("The number of elements is lower than the number of chunks"); int div = items.Count / numOfChunks; int rem = items.Cou...
19,321,925
I have a query which I get as: ``` var query = Data.Items .Where(x => criteria.IsMatch(x)) .ToList<Item>(); ``` This works fine. However now I want to break up this list into x number of lists, for example 3. Each list will therefore contain 1/3 the amount of elements from query. Can it be ...
2013/10/11
[ "https://Stackoverflow.com/questions/19321925", "https://Stackoverflow.com", "https://Stackoverflow.com/users/524861/" ]
You can use PLINQ partitioners to break the results into separate enumerables. ``` var partitioner = Partitioner.Create<Item>(query); var partitions = partitioner.GetPartitions(3); ``` You'll need to reference the System.Collections.Concurrent namespace. `partitions` will be a list of `IEnumerable<Item>` where each ...
You can use `Skip` and `Take` in a simple `for` to accomplish what you want ``` var groupSize = (int)Math.Ceiling(query.Count() / 3d); var result = new List<List<Item>>(); for (var j = 0; j < 3; j++) result.Add(query.Skip(j * groupSize).Take(groupSize).ToList()); ```
19,321,925
I have a query which I get as: ``` var query = Data.Items .Where(x => criteria.IsMatch(x)) .ToList<Item>(); ``` This works fine. However now I want to break up this list into x number of lists, for example 3. Each list will therefore contain 1/3 the amount of elements from query. Can it be ...
2013/10/11
[ "https://Stackoverflow.com/questions/19321925", "https://Stackoverflow.com", "https://Stackoverflow.com/users/524861/" ]
You can use PLINQ partitioners to break the results into separate enumerables. ``` var partitioner = Partitioner.Create<Item>(query); var partitions = partitioner.GetPartitions(3); ``` You'll need to reference the System.Collections.Concurrent namespace. `partitions` will be a list of `IEnumerable<Item>` where each ...
If the order of the elements doesn't matter using an `IGrouping` as suggested by Daniel Imms is probably the most elegant way (add `.Select(gr => gr.Select(e => e.item))` to get an `IEnumerable<IEnumerable<T>>`). If however you want to preserve the order you need to know the total number of elements. Otherwise you wou...
19,321,925
I have a query which I get as: ``` var query = Data.Items .Where(x => criteria.IsMatch(x)) .ToList<Item>(); ``` This works fine. However now I want to break up this list into x number of lists, for example 3. Each list will therefore contain 1/3 the amount of elements from query. Can it be ...
2013/10/11
[ "https://Stackoverflow.com/questions/19321925", "https://Stackoverflow.com", "https://Stackoverflow.com/users/524861/" ]
You can use `Skip` and `Take` in a simple `for` to accomplish what you want ``` var groupSize = (int)Math.Ceiling(query.Count() / 3d); var result = new List<List<Item>>(); for (var j = 0; j < 3; j++) result.Add(query.Skip(j * groupSize).Take(groupSize).ToList()); ```
You can create an extension method: ``` public static IList<List<T>> GetChunks<T>(this IList<T> items, int numOfChunks) { if (items.Count < numOfChunks) throw new ArgumentException("The number of elements is lower than the number of chunks"); int div = items.Count / numOfChunks; int rem = items.Cou...
19,321,925
I have a query which I get as: ``` var query = Data.Items .Where(x => criteria.IsMatch(x)) .ToList<Item>(); ``` This works fine. However now I want to break up this list into x number of lists, for example 3. Each list will therefore contain 1/3 the amount of elements from query. Can it be ...
2013/10/11
[ "https://Stackoverflow.com/questions/19321925", "https://Stackoverflow.com", "https://Stackoverflow.com/users/524861/" ]
If the order of the elements doesn't matter using an `IGrouping` as suggested by Daniel Imms is probably the most elegant way (add `.Select(gr => gr.Select(e => e.item))` to get an `IEnumerable<IEnumerable<T>>`). If however you want to preserve the order you need to know the total number of elements. Otherwise you wou...
You can create an extension method: ``` public static IList<List<T>> GetChunks<T>(this IList<T> items, int numOfChunks) { if (items.Count < numOfChunks) throw new ArgumentException("The number of elements is lower than the number of chunks"); int div = items.Count / numOfChunks; int rem = items.Cou...
23,282,318
I need to disable the "Say something about this" popup box that is displayed after clicking the Facebook Like button. The simple solution to this is to use the iFrame version of the Like button. However, my like page is hosted with woobox. I cannot change the like button from HTML5 to the iframe version but I do have ...
2014/04/25
[ "https://Stackoverflow.com/questions/23282318", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3505865/" ]
Okay, I was able to create something that might help you. Here's the JSFiddle: [JSFiddle](http://jsfiddle.net/4vuDD/) What I basically did was I wrapped the like button in a div with hidden overflow. Only problem is, the comment box appears for a second right after loading the page, but goes away after. (it's still...
In reference to your issue with the Woobox layout specifically, you'll want to reference just the portion of the entry form that includes the Like button to hide the overflow on that. The following CSS will do the trick alone: ``` .form-group .input-group.type-like .inputs.grid { overflow: hidden !important; } ``` I...
23,282,318
I need to disable the "Say something about this" popup box that is displayed after clicking the Facebook Like button. The simple solution to this is to use the iFrame version of the Like button. However, my like page is hosted with woobox. I cannot change the like button from HTML5 to the iframe version but I do have ...
2014/04/25
[ "https://Stackoverflow.com/questions/23282318", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3505865/" ]
Okay, I was able to create something that might help you. Here's the JSFiddle: [JSFiddle](http://jsfiddle.net/4vuDD/) What I basically did was I wrapped the like button in a div with hidden overflow. Only problem is, the comment box appears for a second right after loading the page, but goes away after. (it's still...
just add this style to the `style="overflow: hidden !important;"` to the `div` like i have done below ``` <div class="fb-like pull-right" data-href="http://thegoldbook.in/demo/singlequestion.php?ques_no='.$ques_id.'" data-width="100" data-layout="button" data-action="like" data-show-faces="false" data-share="true" sty...
47,348
Since for my [last question](https://buddhism.stackexchange.com/q/47334/16806), I did not get a satisfactory answer I am reducing the question to its barebones. What is the difference between 'Witnessing' and 'Mindfulness' from the context of meditation? I mean when I am looking at the sunset without any thoughts in m...
2022/06/01
[ "https://buddhism.stackexchange.com/questions/47348", "https://buddhism.stackexchange.com", "https://buddhism.stackexchange.com/users/16806/" ]
sati ("mindfulness") is one of the most commonly misunderstood teachings. It's been distorted by psychotherapy agendas, and even experienced Buddhist teachers have wildly divergent understandings. If you want the perspective from the original suttas: There's an implicit object of sati, and that's the Dharma, the Buddh...
Maybe see the Quora thread on Osho's "witness": <https://www.quora.com/What-is-witness-meditation-as-described-by-Osho> I can only tell from my personal experience: I've read books where "witnessing" was used synonymously with perceiving with mindfullness (sati) and without follow-up thoughts (<https://en.wikipedia.or...
47,348
Since for my [last question](https://buddhism.stackexchange.com/q/47334/16806), I did not get a satisfactory answer I am reducing the question to its barebones. What is the difference between 'Witnessing' and 'Mindfulness' from the context of meditation? I mean when I am looking at the sunset without any thoughts in m...
2022/06/01
[ "https://buddhism.stackexchange.com/questions/47348", "https://buddhism.stackexchange.com", "https://buddhism.stackexchange.com/users/16806/" ]
the other answers are already good so I'll just add this quote from [wiki](https://en.wikipedia.org/wiki/Sakshi_(witness)) regarding witness: > > "When form is the object of observation or drshyam, then the eye is > the observer or drk; when the eye is the object of observation, then > the mind is the observer; when ...
Maybe see the Quora thread on Osho's "witness": <https://www.quora.com/What-is-witness-meditation-as-described-by-Osho> I can only tell from my personal experience: I've read books where "witnessing" was used synonymously with perceiving with mindfullness (sati) and without follow-up thoughts (<https://en.wikipedia.or...
47,348
Since for my [last question](https://buddhism.stackexchange.com/q/47334/16806), I did not get a satisfactory answer I am reducing the question to its barebones. What is the difference between 'Witnessing' and 'Mindfulness' from the context of meditation? I mean when I am looking at the sunset without any thoughts in m...
2022/06/01
[ "https://buddhism.stackexchange.com/questions/47348", "https://buddhism.stackexchange.com", "https://buddhism.stackexchange.com/users/16806/" ]
sati ("mindfulness") is one of the most commonly misunderstood teachings. It's been distorted by psychotherapy agendas, and even experienced Buddhist teachers have wildly divergent understandings. If you want the perspective from the original suttas: There's an implicit object of sati, and that's the Dharma, the Buddh...
Mindfulness is situational awareness of the body and its context, which occurs effortlessly at all times. Precisely where that awareness occurs, I have no idea. Awareness isn't the best term, as there is no such thing as awareness, but I don't have another convenient word, at this time. Regardless, when it fully opens ...
47,348
Since for my [last question](https://buddhism.stackexchange.com/q/47334/16806), I did not get a satisfactory answer I am reducing the question to its barebones. What is the difference between 'Witnessing' and 'Mindfulness' from the context of meditation? I mean when I am looking at the sunset without any thoughts in m...
2022/06/01
[ "https://buddhism.stackexchange.com/questions/47348", "https://buddhism.stackexchange.com", "https://buddhism.stackexchange.com/users/16806/" ]
the other answers are already good so I'll just add this quote from [wiki](https://en.wikipedia.org/wiki/Sakshi_(witness)) regarding witness: > > "When form is the object of observation or drshyam, then the eye is > the observer or drk; when the eye is the object of observation, then > the mind is the observer; when ...
Mindfulness is situational awareness of the body and its context, which occurs effortlessly at all times. Precisely where that awareness occurs, I have no idea. Awareness isn't the best term, as there is no such thing as awareness, but I don't have another convenient word, at this time. Regardless, when it fully opens ...
412,304
A few days after installing 6.1.1 some pages started redirecting to the homepage. I renamed .htaccess, disabled all plugins, and am using the 2022 default theme to try to locate the source of the 301 with no luck. So I checked curl, and found the source of the redirect was labeled "Wordpress". So I stopped the redirect...
2022/12/24
[ "https://wordpress.stackexchange.com/questions/412304", "https://wordpress.stackexchange.com", "https://wordpress.stackexchange.com/users/206120/" ]
In WordPress, there is no concept of "super admins" in the same way that there is in a multisite installation. However, there may be users with the "administrator" role who have access to all areas of the site, including the WordPress settings. If you are an administrator and you are unable to access the WordPress set...
See @Tamara answers below regarding edits in phpmyadmin for user role levels. There is likely a plugin installed or a modification in the functions.php file that is removing items from the menu list. Log into phpmyadmin for the site, check your username login against those of the other company. Likely the permission ...
21,169,968
I set up a new Ghost 0.4 blog, created numerous posts, then switched to production mode before setting the site live. To my surprise, the posts I created no longer showed up. Since setting up Ghost 0.3.3, I had forgotten that Ghost uses separate database stores for the production and development environments, and I fai...
2014/01/16
[ "https://Stackoverflow.com/questions/21169968", "https://Stackoverflow.com", "https://Stackoverflow.com/users/705157/" ]
Ghost uses SQLite databases, which stores content in a single file for each content, so it's easy to back-up, move or copy an entire database in one go. To solve the problem of having posts only in my development database, I simply shut down Ghost, and switched the production and development SQLite database files. The...
An easy way to change this behavior is to just choose to use the same database for both production and development. Modify the following line in your `config.js` under development:database:connection from ``` filename: path.join(__dirname, '/content/data/ghost-dev.db') ``` to ``` filename: path.join(__dirname, '/c...
30,737,541
I want to use enumeration type in C. I know how to use them but I have a question. I have an example like this ``` enum S { A,B,C,G }; ``` I know this works but can i do something like this? ``` enum S {^,*,/,%}; ``` Thanks for your time.
2015/06/09
[ "https://Stackoverflow.com/questions/30737541", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3161625/" ]
No. You can only use alphanumeric characters and underscores in identifiers (variable, function, and type names) in C. And the identifier cannot start with a number. Also, you can't use certain reserved keywords. *<http://www.cprogrammingexpert.com/C/Tutorial/fundamentals/identifiers.aspx>* (link broken) UPDATE: Newe...
The [ANSI C specification](http://eli-project.sourceforge.net/c_html/c.html#m51) says you can use an "OrdinaryIdDef" for enums... so it follows the same rules as--for example--variable & function names
30,737,541
I want to use enumeration type in C. I know how to use them but I have a question. I have an example like this ``` enum S { A,B,C,G }; ``` I know this works but can i do something like this? ``` enum S {^,*,/,%}; ``` Thanks for your time.
2015/06/09
[ "https://Stackoverflow.com/questions/30737541", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3161625/" ]
No. You can only use alphanumeric characters and underscores in identifiers (variable, function, and type names) in C. And the identifier cannot start with a number. Also, you can't use certain reserved keywords. *<http://www.cprogrammingexpert.com/C/Tutorial/fundamentals/identifiers.aspx>* (link broken) UPDATE: Newe...
No. However, you could do something like this: ``` enum S { CARET = '^', STAR = '*', SLASH = '/', PERCENT = '%' }; int foo() { enum S somevar = CARET; // .... if (somevar == PERCENT) // .... } ``` Not sure if that would be useful for whatever it is you're trying to do, though, since you don't really g...
30,737,541
I want to use enumeration type in C. I know how to use them but I have a question. I have an example like this ``` enum S { A,B,C,G }; ``` I know this works but can i do something like this? ``` enum S {^,*,/,%}; ``` Thanks for your time.
2015/06/09
[ "https://Stackoverflow.com/questions/30737541", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3161625/" ]
No. However, you could do something like this: ``` enum S { CARET = '^', STAR = '*', SLASH = '/', PERCENT = '%' }; int foo() { enum S somevar = CARET; // .... if (somevar == PERCENT) // .... } ``` Not sure if that would be useful for whatever it is you're trying to do, though, since you don't really g...
The [ANSI C specification](http://eli-project.sourceforge.net/c_html/c.html#m51) says you can use an "OrdinaryIdDef" for enums... so it follows the same rules as--for example--variable & function names
27,530,000
There seem to be at at least **two or three major ways** of building **apps** that communicate with `bokeh-server` in Bokeh. They correspond to the [folders](https://github.com/bokeh/bokeh/tree/master/examples) [`app`](https://github.com/bokeh/bokeh/tree/master/examples/app), [`embed`](https://github.com/bokeh/bokeh/tr...
2014/12/17
[ "https://Stackoverflow.com/questions/27530000", "https://Stackoverflow.com", "https://Stackoverflow.com/users/283296/" ]
> > But this confused me, what is meant by an "applet" & "embedding" in > Bokeh terminology > > > There is clearly a mistake in the answer you have pasted here (that probably doesn't help you on understanding, sorry). The stock app example `stock_app.py` is in examples\app\stock\_applet\stock\_app.py not embed fo...
Just to add a little bit... I will paste here a quote from Bryan in the mailing list (in another thread, so maybe you missed it): > > Regarding app vs embed. The "apps" are all run *inside* the bokeh-server. So you start them, > by doing something like: > > > > ``` > bokeh-server --script sliders_app.py > ...
71,547,975
I have tried a lot but still can't solve this.. How can I render a tetrahedron with different texture on each face? At beginning I was trying this way. ```js import * as THREE from 'three'; window.onload = () => { const scene = new THREE.Scene() const camera = new THREE.PerspectiveCamera(75, window.innerWidth /...
2022/03/20
[ "https://Stackoverflow.com/questions/71547975", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4752143/" ]
You can build your own geometry or modify an existing one. To have different materials on sides, use `groups`. ```css body{ overflow: hidden; margin: 0; } ``` ```html <script type="module"> import * as THREE from "https://cdn.skypack.dev/three@0.136.0"; import {OrbitControls} from "https://cdn.skypack.dev/three@0...
Finally I understood how to make it work using `three.js` `TetrahedronGeometry`. Actually making our own geo is not necessary, but we will have to reset `uv array` if we are using `three.js` `TetrahedronGeometry`. ```js private initGeometry(){ const radius = this.config.size*Math.sqrt(6)/4; this.geometry = ne...
735,915
Is it possible to use the built in ASP.NET membership provider to secure a web service? I have a SQL Server database already setup with my membership and now I want to provide a web service that only members are allowed to use. Is it possible to authenticate against this (if so how?) or do I need to have a seperate ty...
2009/04/09
[ "https://Stackoverflow.com/questions/735915", "https://Stackoverflow.com", "https://Stackoverflow.com/users/53020/" ]
There actually is a solution, it turns out: WebRequest.PreAuthenticate Check out an [article](http://www.west-wind.com/Weblog/posts/243915.aspx) by Rick Strahl.
This "double handshake" is a integral part of NTLM's challenge response model. Your only option would be to change the authentication type. Alternatively, you try re-using the connection for web service calls.
22,850,061
**<http://codepen.io/leongaban/pen/talGc/>** So having an interesting problem here. I've got a left and right div The left div has 3 elements in it: 1) Person 1 2) WANTS TO MEET sign 3) Person 2 The right div just a paragraph, both divs are close to 50% width each. Now if you shrink the browser window, th...
2014/04/03
[ "https://Stackoverflow.com/questions/22850061", "https://Stackoverflow.com", "https://Stackoverflow.com/users/168738/" ]
I suspect what you're *really* trying to do is to show the parent of any `li` with class `active` within a `.cn_submenu`. Your current code looks to see if the **first** `li` of the **first** `.cn_submenu` has the class `active` (ignoring all other `.cn_submenu` and `li` elements), and then uses `this` incorrectly if s...
`this` refers to `document` in your question, so you're trying to `show()` the parent of `document`. Use `$('.cn_submenu')` instead.
64,685,502
I have two differents dataframes ``` DF1 = data.frame("A"= c("a","a","b","b","c","c"), "B"= c(1,2,3,4,5,6)) DF2 = data.frame("A"=c("a","b","c"), "C"=c(10,11,12)) ``` I want to add the column `C` to `DF1` grouping by column `A` The expected result is ``` A B C 1 a 1 10 2 a 2 10 3 b 3 11 4 b 4 11 5 c 5 12 6 c 6 ...
2020/11/04
[ "https://Stackoverflow.com/questions/64685502", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14578930/" ]
Welcome to stackoverflow. As @KarthikS commented, what you want is a join. 'Joining' is the name of the operation for connecting two tables together. 'Grouping by' a column is mainly used when summarizing a table: For example, group by state and sum number of votes would give the total number of votes by each state (s...
We can use `merge` from `base R` ``` merge(DF1, DF2, by = 'A', all.x = TRUE) ```
42,563,429
I have data coming in and am trying to display the rows it fills with ng-repeat. Here is how the data looks coming in: [![enter image description here](https://i.stack.imgur.com/98EpM.png)](https://i.stack.imgur.com/98EpM.png) SO I am trying to display it on the view: ``` <tbody data-ng-repeat="contract in contracts...
2017/03/02
[ "https://Stackoverflow.com/questions/42563429", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1524210/" ]
``` <div ng-repeat="(key, value) in contracts[0]"> {{contracts[0][key]}} | {{value}} <div ng-if="$index === 1"> This is the second value {{value}}</div> <div ng-if="$index === 2"> This is the thrid value {{value}}</div> <div ng-if="$last"> This is the last value {{value}}</div> </div> ...
According to your data, it looks like an object, you cannot do ng-repeat over your object, However you can do this in order to read the properties and values, ``` <div ng-repeat="(key, value) in contracts"> {{key}} | {{value}}</div> ```
28,913,473
This is image : <http://oi60.tinypic.com/118iq7r.jpg> I have a similar database structure to that shown in the table above. However, I have additional columns for the login times. I would like to take the data from the columns and display them on a page. ``` ID | txtName | txtEmail | txtPasswd ----------------...
2015/03/07
[ "https://Stackoverflow.com/questions/28913473", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4643769/" ]
Your suggestion is the good choice to make. You can't catch the Router in a Meteor method because it's server side. You have to do it in the **callback function**, exactly like you suggested : ``` Meteor.call('createNewItinerary',itinerary, function(err, data){ if(err){ console.log(err); } Router.go('co...
Your suggestion makes sense to me: ``` Meteor.call('createNewItinerary',itinerary, function(err, data){ if(err){ console.log(err); } Router.go('confirmation'); }); ``` You'll call createNewItinerary and when it returns you'll send the user to the confirmation page. That said, you might want some error...
54,886,421
I have this code: ``` new Thread(new Runnable() { @Override public void run() { //implement } }); ``` My IDE(intellij) suggest to use: ``` new Thread(() -> { //implement }); ``` This guarantee is the same thing? I ask this because class [Thread](https://docs.oracle.com/javase/7/docs/api/...
2019/02/26
[ "https://Stackoverflow.com/questions/54886421", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9011164/" ]
Yes, that is equivalent, trust your IDE! Regarding multiple constructors: * you have exactly one constructor argument -> two possible constructor implementations * is `() -> { //implement }` a `String`? - **no** -> only one possible constructor to call -> the one for `Runnable`, which you would call on your own as ...
Yes, it's a similar thing. Both the representation would call the [`Thread(Runnable runnable)`](https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Thread.html#%3Cinit%3E(java.lang.Runnable)) constructor. The later code in your question ``` () -> { //implement } ``` is a ***lambda representation...
54,886,421
I have this code: ``` new Thread(new Runnable() { @Override public void run() { //implement } }); ``` My IDE(intellij) suggest to use: ``` new Thread(() -> { //implement }); ``` This guarantee is the same thing? I ask this because class [Thread](https://docs.oracle.com/javase/7/docs/api/...
2019/02/26
[ "https://Stackoverflow.com/questions/54886421", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9011164/" ]
Yes, it's a similar thing. Both the representation would call the [`Thread(Runnable runnable)`](https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Thread.html#%3Cinit%3E(java.lang.Runnable)) constructor. The later code in your question ``` () -> { //implement } ``` is a ***lambda representation...
It is similar, but not the exactly same thing. It behaves the same way in all the regular cases. Some methods access their stack (trace). Those might yield different results.
54,886,421
I have this code: ``` new Thread(new Runnable() { @Override public void run() { //implement } }); ``` My IDE(intellij) suggest to use: ``` new Thread(() -> { //implement }); ``` This guarantee is the same thing? I ask this because class [Thread](https://docs.oracle.com/javase/7/docs/api/...
2019/02/26
[ "https://Stackoverflow.com/questions/54886421", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9011164/" ]
Yes, it's a similar thing. Both the representation would call the [`Thread(Runnable runnable)`](https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Thread.html#%3Cinit%3E(java.lang.Runnable)) constructor. The later code in your question ``` () -> { //implement } ``` is a ***lambda representation...
Yes, it is the same. You can use the lambda Expression because interface Runnable has the Annotation @FunctionalInterface.
54,886,421
I have this code: ``` new Thread(new Runnable() { @Override public void run() { //implement } }); ``` My IDE(intellij) suggest to use: ``` new Thread(() -> { //implement }); ``` This guarantee is the same thing? I ask this because class [Thread](https://docs.oracle.com/javase/7/docs/api/...
2019/02/26
[ "https://Stackoverflow.com/questions/54886421", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9011164/" ]
Yes, that is equivalent, trust your IDE! Regarding multiple constructors: * you have exactly one constructor argument -> two possible constructor implementations * is `() -> { //implement }` a `String`? - **no** -> only one possible constructor to call -> the one for `Runnable`, which you would call on your own as ...
It is similar, but not the exactly same thing. It behaves the same way in all the regular cases. Some methods access their stack (trace). Those might yield different results.
54,886,421
I have this code: ``` new Thread(new Runnable() { @Override public void run() { //implement } }); ``` My IDE(intellij) suggest to use: ``` new Thread(() -> { //implement }); ``` This guarantee is the same thing? I ask this because class [Thread](https://docs.oracle.com/javase/7/docs/api/...
2019/02/26
[ "https://Stackoverflow.com/questions/54886421", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9011164/" ]
Yes, that is equivalent, trust your IDE! Regarding multiple constructors: * you have exactly one constructor argument -> two possible constructor implementations * is `() -> { //implement }` a `String`? - **no** -> only one possible constructor to call -> the one for `Runnable`, which you would call on your own as ...
Yes, it is the same. You can use the lambda Expression because interface Runnable has the Annotation @FunctionalInterface.
69,238,124
From an image made up of 9 smaller images arranged as a 3x3-grid like ``` AAA BBB CCC ``` i want to automatically generate all possible variations as .pngs, where the position of the smaller images does matter, no position can be empty and and each small image must be present three times. I managed to get a list of ...
2021/09/18
[ "https://Stackoverflow.com/questions/69238124", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9338851/" ]
You can achieve this using `flex` and javascript: ```js document.addEventListener("DOMContentLoaded", function() { var btn1= document.getElementById("btn1"); var btn2= document.getElementById("btn2"); var maxWidth = btn1.offsetWidth; if(maxWidth<btn2.offsetWidth)maxWidth=btn2.offsetWidth; maxWidth+=1; btn...
Use a fix larger `width` so that content of 2nd button can be easily contained because 1st one will not create problem . `float` can be used to direct to extreme left/right but it is not recommended ```css .container { width: 1000px; height: 100px; border: 1px solid black; } button{ width:350px; } ``` ```html ...
69,238,124
From an image made up of 9 smaller images arranged as a 3x3-grid like ``` AAA BBB CCC ``` i want to automatically generate all possible variations as .pngs, where the position of the smaller images does matter, no position can be empty and and each small image must be present three times. I managed to get a list of ...
2021/09/18
[ "https://Stackoverflow.com/questions/69238124", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9338851/" ]
You can achieve this using `flex` and javascript: ```js document.addEventListener("DOMContentLoaded", function() { var btn1= document.getElementById("btn1"); var btn2= document.getElementById("btn2"); var maxWidth = btn1.offsetWidth; if(maxWidth<btn2.offsetWidth)maxWidth=btn2.offsetWidth; maxWidth+=1; btn...
You can do it simply by changing a little in your code. ``` .container { border: 2px solid red; padding: 10px; display: flex; flex-direction: row; justify-content: space-between; } ``` Here I am just making the outer container flex and setting the flex direction row. This will set both buttons ...
69,238,124
From an image made up of 9 smaller images arranged as a 3x3-grid like ``` AAA BBB CCC ``` i want to automatically generate all possible variations as .pngs, where the position of the smaller images does matter, no position can be empty and and each small image must be present three times. I managed to get a list of ...
2021/09/18
[ "https://Stackoverflow.com/questions/69238124", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9338851/" ]
Here you should use JavaScript. First, get buttons widths, compare them and then make equal the less button to bigger. ```js let btn = document.querySelectorAll('button') if(btn[0].offsetWidth > btn[1].offsetWidth) { btn[1].style.width = `${btn[0].offsetWidth}px` } else { btn[0].style.width = `${btn[1].offset...
Use a fix larger `width` so that content of 2nd button can be easily contained because 1st one will not create problem . `float` can be used to direct to extreme left/right but it is not recommended ```css .container { width: 1000px; height: 100px; border: 1px solid black; } button{ width:350px; } ``` ```html ...
69,238,124
From an image made up of 9 smaller images arranged as a 3x3-grid like ``` AAA BBB CCC ``` i want to automatically generate all possible variations as .pngs, where the position of the smaller images does matter, no position can be empty and and each small image must be present three times. I managed to get a list of ...
2021/09/18
[ "https://Stackoverflow.com/questions/69238124", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9338851/" ]
Here you should use JavaScript. First, get buttons widths, compare them and then make equal the less button to bigger. ```js let btn = document.querySelectorAll('button') if(btn[0].offsetWidth > btn[1].offsetWidth) { btn[1].style.width = `${btn[0].offsetWidth}px` } else { btn[0].style.width = `${btn[1].offset...
You can do it simply by changing a little in your code. ``` .container { border: 2px solid red; padding: 10px; display: flex; flex-direction: row; justify-content: space-between; } ``` Here I am just making the outer container flex and setting the flex direction row. This will set both buttons ...
846,748
I'm running an openLDAP server version 2.4.40 on CentOS 7. LDAP is going to be configured using online conf option (olc). Thanks to this [question](https://stackoverflow.com/questions/17669586/where-is-my-data-directories-store-by-slapd-openldap-on-ubuntu), I know that slapd's database files are in `/var/lib/ldap`. I...
2017/04/26
[ "https://serverfault.com/questions/846748", "https://serverfault.com", "https://serverfault.com/users/405449/" ]
I read your question in two parts: 1. You want to have the OS be read-only while preserving write access to the LDAP data 2. As a solution for #1, you propose storing the LDAP data in a location other than `/var/lib/ldap` While I suspect #2 is possible, I don't have enough direct experience with OpenLDAP to address t...
Openldap does not appear to support moving a database, DB, file after it has been created. Openldap does not currently support deleting DB files either. It is possible to create a new DB file and define its olcDbDirectory attribute to a path on another partition. ``` dn: olcDatabase=bdb,cn=config objectClass: olcBdb...
846,748
I'm running an openLDAP server version 2.4.40 on CentOS 7. LDAP is going to be configured using online conf option (olc). Thanks to this [question](https://stackoverflow.com/questions/17669586/where-is-my-data-directories-store-by-slapd-openldap-on-ubuntu), I know that slapd's database files are in `/var/lib/ldap`. I...
2017/04/26
[ "https://serverfault.com/questions/846748", "https://serverfault.com", "https://serverfault.com/users/405449/" ]
I used to move the default database of openldap after each new setup. The steps I do when I want to move a database : * Stop `slapd` ``` sudo service slapd stop ``` * `slapcat` the content of the `cn=config` branch in a LDIF file ``` sudo slapcat -b cn=config > /tmp/config.ldif ``` * Copy the `/var/lib/ldap` di...
I read your question in two parts: 1. You want to have the OS be read-only while preserving write access to the LDAP data 2. As a solution for #1, you propose storing the LDAP data in a location other than `/var/lib/ldap` While I suspect #2 is possible, I don't have enough direct experience with OpenLDAP to address t...
846,748
I'm running an openLDAP server version 2.4.40 on CentOS 7. LDAP is going to be configured using online conf option (olc). Thanks to this [question](https://stackoverflow.com/questions/17669586/where-is-my-data-directories-store-by-slapd-openldap-on-ubuntu), I know that slapd's database files are in `/var/lib/ldap`. I...
2017/04/26
[ "https://serverfault.com/questions/846748", "https://serverfault.com", "https://serverfault.com/users/405449/" ]
I used to move the default database of openldap after each new setup. The steps I do when I want to move a database : * Stop `slapd` ``` sudo service slapd stop ``` * `slapcat` the content of the `cn=config` branch in a LDIF file ``` sudo slapcat -b cn=config > /tmp/config.ldif ``` * Copy the `/var/lib/ldap` di...
Openldap does not appear to support moving a database, DB, file after it has been created. Openldap does not currently support deleting DB files either. It is possible to create a new DB file and define its olcDbDirectory attribute to a path on another partition. ``` dn: olcDatabase=bdb,cn=config objectClass: olcBdb...
846,748
I'm running an openLDAP server version 2.4.40 on CentOS 7. LDAP is going to be configured using online conf option (olc). Thanks to this [question](https://stackoverflow.com/questions/17669586/where-is-my-data-directories-store-by-slapd-openldap-on-ubuntu), I know that slapd's database files are in `/var/lib/ldap`. I...
2017/04/26
[ "https://serverfault.com/questions/846748", "https://serverfault.com", "https://serverfault.com/users/405449/" ]
I've done this successfully and used it in AWS to retain my data when I have to refresh the machine image. If you've rebuilt OpenLDAP with the ``` slaptest -f slapd.conf -F slapd.d ``` command (yes, we're still using the old way of config, but running it with `slapd.d` —I'm working on it) then really all you have t...
Openldap does not appear to support moving a database, DB, file after it has been created. Openldap does not currently support deleting DB files either. It is possible to create a new DB file and define its olcDbDirectory attribute to a path on another partition. ``` dn: olcDatabase=bdb,cn=config objectClass: olcBdb...
846,748
I'm running an openLDAP server version 2.4.40 on CentOS 7. LDAP is going to be configured using online conf option (olc). Thanks to this [question](https://stackoverflow.com/questions/17669586/where-is-my-data-directories-store-by-slapd-openldap-on-ubuntu), I know that slapd's database files are in `/var/lib/ldap`. I...
2017/04/26
[ "https://serverfault.com/questions/846748", "https://serverfault.com", "https://serverfault.com/users/405449/" ]
I used to move the default database of openldap after each new setup. The steps I do when I want to move a database : * Stop `slapd` ``` sudo service slapd stop ``` * `slapcat` the content of the `cn=config` branch in a LDIF file ``` sudo slapcat -b cn=config > /tmp/config.ldif ``` * Copy the `/var/lib/ldap` di...
I've done this successfully and used it in AWS to retain my data when I have to refresh the machine image. If you've rebuilt OpenLDAP with the ``` slaptest -f slapd.conf -F slapd.d ``` command (yes, we're still using the old way of config, but running it with `slapd.d` —I'm working on it) then really all you have t...
1,539,772
I am trying to `move` folder and files from one location to another on the same mapped network drive. I have used ROBOCOPY and XCOPY. However, they copy and then delete the files. My files can be over 50GB, thus I want to MOVE. ``` move "P:\public\video\recording\123\*.*" "P:\public\video\recording\" move /S "P:\publ...
2020/04/07
[ "https://superuser.com/questions/1539772", "https://superuser.com", "https://superuser.com/users/118319/" ]
**Yet another update:** Works in Windows 11 too. **Update:** Works in Windows 10 version 21H1 too. Original answer: As of Windows 10 version 2004, you can do the following to remove the "Share with Skype" from the context menu: 1. Run the following `REG ADD` command in an elevated cmd: ``` REG ADD "HKLM\SOFTWARE...
Just a reminder, that uninstalling Skype will of course also fix the issue.
1,539,772
I am trying to `move` folder and files from one location to another on the same mapped network drive. I have used ROBOCOPY and XCOPY. However, they copy and then delete the files. My files can be over 50GB, thus I want to MOVE. ``` move "P:\public\video\recording\123\*.*" "P:\public\video\recording\" move /S "P:\publ...
2020/04/07
[ "https://superuser.com/questions/1539772", "https://superuser.com", "https://superuser.com/users/118319/" ]
In case you are using the Skype App, removing the context menu item is trickier. One way is to delete `DllPath` under ``` HKEY_CLASSES_ROOT\PackagedCom\Package\Microsoft.SkypeApp_15.61.100.0_x86__kzf8qxf38zg5c\Class\{776DBC8D-7347-478C-8D71-791E12EF49D8} ``` However updates to the app will probably restore this. A...
The location has changed to: ``` Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Classes\PackagedCom\Package\Microsoft.SkypeApp_15.61.87.0_x86__kzf8qxf38zg5c\Class\{776DBC8D-7347-478C-8D71-791E12EF49D8} ``` Manually delete the `DllPath` value in the Registry Editor. Note that as the application updates it may change so take no...
1,539,772
I am trying to `move` folder and files from one location to another on the same mapped network drive. I have used ROBOCOPY and XCOPY. However, they copy and then delete the files. My files can be over 50GB, thus I want to MOVE. ``` move "P:\public\video\recording\123\*.*" "P:\public\video\recording\" move /S "P:\publ...
2020/04/07
[ "https://superuser.com/questions/1539772", "https://superuser.com", "https://superuser.com/users/118319/" ]
There are two main entries for "Share with Skype" in registry. * To disable one from `Skype for Desktop` use following `.reg` file: ``` Windows Registry Editor Version 5.00 [HKEY_CLASSES_ROOT\*\shell\ShareWithSkype] "LegacyDisable"="" ``` Method above survives reinstall. It also survives install if `.reg` file is ...
The location has changed to: ``` Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Classes\PackagedCom\Package\Microsoft.SkypeApp_15.61.87.0_x86__kzf8qxf38zg5c\Class\{776DBC8D-7347-478C-8D71-791E12EF49D8} ``` Manually delete the `DllPath` value in the Registry Editor. Note that as the application updates it may change so take no...
1,539,772
I am trying to `move` folder and files from one location to another on the same mapped network drive. I have used ROBOCOPY and XCOPY. However, they copy and then delete the files. My files can be over 50GB, thus I want to MOVE. ``` move "P:\public\video\recording\123\*.*" "P:\public\video\recording\" move /S "P:\publ...
2020/04/07
[ "https://superuser.com/questions/1539772", "https://superuser.com", "https://superuser.com/users/118319/" ]
On Windows 8 (and Windows 10?), RegEdit found the entry at `HKEY_CLASSES_ROOT\*\shell\ShareWithSkype` Deleted that, and the item disappeared from the context menu immediately - no need to reboot / log out. No need to mess with [ShellExView 2.01](https://www.nirsoft.net/utils/shexview.html) because Skype did not show ...
Just a reminder, that uninstalling Skype will of course also fix the issue.
1,539,772
I am trying to `move` folder and files from one location to another on the same mapped network drive. I have used ROBOCOPY and XCOPY. However, they copy and then delete the files. My files can be over 50GB, thus I want to MOVE. ``` move "P:\public\video\recording\123\*.*" "P:\public\video\recording\" move /S "P:\publ...
2020/04/07
[ "https://superuser.com/questions/1539772", "https://superuser.com", "https://superuser.com/users/118319/" ]
On Windows 8 (and Windows 10?), RegEdit found the entry at `HKEY_CLASSES_ROOT\*\shell\ShareWithSkype` Deleted that, and the item disappeared from the context menu immediately - no need to reboot / log out. No need to mess with [ShellExView 2.01](https://www.nirsoft.net/utils/shexview.html) because Skype did not show ...
The location has changed to: ``` Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Classes\PackagedCom\Package\Microsoft.SkypeApp_15.61.87.0_x86__kzf8qxf38zg5c\Class\{776DBC8D-7347-478C-8D71-791E12EF49D8} ``` Manually delete the `DllPath` value in the Registry Editor. Note that as the application updates it may change so take no...
1,539,772
I am trying to `move` folder and files from one location to another on the same mapped network drive. I have used ROBOCOPY and XCOPY. However, they copy and then delete the files. My files can be over 50GB, thus I want to MOVE. ``` move "P:\public\video\recording\123\*.*" "P:\public\video\recording\" move /S "P:\publ...
2020/04/07
[ "https://superuser.com/questions/1539772", "https://superuser.com", "https://superuser.com/users/118319/" ]
In case you are using the Skype App, removing the context menu item is trickier. One way is to delete `DllPath` under ``` HKEY_CLASSES_ROOT\PackagedCom\Package\Microsoft.SkypeApp_15.61.100.0_x86__kzf8qxf38zg5c\Class\{776DBC8D-7347-478C-8D71-791E12EF49D8} ``` However updates to the app will probably restore this. A...
There are two main entries for "Share with Skype" in registry. * To disable one from `Skype for Desktop` use following `.reg` file: ``` Windows Registry Editor Version 5.00 [HKEY_CLASSES_ROOT\*\shell\ShareWithSkype] "LegacyDisable"="" ``` Method above survives reinstall. It also survives install if `.reg` file is ...
1,539,772
I am trying to `move` folder and files from one location to another on the same mapped network drive. I have used ROBOCOPY and XCOPY. However, they copy and then delete the files. My files can be over 50GB, thus I want to MOVE. ``` move "P:\public\video\recording\123\*.*" "P:\public\video\recording\" move /S "P:\publ...
2020/04/07
[ "https://superuser.com/questions/1539772", "https://superuser.com", "https://superuser.com/users/118319/" ]
**Yet another update:** Works in Windows 11 too. **Update:** Works in Windows 10 version 21H1 too. Original answer: As of Windows 10 version 2004, you can do the following to remove the "Share with Skype" from the context menu: 1. Run the following `REG ADD` command in an elevated cmd: ``` REG ADD "HKLM\SOFTWARE...
There are two main entries for "Share with Skype" in registry. * To disable one from `Skype for Desktop` use following `.reg` file: ``` Windows Registry Editor Version 5.00 [HKEY_CLASSES_ROOT\*\shell\ShareWithSkype] "LegacyDisable"="" ``` Method above survives reinstall. It also survives install if `.reg` file is ...
1,539,772
I am trying to `move` folder and files from one location to another on the same mapped network drive. I have used ROBOCOPY and XCOPY. However, they copy and then delete the files. My files can be over 50GB, thus I want to MOVE. ``` move "P:\public\video\recording\123\*.*" "P:\public\video\recording\" move /S "P:\publ...
2020/04/07
[ "https://superuser.com/questions/1539772", "https://superuser.com", "https://superuser.com/users/118319/" ]
There are two main entries for "Share with Skype" in registry. * To disable one from `Skype for Desktop` use following `.reg` file: ``` Windows Registry Editor Version 5.00 [HKEY_CLASSES_ROOT\*\shell\ShareWithSkype] "LegacyDisable"="" ``` Method above survives reinstall. It also survives install if `.reg` file is ...
Just a reminder, that uninstalling Skype will of course also fix the issue.
1,539,772
I am trying to `move` folder and files from one location to another on the same mapped network drive. I have used ROBOCOPY and XCOPY. However, they copy and then delete the files. My files can be over 50GB, thus I want to MOVE. ``` move "P:\public\video\recording\123\*.*" "P:\public\video\recording\" move /S "P:\publ...
2020/04/07
[ "https://superuser.com/questions/1539772", "https://superuser.com", "https://superuser.com/users/118319/" ]
In case you are using the Skype App, removing the context menu item is trickier. One way is to delete `DllPath` under ``` HKEY_CLASSES_ROOT\PackagedCom\Package\Microsoft.SkypeApp_15.61.100.0_x86__kzf8qxf38zg5c\Class\{776DBC8D-7347-478C-8D71-791E12EF49D8} ``` However updates to the app will probably restore this. A...
Just a reminder, that uninstalling Skype will of course also fix the issue.
1,539,772
I am trying to `move` folder and files from one location to another on the same mapped network drive. I have used ROBOCOPY and XCOPY. However, they copy and then delete the files. My files can be over 50GB, thus I want to MOVE. ``` move "P:\public\video\recording\123\*.*" "P:\public\video\recording\" move /S "P:\publ...
2020/04/07
[ "https://superuser.com/questions/1539772", "https://superuser.com", "https://superuser.com/users/118319/" ]
In case you are using the Skype App, removing the context menu item is trickier. One way is to delete `DllPath` under ``` HKEY_CLASSES_ROOT\PackagedCom\Package\Microsoft.SkypeApp_15.61.100.0_x86__kzf8qxf38zg5c\Class\{776DBC8D-7347-478C-8D71-791E12EF49D8} ``` However updates to the app will probably restore this. A...
**Yet another update:** Works in Windows 11 too. **Update:** Works in Windows 10 version 21H1 too. Original answer: As of Windows 10 version 2004, you can do the following to remove the "Share with Skype" from the context menu: 1. Run the following `REG ADD` command in an elevated cmd: ``` REG ADD "HKLM\SOFTWARE...
59,729,547
I have a series of bat files that I want to run in parallel, for example: ``` start program1_1.bat start program1_2.bat start program1_3.bat wait until program1 finished then start program2_1.bat start program2_2.bat start program2_3.bat wait until program2 finished then ... ``` So far, what I've tried is this [func...
2020/01/14
[ "https://Stackoverflow.com/questions/59729547", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11369131/" ]
**\* *Update* \*** The solution provided [here](https://stackoverflow.com/a/33585114/12343998) works nicely to achieve parallel running of subprograms without needing user entry (pause) or a fixed length Timeout between program groups. Combined with the original answer: ``` @echo off :controller Call :launcher "pr...
Try `/WAIT` switch on `start` command. I guess if you wrap bats into script called with wait switch, it could work.
59,729,547
I have a series of bat files that I want to run in parallel, for example: ``` start program1_1.bat start program1_2.bat start program1_3.bat wait until program1 finished then start program2_1.bat start program2_2.bat start program2_3.bat wait until program2 finished then ... ``` So far, what I've tried is this [func...
2020/01/14
[ "https://Stackoverflow.com/questions/59729547", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11369131/" ]
Your question is a little vague on the exact expected results. I am however assuming that you want to do something like this. ``` start /wait program1_1.bat | start /wait program1_2.bat | start /wait program1_3.bat start /wait program2_1.bat | start /wait program2_2.bat | start /wait program2_3.bat ``` The single p...
Try `/WAIT` switch on `start` command. I guess if you wrap bats into script called with wait switch, it could work.
59,729,547
I have a series of bat files that I want to run in parallel, for example: ``` start program1_1.bat start program1_2.bat start program1_3.bat wait until program1 finished then start program2_1.bat start program2_2.bat start program2_3.bat wait until program2 finished then ... ``` So far, what I've tried is this [func...
2020/01/14
[ "https://Stackoverflow.com/questions/59729547", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11369131/" ]
Ok, here is what worked for me: ``` @echo off setlocal enableextensions enabledelayedexpansion call :InitDos start program1_1.bat start program1_2.bat start program1_3.bat call :waitForFinish start program2_1.bat start program2_2.bat start program2_3.bat call :waitForFinish Goto:eof : waitForFinish set /a counter=0 fo...
Try `/WAIT` switch on `start` command. I guess if you wrap bats into script called with wait switch, it could work.
59,729,547
I have a series of bat files that I want to run in parallel, for example: ``` start program1_1.bat start program1_2.bat start program1_3.bat wait until program1 finished then start program2_1.bat start program2_2.bat start program2_3.bat wait until program2 finished then ... ``` So far, what I've tried is this [func...
2020/01/14
[ "https://Stackoverflow.com/questions/59729547", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11369131/" ]
Your question is a little vague on the exact expected results. I am however assuming that you want to do something like this. ``` start /wait program1_1.bat | start /wait program1_2.bat | start /wait program1_3.bat start /wait program2_1.bat | start /wait program2_2.bat | start /wait program2_3.bat ``` The single p...
**\* *Update* \*** The solution provided [here](https://stackoverflow.com/a/33585114/12343998) works nicely to achieve parallel running of subprograms without needing user entry (pause) or a fixed length Timeout between program groups. Combined with the original answer: ``` @echo off :controller Call :launcher "pr...
59,729,547
I have a series of bat files that I want to run in parallel, for example: ``` start program1_1.bat start program1_2.bat start program1_3.bat wait until program1 finished then start program2_1.bat start program2_2.bat start program2_3.bat wait until program2 finished then ... ``` So far, what I've tried is this [func...
2020/01/14
[ "https://Stackoverflow.com/questions/59729547", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11369131/" ]
Your question is a little vague on the exact expected results. I am however assuming that you want to do something like this. ``` start /wait program1_1.bat | start /wait program1_2.bat | start /wait program1_3.bat start /wait program2_1.bat | start /wait program2_2.bat | start /wait program2_3.bat ``` The single p...
Ok, here is what worked for me: ``` @echo off setlocal enableextensions enabledelayedexpansion call :InitDos start program1_1.bat start program1_2.bat start program1_3.bat call :waitForFinish start program2_1.bat start program2_2.bat start program2_3.bat call :waitForFinish Goto:eof : waitForFinish set /a counter=0 fo...
208,002
I'm new to LaTeX and I have a question about the LaTeX code (which I have to do for my essay), for the inner product of vectors on an exponential\*,how can I fix the problem that the two vektors k and x have their vectors taht are not parallel . *The vector of k is much higher that the vector in x* ( I use the command ...
2014/10/19
[ "https://tex.stackexchange.com/questions/208002", "https://tex.stackexchange.com", "https://tex.stackexchange.com/users/64448/" ]
Actually, X11 is not erased but moved to /opt/X11. So, the simplest solution would probably be to manually add the symbolic link from /usr/X11 to /opt/X11: ``` sudo ln -s /opt/X11 /usr/X11 ```
Fixed after installing the latest XQuartz: <http://xquartz.macosforge.org/landing/> The problem seems to be related to the fact that X11 was erased during the upgrade.
208,002
I'm new to LaTeX and I have a question about the LaTeX code (which I have to do for my essay), for the inner product of vectors on an exponential\*,how can I fix the problem that the two vektors k and x have their vectors taht are not parallel . *The vector of k is much higher that the vector in x* ( I use the command ...
2014/10/19
[ "https://tex.stackexchange.com/questions/208002", "https://tex.stackexchange.com", "https://tex.stackexchange.com/users/64448/" ]
Fixed after installing the latest XQuartz: <http://xquartz.macosforge.org/landing/> The problem seems to be related to the fact that X11 was erased during the upgrade.
I had the exact same problem with another program that was working prior to upgrading to OS X Yosemite, and then returned the following error subsequent to upgrading: ``` dyld: Library not loaded: /usr/X11/lib/libX11.6.dylib Referenced from: /Users/grosbj/LANL/MCNP5/bin/mcnp5 Reason: image not found Trace/BPT trap...