qid int64 1 74.7M | question stringlengths 0 58.3k | date stringlengths 10 10 | metadata list | response_j stringlengths 2 48.3k | response_k stringlengths 2 40.5k |
|---|---|---|---|---|---|
16,731,882 | I know there are tons of projects, I searched in <https://www.cocoacontrols.com/> and found some very interesting, like `MasterDetailController`, that is the simlpest one and I got working very good.
But now I have a problem, and probabbly you can help me with another cool and simple slide control, or just a matter of... | 2013/05/24 | [
"https://Stackoverflow.com/questions/16731882",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1987098/"
] | How about this: <https://www.cocoacontrols.com/controls/uiscrollslidingpages>. Sliding scrolling viewcontroller. Instead of rootviewcontroller, pass this... | You assign the slidecontroller to the uiview and then set the rootviewcontroller to your viewcontroller. This means that the slideviewcontroller will only work with the assigned view.
If you want to use the slidecontroller for other viewcontrollers you should do it the other way around and set the rootViewController ... |
16,731,882 | I know there are tons of projects, I searched in <https://www.cocoacontrols.com/> and found some very interesting, like `MasterDetailController`, that is the simlpest one and I got working very good.
But now I have a problem, and probabbly you can help me with another cool and simple slide control, or just a matter of... | 2013/05/24 | [
"https://Stackoverflow.com/questions/16731882",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1987098/"
] | if you are creating slide/swipe like facebook
application then follow link which is good example of this
<https://github.com/edgecase/ECSlidingViewController> | You assign the slidecontroller to the uiview and then set the rootviewcontroller to your viewcontroller. This means that the slideviewcontroller will only work with the assigned view.
If you want to use the slidecontroller for other viewcontrollers you should do it the other way around and set the rootViewController ... |
16,731,882 | I know there are tons of projects, I searched in <https://www.cocoacontrols.com/> and found some very interesting, like `MasterDetailController`, that is the simlpest one and I got working very good.
But now I have a problem, and probabbly you can help me with another cool and simple slide control, or just a matter of... | 2013/05/24 | [
"https://Stackoverflow.com/questions/16731882",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1987098/"
] | How about this: <https://www.cocoacontrols.com/controls/uiscrollslidingpages>. Sliding scrolling viewcontroller. Instead of rootviewcontroller, pass this... | Here is one I wrote. Pretty simple to use. It's built on top of UINavigationcontroller and doesn't require any kind of sub-classing on your view controllers.
<https://github.com/aryaxt/iOS-Slide-Menu> |
16,731,882 | I know there are tons of projects, I searched in <https://www.cocoacontrols.com/> and found some very interesting, like `MasterDetailController`, that is the simlpest one and I got working very good.
But now I have a problem, and probabbly you can help me with another cool and simple slide control, or just a matter of... | 2013/05/24 | [
"https://Stackoverflow.com/questions/16731882",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1987098/"
] | How about this: <https://www.cocoacontrols.com/controls/uiscrollslidingpages>. Sliding scrolling viewcontroller. Instead of rootviewcontroller, pass this... | You can use this simple library
<https://github.com/arturdev/AMSlideMenu>
This exactly what you need.
Its FULLY customizable and with different animations.
In demo project you can see how to implement multiple menus/viewControllers in your app. |
16,731,882 | I know there are tons of projects, I searched in <https://www.cocoacontrols.com/> and found some very interesting, like `MasterDetailController`, that is the simlpest one and I got working very good.
But now I have a problem, and probabbly you can help me with another cool and simple slide control, or just a matter of... | 2013/05/24 | [
"https://Stackoverflow.com/questions/16731882",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1987098/"
] | if you are creating slide/swipe like facebook
application then follow link which is good example of this
<https://github.com/edgecase/ECSlidingViewController> | Here is one I wrote. Pretty simple to use. It's built on top of UINavigationcontroller and doesn't require any kind of sub-classing on your view controllers.
<https://github.com/aryaxt/iOS-Slide-Menu> |
16,731,882 | I know there are tons of projects, I searched in <https://www.cocoacontrols.com/> and found some very interesting, like `MasterDetailController`, that is the simlpest one and I got working very good.
But now I have a problem, and probabbly you can help me with another cool and simple slide control, or just a matter of... | 2013/05/24 | [
"https://Stackoverflow.com/questions/16731882",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1987098/"
] | if you are creating slide/swipe like facebook
application then follow link which is good example of this
<https://github.com/edgecase/ECSlidingViewController> | You can use this simple library
<https://github.com/arturdev/AMSlideMenu>
This exactly what you need.
Its FULLY customizable and with different animations.
In demo project you can see how to implement multiple menus/viewControllers in your app. |
30,589,109 | This is my first program for AVR. While building, the code is showing error:
conflicting types for 'Encode'
implicit declaration of 'Encode'
I have written the following code:
```
#include <avr/io.h>
#include <util/delay.h>
#include <stdlib.h>
#define SegDataPort PORTC
#define SegDataPin PINC
#define SegDataDDR DDRC... | 2015/06/02 | [
"https://Stackoverflow.com/questions/30589109",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4113963/"
] | >
> *implicit declaration of 'Encode'*
>
>
>
In `C` a function needs to be either *declared* or *defined* before it has been used (called).
Either
* Move the definition of `Encode()` function before `main()`
* Add a forward declaration to `Encode()` before `main()`.
That said, `floor()` is a function, defined i... | **First mistake:**
```
unsigned char adc_value;
float volt = adc_value/1023;
```
You defind `adc_value` as an `unsigned char` and in the next line you tried to divide it by `1023` and assigned the result to a `float` type variable. You can't do these in `C` language. (More over you didn't assign any value to `adc_... |
18,656,988 | so I've been trying to write a method that takes a HashMap, and counts how many of the same keys there are in the HashMap. So here's the code, it should be pretty self explanatory.
```
import java.util.HashMap;
import java.util.Map;
public class ExtendedHashMap extends HashMap<String, Integer> {
public ExtendedHashM... | 2013/09/06 | [
"https://Stackoverflow.com/questions/18656988",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1676781/"
] | **Duplicate keys are not allowed in HashMap**. So it is obvious you will get only **one** as the answer!
Just for the record you will not get any Excpetion when you add two different values with same key. Your original value will silently get replaced by the new value. Try doing
```
ex.get("Item One");
```
You may... | >
>
> >
> > counts how many of the same keys there are in the HashMap.
> >
> >
> >
>
>
>
The keys are unique in all maps. If the key is there in the Map the count will always be **ONE**
Go trough the API of [MAP](http://docs.oracle.com/javase/6/docs/api/java/util/Map.html) first.
>
> A map cannot contain du... |
18,656,988 | so I've been trying to write a method that takes a HashMap, and counts how many of the same keys there are in the HashMap. So here's the code, it should be pretty self explanatory.
```
import java.util.HashMap;
import java.util.Map;
public class ExtendedHashMap extends HashMap<String, Integer> {
public ExtendedHashM... | 2013/09/06 | [
"https://Stackoverflow.com/questions/18656988",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1676781/"
] | I strongly recommend you wrap a collection instead of extending it.
This is the same as
```
public int keyCount(String keyString) {
return containsKey(keyString) ? 1 : 0;
}
```
Perhaps you had a [MultiMap](http://guava-libraries.googlecode.com/svn/tags/release03/javadoc/com/google/common/collect/Multimap.html) ... | >
>
> >
> > counts how many of the same keys there are in the HashMap.
> >
> >
> >
>
>
>
The keys are unique in all maps. If the key is there in the Map the count will always be **ONE**
Go trough the API of [MAP](http://docs.oracle.com/javase/6/docs/api/java/util/Map.html) first.
>
> A map cannot contain du... |
18,656,988 | so I've been trying to write a method that takes a HashMap, and counts how many of the same keys there are in the HashMap. So here's the code, it should be pretty self explanatory.
```
import java.util.HashMap;
import java.util.Map;
public class ExtendedHashMap extends HashMap<String, Integer> {
public ExtendedHashM... | 2013/09/06 | [
"https://Stackoverflow.com/questions/18656988",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1676781/"
] | **Duplicate keys are not allowed in HashMap**. So it is obvious you will get only **one** as the answer!
Just for the record you will not get any Excpetion when you add two different values with same key. Your original value will silently get replaced by the new value. Try doing
```
ex.get("Item One");
```
You may... | `HashMap` is a key value pair data structure. and `key` is unique. So answer is **one**. |
18,656,988 | so I've been trying to write a method that takes a HashMap, and counts how many of the same keys there are in the HashMap. So here's the code, it should be pretty self explanatory.
```
import java.util.HashMap;
import java.util.Map;
public class ExtendedHashMap extends HashMap<String, Integer> {
public ExtendedHashM... | 2013/09/06 | [
"https://Stackoverflow.com/questions/18656988",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1676781/"
] | I strongly recommend you wrap a collection instead of extending it.
This is the same as
```
public int keyCount(String keyString) {
return containsKey(keyString) ? 1 : 0;
}
```
Perhaps you had a [MultiMap](http://guava-libraries.googlecode.com/svn/tags/release03/javadoc/com/google/common/collect/Multimap.html) ... | `HashMap` is a key value pair data structure. and `key` is unique. So answer is **one**. |
11,246,331 | While searching the web, I found this code:
```
$apprequest_url ="https://graph.facebook.com/" .
"/apprequests?ids=USERID_1,USERID_2,USERID_3" .
"&message='INSERT_UT8_STRING_MSG'" .
"&data='INSERT_STRING_DATA'&" .
$app_access_token . "&method=post";
```
Can anyone explain to me h... | 2012/06/28 | [
"https://Stackoverflow.com/questions/11246331",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1485130/"
] | The URL is a Graph API endpoint, along with necessary options via the query string.
It works by a request being made to that URL, and Facebook will return the result of that Graph API call via the HTTP response.
For more info, you should do a little research on REST APIs. ;-)
As a side note as well, the code in ASHU... | You can send app request using javascript sdk.
```
<html>
<head>
<script type="text/javascript" src="http://connect.facebook.net/en_US/all.js"></script>
<script type="text/javascript">
FB.init({
appId :<?php echo $facebook_appid;?>,
status : true, // check login status
cookie : ... |
2,448,828 | What does the equation below say about the conditional distribution $P(ab|xy)$?
$$ P(ab|xy) = \int{ d\lambda \ \rho(\lambda)\ P(a|x\lambda)\ P(b|y\lambda) }$$
What does $\lambda$ denote here? Could you point me to some resources where I could learn about the semantics of the expression on the right hand side?
I can... | 2017/09/28 | [
"https://math.stackexchange.com/questions/2448828",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/56819/"
] | It sounds like you have random variables $A$, $B$, $X$, $Y$, $\Lambda$ for which
$$\Pr(A=a, B=b\mid X=x, Y=y) = \mathbb E\_\lambda\left[\Pr(A=a\mid X=x, \Lambda=\lambda)\cdot\Pr(B=b\mid Y=y, \Lambda=\lambda) \right]$$
Here $\mathbb E$ is expectation and $\Pr$ is probability (I'm assuming discrete random variables $A$,... | What you wrote is known as marginalization.
Here's the idea:
Suppose I have a red die and a blue die.
What is the probability to roll a 6 on the red die?
$P(r=6) = P(r=6|b=1) \* P(b=1) + P(r=6|b=2) \* P(b=2)+ ... + P(r=6|b=6) \* P(b=6)$
Basically the probability to roll a 6 on the red die is the probability red is ... |
59,406,982 | I want to know the difference between the `Class(const Class & c)` constructor and the `Class(Class & c)` constructor in C++.
```
class Class
{
public:
Class()
{
cout << "running Class()..." << endl;
}
Class(Class& c)
{
cout << "running Class(Class& c)..." << endl;
}
Class(co... | 2019/12/19 | [
"https://Stackoverflow.com/questions/59406982",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/10705400/"
] | Use [`Series.unstack`](http://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.Series.unstack.html) with [`DataFrame.stack`](http://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.stack.html):
```
df1 = (df.set_index(['id','t'])['price']
.unstack()
.stack(dropna=False)
... | One option is to use the [complete](https://pyjanitor-devs.github.io/pyjanitor/api/functions/#janitor.functions.complete.complete) function from [pyjanitor](https://pyjanitor-devs.github.io/pyjanitor/) to expose the implicitly missing rows;
```py
# pip install pyjanitor
import pandas as pd
import janitor
df.complete(... |
38,450,725 | I want to fetch the clientroot of perforce in a perl script.
I wrote the code as :
```
my $workspace_root=system("p4 client -o | findstr /b Root");
print $workspace_root;
```
Instead of printing the path, it prints `0`
Could anyone please tell what I am missing here? | 2016/07/19 | [
"https://Stackoverflow.com/questions/38450725",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5005698/"
] | I was facing similar kind of problem.There is image of error attached.Error is highlighted in red.
Turning off the Instant run removed error for Android Studio 2.3 and 3.1.4.
[](https://i.stack.imgur.com/TE4VF.png)
[;
print $workspace_root;
```
Instead of printing the path, it prints `0`
Could anyone please tell what I am missing here? | 2016/07/19 | [
"https://Stackoverflow.com/questions/38450725",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5005698/"
] | After trying the different solutions from the different answers, I tried changing the USB debugging cable, and the problem resolved finally. | i was also getting the same error repeatedly but could not solve it as i am complete new to android development.
But then it came to my mind that the error is appearing because its not able to install the apk in the device as the error says.
So i make sure that my Oneplus3 is in debugging mode and also allowing file tr... |
38,450,725 | I want to fetch the clientroot of perforce in a perl script.
I wrote the code as :
```
my $workspace_root=system("p4 client -o | findstr /b Root");
print $workspace_root;
```
Instead of printing the path, it prints `0`
Could anyone please tell what I am missing here? | 2016/07/19 | [
"https://Stackoverflow.com/questions/38450725",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5005698/"
] | **Note:** The top answers recommend to **disable Instant Run**. Try this before exploring my listed solutions to prevent wasting more time than needed.
Here are some possible solutions:
**1) Make sure that your phone is properly connected to your PC with a USB cable:** Before going over these fixes, make sure that yo... | If your device is listed, but shown as "OFFLINE", yet no popup to accept USB debugging has occured on the phone: Disconnect/reconnect USB cable, and the popup may show.
Probably this is a common cause, it's mentioned by others, but not in simplest terms. |
38,450,725 | I want to fetch the clientroot of perforce in a perl script.
I wrote the code as :
```
my $workspace_root=system("p4 client -o | findstr /b Root");
print $workspace_root;
```
Instead of printing the path, it prints `0`
Could anyone please tell what I am missing here? | 2016/07/19 | [
"https://Stackoverflow.com/questions/38450725",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5005698/"
] | This error happens due to Gradle not synced with the project. go to Tools- Android- Sync Project with Gradle files. Then Run it again.
On newer Android Studio versions, go to File-> Sync project with gradle files | In my case, going to Settings>Build, Execution, Development>Compiler>Command-line options and removing the `--dry-run` flag fixed it for me. Not sure why that was there in the first place, but it solved it for me.
[](https://i.stack.imgur.com/1Hn5v.png) |
38,450,725 | I want to fetch the clientroot of perforce in a perl script.
I wrote the code as :
```
my $workspace_root=system("p4 client -o | findstr /b Root");
print $workspace_root;
```
Instead of printing the path, it prints `0`
Could anyone please tell what I am missing here? | 2016/07/19 | [
"https://Stackoverflow.com/questions/38450725",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5005698/"
] | This issue seems to be bug in Android Studio.
I tried all other workarounds but the issue was appearing randomly.
I also have custom named apk for output. But Android studio was randomly picking custom apk name and default apk name.
Adding **Gradle-aware Make** solved the issue.
Following are the steps.
1. Menu *... | Trying cleaning AND rebuilding your project: In Android Studio, open up the Build tab at the top left and try both the Clean and Rebuild options. |
38,450,725 | I want to fetch the clientroot of perforce in a perl script.
I wrote the code as :
```
my $workspace_root=system("p4 client -o | findstr /b Root");
print $workspace_root;
```
Instead of printing the path, it prints `0`
Could anyone please tell what I am missing here? | 2016/07/19 | [
"https://Stackoverflow.com/questions/38450725",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5005698/"
] | I was facing similar kind of problem.There is image of error attached.Error is highlighted in red.
Turning off the Instant run removed error for Android Studio 2.3 and 3.1.4.
[](https://i.stack.imgur.com/TE4VF.png)
[;
print $workspace_root;
```
Instead of printing the path, it prints `0`
Could anyone please tell what I am missing here? | 2016/07/19 | [
"https://Stackoverflow.com/questions/38450725",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5005698/"
] | mi users if you are facing this type of issue follow these steps:
Step 1 : generate developer options as follow
Settings>>About Device>>Click 7 times on MIUI Version>> It will Generate Developer Options.
Now Enable Following...
Step 2: Setting>Additional setting> Developer options> Enable USB Debugging
Step 3: Set... | Try to this way :
1) In Instance Run is Enable then desable it.
2) Save it and Rebuild the project.
3) Check devices is online or USB debugging On your device.
4) Then Run It App On your devices.
**Note :**
If you use mobile device is MI (Xiaomi) Then Check :
=> setting>Additional setting> Developer options> Ins... |
38,450,725 | I want to fetch the clientroot of perforce in a perl script.
I wrote the code as :
```
my $workspace_root=system("p4 client -o | findstr /b Root");
print $workspace_root;
```
Instead of printing the path, it prints `0`
Could anyone please tell what I am missing here? | 2016/07/19 | [
"https://Stackoverflow.com/questions/38450725",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5005698/"
] | This error happens due to Gradle not synced with the project. go to Tools- Android- Sync Project with Gradle files. Then Run it again.
On newer Android Studio versions, go to File-> Sync project with gradle files | In my case my device didn't have enough memory. After trying out a number of the suggestions here, I finally noticed the notification on my phone about low memory. The notification had been there for hours apparently. |
38,450,725 | I want to fetch the clientroot of perforce in a perl script.
I wrote the code as :
```
my $workspace_root=system("p4 client -o | findstr /b Root");
print $workspace_root;
```
Instead of printing the path, it prints `0`
Could anyone please tell what I am missing here? | 2016/07/19 | [
"https://Stackoverflow.com/questions/38450725",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5005698/"
] | In my case my device didn't have enough memory. After trying out a number of the suggestions here, I finally noticed the notification on my phone about low memory. The notification had been there for hours apparently. | your device can be the problem too
```
'cmd package install-create -r -t --full -S 85640035' returns error 'Unknown failure: Exception occurred while executing:
android.os.ParcelableException: java.io.IOException: Requested internal only, but not enough space
at android.util.ExceptionUtils.wrap(Except... |
38,450,725 | I want to fetch the clientroot of perforce in a perl script.
I wrote the code as :
```
my $workspace_root=system("p4 client -o | findstr /b Root");
print $workspace_root;
```
Instead of printing the path, it prints `0`
Could anyone please tell what I am missing here? | 2016/07/19 | [
"https://Stackoverflow.com/questions/38450725",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5005698/"
] | **Note:** The top answers recommend to **disable Instant Run**. Try this before exploring my listed solutions to prevent wasting more time than needed.
Here are some possible solutions:
**1) Make sure that your phone is properly connected to your PC with a USB cable:** Before going over these fixes, make sure that yo... | After trying the different solutions from the different answers, I tried changing the USB debugging cable, and the problem resolved finally. |
43,801,671 | I have a single page web application using React and materialize-css and I would like to export it as static HTML and CSS so that it is possible to easily edit HTML for the purpose of prototyping. Is it possible to export at least a snapshot of current state?
I tried "save page" in Firefox and Chrome, but it does not ... | 2017/05/05 | [
"https://Stackoverflow.com/questions/43801671",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/768438/"
] | This was the first thread I found on SW.. so I think it would be appropriate to copy my own answer from another thread: <https://stackoverflow.com/a/72422258/1215913>
```
async function saveToFile() {
const handle = await showSaveFilePicker({
suggestedName: 'index.html',
types: [{
des... | I had done this before but was stuck and couldn't seem to find the documentation anywhere. My scenario was I had a react js SPA and needed to create a static build to run without a server (through an organisations SharePoint using a static doc repository).
It is pretty simple in the end, run
```
npm run build
```
i... |
43,801,671 | I have a single page web application using React and materialize-css and I would like to export it as static HTML and CSS so that it is possible to easily edit HTML for the purpose of prototyping. Is it possible to export at least a snapshot of current state?
I tried "save page" in Firefox and Chrome, but it does not ... | 2017/05/05 | [
"https://Stackoverflow.com/questions/43801671",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/768438/"
] | ```
var pageHTML = window.document.getElementById('divToPDF').innerHTML;
let data = new Blob([pageHTML], {type: 'data:attachment/text,'});
let csvURL = window.URL.createObjectURL(data);
let tempLink = document.createElement('a');
tempLink.href = csvURL;
tempLink.setAttribute('download', 'Graph.html');
tem... | This was the first thread I found on SW.. so I think it would be appropriate to copy my own answer from another thread: <https://stackoverflow.com/a/72422258/1215913>
```
async function saveToFile() {
const handle = await showSaveFilePicker({
suggestedName: 'index.html',
types: [{
des... |
43,801,671 | I have a single page web application using React and materialize-css and I would like to export it as static HTML and CSS so that it is possible to easily edit HTML for the purpose of prototyping. Is it possible to export at least a snapshot of current state?
I tried "save page" in Firefox and Chrome, but it does not ... | 2017/05/05 | [
"https://Stackoverflow.com/questions/43801671",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/768438/"
] | Follow the following steps :-
**1.** In brouser, got to the **developer tools**,
**2.** select **Inspector(firefox)/Elements(chrome)**,
**3.** then select the tag **HTML**, right click on it,
**4.** then click **Edit as HTML**.
Now you can copy all the code and save it. While the color and shape of the documen... | You can build your code and host it on [github.io](https://pages.github.com). The [following tutorial](https://github.com/gitname/react-gh-pages) will help you achieve that. You can then use the generated code in the gh-pages branch as your exported HTML |
43,801,671 | I have a single page web application using React and materialize-css and I would like to export it as static HTML and CSS so that it is possible to easily edit HTML for the purpose of prototyping. Is it possible to export at least a snapshot of current state?
I tried "save page" in Firefox and Chrome, but it does not ... | 2017/05/05 | [
"https://Stackoverflow.com/questions/43801671",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/768438/"
] | ```
var pageHTML = window.document.getElementById('divToPDF').innerHTML;
let data = new Blob([pageHTML], {type: 'data:attachment/text,'});
let csvURL = window.URL.createObjectURL(data);
let tempLink = document.createElement('a');
tempLink.href = csvURL;
tempLink.setAttribute('download', 'Graph.html');
tem... | I had done this before but was stuck and couldn't seem to find the documentation anywhere. My scenario was I had a react js SPA and needed to create a static build to run without a server (through an organisations SharePoint using a static doc repository).
It is pretty simple in the end, run
```
npm run build
```
i... |
43,801,671 | I have a single page web application using React and materialize-css and I would like to export it as static HTML and CSS so that it is possible to easily edit HTML for the purpose of prototyping. Is it possible to export at least a snapshot of current state?
I tried "save page" in Firefox and Chrome, but it does not ... | 2017/05/05 | [
"https://Stackoverflow.com/questions/43801671",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/768438/"
] | Probably not ideal, but you can store the entire page as a variable and download it. Run this in your browser console after the page has loaded:
```
var pageHTML = document.documentElement.outerHTML;
var tempEl = document.createElement('a');
tempEl.href = 'data:attachment/text,' + encodeURI(pageHTML);
tempEl.target ... | ```
var pageHTML = window.document.getElementById('divToPDF').innerHTML;
let data = new Blob([pageHTML], {type: 'data:attachment/text,'});
let csvURL = window.URL.createObjectURL(data);
let tempLink = document.createElement('a');
tempLink.href = csvURL;
tempLink.setAttribute('download', 'Graph.html');
tem... |
43,801,671 | I have a single page web application using React and materialize-css and I would like to export it as static HTML and CSS so that it is possible to easily edit HTML for the purpose of prototyping. Is it possible to export at least a snapshot of current state?
I tried "save page" in Firefox and Chrome, but it does not ... | 2017/05/05 | [
"https://Stackoverflow.com/questions/43801671",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/768438/"
] | The [ReactDOMServer](https://facebook.github.io/react/docs/react-dom-server.html) module contains a function for rendering a React application to static HTML - it's designed for use on the server, but I don't think there's anything to stop you using it in the browser (don't do this in production though!)
```
import Re... | ```
var pageHTML = window.document.getElementById('divToPDF').innerHTML;
let data = new Blob([pageHTML], {type: 'data:attachment/text,'});
let csvURL = window.URL.createObjectURL(data);
let tempLink = document.createElement('a');
tempLink.href = csvURL;
tempLink.setAttribute('download', 'Graph.html');
tem... |
43,801,671 | I have a single page web application using React and materialize-css and I would like to export it as static HTML and CSS so that it is possible to easily edit HTML for the purpose of prototyping. Is it possible to export at least a snapshot of current state?
I tried "save page" in Firefox and Chrome, but it does not ... | 2017/05/05 | [
"https://Stackoverflow.com/questions/43801671",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/768438/"
] | The [ReactDOMServer](https://facebook.github.io/react/docs/react-dom-server.html) module contains a function for rendering a React application to static HTML - it's designed for use on the server, but I don't think there's anything to stop you using it in the browser (don't do this in production though!)
```
import Re... | You can build your code and host it on [github.io](https://pages.github.com). The [following tutorial](https://github.com/gitname/react-gh-pages) will help you achieve that. You can then use the generated code in the gh-pages branch as your exported HTML |
43,801,671 | I have a single page web application using React and materialize-css and I would like to export it as static HTML and CSS so that it is possible to easily edit HTML for the purpose of prototyping. Is it possible to export at least a snapshot of current state?
I tried "save page" in Firefox and Chrome, but it does not ... | 2017/05/05 | [
"https://Stackoverflow.com/questions/43801671",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/768438/"
] | The [ReactDOMServer](https://facebook.github.io/react/docs/react-dom-server.html) module contains a function for rendering a React application to static HTML - it's designed for use on the server, but I don't think there's anything to stop you using it in the browser (don't do this in production though!)
```
import Re... | I had done this before but was stuck and couldn't seem to find the documentation anywhere. My scenario was I had a react js SPA and needed to create a static build to run without a server (through an organisations SharePoint using a static doc repository).
It is pretty simple in the end, run
```
npm run build
```
i... |
43,801,671 | I have a single page web application using React and materialize-css and I would like to export it as static HTML and CSS so that it is possible to easily edit HTML for the purpose of prototyping. Is it possible to export at least a snapshot of current state?
I tried "save page" in Firefox and Chrome, but it does not ... | 2017/05/05 | [
"https://Stackoverflow.com/questions/43801671",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/768438/"
] | Probably not ideal, but you can store the entire page as a variable and download it. Run this in your browser console after the page has loaded:
```
var pageHTML = document.documentElement.outerHTML;
var tempEl = document.createElement('a');
tempEl.href = 'data:attachment/text,' + encodeURI(pageHTML);
tempEl.target ... | This was the first thread I found on SW.. so I think it would be appropriate to copy my own answer from another thread: <https://stackoverflow.com/a/72422258/1215913>
```
async function saveToFile() {
const handle = await showSaveFilePicker({
suggestedName: 'index.html',
types: [{
des... |
43,801,671 | I have a single page web application using React and materialize-css and I would like to export it as static HTML and CSS so that it is possible to easily edit HTML for the purpose of prototyping. Is it possible to export at least a snapshot of current state?
I tried "save page" in Firefox and Chrome, but it does not ... | 2017/05/05 | [
"https://Stackoverflow.com/questions/43801671",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/768438/"
] | You can build your code and host it on [github.io](https://pages.github.com). The [following tutorial](https://github.com/gitname/react-gh-pages) will help you achieve that. You can then use the generated code in the gh-pages branch as your exported HTML | I had done this before but was stuck and couldn't seem to find the documentation anywhere. My scenario was I had a react js SPA and needed to create a static build to run without a server (through an organisations SharePoint using a static doc repository).
It is pretty simple in the end, run
```
npm run build
```
i... |
4,210,386 | Is it possible to resize a bitmap image sized 9000x9000 to 150x150? I've heard there are some limits... | 2010/11/17 | [
"https://Stackoverflow.com/questions/4210386",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/511482/"
] | >
> BitmapData: Flash CS5 ActionScript
> 3.0 Language Reference
>
>
> In AIR 1.5 and Flash Player 10, the
> maximum size for a BitmapData object
> is 8,191 pixels in width or height,
> and the total number of pixels cannot
> exceed 16,777,215 pixels. (So, if a
> BitmapData object is 8,191 pixels
> wide, it ca... | PNGEncoder
9000 shouldn't be too high
open the image and then use the PNGEncoder to save the image back out. |
47,163 | I have two different computers with different RAID5 arrays. When I run the command
```
mdadm --detail /dev/md0
```
one drive reports "active" while the other reports "clean" for the "state" field. What is the difference? Should I worry about either state? Both seem to work fine. | 2012/09/04 | [
"https://unix.stackexchange.com/questions/47163",
"https://unix.stackexchange.com",
"https://unix.stackexchange.com/users/16055/"
] | From [the RAID arrays documentation](https://www.kernel.org/doc/html/latest/admin-guide/md.html) in the Linux kernel:
>
>
> ```
> clean - no pending writes, but otherwise active.
> When written to inactive array, starts without resync
> If a write request arrives then
> if metadata is known, mark 'dirt... | The metadevice (md0) should report `clean` and the physical disks (f.e. /dev/sda2 and /dev/sdb2 for a simple mirror) should be `active sync`. Then all is fine. |
346,390 | I want to find integers $z=a^2+b^2$ with $\gcd(a,b)=1$. Clearly all prime numbers of the form $4k+1$ are such numbers, but what other composite numbers also enjoy this property? e.g. $74=5^2+7^2$, $625=7^2+24^2$. Please answer. | 2013/03/30 | [
"https://math.stackexchange.com/questions/346390",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/70140/"
] | All integers $z$ which are products of primes of the form $4k+1$, optionally multiplied by a single copy of $2$, can be expressed as $a^2 + b^2$ with $\gcd(a,b) = 1$.
You basically uses the fact the [Gaussian integers](http://en.wikipedia.org/wiki/Gaussian_integer) $\mathbb{Z}[i]$ is an unique factorization domain and... | Hint :
Use [Brahmagupta–Fibonacci identity](http://en.wikipedia.org/wiki/Brahmagupta%E2%80%93Fibonacci_identity). |
34,950,354 | I have a image with a ID.
IF someone click on that image a .HTML must slide up or fade in on the same page.
The .HTML page have also a close button so they can close the HTML page
But how can i show the .HTML page with jQuery or Javascript?
I want something like this :
<http://elitemodel.fr/fr/mainboard/women>
If yo... | 2016/01/22 | [
"https://Stackoverflow.com/questions/34950354",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5694158/"
] | I think you should be able to do this atomically using a common table expression. (I'm not 100% certain about this, and I haven't tested, so you'll need to verify that it works for you in your situation.)
```
;WITH cte AS
(
SELECT TOP(@ArrayCount)
ID, Exported, ExportExpires, ExportSession
FROM dbo.Gam... | I have a similar set up and I use [`sp_getapplock`](https://msdn.microsoft.com/en-us/library/ms189823.aspx). My application runs many threads and they call a stored procedure to get the `ID` of the element that has to be processed. `sp_getapplock` guarantees that the same `ID` would not be chosen by two different threa... |
34,950,354 | I have a image with a ID.
IF someone click on that image a .HTML must slide up or fade in on the same page.
The .HTML page have also a close button so they can close the HTML page
But how can i show the .HTML page with jQuery or Javascript?
I want something like this :
<http://elitemodel.fr/fr/mainboard/women>
If yo... | 2016/01/22 | [
"https://Stackoverflow.com/questions/34950354",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5694158/"
] | I think you should be able to do this atomically using a common table expression. (I'm not 100% certain about this, and I haven't tested, so you'll need to verify that it works for you in your situation.)
```
;WITH cte AS
(
SELECT TOP(@ArrayCount)
ID, Exported, ExportExpires, ExportSession
FROM dbo.Gam... | It does not work because multiple transactions might first execute the IN clause and find the same set of rows, then update multiple times and overwrite each other.
LukeH's answer is best, accept it.
You can also fix it by adding `AND Exported IS NULL` to cancel double updates.
Or, make this `SERIALIZABLE`. This wil... |
34,950,354 | I have a image with a ID.
IF someone click on that image a .HTML must slide up or fade in on the same page.
The .HTML page have also a close button so they can close the HTML page
But how can i show the .HTML page with jQuery or Javascript?
I want something like this :
<http://elitemodel.fr/fr/mainboard/women>
If yo... | 2016/01/22 | [
"https://Stackoverflow.com/questions/34950354",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5694158/"
] | I have a similar set up and I use [`sp_getapplock`](https://msdn.microsoft.com/en-us/library/ms189823.aspx). My application runs many threads and they call a stored procedure to get the `ID` of the element that has to be processed. `sp_getapplock` guarantees that the same `ID` would not be chosen by two different threa... | It does not work because multiple transactions might first execute the IN clause and find the same set of rows, then update multiple times and overwrite each other.
LukeH's answer is best, accept it.
You can also fix it by adding `AND Exported IS NULL` to cancel double updates.
Or, make this `SERIALIZABLE`. This wil... |
25,804,467 | ```
package com.example.dentalproject;
import android.app.Activity;
import android.os.Bundle;
import android.preference.EditTextPreference;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.ArrayAdapter;
import android.widget.Button;
import android.widget.EditText;
import androi... | 2014/09/12 | [
"https://Stackoverflow.com/questions/25804467",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3978940/"
] | As far as I know there are more than one patch versions that tried to fix the 64 bit crash issue you mention here, e.g. [JSONKit 64bit crash fix by heroims](https://github.com/heroims/JSONKit).
They all tried to fix that troublesome line for getting **tagged pointers**, "the very first thing that a pointer to an Objec... | There is an patched version of JSONKit [here](https://github.com/jcbertin/JSONKit) that fixes the 64 bit issues among others. |
35,012,943 | I want to have various tags in a container and have them display ellipsis when the tag text is too big (i.e. when it would stretch beyond the width of the container). The problem I am facing is that in Safari, the ellipsis are displayed even though the tag has space to display the full content.
This is the code that s... | 2016/01/26 | [
"https://Stackoverflow.com/questions/35012943",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2087769/"
] | I'm using this trick: adding a non-break space right after the text. You can add it directly into your html, like `<div class="ellipsis">Test </div>` or you can use the `:after` pseudo element. Here's the `.ellipsis` class that I'm using:
```css
.ellipsis {
white-space: nowrap;
text-overflow: ellipsis;
over... | When you remove the following lines from your `.content` element it works fine by me.
```
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
```
example: <http://codepen.io/WartClaes/pen/ZQxaKW?editors=1100>
Edit: although when looking further I see that you don't always use the same HTML structure? Wh... |
35,012,943 | I want to have various tags in a container and have them display ellipsis when the tag text is too big (i.e. when it would stretch beyond the width of the container). The problem I am facing is that in Safari, the ellipsis are displayed even though the tag has space to display the full content.
This is the code that s... | 2016/01/26 | [
"https://Stackoverflow.com/questions/35012943",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2087769/"
] | I'm using this trick: adding a non-break space right after the text. You can add it directly into your html, like `<div class="ellipsis">Test </div>` or you can use the `:after` pseudo element. Here's the `.ellipsis` class that I'm using:
```css
.ellipsis {
white-space: nowrap;
text-overflow: ellipsis;
over... | You need to add a "width" for the text, down to the text-overflow:
width: 100%; /*Or the size you need*/
It works for me in the safari 13. |
38,508,735 | I am using gmail API to send an email .In this the sending is successfully done. i want to know how to reply to that person ( who already send ) using php.
Here i attach my code for sending :
```
$line = "\n";
$strMailContent = $message;
$strMailTextVersion = strip_tags($strMailContent, '');
$strRawMessage = "";
$bo... | 2016/07/21 | [
"https://Stackoverflow.com/questions/38508735",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5383358/"
] | You need to pass the thread id of the message you want to reply to and set the same subject for the new message. I prefer using some library for generating the raw string for the message, instead of writing it manually in order to minimize the possibility of errors. Below is an example using PHPMailer.
```
$gmail = ne... | As the original question is using the Raw method of Googles API there is in fact quite a simple solution. Gmail API uses RFC 2822 (<https://datatracker.ietf.org/doc/html/rfc2822>) and therefore you can simply using the following:
`$strRawMessage .= "Reply-To: Test <test@test.com>\r\n";` |
38,508,735 | I am using gmail API to send an email .In this the sending is successfully done. i want to know how to reply to that person ( who already send ) using php.
Here i attach my code for sending :
```
$line = "\n";
$strMailContent = $message;
$strMailTextVersion = strip_tags($strMailContent, '');
$strRawMessage = "";
$bo... | 2016/07/21 | [
"https://Stackoverflow.com/questions/38508735",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5383358/"
] | The above answer from @trajchevska is pretty nice and I am glad that I found it (!) - but it will not "reveal the full truth". So I tried to put together my insights to create a snippet that should work as-it-is.
```
$user = 'me'; // or user@example.com
$emailId = 12301839123180983123;
$from = 'johndoe@foobar.com';
$f... | As the original question is using the Raw method of Googles API there is in fact quite a simple solution. Gmail API uses RFC 2822 (<https://datatracker.ietf.org/doc/html/rfc2822>) and therefore you can simply using the following:
`$strRawMessage .= "Reply-To: Test <test@test.com>\r\n";` |
38,485,495 | My php script:
```
<?php
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
exec('sudo /path/to/script.sh');
?>
```
my visudo line
```
www-data ALL=NOPASSWD: /path/to/script.sh
```
(I tripled checked every path)
If i remove the 'sudo' in the exec() it will execute... | 2016/07/20 | [
"https://Stackoverflow.com/questions/38485495",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4757824/"
] | 1. If your system has selinux or some other policy-based access control engine enabled, your web server process will be running under a constrained context which limits rights further. Verify whether you have selinux enabled.
2. Provide the full path to `sudo`. While your shell may have it in its path, perhaps your web... | 1 -If you're working with RHEL/CentOS and the path is under the /root path you can't execute it.
2 - Check if the scrit have the 'x' flag (chmod +x /path/to/script.sh)
3 - Check if the user ww-data can execute the scrit with
```
sudo -u www-data script.sh
``` |
12,196,389 | I have written a program to insert an array in all the rows of a column in a database table with respect to already filled column in the same database same table.
But it doesn't seems to work properly. Please tell me where I am going wrong!
```
$query = $sql = "SELECT A FROM `table`";
$result1 = mysql_query($query)... | 2012/08/30 | [
"https://Stackoverflow.com/questions/12196389",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1223286/"
] | Try this syntax :
```
$query= "INSERT INTO 'TABLE' SET B = '" . $value . "' WHERE A = '$row[$counter]' ";
```
By the way the table name 5 is extremly wierd. | ```
while ($row = mysql_fetch_row($result1)) {
foreach($output as $key=>$value){
$query = "INSERT INTO `TABLE` (`B`) VALUES ('" . $value . "') WHERE `A` = '".$row[$key]."' ";
$insert_col= mysql_query($query);
echo $query;
echo '<br/><br/>';
}}
```
tried the same thing.. but getting the same output ... |
12,196,389 | I have written a program to insert an array in all the rows of a column in a database table with respect to already filled column in the same database same table.
But it doesn't seems to work properly. Please tell me where I am going wrong!
```
$query = $sql = "SELECT A FROM `table`";
$result1 = mysql_query($query)... | 2012/08/30 | [
"https://Stackoverflow.com/questions/12196389",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1223286/"
] | From what I understand, you have a looping problem.
You have 2 lists that you need to increment simultaneously.
Try this:
```
$value = [' RD: 1.144', ' RD: 2.436', ' RD: 1.624', ' RD: 1.560', ' RD: 1.560', ' RD: 1.560'];
$row = ['3r_1', '3r_2', '3r_3', '3r_4', '3r_5', '3r_6'];
$cnt = count($row);//assuming $row and... | Try this syntax :
```
$query= "INSERT INTO 'TABLE' SET B = '" . $value . "' WHERE A = '$row[$counter]' ";
```
By the way the table name 5 is extremly wierd. |
12,196,389 | I have written a program to insert an array in all the rows of a column in a database table with respect to already filled column in the same database same table.
But it doesn't seems to work properly. Please tell me where I am going wrong!
```
$query = $sql = "SELECT A FROM `table`";
$result1 = mysql_query($query)... | 2012/08/30 | [
"https://Stackoverflow.com/questions/12196389",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1223286/"
] | Are you trying to something more like this
```
$i = 1;
$query = "SELECT A FROM `table`";
$result1 = mysql_query($query);
while ($row = mysql_fetch_row($result1)) {
$query = "INSERT INTO `TABLE` (`B`) VALUES ('" . $output[$i] . "') WHERE `A` = '".$row[0]."' ";
$insert_col = mysql_query($query);
$i++;
... | ```
while ($row = mysql_fetch_row($result1)) {
foreach($output as $key=>$value){
$query = "INSERT INTO `TABLE` (`B`) VALUES ('" . $value . "') WHERE `A` = '".$row[$key]."' ";
$insert_col= mysql_query($query);
echo $query;
echo '<br/><br/>';
}}
```
tried the same thing.. but getting the same output ... |
12,196,389 | I have written a program to insert an array in all the rows of a column in a database table with respect to already filled column in the same database same table.
But it doesn't seems to work properly. Please tell me where I am going wrong!
```
$query = $sql = "SELECT A FROM `table`";
$result1 = mysql_query($query)... | 2012/08/30 | [
"https://Stackoverflow.com/questions/12196389",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1223286/"
] | From what I understand, you have a looping problem.
You have 2 lists that you need to increment simultaneously.
Try this:
```
$value = [' RD: 1.144', ' RD: 2.436', ' RD: 1.624', ' RD: 1.560', ' RD: 1.560', ' RD: 1.560'];
$row = ['3r_1', '3r_2', '3r_3', '3r_4', '3r_5', '3r_6'];
$cnt = count($row);//assuming $row and... | Are you trying to something more like this
```
$i = 1;
$query = "SELECT A FROM `table`";
$result1 = mysql_query($query);
while ($row = mysql_fetch_row($result1)) {
$query = "INSERT INTO `TABLE` (`B`) VALUES ('" . $output[$i] . "') WHERE `A` = '".$row[0]."' ";
$insert_col = mysql_query($query);
$i++;
... |
12,196,389 | I have written a program to insert an array in all the rows of a column in a database table with respect to already filled column in the same database same table.
But it doesn't seems to work properly. Please tell me where I am going wrong!
```
$query = $sql = "SELECT A FROM `table`";
$result1 = mysql_query($query)... | 2012/08/30 | [
"https://Stackoverflow.com/questions/12196389",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1223286/"
] | From what I understand, you have a looping problem.
You have 2 lists that you need to increment simultaneously.
Try this:
```
$value = [' RD: 1.144', ' RD: 2.436', ' RD: 1.624', ' RD: 1.560', ' RD: 1.560', ' RD: 1.560'];
$row = ['3r_1', '3r_2', '3r_3', '3r_4', '3r_5', '3r_6'];
$cnt = count($row);//assuming $row and... | ```
while ($row = mysql_fetch_row($result1)) {
foreach($output as $key=>$value){
$query = "INSERT INTO `TABLE` (`B`) VALUES ('" . $value . "') WHERE `A` = '".$row[$key]."' ";
$insert_col= mysql_query($query);
echo $query;
echo '<br/><br/>';
}}
```
tried the same thing.. but getting the same output ... |
8,090,590 | Here is the object, and have following attribute:
```
NSString attri1;
NSString attri2;
NSString attri3;
NSString attri4;
```
If I want to list these attri, I can call
```
NSLog(aObj.attri1);
```
But can I make the 1 as a variable to call it from a loop? Is this possible to do so in objective-c?
```
for(int i ... | 2011/11/11 | [
"https://Stackoverflow.com/questions/8090590",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/148978/"
] | If you want to dynamically access a property of an object, that can be done with [Key Value Coding](http://developer.apple.com/library/mac/ipad/#documentation/Cocoa/Conceptual/KeyValueCoding/Articles/KeyValueCoding.html).
If the class is KVC-compliant, as most NS classes are, you can use `valueForKey:` or `valueForKe... | The feature you're looking for is generally called ["variable variables."](http://php.net/manual/en/language.variables.variable.php) Objective-C does not have this feature. Actually, most languages don't.
The good news is that you don't actually need this feature. Four variables named the same thing with a number at t... |
1,229,893 | By using infinite series find Laplace inverse for |1/(S^3+1)| .... I don't know what to do after using taylor expansion.. when I use it I got polynomial of $ S $ in the nominator which I can not deal with | 2015/04/11 | [
"https://math.stackexchange.com/questions/1229893",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/222377/"
] | Here is how you advance.
>
> $$ \frac{1}{1+s^3} = \frac{1}{s^3(1+\frac{1}{s^3})} = \sum\_{k=0}^{\infty} \frac{(-1)^k}{s^{3k+3}}$$
>
>
>
Apply inverse Laplace you get
$$ \sum\_{k=0}^{\infty} \frac{(-1)^k\, x^{3 k+2}}{\Gamma(3k+3)}. $$
Now you sum the above series.
**Added:** Here is the summation of the series ... | This is far easier using the definition of the inverse transform, i.e.,
$$\frac1{i 2 \pi} \int\_{c-i \infty}^{c+i \infty} ds \frac{e^{s t}}{s^3+1} $$
If you know complex analysis, then you know that this integral is simply the sum of the residues of the poles of the integrand. The poles are at $s=e^{i \pi/3}$, $s=e^{... |
13,678,640 | I've never seen this before. I'm seg faulting when comparing two integers.
EDIT: Forgot to include the most frustrating part: It runs fine in DDD so I cant debug this.
Here's my gdb session backtracing the seg fault:
```
> Reading symbols from /home/michael/ecs60/hw3/3/huffman...done.
[New LWP 4109]
warning: Can't ... | 2012/12/03 | [
"https://Stackoverflow.com/questions/13678640",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1110331/"
] | According to your stack trace, `hn` is `...`, which indicates that it's probably pointing to bad memory (and given that you're getting a seg-fault, it's almost certain it is). Are you sure that the `huffnode` being passed to the operator overload is valid? Has it been initialized?
Examining your stacktrace further, `n... | It almost certainly has nothing to do with the integers. One of the two things is probably invalid:
1. the `hn&` reference;
2. the `this` pointer.
Print out both, and you'll see which of the two is the culprit.
**edit**: I notice that you've added more code to your question. There's a problem with the following lin... |
13,678,640 | I've never seen this before. I'm seg faulting when comparing two integers.
EDIT: Forgot to include the most frustrating part: It runs fine in DDD so I cant debug this.
Here's my gdb session backtracing the seg fault:
```
> Reading symbols from /home/michael/ecs60/hw3/3/huffman...done.
[New LWP 4109]
warning: Can't ... | 2012/12/03 | [
"https://Stackoverflow.com/questions/13678640",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1110331/"
] | According to your stack trace, `hn` is `...`, which indicates that it's probably pointing to bad memory (and given that you're getting a seg-fault, it's almost certain it is). Are you sure that the `huffnode` being passed to the operator overload is valid? Has it been initialized?
Examining your stacktrace further, `n... | Your reference `hn` is invalid (probably `NULL`) hence why you're getting a Segmentation Fault. |
13,678,640 | I've never seen this before. I'm seg faulting when comparing two integers.
EDIT: Forgot to include the most frustrating part: It runs fine in DDD so I cant debug this.
Here's my gdb session backtracing the seg fault:
```
> Reading symbols from /home/michael/ecs60/hw3/3/huffman...done.
[New LWP 4109]
warning: Can't ... | 2012/12/03 | [
"https://Stackoverflow.com/questions/13678640",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1110331/"
] | According to your stack trace, `hn` is `...`, which indicates that it's probably pointing to bad memory (and given that you're getting a seg-fault, it's almost certain it is). Are you sure that the `huffnode` being passed to the operator overload is valid? Has it been initialized?
Examining your stacktrace further, `n... | The problem is your comparison order in cycle condition
```
while(heap[index] < heap[(index + 1)/2 -1] && index != 0)
```
You should put the `index != 0` comparison *first*
```
while(index != 0 && heap[index] < heap[(index + 1)/2 -1])
```
In your original variant the first comparison
```
heap[index] < heap[(i... |
35,129,225 | I would like to know how can I come up with a `lm` formula syntax that would enable me to use `paste` together with `cbind` for multiple multivariate regression.
Example
=======
In my model I have a set of variables, which corresponds to the primitive example below:
```
data(mtcars)
depVars <- paste("mpg", "disp")
... | 2016/02/01 | [
"https://Stackoverflow.com/questions/35129225",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1655567/"
] | Think it works.
```
data(mtcars)
depVars <- c("mpg", "disp")
indepVars <- c("qsec", "wt", "drat")
lm(formula(paste('cbind(',
paste(depVars, collapse = ','),
') ~ ',
paste(indepVars, collapse = '+'))), data = mtcars)
``` | All the solutions below use these definitions:
```
depVars <- c("mpg", "disp")
indepVars <- c("qsec", "wt", "drat")
```
**1) character string formula** Create a character string representing the formula and then run `lm` using `do.call`. Note that the the formula shown in the output displays correctly and is written... |
35,312,346 | this is my code:
```
function User() {
var self = this;
FB.api(someurl, function (response) {
self.id = response.id;
});
}
```
I can't get the id going like this:
```
var user = new User();
console.log(user.id);
``` | 2016/02/10 | [
"https://Stackoverflow.com/questions/35312346",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1691116/"
] | FB.api is an asynchronous function with a callback. At the time you read `user.id` the callback function has not been called yet.
Maybe you should move the async initialization out of the constructor, adding an explicit "init" function:
```
function User() {
var self = this;
this.init = function(onCompletio... | try
```
FB.api(someurl, function(response) {
console.log(response);
});
```
and post here response value. |
35,312,346 | this is my code:
```
function User() {
var self = this;
FB.api(someurl, function (response) {
self.id = response.id;
});
}
```
I can't get the id going like this:
```
var user = new User();
console.log(user.id);
``` | 2016/02/10 | [
"https://Stackoverflow.com/questions/35312346",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1691116/"
] | FB.api is an asynchronous function with a callback. At the time you read `user.id` the callback function has not been called yet.
Maybe you should move the async initialization out of the constructor, adding an explicit "init" function:
```
function User() {
var self = this;
this.init = function(onCompletio... | Try defining a pattern where you initialize your object, then using a callback in your asynchronous request. Something like this:
```
function User() {
var self = this;
self.init = function(cb) {
FB.api(someurl, function (response) {
self.id = response.id;
if (cb) {
... |
47,414,630 | I use last version of react and react-native on Windows 10 OS.
I have a strange behavior when i try to run my code on phone or to compile debug apk.
*1. Run on the phone*
`> react-native run-android`
the process run `gradlew` building (i think) , i get on the phone an OLD version of my code while this step is not ... | 2017/11/21 | [
"https://Stackoverflow.com/questions/47414630",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2732980/"
] | The trick with `objcopy` isn't meant as a full-featured way to embed resources and isn't portable at all, as you have seen.
Microsoft has its own mechanism for resources, so if you're specifically targeting windows, you could use a windows resource file and the [RCDATA resource](https://msdn.microsoft.com/en-us/librar... | It is a may be completely different approach but it provides a rather simple but portable solution:
We use a small tool to load a binary file and output it as C (or C++ source). Actually, I saw things like this in XPM and GIMP but it can be used for rather any binary data.
To include such tool in the build chain is n... |
47,414,630 | I use last version of react and react-native on Windows 10 OS.
I have a strange behavior when i try to run my code on phone or to compile debug apk.
*1. Run on the phone*
`> react-native run-android`
the process run `gradlew` building (i think) , i get on the phone an OLD version of my code while this step is not ... | 2017/11/21 | [
"https://Stackoverflow.com/questions/47414630",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2732980/"
] | The trick with `objcopy` isn't meant as a full-featured way to embed resources and isn't portable at all, as you have seen.
Microsoft has its own mechanism for resources, so if you're specifically targeting windows, you could use a windows resource file and the [RCDATA resource](https://msdn.microsoft.com/en-us/librar... | Your question originally didn't state whether this is for 64-bit Cygwin G++/MSVC++ or 32-bit. There is a subtle difference when it comes to name decorations.
---
x86 (32-bit Windows PE) solution with OBJCOPY
---------------------------------------------
I'll assume you had a resource file called `Resources_0.png`. Y... |
47,414,630 | I use last version of react and react-native on Windows 10 OS.
I have a strange behavior when i try to run my code on phone or to compile debug apk.
*1. Run on the phone*
`> react-native run-android`
the process run `gradlew` building (i think) , i get on the phone an OLD version of my code while this step is not ... | 2017/11/21 | [
"https://Stackoverflow.com/questions/47414630",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2732980/"
] | The trick with `objcopy` isn't meant as a full-featured way to embed resources and isn't portable at all, as you have seen.
Microsoft has its own mechanism for resources, so if you're specifically targeting windows, you could use a windows resource file and the [RCDATA resource](https://msdn.microsoft.com/en-us/librar... | After working around and testing different things, i came back to my original approach (linking) and it worked like magic, here is the details:
In order to include data in the final executable's `.data` section, you need to first turn that data files (which could be an arbitrary binary file (anything!)) into a linkabl... |
28,881,454 | //Thread 1
```
std::uint64_t getAndResetProcessingTimeInMicro()
{
auto value = m_cumulatedProcessingTimeCount.load(boost::memory_order_acquire);
if (value == 0)
return 0;
auto processingTime = m_cumulatedProcessingTime.load(boost::memory_order_relaxed);
resetProcessingTimeInMicro();
retu... | 2015/03/05 | [
"https://Stackoverflow.com/questions/28881454",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/619570/"
] | If you want to do two different atomic operations together you need a mutex both when you write and when you read them. Mutexes don't prevent context switches, but used this way guarantee that you don't access half updated states.
Alternatively, if you really don't want to use a mutex, you could use some of the 64 bit... | make a union like this:
```
union CData {
struct {
__int32 a;
__int16 c;
__int16 d:2,
e:14;
// you get the idea...
}
__int64 n64;
}
```
Use all the variables using the struct members, do the atomic stuff with n64. |
28,881,454 | //Thread 1
```
std::uint64_t getAndResetProcessingTimeInMicro()
{
auto value = m_cumulatedProcessingTimeCount.load(boost::memory_order_acquire);
if (value == 0)
return 0;
auto processingTime = m_cumulatedProcessingTime.load(boost::memory_order_relaxed);
resetProcessingTimeInMicro();
retu... | 2015/03/05 | [
"https://Stackoverflow.com/questions/28881454",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/619570/"
] | If you want to do two different atomic operations together you need a mutex both when you write and when you read them. Mutexes don't prevent context switches, but used this way guarantee that you don't access half updated states.
Alternatively, if you really don't want to use a mutex, you could use some of the 64 bit... | You can, but you probably don't want to.
You need an [atomic shared\_ptr](http://en.cppreference.com/w/cpp/memory/shared_ptr/atomic) to the struct that holds both variables. The process for reading is just to copy the `shared_ptr` atomically and look at the struct it points to. The process for writing is:
1. Read the... |
28,881,454 | //Thread 1
```
std::uint64_t getAndResetProcessingTimeInMicro()
{
auto value = m_cumulatedProcessingTimeCount.load(boost::memory_order_acquire);
if (value == 0)
return 0;
auto processingTime = m_cumulatedProcessingTime.load(boost::memory_order_relaxed);
resetProcessingTimeInMicro();
retu... | 2015/03/05 | [
"https://Stackoverflow.com/questions/28881454",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/619570/"
] | You can, but you probably don't want to.
You need an [atomic shared\_ptr](http://en.cppreference.com/w/cpp/memory/shared_ptr/atomic) to the struct that holds both variables. The process for reading is just to copy the `shared_ptr` atomically and look at the struct it points to. The process for writing is:
1. Read the... | make a union like this:
```
union CData {
struct {
__int32 a;
__int16 c;
__int16 d:2,
e:14;
// you get the idea...
}
__int64 n64;
}
```
Use all the variables using the struct members, do the atomic stuff with n64. |
2,447,730 | I'm trying to find an upper bound of upper bound $\frac{x^n}{n!}$ such that the $\lim\limits\_{n \rightarrow \infty}{upperBound} = 0$ for $n \in \mathbb N$ so I can use it in a squeeze theorem question. Now I was thinking I could use something like $\frac{1}{n!} <= \frac{1}{n}$, but I can't really come up with anything... | 2017/09/27 | [
"https://math.stackexchange.com/questions/2447730",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/394624/"
] | You could note that $e^x=\sum\_{n=0}^{\infty} \frac{x^n}{n!}$, that is, for every fixed $x$ it converges to $e^x$, thus as $n$ goes to infinity the $n$-th terms must go to zero, otherwise it would not be convergent. | Assume without restriction $x>0$, let $M \in N$ such that $M \geq x$. Let $k \in N$. We have
$$
\frac{x^{M+k}}{(M+k)!} = \frac{x^M}{M!}\cdot\frac{x}{M+1}\cdot\ldots\cdot\frac{x}{M+k} < \frac{x^M}{M!}\cdot(\frac{x}{M+1})^k \to 0
$$
Put differently, if $n\in N$, $n > M$, we have
$$
\frac{x^{n}}{n!} < \frac{x^M}{M!}\cdot(... |
2,447,730 | I'm trying to find an upper bound of upper bound $\frac{x^n}{n!}$ such that the $\lim\limits\_{n \rightarrow \infty}{upperBound} = 0$ for $n \in \mathbb N$ so I can use it in a squeeze theorem question. Now I was thinking I could use something like $\frac{1}{n!} <= \frac{1}{n}$, but I can't really come up with anything... | 2017/09/27 | [
"https://math.stackexchange.com/questions/2447730",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/394624/"
] | I think you're forgetting that $\lim\_{n\to\infty}$ treats $x$ just like it treats $7$. How would you prove that $\lim\_{n\to\infty}7^n/n!=0$? The exact same proof works for your problem.
If you're not familiar with the trick, look at the following:
$$\frac{x^n}{n!}=\frac{x}{1}\frac{x}{2}\frac{x}{3}\cdots\frac{x}{x-1... | Assume without restriction $x>0$, let $M \in N$ such that $M \geq x$. Let $k \in N$. We have
$$
\frac{x^{M+k}}{(M+k)!} = \frac{x^M}{M!}\cdot\frac{x}{M+1}\cdot\ldots\cdot\frac{x}{M+k} < \frac{x^M}{M!}\cdot(\frac{x}{M+1})^k \to 0
$$
Put differently, if $n\in N$, $n > M$, we have
$$
\frac{x^{n}}{n!} < \frac{x^M}{M!}\cdot(... |
2,447,730 | I'm trying to find an upper bound of upper bound $\frac{x^n}{n!}$ such that the $\lim\limits\_{n \rightarrow \infty}{upperBound} = 0$ for $n \in \mathbb N$ so I can use it in a squeeze theorem question. Now I was thinking I could use something like $\frac{1}{n!} <= \frac{1}{n}$, but I can't really come up with anything... | 2017/09/27 | [
"https://math.stackexchange.com/questions/2447730",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/394624/"
] | I think you're forgetting that $\lim\_{n\to\infty}$ treats $x$ just like it treats $7$. How would you prove that $\lim\_{n\to\infty}7^n/n!=0$? The exact same proof works for your problem.
If you're not familiar with the trick, look at the following:
$$\frac{x^n}{n!}=\frac{x}{1}\frac{x}{2}\frac{x}{3}\cdots\frac{x}{x-1... | You could note that $e^x=\sum\_{n=0}^{\infty} \frac{x^n}{n!}$, that is, for every fixed $x$ it converges to $e^x$, thus as $n$ goes to infinity the $n$-th terms must go to zero, otherwise it would not be convergent. |
6,377,032 | Is it possible to create an operating system that loads a web browser without menu bars, tabs etc. and that is all it loads.
I do not mean like Chrome OS but I mean all it loads is a html page which can be interacted with like an ordinary web page e.g. google.com, youtube.com.
Also, if this is possible, I would prefe... | 2011/06/16 | [
"https://Stackoverflow.com/questions/6377032",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/531376/"
] | Use both classes and combine them like so:
```
.baseClass
{
margin-top:3px;
margin-left:auto;
margin-right:auto;
margin-bottom:0px;
}
.baseClass.otherClass /* this means the element has both baseClass and otherClass */
{
background-image:url("images/worldsource/customBackground.gif");
backgrou... | That really depends on your markup. If your inherited element resides under a div with class `someBasDiv`, then all child elements of it will automatically inherit those properties.
If however, you want to inherit the `someBaseDiv` class in any place in your markup, you could just make the element which you want to i... |
6,377,032 | Is it possible to create an operating system that loads a web browser without menu bars, tabs etc. and that is all it loads.
I do not mean like Chrome OS but I mean all it loads is a html page which can be interacted with like an ordinary web page e.g. google.com, youtube.com.
Also, if this is possible, I would prefe... | 2011/06/16 | [
"https://Stackoverflow.com/questions/6377032",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/531376/"
] | For this task, I would recommend you use a powerful extension of CSS called [LESS](http://lesscss.org/). It compiles into CSS or can be used on-the-fly with a javascript file as the link explains.
LESS supports inheritance (almost) as you describe. The [documentation](http://lesscss.org/#docs) has the details (see the... | If you want all the inner DIVs with a specific class to inherit from the base class build the HTML markup like this:
```
<div class="parent">
<div class="child">X</div>
</div>
```
And the CSS
```
.parent { border: 2px solid red; color: white }
.parent .child { background: black }
```
If all DIVs must inherit ... |
6,377,032 | Is it possible to create an operating system that loads a web browser without menu bars, tabs etc. and that is all it loads.
I do not mean like Chrome OS but I mean all it loads is a html page which can be interacted with like an ordinary web page e.g. google.com, youtube.com.
Also, if this is possible, I would prefe... | 2011/06/16 | [
"https://Stackoverflow.com/questions/6377032",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/531376/"
] | Use both classes and combine them like so:
```
.baseClass
{
margin-top:3px;
margin-left:auto;
margin-right:auto;
margin-bottom:0px;
}
.baseClass.otherClass /* this means the element has both baseClass and otherClass */
{
background-image:url("images/worldsource/customBackground.gif");
backgrou... | For this task, I would recommend you use a powerful extension of CSS called [LESS](http://lesscss.org/). It compiles into CSS or can be used on-the-fly with a javascript file as the link explains.
LESS supports inheritance (almost) as you describe. The [documentation](http://lesscss.org/#docs) has the details (see the... |
6,377,032 | Is it possible to create an operating system that loads a web browser without menu bars, tabs etc. and that is all it loads.
I do not mean like Chrome OS but I mean all it loads is a html page which can be interacted with like an ordinary web page e.g. google.com, youtube.com.
Also, if this is possible, I would prefe... | 2011/06/16 | [
"https://Stackoverflow.com/questions/6377032",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/531376/"
] | The easiest is to add your someInheritedDiv element to the first rule like this.
```css
div.someBaseDiv,
#someInheritedDiv
{
margin-top:3px;
margin-left:auto;
margin-right:auto;
margin-bottom:0px;
}
```
This will tell your #someInheritedDiv to apply the same styles as div.someBaseDiv has. Then you *e... | What you want to do is make some CSS apply to two different types of elements, but allow them to have some differences as well. You can do this using some simple HTML:
```
<div class="base">
<div class"inherited">
</div>
</div>
```
And CSS:
```
.base, .inherited{
margin-top:3px;
margin-left:auto;
... |
6,377,032 | Is it possible to create an operating system that loads a web browser without menu bars, tabs etc. and that is all it loads.
I do not mean like Chrome OS but I mean all it loads is a html page which can be interacted with like an ordinary web page e.g. google.com, youtube.com.
Also, if this is possible, I would prefe... | 2011/06/16 | [
"https://Stackoverflow.com/questions/6377032",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/531376/"
] | The easiest is to add your someInheritedDiv element to the first rule like this.
```css
div.someBaseDiv,
#someInheritedDiv
{
margin-top:3px;
margin-left:auto;
margin-right:auto;
margin-bottom:0px;
}
```
This will tell your #someInheritedDiv to apply the same styles as div.someBaseDiv has. Then you *e... | If you want all the inner DIVs with a specific class to inherit from the base class build the HTML markup like this:
```
<div class="parent">
<div class="child">X</div>
</div>
```
And the CSS
```
.parent { border: 2px solid red; color: white }
.parent .child { background: black }
```
If all DIVs must inherit ... |
6,377,032 | Is it possible to create an operating system that loads a web browser without menu bars, tabs etc. and that is all it loads.
I do not mean like Chrome OS but I mean all it loads is a html page which can be interacted with like an ordinary web page e.g. google.com, youtube.com.
Also, if this is possible, I would prefe... | 2011/06/16 | [
"https://Stackoverflow.com/questions/6377032",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/531376/"
] | The easiest is to add your someInheritedDiv element to the first rule like this.
```css
div.someBaseDiv,
#someInheritedDiv
{
margin-top:3px;
margin-left:auto;
margin-right:auto;
margin-bottom:0px;
}
```
This will tell your #someInheritedDiv to apply the same styles as div.someBaseDiv has. Then you *e... | That really depends on your markup. If your inherited element resides under a div with class `someBasDiv`, then all child elements of it will automatically inherit those properties.
If however, you want to inherit the `someBaseDiv` class in any place in your markup, you could just make the element which you want to i... |
6,377,032 | Is it possible to create an operating system that loads a web browser without menu bars, tabs etc. and that is all it loads.
I do not mean like Chrome OS but I mean all it loads is a html page which can be interacted with like an ordinary web page e.g. google.com, youtube.com.
Also, if this is possible, I would prefe... | 2011/06/16 | [
"https://Stackoverflow.com/questions/6377032",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/531376/"
] | What you want to do is make some CSS apply to two different types of elements, but allow them to have some differences as well. You can do this using some simple HTML:
```
<div class="base">
<div class"inherited">
</div>
</div>
```
And CSS:
```
.base, .inherited{
margin-top:3px;
margin-left:auto;
... | If you want all the inner DIVs with a specific class to inherit from the base class build the HTML markup like this:
```
<div class="parent">
<div class="child">X</div>
</div>
```
And the CSS
```
.parent { border: 2px solid red; color: white }
.parent .child { background: black }
```
If all DIVs must inherit ... |
6,377,032 | Is it possible to create an operating system that loads a web browser without menu bars, tabs etc. and that is all it loads.
I do not mean like Chrome OS but I mean all it loads is a html page which can be interacted with like an ordinary web page e.g. google.com, youtube.com.
Also, if this is possible, I would prefe... | 2011/06/16 | [
"https://Stackoverflow.com/questions/6377032",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/531376/"
] | The easiest is to add your someInheritedDiv element to the first rule like this.
```css
div.someBaseDiv,
#someInheritedDiv
{
margin-top:3px;
margin-left:auto;
margin-right:auto;
margin-bottom:0px;
}
```
This will tell your #someInheritedDiv to apply the same styles as div.someBaseDiv has. Then you *e... | For this task, I would recommend you use a powerful extension of CSS called [LESS](http://lesscss.org/). It compiles into CSS or can be used on-the-fly with a javascript file as the link explains.
LESS supports inheritance (almost) as you describe. The [documentation](http://lesscss.org/#docs) has the details (see the... |
6,377,032 | Is it possible to create an operating system that loads a web browser without menu bars, tabs etc. and that is all it loads.
I do not mean like Chrome OS but I mean all it loads is a html page which can be interacted with like an ordinary web page e.g. google.com, youtube.com.
Also, if this is possible, I would prefe... | 2011/06/16 | [
"https://Stackoverflow.com/questions/6377032",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/531376/"
] | Use both classes and combine them like so:
```
.baseClass
{
margin-top:3px;
margin-left:auto;
margin-right:auto;
margin-bottom:0px;
}
.baseClass.otherClass /* this means the element has both baseClass and otherClass */
{
background-image:url("images/worldsource/customBackground.gif");
backgrou... | What you want to do is make some CSS apply to two different types of elements, but allow them to have some differences as well. You can do this using some simple HTML:
```
<div class="base">
<div class"inherited">
</div>
</div>
```
And CSS:
```
.base, .inherited{
margin-top:3px;
margin-left:auto;
... |
6,377,032 | Is it possible to create an operating system that loads a web browser without menu bars, tabs etc. and that is all it loads.
I do not mean like Chrome OS but I mean all it loads is a html page which can be interacted with like an ordinary web page e.g. google.com, youtube.com.
Also, if this is possible, I would prefe... | 2011/06/16 | [
"https://Stackoverflow.com/questions/6377032",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/531376/"
] | The easiest is to add your someInheritedDiv element to the first rule like this.
```css
div.someBaseDiv,
#someInheritedDiv
{
margin-top:3px;
margin-left:auto;
margin-right:auto;
margin-bottom:0px;
}
```
This will tell your #someInheritedDiv to apply the same styles as div.someBaseDiv has. Then you *e... | Use both classes and combine them like so:
```
.baseClass
{
margin-top:3px;
margin-left:auto;
margin-right:auto;
margin-bottom:0px;
}
.baseClass.otherClass /* this means the element has both baseClass and otherClass */
{
background-image:url("images/worldsource/customBackground.gif");
backgrou... |
23,777,901 | I have set up a local server using `XAMPP`. Now I want to get `JSON` / `JSONP` data from that server.
**Side question:**
`Do I need to somehow upload the JSON file on the server?
Or is there some`PHP`coding for that? IF yes, which?`
I have heard about some `jQuery ajax` call function, but it didnt work for me.
An... | 2014/05/21 | [
"https://Stackoverflow.com/questions/23777901",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3533253/"
] | You have several way of doing that. if the result is not dynamic you just create a json file on server and get it using URL.
if you want to do it dynamic in response to web page sent to server you can use the built in PHP function json\_encode.
Please follow php documenation for [json\_encode](http://www.php.net/manu... | i don t think you need to do a lot of things.
json is a way to format data. you can do that returnin an output using json\_encode()
exemples and info at <http://www.php.net/manual/en/book.json.php> |
23,777,901 | I have set up a local server using `XAMPP`. Now I want to get `JSON` / `JSONP` data from that server.
**Side question:**
`Do I need to somehow upload the JSON file on the server?
Or is there some`PHP`coding for that? IF yes, which?`
I have heard about some `jQuery ajax` call function, but it didnt work for me.
An... | 2014/05/21 | [
"https://Stackoverflow.com/questions/23777901",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3533253/"
] | You have several way of doing that. if the result is not dynamic you just create a json file on server and get it using URL.
if you want to do it dynamic in response to web page sent to server you can use the built in PHP function json\_encode.
Please follow php documenation for [json\_encode](http://www.php.net/manu... | One method is to use `json_encode()` function available in PHP to send the data is JSON format to the client and handle the response in AJAX by mentioning `dataType: json` |
156,642 | I have a multi-wordpress installation (3.x) with 5 sites and only one of them is using SSL.
All of these are running on their own domain, and the <http://ssldomain.com> forwards to <https://ssldomain.com>.
Still, this seems to break wordpress upgrades.
Now I get a message:
Upgrade Network
<https://nonsecureddomai... | 2014/08/03 | [
"https://wordpress.stackexchange.com/questions/156642",
"https://wordpress.stackexchange.com",
"https://wordpress.stackexchange.com/users/944/"
] | This is an old question, but I figured I'd post my answer as I just had to deal with this problem and figured out a temporary workaround that got it to work for me.
WARNING: This requires modifying core which is NOT recommended. If you use this workaround, you should probably remove the workaround when you've finished... | We can add https in very simple way.... No need to had code all these in any hook....
1. Log in to wordpress admin
2. Go to Settings > General
3. Find WordPress Address (URL) and Replace HTTP with HTTPS
4. Find Site Address (URL) and Replace HTTP with HTTPS
5. Click Save Changes
Edit .htaccess file and add bellow cod... |
156,642 | I have a multi-wordpress installation (3.x) with 5 sites and only one of them is using SSL.
All of these are running on their own domain, and the <http://ssldomain.com> forwards to <https://ssldomain.com>.
Still, this seems to break wordpress upgrades.
Now I get a message:
Upgrade Network
<https://nonsecureddomai... | 2014/08/03 | [
"https://wordpress.stackexchange.com/questions/156642",
"https://wordpress.stackexchange.com",
"https://wordpress.stackexchange.com/users/944/"
] | This is currently a known bug and already has a patch submitted for review. Feel free to add your feedback directly to the raised bug:
<https://core.trac.wordpress.org/ticket/31405> | We can add https in very simple way.... No need to had code all these in any hook....
1. Log in to wordpress admin
2. Go to Settings > General
3. Find WordPress Address (URL) and Replace HTTP with HTTPS
4. Find Site Address (URL) and Replace HTTP with HTTPS
5. Click Save Changes
Edit .htaccess file and add bellow cod... |
156,642 | I have a multi-wordpress installation (3.x) with 5 sites and only one of them is using SSL.
All of these are running on their own domain, and the <http://ssldomain.com> forwards to <https://ssldomain.com>.
Still, this seems to break wordpress upgrades.
Now I get a message:
Upgrade Network
<https://nonsecureddomai... | 2014/08/03 | [
"https://wordpress.stackexchange.com/questions/156642",
"https://wordpress.stackexchange.com",
"https://wordpress.stackexchange.com/users/944/"
] | Thanks to @Sorin for posting the trac. From there I found a solution using just filters in functions.php (so no editing the core)
Thanks @mensmaximus for posting there:
Link: <https://core.trac.wordpress.org/ticket/33887#comment:3>
```
<?php
add_filter( 'network_admin_url', 'mmx_network_admin_url', 1, 2 );
function ... | We can add https in very simple way.... No need to had code all these in any hook....
1. Log in to wordpress admin
2. Go to Settings > General
3. Find WordPress Address (URL) and Replace HTTP with HTTPS
4. Find Site Address (URL) and Replace HTTP with HTTPS
5. Click Save Changes
Edit .htaccess file and add bellow cod... |
156,642 | I have a multi-wordpress installation (3.x) with 5 sites and only one of them is using SSL.
All of these are running on their own domain, and the <http://ssldomain.com> forwards to <https://ssldomain.com>.
Still, this seems to break wordpress upgrades.
Now I get a message:
Upgrade Network
<https://nonsecureddomai... | 2014/08/03 | [
"https://wordpress.stackexchange.com/questions/156642",
"https://wordpress.stackexchange.com",
"https://wordpress.stackexchange.com/users/944/"
] | This is an old question, but I figured I'd post my answer as I just had to deal with this problem and figured out a temporary workaround that got it to work for me.
WARNING: This requires modifying core which is NOT recommended. If you use this workaround, you should probably remove the workaround when you've finished... | This is currently a known bug and already has a patch submitted for review. Feel free to add your feedback directly to the raised bug:
<https://core.trac.wordpress.org/ticket/31405> |
156,642 | I have a multi-wordpress installation (3.x) with 5 sites and only one of them is using SSL.
All of these are running on their own domain, and the <http://ssldomain.com> forwards to <https://ssldomain.com>.
Still, this seems to break wordpress upgrades.
Now I get a message:
Upgrade Network
<https://nonsecureddomai... | 2014/08/03 | [
"https://wordpress.stackexchange.com/questions/156642",
"https://wordpress.stackexchange.com",
"https://wordpress.stackexchange.com/users/944/"
] | Thanks to @Sorin for posting the trac. From there I found a solution using just filters in functions.php (so no editing the core)
Thanks @mensmaximus for posting there:
Link: <https://core.trac.wordpress.org/ticket/33887#comment:3>
```
<?php
add_filter( 'network_admin_url', 'mmx_network_admin_url', 1, 2 );
function ... | This is currently a known bug and already has a patch submitted for review. Feel free to add your feedback directly to the raised bug:
<https://core.trac.wordpress.org/ticket/31405> |
45,717 | Suppose I put water in a closed vessel and heat it, so the vessel becomes pressurized above ambient pressure. Now, there should be liquid and gaseous water inside the vessel. Since it's under pressure, when I open the vessel at the bottom, the liquid starts to flow out. If I wait until all liquid is expelled, and close... | 2012/12/02 | [
"https://physics.stackexchange.com/questions/45717",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/16477/"
] | It is not clear from your question whether the gas in the bottle starts out as air, or the only substance in the bottle is water, either in liquid or gas form. I'll assume the latter since it's easier to answer.
Once the bottle is closed, ambient temperature doesn't matter. The pressure of the gas part in the bottle w... | I believe that one can look at this another way. Assuming all materials "strong enough" and perfectly insulated, then imagine two containers separated by a capillary tube with a stopcock in it. Now imagine that the liquid is totally contained in the lower container and the upper container holds all the vapor and no liq... |
39,739,089 | I am very new to SpringBoot. I need to understand how to write an integration test using SpringBoot. I have seen some examples on the Internet which use the @IntegrationTest annotation whereas some other examples which use the @SpringBootTest annotation.
I am just wondering what is the difference between the two?
W... | 2016/09/28 | [
"https://Stackoverflow.com/questions/39739089",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5972560/"
] | The `IntegrationTest` was deprecated sine spring boot 1.4, so the suggestion is using `SpringBootTest` after 1.4
>
> Deprecated as of 1.4 in favor of org.springframework.boot.test.context.SpringBootTest with webEnvironment=RANDOM\_PORT or webEnvironment=DEFINED\_PORT.
>
>
> | Basic template for writing the integration tests in springboot.
the sql group is additional annotation. When ever you want to execute the particular sql queries before and after method run so u can use @SqlGroup annotation.
```
@RunWith(SpringJUnit4ClassRunner.class)
@SpringBootTest(classes = MainApplication.class,
... |
32,885,104 | Instead of using jQuery, I would like to bind callbacks to Semantic-UI modules the "Meteor-way", a bit like Bootstrap 3 allows for, e.g.:
```js
Template.someTemplate.events({
'show.bs.dropdown .someDropdown': function () {
// official Bootstrap JS callback for the Dropdown module's show event
}
});
```
With ... | 2015/10/01 | [
"https://Stackoverflow.com/questions/32885104",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/773156/"
] | First, be carefull. When you use `position:absolute` you have to add `position:relative` to the parent you want to position your element with. In your first jsfiddle it looked like it's working because your `a`, `div` and `body` are in the same position. In the second, your image gets "lost" because you added a span wr... | you can try this one:
```
<div>
<a href="#">
<span class="imgWrapper">
<img src="https://33.media.tumblr.com/avatar_11e745804f61_128.png" /></span>
<span class="spanText">Lorem ipsum dolor sit amet, consectetur adipiscing elit.</span>
</a>
</div>
```
[DEMO FID... |
32,885,104 | Instead of using jQuery, I would like to bind callbacks to Semantic-UI modules the "Meteor-way", a bit like Bootstrap 3 allows for, e.g.:
```js
Template.someTemplate.events({
'show.bs.dropdown .someDropdown': function () {
// official Bootstrap JS callback for the Dropdown module's show event
}
});
```
With ... | 2015/10/01 | [
"https://Stackoverflow.com/questions/32885104",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/773156/"
] | First, be carefull. When you use `position:absolute` you have to add `position:relative` to the parent you want to position your element with. In your first jsfiddle it looked like it's working because your `a`, `div` and `body` are in the same position. In the second, your image gets "lost" because you added a span wr... | Try flexbox.
```css
a {
display: flex;
align-items: center;
}
a .textWrap {
flex: 1;
display: flex;
flex-flow: wrap;
justify-content: center;
}
```
```html
<div>
<a href="#">
<img src="https://33.media.tumblr.com/avatar_11e745804f61_128.png" />
<span class="tex... |
13,452 | Please check the following [main meta question](https://meta.stackexchange.com/q/259914/345161) about what parts of the Tour and Help Centre are editable in detail. For a quick rundown though:
* Tour: Introduction paragraph
* Tour: The "Ask about..." and "Don't ask about..." bullets
* Help Centre: Introduction paragra... | 2021/08/11 | [
"https://scifi.meta.stackexchange.com/questions/13452",
"https://scifi.meta.stackexchange.com",
"https://scifi.meta.stackexchange.com/users/58193/"
] | ### Tour: The "Ask about..." bullets
---
#### Current Text:
* Plot, character, or setting explanations
* Historical or societal context of a work
* Behind-the-scenes and fandom information
* Story identification
* Franchise/series reading or viewing order
---
#### New Text:
* Plot, character, or setting explanati... | ### Tour: Introduction paragraph
---
#### Current Text:
>
> **Science Fiction & Fantasy Stack Exchange** is a question and answer site for science fiction and fantasy enthusiasts. It's built and run *by you* as part of the [Stack Exchange](https://stackexchange.com) network of Q&A sites. With your help, we're worki... |
13,452 | Please check the following [main meta question](https://meta.stackexchange.com/q/259914/345161) about what parts of the Tour and Help Centre are editable in detail. For a quick rundown though:
* Tour: Introduction paragraph
* Tour: The "Ask about..." and "Don't ask about..." bullets
* Help Centre: Introduction paragra... | 2021/08/11 | [
"https://scifi.meta.stackexchange.com/questions/13452",
"https://scifi.meta.stackexchange.com",
"https://scifi.meta.stackexchange.com/users/58193/"
] | ### Tour: The "Don't ask about..." bullets
---
#### Current Text:
* Reading or watching recommendations
* or any other question that is primarily opinion-based
* Lists of works with a particular plot element
* or any other question with too many possible answers or that would require an extremely long answer
---
#... | ### Tour: Introduction paragraph
---
#### Current Text:
>
> **Science Fiction & Fantasy Stack Exchange** is a question and answer site for science fiction and fantasy enthusiasts. It's built and run *by you* as part of the [Stack Exchange](https://stackexchange.com) network of Q&A sites. With your help, we're worki... |
13,452 | Please check the following [main meta question](https://meta.stackexchange.com/q/259914/345161) about what parts of the Tour and Help Centre are editable in detail. For a quick rundown though:
* Tour: Introduction paragraph
* Tour: The "Ask about..." and "Don't ask about..." bullets
* Help Centre: Introduction paragra... | 2021/08/11 | [
"https://scifi.meta.stackexchange.com/questions/13452",
"https://scifi.meta.stackexchange.com",
"https://scifi.meta.stackexchange.com/users/58193/"
] | ### Tour: The "Ask about..." bullets
---
#### Current Text:
* Plot, character, or setting explanations
* Historical or societal context of a work
* Behind-the-scenes and fandom information
* Story identification
* Franchise/series reading or viewing order
---
#### New Text:
* Plot, character, or setting explanati... | ### Help Centre: Introduction paragraph
---
*Currently blank* |
13,452 | Please check the following [main meta question](https://meta.stackexchange.com/q/259914/345161) about what parts of the Tour and Help Centre are editable in detail. For a quick rundown though:
* Tour: Introduction paragraph
* Tour: The "Ask about..." and "Don't ask about..." bullets
* Help Centre: Introduction paragra... | 2021/08/11 | [
"https://scifi.meta.stackexchange.com/questions/13452",
"https://scifi.meta.stackexchange.com",
"https://scifi.meta.stackexchange.com/users/58193/"
] | ### Tour: The "Don't ask about..." bullets
---
#### Current Text:
* Reading or watching recommendations
* or any other question that is primarily opinion-based
* Lists of works with a particular plot element
* or any other question with too many possible answers or that would require an extremely long answer
---
#... | ### Help Centre: Introduction paragraph
---
*Currently blank* |
13,452 | Please check the following [main meta question](https://meta.stackexchange.com/q/259914/345161) about what parts of the Tour and Help Centre are editable in detail. For a quick rundown though:
* Tour: Introduction paragraph
* Tour: The "Ask about..." and "Don't ask about..." bullets
* Help Centre: Introduction paragra... | 2021/08/11 | [
"https://scifi.meta.stackexchange.com/questions/13452",
"https://scifi.meta.stackexchange.com",
"https://scifi.meta.stackexchange.com/users/58193/"
] | ### Tour: The "Ask about..." bullets
---
#### Current Text:
* Plot, character, or setting explanations
* Historical or societal context of a work
* Behind-the-scenes and fandom information
* Story identification
* Franchise/series reading or viewing order
---
#### New Text:
* Plot, character, or setting explanati... | ### Help Centre: /help/on-topic full page
---
#### Current Text:
Science Fiction & Fantasy Stack Exchange is for questions targeted towards science fiction and fantasy enthusiasts. This includes questions about:
* Plot, character, or setting explanations
* Historical or societal context of a work
* Behind-the-scene... |
13,452 | Please check the following [main meta question](https://meta.stackexchange.com/q/259914/345161) about what parts of the Tour and Help Centre are editable in detail. For a quick rundown though:
* Tour: Introduction paragraph
* Tour: The "Ask about..." and "Don't ask about..." bullets
* Help Centre: Introduction paragra... | 2021/08/11 | [
"https://scifi.meta.stackexchange.com/questions/13452",
"https://scifi.meta.stackexchange.com",
"https://scifi.meta.stackexchange.com/users/58193/"
] | ### Tour: The "Don't ask about..." bullets
---
#### Current Text:
* Reading or watching recommendations
* or any other question that is primarily opinion-based
* Lists of works with a particular plot element
* or any other question with too many possible answers or that would require an extremely long answer
---
#... | ### Help Centre: /help/on-topic full page
---
#### Current Text:
Science Fiction & Fantasy Stack Exchange is for questions targeted towards science fiction and fantasy enthusiasts. This includes questions about:
* Plot, character, or setting explanations
* Historical or societal context of a work
* Behind-the-scene... |
116,277 | *LE: This is not a duplicate of [What can I do to make a coworkers lack of effort more visible](https://workplace.stackexchange.com/questions/23165/what-can-i-do-to-make-a-coworkers-lack-of-effort-more-visible) because: . I think the other question only addresses part of my situation (the subjects of that question are ... | 2018/07/21 | [
"https://workplace.stackexchange.com/questions/116277",
"https://workplace.stackexchange.com",
"https://workplace.stackexchange.com/users/85674/"
] | You are playing well above your pay grade. Let your manager manage your colleague. An outcome like "the project got finished but wasn't great, one of the interns worked hard but the other was a nightmare" is common as dirt in this industry.
Do the tasks your manager has assigned to you. When you're out of tasks, go a... | * Inform you manager about the Verbatim copies of code from the Internet, and tell that you see a potential legal liability there
* Explicitly state in commit messages which of his commits you fixed
* Your manager listened to you once, so the next time a huge and messy commit comes which breaks something working and co... |
116,277 | *LE: This is not a duplicate of [What can I do to make a coworkers lack of effort more visible](https://workplace.stackexchange.com/questions/23165/what-can-i-do-to-make-a-coworkers-lack-of-effort-more-visible) because: . I think the other question only addresses part of my situation (the subjects of that question are ... | 2018/07/21 | [
"https://workplace.stackexchange.com/questions/116277",
"https://workplace.stackexchange.com",
"https://workplace.stackexchange.com/users/85674/"
] | Since you are using a versioning system: Fix one bug in his code and check the fix into the versioning system. Then fix another bug and check the fix into the versioning system. And so on. So when you need evidence you point your boss to the versioning system, which contains your name 99 times and his name once.
(In a... | * Inform you manager about the Verbatim copies of code from the Internet, and tell that you see a potential legal liability there
* Explicitly state in commit messages which of his commits you fixed
* Your manager listened to you once, so the next time a huge and messy commit comes which breaks something working and co... |
116,277 | *LE: This is not a duplicate of [What can I do to make a coworkers lack of effort more visible](https://workplace.stackexchange.com/questions/23165/what-can-i-do-to-make-a-coworkers-lack-of-effort-more-visible) because: . I think the other question only addresses part of my situation (the subjects of that question are ... | 2018/07/21 | [
"https://workplace.stackexchange.com/questions/116277",
"https://workplace.stackexchange.com",
"https://workplace.stackexchange.com/users/85674/"
] | * Inform you manager about the Verbatim copies of code from the Internet, and tell that you see a potential legal liability there
* Explicitly state in commit messages which of his commits you fixed
* Your manager listened to you once, so the next time a huge and messy commit comes which breaks something working and co... | As other recommend, I would ask somebody higher up if I could start CCing him in all your exchanges besides documenting everything in a source code system.
Obviously, if you working for the two, your colleague does not need to do it. However, it seems a bit odd he taking such a relaxed stance of missing so many hours... |
116,277 | *LE: This is not a duplicate of [What can I do to make a coworkers lack of effort more visible](https://workplace.stackexchange.com/questions/23165/what-can-i-do-to-make-a-coworkers-lack-of-effort-more-visible) because: . I think the other question only addresses part of my situation (the subjects of that question are ... | 2018/07/21 | [
"https://workplace.stackexchange.com/questions/116277",
"https://workplace.stackexchange.com",
"https://workplace.stackexchange.com/users/85674/"
] | You are playing well above your pay grade. Let your manager manage your colleague. An outcome like "the project got finished but wasn't great, one of the interns worked hard but the other was a nightmare" is common as dirt in this industry.
Do the tasks your manager has assigned to you. When you're out of tasks, go a... | Since you are using a versioning system: Fix one bug in his code and check the fix into the versioning system. Then fix another bug and check the fix into the versioning system. And so on. So when you need evidence you point your boss to the versioning system, which contains your name 99 times and his name once.
(In a... |
116,277 | *LE: This is not a duplicate of [What can I do to make a coworkers lack of effort more visible](https://workplace.stackexchange.com/questions/23165/what-can-i-do-to-make-a-coworkers-lack-of-effort-more-visible) because: . I think the other question only addresses part of my situation (the subjects of that question are ... | 2018/07/21 | [
"https://workplace.stackexchange.com/questions/116277",
"https://workplace.stackexchange.com",
"https://workplace.stackexchange.com/users/85674/"
] | You are playing well above your pay grade. Let your manager manage your colleague. An outcome like "the project got finished but wasn't great, one of the interns worked hard but the other was a nightmare" is common as dirt in this industry.
Do the tasks your manager has assigned to you. When you're out of tasks, go a... | As other recommend, I would ask somebody higher up if I could start CCing him in all your exchanges besides documenting everything in a source code system.
Obviously, if you working for the two, your colleague does not need to do it. However, it seems a bit odd he taking such a relaxed stance of missing so many hours... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.