qid
int64
1
74.7M
question
stringlengths
15
58.3k
date
stringlengths
10
10
metadata
list
response_j
stringlengths
4
30.2k
response_k
stringlengths
11
36.5k
3,320,118
Suppose I have a server that runs on Linux on which I would like to develop software (mainly OCaml, C/C++ and Java). Is there a way to "remote develop" these things? I mean an IDE that allows me to modify files remotely (they are then uploaded when modified and saved) and to compile through SSH (basically invoking `ma...
2010/07/23
[ "https://Stackoverflow.com/questions/3320118", "https://Stackoverflow.com", "https://Stackoverflow.com/users/121747/" ]
Using a build tool (Hudson for example) you could put a build agent on your remote server, check your changes into your repository as normal, and have it do a build when you check in changes (it will either do a repository hook or poll for changes, probably). Your build process will be the same, it will simply be autom...
I use `vim` for remote development. (Well, I use vim also non-remote.)
3,320,118
Suppose I have a server that runs on Linux on which I would like to develop software (mainly OCaml, C/C++ and Java). Is there a way to "remote develop" these things? I mean an IDE that allows me to modify files remotely (they are then uploaded when modified and saved) and to compile through SSH (basically invoking `ma...
2010/07/23
[ "https://Stackoverflow.com/questions/3320118", "https://Stackoverflow.com", "https://Stackoverflow.com/users/121747/" ]
Well the simplest idea I can think of, though it is rather brute force would be to just open up a file share to the server and then edit the file directly through Eclipse. If that doesn't work for Java at least you could make use of Maven to do some of those tasks. I am less certain about invoking Make though.
Depending on how 'remote' this is; why not ssh in and run the IDE remotely over X?
3,320,118
Suppose I have a server that runs on Linux on which I would like to develop software (mainly OCaml, C/C++ and Java). Is there a way to "remote develop" these things? I mean an IDE that allows me to modify files remotely (they are then uploaded when modified and saved) and to compile through SSH (basically invoking `ma...
2010/07/23
[ "https://Stackoverflow.com/questions/3320118", "https://Stackoverflow.com", "https://Stackoverflow.com/users/121747/" ]
You can use X11 forwarding. Even if you are [connecting from a Windows machine](http://www.math.umn.edu/systems_guide/putty_xwin32.html). If you are on Linux, connecting with ssh -Y might work right out of the box for you: ``` ssh -Y user@your_server eclipse & ```
If you already have a linux server then I would suggest setting up a simple VPN server. I have done this in the past and it works pretty well. This way you can connect and modify/build your files with any "local" OS. I did this cause I use mac, pc and linux through various parts of the day and in multiple locations, so...
3,320,118
Suppose I have a server that runs on Linux on which I would like to develop software (mainly OCaml, C/C++ and Java). Is there a way to "remote develop" these things? I mean an IDE that allows me to modify files remotely (they are then uploaded when modified and saved) and to compile through SSH (basically invoking `ma...
2010/07/23
[ "https://Stackoverflow.com/questions/3320118", "https://Stackoverflow.com", "https://Stackoverflow.com/users/121747/" ]
emacs has [tramp](http://www.gnu.org/software/emacs/manual/html_node/tramp/index.html), which lets you both open and save remote files, and open a shell on a remote system. Working with tramp is almost exactly like working with local files, except for the filename. To open 'foo.c' on the machine 'bork' as user 'joe' I ...
If a friendly file editor is enough for you then I'd recommend to use [Jupyter](https://jupyter.org). * Super fast installation * Built in server/file editor that starts with one command
3,320,118
Suppose I have a server that runs on Linux on which I would like to develop software (mainly OCaml, C/C++ and Java). Is there a way to "remote develop" these things? I mean an IDE that allows me to modify files remotely (they are then uploaded when modified and saved) and to compile through SSH (basically invoking `ma...
2010/07/23
[ "https://Stackoverflow.com/questions/3320118", "https://Stackoverflow.com", "https://Stackoverflow.com/users/121747/" ]
I think your answer is IDE-centric. KDE's ioslaves support access over both SFTP and SSH (using fish, which uses a Perl script uploaded to the remote machine). I believe Gnome also has a virtual file system (gvfs) which supports remote filesystem access. My recommendation, therefore, is to choose an IDE which support...
emacs has [tramp](http://www.gnu.org/software/emacs/manual/html_node/tramp/index.html), which lets you both open and save remote files, and open a shell on a remote system. Working with tramp is almost exactly like working with local files, except for the filename. To open 'foo.c' on the machine 'bork' as user 'joe' I ...
3,320,118
Suppose I have a server that runs on Linux on which I would like to develop software (mainly OCaml, C/C++ and Java). Is there a way to "remote develop" these things? I mean an IDE that allows me to modify files remotely (they are then uploaded when modified and saved) and to compile through SSH (basically invoking `ma...
2010/07/23
[ "https://Stackoverflow.com/questions/3320118", "https://Stackoverflow.com", "https://Stackoverflow.com/users/121747/" ]
emacs has [tramp](http://www.gnu.org/software/emacs/manual/html_node/tramp/index.html), which lets you both open and save remote files, and open a shell on a remote system. Working with tramp is almost exactly like working with local files, except for the filename. To open 'foo.c' on the machine 'bork' as user 'joe' I ...
One IDE that supports exactly your language set is [Nuclide](https://nuclide.io/docs/features/remote/). It adds some packages to Atom and is used internally in Facebook exactly as you have described - full-fledged remote development in C++, Java, and Ocaml.
3,320,118
Suppose I have a server that runs on Linux on which I would like to develop software (mainly OCaml, C/C++ and Java). Is there a way to "remote develop" these things? I mean an IDE that allows me to modify files remotely (they are then uploaded when modified and saved) and to compile through SSH (basically invoking `ma...
2010/07/23
[ "https://Stackoverflow.com/questions/3320118", "https://Stackoverflow.com", "https://Stackoverflow.com/users/121747/" ]
Depending on how 'remote' this is; why not ssh in and run the IDE remotely over X?
Use vim or emacs since they will offer you speed. I know there is a learning curve associated with these editors; but once you get comfortable in any of them; you will be able to work on them as good as with Eclipse or any other IDE.
3,320,118
Suppose I have a server that runs on Linux on which I would like to develop software (mainly OCaml, C/C++ and Java). Is there a way to "remote develop" these things? I mean an IDE that allows me to modify files remotely (they are then uploaded when modified and saved) and to compile through SSH (basically invoking `ma...
2010/07/23
[ "https://Stackoverflow.com/questions/3320118", "https://Stackoverflow.com", "https://Stackoverflow.com/users/121747/" ]
Using a build tool (Hudson for example) you could put a build agent on your remote server, check your changes into your repository as normal, and have it do a build when you check in changes (it will either do a repository hook or poll for changes, probably). Your build process will be the same, it will simply be autom...
Use vim or emacs since they will offer you speed. I know there is a learning curve associated with these editors; but once you get comfortable in any of them; you will be able to work on them as good as with Eclipse or any other IDE.
3,320,118
Suppose I have a server that runs on Linux on which I would like to develop software (mainly OCaml, C/C++ and Java). Is there a way to "remote develop" these things? I mean an IDE that allows me to modify files remotely (they are then uploaded when modified and saved) and to compile through SSH (basically invoking `ma...
2010/07/23
[ "https://Stackoverflow.com/questions/3320118", "https://Stackoverflow.com", "https://Stackoverflow.com/users/121747/" ]
Well the simplest idea I can think of, though it is rather brute force would be to just open up a file share to the server and then edit the file directly through Eclipse. If that doesn't work for Java at least you could make use of Maven to do some of those tasks. I am less certain about invoking Make though.
I use `vim` for remote development. (Well, I use vim also non-remote.)
3,320,118
Suppose I have a server that runs on Linux on which I would like to develop software (mainly OCaml, C/C++ and Java). Is there a way to "remote develop" these things? I mean an IDE that allows me to modify files remotely (they are then uploaded when modified and saved) and to compile through SSH (basically invoking `ma...
2010/07/23
[ "https://Stackoverflow.com/questions/3320118", "https://Stackoverflow.com", "https://Stackoverflow.com/users/121747/" ]
You can use X11 forwarding. Even if you are [connecting from a Windows machine](http://www.math.umn.edu/systems_guide/putty_xwin32.html). If you are on Linux, connecting with ssh -Y might work right out of the box for you: ``` ssh -Y user@your_server eclipse & ```
emacs has [tramp](http://www.gnu.org/software/emacs/manual/html_node/tramp/index.html), which lets you both open and save remote files, and open a shell on a remote system. Working with tramp is almost exactly like working with local files, except for the filename. To open 'foo.c' on the machine 'bork' as user 'joe' I ...
31,628,929
In order to understand how to use monad transformers, I wrote the following code without one. It reads standard input line by line and displays each line reversed until an empty line is encountered. It also counts the lines using `State` and in the end displays the total number. ``` import Control.Monad.State main = ...
2015/07/25
[ "https://Stackoverflow.com/questions/31628929", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3777717/" ]
You'd just need to run the accumulated state computation on every line. This is O(n²) time, but since your first program is already using O(n) space, that's not too terrible. Of course, the `StateT` approach is superior in pretty much every way! If you really want to do it "by hand" and not pay an efficiency price, jus...
Maybe this is what you are looking for? ``` main = print =<< fmap (`evalState` 0) (go get) where go :: State Int Int -> IO (State Int Int) go st = do l <- getLine if null l then return (st >>= \_ -> get) else do let ln = evalState st 0 putStrLn(show ln ++ ' ' : reverse l) ...
31,628,929
In order to understand how to use monad transformers, I wrote the following code without one. It reads standard input line by line and displays each line reversed until an empty line is encountered. It also counts the lines using `State` and in the end displays the total number. ``` import Control.Monad.State main = ...
2015/07/25
[ "https://Stackoverflow.com/questions/31628929", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3777717/" ]
The problem you're having is that the hand-unrolling of `StateT s IO a` is `s -> IO (s, a)`, not `IO (s -> (s, a))`! Once you have this insight, it's pretty easy to see how to do it: ``` go :: Int -> IO (Int, Int) go s = do l <- getLine if null l then return (s, s) else do putStrLn (show s ++ '...
You'd just need to run the accumulated state computation on every line. This is O(n²) time, but since your first program is already using O(n) space, that's not too terrible. Of course, the `StateT` approach is superior in pretty much every way! If you really want to do it "by hand" and not pay an efficiency price, jus...
31,628,929
In order to understand how to use monad transformers, I wrote the following code without one. It reads standard input line by line and displays each line reversed until an empty line is encountered. It also counts the lines using `State` and in the end displays the total number. ``` import Control.Monad.State main = ...
2015/07/25
[ "https://Stackoverflow.com/questions/31628929", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3777717/" ]
The problem you're having is that the hand-unrolling of `StateT s IO a` is `s -> IO (s, a)`, not `IO (s -> (s, a))`! Once you have this insight, it's pretty easy to see how to do it: ``` go :: Int -> IO (Int, Int) go s = do l <- getLine if null l then return (s, s) else do putStrLn (show s ++ '...
Maybe this is what you are looking for? ``` main = print =<< fmap (`evalState` 0) (go get) where go :: State Int Int -> IO (State Int Int) go st = do l <- getLine if null l then return (st >>= \_ -> get) else do let ln = evalState st 0 putStrLn(show ln ++ ' ' : reverse l) ...
3,821,852
While reading answers to [this question](https://stackoverflow.com/questions/3821261/null-check-before-deleting-an-object) I noticed that answers ([this](https://stackoverflow.com/questions/3821261/null-check-before-deleting-an-object/3821277#3821277) for example) imply that `operator delete` can be called even when `d...
2010/09/29
[ "https://Stackoverflow.com/questions/3821852", "https://Stackoverflow.com", "https://Stackoverflow.com/users/57428/" ]
The language in the upcoming C++0x standard (section 5.3.5 `[expr.delete]`) is as follows: > > If the value of the operand of > the delete-expression is not a null > pointer value, the delete-expression > will call a deallocation function > (3.7.4.2). Otherwise, it is > unspecified whether the deallocation > fu...
Operator delete is just like any other operator, why wouldn't it be invoked? It can't examine its arguments *before* being invoked. This is like asking why `operator+` is invoked when you're adding 0.
36,605,154
I am using Bootstrap to create a user profile page where the image is on the left-hand side and users details on the right-hand side. I used it in the following way: ``` <div class="row"> <!-- Col 1 --> <div class="col-md-4 col-xs-6"> <div> <img ..> <h2>Name ...
2016/04/13
[ "https://Stackoverflow.com/questions/36605154", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6120460/" ]
The class that you need is `center-block`
Try to put `col-xs-4` CSS class in the DIVs: ``` <div class="col-md-4 col-xs-4"> ``` This way, the behavior in mobile devices will be the same of desktop.
177,329
After graduating high school, I enrolled at university to study subject A. But due to a combination of things (major health issues, family problems, isolation and no support) I didn't perform as well as I'd expected on my exams. This was the first time in my life I struggled academically and, being a true perfectionist...
2021/08/07
[ "https://workplace.stackexchange.com/questions/177329", "https://workplace.stackexchange.com", "https://workplace.stackexchange.com/users/128807/" ]
I don't consider it lying, the resume is your presentation card, you put there the things you see as more relevant to the job you are applying for (I would not write that I have social anxiety on my resume or that time I started a Coursera career and never completed it). I would think about adding it if you have a 1-2...
> > This was the first time in my life I struggled academically and, being a true perfectionist, I was completely discouraged, thought I had no future in A and soon left the program. > > > Ok, spin it slightly more positive and keep it as an answer for the interview, but if I as an interviewer would come across su...
177,329
After graduating high school, I enrolled at university to study subject A. But due to a combination of things (major health issues, family problems, isolation and no support) I didn't perform as well as I'd expected on my exams. This was the first time in my life I struggled academically and, being a true perfectionist...
2021/08/07
[ "https://workplace.stackexchange.com/questions/177329", "https://workplace.stackexchange.com", "https://workplace.stackexchange.com/users/128807/" ]
In my opinion, leaving anything out in a resume, would make a recruiter suspect something or does not believe/trust you. Even though you’re not lying, it would appear that you’re hiding something. He/she might identify an empty gap, and ask you about it, and you have to explain it, It’s better to list a “failure” then ...
Omitting is not lying but I would recommend being open about it. If you were a more experienced person. I would drop it completely. You would be judged primarily based on your past work experience and something that caused a delay to your degree is ancient history. However when you are starting out, your degree is far ...
177,329
After graduating high school, I enrolled at university to study subject A. But due to a combination of things (major health issues, family problems, isolation and no support) I didn't perform as well as I'd expected on my exams. This was the first time in my life I struggled academically and, being a true perfectionist...
2021/08/07
[ "https://workplace.stackexchange.com/questions/177329", "https://workplace.stackexchange.com", "https://workplace.stackexchange.com/users/128807/" ]
I don't consider it lying, the resume is your presentation card, you put there the things you see as more relevant to the job you are applying for (I would not write that I have social anxiety on my resume or that time I started a Coursera career and never completed it). I would think about adding it if you have a 1-2...
Omitting is not lying but I would recommend being open about it. If you were a more experienced person. I would drop it completely. You would be judged primarily based on your past work experience and something that caused a delay to your degree is ancient history. However when you are starting out, your degree is far ...
177,329
After graduating high school, I enrolled at university to study subject A. But due to a combination of things (major health issues, family problems, isolation and no support) I didn't perform as well as I'd expected on my exams. This was the first time in my life I struggled academically and, being a true perfectionist...
2021/08/07
[ "https://workplace.stackexchange.com/questions/177329", "https://workplace.stackexchange.com", "https://workplace.stackexchange.com/users/128807/" ]
In my opinion, leaving anything out in a resume, would make a recruiter suspect something or does not believe/trust you. Even though you’re not lying, it would appear that you’re hiding something. He/she might identify an empty gap, and ask you about it, and you have to explain it, It’s better to list a “failure” then ...
> > This was the first time in my life I struggled academically and, being a true perfectionist, I was completely discouraged, thought I had no future in A and soon left the program. > > > Ok, spin it slightly more positive and keep it as an answer for the interview, but if I as an interviewer would come across su...
177,329
After graduating high school, I enrolled at university to study subject A. But due to a combination of things (major health issues, family problems, isolation and no support) I didn't perform as well as I'd expected on my exams. This was the first time in my life I struggled academically and, being a true perfectionist...
2021/08/07
[ "https://workplace.stackexchange.com/questions/177329", "https://workplace.stackexchange.com", "https://workplace.stackexchange.com/users/128807/" ]
In my opinion, leaving anything out in a resume, would make a recruiter suspect something or does not believe/trust you. Even though you’re not lying, it would appear that you’re hiding something. He/she might identify an empty gap, and ask you about it, and you have to explain it, It’s better to list a “failure” then ...
Also germany here: Include it. I dropped out TWICE and I included it. Because I dont want any gaps and some companies actually treat it positively. I got better pay because of it. You just have to find good arguments why. I for one told everyone that one I had to work to afford it, so I had a lot less time for studyi...
177,329
After graduating high school, I enrolled at university to study subject A. But due to a combination of things (major health issues, family problems, isolation and no support) I didn't perform as well as I'd expected on my exams. This was the first time in my life I struggled academically and, being a true perfectionist...
2021/08/07
[ "https://workplace.stackexchange.com/questions/177329", "https://workplace.stackexchange.com", "https://workplace.stackexchange.com/users/128807/" ]
I would suggest you leave program A out of your resume. Only mention program B that you have received a degree for. If you're concerned about showing a gap on the resume, simply drop your high school from it. If you have a university degree it's just a redundant piece of information anyway. You might think this is imp...
Also germany here: Include it. I dropped out TWICE and I included it. Because I dont want any gaps and some companies actually treat it positively. I got better pay because of it. You just have to find good arguments why. I for one told everyone that one I had to work to afford it, so I had a lot less time for studyi...
177,329
After graduating high school, I enrolled at university to study subject A. But due to a combination of things (major health issues, family problems, isolation and no support) I didn't perform as well as I'd expected on my exams. This was the first time in my life I struggled academically and, being a true perfectionist...
2021/08/07
[ "https://workplace.stackexchange.com/questions/177329", "https://workplace.stackexchange.com", "https://workplace.stackexchange.com/users/128807/" ]
I would suggest you leave program A out of your resume. Only mention program B that you have received a degree for. If you're concerned about showing a gap on the resume, simply drop your high school from it. If you have a university degree it's just a redundant piece of information anyway. You might think this is imp...
> > This was the first time in my life I struggled academically and, being a true perfectionist, I was completely discouraged, thought I had no future in A and soon left the program. > > > Ok, spin it slightly more positive and keep it as an answer for the interview, but if I as an interviewer would come across su...
177,329
After graduating high school, I enrolled at university to study subject A. But due to a combination of things (major health issues, family problems, isolation and no support) I didn't perform as well as I'd expected on my exams. This was the first time in my life I struggled academically and, being a true perfectionist...
2021/08/07
[ "https://workplace.stackexchange.com/questions/177329", "https://workplace.stackexchange.com", "https://workplace.stackexchange.com/users/128807/" ]
I don't consider it lying, the resume is your presentation card, you put there the things you see as more relevant to the job you are applying for (I would not write that I have social anxiety on my resume or that time I started a Coursera career and never completed it). I would think about adding it if you have a 1-2...
Also germany here: Include it. I dropped out TWICE and I included it. Because I dont want any gaps and some companies actually treat it positively. I got better pay because of it. You just have to find good arguments why. I for one told everyone that one I had to work to afford it, so I had a lot less time for studyi...
177,329
After graduating high school, I enrolled at university to study subject A. But due to a combination of things (major health issues, family problems, isolation and no support) I didn't perform as well as I'd expected on my exams. This was the first time in my life I struggled academically and, being a true perfectionist...
2021/08/07
[ "https://workplace.stackexchange.com/questions/177329", "https://workplace.stackexchange.com", "https://workplace.stackexchange.com/users/128807/" ]
"Europe" is not a country nor has it any job application rules across all countries, so I'll give you a German thought on this: Omitting something is not lying, so you cannot later be fired if they found out what it is. **But**, if you have a gap in your chronological CV, I will assume it's something so horrible that...
I don't consider it lying, the resume is your presentation card, you put there the things you see as more relevant to the job you are applying for (I would not write that I have social anxiety on my resume or that time I started a Coursera career and never completed it). I would think about adding it if you have a 1-2...
177,329
After graduating high school, I enrolled at university to study subject A. But due to a combination of things (major health issues, family problems, isolation and no support) I didn't perform as well as I'd expected on my exams. This was the first time in my life I struggled academically and, being a true perfectionist...
2021/08/07
[ "https://workplace.stackexchange.com/questions/177329", "https://workplace.stackexchange.com", "https://workplace.stackexchange.com/users/128807/" ]
> > This was the first time in my life I struggled academically and, being a true perfectionist, I was completely discouraged, thought I had no future in A and soon left the program. > > > Ok, spin it slightly more positive and keep it as an answer for the interview, but if I as an interviewer would come across su...
Omitting is not lying but I would recommend being open about it. If you were a more experienced person. I would drop it completely. You would be judged primarily based on your past work experience and something that caused a delay to your degree is ancient history. However when you are starting out, your degree is far ...
2,631,614
I am unable to override attributes when using <include> in my Android layout files. When I searched for bugs, I found Declined [Issue 2863](http://code.google.com/p/android/issues/detail?id=2863): "include tag is broken (overriding layout params never works)" Since Romain indicates this works in the test suites and h...
2010/04/13
[ "https://Stackoverflow.com/questions/2631614", "https://Stackoverflow.com", "https://Stackoverflow.com/users/40257/" ]
I just found the issue. First, you can only override layout\_\* attributes, so the background won't work. That is documented behavior and simply an oversight on my part. The real problem is found in LayoutInflater.java: ``` // We try to load the layout params set in the <include /> tag. If // they don't exist, we wil...
I found I sometimes miss including the android:id tag when using the GUI builder in Eclipse. Making sure (when I notice) that I add into a TextView from the builder , the id I'm using in the ListView layout. ``` <TextView android:text="@+id/textView1" android:layout_width="wrap_content" android:layout...
2,631,614
I am unable to override attributes when using <include> in my Android layout files. When I searched for bugs, I found Declined [Issue 2863](http://code.google.com/p/android/issues/detail?id=2863): "include tag is broken (overriding layout params never works)" Since Romain indicates this works in the test suites and h...
2010/04/13
[ "https://Stackoverflow.com/questions/2631614", "https://Stackoverflow.com", "https://Stackoverflow.com/users/40257/" ]
I just found the issue. First, you can only override layout\_\* attributes, so the background won't work. That is documented behavior and simply an oversight on my part. The real problem is found in LayoutInflater.java: ``` // We try to load the layout params set in the <include /> tag. If // they don't exist, we wil...
I submitted an [enhancement request](http://code.google.com/p/android/issues/detail?id=38023) to allow all included attributes to be overridden: > > Suppose I have two identical layouts other than the values of a > `TextView` field. Presently, I either have modify the layout at > runtime or duplicate the XML. > >...
2,631,614
I am unable to override attributes when using <include> in my Android layout files. When I searched for bugs, I found Declined [Issue 2863](http://code.google.com/p/android/issues/detail?id=2863): "include tag is broken (overriding layout params never works)" Since Romain indicates this works in the test suites and h...
2010/04/13
[ "https://Stackoverflow.com/questions/2631614", "https://Stackoverflow.com", "https://Stackoverflow.com/users/40257/" ]
I submitted an [enhancement request](http://code.google.com/p/android/issues/detail?id=38023) to allow all included attributes to be overridden: > > Suppose I have two identical layouts other than the values of a > `TextView` field. Presently, I either have modify the layout at > runtime or duplicate the XML. > >...
I found I sometimes miss including the android:id tag when using the GUI builder in Eclipse. Making sure (when I notice) that I add into a TextView from the builder , the id I'm using in the ListView layout. ``` <TextView android:text="@+id/textView1" android:layout_width="wrap_content" android:layout...
55,233,002
I need to make a div that covers my entire screen be displayed before an sync ajax call. But it seems that absolutely nothing I try to do causes the DOM to be modified to show this div before the ajax call. The screen gets "frozen" and the div is showed only after the ajax call is executed. I have already tried "thou...
2019/03/19
[ "https://Stackoverflow.com/questions/55233002", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3223785/" ]
I have written the following for you. PLEASE LOOK AT THE FOLLOWING EXAMPLE IN MY GITHUB --- > > [MyGithubLink](https://github.com/MrFiniOrg/AJAX) > > > --- as I have a fully working example that I have tried my best to assist you with. here you will see the use of Jquery CallBack Methods and the promise framew...
A **workaround** is to use the function below that allows a "loading screen" to be displayed on the system when we make synchronous calls ("ajax"). It can be easily adapted for use with legacy codes. Realize that "ajax" blocks the modification of the "DOM" even though IT IS EXECUTED BEFORE THIS CALL. This approach wil...
72,835,563
I want to take in a str via usr\_input = input("Input here: ") and then check if that string starts with two digits. Thanks in advance for any help.
2022/07/02
[ "https://Stackoverflow.com/questions/72835563", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
try this: ``` usr_input = input("Input here: ") if(len(usr_input) >= 2 and usr_input[:2].isdigit()): print('yes') # write your code here ```
luckily, there's a method for this. a solution is ``` def begins_with_two_digits(your_str): first=your_str[0] second=your_str[1] if first.isdigit() and second.isdigit(): return True else: return False ``` the .isdigit() method will check if the first and second characters are digits....
72,835,563
I want to take in a str via usr\_input = input("Input here: ") and then check if that string starts with two digits. Thanks in advance for any help.
2022/07/02
[ "https://Stackoverflow.com/questions/72835563", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
For the sake of variety: ``` import re string=input() bool(re.search(r'^\d{2}',string)) ```
luckily, there's a method for this. a solution is ``` def begins_with_two_digits(your_str): first=your_str[0] second=your_str[1] if first.isdigit() and second.isdigit(): return True else: return False ``` the .isdigit() method will check if the first and second characters are digits....
72,835,563
I want to take in a str via usr\_input = input("Input here: ") and then check if that string starts with two digits. Thanks in advance for any help.
2022/07/02
[ "https://Stackoverflow.com/questions/72835563", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
try this: ``` usr_input = input("Input here: ") if(len(usr_input) >= 2 and usr_input[:2].isdigit()): print('yes') # write your code here ```
For the sake of variety: ``` import re string=input() bool(re.search(r'^\d{2}',string)) ```
44,142
This [Wikipedia article](https://en.wikipedia.org/wiki/Master/slave_(technology)) on Master/Slave as defined in technology also include the following: > > In 2003, the County of Los Angeles in California asked that > manufacturers, suppliers and contractors stop using "master" and > "slave" terminology on products;...
2019/09/01
[ "https://politics.stackexchange.com/questions/44142", "https://politics.stackexchange.com", "https://politics.stackexchange.com/users/11278/" ]
It sometimes happens with hot button topics. See for instance race, where terms such as "[negro](https://en.wikipedia.org/wiki/Negro#United_States)" or "[mulatto](https://en.wikipedia.org/wiki/Mulatto#United_States)" went into disuse in scientific publications and public discourse. Or in climate science, where you find...
**Yes** idiosyncratic usage advocacy, (whether politically correct, scientific, religious, or propagandistic), is not unusual in the US, but **no**, it's rarely applied and most often common sense eventually prevails. Most such articles boil down to the opinions of some outspoken dissenter, who tends to be articulate...
50,849,608
This is basically the same as this question: [Test iPhone in-app purchases on a different bundle?](https://stackoverflow.com/questions/2841591/test-iphone-in-app-purchases-on-a-different-bundle) from 2010 - which never had an accepted answer and for which both unaccepted answers are more conjecture than canonical. Wor...
2018/06/14
[ "https://Stackoverflow.com/questions/50849608", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1544669/" ]
You need to use the same **Bundle Identifier** for the same App to test IAP. 1. If your app contains the **DEV Mobile Provisioning Profile** then it is automatically linked to SandBox Mode. You just need to create Sandbox Testers to <https://itunesconnect.apple.com> 2. If you require to test **Auto Renew IAP** there i...
I was able to get it to work by simply creating another App Store Connect record with the dev bundle id (`com.companyname.appname.dev`) and then creating the same IAP configuration in both records. It's not pretty but it's better than having the same bundle id for multiple environments.
225,735
> > **Possible Duplicate:** > > [How to disable X at boot time?](https://askubuntu.com/questions/16371/how-to-disable-x-at-boot-time) > > > How do I boot Ubuntu by default into the CLI using a multiuser runlevel? I wish to still maintain my graphical desktop manager (GDM or whatever replaced it) since I do use...
2012/12/05
[ "https://askubuntu.com/questions/225735", "https://askubuntu.com", "https://askubuntu.com/users/36515/" ]
Add `text` as a kernel boot parameter. Explained in detail in [this answer](https://askubuntu.com/a/79682/88802) to a possible duplicate question *"How to disable X at boot time?"*.
[This Document Should help](https://help.ubuntu.com/community/UpstartHowto) Basically you edit /etc/init/rc-sysinit.conf and add/change > > env DEFAULT\_RUNLEVEL=2 > > >
13,903,007
Consider the following HTML: ``` <select data-bind="options: assemblies, optionsText: 'Name', value: selectedAssembly"> </select> Name <input type="text" data-bind="value: selectedAssembly().Name" /> ``` I'm retrieving assemblies array via jQuery AJAX: ``` [{"Id":1,"Name":"Foo"}, {"Id":2,"Name":"Bar"}] ``` selec...
2012/12/16
[ "https://Stackoverflow.com/questions/13903007", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1824269/" ]
header() should only be called before any HTML is rendered onto the page.
You can't use header after you already sent some data to client. You must put your check on top of your page, before even or anything else is sent. From: <http://php.net/manual/en/function.header.php> > > Remember that header() must be called before any actual output is sent, either by normal HTML tags, blank lines ...
13,903,007
Consider the following HTML: ``` <select data-bind="options: assemblies, optionsText: 'Name', value: selectedAssembly"> </select> Name <input type="text" data-bind="value: selectedAssembly().Name" /> ``` I'm retrieving assemblies array via jQuery AJAX: ``` [{"Id":1,"Name":"Foo"}, {"Id":2,"Name":"Bar"}] ``` selec...
2012/12/16
[ "https://Stackoverflow.com/questions/13903007", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1824269/" ]
header() should only be called before any HTML is rendered onto the page.
You can add `ob_start()` to the top of your PHP scripts. This will allow you to issue the header() even if you have already started creating the browser output stream. It will also make your scripts faster, since the repeated calls to send browser output will be avoided, with only a single call being made at the end of...
13,903,007
Consider the following HTML: ``` <select data-bind="options: assemblies, optionsText: 'Name', value: selectedAssembly"> </select> Name <input type="text" data-bind="value: selectedAssembly().Name" /> ``` I'm retrieving assemblies array via jQuery AJAX: ``` [{"Id":1,"Name":"Foo"}, {"Id":2,"Name":"Bar"}] ``` selec...
2012/12/16
[ "https://Stackoverflow.com/questions/13903007", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1824269/" ]
header() should only be called before any HTML is rendered onto the page.
Also, you might want to take note of this. The script relies on a function that has been removed from modern PHP. Please see the large red warning label on this web page. <http://php.net/manual/en/function.session-register.php> You may be able to read this article. It shows some of the common design patterns used for...
13,903,007
Consider the following HTML: ``` <select data-bind="options: assemblies, optionsText: 'Name', value: selectedAssembly"> </select> Name <input type="text" data-bind="value: selectedAssembly().Name" /> ``` I'm retrieving assemblies array via jQuery AJAX: ``` [{"Id":1,"Name":"Foo"}, {"Id":2,"Name":"Bar"}] ``` selec...
2012/12/16
[ "https://Stackoverflow.com/questions/13903007", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1824269/" ]
You can't use header after you already sent some data to client. You must put your check on top of your page, before even or anything else is sent. From: <http://php.net/manual/en/function.header.php> > > Remember that header() must be called before any actual output is sent, either by normal HTML tags, blank lines ...
You can add `ob_start()` to the top of your PHP scripts. This will allow you to issue the header() even if you have already started creating the browser output stream. It will also make your scripts faster, since the repeated calls to send browser output will be avoided, with only a single call being made at the end of...
13,903,007
Consider the following HTML: ``` <select data-bind="options: assemblies, optionsText: 'Name', value: selectedAssembly"> </select> Name <input type="text" data-bind="value: selectedAssembly().Name" /> ``` I'm retrieving assemblies array via jQuery AJAX: ``` [{"Id":1,"Name":"Foo"}, {"Id":2,"Name":"Bar"}] ``` selec...
2012/12/16
[ "https://Stackoverflow.com/questions/13903007", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1824269/" ]
Also, you might want to take note of this. The script relies on a function that has been removed from modern PHP. Please see the large red warning label on this web page. <http://php.net/manual/en/function.session-register.php> You may be able to read this article. It shows some of the common design patterns used for...
You can add `ob_start()` to the top of your PHP scripts. This will allow you to issue the header() even if you have already started creating the browser output stream. It will also make your scripts faster, since the repeated calls to send browser output will be avoided, with only a single call being made at the end of...
30,757,271
I want print only any result when $9 is greather than one hour how can i convert this to seconds? so i can use 3600sec for the check. $9 = duration of a call 00:00:00 `asterisk -rx "core show channels verbose" | awk '$9 > "01:00:00"' | awk '$6 == "Dial"' | wc -l > test.txt`
2015/06/10
[ "https://Stackoverflow.com/questions/30757271", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4994886/" ]
Three ways how to do it: The first one, set styles to `.a.b` and them remove them (override) for `.a.b.disabled`. ``` .a.b {color: red;} .a.b.disabled {color: grey} ``` <https://jsfiddle.net/p84s61gp/> The second way, use the `attr` selector. ``` [class='a b'] {color: red} ``` <https://jsfiddle.net/p84s61gp/1/>...
Use `:not()` css selector. `.a.b:not(.disabled)`
30,757,271
I want print only any result when $9 is greather than one hour how can i convert this to seconds? so i can use 3600sec for the check. $9 = duration of a call 00:00:00 `asterisk -rx "core show channels verbose" | awk '$9 > "01:00:00"' | awk '$6 == "Dial"' | wc -l > test.txt`
2015/06/10
[ "https://Stackoverflow.com/questions/30757271", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4994886/" ]
Three ways how to do it: The first one, set styles to `.a.b` and them remove them (override) for `.a.b.disabled`. ``` .a.b {color: red;} .a.b.disabled {color: grey} ``` <https://jsfiddle.net/p84s61gp/> The second way, use the `attr` selector. ``` [class='a b'] {color: red} ``` <https://jsfiddle.net/p84s61gp/1/>...
The `:not()` selector will help: ```css .a.b:not(.disabled) { color: red; } ``` ```html <div class="a b">how_can_i_select_ab_only</div> <div class="a b disabled">how_can_i_select_ab_and_disabled_only</div> ```
30,757,271
I want print only any result when $9 is greather than one hour how can i convert this to seconds? so i can use 3600sec for the check. $9 = duration of a call 00:00:00 `asterisk -rx "core show channels verbose" | awk '$9 > "01:00:00"' | awk '$6 == "Dial"' | wc -l > test.txt`
2015/06/10
[ "https://Stackoverflow.com/questions/30757271", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4994886/" ]
Three ways how to do it: The first one, set styles to `.a.b` and them remove them (override) for `.a.b.disabled`. ``` .a.b {color: red;} .a.b.disabled {color: grey} ``` <https://jsfiddle.net/p84s61gp/> The second way, use the `attr` selector. ``` [class='a b'] {color: red} ``` <https://jsfiddle.net/p84s61gp/1/>...
Try this, this should target div with class a AND disabled ``` .a.disabled {} ``` this should target div with class a AND b ``` .a.b {} ```
30,757,271
I want print only any result when $9 is greather than one hour how can i convert this to seconds? so i can use 3600sec for the check. $9 = duration of a call 00:00:00 `asterisk -rx "core show channels verbose" | awk '$9 > "01:00:00"' | awk '$6 == "Dial"' | wc -l > test.txt`
2015/06/10
[ "https://Stackoverflow.com/questions/30757271", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4994886/" ]
Use `:not()` css selector. `.a.b:not(.disabled)`
Try this, this should target div with class a AND disabled ``` .a.disabled {} ``` this should target div with class a AND b ``` .a.b {} ```
30,757,271
I want print only any result when $9 is greather than one hour how can i convert this to seconds? so i can use 3600sec for the check. $9 = duration of a call 00:00:00 `asterisk -rx "core show channels verbose" | awk '$9 > "01:00:00"' | awk '$6 == "Dial"' | wc -l > test.txt`
2015/06/10
[ "https://Stackoverflow.com/questions/30757271", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4994886/" ]
The `:not()` selector will help: ```css .a.b:not(.disabled) { color: red; } ``` ```html <div class="a b">how_can_i_select_ab_only</div> <div class="a b disabled">how_can_i_select_ab_and_disabled_only</div> ```
Try this, this should target div with class a AND disabled ``` .a.disabled {} ``` this should target div with class a AND b ``` .a.b {} ```
73,424,668
I'm using TipTap as the rich text editor for my react project for updating the description of the product which has been selected from the dropdown. The expected outcome is that the editor should show the initial content which has been saved in the database for the respective product. However, using the 'content' opt...
2022/08/20
[ "https://Stackoverflow.com/questions/73424668", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2798620/" ]
You can construct custom key function that returns 2-item tuples (first second element (negative) and then first element): ```py lst = [["DOG", 5], ["DAM", 5], ["DAN", 5], ["BAT", 4], ["CAT", 3], ["MAN", 2]] print(sorted(lst, key=lambda k: (-k[1], k[0]))) ``` Prints: ``` [["DAM", 5], ["DAN", 5], ["DOG", 5], ["BAT"...
I am not sure what you mean. But, you can always sort a list based on a key. ``` l = ['ali', 'mohamed', 'ahmed'] l.sort(key = lambda char: char[2]) # this will sort the list based on the #charachter at index 2 ``` output: `['mohamed', 'ali', 'ahmed']` You can also sort the l...
73,424,668
I'm using TipTap as the rich text editor for my react project for updating the description of the product which has been selected from the dropdown. The expected outcome is that the editor should show the initial content which has been saved in the database for the respective product. However, using the 'content' opt...
2022/08/20
[ "https://Stackoverflow.com/questions/73424668", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2798620/" ]
Since the list has been sorted once, you can use `itertools.groupby`: ``` >>> from itertools import groupby, chain >>> from operator import itemgetter >>> list(chain.from_iterable(sorted(group) for _, group in groupby(lst, key=itemgetter(1)))) [['DAM', 5], ['DAN', 5], ['DOG', 5], ['BAT', 4], ['CAT', 3], ['MAN', 2]] `...
I am not sure what you mean. But, you can always sort a list based on a key. ``` l = ['ali', 'mohamed', 'ahmed'] l.sort(key = lambda char: char[2]) # this will sort the list based on the #charachter at index 2 ``` output: `['mohamed', 'ali', 'ahmed']` You can also sort the l...
73,424,668
I'm using TipTap as the rich text editor for my react project for updating the description of the product which has been selected from the dropdown. The expected outcome is that the editor should show the initial content which has been saved in the database for the respective product. However, using the 'content' opt...
2022/08/20
[ "https://Stackoverflow.com/questions/73424668", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2798620/" ]
You can construct custom key function that returns 2-item tuples (first second element (negative) and then first element): ```py lst = [["DOG", 5], ["DAM", 5], ["DAN", 5], ["BAT", 4], ["CAT", 3], ["MAN", 2]] print(sorted(lst, key=lambda k: (-k[1], k[0]))) ``` Prints: ``` [["DAM", 5], ["DAN", 5], ["DOG", 5], ["BAT"...
Since the list has been sorted once, you can use `itertools.groupby`: ``` >>> from itertools import groupby, chain >>> from operator import itemgetter >>> list(chain.from_iterable(sorted(group) for _, group in groupby(lst, key=itemgetter(1)))) [['DAM', 5], ['DAN', 5], ['DOG', 5], ['BAT', 4], ['CAT', 3], ['MAN', 2]] `...
9,152,989
I was wondering how I could do something like the following with less css: ``` .btn { color : black; } .btn:hover { color : white; } .btn-foo { .btn; &:hover { .btn:hover; } } ``` Of-course this is just an example, what need to point is if there is any way to extend the pseudo-class in order to avoid...
2012/02/05
[ "https://Stackoverflow.com/questions/9152989", "https://Stackoverflow.com", "https://Stackoverflow.com/users/395187/" ]
UPDATE: If you can't modify external files just redefine the selectors, and add missing states: ``` .btn { // not adding anything here, won't affect existing style &:hover { // adding my own hover state for .btn background: yellow; ... } } // this will make your foo button appear as in external styl...
In Less 1.4.0(1.4.1?) This: ``` .btn { color : black; } .btn:hover { color : white; } .btn-foo:extend(.btn all) { } ``` Expands to this: ``` .btn, .btn-foo { color: black; } .btn:hover, .btn-foo:hover { color: white; } ``` Be cautious though, this: ``` .btn { color : black; } .btn:hover { color ...
5,989,255
I wrote a c++ application that compares points matches from images (OpenSurf C++) but some times, 1 from some thousands of "getUniqueMatches", the application breaks in some point inside "getUniqueMatches". I has this log: ``` 05/13/11 10:17:16: this->pointsA = 227 05/13/11 10:17:16: this->pointsB = 226 05/13/11 10:17...
2011/05/13
[ "https://Stackoverflow.com/questions/5989255", "https://Stackoverflow.com", "https://Stackoverflow.com/users/396472/" ]
I suspect 2 things: * g++ compiler optimization. Use `-O2` or less; `-O3` and beyond sometimes generate weird behavior especially concerning floating point operation. * If reducing optimization does not fix the problem, I suggest changing `if (d1 / d2 < ratio)` to `if (d1 < double(ratio)*d2)` for avoiding divisi...
Change ``` if (d1 / d2 < ratio) { ``` for ``` if(d2 > 0 && ...) { ``` I think that the problem was a division by zero, but was not throwing exceptions. :(
12,594,376
We are using TFS 2010 with the Basic Branch Plan outlined in the [Branching Guide on codeplex](http://vsarbranchingguide.codeplex.com/ "Branching Guide") for an internal web application. We have just the 3 basic branches = Dev, Main (QA/Testing), and Release (Production). Because the app is an internal web application...
2012/09/26
[ "https://Stackoverflow.com/questions/12594376", "https://Stackoverflow.com", "https://Stackoverflow.com/users/872054/" ]
`_TCHAR` is a wide-character type if the executable was built with the Unicode option. `cout` can't handle wide characters, so instead of turning it into a `char *` and printing out a string, it (effectively) uses the default `void *` printer which prints out the address of the string. Use `wcout` instead.
Hmm. The first array entry in argv (ie. argv[0]) is, if I remember right, the name of the executable. So it might be printing the address of the first character in a c style character array. Try this: ``` cout << (char *)argv[0] << endl; ```
12,594,376
We are using TFS 2010 with the Basic Branch Plan outlined in the [Branching Guide on codeplex](http://vsarbranchingguide.codeplex.com/ "Branching Guide") for an internal web application. We have just the 3 basic branches = Dev, Main (QA/Testing), and Release (Production). Because the app is an internal web application...
2012/09/26
[ "https://Stackoverflow.com/questions/12594376", "https://Stackoverflow.com", "https://Stackoverflow.com/users/872054/" ]
Hmm. The first array entry in argv (ie. argv[0]) is, if I remember right, the name of the executable. So it might be printing the address of the first character in a c style character array. Try this: ``` cout << (char *)argv[0] << endl; ```
In your `project settings->General`. Go to `"Character encoding"` and select `"multibyte character set"`. And change your `_tmain()` to `main()`. Now it will print your characters.
12,594,376
We are using TFS 2010 with the Basic Branch Plan outlined in the [Branching Guide on codeplex](http://vsarbranchingguide.codeplex.com/ "Branching Guide") for an internal web application. We have just the 3 basic branches = Dev, Main (QA/Testing), and Release (Production). Because the app is an internal web application...
2012/09/26
[ "https://Stackoverflow.com/questions/12594376", "https://Stackoverflow.com", "https://Stackoverflow.com/users/872054/" ]
`_TCHAR` is a wide-character type if the executable was built with the Unicode option. `cout` can't handle wide characters, so instead of turning it into a `char *` and printing out a string, it (effectively) uses the default `void *` printer which prints out the address of the string. Use `wcout` instead.
In your `project settings->General`. Go to `"Character encoding"` and select `"multibyte character set"`. And change your `_tmain()` to `main()`. Now it will print your characters.
248,884
Samsung A10 with Android 11. Nor Viber, nor Telegram shows incoming call when they are not active. I mean, that if the messenger is open (in memory) and it is currently being used (focused) then incoming call is shown. However, if another application is used (but messenger is still open) then incoming call is not shown...
2022/10/20
[ "https://android.stackexchange.com/questions/248884", "https://android.stackexchange.com", "https://android.stackexchange.com/users/361831/" ]
I've fiddled with the problem for a couple of days. My working solution was to backup my files, reset to factory defaults, reinstall apps (took 1-2 hours). --- Update: @Irfan Latif is correct. These were indeed the security -> trusted credentials. That comment should have being the accepted answer.
I'd say the reason re-installing Opera didn't fix it is because your probably still using the same profile. Let me put it this way, when you re-installed you still had all your bookmarks still without having to import them again... ergo same profile. Did you try going into Settings, Advanced and then click on Reset Se...
2,969,843
A *free* module is rather intuitive: there exists a subset satisfying suitable properties which may act as a basis for elements. Taking as example an $\mathbb R$-module, or a vector space, we see "free" as a generalisation of this concept. However, a module $P$ is said to be *projective* if for every surjective homomo...
2018/10/24
[ "https://math.stackexchange.com/questions/2969843", "https://math.stackexchange.com", "https://math.stackexchange.com/users/134488/" ]
An equivalent characterization of projective modules are those modules $P$ for which any short exact sequence $0 \to A \to B \to P \to 0$ splits; that is, $B \cong A \oplus P$. In this sense, $P$ generalizes free modules (which share this property), and so this is even further a generalization of vector spaces. This v...
The most intuitive way to think about projective module(s) is probably direct summand(s) of some free module, so in a sense it is a generalisation of "complemented subspace" in the study of Banach spaces, except you couldn't really make that generalisation since, e.g., $c\_0$ is not complemented in $\ell^\infty$ despit...
56,301,924
I am trying to remove .php extension for only pages under a subcategory folder of the website. `currently: example.com/blog/my-first-blog.php` `what i want: example.com/blog/my-first-blog/` I have tried the following rule in .htaccess (placed in root) but it still shows .php ``` RewriteCond %{REQUEST_FILENAME} !-d ...
2019/05/25
[ "https://Stackoverflow.com/questions/56301924", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10925501/" ]
I figured it out I just had to create .htaccess file under the "/guide/" directory. with the following rule note `RewriteBase /guide/` for making sure it only removes .php under "/blog/" folder ``` RewriteEngine On RewriteBase /blog/ RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME}\.php -f RewriteR...
Try this -- ``` RewriteEngine on RewriteBase / RewriteCond %{http://www.example.in/} !(\.[^./]+)$ RewriteCond %{REQUEST_fileNAME} !-d RewriteCond %{REQUEST_fileNAME} !-f RewriteRule (.*) /$1.php [L] RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /([^.]+)\.html\ HTTP RewriteRule ^([^.]+)\.php $ http://www.example.in/$1 [R=30...
56,301,924
I am trying to remove .php extension for only pages under a subcategory folder of the website. `currently: example.com/blog/my-first-blog.php` `what i want: example.com/blog/my-first-blog/` I have tried the following rule in .htaccess (placed in root) but it still shows .php ``` RewriteCond %{REQUEST_FILENAME} !-d ...
2019/05/25
[ "https://Stackoverflow.com/questions/56301924", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10925501/" ]
I figured it out I just had to create .htaccess file under the "/guide/" directory. with the following rule note `RewriteBase /guide/` for making sure it only removes .php under "/blog/" folder ``` RewriteEngine On RewriteBase /blog/ RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME}\.php -f RewriteR...
Try this ``` DirectorySlash Off Options -MultiViews -Indexes RewriteEngine On RewriteCond %{REQUEST_FILENAME}.php -f RewriteRule ^(.+?)/?$ $1.php [L] RewriteCond %{REQUEST_FILENAME} -d RewriteRule [^/]$ %{REQUEST_URI}/ [L,R=301,NE] ```
56,301,924
I am trying to remove .php extension for only pages under a subcategory folder of the website. `currently: example.com/blog/my-first-blog.php` `what i want: example.com/blog/my-first-blog/` I have tried the following rule in .htaccess (placed in root) but it still shows .php ``` RewriteCond %{REQUEST_FILENAME} !-d ...
2019/05/25
[ "https://Stackoverflow.com/questions/56301924", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10925501/" ]
The best way to achieve result you want is building a routing. Firstable, you need to rewrite all traffic to your index.php: ``` RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^.*$ /index.php [L,QSA] ``` Then, you need to write router that will be parsing URL paths. The simplest ...
Try this -- ``` RewriteEngine on RewriteBase / RewriteCond %{http://www.example.in/} !(\.[^./]+)$ RewriteCond %{REQUEST_fileNAME} !-d RewriteCond %{REQUEST_fileNAME} !-f RewriteRule (.*) /$1.php [L] RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /([^.]+)\.html\ HTTP RewriteRule ^([^.]+)\.php $ http://www.example.in/$1 [R=30...
56,301,924
I am trying to remove .php extension for only pages under a subcategory folder of the website. `currently: example.com/blog/my-first-blog.php` `what i want: example.com/blog/my-first-blog/` I have tried the following rule in .htaccess (placed in root) but it still shows .php ``` RewriteCond %{REQUEST_FILENAME} !-d ...
2019/05/25
[ "https://Stackoverflow.com/questions/56301924", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10925501/" ]
The best way to achieve result you want is building a routing. Firstable, you need to rewrite all traffic to your index.php: ``` RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^.*$ /index.php [L,QSA] ``` Then, you need to write router that will be parsing URL paths. The simplest ...
Try this ``` DirectorySlash Off Options -MultiViews -Indexes RewriteEngine On RewriteCond %{REQUEST_FILENAME}.php -f RewriteRule ^(.+?)/?$ $1.php [L] RewriteCond %{REQUEST_FILENAME} -d RewriteRule [^/]$ %{REQUEST_URI}/ [L,R=301,NE] ```
15,033,866
Currently stuck on a program to determine the highest score for a certain country. The problem I'm having is determining how to get the country with the highest score via input from the user. The main concern is outputting the country with the highest score and the medals it won with(ex USA wins 2 gold 1 silver 1 bronz...
2013/02/22
[ "https://Stackoverflow.com/questions/15033866", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2099733/" ]
regex doesn't handle `and, not` very well. there are ways to do it, but bit tricky. A very simple function could solve your problem: ``` function! Rep() let l = getline('.') if stridx(l, 'str1')>=0 && stridx(l,'str2') >=0 && stridx(l,'str3')<0 execute 's/xxx/yyy/g' endif endfunc...
I think **@Kent**'s answer (the function) is the "most correct" when doing complex searches/substitutions. It's easier to change afterward, and to understand it also after a while, it's also quicker to write than this. But I think it can be interesting if it's possible to do this with a "oneliner". I welcome comment...
15,033,866
Currently stuck on a program to determine the highest score for a certain country. The problem I'm having is determining how to get the country with the highest score via input from the user. The main concern is outputting the country with the highest score and the medals it won with(ex USA wins 2 gold 1 silver 1 bronz...
2013/02/22
[ "https://Stackoverflow.com/questions/15033866", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2099733/" ]
This will replace the `()` string in every line of a file containing the string `return` and the string `aLib` at some point after that: ``` :%s/return.*aLib.*\zs()\ze/(aHandle)/ ``` The `%` is the operating range of the command, which includes all lines in the file. `\zs` denotes the start of the replaced string a...
I think **@Kent**'s answer (the function) is the "most correct" when doing complex searches/substitutions. It's easier to change afterward, and to understand it also after a while, it's also quicker to write than this. But I think it can be interesting if it's possible to do this with a "oneliner". I welcome comment...
67,795,057
I could use assistance modifying the Outlook VBA macro. Any time I reply to an e-mail from any of my multiple e-mail accounts the script will change the sender address to the one specified (i.e. user@domain.com on behalf of group@domain.com). I like this behavior but need help making a change so that this script only r...
2021/06/01
[ "https://Stackoverflow.com/questions/67795057", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16098930/" ]
Navigate the folder tree up to the email address folder. This should be `objMailItem.Parent.Parent`. ```vb Private Sub objInspectors_NewInspector(ByVal Inspector As Inspector) If Inspector.currentItem.Class = olMail Then Set objMailItem = Inspector.currentItem If objMailItem.Sent = False Then ...
If you want to handle outgoing emails you need to subscribe to the [ItemSend](https://learn.microsoft.com/en-us/office/vba/api/outlook.application.itemsend) event of the Application class which is fired whenever an Microsoft Outlook item is sent, either by the user through an Inspector (before the inspector is closed, ...
67,795,057
I could use assistance modifying the Outlook VBA macro. Any time I reply to an e-mail from any of my multiple e-mail accounts the script will change the sender address to the one specified (i.e. user@domain.com on behalf of group@domain.com). I like this behavior but need help making a change so that this script only r...
2021/06/01
[ "https://Stackoverflow.com/questions/67795057", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16098930/" ]
Navigate the folder tree up to the email address folder. This should be `objMailItem.Parent.Parent`. ```vb Private Sub objInspectors_NewInspector(ByVal Inspector As Inspector) If Inspector.currentItem.Class = olMail Then Set objMailItem = Inspector.currentItem If objMailItem.Sent = False Then ...
For anyone who finds this. This should work if you already have the primary account setup in outlook and the account you want to send from has "send on behalf" or "send as" permission: ```VBA Dim WithEvents objInspectors As Outlook.Inspectors Dim WithEvents objMailItem As Outlook.MailItem Dim WithEvents myOlExp As Out...
33,452,133
I have such a function in C: ``` char **collect_character_distribution(char *buffer, long lSize) { printf("Collecting character distribution...\n"); long x; char distribution[256][2] = {0}; for (x = 0; x < lSize; x++) { distribution[(int)buffer[x]][0] = (char) buffer[x]; di...
2015/10/31
[ "https://Stackoverflow.com/questions/33452133", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4393898/" ]
You are getting this error because that array is a local variable, and you are passing it outside its scope. You need to use dynamic allocation for this ``` char **array = malloc(20 * sizeof(char *)); int i; for(i=0; i != 20; ++i) { array[i] = malloc(20 * sizeof(char)); } ``` Now you can easily return `array` ...
Its simple messages your funtion `return`'s a local variable . Your array does not exist outside function block . Inside your function you can do this - ``` char **distribution; distribution=malloc(256*sizeof(char *)); for(int i=0;i<256;i++) distribution[i]=malloc(20*sizeof(distribution[0][0])); ``` Also in `ma...
33,452,133
I have such a function in C: ``` char **collect_character_distribution(char *buffer, long lSize) { printf("Collecting character distribution...\n"); long x; char distribution[256][2] = {0}; for (x = 0; x < lSize; x++) { distribution[(int)buffer[x]][0] = (char) buffer[x]; di...
2015/10/31
[ "https://Stackoverflow.com/questions/33452133", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4393898/" ]
You are getting this error because that array is a local variable, and you are passing it outside its scope. You need to use dynamic allocation for this ``` char **array = malloc(20 * sizeof(char *)); int i; for(i=0; i != 20; ++i) { array[i] = malloc(20 * sizeof(char)); } ``` Now you can easily return `array` ...
You can pass `char **distribution` as a parameter and in your function use: ``` distribution = new char*[256]; distribution[0] = new char[2]; distribution[1] = new char[2]; ``` Then you don't need to return `distribution` array from your function. The problem is local variables are destroyed after their scope ends an...
33,452,133
I have such a function in C: ``` char **collect_character_distribution(char *buffer, long lSize) { printf("Collecting character distribution...\n"); long x; char distribution[256][2] = {0}; for (x = 0; x < lSize; x++) { distribution[(int)buffer[x]][0] = (char) buffer[x]; di...
2015/10/31
[ "https://Stackoverflow.com/questions/33452133", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4393898/" ]
You're returning a pointer to a variable that is declared locally in the function. What you should do is declare the variable you want to store results in in the scope where you need these results. Then you pass a pointer to this variable into the function to write to. Something along these lines: ``` void collect_cha...
Its simple messages your funtion `return`'s a local variable . Your array does not exist outside function block . Inside your function you can do this - ``` char **distribution; distribution=malloc(256*sizeof(char *)); for(int i=0;i<256;i++) distribution[i]=malloc(20*sizeof(distribution[0][0])); ``` Also in `ma...
33,452,133
I have such a function in C: ``` char **collect_character_distribution(char *buffer, long lSize) { printf("Collecting character distribution...\n"); long x; char distribution[256][2] = {0}; for (x = 0; x < lSize; x++) { distribution[(int)buffer[x]][0] = (char) buffer[x]; di...
2015/10/31
[ "https://Stackoverflow.com/questions/33452133", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4393898/" ]
You're returning a pointer to a variable that is declared locally in the function. What you should do is declare the variable you want to store results in in the scope where you need these results. Then you pass a pointer to this variable into the function to write to. Something along these lines: ``` void collect_cha...
You can pass `char **distribution` as a parameter and in your function use: ``` distribution = new char*[256]; distribution[0] = new char[2]; distribution[1] = new char[2]; ``` Then you don't need to return `distribution` array from your function. The problem is local variables are destroyed after their scope ends an...
19,312,518
I got the following result with 5 views(top,bottom,left,right,centre) in a `RelativeLayout`, then placing a camera preview into it. ![camera preview](https://i.stack.imgur.com/LrTe9l.jpg) What I also wanted is to draw a border around the center view. I used a shape drawable for it but it didn't work. The border works...
2013/10/11
[ "https://Stackoverflow.com/questions/19312518", "https://Stackoverflow.com", "https://Stackoverflow.com/users/480007/" ]
This is because you are giving margin to the `View` which was way too much to fit in the area.That is why your center `View` was not visible.Replace your center `View` with the below `View` code.This works for me, hope it works for you too eg. ``` <View android:id="@+id/center" android:layout_width="w...
An Alternative Solution :- ``` <LinearLayout android:id="@+id/center" android:layout_width="match_parent" android:layout_height="match_parent" android:layout_above="@id/bottom" android:layout_below="@id/top" android:layout_gravity="center" android:layout_ma...
19,312,518
I got the following result with 5 views(top,bottom,left,right,centre) in a `RelativeLayout`, then placing a camera preview into it. ![camera preview](https://i.stack.imgur.com/LrTe9l.jpg) What I also wanted is to draw a border around the center view. I used a shape drawable for it but it didn't work. The border works...
2013/10/11
[ "https://Stackoverflow.com/questions/19312518", "https://Stackoverflow.com", "https://Stackoverflow.com/users/480007/" ]
This is because you are giving margin to the `View` which was way too much to fit in the area.That is why your center `View` was not visible.Replace your center `View` with the below `View` code.This works for me, hope it works for you too eg. ``` <View android:id="@+id/center" android:layout_width="w...
Reduce Height to `5dp` like this `android:layout_height="5dp"` in `View` Horizontal line ``` <View android:id="@+id/view" android:background="#FF4500" android:layout_width="fill_parent" android:layout_height="2dp" android:layout_below="@+id/listview_id" /> ``` vertical line ``` <Vi...
1,992,109
Since Flex generates Actionscript. Why not use Actionscript at all ?! sorry, i'm just curious .
2010/01/02
[ "https://Stackoverflow.com/questions/1992109", "https://Stackoverflow.com", "https://Stackoverflow.com/users/238408/" ]
Flex does not generate ActionScript. Flex compiles ActionScript. At any rate, Flex is Flash programming aimed at developers (who don't necessarily like having timline-based vector editor as the main development environment). Also, since Flex is a console application, you can include its functionality in shell scripts...
I think a rhetorical question best answers this: Why not use raw machine code for all projects? In more detail, the Flex Framework is indeed written in pure actionscript. It offers substantially more than actionscript alone, and like most frameworks, addresses a need for higher level programming constructs that are n...
1,992,109
Since Flex generates Actionscript. Why not use Actionscript at all ?! sorry, i'm just curious .
2010/01/02
[ "https://Stackoverflow.com/questions/1992109", "https://Stackoverflow.com", "https://Stackoverflow.com/users/238408/" ]
I think a rhetorical question best answers this: Why not use raw machine code for all projects? In more detail, the Flex Framework is indeed written in pure actionscript. It offers substantially more than actionscript alone, and like most frameworks, addresses a need for higher level programming constructs that are n...
Adobe Flex and Adobe Flash differs in only one thing: **According to Adobe**: "Adobe Flash is for **designers**, Adobe Flex is for **developers**. Flex is released for developers who do not feel comfortable with timeline stuff. " > > Adobe Flash is a powerful tool; however, > as more programmers became involved in...
1,992,109
Since Flex generates Actionscript. Why not use Actionscript at all ?! sorry, i'm just curious .
2010/01/02
[ "https://Stackoverflow.com/questions/1992109", "https://Stackoverflow.com", "https://Stackoverflow.com/users/238408/" ]
I agree with the points made about Flex being for developers and Flash being for designers, but that doesn't really cover what is going on in detail. There are three main ways to produce a Flash application (SWF): 1) Using the Flash application - the timeline approach, mainly aimed at designers. 2) Writing pure Actio...
I think a rhetorical question best answers this: Why not use raw machine code for all projects? In more detail, the Flex Framework is indeed written in pure actionscript. It offers substantially more than actionscript alone, and like most frameworks, addresses a need for higher level programming constructs that are n...
1,992,109
Since Flex generates Actionscript. Why not use Actionscript at all ?! sorry, i'm just curious .
2010/01/02
[ "https://Stackoverflow.com/questions/1992109", "https://Stackoverflow.com", "https://Stackoverflow.com/users/238408/" ]
I think a rhetorical question best answers this: Why not use raw machine code for all projects? In more detail, the Flex Framework is indeed written in pure actionscript. It offers substantially more than actionscript alone, and like most frameworks, addresses a need for higher level programming constructs that are n...
The Flex framework allows developers to write applications more rapidly than writing pure ActionScript. Flex is written in MXML, which is a 'convenience language' and has a lot of pre-built components for writing business applications. However if your goal is for creative purposes only, Flash would be a better tool fo...
1,992,109
Since Flex generates Actionscript. Why not use Actionscript at all ?! sorry, i'm just curious .
2010/01/02
[ "https://Stackoverflow.com/questions/1992109", "https://Stackoverflow.com", "https://Stackoverflow.com/users/238408/" ]
Flex does not generate ActionScript. Flex compiles ActionScript. At any rate, Flex is Flash programming aimed at developers (who don't necessarily like having timline-based vector editor as the main development environment). Also, since Flex is a console application, you can include its functionality in shell scripts...
Adobe Flex and Adobe Flash differs in only one thing: **According to Adobe**: "Adobe Flash is for **designers**, Adobe Flex is for **developers**. Flex is released for developers who do not feel comfortable with timeline stuff. " > > Adobe Flash is a powerful tool; however, > as more programmers became involved in...
1,992,109
Since Flex generates Actionscript. Why not use Actionscript at all ?! sorry, i'm just curious .
2010/01/02
[ "https://Stackoverflow.com/questions/1992109", "https://Stackoverflow.com", "https://Stackoverflow.com/users/238408/" ]
Flex does not generate ActionScript. Flex compiles ActionScript. At any rate, Flex is Flash programming aimed at developers (who don't necessarily like having timline-based vector editor as the main development environment). Also, since Flex is a console application, you can include its functionality in shell scripts...
The Flex framework allows developers to write applications more rapidly than writing pure ActionScript. Flex is written in MXML, which is a 'convenience language' and has a lot of pre-built components for writing business applications. However if your goal is for creative purposes only, Flash would be a better tool fo...
1,992,109
Since Flex generates Actionscript. Why not use Actionscript at all ?! sorry, i'm just curious .
2010/01/02
[ "https://Stackoverflow.com/questions/1992109", "https://Stackoverflow.com", "https://Stackoverflow.com/users/238408/" ]
I agree with the points made about Flex being for developers and Flash being for designers, but that doesn't really cover what is going on in detail. There are three main ways to produce a Flash application (SWF): 1) Using the Flash application - the timeline approach, mainly aimed at designers. 2) Writing pure Actio...
Adobe Flex and Adobe Flash differs in only one thing: **According to Adobe**: "Adobe Flash is for **designers**, Adobe Flex is for **developers**. Flex is released for developers who do not feel comfortable with timeline stuff. " > > Adobe Flash is a powerful tool; however, > as more programmers became involved in...
1,992,109
Since Flex generates Actionscript. Why not use Actionscript at all ?! sorry, i'm just curious .
2010/01/02
[ "https://Stackoverflow.com/questions/1992109", "https://Stackoverflow.com", "https://Stackoverflow.com/users/238408/" ]
I agree with the points made about Flex being for developers and Flash being for designers, but that doesn't really cover what is going on in detail. There are three main ways to produce a Flash application (SWF): 1) Using the Flash application - the timeline approach, mainly aimed at designers. 2) Writing pure Actio...
The Flex framework allows developers to write applications more rapidly than writing pure ActionScript. Flex is written in MXML, which is a 'convenience language' and has a lot of pre-built components for writing business applications. However if your goal is for creative purposes only, Flash would be a better tool fo...
59,436,440
I have created new column against every new value of N now it displays only the last column of every row also the column name is started from '0' I want to start it from '1' ``` private void printBoard(int[,] board,int N) { for (int i = 0; i < N; i++) { DataGridViewRow row = new DataGridViewRow(); ...
2019/12/21
[ "https://Stackoverflow.com/questions/59436440", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12568584/" ]
OK, so I spent quite some time trying out all kinds of different configs until finally learning that GCE persistent disks simply don't support `ReadWriteMany` to begin with. The [GKE docs](https://cloud.google.com/kubernetes-engine/docs/concepts/persistent-volumes) go out of their way to never explicitly mention that ...
In StatefulSet, when you try to use PVC to store your data, you actually define your PVC by using `volumeClaimTemplates` like: ``` volumeClaimTemplates: - metadata: name: gitea-server-data labels: app: gitea spec: accessModes: - ReadWriteOnce resources: ...
93,344
A plane goes trough some kind of atmospheric disturbance and ends up badly damaged, crashing after trying an emergency landing. Of 200 passengers onboard, only 80 survive, some of them badly injured (comatose, paralytic, crippled, etc). One year later, the exact same plane with the same 200 people appears out of nowher...
2017/09/26
[ "https://worldbuilding.stackexchange.com/questions/93344", "https://worldbuilding.stackexchange.com", "https://worldbuilding.stackexchange.com/users/43125/" ]
Missing the forest for staring at a sapling =========================================== As with [this question](https://worldbuilding.stackexchange.com/questions/62221/), you are sort of missing the bigger picture here. A **magic event** has taken place. Real magic. The first verifiable magic **ever** in human history...
I'm fairly sure the law would resolve this in civil court with families driving the debate on a case by case basis. First and foremost the law would not recognize the clones as the same people simply in order to avoid the catastrophe of allowing such conflicts. It would be unlikely that any government would be foolish...
93,344
A plane goes trough some kind of atmospheric disturbance and ends up badly damaged, crashing after trying an emergency landing. Of 200 passengers onboard, only 80 survive, some of them badly injured (comatose, paralytic, crippled, etc). One year later, the exact same plane with the same 200 people appears out of nowher...
2017/09/26
[ "https://worldbuilding.stackexchange.com/questions/93344", "https://worldbuilding.stackexchange.com", "https://worldbuilding.stackexchange.com/users/43125/" ]
At least in [Common law](https://en.wikipedia.org/wiki/Common_law) systems, there would be nothing at first that would stop both the "prime" and the "clone" person to claim they are the same. They can both board planes, travel abroad, access the same bank account because, as far as the existing law is concerned, it is ...
I'm fairly sure the law would resolve this in civil court with families driving the debate on a case by case basis. First and foremost the law would not recognize the clones as the same people simply in order to avoid the catastrophe of allowing such conflicts. It would be unlikely that any government would be foolish...
93,344
A plane goes trough some kind of atmospheric disturbance and ends up badly damaged, crashing after trying an emergency landing. Of 200 passengers onboard, only 80 survive, some of them badly injured (comatose, paralytic, crippled, etc). One year later, the exact same plane with the same 200 people appears out of nowher...
2017/09/26
[ "https://worldbuilding.stackexchange.com/questions/93344", "https://worldbuilding.stackexchange.com", "https://worldbuilding.stackexchange.com/users/43125/" ]
**Would insurance companies be able to reclaim the payments they made, as their customers are alive and well?** I think insurance companies might be able to claim some or all of their money back depending on jurisdiction and the specifics of the insurance policy. There is no “serious” issue here simply the record of th...
I'm fairly sure the law would resolve this in civil court with families driving the debate on a case by case basis. First and foremost the law would not recognize the clones as the same people simply in order to avoid the catastrophe of allowing such conflicts. It would be unlikely that any government would be foolish...
93,344
A plane goes trough some kind of atmospheric disturbance and ends up badly damaged, crashing after trying an emergency landing. Of 200 passengers onboard, only 80 survive, some of them badly injured (comatose, paralytic, crippled, etc). One year later, the exact same plane with the same 200 people appears out of nowher...
2017/09/26
[ "https://worldbuilding.stackexchange.com/questions/93344", "https://worldbuilding.stackexchange.com", "https://worldbuilding.stackexchange.com/users/43125/" ]
At least in [Common law](https://en.wikipedia.org/wiki/Common_law) systems, there would be nothing at first that would stop both the "prime" and the "clone" person to claim they are the same. They can both board planes, travel abroad, access the same bank account because, as far as the existing law is concerned, it is ...
Missing the forest for staring at a sapling =========================================== As with [this question](https://worldbuilding.stackexchange.com/questions/62221/), you are sort of missing the bigger picture here. A **magic event** has taken place. Real magic. The first verifiable magic **ever** in human history...
93,344
A plane goes trough some kind of atmospheric disturbance and ends up badly damaged, crashing after trying an emergency landing. Of 200 passengers onboard, only 80 survive, some of them badly injured (comatose, paralytic, crippled, etc). One year later, the exact same plane with the same 200 people appears out of nowher...
2017/09/26
[ "https://worldbuilding.stackexchange.com/questions/93344", "https://worldbuilding.stackexchange.com", "https://worldbuilding.stackexchange.com/users/43125/" ]
**Would insurance companies be able to reclaim the payments they made, as their customers are alive and well?** I think insurance companies might be able to claim some or all of their money back depending on jurisdiction and the specifics of the insurance policy. There is no “serious” issue here simply the record of th...
Missing the forest for staring at a sapling =========================================== As with [this question](https://worldbuilding.stackexchange.com/questions/62221/), you are sort of missing the bigger picture here. A **magic event** has taken place. Real magic. The first verifiable magic **ever** in human history...
3,708
The [barometric formula](https://en.wikipedia.org/wiki/Barometric_formula) describes the atmospheric pressure depending on height and a host of other things. This formula assumes a constant gravitational acceleration over the whole height of the gas column - a reasonable assumption for Earth, as the atmosphere is thin ...
2014/02/15
[ "https://space.stackexchange.com/questions/3708", "https://space.stackexchange.com", "https://space.stackexchange.com/users/102/" ]
For a spherically symmetric mass distribution in hydrostatic equilibrium: ${dP\over dr}=-g\rho$ where $P$ is the pressure, $r$ is the radius, $g$ is the gravitational acceleration as a function of $r$, and $\rho$ is the density of the gas as a function of $r$. Then you integrate up or down from some known conditions...
Something else to keep in mind: When you are dealing with the gas giants you no longer have anything remotely resembling a perfect gas. Long ago I did a brute force calculation of the pressure & density of the atmosphere in a hole through the Earth. The answers are insane--in reality the gas will compress to liquid de...
3,708
The [barometric formula](https://en.wikipedia.org/wiki/Barometric_formula) describes the atmospheric pressure depending on height and a host of other things. This formula assumes a constant gravitational acceleration over the whole height of the gas column - a reasonable assumption for Earth, as the atmosphere is thin ...
2014/02/15
[ "https://space.stackexchange.com/questions/3708", "https://space.stackexchange.com", "https://space.stackexchange.com/users/102/" ]
> > This formula assumes a constant gravitational acceleration over the whole height of the gas column - a reasonable assumption for Earth, as the atmosphere is thin compared to to the size of the planet. > > > For a [simple argument](https://physics.stackexchange.com/questions/51908/why-arent-gas-planets-and-star...
For a spherically symmetric mass distribution in hydrostatic equilibrium: ${dP\over dr}=-g\rho$ where $P$ is the pressure, $r$ is the radius, $g$ is the gravitational acceleration as a function of $r$, and $\rho$ is the density of the gas as a function of $r$. Then you integrate up or down from some known conditions...
3,708
The [barometric formula](https://en.wikipedia.org/wiki/Barometric_formula) describes the atmospheric pressure depending on height and a host of other things. This formula assumes a constant gravitational acceleration over the whole height of the gas column - a reasonable assumption for Earth, as the atmosphere is thin ...
2014/02/15
[ "https://space.stackexchange.com/questions/3708", "https://space.stackexchange.com", "https://space.stackexchange.com/users/102/" ]
For a spherically symmetric mass distribution in hydrostatic equilibrium: ${dP\over dr}=-g\rho$ where $P$ is the pressure, $r$ is the radius, $g$ is the gravitational acceleration as a function of $r$, and $\rho$ is the density of the gas as a function of $r$. Then you integrate up or down from some known conditions...
For what it's worth: Using numbers that approximate Uranus (atmosphere just 350km deep, relativly low local g, cold, 100bar at lower limit of atmosphere) and ignoring the gravity from the atmosphere itself - plugging the same numbers into the barometric formula and the one given by Alan (assuming constant temp), the...
3,708
The [barometric formula](https://en.wikipedia.org/wiki/Barometric_formula) describes the atmospheric pressure depending on height and a host of other things. This formula assumes a constant gravitational acceleration over the whole height of the gas column - a reasonable assumption for Earth, as the atmosphere is thin ...
2014/02/15
[ "https://space.stackexchange.com/questions/3708", "https://space.stackexchange.com", "https://space.stackexchange.com/users/102/" ]
> > This formula assumes a constant gravitational acceleration over the whole height of the gas column - a reasonable assumption for Earth, as the atmosphere is thin compared to to the size of the planet. > > > For a [simple argument](https://physics.stackexchange.com/questions/51908/why-arent-gas-planets-and-star...
Something else to keep in mind: When you are dealing with the gas giants you no longer have anything remotely resembling a perfect gas. Long ago I did a brute force calculation of the pressure & density of the atmosphere in a hole through the Earth. The answers are insane--in reality the gas will compress to liquid de...
3,708
The [barometric formula](https://en.wikipedia.org/wiki/Barometric_formula) describes the atmospheric pressure depending on height and a host of other things. This formula assumes a constant gravitational acceleration over the whole height of the gas column - a reasonable assumption for Earth, as the atmosphere is thin ...
2014/02/15
[ "https://space.stackexchange.com/questions/3708", "https://space.stackexchange.com", "https://space.stackexchange.com/users/102/" ]
Something else to keep in mind: When you are dealing with the gas giants you no longer have anything remotely resembling a perfect gas. Long ago I did a brute force calculation of the pressure & density of the atmosphere in a hole through the Earth. The answers are insane--in reality the gas will compress to liquid de...
For what it's worth: Using numbers that approximate Uranus (atmosphere just 350km deep, relativly low local g, cold, 100bar at lower limit of atmosphere) and ignoring the gravity from the atmosphere itself - plugging the same numbers into the barometric formula and the one given by Alan (assuming constant temp), the...
3,708
The [barometric formula](https://en.wikipedia.org/wiki/Barometric_formula) describes the atmospheric pressure depending on height and a host of other things. This formula assumes a constant gravitational acceleration over the whole height of the gas column - a reasonable assumption for Earth, as the atmosphere is thin ...
2014/02/15
[ "https://space.stackexchange.com/questions/3708", "https://space.stackexchange.com", "https://space.stackexchange.com/users/102/" ]
> > This formula assumes a constant gravitational acceleration over the whole height of the gas column - a reasonable assumption for Earth, as the atmosphere is thin compared to to the size of the planet. > > > For a [simple argument](https://physics.stackexchange.com/questions/51908/why-arent-gas-planets-and-star...
For what it's worth: Using numbers that approximate Uranus (atmosphere just 350km deep, relativly low local g, cold, 100bar at lower limit of atmosphere) and ignoring the gravity from the atmosphere itself - plugging the same numbers into the barometric formula and the one given by Alan (assuming constant temp), the...
116,606
And by "Weapons" I mean ranged weapons specifically. Melee weapons would certainly be useful for close-quarters, but due to the range at which combat occurs in this question, I'm looking for ranged weapons like firearms. They must function in zero-G, but functioning in a vacuum isn't a necessity due to the fact that m...
2018/06/28
[ "https://worldbuilding.stackexchange.com/questions/116606", "https://worldbuilding.stackexchange.com", "https://worldbuilding.stackexchange.com/users/48871/" ]
This answer is made with the assumption that the goal is to occupy the space station after combat has resolved. If we're not taking the station, then there is no need for combat on board the station. It's much easier to sabotage it or destroy it. I'm also assuming that, since there's no artificial gravity, we aren't u...
**Recoil is not certainly bad** In a battle with ranged weapons you don't want to cross through an open space with a predictable direction and speed and you really really don't want to take a long time doing it. By firing a weapon with recoil while on a ballistic course you make targeting you slightly harder by changi...
116,606
And by "Weapons" I mean ranged weapons specifically. Melee weapons would certainly be useful for close-quarters, but due to the range at which combat occurs in this question, I'm looking for ranged weapons like firearms. They must function in zero-G, but functioning in a vacuum isn't a necessity due to the fact that m...
2018/06/28
[ "https://worldbuilding.stackexchange.com/questions/116606", "https://worldbuilding.stackexchange.com", "https://worldbuilding.stackexchange.com/users/48871/" ]
Lasers ====== Cadence is right in that lasers do technically have a momentum from photon pressure, but how far have you ever been pushed by light? I have worked with industrial lasers - the kind that cuts through metal - and it's not an issue for those (i.e.: the framework they are assembled on is not built with recoi...
Bows and arrows. You really don't want something that can accidentally puncture a hole in the hull/windows of the space station. Electric assisted draw bows and smart arrows to be precise.
116,606
And by "Weapons" I mean ranged weapons specifically. Melee weapons would certainly be useful for close-quarters, but due to the range at which combat occurs in this question, I'm looking for ranged weapons like firearms. They must function in zero-G, but functioning in a vacuum isn't a necessity due to the fact that m...
2018/06/28
[ "https://worldbuilding.stackexchange.com/questions/116606", "https://worldbuilding.stackexchange.com", "https://worldbuilding.stackexchange.com/users/48871/" ]
Why not flamethrowers ===================== ***Or...*** Angular momentum is a problem ***IN SPAAACE*** ============================================== > > *You really, really, really, do not want to use a flamethrower on the same space station as you happen to be on* [--Daniel B](https://worldbuilding.stackexchange....
Bows and arrows. You really don't want something that can accidentally puncture a hole in the hull/windows of the space station. Electric assisted draw bows and smart arrows to be precise.
116,606
And by "Weapons" I mean ranged weapons specifically. Melee weapons would certainly be useful for close-quarters, but due to the range at which combat occurs in this question, I'm looking for ranged weapons like firearms. They must function in zero-G, but functioning in a vacuum isn't a necessity due to the fact that m...
2018/06/28
[ "https://worldbuilding.stackexchange.com/questions/116606", "https://worldbuilding.stackexchange.com", "https://worldbuilding.stackexchange.com/users/48871/" ]
Why not flamethrowers ===================== ***Or...*** Angular momentum is a problem ***IN SPAAACE*** ============================================== > > *You really, really, really, do not want to use a flamethrower on the same space station as you happen to be on* [--Daniel B](https://worldbuilding.stackexchange....
Active Denial System. That means microwaves to make people feel their skin is burning, since it penetrates in the skin just enough to light your pain receptors. Comes in variety of sizes. <https://en.m.wikipedia.org/wiki/Active_Denial_System>
116,606
And by "Weapons" I mean ranged weapons specifically. Melee weapons would certainly be useful for close-quarters, but due to the range at which combat occurs in this question, I'm looking for ranged weapons like firearms. They must function in zero-G, but functioning in a vacuum isn't a necessity due to the fact that m...
2018/06/28
[ "https://worldbuilding.stackexchange.com/questions/116606", "https://worldbuilding.stackexchange.com", "https://worldbuilding.stackexchange.com/users/48871/" ]
A taser would work. Short range, but pretty much no chance of overpenetration and the darts are low enough velocity that recoil shouldn't be an issue. Plus sometimes you want to capture someone. Future refinements could increase range/ capacity/ reliability/ lethality. Flashbangs would also probably be more effective...
1. **Flechette weapons.** Flechettes are thin, low-mass darts that travel at considerably higher muzzle velocities than conventional rounds. They have much less recoil than bullets, and as a result, can also be fired at a higher rate without causing your aim to go off too much. Look into the SCMITR: especially in the c...
116,606
And by "Weapons" I mean ranged weapons specifically. Melee weapons would certainly be useful for close-quarters, but due to the range at which combat occurs in this question, I'm looking for ranged weapons like firearms. They must function in zero-G, but functioning in a vacuum isn't a necessity due to the fact that m...
2018/06/28
[ "https://worldbuilding.stackexchange.com/questions/116606", "https://worldbuilding.stackexchange.com", "https://worldbuilding.stackexchange.com/users/48871/" ]
A taser would work. Short range, but pretty much no chance of overpenetration and the darts are low enough velocity that recoil shouldn't be an issue. Plus sometimes you want to capture someone. Future refinements could increase range/ capacity/ reliability/ lethality. Flashbangs would also probably be more effective...
**Remote Controlled Mobile Turret** Officer's are issued an armed bot with a paired hand unit that is shaped like a gun. The hand unit is only used for targeting, via appropriate sights or optics and it shines a beam on the target. The bot acquires the beam's target and magnetically or otherwise anchors itself. Upon pu...
116,606
And by "Weapons" I mean ranged weapons specifically. Melee weapons would certainly be useful for close-quarters, but due to the range at which combat occurs in this question, I'm looking for ranged weapons like firearms. They must function in zero-G, but functioning in a vacuum isn't a necessity due to the fact that m...
2018/06/28
[ "https://worldbuilding.stackexchange.com/questions/116606", "https://worldbuilding.stackexchange.com", "https://worldbuilding.stackexchange.com/users/48871/" ]
**Remote Controlled Mobile Turret** Officer's are issued an armed bot with a paired hand unit that is shaped like a gun. The hand unit is only used for targeting, via appropriate sights or optics and it shines a beam on the target. The bot acquires the beam's target and magnetically or otherwise anchors itself. Upon pu...
**Recoil is not certainly bad** In a battle with ranged weapons you don't want to cross through an open space with a predictable direction and speed and you really really don't want to take a long time doing it. By firing a weapon with recoil while on a ballistic course you make targeting you slightly harder by changi...
116,606
And by "Weapons" I mean ranged weapons specifically. Melee weapons would certainly be useful for close-quarters, but due to the range at which combat occurs in this question, I'm looking for ranged weapons like firearms. They must function in zero-G, but functioning in a vacuum isn't a necessity due to the fact that m...
2018/06/28
[ "https://worldbuilding.stackexchange.com/questions/116606", "https://worldbuilding.stackexchange.com", "https://worldbuilding.stackexchange.com/users/48871/" ]
In physics terms, most of your common projectile weapons damage through the application of kinetic energy. Since you're applying force to impart energy onto the projectile, you get the opposite force; that's the principle of recoil. So your options basically boil down to "use a weapon that doesn't rely on kinetic energ...
Bows and arrows. You really don't want something that can accidentally puncture a hole in the hull/windows of the space station. Electric assisted draw bows and smart arrows to be precise.
116,606
And by "Weapons" I mean ranged weapons specifically. Melee weapons would certainly be useful for close-quarters, but due to the range at which combat occurs in this question, I'm looking for ranged weapons like firearms. They must function in zero-G, but functioning in a vacuum isn't a necessity due to the fact that m...
2018/06/28
[ "https://worldbuilding.stackexchange.com/questions/116606", "https://worldbuilding.stackexchange.com", "https://worldbuilding.stackexchange.com/users/48871/" ]
A taser would work. Short range, but pretty much no chance of overpenetration and the darts are low enough velocity that recoil shouldn't be an issue. Plus sometimes you want to capture someone. Future refinements could increase range/ capacity/ reliability/ lethality. Flashbangs would also probably be more effective...
Anyone remember those [buzz-saw drone things](http://half-life.wikia.com/wiki/Manhack) from Half Life 2? Get a dozen of so 4-inch-wide versions of those, and a targeting laser pistol. Zero recoil on you, and the psychological impact of a buzzing swarm of death descending on your opponent is pretty intimidating. Since ...
116,606
And by "Weapons" I mean ranged weapons specifically. Melee weapons would certainly be useful for close-quarters, but due to the range at which combat occurs in this question, I'm looking for ranged weapons like firearms. They must function in zero-G, but functioning in a vacuum isn't a necessity due to the fact that m...
2018/06/28
[ "https://worldbuilding.stackexchange.com/questions/116606", "https://worldbuilding.stackexchange.com", "https://worldbuilding.stackexchange.com/users/48871/" ]
In physics terms, most of your common projectile weapons damage through the application of kinetic energy. Since you're applying force to impart energy onto the projectile, you get the opposite force; that's the principle of recoil. So your options basically boil down to "use a weapon that doesn't rely on kinetic energ...
I would suggest a long spear as a ranged weapon. It could work on a space station and you could poke at walls to move yourself around in zero G. Also, on a tangent, I would create a cannon that the player holds but as it fires all of its recoil expels through a jet engine on the back of the player so the player stays ...
32,902
`dsm` requires the devel module but I guess you have that installed anyway if your developing modules. `debug` and `watchdog` having the advantage that is writes to the log file. I can see the advantage of `watchdog` on a live site so users don't get bugged by messages while debugging the site. but is harder to use ( ...
2012/06/01
[ "https://drupal.stackexchange.com/questions/32902", "https://drupal.stackexchange.com", "https://drupal.stackexchange.com/users/3482/" ]
If devel is available, i use mostly `dpm`. If not, I use `drupal_set_message(print_r($array, true))`. This helps me in the most cases. If both are not available or visible, I use the Watchdog.
`watchdog` has always been a preference for me. Most of the situations my troubles involve checking values before submit or redirects and using `dpm` and `dsm` to check debugging info in the message tab seem a bit out of place. Checking the logs in the admin end and having the ability to filter seems a better thought f...