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 |
|---|---|---|---|---|---|
646,425 | I'm trying to configure a Debian Linux (ARMHF 3.8.13-bone20) on a BeagleBone Black to use German as the default language and keyboard layout, which does not work, and I can't see why. I'm talking about the console settings, not X or Gnome etc. Here are my settings and what I did so far:
```
dpkg-reconfigure locales
`... | 2013/09/17 | [
"https://superuser.com/questions/646425",
"https://superuser.com",
"https://superuser.com/users/233574/"
] | You might try to add the boot parameters of `debian-installer/keymap=de` and `keymap=de`.
Also, the answer at the thread [Keyboard layout HELP](http://www.turnkeylinux.org/forum/support/20130912/keyboard-layout-help) says :
>
> 1. Go to the webmin and do this SYSTEM -> SOFTWARE PACKADGES -> UPGRADE ALL
> 2. (I don't... | To change the german keyboard in Kali Linux 2020.02 (Debian) do the following:
1. `dpkg-reconfigure locales`
Choose `de_DE.UTF-8 UTF-8` and unselect `en_US.UTF-8 UTF-8` (by pressing `Space`)
2. `dpkg-reconfigure keyboard-configuration`
Choose your keyboard hardware
3. For Kali Linux 2020.2 (Debian) goto GUI
*Settin... |
646,425 | I'm trying to configure a Debian Linux (ARMHF 3.8.13-bone20) on a BeagleBone Black to use German as the default language and keyboard layout, which does not work, and I can't see why. I'm talking about the console settings, not X or Gnome etc. Here are my settings and what I did so far:
```
dpkg-reconfigure locales
`... | 2013/09/17 | [
"https://superuser.com/questions/646425",
"https://superuser.com",
"https://superuser.com/users/233574/"
] | The solution for me was to comment out all the locale relevant variables at `/etc/profile`
```
#export LANG="de_DE.utf8"
#export LANGUAGE="de_DE.utf8"
#export LC_ALL="de_DE.utf8"
```
(I wanted to get rid off the German :))
and then set my locale as I wish within `/etc/default/locale`
The debian wiki page <https:/... | To change the german keyboard in Kali Linux 2020.02 (Debian) do the following:
1. `dpkg-reconfigure locales`
Choose `de_DE.UTF-8 UTF-8` and unselect `en_US.UTF-8 UTF-8` (by pressing `Space`)
2. `dpkg-reconfigure keyboard-configuration`
Choose your keyboard hardware
3. For Kali Linux 2020.2 (Debian) goto GUI
*Settin... |
36,701,820 | I'm using viewPager to create a layout with tabs and in each tab I use a Fragment. One of them is to get all de user contacts and put it on a ListView. But I want to call de AssyncTask only if the Fragment is displayed on screen.
is there a method to do it?
TY | 2016/04/18 | [
"https://Stackoverflow.com/questions/36701820",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5277507/"
] | Start your AsyncTask in onStart which is the method called once the fragment becomes visible to the user. onCreateView will be called even if the fragment doesn't become visible.
See also: <http://developer.android.com/reference/android/app/Fragment.html#onStart()>
I would however recommend to use a loader instead of ... | You can check to see if it's visible with `.isVisible()` something like this
```
MyFragmentClass fragment = (MyFragmentClass) getSupportFragmentManager().findFragmentByTag("fragmentTAG");
if (fragment != null && fragment.isVisible()) {
// call AsyncTask
}
``` |
36,701,820 | I'm using viewPager to create a layout with tabs and in each tab I use a Fragment. One of them is to get all de user contacts and put it on a ListView. But I want to call de AssyncTask only if the Fragment is displayed on screen.
is there a method to do it?
TY | 2016/04/18 | [
"https://Stackoverflow.com/questions/36701820",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5277507/"
] | you can use
```
@Override
public void setUserVisibleHint(boolean isVisibleToUser)
{
super.setUserVisibleHint(isVisibleToUser);
if(isVisibleToUser)
{
//things to do when fragment is visible
}
}
```
Even it is called before onCreateView. | You can check to see if it's visible with `.isVisible()` something like this
```
MyFragmentClass fragment = (MyFragmentClass) getSupportFragmentManager().findFragmentByTag("fragmentTAG");
if (fragment != null && fragment.isVisible()) {
// call AsyncTask
}
``` |
68,703,810 | I want to get only filtered tweet but i got this error. How can i solve it? What is the meaning of this error?
```
tweets = api.user_timeline(screen_name = "elonmusk", count = 200000, lang = "en", tweet_mode = "extended")
word="Dogecoin"
for tweet in tweets:
if word in tweet:
df = pd.DataFrame([tweet.full... | 2021/08/08 | [
"https://Stackoverflow.com/questions/68703810",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/16524573/"
] | I recommend you to save the information in a context. then you can retrieve the data on whatever intent that is in the same context. | To add on to the answer of @MizarConstanti, you can use the following for your entities:
* For date you can use entity `@sys.date`
* For first name `@sys.given-name`
* For last name `@sys.last-name`
NOTE: For given name and last name entities, these entities could only recognize the common names ([reference](https://... |
68,703,810 | I want to get only filtered tweet but i got this error. How can i solve it? What is the meaning of this error?
```
tweets = api.user_timeline(screen_name = "elonmusk", count = 200000, lang = "en", tweet_mode = "extended")
word="Dogecoin"
for tweet in tweets:
if word in tweet:
df = pd.DataFrame([tweet.full... | 2021/08/08 | [
"https://Stackoverflow.com/questions/68703810",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/16524573/"
] | I recommend you to save the information in a context. then you can retrieve the data on whatever intent that is in the same context. | First I recommend you to get the variable from the Dialogflow without backend, then read it from the diagnostic info, if the information is watched you can get from the backend response. |
68,703,810 | I want to get only filtered tweet but i got this error. How can i solve it? What is the meaning of this error?
```
tweets = api.user_timeline(screen_name = "elonmusk", count = 200000, lang = "en", tweet_mode = "extended")
word="Dogecoin"
for tweet in tweets:
if word in tweet:
df = pd.DataFrame([tweet.full... | 2021/08/08 | [
"https://Stackoverflow.com/questions/68703810",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/16524573/"
] | To add on to the answer of @MizarConstanti, you can use the following for your entities:
* For date you can use entity `@sys.date`
* For first name `@sys.given-name`
* For last name `@sys.last-name`
NOTE: For given name and last name entities, these entities could only recognize the common names ([reference](https://... | First I recommend you to get the variable from the Dialogflow without backend, then read it from the diagnostic info, if the information is watched you can get from the backend response. |
26,576 | I've read all the books and have seen all the movies (at least 3 times), but I've been wondering: **Is there ever a time when Harry wears contacts instead of glasses?** My memory is pretty good, but it's not *that* good ;) I'm so used to seeing him in glasses that I've never really thought about alternatives. | 2012/11/06 | [
"https://scifi.stackexchange.com/questions/26576",
"https://scifi.stackexchange.com",
"https://scifi.stackexchange.com/users/10667/"
] | There is nothing in the books to suggest Harry wore contact lenses at any point during the series.
However, in both the movie and the book *Harry Potter and the Deathly Hallows* (part 2 in terms of the movies), during the *King's Cross* scene (where Harry is "killed" by Voldemort) he becomes conscious of *not* wearin... | **Harry is never mentioned as wearing contacts**, including where he would be the most likely to do so (playing Quidditch). To the contrary, the book stresses that he wore regular glasses, since Hermione needed to magick his eyeglasses to be rainproof when playing in the rain..
The "never" comes from my search of all ... |
42,538,411 | I have a dataframe that looks like this (this is a sample of a larger dataframe):
```
dvmph variable value
1 1 X0 100.0
2 3 X0 2486.6
3 5 X0 100519.3
4 7 X0 471515.0
5 1 X1 973180.2
6 3 X1 758789.6
7 5 X1 500884.34
8 7 X1... | 2017/03/01 | [
"https://Stackoverflow.com/questions/42538411",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5199451/"
] | From you drawing, I believe you are passing the wrong values to `aes()` -- that is, for your stacked bar example, I believe you want this:
```
ggplot(df, aes(x = variable, y = value, fill = factor(dvmph))) +
geom_col()
```
[](https://i.stack.imgur.com/lz6o9.png)
Then yo... | You have two predictor variables, `variable` and `dvmph`, and one response variable `value` which is a frequency. So, your approach to plot both predictor variables in an x-y-plot, or as polar plot with angle and radius, resp., and show the response variable color-coded is sensible. Unfortunately, you have chosen the w... |
66,944,844 | ### CODE
Here's the code for a function which is triggered when a person clicks on "Add to Cart" button. It creates a row inside the cart using the data from localStorage about the items selected by the user from the menu.
```
function addItemToCart() {
var cartRow = document.createElement("div");
cartRow.classL... | 2021/04/04 | [
"https://Stackoverflow.com/questions/66944844",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11973720/"
] | Something like this should do (note that I can't test it without the whole context):
```
function addItemToCart(item) {
var cartRow = document.createElement("div");
cartRow.classList.add("cart-row");
var cartItems = document.getElementsByClassName("cart-items")[0]; //<div class="cart-items">
var cartItemNames... | Why not access the last element of `locStore` since that would be the latest one right ? Currently you're calling `.map` on the whole **localStorage** items but I am assuming that `addItemToCart` is only called after your `localStorage` is updated with a recent item and you just want the **DOM** to reflect that latest ... |
66,944,844 | ### CODE
Here's the code for a function which is triggered when a person clicks on "Add to Cart" button. It creates a row inside the cart using the data from localStorage about the items selected by the user from the menu.
```
function addItemToCart() {
var cartRow = document.createElement("div");
cartRow.classL... | 2021/04/04 | [
"https://Stackoverflow.com/questions/66944844",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11973720/"
] | Something like this should do (note that I can't test it without the whole context):
```
function addItemToCart(item) {
var cartRow = document.createElement("div");
cartRow.classList.add("cart-row");
var cartItems = document.getElementsByClassName("cart-items")[0]; //<div class="cart-items">
var cartItemNames... | You can just empty the whole Cart in the begging of the function, and then let the function populate everything from LocalStorage. |
66,944,844 | ### CODE
Here's the code for a function which is triggered when a person clicks on "Add to Cart" button. It creates a row inside the cart using the data from localStorage about the items selected by the user from the menu.
```
function addItemToCart() {
var cartRow = document.createElement("div");
cartRow.classL... | 2021/04/04 | [
"https://Stackoverflow.com/questions/66944844",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11973720/"
] | Something like this should do (note that I can't test it without the whole context):
```
function addItemToCart(item) {
var cartRow = document.createElement("div");
cartRow.classList.add("cart-row");
var cartItems = document.getElementsByClassName("cart-items")[0]; //<div class="cart-items">
var cartItemNames... | I know an answer has been accepted but, assuming your item has an ID you can make use of that to make each cart row unique(for updating quantity and deleting cart item).
**PS:** I didn't test this. It's just to optimize and fix your UI issue
```
//add cart item row
function addItemToCart () {
document.getElements... |
66,944,844 | ### CODE
Here's the code for a function which is triggered when a person clicks on "Add to Cart" button. It creates a row inside the cart using the data from localStorage about the items selected by the user from the menu.
```
function addItemToCart() {
var cartRow = document.createElement("div");
cartRow.classL... | 2021/04/04 | [
"https://Stackoverflow.com/questions/66944844",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11973720/"
] | I know an answer has been accepted but, assuming your item has an ID you can make use of that to make each cart row unique(for updating quantity and deleting cart item).
**PS:** I didn't test this. It's just to optimize and fix your UI issue
```
//add cart item row
function addItemToCart () {
document.getElements... | Why not access the last element of `locStore` since that would be the latest one right ? Currently you're calling `.map` on the whole **localStorage** items but I am assuming that `addItemToCart` is only called after your `localStorage` is updated with a recent item and you just want the **DOM** to reflect that latest ... |
66,944,844 | ### CODE
Here's the code for a function which is triggered when a person clicks on "Add to Cart" button. It creates a row inside the cart using the data from localStorage about the items selected by the user from the menu.
```
function addItemToCart() {
var cartRow = document.createElement("div");
cartRow.classL... | 2021/04/04 | [
"https://Stackoverflow.com/questions/66944844",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11973720/"
] | I know an answer has been accepted but, assuming your item has an ID you can make use of that to make each cart row unique(for updating quantity and deleting cart item).
**PS:** I didn't test this. It's just to optimize and fix your UI issue
```
//add cart item row
function addItemToCart () {
document.getElements... | You can just empty the whole Cart in the begging of the function, and then let the function populate everything from LocalStorage. |
14,099,596 | I have a ListView that its ItemsPanelTemplate is a Canvas, and every item is a rectangle.
I'm trying to draw a Rectangle outside the Canvas in the position of (-50,-50) with no successive. can I do that somehow ?

The XAML:
```
<Grid >
<ListView... | 2012/12/31 | [
"https://Stackoverflow.com/questions/14099596",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/138627/"
] | I may be wrong, but this seems to be rather simple problem (I may have completely assumed the wrong thing, but I'm not sure so I'm going with the assumption just in case).
You've defined your `ListView` to be 200 by 200 and your `Canvas` is taking all that space. Judging by your picture, I feel it is `Canvas` that you... | Try this style (I removed the scrollviewer from the default tamplate):
I agree with the comments saying a control that draws like this is doubtful.
```
<Window x:Class="CanvasListView.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/wi... |
14,099,596 | I have a ListView that its ItemsPanelTemplate is a Canvas, and every item is a rectangle.
I'm trying to draw a Rectangle outside the Canvas in the position of (-50,-50) with no successive. can I do that somehow ?

The XAML:
```
<Grid >
<ListView... | 2012/12/31 | [
"https://Stackoverflow.com/questions/14099596",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/138627/"
] | Try this style (I removed the scrollviewer from the default tamplate):
I agree with the comments saying a control that draws like this is doubtful.
```
<Window x:Class="CanvasListView.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/wi... | I did it via Popup, it looks well but I dont know whether it fits in your requirement or not
```
<Grid Background="Transparent">
<ListView BorderThickness="0" BorderBrush="Transparent" ItemsSource="{Binding Rectangles}" Height="200" Width="200">
<ListView.Resources>
<Style TargetType="{x:Type ... |
14,099,596 | I have a ListView that its ItemsPanelTemplate is a Canvas, and every item is a rectangle.
I'm trying to draw a Rectangle outside the Canvas in the position of (-50,-50) with no successive. can I do that somehow ?

The XAML:
```
<Grid >
<ListView... | 2012/12/31 | [
"https://Stackoverflow.com/questions/14099596",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/138627/"
] | I may be wrong, but this seems to be rather simple problem (I may have completely assumed the wrong thing, but I'm not sure so I'm going with the assumption just in case).
You've defined your `ListView` to be 200 by 200 and your `Canvas` is taking all that space. Judging by your picture, I feel it is `Canvas` that you... | I did it via Popup, it looks well but I dont know whether it fits in your requirement or not
```
<Grid Background="Transparent">
<ListView BorderThickness="0" BorderBrush="Transparent" ItemsSource="{Binding Rectangles}" Height="200" Width="200">
<ListView.Resources>
<Style TargetType="{x:Type ... |
26,021 | Is it possible to achieve stereo sound totally without the "Center". Only extremely Right and Left pan (e.g. Choirs).
If yes, please tell me how? I'm using Ozone iZotope plug-in. | 2013/12/19 | [
"https://sound.stackexchange.com/questions/26021",
"https://sound.stackexchange.com",
"https://sound.stackexchange.com/users/6561/"
] | Not practically. In stereo sound, the phantom center is the 'illusion'. Exactly center is whatever is exactly identical between the two channels. One can generalize and say that the width of the image is proportional to how 'different' the two sounds are.
But it actually turns out this is a mathematical property of so... | One can achieve such an effect by adding a plug-in to a channel that can phase-invert either the left or right stereo channel. This is a great way to make a pad fill up an entire audio space. |
16,103,407 | Here is my situation.
I have a file called `iframe.html`, which contains the code to for a image slideshow.
The code is somewhat like
```
<html>
<head>
<!-- Have added title and js files (jquery, slideshow.js) etc. -->
</head>
<body>
<!-- Contains the images which are rendered as slidehow. -->
<!--... | 2013/04/19 | [
"https://Stackoverflow.com/questions/16103407",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1312737/"
] | Try this code:
`$('#iframe').contents().find("html").html();`
This will return all the html in your iframe. Instead of `.find("html")` you can use any selector you want eg: `.find('body')`,`.find('div#mydiv')`. | ```
var iframe = document.getElementById('iframe');
$(iframe).contents().find("html").html();
``` |
16,103,407 | Here is my situation.
I have a file called `iframe.html`, which contains the code to for a image slideshow.
The code is somewhat like
```
<html>
<head>
<!-- Have added title and js files (jquery, slideshow.js) etc. -->
</head>
<body>
<!-- Contains the images which are rendered as slidehow. -->
<!--... | 2013/04/19 | [
"https://Stackoverflow.com/questions/16103407",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1312737/"
] | Try this code:
`$('#iframe').contents().find("html").html();`
This will return all the html in your iframe. Instead of `.find("html")` you can use any selector you want eg: `.find('body')`,`.find('div#mydiv')`. | ```
$('#iframe').load(function() {
var src = $('#iframe').contents().find("html").html();
alert(src);
});
``` |
16,103,407 | Here is my situation.
I have a file called `iframe.html`, which contains the code to for a image slideshow.
The code is somewhat like
```
<html>
<head>
<!-- Have added title and js files (jquery, slideshow.js) etc. -->
</head>
<body>
<!-- Contains the images which are rendered as slidehow. -->
<!--... | 2013/04/19 | [
"https://Stackoverflow.com/questions/16103407",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1312737/"
] | This line will retrieve the whole HTML code of the frame. By using other methods instead of `innerHTML` you can traverse DOM of the inner document.
```
document.getElementById('iframe').contentWindow.document.body.innerHTML
```
Thing to remember is that this will work only if the frame source is on the same domain. ... | Just for reference's sake. This is how to do it with JQuery (useful for instance when you cannot query by element id):
```
$('#iframe').get(0).contentWindow.document.body.innerHTML
``` |
16,103,407 | Here is my situation.
I have a file called `iframe.html`, which contains the code to for a image slideshow.
The code is somewhat like
```
<html>
<head>
<!-- Have added title and js files (jquery, slideshow.js) etc. -->
</head>
<body>
<!-- Contains the images which are rendered as slidehow. -->
<!--... | 2013/04/19 | [
"https://Stackoverflow.com/questions/16103407",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1312737/"
] | this works for me because it works fine in ie8.
```
$('#iframe').contents().find("html").html();
```
but if you like to use javascript aside for jquery you may use like this
```
var iframe = document.getElementById('iframecontent');
var innerDoc = iframe.contentDocument || iframe.contentWindow.document;
var val_1 =... | This can be another solution if jquery is loaded in iframe.html.
```
$('#iframe')[0].contentWindow.$("html").html()
``` |
16,103,407 | Here is my situation.
I have a file called `iframe.html`, which contains the code to for a image slideshow.
The code is somewhat like
```
<html>
<head>
<!-- Have added title and js files (jquery, slideshow.js) etc. -->
</head>
<body>
<!-- Contains the images which are rendered as slidehow. -->
<!--... | 2013/04/19 | [
"https://Stackoverflow.com/questions/16103407",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1312737/"
] | This line will retrieve the whole HTML code of the frame. By using other methods instead of `innerHTML` you can traverse DOM of the inner document.
```
document.getElementById('iframe').contentWindow.document.body.innerHTML
```
Thing to remember is that this will work only if the frame source is on the same domain. ... | If you have ***Div*** as follows in one ***Iframe***
```
<iframe id="ifrmReportViewer" name="ifrmReportViewer" frameborder="0" width="980"
<div id="EndLetterSequenceNoToShow" runat="server"> 11441551 </div> Or
<form id="form1" runat="server">
<div style="clear: both; width: 998px; margin: 0... |
16,103,407 | Here is my situation.
I have a file called `iframe.html`, which contains the code to for a image slideshow.
The code is somewhat like
```
<html>
<head>
<!-- Have added title and js files (jquery, slideshow.js) etc. -->
</head>
<body>
<!-- Contains the images which are rendered as slidehow. -->
<!--... | 2013/04/19 | [
"https://Stackoverflow.com/questions/16103407",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1312737/"
] | ```
var iframe = document.getElementById('iframe');
$(iframe).contents().find("html").html();
``` | ```
$(editFrame).contents().find("html").html();
``` |
16,103,407 | Here is my situation.
I have a file called `iframe.html`, which contains the code to for a image slideshow.
The code is somewhat like
```
<html>
<head>
<!-- Have added title and js files (jquery, slideshow.js) etc. -->
</head>
<body>
<!-- Contains the images which are rendered as slidehow. -->
<!--... | 2013/04/19 | [
"https://Stackoverflow.com/questions/16103407",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1312737/"
] | ```
$(editFrame).contents().find("html").html();
``` | Just for reference's sake. This is how to do it with JQuery (useful for instance when you cannot query by element id):
```
$('#iframe').get(0).contentWindow.document.body.innerHTML
``` |
16,103,407 | Here is my situation.
I have a file called `iframe.html`, which contains the code to for a image slideshow.
The code is somewhat like
```
<html>
<head>
<!-- Have added title and js files (jquery, slideshow.js) etc. -->
</head>
<body>
<!-- Contains the images which are rendered as slidehow. -->
<!--... | 2013/04/19 | [
"https://Stackoverflow.com/questions/16103407",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1312737/"
] | This line will retrieve the whole HTML code of the frame. By using other methods instead of `innerHTML` you can traverse DOM of the inner document.
```
document.getElementById('iframe').contentWindow.document.body.innerHTML
```
Thing to remember is that this will work only if the frame source is on the same domain. ... | ```
$(editFrame).contents().find("html").html();
``` |
16,103,407 | Here is my situation.
I have a file called `iframe.html`, which contains the code to for a image slideshow.
The code is somewhat like
```
<html>
<head>
<!-- Have added title and js files (jquery, slideshow.js) etc. -->
</head>
<body>
<!-- Contains the images which are rendered as slidehow. -->
<!--... | 2013/04/19 | [
"https://Stackoverflow.com/questions/16103407",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1312737/"
] | Just for reference's sake. This is how to do it with JQuery (useful for instance when you cannot query by element id):
```
$('#iframe').get(0).contentWindow.document.body.innerHTML
``` | ```
$('#iframe').load(function() {
var src = $('#iframe').contents().find("html").html();
alert(src);
});
``` |
16,103,407 | Here is my situation.
I have a file called `iframe.html`, which contains the code to for a image slideshow.
The code is somewhat like
```
<html>
<head>
<!-- Have added title and js files (jquery, slideshow.js) etc. -->
</head>
<body>
<!-- Contains the images which are rendered as slidehow. -->
<!--... | 2013/04/19 | [
"https://Stackoverflow.com/questions/16103407",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1312737/"
] | Why not try Ajax, check a code part 1 or part 2 (use comment).
```js
$(document).ready(function(){
console.clear();
/*
// PART 1 ERROR
// Uncaught SecurityError: Failed to read the 'contentDocument' property from 'HTMLIFrameElement': Sandbox access violation: Blocked a frame at "http://stacksnippets.net"... | ```
$('#iframe').load(function() {
var src = $('#iframe').contents().find("html").html();
alert(src);
});
``` |
34,266 | What I'm trying to say is should Light tell Teru that killing from scrape paper is possible, then if Teru kept a real deathnote paper with him 24/7, surely that in the final showdown, whoever names written on that piece of paper they surely will die, won't they?
That way you don't even need to worry about the book sw... | 2016/07/15 | [
"https://anime.stackexchange.com/questions/34266",
"https://anime.stackexchange.com",
"https://anime.stackexchange.com/users/26187/"
] | Whole point of Teru was to be a decoy. If SPK had seen Mikami using a seperate paper of the real death note would be a give away. For example. Instead of visiting the bank to retrieve the real Deathnote, Megami might have used the paper. Which would still give him away.
Light made sure the Mikami had NO access to the ... | This is the email x-kira should be recieved prior to Jan 28th...
In exactly 1 month and 29 days from today, the 26th of January. Do not go to the bank to pick up the note. Instead and I suggest sometime in December. Make 2 copies not one of the notebook. Keep one in your brief case and the other in the bank vault. Kee... |
1,104,930 | $p,q$ primes.
prove $p=q$ if and only if $p$ divides $q$.
$p|q$ stands for '$p$ divides $q$'
$p|q\Leftrightarrow p=q$
$\Leftarrow$:
$p(1)=q$ and therefore $p|q$
$\Rightarrow$:
if $p=\pm 1$, $p|q\Rightarrow p=q$ does not hold:
all you need is one case to disprove an implication: $1|2 \rightarrow 1=2$, $-1|2 \ri... | 2015/01/15 | [
"https://math.stackexchange.com/questions/1104930",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/99402/"
] | $(\Leftarrow)$ looks good.
For $(\Rightarrow)$ I would say:
If $p\mid q$ then as $q$ is a prime, $p=\pm1$ or $p=\pm q$ but $p$ is a prime so $p=q$.
I am using: If $q>1$ then $q$ is a prime if and only if the following is true: $d\mid q$ implies $d=\pm1$ or $d=\pm q$. | If $p|q$ and $q|p$, then $p = aq$ and $q = bp$, where $a, b$ are integers. Combining these conditions we get $p = abp$, so $p(1-ab) = 0$. There are no divisors of zero in $\mathbb Z$, so $1 = ab$. The only units (invertible elements) in the ring of integers are $1$ and $-1$, so $p = \pm q$. But you were assuming that b... |
66,391,894 | I have a string like this `str ="out = sings<=20,gef=='one'"`. Now I want to remove the first out and = but not the <= and ==. How do I do it, though we can use the replace function it replaces all the =. I only want the first word and the = sing should be removed.
My code:
```
st ="out = sings<=20,gef=='one'"
st1=st... | 2021/02/26 | [
"https://Stackoverflow.com/questions/66391894",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/15276517/"
] | add space while replacing
```
st ="out = sings<=20,gef=='one'"
st1=st.replace('out', "")
print(st1)
st2 = st1.replace(' = ', "")
print(st2)
```
output
```
= sings<=20,gef=='one'
sings<=20,gef=='one'
``` | You can specify the no of replacements to make using the count argument of replace.
```
st ="out = sings<=20,gef=='one'"
st1=st.replace('out', "")
print(st1)
st2 = st1.replace('=', "", 1)
print(st2)
``` |
66,391,894 | I have a string like this `str ="out = sings<=20,gef=='one'"`. Now I want to remove the first out and = but not the <= and ==. How do I do it, though we can use the replace function it replaces all the =. I only want the first word and the = sing should be removed.
My code:
```
st ="out = sings<=20,gef=='one'"
st1=st... | 2021/02/26 | [
"https://Stackoverflow.com/questions/66391894",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/15276517/"
] | You can match from the start of the string the first word characters followed by an equals sign between 1 or more whitespace chars.
In the replacement use an empty string.
```
import re
st ="out = sings<=20,gef=='one'"
result = re.sub(r"^\w+\s+=\s+", "", st)
print (result)
```
Output
```
sings<=20,gef=='one'
``` | You can specify the no of replacements to make using the count argument of replace.
```
st ="out = sings<=20,gef=='one'"
st1=st.replace('out', "")
print(st1)
st2 = st1.replace('=', "", 1)
print(st2)
``` |
4,856,255 | I was looking to find the difference between these four on Google and I expected there to be a huge amount of information on this, but there really wasn't any solid comparison between the four calls.
I set about trying to compile a kind of basic at-a-glance look at the differences between these system calls and here's... | 2011/01/31 | [
"https://Stackoverflow.com/questions/4856255",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/476033/"
] | * `vfork()` is an obsolete optimization. Before good memory management, `fork()` made a full copy of the parent's memory, so it was pretty expensive. since in many cases a `fork()` was followed by `exec()`, which discards the current memory map and creates a new one, it was a needless expense. Nowadays, `fork()` doesn'... | * `execve()` replaces the current executable image with another one loaded from an executable file.
* `fork()` creates a child process.
* `vfork()` is a historical optimized version of `fork()`, meant to be used when `execve()` is called directly after `fork()`. It turned out to work well in non-MMU systems (where `for... |
4,856,255 | I was looking to find the difference between these four on Google and I expected there to be a huge amount of information on this, but there really wasn't any solid comparison between the four calls.
I set about trying to compile a kind of basic at-a-glance look at the differences between these system calls and here's... | 2011/01/31 | [
"https://Stackoverflow.com/questions/4856255",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/476033/"
] | * `vfork()` is an obsolete optimization. Before good memory management, `fork()` made a full copy of the parent's memory, so it was pretty expensive. since in many cases a `fork()` was followed by `exec()`, which discards the current memory map and creates a new one, it was a needless expense. Nowadays, `fork()` doesn'... | in fork(), either child or parent process will execute based on cpu selection..
But in vfork(), surely child will execute first. after child terminated, parent will execute. |
4,856,255 | I was looking to find the difference between these four on Google and I expected there to be a huge amount of information on this, but there really wasn't any solid comparison between the four calls.
I set about trying to compile a kind of basic at-a-glance look at the differences between these system calls and here's... | 2011/01/31 | [
"https://Stackoverflow.com/questions/4856255",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/476033/"
] | * `vfork()` is an obsolete optimization. Before good memory management, `fork()` made a full copy of the parent's memory, so it was pretty expensive. since in many cases a `fork()` was followed by `exec()`, which discards the current memory map and creates a new one, it was a needless expense. Nowadays, `fork()` doesn'... | The fork(),vfork() and clone() all call the do\_fork() to do the real work, but with different parameters.
```
asmlinkage int sys_fork(struct pt_regs regs)
{
return do_fork(SIGCHLD, regs.esp, ®s, 0);
}
asmlinkage int sys_clone(struct pt_regs regs)
{
unsigned long clone_flags;
unsigned long newsp;
... |
4,856,255 | I was looking to find the difference between these four on Google and I expected there to be a huge amount of information on this, but there really wasn't any solid comparison between the four calls.
I set about trying to compile a kind of basic at-a-glance look at the differences between these system calls and here's... | 2011/01/31 | [
"https://Stackoverflow.com/questions/4856255",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/476033/"
] | * `vfork()` is an obsolete optimization. Before good memory management, `fork()` made a full copy of the parent's memory, so it was pretty expensive. since in many cases a `fork()` was followed by `exec()`, which discards the current memory map and creates a new one, it was a needless expense. Nowadays, `fork()` doesn'... | 1. `fork()` - creates a new child process, which is a complete copy of the parent process. Child and parent processes use different virtual address spaces, which is initially populated by the same memory pages. Then, as both processes are executed, the virtual address spaces begin to differ more and more, because the o... |
4,856,255 | I was looking to find the difference between these four on Google and I expected there to be a huge amount of information on this, but there really wasn't any solid comparison between the four calls.
I set about trying to compile a kind of basic at-a-glance look at the differences between these system calls and here's... | 2011/01/31 | [
"https://Stackoverflow.com/questions/4856255",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/476033/"
] | * `execve()` replaces the current executable image with another one loaded from an executable file.
* `fork()` creates a child process.
* `vfork()` is a historical optimized version of `fork()`, meant to be used when `execve()` is called directly after `fork()`. It turned out to work well in non-MMU systems (where `for... | in fork(), either child or parent process will execute based on cpu selection..
But in vfork(), surely child will execute first. after child terminated, parent will execute. |
4,856,255 | I was looking to find the difference between these four on Google and I expected there to be a huge amount of information on this, but there really wasn't any solid comparison between the four calls.
I set about trying to compile a kind of basic at-a-glance look at the differences between these system calls and here's... | 2011/01/31 | [
"https://Stackoverflow.com/questions/4856255",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/476033/"
] | * `execve()` replaces the current executable image with another one loaded from an executable file.
* `fork()` creates a child process.
* `vfork()` is a historical optimized version of `fork()`, meant to be used when `execve()` is called directly after `fork()`. It turned out to work well in non-MMU systems (where `for... | The fork(),vfork() and clone() all call the do\_fork() to do the real work, but with different parameters.
```
asmlinkage int sys_fork(struct pt_regs regs)
{
return do_fork(SIGCHLD, regs.esp, ®s, 0);
}
asmlinkage int sys_clone(struct pt_regs regs)
{
unsigned long clone_flags;
unsigned long newsp;
... |
4,856,255 | I was looking to find the difference between these four on Google and I expected there to be a huge amount of information on this, but there really wasn't any solid comparison between the four calls.
I set about trying to compile a kind of basic at-a-glance look at the differences between these system calls and here's... | 2011/01/31 | [
"https://Stackoverflow.com/questions/4856255",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/476033/"
] | * `execve()` replaces the current executable image with another one loaded from an executable file.
* `fork()` creates a child process.
* `vfork()` is a historical optimized version of `fork()`, meant to be used when `execve()` is called directly after `fork()`. It turned out to work well in non-MMU systems (where `for... | 1. `fork()` - creates a new child process, which is a complete copy of the parent process. Child and parent processes use different virtual address spaces, which is initially populated by the same memory pages. Then, as both processes are executed, the virtual address spaces begin to differ more and more, because the o... |
4,856,255 | I was looking to find the difference between these four on Google and I expected there to be a huge amount of information on this, but there really wasn't any solid comparison between the four calls.
I set about trying to compile a kind of basic at-a-glance look at the differences between these system calls and here's... | 2011/01/31 | [
"https://Stackoverflow.com/questions/4856255",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/476033/"
] | The fork(),vfork() and clone() all call the do\_fork() to do the real work, but with different parameters.
```
asmlinkage int sys_fork(struct pt_regs regs)
{
return do_fork(SIGCHLD, regs.esp, ®s, 0);
}
asmlinkage int sys_clone(struct pt_regs regs)
{
unsigned long clone_flags;
unsigned long newsp;
... | in fork(), either child or parent process will execute based on cpu selection..
But in vfork(), surely child will execute first. after child terminated, parent will execute. |
4,856,255 | I was looking to find the difference between these four on Google and I expected there to be a huge amount of information on this, but there really wasn't any solid comparison between the four calls.
I set about trying to compile a kind of basic at-a-glance look at the differences between these system calls and here's... | 2011/01/31 | [
"https://Stackoverflow.com/questions/4856255",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/476033/"
] | 1. `fork()` - creates a new child process, which is a complete copy of the parent process. Child and parent processes use different virtual address spaces, which is initially populated by the same memory pages. Then, as both processes are executed, the virtual address spaces begin to differ more and more, because the o... | in fork(), either child or parent process will execute based on cpu selection..
But in vfork(), surely child will execute first. after child terminated, parent will execute. |
4,856,255 | I was looking to find the difference between these four on Google and I expected there to be a huge amount of information on this, but there really wasn't any solid comparison between the four calls.
I set about trying to compile a kind of basic at-a-glance look at the differences between these system calls and here's... | 2011/01/31 | [
"https://Stackoverflow.com/questions/4856255",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/476033/"
] | 1. `fork()` - creates a new child process, which is a complete copy of the parent process. Child and parent processes use different virtual address spaces, which is initially populated by the same memory pages. Then, as both processes are executed, the virtual address spaces begin to differ more and more, because the o... | The fork(),vfork() and clone() all call the do\_fork() to do the real work, but with different parameters.
```
asmlinkage int sys_fork(struct pt_regs regs)
{
return do_fork(SIGCHLD, regs.esp, ®s, 0);
}
asmlinkage int sys_clone(struct pt_regs regs)
{
unsigned long clone_flags;
unsigned long newsp;
... |
34,330,248 | I am using Ionic framework to create an app like Meeting room booking for an organization.I am new to Ionic framework.
I need you guys to help in the following thinks
1).Oauth for Google signin
2)access Google calendar by send request with access token
3)need to get the JSON response for request.
4)and also,Important t... | 2015/12/17 | [
"https://Stackoverflow.com/questions/34330248",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1901946/"
] | @arun, I have developed a small hybrid app using ionic2 and integrated google calendar in the app. You can see a quick demo of the app @ [Google calendar in Ionic 2 app demo on android device](https://www.youtube.com/watch?v=QSwbBQTiYaU).
If this is what you are looking for, I believe the things you mentioned in the qu... | **Ionic framework** is integration of AngularJS which is best framework for cross platform. Which has large support of **ngCordova plugins**.
I have some links for you
1. For Google oAuth - <http://blog.ionic.io/oauth-ionic-ngcordova/>
2. For Google calender - <http://www.raymondcamden.com/2015/09/18/integrating-the... |
34,330,248 | I am using Ionic framework to create an app like Meeting room booking for an organization.I am new to Ionic framework.
I need you guys to help in the following thinks
1).Oauth for Google signin
2)access Google calendar by send request with access token
3)need to get the JSON response for request.
4)and also,Important t... | 2015/12/17 | [
"https://Stackoverflow.com/questions/34330248",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1901946/"
] | **Ionic framework** is integration of AngularJS which is best framework for cross platform. Which has large support of **ngCordova plugins**.
I have some links for you
1. For Google oAuth - <http://blog.ionic.io/oauth-ionic-ngcordova/>
2. For Google calender - <http://www.raymondcamden.com/2015/09/18/integrating-the... | I have been looking for ages to integrate data from the google calendar into Ionic without any luck.
I have now been able to integrate it into my ionic app through my backend in node.js, I advice you to do the same.
This is the code I used in my backend
```
let eventCategories = require('./event.model');
let fs = r... |
34,330,248 | I am using Ionic framework to create an app like Meeting room booking for an organization.I am new to Ionic framework.
I need you guys to help in the following thinks
1).Oauth for Google signin
2)access Google calendar by send request with access token
3)need to get the JSON response for request.
4)and also,Important t... | 2015/12/17 | [
"https://Stackoverflow.com/questions/34330248",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1901946/"
] | @arun, I have developed a small hybrid app using ionic2 and integrated google calendar in the app. You can see a quick demo of the app @ [Google calendar in Ionic 2 app demo on android device](https://www.youtube.com/watch?v=QSwbBQTiYaU).
If this is what you are looking for, I believe the things you mentioned in the qu... | I have been looking for ages to integrate data from the google calendar into Ionic without any luck.
I have now been able to integrate it into my ionic app through my backend in node.js, I advice you to do the same.
This is the code I used in my backend
```
let eventCategories = require('./event.model');
let fs = r... |
45,697,404 | I have two SQL Server 2008 R2 servers one for PROD and the other for DR. I am trying to add log shipping for a database called School.
Steps so far
* Back up School database
* Restore with database using the UI or using the following SQL statement i.e.
```
Restore database "School"
From disk ='t:\Data\School.bak'
... | 2017/08/15 | [
"https://Stackoverflow.com/questions/45697404",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1339913/"
] | This seems like expected behavior to me. Am I misreading something?
After you've restored the database and any differential or required transaction log backups with the `NORECOVERY` option, you need to tell SQL Server you're done restoring files. The `NORECOVERY` option is specifically there to let you restore multipl... | >
> I have deleted the database and recreated it again using Restore database "School" from disk ='t:\Data\School.bak' with NoRecovery
>
>
>
you have to use below command as well,if you dont have any further logs
```
restore database databasename with recovery
```
**some more info:**
>
> Restore with databa... |
68,197,195 | I am trying follow this tutorial: <https://html.form.guide/email-form/php-form-to-email/> to deploy a simple php script to google App Engine. I want to load the form from localhost and post to the app engine link. When I do, the `$_POST` is empty. Is this an issue when posting from another server/localhost to an app-en... | 2021/06/30 | [
"https://Stackoverflow.com/questions/68197195",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1803682/"
] | you can post data to another server by writing the true url if your url was ok the post data must be passed but if you checked your url and it's true but you still have a problem you can use api calls to do that by
```
header('Content-Type: application/json');
$data = json_decode(file_get_contents("php://input"));
hea... | appspot.com has been the host to a lot of fishing attacks. It is likely blocked as a safety issue. |
68,197,195 | I am trying follow this tutorial: <https://html.form.guide/email-form/php-form-to-email/> to deploy a simple php script to google App Engine. I want to load the form from localhost and post to the app engine link. When I do, the `$_POST` is empty. Is this an issue when posting from another server/localhost to an app-en... | 2021/06/30 | [
"https://Stackoverflow.com/questions/68197195",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1803682/"
] | >
> Is this an issue when posting from another server/localhost to an app-engine hosted service?
>
>
>
No, the server receives the POST request as it is send.
And yes, as you have an issue doing so.
---
It should work, but what to do now?
Verify with the networking tools in your browser what is actually send t... | appspot.com has been the host to a lot of fishing attacks. It is likely blocked as a safety issue. |
31,192,751 | Example Of Data:
```
<property>
<price>2080000</price>
<country>France</country>
<currency>euro</currency>
<locations>
<location_9>Ski</location_9>
<location_16>50km or less to airport</location_16>
<location_17>0-2KM to amenities</location_17>
</locations>
<secondaryproptypes>
<secondarypr... | 2015/07/02 | [
"https://Stackoverflow.com/questions/31192751",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3461845/"
] | ```
var arr = [
"10Regular", "18Regular", "14Long", "14Regular",
"10Long", "16Long", "12Long", "20Regular",
"16Regular", "12Regular", "18Long"
];
var trimmedAndSorted = arr.map(function(e) {
return e.replace(/(\d+[a-z]).*/i, '$1');
}).sort();
```
Got a downvote so I assume there is a syntax error, bu... | If you just want to sort them using the numbers in front, regardless of the letters that come after them, given `arr` as you array:
```
arr.map(function(entry){
// extract the number and first letter as [number, letter]
return entry.match(/^(\d+)(.{1})/).slice(1)
}).sort(function(a, b){
// Sort the array by the ... |
31,192,751 | Example Of Data:
```
<property>
<price>2080000</price>
<country>France</country>
<currency>euro</currency>
<locations>
<location_9>Ski</location_9>
<location_16>50km or less to airport</location_16>
<location_17>0-2KM to amenities</location_17>
</locations>
<secondaryproptypes>
<secondarypr... | 2015/07/02 | [
"https://Stackoverflow.com/questions/31192751",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3461845/"
] | ```
var arr = [
"10Regular", "18Regular", "14Long", "14Regular",
"10Long", "16Long", "12Long", "20Regular",
"16Regular", "12Regular", "18Long"
];
var trimmedAndSorted = arr.map(function(e) {
return e.replace(/(\d+[a-z]).*/i, '$1');
}).sort();
```
Got a downvote so I assume there is a syntax error, bu... | Define a sorting function, that takes functions for augmented sorting
---------------------------------------------------------------------
My favorite sorting function (which is more versatile than needed for just this task) can sort arrays of values or objects of any nested depth and accepts an optional function for... |
27,768,143 | I tried to solve this with logarithm rules:
O(n^2) = 2^O(log(n^2))
c\*n^2 = 2^log(n^2c)
Im not sure that is true? | 2015/01/04 | [
"https://Stackoverflow.com/questions/27768143",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3630497/"
] | I solved this error changing the initial project to the Entity Project.
Look:
Update-Database -Verbose
**Using StartUp project 'SCVE.Web'.** <-- this ir error
Using NuGet project 'SCVE.EntityFramework'. | I had this same problem with a freshly created ASP.NET project.
First I tried to set the startup project as mentioned above. There was no startup project selected and I was unable to select one.
Ultimately I updated my Visual Studio from 2015 Update 1 to 2015 Update 3 and
```
update-database
```
executed without p... |
27,768,143 | I tried to solve this with logarithm rules:
O(n^2) = 2^O(log(n^2))
c\*n^2 = 2^log(n^2c)
Im not sure that is true? | 2015/01/04 | [
"https://Stackoverflow.com/questions/27768143",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3630497/"
] | As explained in other answers, the problem usually comes from having the wrong Initial project in Package Manager Console.
In my case the console was ignoring the value I selected in the Default Project drop down list, and also the `-StartUpProjectName` parameter, and reproducing the wrong behavior of trying to connect... | Try with this Connectionstring:
```
<connectionStrings>
<add name="DefaultConnection" connectionString="Data Source=(LocalDb)\v11.0;AttachDbFilename=D:\USERS\USERNAME\DOCUMENTS\TestDatabase\testdb.MDF;Initial Catalog=testdb;Integrated Security=True" providerName="System.Data.SqlClient" />
</connectionStrings>
``` |
27,768,143 | I tried to solve this with logarithm rules:
O(n^2) = 2^O(log(n^2))
c\*n^2 = 2^log(n^2c)
Im not sure that is true? | 2015/01/04 | [
"https://Stackoverflow.com/questions/27768143",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3630497/"
] | Try with this Connectionstring:
```
<connectionStrings>
<add name="DefaultConnection" connectionString="Data Source=(LocalDb)\v11.0;AttachDbFilename=D:\USERS\USERNAME\DOCUMENTS\TestDatabase\testdb.MDF;Initial Catalog=testdb;Integrated Security=True" providerName="System.Data.SqlClient" />
</connectionStrings>
``` | ```
PM>Update-Database
```
error and solution which I did today in 4 hours.
I am very much new in .net coding, but yes in PHP I have 10+ years experience.
It took me 4 hours to solve this.
1.My `first Mistake:` I was not having Microsoft SQL Server 2019 in my laptop locally I was having this through AZURE which is no... |
27,768,143 | I tried to solve this with logarithm rules:
O(n^2) = 2^O(log(n^2))
c\*n^2 = 2^log(n^2c)
Im not sure that is true? | 2015/01/04 | [
"https://Stackoverflow.com/questions/27768143",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3630497/"
] | As explained in other answers, the problem usually comes from having the wrong Initial project in Package Manager Console.
In my case the console was ignoring the value I selected in the Default Project drop down list, and also the `-StartUpProjectName` parameter, and reproducing the wrong behavior of trying to connect... | >
> A network-related or instance-specific error occurred while
> establishing a connection to SQL Server. The server was not found or
> was not accessible. Verify that the instance name is correct and that
> SQL Server is configured to allow remote connections. (provider: SQL
> Network Interfaces, error: 26 - Err... |
27,768,143 | I tried to solve this with logarithm rules:
O(n^2) = 2^O(log(n^2))
c\*n^2 = 2^log(n^2c)
Im not sure that is true? | 2015/01/04 | [
"https://Stackoverflow.com/questions/27768143",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3630497/"
] | As explained in other answers, the problem usually comes from having the wrong Initial project in Package Manager Console.
In my case the console was ignoring the value I selected in the Default Project drop down list, and also the `-StartUpProjectName` parameter, and reproducing the wrong behavior of trying to connect... | I had this same problem with a freshly created ASP.NET project.
First I tried to set the startup project as mentioned above. There was no startup project selected and I was unable to select one.
Ultimately I updated my Visual Studio from 2015 Update 1 to 2015 Update 3 and
```
update-database
```
executed without p... |
27,768,143 | I tried to solve this with logarithm rules:
O(n^2) = 2^O(log(n^2))
c\*n^2 = 2^log(n^2c)
Im not sure that is true? | 2015/01/04 | [
"https://Stackoverflow.com/questions/27768143",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3630497/"
] | I solved this error changing the initial project to the Entity Project.
Look:
Update-Database -Verbose
**Using StartUp project 'SCVE.Web'.** <-- this ir error
Using NuGet project 'SCVE.EntityFramework'. | If you are trying to connect to Sql Server instead of localdb then make sure the default connection factory in web.config file is as below:
```
<defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlConnectionFactory, EntityFramework">
<parameters>
<parameter value="Data Source=.\SQLEXPRESS2012; In... |
27,768,143 | I tried to solve this with logarithm rules:
O(n^2) = 2^O(log(n^2))
c\*n^2 = 2^log(n^2c)
Im not sure that is true? | 2015/01/04 | [
"https://Stackoverflow.com/questions/27768143",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3630497/"
] | I had similar problem and fixed it when I changed the "start-up project" from another module to the module containing references to all other projects in the solution.
Right-click module >> click "Set as StartUp Project" | Diego's answer is correct.
This problem occurs when there is no connection string in project marked as startup project. Then EF tries to connect to some default database engine to perform update. In my case it tried to use express, and for some reason it couldn't connect. And the error was thrown.
Run your "update-da... |
27,768,143 | I tried to solve this with logarithm rules:
O(n^2) = 2^O(log(n^2))
c\*n^2 = 2^log(n^2c)
Im not sure that is true? | 2015/01/04 | [
"https://Stackoverflow.com/questions/27768143",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3630497/"
] | Diego's answer is correct.
This problem occurs when there is no connection string in project marked as startup project. Then EF tries to connect to some default database engine to perform update. In my case it tried to use express, and for some reason it couldn't connect. And the error was thrown.
Run your "update-da... | ```
PM>Update-Database
```
error and solution which I did today in 4 hours.
I am very much new in .net coding, but yes in PHP I have 10+ years experience.
It took me 4 hours to solve this.
1.My `first Mistake:` I was not having Microsoft SQL Server 2019 in my laptop locally I was having this through AZURE which is no... |
27,768,143 | I tried to solve this with logarithm rules:
O(n^2) = 2^O(log(n^2))
c\*n^2 = 2^log(n^2c)
Im not sure that is true? | 2015/01/04 | [
"https://Stackoverflow.com/questions/27768143",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3630497/"
] | As explained in other answers, the problem usually comes from having the wrong Initial project in Package Manager Console.
In my case the console was ignoring the value I selected in the Default Project drop down list, and also the `-StartUpProjectName` parameter, and reproducing the wrong behavior of trying to connect... | ```
PM>Update-Database
```
error and solution which I did today in 4 hours.
I am very much new in .net coding, but yes in PHP I have 10+ years experience.
It took me 4 hours to solve this.
1.My `first Mistake:` I was not having Microsoft SQL Server 2019 in my laptop locally I was having this through AZURE which is no... |
27,768,143 | I tried to solve this with logarithm rules:
O(n^2) = 2^O(log(n^2))
c\*n^2 = 2^log(n^2c)
Im not sure that is true? | 2015/01/04 | [
"https://Stackoverflow.com/questions/27768143",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3630497/"
] | Diego's answer is correct.
This problem occurs when there is no connection string in project marked as startup project. Then EF tries to connect to some default database engine to perform update. In my case it tried to use express, and for some reason it couldn't connect. And the error was thrown.
Run your "update-da... | Try with this Connectionstring:
```
<connectionStrings>
<add name="DefaultConnection" connectionString="Data Source=(LocalDb)\v11.0;AttachDbFilename=D:\USERS\USERNAME\DOCUMENTS\TestDatabase\testdb.MDF;Initial Catalog=testdb;Integrated Security=True" providerName="System.Data.SqlClient" />
</connectionStrings>
``` |
70,189,729 | I am just looking at assertDoesNotThrow() in the JUnit documentation [here](https://junit.org/junit5/docs/5.3.0/api/org/junit/jupiter/api/Assertions.html#assertDoesNotThrow(org.junit.jupiter.api.function.Executable)). I know that you can specify the type of exception with assertThrows() but it appears from the document... | 2021/12/01 | [
"https://Stackoverflow.com/questions/70189729",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/10957099/"
] | The *default* for a Java test is that it asserts that the function doesn't throw. You don't need to do any extra work for that; you only need to do extra work to allow it to throw.
To test that a method does not throw a `ParseException`, run it. That's all. | Trying to prove a method does not throw exception is like saying purple unicorns don't exist. One has to check every spot in the universe to prove that. On the other hand if you check the spots where purple unicorns might live and don't see any of them, you can *approximate* and tell they don't exist in this context.
... |
151,687 | I have a Query String (URL) filter on my SharePoint 2013 page that is currently passing a string parameter which I then use to filter a list. This list is displayed in a view on my web part page. I want to add a "Title" object above my list view to show the value of the filter parameter that I'm passing to filter the l... | 2015/08/07 | [
"https://sharepoint.stackexchange.com/questions/151687",
"https://sharepoint.stackexchange.com",
"https://sharepoint.stackexchange.com/users/44915/"
] | The Author column is of `LookUp` Type. Here is the complete list.
```
var ctx = new SP.ClientContext.get_current();
var list = ctx.get_web().get_lists().getByTitle("Vacation Replacement");
var query = new SP.CamlQuery();
var specifier = "<Where><Eq><FieldRef Name='Author' LookupId='True'/><Value Type='Lookup'><UserID/... | Create a custom view of the list and select radio button
Show items only when the following is true:
created by is equal to type [Me]
save the list.
[](https://i.stack.imgur.com/otAZa.png)
```
function getItemsFromView()
{
var context = new SP.Clie... |
151,687 | I have a Query String (URL) filter on my SharePoint 2013 page that is currently passing a string parameter which I then use to filter a list. This list is displayed in a view on my web part page. I want to add a "Title" object above my list view to show the value of the filter parameter that I'm passing to filter the l... | 2015/08/07 | [
"https://sharepoint.stackexchange.com/questions/151687",
"https://sharepoint.stackexchange.com",
"https://sharepoint.stackexchange.com/users/44915/"
] | ```
var context = new SP.ClientContext.get_current();
var list = context.get_web().get_lists().getByTitle("ListName");
var cQuery = new SP.CamlQuery();
var camlXML = "<View><Query><Where><Eq><FieldRef Name='Author' LookupId='True'/><Value Type='Lookup'>" + _spPageContextInfo.userId + "</Value></Eq></Where>... | Create a custom view of the list and select radio button
Show items only when the following is true:
created by is equal to type [Me]
save the list.
[](https://i.stack.imgur.com/otAZa.png)
```
function getItemsFromView()
{
var context = new SP.Clie... |
151,687 | I have a Query String (URL) filter on my SharePoint 2013 page that is currently passing a string parameter which I then use to filter a list. This list is displayed in a view on my web part page. I want to add a "Title" object above my list view to show the value of the filter parameter that I'm passing to filter the l... | 2015/08/07 | [
"https://sharepoint.stackexchange.com/questions/151687",
"https://sharepoint.stackexchange.com",
"https://sharepoint.stackexchange.com/users/44915/"
] | The Author column is of `LookUp` Type. Here is the complete list.
```
var ctx = new SP.ClientContext.get_current();
var list = ctx.get_web().get_lists().getByTitle("Vacation Replacement");
var query = new SP.CamlQuery();
var specifier = "<Where><Eq><FieldRef Name='Author' LookupId='True'/><Value Type='Lookup'><UserID/... | To get current user Id
```
clientContext = new SP.ClientContext.get_current();
var user=clientContext.get_web().get_currentUser();
clientContext.load(user);
clientContext.executeQueryAsync(function(){
var userId=user.get_id();
var query="<Where><Eq>"+
"<FieldRef Name="Author" LookupId="TRUE" />"+
"<Value... |
151,687 | I have a Query String (URL) filter on my SharePoint 2013 page that is currently passing a string parameter which I then use to filter a list. This list is displayed in a view on my web part page. I want to add a "Title" object above my list view to show the value of the filter parameter that I'm passing to filter the l... | 2015/08/07 | [
"https://sharepoint.stackexchange.com/questions/151687",
"https://sharepoint.stackexchange.com",
"https://sharepoint.stackexchange.com/users/44915/"
] | ```
var context = new SP.ClientContext.get_current();
var list = context.get_web().get_lists().getByTitle("ListName");
var cQuery = new SP.CamlQuery();
var camlXML = "<View><Query><Where><Eq><FieldRef Name='Author' LookupId='True'/><Value Type='Lookup'>" + _spPageContextInfo.userId + "</Value></Eq></Where>... | To get current user Id
```
clientContext = new SP.ClientContext.get_current();
var user=clientContext.get_web().get_currentUser();
clientContext.load(user);
clientContext.executeQueryAsync(function(){
var userId=user.get_id();
var query="<Where><Eq>"+
"<FieldRef Name="Author" LookupId="TRUE" />"+
"<Value... |
151,687 | I have a Query String (URL) filter on my SharePoint 2013 page that is currently passing a string parameter which I then use to filter a list. This list is displayed in a view on my web part page. I want to add a "Title" object above my list view to show the value of the filter parameter that I'm passing to filter the l... | 2015/08/07 | [
"https://sharepoint.stackexchange.com/questions/151687",
"https://sharepoint.stackexchange.com",
"https://sharepoint.stackexchange.com/users/44915/"
] | ```
var context = new SP.ClientContext.get_current();
var list = context.get_web().get_lists().getByTitle("ListName");
var cQuery = new SP.CamlQuery();
var camlXML = "<View><Query><Where><Eq><FieldRef Name='Author' LookupId='True'/><Value Type='Lookup'>" + _spPageContextInfo.userId + "</Value></Eq></Where>... | The Author column is of `LookUp` Type. Here is the complete list.
```
var ctx = new SP.ClientContext.get_current();
var list = ctx.get_web().get_lists().getByTitle("Vacation Replacement");
var query = new SP.CamlQuery();
var specifier = "<Where><Eq><FieldRef Name='Author' LookupId='True'/><Value Type='Lookup'><UserID/... |
96,396 | a bit of background to the question, I'm a junior developer and we have recently been given flexitime which so far is working well as I get to start at 8am and leave at 4:30pm.
Today I arrived at 7:30 (I like to be early so I can have a coffee in the office before I start my work) however no one arrived to open the of... | 2017/08/02 | [
"https://workplace.stackexchange.com/questions/96396",
"https://workplace.stackexchange.com",
"https://workplace.stackexchange.com/users/53342/"
] | Today, work till 5:30. Yes it's not your fault that you couldn't start at 8 - but you still need to ensure you're working your contracted hours.
Make sure today though that you discuss with your boss what happens in future. If the company is offering flexible hours - they need to ensure you can start work when you wa... | This is a tricky one.
The basic answer is: You were there at the disposition of the employer in the time agreed upon with him; that you did not were able to do work due to factors external to you does not change that. It is not different to, say, staying an hour idle at work because of the computer do not work due to ... |
96,396 | a bit of background to the question, I'm a junior developer and we have recently been given flexitime which so far is working well as I get to start at 8am and leave at 4:30pm.
Today I arrived at 7:30 (I like to be early so I can have a coffee in the office before I start my work) however no one arrived to open the of... | 2017/08/02 | [
"https://workplace.stackexchange.com/questions/96396",
"https://workplace.stackexchange.com",
"https://workplace.stackexchange.com/users/53342/"
] | Unless there was a pre-existing conversation with your boss that you were coming in at 8 and that someone would be there to open the office then I'd say that this time you'll just have to take it on the chin and work till 5:30.
What I would do though is explain to your boss (in a non-confrontational, non-accusatory wa... | Today, work till 5:30. Yes it's not your fault that you couldn't start at 8 - but you still need to ensure you're working your contracted hours.
Make sure today though that you discuss with your boss what happens in future. If the company is offering flexible hours - they need to ensure you can start work when you wa... |
96,396 | a bit of background to the question, I'm a junior developer and we have recently been given flexitime which so far is working well as I get to start at 8am and leave at 4:30pm.
Today I arrived at 7:30 (I like to be early so I can have a coffee in the office before I start my work) however no one arrived to open the of... | 2017/08/02 | [
"https://workplace.stackexchange.com/questions/96396",
"https://workplace.stackexchange.com",
"https://workplace.stackexchange.com/users/53342/"
] | Today, work till 5:30. Yes it's not your fault that you couldn't start at 8 - but you still need to ensure you're working your contracted hours.
Make sure today though that you discuss with your boss what happens in future. If the company is offering flexible hours - they need to ensure you can start work when you wa... | Just ask your manager.
Don't assume anything and simply ask. Something odd happened today and you want to know how to proceed as well as set up an example for future instances should it happen again. This is the exact situation where the only correct thing to do is ask your manager.
You shouldn't "just do the work" w... |
96,396 | a bit of background to the question, I'm a junior developer and we have recently been given flexitime which so far is working well as I get to start at 8am and leave at 4:30pm.
Today I arrived at 7:30 (I like to be early so I can have a coffee in the office before I start my work) however no one arrived to open the of... | 2017/08/02 | [
"https://workplace.stackexchange.com/questions/96396",
"https://workplace.stackexchange.com",
"https://workplace.stackexchange.com/users/53342/"
] | Unless there was a pre-existing conversation with your boss that you were coming in at 8 and that someone would be there to open the office then I'd say that this time you'll just have to take it on the chin and work till 5:30.
What I would do though is explain to your boss (in a non-confrontational, non-accusatory wa... | This is a tricky one.
The basic answer is: You were there at the disposition of the employer in the time agreed upon with him; that you did not were able to do work due to factors external to you does not change that. It is not different to, say, staying an hour idle at work because of the computer do not work due to ... |
96,396 | a bit of background to the question, I'm a junior developer and we have recently been given flexitime which so far is working well as I get to start at 8am and leave at 4:30pm.
Today I arrived at 7:30 (I like to be early so I can have a coffee in the office before I start my work) however no one arrived to open the of... | 2017/08/02 | [
"https://workplace.stackexchange.com/questions/96396",
"https://workplace.stackexchange.com",
"https://workplace.stackexchange.com/users/53342/"
] | With all implementations of flextime that I know, there is a set of rules, in particular **core and maximum work hours**. You need to be there at least during core hours (e.g. 10am-2pm), and you may only work during a certain window (e.g. 7am-7pm). Was that not communicated?
If not, then talk to your manager and ask t... | This is a tricky one.
The basic answer is: You were there at the disposition of the employer in the time agreed upon with him; that you did not were able to do work due to factors external to you does not change that. It is not different to, say, staying an hour idle at work because of the computer do not work due to ... |
96,396 | a bit of background to the question, I'm a junior developer and we have recently been given flexitime which so far is working well as I get to start at 8am and leave at 4:30pm.
Today I arrived at 7:30 (I like to be early so I can have a coffee in the office before I start my work) however no one arrived to open the of... | 2017/08/02 | [
"https://workplace.stackexchange.com/questions/96396",
"https://workplace.stackexchange.com",
"https://workplace.stackexchange.com/users/53342/"
] | Unless there was a pre-existing conversation with your boss that you were coming in at 8 and that someone would be there to open the office then I'd say that this time you'll just have to take it on the chin and work till 5:30.
What I would do though is explain to your boss (in a non-confrontational, non-accusatory wa... | With all implementations of flextime that I know, there is a set of rules, in particular **core and maximum work hours**. You need to be there at least during core hours (e.g. 10am-2pm), and you may only work during a certain window (e.g. 7am-7pm). Was that not communicated?
If not, then talk to your manager and ask t... |
96,396 | a bit of background to the question, I'm a junior developer and we have recently been given flexitime which so far is working well as I get to start at 8am and leave at 4:30pm.
Today I arrived at 7:30 (I like to be early so I can have a coffee in the office before I start my work) however no one arrived to open the of... | 2017/08/02 | [
"https://workplace.stackexchange.com/questions/96396",
"https://workplace.stackexchange.com",
"https://workplace.stackexchange.com/users/53342/"
] | Unless there was a pre-existing conversation with your boss that you were coming in at 8 and that someone would be there to open the office then I'd say that this time you'll just have to take it on the chin and work till 5:30.
What I would do though is explain to your boss (in a non-confrontational, non-accusatory wa... | Just ask your manager.
Don't assume anything and simply ask. Something odd happened today and you want to know how to proceed as well as set up an example for future instances should it happen again. This is the exact situation where the only correct thing to do is ask your manager.
You shouldn't "just do the work" w... |
96,396 | a bit of background to the question, I'm a junior developer and we have recently been given flexitime which so far is working well as I get to start at 8am and leave at 4:30pm.
Today I arrived at 7:30 (I like to be early so I can have a coffee in the office before I start my work) however no one arrived to open the of... | 2017/08/02 | [
"https://workplace.stackexchange.com/questions/96396",
"https://workplace.stackexchange.com",
"https://workplace.stackexchange.com/users/53342/"
] | With all implementations of flextime that I know, there is a set of rules, in particular **core and maximum work hours**. You need to be there at least during core hours (e.g. 10am-2pm), and you may only work during a certain window (e.g. 7am-7pm). Was that not communicated?
If not, then talk to your manager and ask t... | Just ask your manager.
Don't assume anything and simply ask. Something odd happened today and you want to know how to proceed as well as set up an example for future instances should it happen again. This is the exact situation where the only correct thing to do is ask your manager.
You shouldn't "just do the work" w... |
39,751,570 | I dont know if I can post this here or not. But a strange thing happened recently.
I use pycharm to run my python codes and surprisingly when I opened a piece of my code - it got deleted. The file is 0KB now - for some reason. I am using this file for over a month now and this happened when I opened it and the file a... | 2016/09/28 | [
"https://Stackoverflow.com/questions/39751570",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4463825/"
] | Finally, I found a way but I'm not sure at all that it's a conventional way:
```
//...
function is_foobar($value) {
//return true or false;
}
$resolver = new OptionsResolver();
$resolver->setRequired('data');
$resolver->setAllowedTypes('data', 'foobar');
//...
```
---
**EDIT:**
Well, after I sleep on, I think... | The signature of `OptionsResolver::setAllowedTypes()` is just [this](http://api.symfony.com/3.1/Symfony/Component/OptionsResolver/OptionsResolver.html#method_setAllowedTypes):
```
setAllowedTypes(string $option, string|string[] $allowedTypes)
```
The argument `$allowedTypes` can accept a list of strings, and is used... |
39,751,570 | I dont know if I can post this here or not. But a strange thing happened recently.
I use pycharm to run my python codes and surprisingly when I opened a piece of my code - it got deleted. The file is 0KB now - for some reason. I am using this file for over a month now and this happened when I opened it and the file a... | 2016/09/28 | [
"https://Stackoverflow.com/questions/39751570",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4463825/"
] | See [Define a form option allowed values depending on another option value in a FormType](https://stackoverflow.com/questions/35204850/define-a-form-option-allowed-values-depending-on-another-option-value-in-a-formt/35215869#35215869).
You should use a **normalizer** for this:
```
use Symfony\Component\Form\Exception... | The signature of `OptionsResolver::setAllowedTypes()` is just [this](http://api.symfony.com/3.1/Symfony/Component/OptionsResolver/OptionsResolver.html#method_setAllowedTypes):
```
setAllowedTypes(string $option, string|string[] $allowedTypes)
```
The argument `$allowedTypes` can accept a list of strings, and is used... |
39,751,570 | I dont know if I can post this here or not. But a strange thing happened recently.
I use pycharm to run my python codes and surprisingly when I opened a piece of my code - it got deleted. The file is 0KB now - for some reason. I am using this file for over a month now and this happened when I opened it and the file a... | 2016/09/28 | [
"https://Stackoverflow.com/questions/39751570",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4463825/"
] | See [Define a form option allowed values depending on another option value in a FormType](https://stackoverflow.com/questions/35204850/define-a-form-option-allowed-values-depending-on-another-option-value-in-a-formt/35215869#35215869).
You should use a **normalizer** for this:
```
use Symfony\Component\Form\Exception... | Finally, I found a way but I'm not sure at all that it's a conventional way:
```
//...
function is_foobar($value) {
//return true or false;
}
$resolver = new OptionsResolver();
$resolver->setRequired('data');
$resolver->setAllowedTypes('data', 'foobar');
//...
```
---
**EDIT:**
Well, after I sleep on, I think... |
19,142,546 | I had this setup:
```
images
image1.jpg
image2.jpg
header.html
about
index.php
image3.jpg
```
But going to MyWebsite.com/About gave it an extra slash on the end. I decided to go with the solution of creating a file called about in my home directory:
```
images
image1.jpg
image2.jpg
header.ht... | 2013/10/02 | [
"https://Stackoverflow.com/questions/19142546",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/561395/"
] | Your problem is that your web server does not recognize the filename "about" as a php document. You have three options
1. Use a ".php" extension on your page document, such as "index.php" which will run your php scripting.
2. Install a solution such as mod\_rewrite that will translate urls such as /about to a file act... | About the `mywebsite.com/about` issue, it's more an Apache configuration issue. You have to tell Apache that index.php should be an index file. |
19,142,546 | I had this setup:
```
images
image1.jpg
image2.jpg
header.html
about
index.php
image3.jpg
```
But going to MyWebsite.com/About gave it an extra slash on the end. I decided to go with the solution of creating a file called about in my home directory:
```
images
image1.jpg
image2.jpg
header.ht... | 2013/10/02 | [
"https://Stackoverflow.com/questions/19142546",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/561395/"
] | Your problem is that your web server does not recognize the filename "about" as a php document. You have three options
1. Use a ".php" extension on your page document, such as "index.php" which will run your php scripting.
2. Install a solution such as mod\_rewrite that will translate urls such as /about to a file act... | First, you can configure your Apache (or IIS) to use whatever Extensions to process PHP-Code.
You can define `.ThisIsAPHPFile` as valid extension, if you want.
However, Directorys are always reflected with a trailing `/`: `www.example.com/dir1/` (Browsers not always showing the trailing `/`) while files have an extens... |
19,142,546 | I had this setup:
```
images
image1.jpg
image2.jpg
header.html
about
index.php
image3.jpg
```
But going to MyWebsite.com/About gave it an extra slash on the end. I decided to go with the solution of creating a file called about in my home directory:
```
images
image1.jpg
image2.jpg
header.ht... | 2013/10/02 | [
"https://Stackoverflow.com/questions/19142546",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/561395/"
] | Your problem is that your web server does not recognize the filename "about" as a php document. You have three options
1. Use a ".php" extension on your page document, such as "index.php" which will run your php scripting.
2. Install a solution such as mod\_rewrite that will translate urls such as /about to a file act... | If you edit your virtualhost directive in your apache conf file, you can add the following:
```
DefaultType application/x-httpd-php
```
This will tell apache to send web paths that do not end in an extension to render using the php engine.
Therefore, /about would act as if it was about.php. Another potentially mor... |
7,851,036 | Is there any way to set my `base_url()` from my controller's ?
OR Can I set my `base_url` `Dynamic` ?
How can I achieved this ? | 2011/10/21 | [
"https://Stackoverflow.com/questions/7851036",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/676755/"
] | After Searching i found the solution .
yes we can change the base\_url from our controller as
```
$this->config->set_item('base_url','http://example.com/xyz') ;
```
Ref: [User Guide](http://ellislab.com/codeigniter/user-guide/libraries/config.html)
May this answer should help some one . | The base url is set in your config file, so you can update the $config variable from your controllers before you call `base_url()`.
<http://codeigniter.com/forums/viewthread/60181/>
**EDIT**
Of course, I haven't tested this, so don't know if the overwrite will actually work as expected.
You could always extend the ... |
7,851,036 | Is there any way to set my `base_url()` from my controller's ?
OR Can I set my `base_url` `Dynamic` ?
How can I achieved this ? | 2011/10/21 | [
"https://Stackoverflow.com/questions/7851036",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/676755/"
] | After Searching i found the solution .
yes we can change the base\_url from our controller as
```
$this->config->set_item('base_url','http://example.com/xyz') ;
```
Ref: [User Guide](http://ellislab.com/codeigniter/user-guide/libraries/config.html)
May this answer should help some one . | OK, so this was fun, but it might not work right and/or break all kinds of other stuff. But, if you make these changes in the relevant files, you can have multiple base url config settings in the config file like so:
```
$config['base_url']['default'] = 'http://firstbase.xyz';
$config['base_url']['otherbase'] = 'h... |
57,200,052 | **Target** : if the **8th (or n of )** of character in string **match condition**, **then update in new column**
**By word in a single string :**
```
# if i want to check the 3rd character
IN[0]: s = "apple"
s[2]
OUT[0]: 'p'
```
**Code** :
```
tt = pd.DataFrame({"CC":["T020203J71500","Y020203K71500","T02... | 2019/07/25 | [
"https://Stackoverflow.com/questions/57200052",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/8935953/"
] | Use Regex.
**Ex:**
```
import re
s = "2019-07-25 15:23:13 [Thread-0] DEBUG - Serial : INFO: QQQ=00000D00001111 AAA=8 BBB=0 CCC=0 DDD=1.08% XXX=2401"
m = re.search(r"DDD=(.*?)%", s) #if you want it to be strict and get only ints use r"DDD=(\d+\.?\d*)%"
if m:
print(m.group(1))
```
**Output:**
```
1.08
``` | Here's an option which uses `split` twice rather than regex. It's not terribly flexible though and can easily break if the input format changes slightly. You can decide which option is best for your use case.
```
s = "2019-07-25 15:23:13 [Thread-0] DEBUG - Serial : INFO: QQQ=00000D00001111 AAA=8 BBB=0 CCC=0 DDD=1.08%... |
57,200,052 | **Target** : if the **8th (or n of )** of character in string **match condition**, **then update in new column**
**By word in a single string :**
```
# if i want to check the 3rd character
IN[0]: s = "apple"
s[2]
OUT[0]: 'p'
```
**Code** :
```
tt = pd.DataFrame({"CC":["T020203J71500","Y020203K71500","T02... | 2019/07/25 | [
"https://Stackoverflow.com/questions/57200052",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/8935953/"
] | Use Regex.
**Ex:**
```
import re
s = "2019-07-25 15:23:13 [Thread-0] DEBUG - Serial : INFO: QQQ=00000D00001111 AAA=8 BBB=0 CCC=0 DDD=1.08% XXX=2401"
m = re.search(r"DDD=(.*?)%", s) #if you want it to be strict and get only ints use r"DDD=(\d+\.?\d*)%"
if m:
print(m.group(1))
```
**Output:**
```
1.08
``` | To match *all the data between DDD= and %*:
```
import re
test_str = "2019-07-25 15:23:13 [Thread-0] DEBUG - Serial : INFO: QQQ=00000D00001111 AAA=8 BBB=0 CCC=0 DDD=1.08% XXX=2401"
m = re.search(r"DDD=([^%]+)%", test_str)
ddd = m.group(1) if m else m
print(ddd) # 1.08
``` |
57,200,052 | **Target** : if the **8th (or n of )** of character in string **match condition**, **then update in new column**
**By word in a single string :**
```
# if i want to check the 3rd character
IN[0]: s = "apple"
s[2]
OUT[0]: 'p'
```
**Code** :
```
tt = pd.DataFrame({"CC":["T020203J71500","Y020203K71500","T02... | 2019/07/25 | [
"https://Stackoverflow.com/questions/57200052",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/8935953/"
] | Use Regex.
**Ex:**
```
import re
s = "2019-07-25 15:23:13 [Thread-0] DEBUG - Serial : INFO: QQQ=00000D00001111 AAA=8 BBB=0 CCC=0 DDD=1.08% XXX=2401"
m = re.search(r"DDD=(.*?)%", s) #if you want it to be strict and get only ints use r"DDD=(\d+\.?\d*)%"
if m:
print(m.group(1))
```
**Output:**
```
1.08
``` | Use string find operation:
**Example**
```
my_string="2019-07-25 15:23:13 [Thread-0] DEBUG - Serial : INFO: QQQ=00000D00001111 AAA=8 BBB=0 CCC=0 DDD=1.08% XXX=2401"
fst = my_string.find("DDD=")
snd = my_string.find("%")
if fst >= 0 and snd >= 0
print(my_string[fst+4,snd])
```
**Output**
```
1.08
```
Or you ... |
57,200,052 | **Target** : if the **8th (or n of )** of character in string **match condition**, **then update in new column**
**By word in a single string :**
```
# if i want to check the 3rd character
IN[0]: s = "apple"
s[2]
OUT[0]: 'p'
```
**Code** :
```
tt = pd.DataFrame({"CC":["T020203J71500","Y020203K71500","T02... | 2019/07/25 | [
"https://Stackoverflow.com/questions/57200052",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/8935953/"
] | Use Regex.
**Ex:**
```
import re
s = "2019-07-25 15:23:13 [Thread-0] DEBUG - Serial : INFO: QQQ=00000D00001111 AAA=8 BBB=0 CCC=0 DDD=1.08% XXX=2401"
m = re.search(r"DDD=(.*?)%", s) #if you want it to be strict and get only ints use r"DDD=(\d+\.?\d*)%"
if m:
print(m.group(1))
```
**Output:**
```
1.08
``` | ```
my_string="2019-07-25 15:23:13 [Thread-0] DEBUG - Serial : INFO:
QQQ=00000D00001111 AAA=8 BBB=0 CCC=0 DDD=1.08% XXX=2401"
output1 = print(my_string.split("DDD=")[1][:5])
#output1 =1.08%
#output2 = print(my_string.split("DDD=")[1][:4])
#output2 =1.08
``` |
420,361 | My Exchange Server 2003 (running on Windows Server 2003) fails at around 04:54 on a regular basis, though not necessarily every day.
By "fails" I mean that my colleagues try and check their emails and Outlook says "outlook is not connected to exchange." Since outlook tries to update the email every 3 minutes or so, an... | 2012/08/23 | [
"https://serverfault.com/questions/420361",
"https://serverfault.com",
"https://serverfault.com/users/110917/"
] | **Question:**
a) What version of exchange 2003 are you using ? Standard or Enterprise
b) Is this part of SBS2003 or a stand alone exchange.
**Suggestions:**
1) Can you navigate to this path in registry.
HKEY\_LOCAL\_MACHINE\System\CurrentControlSet\Services\MSExchangeIS\Server name\Private-Mailbox Store GUID
Che... | Try looking in the Event Viewer if something occurs around the time it fails each time.
Hit Start -> Run -> type eventvwr in the Run box to open the Event Viewer, check the events under System and Application logs.
In addition, if you have a monitoring application such as HP openview or Centerity you can create a busi... |
420,361 | My Exchange Server 2003 (running on Windows Server 2003) fails at around 04:54 on a regular basis, though not necessarily every day.
By "fails" I mean that my colleagues try and check their emails and Outlook says "outlook is not connected to exchange." Since outlook tries to update the email every 3 minutes or so, an... | 2012/08/23 | [
"https://serverfault.com/questions/420361",
"https://serverfault.com",
"https://serverfault.com/users/110917/"
] | Try looking in the Event Viewer if something occurs around the time it fails each time.
Hit Start -> Run -> type eventvwr in the Run box to open the Event Viewer, check the events under System and Application logs.
In addition, if you have a monitoring application such as HP openview or Centerity you can create a busi... | Yeah, SP2 might do it. If you still have issues, Google for "exchange 2003 sp2 hotfix" and see if any of them are relevant to your problem. Another workaround is to set the Exchange Information Store to automatically restart after a failure in services.msc (if that's the service that's failing), but this doesn't fix th... |
420,361 | My Exchange Server 2003 (running on Windows Server 2003) fails at around 04:54 on a regular basis, though not necessarily every day.
By "fails" I mean that my colleagues try and check their emails and Outlook says "outlook is not connected to exchange." Since outlook tries to update the email every 3 minutes or so, an... | 2012/08/23 | [
"https://serverfault.com/questions/420361",
"https://serverfault.com",
"https://serverfault.com/users/110917/"
] | **Question:**
a) What version of exchange 2003 are you using ? Standard or Enterprise
b) Is this part of SBS2003 or a stand alone exchange.
**Suggestions:**
1) Can you navigate to this path in registry.
HKEY\_LOCAL\_MACHINE\System\CurrentControlSet\Services\MSExchangeIS\Server name\Private-Mailbox Store GUID
Che... | Are you still able to ping the box after this happens or does it become completely unresponsive? Any backups running during that time? Is this server a dedicated Exchange server or does it have other functions?
Otherwise, I agree witi Itai, you should cross reference the the event logs with the time in which your mach... |
420,361 | My Exchange Server 2003 (running on Windows Server 2003) fails at around 04:54 on a regular basis, though not necessarily every day.
By "fails" I mean that my colleagues try and check their emails and Outlook says "outlook is not connected to exchange." Since outlook tries to update the email every 3 minutes or so, an... | 2012/08/23 | [
"https://serverfault.com/questions/420361",
"https://serverfault.com",
"https://serverfault.com/users/110917/"
] | Are you still able to ping the box after this happens or does it become completely unresponsive? Any backups running during that time? Is this server a dedicated Exchange server or does it have other functions?
Otherwise, I agree witi Itai, you should cross reference the the event logs with the time in which your mach... | Yeah, SP2 might do it. If you still have issues, Google for "exchange 2003 sp2 hotfix" and see if any of them are relevant to your problem. Another workaround is to set the Exchange Information Store to automatically restart after a failure in services.msc (if that's the service that's failing), but this doesn't fix th... |
420,361 | My Exchange Server 2003 (running on Windows Server 2003) fails at around 04:54 on a regular basis, though not necessarily every day.
By "fails" I mean that my colleagues try and check their emails and Outlook says "outlook is not connected to exchange." Since outlook tries to update the email every 3 minutes or so, an... | 2012/08/23 | [
"https://serverfault.com/questions/420361",
"https://serverfault.com",
"https://serverfault.com/users/110917/"
] | **Question:**
a) What version of exchange 2003 are you using ? Standard or Enterprise
b) Is this part of SBS2003 or a stand alone exchange.
**Suggestions:**
1) Can you navigate to this path in registry.
HKEY\_LOCAL\_MACHINE\System\CurrentControlSet\Services\MSExchangeIS\Server name\Private-Mailbox Store GUID
Che... | Yeah, SP2 might do it. If you still have issues, Google for "exchange 2003 sp2 hotfix" and see if any of them are relevant to your problem. Another workaround is to set the Exchange Information Store to automatically restart after a failure in services.msc (if that's the service that's failing), but this doesn't fix th... |
58,507,602 | Is it possible to limit the new widget Page Selector by a given page type? I know you can set it to load a specific path using EditingComponentProperty(nameof(PageSelectorProperties.RootPath) but can't see a way to limit by page type. | 2019/10/22 | [
"https://Stackoverflow.com/questions/58507602",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/417792/"
] | Currently there isn't, just by path i'm afraid. Not sure if Kentico is working on it, it would be nice to have as we have run into the same thing. | You could always add a new widget property
**In your model properties class**
```
[EditingComponent(TextInputComponent.IDENTIFIER, Order = 0, Label = "Page Selector Class")]
public string PageSelectorClass { get; set; }
```
**In your controller**
```
var pages = DocumentHelper.GetDocuments(GetProperties().PageSele... |
56,060,579 | Is there any way in which I can say, define a URI that will be used in different .yml files for different Artillery load tests?
I am wanting to use the same URI within a number of .yml files to define the `target` within the `config` section.
I saw the following on the [Artillery docs](https://artillery.io/docs/scrip... | 2019/05/09 | [
"https://Stackoverflow.com/questions/56060579",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3061047/"
] | Figured this out on my own:
In package.json make a new script. Call it whatever you like, and do something similar to this:
```
"scripts": {
"start": "set ENV=https://yoursite.com&&artillery run -k yourtest.yml"
}
```
in the .yml file itself something like this:
```
config:
target: "{{$processEnvironment.ENV... | IDK why but for me export worked, I mean:
```
"scripts": {
"start": "export ENV=https://yoursite.com&&artillery run -k yourtest.yml"
}
``` |
56,060,579 | Is there any way in which I can say, define a URI that will be used in different .yml files for different Artillery load tests?
I am wanting to use the same URI within a number of .yml files to define the `target` within the `config` section.
I saw the following on the [Artillery docs](https://artillery.io/docs/scrip... | 2019/05/09 | [
"https://Stackoverflow.com/questions/56060579",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3061047/"
] | Figured this out on my own:
In package.json make a new script. Call it whatever you like, and do something similar to this:
```
"scripts": {
"start": "set ENV=https://yoursite.com&&artillery run -k yourtest.yml"
}
```
in the .yml file itself something like this:
```
config:
target: "{{$processEnvironment.ENV... | Something perhaps not very sophisticated but that works is this:
```
config:
target: "https:/"
```
Then in the url you can put the rest of the URL for each cases
```
- get:
url: "/myUrl1.com"
- get:
url: "/myUrl2.com"
``` |
30,273,712 | I am using RadGrid with Nested Hierarchy of Master/Detail Tables. I want to Expand the Master Row when the detail Table inside the row has few rows. I am trying to achieve the same using below code
```
Private Sub RadGrid_ItemDataBound(ByVal sender As System.Object, ByVal e As Telerik.Web.UI.GridItemEventArgs) Handl... | 2015/05/16 | [
"https://Stackoverflow.com/questions/30273712",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2126643/"
] | You can do something like this:
```
foreach($a as $k1=>$ar1){
$text = '';
foreach($ar1 as $t){
$text .= "{$t['Name']}, ";
}
unset($a[$k1]);
$a[$k1][0]['Name'] = substr($text,0,-2);
}
var_dump($a);
```
Output:
```
array (size=2)
0 =>
array (size=1)
0 =>
... | This can be solved succinctly with one loop and the implosion of the columnar values in each subarray.
Code ([Demo](https://3v4l.org/MbG6A))
```
$a = [
[['Name' => 'kumar'],['Name' => 'siva']],
[['Name' => 'Arun'],['Name' => 'Prem']]
];
foreach ($a as $i => $group) {
$result[$i][] = ['Name... |
673,903 | We have a "test bed system" of 4 servers only (not 7).
How do we get this to work with
<http://www.ubuntu.com/download/cloud/install-ubuntu-openstack> using only 4 servers? | 2015/09/14 | [
"https://askubuntu.com/questions/673903",
"https://askubuntu.com",
"https://askubuntu.com/users/450673/"
] | Use the following command to edit the following file:
```
sudo nano /usr/share/glib-2.0/schemas/10_unity_greeter_background.gschema.override
```
Then copy and paste this into the file and replace `/foo/wallpaper.png` with the actual path to the actual file you would like to use for wallpaper (remember to put it in '... | It was a permissions issue. Set the login screen to an image with permissions for only one user. Made it readable across all and now it works! |
2,626,480 | I have a bit of an issue with a site I maintain. I have been asked to add a report to a page that sits in a jsp page. The reporting information comes from a MySQL database. The problem is to connect the jsp to the database would require added functions to code that I do not have the original source of. I thought about ... | 2010/04/13 | [
"https://Stackoverflow.com/questions/2626480",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/196420/"
] | You can use the JSTL
```
<c:import url="report.php"/>
```
to include the results of executing the PHP page. | ```
<script language="php">
include_once ('report.php');
</script>
``` |
278,357 | How can I set variables to be used in scripts as well? They don't have to be global / system-wide, just the current session is sufficient. But for some reason they seem gone even if I run a script right from my current terminal.
Example:
```bash
foo=bar
echo "$foo"
```
output: `bar`
However if test.sh contains `ec... | 2016/04/22 | [
"https://unix.stackexchange.com/questions/278357",
"https://unix.stackexchange.com",
"https://unix.stackexchange.com/users/110067/"
] | `export foo=bar` will set the global variable $foo to bar. You can also use `foo=bar ./test.sh` as a single command to set foo to bar for test.sh. | You can run the assignment and echo test script in the same shell.
```
root@ijaz-HP-EliteBook-8560p:~# export foo=bar
root@ijaz-HP-EliteBook-8560p:~# cat test.sh
#!/bin/bash
echo "$foo"
root@ijaz-HP-EliteBook-8560p:~# ./test.sh
bar
```
this is just one way of doing it. |
278,357 | How can I set variables to be used in scripts as well? They don't have to be global / system-wide, just the current session is sufficient. But for some reason they seem gone even if I run a script right from my current terminal.
Example:
```bash
foo=bar
echo "$foo"
```
output: `bar`
However if test.sh contains `ec... | 2016/04/22 | [
"https://unix.stackexchange.com/questions/278357",
"https://unix.stackexchange.com",
"https://unix.stackexchange.com/users/110067/"
] | `export foo=bar` will set the global variable $foo to bar. You can also use `foo=bar ./test.sh` as a single command to set foo to bar for test.sh. | When you run your shell script, it executes in a new shell instance, and does not inherit any variables instantiated in the interactive shell instance.
Specific variables can be inherited this way, called environment variables. You make a variable assignment an environment variable by using `export`, such as `export f... |
278,357 | How can I set variables to be used in scripts as well? They don't have to be global / system-wide, just the current session is sufficient. But for some reason they seem gone even if I run a script right from my current terminal.
Example:
```bash
foo=bar
echo "$foo"
```
output: `bar`
However if test.sh contains `ec... | 2016/04/22 | [
"https://unix.stackexchange.com/questions/278357",
"https://unix.stackexchange.com",
"https://unix.stackexchange.com/users/110067/"
] | `export foo=bar` will set the global variable $foo to bar. You can also use `foo=bar ./test.sh` as a single command to set foo to bar for test.sh. | Another option could be to pass the variable to your script as an argument.
```
foo=bar
./test.sh $foo
```
The issue then becomes the contents of ./test.sh
It would have to `echo $1` instead of `echo $foo` - the $1 indicating the first argument passed to the script. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.