qid int64 1 74.7M | question stringlengths 15 58.3k | date stringlengths 10 10 | metadata list | response_j stringlengths 4 30.2k | response_k stringlengths 11 36.5k |
|---|---|---|---|---|---|
5,089,065 | I want to remove all the prepositions(in, at, on...), definite articles(a, an ,the...) and be verbs(is, are, was...) from a article. Is there a short way that php can do that?
```
$article= "the cup is on the table";// I want get an echo like "cup table"
``` | 2011/02/23 | [
"https://Stackoverflow.com/questions/5089065",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/547726/"
] | Yup, simply call a str\_ireplace()
```
$banned = array(' a ', ' an ', ' the '); //add more words as you want. KEEP THE SPACE around the word
$article = 'The cup is on the table';
$clear = str_ireplace($banned, ' ', $article); //replaced with a space for now. put something else if you want
```
$clear will now be $a... | You can use [str\_ireplace()](http://php.net/manual/en/function.str-ireplace.php), create an array with the words you want gone and use `str_ireplace($prepArr,'',$str);` |
5,089,065 | I want to remove all the prepositions(in, at, on...), definite articles(a, an ,the...) and be verbs(is, are, was...) from a article. Is there a short way that php can do that?
```
$article= "the cup is on the table";// I want get an echo like "cup table"
``` | 2011/02/23 | [
"https://Stackoverflow.com/questions/5089065",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/547726/"
] | The key thing is to ensure you only replace whole words (e.g. not the "the" in "there"), for which you can use `\b` in PCRE:
```
$words = array('in', 'at', 'on', 'etc..');
$pattern = '/\b(?:' . join('|', $words) . ')\b/i';
$article = preg_replace($pattern, '', $article);
```
Caveat 1: If you have a very large number... | You can use [str\_ireplace()](http://php.net/manual/en/function.str-ireplace.php), create an array with the words you want gone and use `str_ireplace($prepArr,'',$str);` |
5,089,065 | I want to remove all the prepositions(in, at, on...), definite articles(a, an ,the...) and be verbs(is, are, was...) from a article. Is there a short way that php can do that?
```
$article= "the cup is on the table";// I want get an echo like "cup table"
``` | 2011/02/23 | [
"https://Stackoverflow.com/questions/5089065",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/547726/"
] | The key thing is to ensure you only replace whole words (e.g. not the "the" in "there"), for which you can use `\b` in PCRE:
```
$words = array('in', 'at', 'on', 'etc..');
$pattern = '/\b(?:' . join('|', $words) . ')\b/i';
$article = preg_replace($pattern, '', $article);
```
Caveat 1: If you have a very large number... | ```
str_replace(Array(' in ', ' at ', ' on ', ' a ', ' an ', ' the '), '', $article);
```
Edit: better, using preg\_replace:
```
$article = 'The cup is on the table.The theble aon is';
echo "<br/>". ($article = preg_replace("/(\W|^)(is|on|a|the)(\W|$)/i", ' ', $article));
echo "<br/>". ($article = preg_replace("/(\W... |
5,089,065 | I want to remove all the prepositions(in, at, on...), definite articles(a, an ,the...) and be verbs(is, are, was...) from a article. Is there a short way that php can do that?
```
$article= "the cup is on the table";// I want get an echo like "cup table"
``` | 2011/02/23 | [
"https://Stackoverflow.com/questions/5089065",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/547726/"
] | ```
str_replace(Array(' in ', ' at ', ' on ', ' a ', ' an ', ' the '), '', $article);
```
Edit: better, using preg\_replace:
```
$article = 'The cup is on the table.The theble aon is';
echo "<br/>". ($article = preg_replace("/(\W|^)(is|on|a|the)(\W|$)/i", ' ', $article));
echo "<br/>". ($article = preg_replace("/(\W... | I found a useful solution, try below code or you can add your words in $commonWords array.
```
function removeCommonWords($input){
$commonWords = array('a','able','about','above','abroad','according','accordingly','across','actually','adj','after','afterwards','again','against','ago','ahead','ain\'t','all','allow... |
5,089,065 | I want to remove all the prepositions(in, at, on...), definite articles(a, an ,the...) and be verbs(is, are, was...) from a article. Is there a short way that php can do that?
```
$article= "the cup is on the table";// I want get an echo like "cup table"
``` | 2011/02/23 | [
"https://Stackoverflow.com/questions/5089065",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/547726/"
] | The key thing is to ensure you only replace whole words (e.g. not the "the" in "there"), for which you can use `\b` in PCRE:
```
$words = array('in', 'at', 'on', 'etc..');
$pattern = '/\b(?:' . join('|', $words) . ')\b/i';
$article = preg_replace($pattern, '', $article);
```
Caveat 1: If you have a very large number... | I found a useful solution, try below code or you can add your words in $commonWords array.
```
function removeCommonWords($input){
$commonWords = array('a','able','about','above','abroad','according','accordingly','across','actually','adj','after','afterwards','again','against','ago','ahead','ain\'t','all','allow... |
5,135,723 | In the past i've used .load() to load data into a specific DIV on the page.
I want to run a PHP script, and pass it some parameters in the query string, then print the result in the page.
It would go someting like this, where I have RESULT OF SCRIPT I want to run the script, and pass it parameters, then print the res... | 2011/02/27 | [
"https://Stackoverflow.com/questions/5135723",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/384529/"
] | I'm going to assume that what's desired is a way to do this in the middle of the page:
```
<div>
Blah blah content content
<script src='magic.js'></script>
Blah blah more content
```
such that the script runs and the result on the page is
```
<div>
Blah blah content content
<div class='wow-I... | Don't rely on jquery for everything. What you are looking for is `document.write()`. Use `.ajax` to get the content then `document.write()` to output it. It'll be output immediately after the script tag containing the function call. |
5,135,723 | In the past i've used .load() to load data into a specific DIV on the page.
I want to run a PHP script, and pass it some parameters in the query string, then print the result in the page.
It would go someting like this, where I have RESULT OF SCRIPT I want to run the script, and pass it parameters, then print the res... | 2011/02/27 | [
"https://Stackoverflow.com/questions/5135723",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/384529/"
] | I'm going to assume that what's desired is a way to do this in the middle of the page:
```
<div>
Blah blah content content
<script src='magic.js'></script>
Blah blah more content
```
such that the script runs and the result on the page is
```
<div>
Blah blah content content
<div class='wow-I... | You need a placeholder somewhere in the equation. You can use a selector and the append method to add something to a DOM element. It can be by ID, class, or tag.
```
$(document).ready(function() {
$.ajax( {
...
success: function(data) { $("#some_id").append(data); }
// OR to append to t... |
32,500,474 | I recently started studying webdevelopment and for the first project we have to make a very simple login and registration function. now I got somewhere but suddenly I started getting this error.
>
> Unable to jump to row 0 on MySQL result index 4.
>
>
>
This is the code where I get the error.
```
$conn = mysql_c... | 2015/09/10 | [
"https://Stackoverflow.com/questions/32500474",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5320956/"
] | It is possible that this row:
```
password = mysql_result($result, 0);
```
Cannot get rows when it does not match anything which is why you get the error.
Try instead:
```
if( $password = mysql_fetch_assoc($result) ) {
echo $password['password'];
} else {
echo 'no match';
}
```
See if that helps.
Howeve... | Change this:
```
$select_password = "SELECT `password` FROM `members` WHERE `username` = '$login_user'";
```
Into this:
```
$select_password = "SELECT password FROM members WHERE username = '$login_user'";
``` |
32,500,474 | I recently started studying webdevelopment and for the first project we have to make a very simple login and registration function. now I got somewhere but suddenly I started getting this error.
>
> Unable to jump to row 0 on MySQL result index 4.
>
>
>
This is the code where I get the error.
```
$conn = mysql_c... | 2015/09/10 | [
"https://Stackoverflow.com/questions/32500474",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5320956/"
] | It is possible that this row:
```
password = mysql_result($result, 0);
```
Cannot get rows when it does not match anything which is why you get the error.
Try instead:
```
if( $password = mysql_fetch_assoc($result) ) {
echo $password['password'];
} else {
echo 'no match';
}
```
See if that helps.
Howeve... | I suggest to work with [PDO](http://php.net/manual/en/book.pdo.php), instead of mysql\_... functions.
Not only because it's newer and object oriented but also because mysql... is deprecated.
So my answer is with PDO
From your code example I assume you have variables of servername, database, username & password. So ... |
32,500,474 | I recently started studying webdevelopment and for the first project we have to make a very simple login and registration function. now I got somewhere but suddenly I started getting this error.
>
> Unable to jump to row 0 on MySQL result index 4.
>
>
>
This is the code where I get the error.
```
$conn = mysql_c... | 2015/09/10 | [
"https://Stackoverflow.com/questions/32500474",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5320956/"
] | It is possible that this row:
```
password = mysql_result($result, 0);
```
Cannot get rows when it does not match anything which is why you get the error.
Try instead:
```
if( $password = mysql_fetch_assoc($result) ) {
echo $password['password'];
} else {
echo 'no match';
}
```
See if that helps.
Howeve... | Thanks alot for the help :) out of these answers I got everything I needed and now I am also going to switch to PDO for the final release though I am gonna stay with MySQL for now since I have to turn it in by monday.
Thanks alot :) |
32,500,474 | I recently started studying webdevelopment and for the first project we have to make a very simple login and registration function. now I got somewhere but suddenly I started getting this error.
>
> Unable to jump to row 0 on MySQL result index 4.
>
>
>
This is the code where I get the error.
```
$conn = mysql_c... | 2015/09/10 | [
"https://Stackoverflow.com/questions/32500474",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5320956/"
] | I suggest to work with [PDO](http://php.net/manual/en/book.pdo.php), instead of mysql\_... functions.
Not only because it's newer and object oriented but also because mysql... is deprecated.
So my answer is with PDO
From your code example I assume you have variables of servername, database, username & password. So ... | Change this:
```
$select_password = "SELECT `password` FROM `members` WHERE `username` = '$login_user'";
```
Into this:
```
$select_password = "SELECT password FROM members WHERE username = '$login_user'";
``` |
32,500,474 | I recently started studying webdevelopment and for the first project we have to make a very simple login and registration function. now I got somewhere but suddenly I started getting this error.
>
> Unable to jump to row 0 on MySQL result index 4.
>
>
>
This is the code where I get the error.
```
$conn = mysql_c... | 2015/09/10 | [
"https://Stackoverflow.com/questions/32500474",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5320956/"
] | Thanks alot for the help :) out of these answers I got everything I needed and now I am also going to switch to PDO for the final release though I am gonna stay with MySQL for now since I have to turn it in by monday.
Thanks alot :) | Change this:
```
$select_password = "SELECT `password` FROM `members` WHERE `username` = '$login_user'";
```
Into this:
```
$select_password = "SELECT password FROM members WHERE username = '$login_user'";
``` |
32,500,474 | I recently started studying webdevelopment and for the first project we have to make a very simple login and registration function. now I got somewhere but suddenly I started getting this error.
>
> Unable to jump to row 0 on MySQL result index 4.
>
>
>
This is the code where I get the error.
```
$conn = mysql_c... | 2015/09/10 | [
"https://Stackoverflow.com/questions/32500474",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5320956/"
] | I suggest to work with [PDO](http://php.net/manual/en/book.pdo.php), instead of mysql\_... functions.
Not only because it's newer and object oriented but also because mysql... is deprecated.
So my answer is with PDO
From your code example I assume you have variables of servername, database, username & password. So ... | Thanks alot for the help :) out of these answers I got everything I needed and now I am also going to switch to PDO for the final release though I am gonna stay with MySQL for now since I have to turn it in by monday.
Thanks alot :) |
65,202,246 | I have created an event in the outlook calendar. The event contains Teams join link.
While I am updating the event from MS Graph API, the join button is being removed.
Here is the sample code of what I am doing:
```
void UpdateEventInCalendar(string eventId)
{
var getCalEvent = Task.Run(() =>
{
... | 2020/12/08 | [
"https://Stackoverflow.com/questions/65202246",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/8542211/"
] | As a workaround you can try this to keep your online meeting appeared:
First: in your addEvent function, your body should be like this
```
AddedEvent.Body = new ItemBody
{
ContentType = BodyType.Html,
Content = "<p id = 'MsgContent'>Your Body</p>"
};
```
Secon... | Try not updating the body and you will be able to make it work. See this [thread](https://github.com/microsoftgraph/microsoft-graph-docs/issues/10618). Yes, if you update the body without isonlinemeeting, the teams meeting blob will be removed and this makes the isonlinemeeting property to false and we are loosing the ... |
65,202,246 | I have created an event in the outlook calendar. The event contains Teams join link.
While I am updating the event from MS Graph API, the join button is being removed.
Here is the sample code of what I am doing:
```
void UpdateEventInCalendar(string eventId)
{
var getCalEvent = Task.Run(() =>
{
... | 2020/12/08 | [
"https://Stackoverflow.com/questions/65202246",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/8542211/"
] | As a workaround you can try this to keep your online meeting appeared:
First: in your addEvent function, your body should be like this
```
AddedEvent.Body = new ItemBody
{
ContentType = BodyType.Html,
Content = "<p id = 'MsgContent'>Your Body</p>"
};
```
Secon... | I faced the same issue and I got out with this solution, hope it helps.
You create an online event through the API with an empty body. The response from the server contains the HTML body with the join link and you store it. Then, if you update the event preserving all the online meeting related content, the event keep... |
55,290,714 | I noticed that some charts have other charts embedded within them. For example, <https://github.ibm.com/IBMPrivateCloud/charts/tree/master/stable/ibm-dsm-dev> includes an embedded chart for db2.
I was hoping to set a value for the embedded chart from the command line using a `--set` argument, but unfortunately it seem... | 2019/03/21 | [
"https://Stackoverflow.com/questions/55290714",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/161022/"
] | Yes, you can set subchart values using a --set. Use `--set subchartName.key=value`.
Please see [overriding values of a child chart](https://github.com/helm/helm/blob/master/docs/chart_template_guide/subcharts_and_globals.md#overriding-values-of-a-child-chart)
**Chart.yaml**
```
apiVersion: v1
appVersion: "0.1.0"
des... | You can, i.e. if the requirement is db2 and you want to set a custom image, it would be `db2.image=whatever`
If you are using an alias for your requirement, then use the alias name instead of `db2` |
36,577,800 | We're trying to load our events to Full Calendar from a URL, but the events won't load. I've included th JS below, as well the JSON response from our URL/API.
Thanks so much!
URL/API JSON Response:
```
[{"start":"2016-04-012T15:30:00","end":"2016-04-12T16:30:00","title":"Calendar 1","allDay":"false","id":"a41380d1... | 2016/04/12 | [
"https://Stackoverflow.com/questions/36577800",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6010777/"
] | It makes sense.
The most significant part of the error message is
>
> Terminating app due to uncaught exception 'NSInternalInconsistencyException',
>
>
> reason: '**Invalid size {0, 0} for item < UIView**: 0x7fdab1d34010; frame = (0 0; 0 0)
>
>
>
You have to use the designated initializer of `UIView`
```
init... | I think what you're missing here is that when you do `var ball = Block(frame: CGRect(x: 197, y: 614, width: 30, height: 30))` in your `createBall()` function you are creating a new view that has no relation to your `ball` property.
Then, when you add your behavior to your `ball` property, it is referring to the proper... |
251,604 | I see some strange behavior with lightning:isUrlAddressable tab.
When I try to enter the parameter after loading the page immediately parameter is removed from the URL and component is not able to find the param value.
**Simple Cmp:**
```
<aura:component implements="lightning:isUrlAddressable,force:appHostable" acce... | 2019/02/25 | [
"https://salesforce.stackexchange.com/questions/251604",
"https://salesforce.stackexchange.com",
"https://salesforce.stackexchange.com/users/37020/"
] | Here I found it in the document that we should add default namespace C\_\_ to the parameters.
```
lightning/n/Test_Cmp?c__accname=ajay
```
This worked for me. | Well this is some fun stuff.
Although the documentation says you have to add "c\_\_" to component name, I had the same issue when I didn't add "c\_\_" to the param names.
For example:
```
https://<Instance>.lightning.force.com/lightning/cmp/c__CheckInCheckOut?step=123
```
Was loading the page without any parameter ... |
60,387,393 | Given this table of data:

I'd like to produce this pivot table:

I have an inkling this can be done with the calculated field, and SUMIF, but am not able to get it to work. I think the main blocker is that I'... | 2020/02/25 | [
"https://Stackoverflow.com/questions/60387393",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/8423798/"
] | ```
={QUERY(A1:B25,"select A,count(A)/"&COUNT(A:A)&" where B='RED' group by A label count(A)/"&COUNT(A:A)&" 'PCT RED'");{"Grand Total",COUNTIFS(A:A,">=0",B:B,"RED")/COUNT(A:A)}}
```
[enter image description here](https://i.stack.imgur.com/NI0Yq.png)
-------------------------------------------------------------------
... | >
> I think my concern here would be that with a normal pivot table it's robust against data moving around. This seems to break that by referencing specific columns
>
>
>
to "set it free" you can do:
```
={QUERY({A:B},
"select Col1,count(Col1)/"&COUNT(A:A)&"
where Col2='RED'
group by Col1
label count(Co... |
9,198,502 | Even though the sun.audio API says that .wav is a supported file apparently the one that I had must not have been. a .aiff file is now working but not in this way I found a better way thats a little more complicated though.
```
String strFilename = "C:\\Documents and Settings\\gkehoe\\Network\\GIM\\Explode.aiff";
... | 2012/02/08 | [
"https://Stackoverflow.com/questions/9198502",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1102759/"
] | Symmetric encryption is indeed useless, as you have noticed; however for certain fields, using asymmetric encryption or a trapdoor function may be usable:
* if the web application does not need to read back the data, then use asymmetric encryption. This is useful e.g. for credit card data: your application would encry... | Before you can determine what crypto approach is the best, you have to think about what you are trying to protect and how much effort an attacker will be ready to put into getting the key/information from your system.
What is the attack scenario that you are trying to remedy by using crypto? A stolen database file? |
9,198,502 | Even though the sun.audio API says that .wav is a supported file apparently the one that I had must not have been. a .aiff file is now working but not in this way I found a better way thats a little more complicated though.
```
String strFilename = "C:\\Documents and Settings\\gkehoe\\Network\\GIM\\Explode.aiff";
... | 2012/02/08 | [
"https://Stackoverflow.com/questions/9198502",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1102759/"
] | If you are encrypting fields that you only need to verify (not recall), then simple hash with SHA or one-way encrypt with DES, or IDEA using a salt to prevent a rainbow table to actually reveal them. This is useful for passwords or other access secrets.
Python and webapps makes me think of GAE, so you may want somethi... | Symmetric encryption is indeed useless, as you have noticed; however for certain fields, using asymmetric encryption or a trapdoor function may be usable:
* if the web application does not need to read back the data, then use asymmetric encryption. This is useful e.g. for credit card data: your application would encry... |
9,198,502 | Even though the sun.audio API says that .wav is a supported file apparently the one that I had must not have been. a .aiff file is now working but not in this way I found a better way thats a little more complicated though.
```
String strFilename = "C:\\Documents and Settings\\gkehoe\\Network\\GIM\\Explode.aiff";
... | 2012/02/08 | [
"https://Stackoverflow.com/questions/9198502",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1102759/"
] | If you are encrypting fields that you only need to verify (not recall), then simple hash with SHA or one-way encrypt with DES, or IDEA using a salt to prevent a rainbow table to actually reveal them. This is useful for passwords or other access secrets.
Python and webapps makes me think of GAE, so you may want somethi... | Before you can determine what crypto approach is the best, you have to think about what you are trying to protect and how much effort an attacker will be ready to put into getting the key/information from your system.
What is the attack scenario that you are trying to remedy by using crypto? A stolen database file? |
1,121,149 | I basically have three tables, posts, images and postimages (this simply contains the ids of both the other tables and allows more than one image in each post and each image to be reused in multiple posts if necessary).
I'm trying to list the titles of all the posts, along with a single, small image from each (if one ... | 2009/07/13 | [
"https://Stackoverflow.com/questions/1121149",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] | ```
select
*
from
posts p
left outer join (select post_id, max(image_id) as image_id
from postimages group by post_id) pi on
p.id = pi.post_id
left outer join images im on
pi.image_id = im.image_id
```
You can do the subquery so that it only has to be executed once, not per ro... | ```
SELECT p.id,p.title,im.src
FROM posts p
LEFT JOIN postimages pi
ON p.id = pi.post_id
LEFT JOIN images im
ON pi.image_id = im.image_id
GROUP BY p.id
ORDER BY created_at
LIMIT 10
```
Not sure if this is the most efficient, you will have to run this against a inner query.
It will work only for MySql as far as I kn... |
7,001,846 | My Sencha Touch app is posting a form to my [asp.net-mvc-3](/questions/tagged/asp.net-mvc-3 "show questions tagged 'asp.net-mvc-3'") WebService, but instead of sending `POST` it's sending `OPTIONS`.
I'm reading a similar thread [here](https://stackoverflow.com/questions/4875195/problem-sending-json-data-from-jquery-to... | 2011/08/09 | [
"https://Stackoverflow.com/questions/7001846",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/124069/"
] | Turns out I had to create an `ActionFilterAttribute`
```
namespace WebService.Attributes
{
public class AllowCrossSiteJsonAttribute : ActionFilterAttribute
{
public override void OnActionExecuting(ActionExecutingContext filterContext)
{
HttpContext.Current.Response.Cache.SetCacheabi... | I tried all the answers here and none worked. I eventually realized that browsers will treat the pre-flight check as failed if it returns non 200. In my case, IIS was returning 404, even with the headers. This is because I had 2 attributes on my controller method - [HttpPost] and [HttpOptions]. Apparently, this is not ... |
7,001,846 | My Sencha Touch app is posting a form to my [asp.net-mvc-3](/questions/tagged/asp.net-mvc-3 "show questions tagged 'asp.net-mvc-3'") WebService, but instead of sending `POST` it's sending `OPTIONS`.
I'm reading a similar thread [here](https://stackoverflow.com/questions/4875195/problem-sending-json-data-from-jquery-to... | 2011/08/09 | [
"https://Stackoverflow.com/questions/7001846",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/124069/"
] | Turns out I had to create an `ActionFilterAttribute`
```
namespace WebService.Attributes
{
public class AllowCrossSiteJsonAttribute : ActionFilterAttribute
{
public override void OnActionExecuting(ActionExecutingContext filterContext)
{
HttpContext.Current.Response.Cache.SetCacheabi... | I added the following to my `<system.webServer>` config section:
```
<httpProtocol>
<customHeaders>
<add name="Access-Control-Allow-Headers" value="Content-Type, Accept, X-Requested-With"/>
<add name="Access-Control-Allow-Methods" value="GET, POST, OPTIONS"/>
<add name="Access-Control-Allow-Origin" value... |
7,001,846 | My Sencha Touch app is posting a form to my [asp.net-mvc-3](/questions/tagged/asp.net-mvc-3 "show questions tagged 'asp.net-mvc-3'") WebService, but instead of sending `POST` it's sending `OPTIONS`.
I'm reading a similar thread [here](https://stackoverflow.com/questions/4875195/problem-sending-json-data-from-jquery-to... | 2011/08/09 | [
"https://Stackoverflow.com/questions/7001846",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/124069/"
] | I added the following to my `<system.webServer>` config section:
```
<httpProtocol>
<customHeaders>
<add name="Access-Control-Allow-Headers" value="Content-Type, Accept, X-Requested-With"/>
<add name="Access-Control-Allow-Methods" value="GET, POST, OPTIONS"/>
<add name="Access-Control-Allow-Origin" value... | After struggling a lot, I found out the only way to handle CORS preflight request is to handle it with a pair of HttpModule and HttpHandler.
Sending the required headers is not enough. You have to handle the OPTIONS request early and not allow it to reach your controllers, because it will fail there.
The only way tha... |
7,001,846 | My Sencha Touch app is posting a form to my [asp.net-mvc-3](/questions/tagged/asp.net-mvc-3 "show questions tagged 'asp.net-mvc-3'") WebService, but instead of sending `POST` it's sending `OPTIONS`.
I'm reading a similar thread [here](https://stackoverflow.com/questions/4875195/problem-sending-json-data-from-jquery-to... | 2011/08/09 | [
"https://Stackoverflow.com/questions/7001846",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/124069/"
] | Turns out I had to create an `ActionFilterAttribute`
```
namespace WebService.Attributes
{
public class AllowCrossSiteJsonAttribute : ActionFilterAttribute
{
public override void OnActionExecuting(ActionExecutingContext filterContext)
{
HttpContext.Current.Response.Cache.SetCacheabi... | Just to answer the question why "OPTIONS" and not "POST", that is because the browser is implementing CORS ([Cross-origin resource sharing](http://en.wikipedia.org/wiki/Cross-origin_resource_sharing) ).
This is a two part process of sending the OPTIONS request first, then if the server replies with acceptable condition... |
7,001,846 | My Sencha Touch app is posting a form to my [asp.net-mvc-3](/questions/tagged/asp.net-mvc-3 "show questions tagged 'asp.net-mvc-3'") WebService, but instead of sending `POST` it's sending `OPTIONS`.
I'm reading a similar thread [here](https://stackoverflow.com/questions/4875195/problem-sending-json-data-from-jquery-to... | 2011/08/09 | [
"https://Stackoverflow.com/questions/7001846",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/124069/"
] | I solved this in a different way in MVC, and IIS. The reason I found this problem was because I wanted to POST data from client side javascript (which JSONP does not work for), and on top of that wanted to allow JSON data which sits inside the Content of the POST request.
In reality your code wants to ignore the first... | After struggling a lot, I found out the only way to handle CORS preflight request is to handle it with a pair of HttpModule and HttpHandler.
Sending the required headers is not enough. You have to handle the OPTIONS request early and not allow it to reach your controllers, because it will fail there.
The only way tha... |
7,001,846 | My Sencha Touch app is posting a form to my [asp.net-mvc-3](/questions/tagged/asp.net-mvc-3 "show questions tagged 'asp.net-mvc-3'") WebService, but instead of sending `POST` it's sending `OPTIONS`.
I'm reading a similar thread [here](https://stackoverflow.com/questions/4875195/problem-sending-json-data-from-jquery-to... | 2011/08/09 | [
"https://Stackoverflow.com/questions/7001846",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/124069/"
] | Turns out I had to create an `ActionFilterAttribute`
```
namespace WebService.Attributes
{
public class AllowCrossSiteJsonAttribute : ActionFilterAttribute
{
public override void OnActionExecuting(ActionExecutingContext filterContext)
{
HttpContext.Current.Response.Cache.SetCacheabi... | I solved this in a different way in MVC, and IIS. The reason I found this problem was because I wanted to POST data from client side javascript (which JSONP does not work for), and on top of that wanted to allow JSON data which sits inside the Content of the POST request.
In reality your code wants to ignore the first... |
7,001,846 | My Sencha Touch app is posting a form to my [asp.net-mvc-3](/questions/tagged/asp.net-mvc-3 "show questions tagged 'asp.net-mvc-3'") WebService, but instead of sending `POST` it's sending `OPTIONS`.
I'm reading a similar thread [here](https://stackoverflow.com/questions/4875195/problem-sending-json-data-from-jquery-to... | 2011/08/09 | [
"https://Stackoverflow.com/questions/7001846",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/124069/"
] | Just to answer the question why "OPTIONS" and not "POST", that is because the browser is implementing CORS ([Cross-origin resource sharing](http://en.wikipedia.org/wiki/Cross-origin_resource_sharing) ).
This is a two part process of sending the OPTIONS request first, then if the server replies with acceptable condition... | After struggling a lot, I found out the only way to handle CORS preflight request is to handle it with a pair of HttpModule and HttpHandler.
Sending the required headers is not enough. You have to handle the OPTIONS request early and not allow it to reach your controllers, because it will fail there.
The only way tha... |
7,001,846 | My Sencha Touch app is posting a form to my [asp.net-mvc-3](/questions/tagged/asp.net-mvc-3 "show questions tagged 'asp.net-mvc-3'") WebService, but instead of sending `POST` it's sending `OPTIONS`.
I'm reading a similar thread [here](https://stackoverflow.com/questions/4875195/problem-sending-json-data-from-jquery-to... | 2011/08/09 | [
"https://Stackoverflow.com/questions/7001846",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/124069/"
] | I solved this in a different way in MVC, and IIS. The reason I found this problem was because I wanted to POST data from client side javascript (which JSONP does not work for), and on top of that wanted to allow JSON data which sits inside the Content of the POST request.
In reality your code wants to ignore the first... | I tried all the answers here and none worked. I eventually realized that browsers will treat the pre-flight check as failed if it returns non 200. In my case, IIS was returning 404, even with the headers. This is because I had 2 attributes on my controller method - [HttpPost] and [HttpOptions]. Apparently, this is not ... |
7,001,846 | My Sencha Touch app is posting a form to my [asp.net-mvc-3](/questions/tagged/asp.net-mvc-3 "show questions tagged 'asp.net-mvc-3'") WebService, but instead of sending `POST` it's sending `OPTIONS`.
I'm reading a similar thread [here](https://stackoverflow.com/questions/4875195/problem-sending-json-data-from-jquery-to... | 2011/08/09 | [
"https://Stackoverflow.com/questions/7001846",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/124069/"
] | I added the following to my `<system.webServer>` config section:
```
<httpProtocol>
<customHeaders>
<add name="Access-Control-Allow-Headers" value="Content-Type, Accept, X-Requested-With"/>
<add name="Access-Control-Allow-Methods" value="GET, POST, OPTIONS"/>
<add name="Access-Control-Allow-Origin" value... | I tried all the answers here and none worked. I eventually realized that browsers will treat the pre-flight check as failed if it returns non 200. In my case, IIS was returning 404, even with the headers. This is because I had 2 attributes on my controller method - [HttpPost] and [HttpOptions]. Apparently, this is not ... |
7,001,846 | My Sencha Touch app is posting a form to my [asp.net-mvc-3](/questions/tagged/asp.net-mvc-3 "show questions tagged 'asp.net-mvc-3'") WebService, but instead of sending `POST` it's sending `OPTIONS`.
I'm reading a similar thread [here](https://stackoverflow.com/questions/4875195/problem-sending-json-data-from-jquery-to... | 2011/08/09 | [
"https://Stackoverflow.com/questions/7001846",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/124069/"
] | Just to answer the question why "OPTIONS" and not "POST", that is because the browser is implementing CORS ([Cross-origin resource sharing](http://en.wikipedia.org/wiki/Cross-origin_resource_sharing) ).
This is a two part process of sending the OPTIONS request first, then if the server replies with acceptable condition... | I tried all the answers here and none worked. I eventually realized that browsers will treat the pre-flight check as failed if it returns non 200. In my case, IIS was returning 404, even with the headers. This is because I had 2 attributes on my controller method - [HttpPost] and [HttpOptions]. Apparently, this is not ... |
743,733 | I am using CentOS 6.5 64
and use xen to create a virtual machine (CentOS)
**ifconfig**
```
[root@CentOS ~]# ifconfig
eth0 Link encap:Ethernet HWaddr 08:00:27:54:B3:FA
inet6 addr: fe80::a00:27ff:fe54:b3fa/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1... | 2014/04/19 | [
"https://superuser.com/questions/743733",
"https://superuser.com",
"https://superuser.com/users/246534/"
] | First of all if you are using VirtualBox to host the XEN server please ensure to use Ethernet not Wireless network and set Promiscuous Mode to "Allow All".
Secondly just to make everything clean, let's start with clean installation of CentOS with XEN and install the Bridge Network and CentOS VM on it.
Assuming you ha... | I hope you find this helpful, I got it from [here](http://www.novell.com/support/kb/doc.php?id=7001989)
**bridge does not forward all traffic through the bridge**
**cause:** Network bridges will not forward all traffic across the bridge. By definition, a bridge will forward broadcast traffic. Other network traffic ... |
743,733 | I am using CentOS 6.5 64
and use xen to create a virtual machine (CentOS)
**ifconfig**
```
[root@CentOS ~]# ifconfig
eth0 Link encap:Ethernet HWaddr 08:00:27:54:B3:FA
inet6 addr: fe80::a00:27ff:fe54:b3fa/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1... | 2014/04/19 | [
"https://superuser.com/questions/743733",
"https://superuser.com",
"https://superuser.com/users/246534/"
] | I hope you find this helpful, I got it from [here](http://www.novell.com/support/kb/doc.php?id=7001989)
**bridge does not forward all traffic through the bridge**
**cause:** Network bridges will not forward all traffic across the bridge. By definition, a bridge will forward broadcast traffic. Other network traffic ... | Check sysctl -a
you will find net.ipv6.conf.all.forwarding = 0
you can add net.ipv6.conf.all.forwarding = 1 in sysctl.conf
then, do a sysctl -p to load the new settings.
If it does not work, modify other variables listed in
sysctl -a | grep forward |
743,733 | I am using CentOS 6.5 64
and use xen to create a virtual machine (CentOS)
**ifconfig**
```
[root@CentOS ~]# ifconfig
eth0 Link encap:Ethernet HWaddr 08:00:27:54:B3:FA
inet6 addr: fe80::a00:27ff:fe54:b3fa/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1... | 2014/04/19 | [
"https://superuser.com/questions/743733",
"https://superuser.com",
"https://superuser.com/users/246534/"
] | First of all if you are using VirtualBox to host the XEN server please ensure to use Ethernet not Wireless network and set Promiscuous Mode to "Allow All".
Secondly just to make everything clean, let's start with clean installation of CentOS with XEN and install the Bridge Network and CentOS VM on it.
Assuming you ha... | No sure if it will solve the problem, but have you tried opening `/etc/sysctl.conf` and setting:
```
net.ipv4.ip_forward = 1
```
You might need to restart `network` to reload the new configuration:
```
service network restart
``` |
743,733 | I am using CentOS 6.5 64
and use xen to create a virtual machine (CentOS)
**ifconfig**
```
[root@CentOS ~]# ifconfig
eth0 Link encap:Ethernet HWaddr 08:00:27:54:B3:FA
inet6 addr: fe80::a00:27ff:fe54:b3fa/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1... | 2014/04/19 | [
"https://superuser.com/questions/743733",
"https://superuser.com",
"https://superuser.com/users/246534/"
] | No sure if it will solve the problem, but have you tried opening `/etc/sysctl.conf` and setting:
```
net.ipv4.ip_forward = 1
```
You might need to restart `network` to reload the new configuration:
```
service network restart
``` | Check sysctl -a
you will find net.ipv6.conf.all.forwarding = 0
you can add net.ipv6.conf.all.forwarding = 1 in sysctl.conf
then, do a sysctl -p to load the new settings.
If it does not work, modify other variables listed in
sysctl -a | grep forward |
743,733 | I am using CentOS 6.5 64
and use xen to create a virtual machine (CentOS)
**ifconfig**
```
[root@CentOS ~]# ifconfig
eth0 Link encap:Ethernet HWaddr 08:00:27:54:B3:FA
inet6 addr: fe80::a00:27ff:fe54:b3fa/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1... | 2014/04/19 | [
"https://superuser.com/questions/743733",
"https://superuser.com",
"https://superuser.com/users/246534/"
] | First of all if you are using VirtualBox to host the XEN server please ensure to use Ethernet not Wireless network and set Promiscuous Mode to "Allow All".
Secondly just to make everything clean, let's start with clean installation of CentOS with XEN and install the Bridge Network and CentOS VM on it.
Assuming you ha... | Check sysctl -a
you will find net.ipv6.conf.all.forwarding = 0
you can add net.ipv6.conf.all.forwarding = 1 in sysctl.conf
then, do a sysctl -p to load the new settings.
If it does not work, modify other variables listed in
sysctl -a | grep forward |
19,533,633 | I have to put a check whether name is in ***gujarati*** and does not contains numbers or digits.
This is how I do it for normal english characters.
```
String exp = "^[a-z]*$";
System.out.println("Name".matches(exp));
```
Please help me with this problem. | 2013/10/23 | [
"https://Stackoverflow.com/questions/19533633",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2907609/"
] | First get the Gujarati characters in unicode (have a look here for example: [Gujarati uni codes](http://www.ssec.wisc.edu/~tomw/java/unicode.html#x0A80)
Use those chars to check your String. For this you can either use regex, or you just compare each char if it is one of the Gijarati chars. | Create string with targeted UTF-16 caracters as there is no ready-to-go set of gujarati characters and use it in your regex
```
private static final String charset="enter required characters here one by one without spaces etc"
private static final String pattern="^["+charset+"]+$";
//later on in code simply use regex... |
19,533,633 | I have to put a check whether name is in ***gujarati*** and does not contains numbers or digits.
This is how I do it for normal english characters.
```
String exp = "^[a-z]*$";
System.out.println("Name".matches(exp));
```
Please help me with this problem. | 2013/10/23 | [
"https://Stackoverflow.com/questions/19533633",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2907609/"
] | First get the Gujarati characters in unicode (have a look here for example: [Gujarati uni codes](http://www.ssec.wisc.edu/~tomw/java/unicode.html#x0A80)
Use those chars to check your String. For this you can either use regex, or you just compare each char if it is one of the Gijarati chars. | Try this one
```
String exp = "[\u0A80-\u0AFF\\s]*";
System.out.println("અ આ".matches(exp));
``` |
1,528 | What are the ethical limitations of reusing existing code for a future, different client's project? I'm mostly thinking about generic low level code, not proprietary features, algorithms or designs. Assume no NDA was signed also.
For instance, if you were a specialist in writing code to create "Dynamic Widgets", and c... | 2014/03/11 | [
"https://freelancing.stackexchange.com/questions/1528",
"https://freelancing.stackexchange.com",
"https://freelancing.stackexchange.com/users/1975/"
] | This will borrow my knowledge from [this question](https://freelancing.stackexchange.com/questions/713/hourly-billing-is-it-appropriate-to-include-time-to-research-if-you-dont-know), because I feel a lot of the knowledge would be the same.
First off, from when I was a freelance web programmer, using PHP and MySQL (I d... | Here are the possible scenarios
1) If you contract to bill by the hour, then it would be unethical to do otherwise. Whether or not you re-use code (assuming you are legally entitled to do so), is a non-factor.
2) If you provide a fixed quote, then if you are able to deliver high-value for less effort on your part, yo... |
1,528 | What are the ethical limitations of reusing existing code for a future, different client's project? I'm mostly thinking about generic low level code, not proprietary features, algorithms or designs. Assume no NDA was signed also.
For instance, if you were a specialist in writing code to create "Dynamic Widgets", and c... | 2014/03/11 | [
"https://freelancing.stackexchange.com/questions/1528",
"https://freelancing.stackexchange.com",
"https://freelancing.stackexchange.com/users/1975/"
] | This will borrow my knowledge from [this question](https://freelancing.stackexchange.com/questions/713/hourly-billing-is-it-appropriate-to-include-time-to-research-if-you-dont-know), because I feel a lot of the knowledge would be the same.
First off, from when I was a freelance web programmer, using PHP and MySQL (I d... | I take a different view on this than a few of the current answers.
If I spot a general solution that can be enhanced and modified to implement a custom feature for a client I'll create (or enhance) a general solution on my own time and not bill for it. Maybe I'll throw it in a private Github repository. Generally, peo... |
6,324,533 | I'm trying to develop a Web app in Perl using [Hypertable](http://www.hypertable.org/). Sample code:
```
#!/usr/bin/perl -w
use strict;
use warnings;
use CGI;
use CGI::Carp qw/fatalsToBrowser warningsToBrowser/;
use CGI::Session ('-ip_match');
use Hypertable::ThriftClient;
use Data::Dumper;
my $q = new CGI;
print $q-... | 2011/06/12 | [
"https://Stackoverflow.com/questions/6324533",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/676038/"
] | Instead of using DirectoryIterator, you can use [RecursiveDirectoryIterator](http://php.net/manual/en/class.recursivedirectoryiterator.php), which provides functionality for iterating over a file structure recursively. Example from documentation:
```
$path = realpath('/etc');
$objects = new RecursiveIteratorIterator(... | You should use RecursiveDirectoryIterator, but you might also want to consider using the [Finder](https://github.com/symfony/Finder) component from Symfony2. It allows for easy on the fly filtering (by size, date, ..), including dirs or files, excluding dirs or dot-files, etc. Look at the docblocks inside the [Finder.p... |
45,124,834 | I have the following HTML:
```
<td v-bind:class="getClass()" class="metric-cell vs-last-week">
{{ (((metrics.twitter.engagements.thisWeek - metrics.twitter.engagements.lastWeek) / metrics.twitter.engagements.lastWeek)*100).toFixed(1) + "%" }}
</td>
```
Is there a way to obtain the value within the cell so that I can... | 2017/07/16 | [
"https://Stackoverflow.com/questions/45124834",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/607391/"
] | Typically whenever I want to save a calculated value I just create a new scope. The method for doing that in Vue is a component.
```
Vue.component("metric", {
props:["metric"],
template:`
<td :class="getClass()">{{metric}}</td>
`,
methods:{
getClass(){
return {
green: this.metric >= 0,
... | It might be easier to read if you move most of the complex calculations out of the template and into computed properties like this:
```html
<td :class="cssClass" class="metric-cell vs-last-week">
{{ (vsLastWeek * 100).toFixed(1) + '%' }}
</td>
```
```js
computed: {
vsLastWeek() {
const thisWeek = this.metric... |
6,833,691 | I often have to click the "run" button on jsfiddle to run my code. Is there a keyboard shortcut to run code on [jsfiddle.net](http://jsfiddle.net)? | 2011/07/26 | [
"https://Stackoverflow.com/questions/6833691",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/707381/"
] | It's [jsfiddle.net](https://jsfiddle.net/).
And yes, it seems there are some keyboard shortcuts -- see the *"Keyboard shortcuts"* link at the bottom left of the page ;-)
And here is the window that pops up when you click that link :
[](https://i.stack.imgur.com/XIJ0t.png) ... | `Ctrl + Enter` is the shortcut to run code. |
37,194,280 | I am trying to write a text file to multiple sockets, using one program. The code used to write the text file over is as follows:
```
import java.io.*;
import java.net.*;
public class Server {
public static void main(String args[]) throws Exception{
String servers[] = {"127.0.0.1","127.0.0.1","127.0.0.1"}... | 2016/05/12 | [
"https://Stackoverflow.com/questions/37194280",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1136610/"
] | You first create a BufferedReader `bin` and use it to read a single line for the command. But, this does not mean that only this line is read from the input stream. Instead more bytes are read but the BufferedReader `bin` only returns the first line of these bytes, the rest is kept inside the buffer of the **Buffered**... | Your code has very many problems. It's of very poor quality, and you shouldn't be surprised that it doesn't work correctly. I would recommend to read a good beginner's book about Java and something about OOP in general. To name just a few problems:
* You don't use `try/finally`/`try-with-resources`, which means that y... |
11,716,350 | I couldn't find anything useful on the MSDN for this case. Using [Dependency Walker](http://www.dependencywalker.com/), in the module list, I see a mixed usage of Console and GUI.
Does this have an impact when compiling a DLL? | 2012/07/30 | [
"https://Stackoverflow.com/questions/11716350",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/57085/"
] | This option only has an effect on applications (`exe`), not on libraries(`dll`).
Its [documentation](http://msdn.microsoft.com/en-us/library/fcc1zstk.aspx) says:
>
> The `/SUBSYSTEM` option specifies the environment for the executable.
>
>
> The choice of subsystem affects the entry point symbol (or entry point
> ... | My below reply is just some findings.
I tried to create below types of project within VS2015:
* Win32 console app project
* Win32 DLL project
* Win32 Windows app project
Below are their complete linking options:
**Win32 console app project**
>
> /OUT:"C:\Temp\ConsoleApplication3\Debug\ConsoleApplication3.exe"
> /... |
20,886,024 | I'm writing a function `Chunk-Object` that can *chunk* an array of objects into sub arrays. For example, if I pass it an array `@(1, 2, 3, 4, 5)` and specify `2` elements per chunk, then it will return 3 arrays `@(1, 2)`, `@(3, 4)` and `@(5)`. Also the user can provide an optional `scriptblock` parameter if they want t... | 2014/01/02 | [
"https://Stackoverflow.com/questions/20886024",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/133580/"
] | PowerShell automatically unwraps objects that are piped in, hence the difference in behavior.
Consider the following code:
```
function Test {
[CmdletBinding()]
param (
[Parameter(ValueFromPipeline = $true)]
[Object[]] $InputObject
)
process {
$InputObject.Count;
}
}
# Th... | Instead of using $Inputobject, try giving it a parameter name like $Input. here's a sample function I use for teaching that explains how:
```
Function Get-DriveC {
[cmdletbinding()]
Param(
[Parameter(ValueFromPipeline)]
[ValidateNotNullorEmpty()]
[string[]]$Computername = $env:computername)
Begin {
Write-Verbose... |
20,886,024 | I'm writing a function `Chunk-Object` that can *chunk* an array of objects into sub arrays. For example, if I pass it an array `@(1, 2, 3, 4, 5)` and specify `2` elements per chunk, then it will return 3 arrays `@(1, 2)`, `@(3, 4)` and `@(5)`. Also the user can provide an optional `scriptblock` parameter if they want t... | 2014/01/02 | [
"https://Stackoverflow.com/questions/20886024",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/133580/"
] | The issue isn't technically the parameter attributes. It's both with your arguments, and how you're processing them.
Problem: `(echo 1 2 3 4 5 6 7)` creates a string of value "1 2 3 4 5 6 7", you appear to want to process an array
Solution: use an array: `@(1, 2, 3, 4, 5, 6, 7)`
Problem: You are using a foreach stat... | Instead of using $Inputobject, try giving it a parameter name like $Input. here's a sample function I use for teaching that explains how:
```
Function Get-DriveC {
[cmdletbinding()]
Param(
[Parameter(ValueFromPipeline)]
[ValidateNotNullorEmpty()]
[string[]]$Computername = $env:computername)
Begin {
Write-Verbose... |
20,886,024 | I'm writing a function `Chunk-Object` that can *chunk* an array of objects into sub arrays. For example, if I pass it an array `@(1, 2, 3, 4, 5)` and specify `2` elements per chunk, then it will return 3 arrays `@(1, 2)`, `@(3, 4)` and `@(5)`. Also the user can provide an optional `scriptblock` parameter if they want t... | 2014/01/02 | [
"https://Stackoverflow.com/questions/20886024",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/133580/"
] | The difference is that when you pipe the array into **Chunk-Object**, the function executes the **process** block once for each element in the array passed as a sequence of pipeline objects, whereas when you pass the array as an argument to the **-InputObject** parameter, the **process** block executes once for the ent... | Instead of using $Inputobject, try giving it a parameter name like $Input. here's a sample function I use for teaching that explains how:
```
Function Get-DriveC {
[cmdletbinding()]
Param(
[Parameter(ValueFromPipeline)]
[ValidateNotNullorEmpty()]
[string[]]$Computername = $env:computername)
Begin {
Write-Verbose... |
20,886,024 | I'm writing a function `Chunk-Object` that can *chunk* an array of objects into sub arrays. For example, if I pass it an array `@(1, 2, 3, 4, 5)` and specify `2` elements per chunk, then it will return 3 arrays `@(1, 2)`, `@(3, 4)` and `@(5)`. Also the user can provide an optional `scriptblock` parameter if they want t... | 2014/01/02 | [
"https://Stackoverflow.com/questions/20886024",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/133580/"
] | The issue isn't technically the parameter attributes. It's both with your arguments, and how you're processing them.
Problem: `(echo 1 2 3 4 5 6 7)` creates a string of value "1 2 3 4 5 6 7", you appear to want to process an array
Solution: use an array: `@(1, 2, 3, 4, 5, 6, 7)`
Problem: You are using a foreach stat... | PowerShell automatically unwraps objects that are piped in, hence the difference in behavior.
Consider the following code:
```
function Test {
[CmdletBinding()]
param (
[Parameter(ValueFromPipeline = $true)]
[Object[]] $InputObject
)
process {
$InputObject.Count;
}
}
# Th... |
20,886,024 | I'm writing a function `Chunk-Object` that can *chunk* an array of objects into sub arrays. For example, if I pass it an array `@(1, 2, 3, 4, 5)` and specify `2` elements per chunk, then it will return 3 arrays `@(1, 2)`, `@(3, 4)` and `@(5)`. Also the user can provide an optional `scriptblock` parameter if they want t... | 2014/01/02 | [
"https://Stackoverflow.com/questions/20886024",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/133580/"
] | The difference is that when you pipe the array into **Chunk-Object**, the function executes the **process** block once for each element in the array passed as a sequence of pipeline objects, whereas when you pass the array as an argument to the **-InputObject** parameter, the **process** block executes once for the ent... | PowerShell automatically unwraps objects that are piped in, hence the difference in behavior.
Consider the following code:
```
function Test {
[CmdletBinding()]
param (
[Parameter(ValueFromPipeline = $true)]
[Object[]] $InputObject
)
process {
$InputObject.Count;
}
}
# Th... |
20,886,024 | I'm writing a function `Chunk-Object` that can *chunk* an array of objects into sub arrays. For example, if I pass it an array `@(1, 2, 3, 4, 5)` and specify `2` elements per chunk, then it will return 3 arrays `@(1, 2)`, `@(3, 4)` and `@(5)`. Also the user can provide an optional `scriptblock` parameter if they want t... | 2014/01/02 | [
"https://Stackoverflow.com/questions/20886024",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/133580/"
] | The difference is that when you pipe the array into **Chunk-Object**, the function executes the **process** block once for each element in the array passed as a sequence of pipeline objects, whereas when you pass the array as an argument to the **-InputObject** parameter, the **process** block executes once for the ent... | The issue isn't technically the parameter attributes. It's both with your arguments, and how you're processing them.
Problem: `(echo 1 2 3 4 5 6 7)` creates a string of value "1 2 3 4 5 6 7", you appear to want to process an array
Solution: use an array: `@(1, 2, 3, 4, 5, 6, 7)`
Problem: You are using a foreach stat... |
47,482,009 | Here is a sample code.
```
df = pd.DataFrame(np.random.randn(10, 2), columns=list('AB'))
df['C'] = df.B.rolling(window=3)
```
Output:
```
A B C
0 -0.108897 1.877987 Rolling [window=3,center=False,axis=0]
1 -1.276055 -0.424382 Rolling [window=3,center=Fals... | 2017/11/25 | [
"https://Stackoverflow.com/questions/47482009",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3918707/"
] | In newer numpy versions there is a [`sliding_window_view()`](https://numpy.org/devdocs/reference/generated/numpy.lib.stride_tricks.sliding_window_view.html).
It provides identical to `as_strided()` arrays, but with more transparent syntax.
```py
import pandas as pd
from numpy.lib.stride_tricks import sliding_window_v... | Here is another way:
```
df.join(pd.concat(df['B'].rolling(window=3),axis=1).apply(lambda x: x.dropna().tolist()).reset_index(drop=True).loc[2:].rename('C'))
``` |
47,482,009 | Here is a sample code.
```
df = pd.DataFrame(np.random.randn(10, 2), columns=list('AB'))
df['C'] = df.B.rolling(window=3)
```
Output:
```
A B C
0 -0.108897 1.877987 Rolling [window=3,center=False,axis=0]
1 -1.276055 -0.424382 Rolling [window=3,center=Fals... | 2017/11/25 | [
"https://Stackoverflow.com/questions/47482009",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3918707/"
] | Since pandas `1.1` rolling objects are iterable.
For a list of lists:
```
df['C'] = [window.to_list() for window in df.B.rolling(window=3)]
```
For a Series of Series's do:
```
df['C'] = pd.Series(df.B.rolling(window=3))
```
Also checkout the [rolling function](https://pandas.pydata.org/pandas-docs/stable/refere... | In newer numpy versions there is a [`sliding_window_view()`](https://numpy.org/devdocs/reference/generated/numpy.lib.stride_tricks.sliding_window_view.html).
It provides identical to `as_strided()` arrays, but with more transparent syntax.
```py
import pandas as pd
from numpy.lib.stride_tricks import sliding_window_v... |
47,482,009 | Here is a sample code.
```
df = pd.DataFrame(np.random.randn(10, 2), columns=list('AB'))
df['C'] = df.B.rolling(window=3)
```
Output:
```
A B C
0 -0.108897 1.877987 Rolling [window=3,center=False,axis=0]
1 -1.276055 -0.424382 Rolling [window=3,center=Fals... | 2017/11/25 | [
"https://Stackoverflow.com/questions/47482009",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3918707/"
] | Let's using this pandas approach with a rolling apply trick:
```
df = pd.DataFrame(np.random.randn(10, 2), columns=list('AB'))
list_of_values = []
df.B.rolling(3).apply(lambda x: list_of_values.append(x.values) or 0, raw=False)
df.loc[2:,'C'] = pd.Series(list_of_values).values
df
```
Output:
```
A ... | Perhaps zipping would also help in your case i.e
```
def get_list(x,m) : return list(zip(*(x[i:] for i in range(m))))
# get_list(df['B'],3) would return
[(-1.606357, 0.0005099999999999999, 1.627117),
(0.0005099999999999999, 1.627117, 0.5509029999999999),
(1.627117, 0.5509029999999999, -1.231291),
(0.55090299999... |
47,482,009 | Here is a sample code.
```
df = pd.DataFrame(np.random.randn(10, 2), columns=list('AB'))
df['C'] = df.B.rolling(window=3)
```
Output:
```
A B C
0 -0.108897 1.877987 Rolling [window=3,center=False,axis=0]
1 -1.276055 -0.424382 Rolling [window=3,center=Fals... | 2017/11/25 | [
"https://Stackoverflow.com/questions/47482009",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3918707/"
] | You could use `np.stride_tricks`:
```
import numpy as np
as_strided = np.lib.stride_tricks.as_strided
df
A B
0 -0.272824 -1.606357
1 -0.350643 0.000510
2 0.247222 1.627117
3 -1.601180 0.550903
4 0.803039 -1.231291
5 -0.536713 -0.313384
6 -0.840931 -0.675352
7 -0.930186 -0.189356
8 0.151349 ... | In newer numpy versions there is a [`sliding_window_view()`](https://numpy.org/devdocs/reference/generated/numpy.lib.stride_tricks.sliding_window_view.html).
It provides identical to `as_strided()` arrays, but with more transparent syntax.
```py
import pandas as pd
from numpy.lib.stride_tricks import sliding_window_v... |
47,482,009 | Here is a sample code.
```
df = pd.DataFrame(np.random.randn(10, 2), columns=list('AB'))
df['C'] = df.B.rolling(window=3)
```
Output:
```
A B C
0 -0.108897 1.877987 Rolling [window=3,center=False,axis=0]
1 -1.276055 -0.424382 Rolling [window=3,center=Fals... | 2017/11/25 | [
"https://Stackoverflow.com/questions/47482009",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3918707/"
] | Let's using this pandas approach with a rolling apply trick:
```
df = pd.DataFrame(np.random.randn(10, 2), columns=list('AB'))
list_of_values = []
df.B.rolling(3).apply(lambda x: list_of_values.append(x.values) or 0, raw=False)
df.loc[2:,'C'] = pd.Series(list_of_values).values
df
```
Output:
```
A ... | Here is another way:
```
df.join(pd.concat(df['B'].rolling(window=3),axis=1).apply(lambda x: x.dropna().tolist()).reset_index(drop=True).loc[2:].rename('C'))
``` |
47,482,009 | Here is a sample code.
```
df = pd.DataFrame(np.random.randn(10, 2), columns=list('AB'))
df['C'] = df.B.rolling(window=3)
```
Output:
```
A B C
0 -0.108897 1.877987 Rolling [window=3,center=False,axis=0]
1 -1.276055 -0.424382 Rolling [window=3,center=Fals... | 2017/11/25 | [
"https://Stackoverflow.com/questions/47482009",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3918707/"
] | Since pandas `1.1` rolling objects are iterable.
For a list of lists:
```
df['C'] = [window.to_list() for window in df.B.rolling(window=3)]
```
For a Series of Series's do:
```
df['C'] = pd.Series(df.B.rolling(window=3))
```
Also checkout the [rolling function](https://pandas.pydata.org/pandas-docs/stable/refere... | Perhaps zipping would also help in your case i.e
```
def get_list(x,m) : return list(zip(*(x[i:] for i in range(m))))
# get_list(df['B'],3) would return
[(-1.606357, 0.0005099999999999999, 1.627117),
(0.0005099999999999999, 1.627117, 0.5509029999999999),
(1.627117, 0.5509029999999999, -1.231291),
(0.55090299999... |
47,482,009 | Here is a sample code.
```
df = pd.DataFrame(np.random.randn(10, 2), columns=list('AB'))
df['C'] = df.B.rolling(window=3)
```
Output:
```
A B C
0 -0.108897 1.877987 Rolling [window=3,center=False,axis=0]
1 -1.276055 -0.424382 Rolling [window=3,center=Fals... | 2017/11/25 | [
"https://Stackoverflow.com/questions/47482009",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3918707/"
] | You could use `np.stride_tricks`:
```
import numpy as np
as_strided = np.lib.stride_tricks.as_strided
df
A B
0 -0.272824 -1.606357
1 -0.350643 0.000510
2 0.247222 1.627117
3 -1.601180 0.550903
4 0.803039 -1.231291
5 -0.536713 -0.313384
6 -0.840931 -0.675352
7 -0.930186 -0.189356
8 0.151349 ... | Here is another way:
```
df.join(pd.concat(df['B'].rolling(window=3),axis=1).apply(lambda x: x.dropna().tolist()).reset_index(drop=True).loc[2:].rename('C'))
``` |
47,482,009 | Here is a sample code.
```
df = pd.DataFrame(np.random.randn(10, 2), columns=list('AB'))
df['C'] = df.B.rolling(window=3)
```
Output:
```
A B C
0 -0.108897 1.877987 Rolling [window=3,center=False,axis=0]
1 -1.276055 -0.424382 Rolling [window=3,center=Fals... | 2017/11/25 | [
"https://Stackoverflow.com/questions/47482009",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3918707/"
] | You could use `np.stride_tricks`:
```
import numpy as np
as_strided = np.lib.stride_tricks.as_strided
df
A B
0 -0.272824 -1.606357
1 -0.350643 0.000510
2 0.247222 1.627117
3 -1.601180 0.550903
4 0.803039 -1.231291
5 -0.536713 -0.313384
6 -0.840931 -0.675352
7 -0.930186 -0.189356
8 0.151349 ... | Let's using this pandas approach with a rolling apply trick:
```
df = pd.DataFrame(np.random.randn(10, 2), columns=list('AB'))
list_of_values = []
df.B.rolling(3).apply(lambda x: list_of_values.append(x.values) or 0, raw=False)
df.loc[2:,'C'] = pd.Series(list_of_values).values
df
```
Output:
```
A ... |
47,482,009 | Here is a sample code.
```
df = pd.DataFrame(np.random.randn(10, 2), columns=list('AB'))
df['C'] = df.B.rolling(window=3)
```
Output:
```
A B C
0 -0.108897 1.877987 Rolling [window=3,center=False,axis=0]
1 -1.276055 -0.424382 Rolling [window=3,center=Fals... | 2017/11/25 | [
"https://Stackoverflow.com/questions/47482009",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3918707/"
] | Since pandas `1.1` rolling objects are iterable.
For a list of lists:
```
df['C'] = [window.to_list() for window in df.B.rolling(window=3)]
```
For a Series of Series's do:
```
df['C'] = pd.Series(df.B.rolling(window=3))
```
Also checkout the [rolling function](https://pandas.pydata.org/pandas-docs/stable/refere... | Let's using this pandas approach with a rolling apply trick:
```
df = pd.DataFrame(np.random.randn(10, 2), columns=list('AB'))
list_of_values = []
df.B.rolling(3).apply(lambda x: list_of_values.append(x.values) or 0, raw=False)
df.loc[2:,'C'] = pd.Series(list_of_values).values
df
```
Output:
```
A ... |
47,482,009 | Here is a sample code.
```
df = pd.DataFrame(np.random.randn(10, 2), columns=list('AB'))
df['C'] = df.B.rolling(window=3)
```
Output:
```
A B C
0 -0.108897 1.877987 Rolling [window=3,center=False,axis=0]
1 -1.276055 -0.424382 Rolling [window=3,center=Fals... | 2017/11/25 | [
"https://Stackoverflow.com/questions/47482009",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3918707/"
] | Perhaps zipping would also help in your case i.e
```
def get_list(x,m) : return list(zip(*(x[i:] for i in range(m))))
# get_list(df['B'],3) would return
[(-1.606357, 0.0005099999999999999, 1.627117),
(0.0005099999999999999, 1.627117, 0.5509029999999999),
(1.627117, 0.5509029999999999, -1.231291),
(0.55090299999... | Here is another way:
```
df.join(pd.concat(df['B'].rolling(window=3),axis=1).apply(lambda x: x.dropna().tolist()).reset_index(drop=True).loc[2:].rename('C'))
``` |
12,147,926 | I have many instances on one Oracle server running 11GR2. I have to fix an issue on one instance. According to Oracle support, I need to shutdown the database and its listener.
```
lsnrctl stop
lsnrctl start
```
I can also use `svcctl` to start and stop a listener on the server as well:
```
srvctl stop listener -n ... | 2012/08/27 | [
"https://Stackoverflow.com/questions/12147926",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/992022/"
] | That's because the implemented logic operators are intended to be [short-circuiting](https://en.wikipedia.org/wiki/Short-circuit_evaluation) and to return the value produced by the last form they evaluated.
To achieve this, `and` does not need a `gensym` because the last form it evaluates will either produce `NIL` or ... | Let's say `a` is false, but `b`, `c`, and `d` are true. Now, because of short-circuiting we have:
```
(or a b c d) => b
(and a b c d) => nil
(or b c d) => b
(and b c d) => d
```
As you can see, in the `AND` case, the value of the leftmost argument is never used as the return value of the form (unless there is ... |
38,555,845 | **QUESTION:** Is it possible to create text with Google Maps API that hovers over the window in a fixed position even when you are zooming in/out or panning?
**WHAT I HAVE TRIED SO FAR:**
I already know that infowindows are possible with the following code:
```
var contentString = "<div>Hello!</div>";
var infowindow ... | 2016/07/24 | [
"https://Stackoverflow.com/questions/38555845",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5487076/"
] | If you want to use a InfoWindow you could just set `visible: false` for the marker and then change the position of the marker whenever the center position of the map changes:
```
/* Invisible marker for the InfoWindow */
textmarker = new google.maps.Marker({
position: map.getCenter(),
map: map,
visible: fa... | Assuming the text just sits above the map in a static position, you can do this with CSS:
```
<div class="map-container">
<-- google map div here -->
<div class="textbox">Static Text</div>
</div>
```
CSS:
```
.map-container {
position: relative;
}
.textbox {
position: absolute;
left: 50%:
top: 50%;
tra... |
18,180 | I made a backup of my `httpdocs` directory (a very small Joomla and CiviCRM extension) and discovered the backup contained more than 15000 different files? Is this normal? can I skip some of these from the backup?.
Thank you
Rob | 2017/04/15 | [
"https://civicrm.stackexchange.com/questions/18180",
"https://civicrm.stackexchange.com",
"https://civicrm.stackexchange.com/users/4246/"
] | One great way to shrink the backup is to only backup the bespoke bits (e.g. custom extensions and themes) and the database, not the actual Joomla! and CiviCRM code files that are freely downloaded from elsewhere.
This depends on you not having edited any core files, which your developers shouldn't be doing anyway. | Yes, that is approximately the number of files. And when you make a code base backup, you have to copy them all. What is the backup method you are using? If your only option is to copy them with (s)ftp transfer this can take a lot of time. But if you have ssh access to the system use zip or tar to pack all these files ... |
18,180 | I made a backup of my `httpdocs` directory (a very small Joomla and CiviCRM extension) and discovered the backup contained more than 15000 different files? Is this normal? can I skip some of these from the backup?.
Thank you
Rob | 2017/04/15 | [
"https://civicrm.stackexchange.com/questions/18180",
"https://civicrm.stackexchange.com",
"https://civicrm.stackexchange.com/users/4246/"
] | Yes, that is approximately the number of files. And when you make a code base backup, you have to copy them all. What is the backup method you are using? If your only option is to copy them with (s)ftp transfer this can take a lot of time. But if you have ssh access to the system use zip or tar to pack all these files ... | thank you
I backup the database with phpmyadmin and the files with ftp because then I have the correct versions for joomla and civi
I have no ssh access and never changed the core files so I think of leaving out all unused themes and unused extensions
thnx again |
18,180 | I made a backup of my `httpdocs` directory (a very small Joomla and CiviCRM extension) and discovered the backup contained more than 15000 different files? Is this normal? can I skip some of these from the backup?.
Thank you
Rob | 2017/04/15 | [
"https://civicrm.stackexchange.com/questions/18180",
"https://civicrm.stackexchange.com",
"https://civicrm.stackexchange.com/users/4246/"
] | I believe the free version of Akeeba Backup lets you exclude directories: <https://www.akeebabackup.com/products/405-akeeba-core-vs-professional.html> | Yes, that is approximately the number of files. And when you make a code base backup, you have to copy them all. What is the backup method you are using? If your only option is to copy them with (s)ftp transfer this can take a lot of time. But if you have ssh access to the system use zip or tar to pack all these files ... |
18,180 | I made a backup of my `httpdocs` directory (a very small Joomla and CiviCRM extension) and discovered the backup contained more than 15000 different files? Is this normal? can I skip some of these from the backup?.
Thank you
Rob | 2017/04/15 | [
"https://civicrm.stackexchange.com/questions/18180",
"https://civicrm.stackexchange.com",
"https://civicrm.stackexchange.com/users/4246/"
] | One great way to shrink the backup is to only backup the bespoke bits (e.g. custom extensions and themes) and the database, not the actual Joomla! and CiviCRM code files that are freely downloaded from elsewhere.
This depends on you not having edited any core files, which your developers shouldn't be doing anyway. | thank you
I backup the database with phpmyadmin and the files with ftp because then I have the correct versions for joomla and civi
I have no ssh access and never changed the core files so I think of leaving out all unused themes and unused extensions
thnx again |
18,180 | I made a backup of my `httpdocs` directory (a very small Joomla and CiviCRM extension) and discovered the backup contained more than 15000 different files? Is this normal? can I skip some of these from the backup?.
Thank you
Rob | 2017/04/15 | [
"https://civicrm.stackexchange.com/questions/18180",
"https://civicrm.stackexchange.com",
"https://civicrm.stackexchange.com/users/4246/"
] | One great way to shrink the backup is to only backup the bespoke bits (e.g. custom extensions and themes) and the database, not the actual Joomla! and CiviCRM code files that are freely downloaded from elsewhere.
This depends on you not having edited any core files, which your developers shouldn't be doing anyway. | problem was to backup the joomla, civi site because of the huge number of files; so backup with ftp (httpdocs) and database sql with phpmyadmin took several hours
so I tried akeeba free backup, extension for joomla; this works fine and fast on the server itself and I can downlad the akeeba .jpa file (70 MB) also very ... |
18,180 | I made a backup of my `httpdocs` directory (a very small Joomla and CiviCRM extension) and discovered the backup contained more than 15000 different files? Is this normal? can I skip some of these from the backup?.
Thank you
Rob | 2017/04/15 | [
"https://civicrm.stackexchange.com/questions/18180",
"https://civicrm.stackexchange.com",
"https://civicrm.stackexchange.com/users/4246/"
] | I believe the free version of Akeeba Backup lets you exclude directories: <https://www.akeebabackup.com/products/405-akeeba-core-vs-professional.html> | thank you
I backup the database with phpmyadmin and the files with ftp because then I have the correct versions for joomla and civi
I have no ssh access and never changed the core files so I think of leaving out all unused themes and unused extensions
thnx again |
18,180 | I made a backup of my `httpdocs` directory (a very small Joomla and CiviCRM extension) and discovered the backup contained more than 15000 different files? Is this normal? can I skip some of these from the backup?.
Thank you
Rob | 2017/04/15 | [
"https://civicrm.stackexchange.com/questions/18180",
"https://civicrm.stackexchange.com",
"https://civicrm.stackexchange.com/users/4246/"
] | problem was to backup the joomla, civi site because of the huge number of files; so backup with ftp (httpdocs) and database sql with phpmyadmin took several hours
so I tried akeeba free backup, extension for joomla; this works fine and fast on the server itself and I can downlad the akeeba .jpa file (70 MB) also very ... | thank you
I backup the database with phpmyadmin and the files with ftp because then I have the correct versions for joomla and civi
I have no ssh access and never changed the core files so I think of leaving out all unused themes and unused extensions
thnx again |
18,180 | I made a backup of my `httpdocs` directory (a very small Joomla and CiviCRM extension) and discovered the backup contained more than 15000 different files? Is this normal? can I skip some of these from the backup?.
Thank you
Rob | 2017/04/15 | [
"https://civicrm.stackexchange.com/questions/18180",
"https://civicrm.stackexchange.com",
"https://civicrm.stackexchange.com/users/4246/"
] | I believe the free version of Akeeba Backup lets you exclude directories: <https://www.akeebabackup.com/products/405-akeeba-core-vs-professional.html> | problem was to backup the joomla, civi site because of the huge number of files; so backup with ftp (httpdocs) and database sql with phpmyadmin took several hours
so I tried akeeba free backup, extension for joomla; this works fine and fast on the server itself and I can downlad the akeeba .jpa file (70 MB) also very ... |
26,876,590 | I have found an interesting problem.
A n\*m matrix is given, with a such form:
```
11111111
11111001
11111001
10111111
10111111
11100111
11111111
```
The goal of the problem is to find the number of '0' blocks. On the previous example, there were 3 '0' blocks.
I don't understand how to solve this problem. I don't ... | 2014/11/11 | [
"https://Stackoverflow.com/questions/26876590",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3526887/"
] | Because you are floating them so they sit outside of the DOM flow. If you want the parent to consider them, add `overflow: hidden` to the parent CSS or add a div at the bottom of the container with the rule `clear: both;`
Demo : <http://jsfiddle.net/cros1mrv/1/> | Because of floating. One way to clear that is to use:
```css
#wrapper {
overflow: hidden;
}
``` |
26,876,590 | I have found an interesting problem.
A n\*m matrix is given, with a such form:
```
11111111
11111001
11111001
10111111
10111111
11100111
11111111
```
The goal of the problem is to find the number of '0' blocks. On the previous example, there were 3 '0' blocks.
I don't understand how to solve this problem. I don't ... | 2014/11/11 | [
"https://Stackoverflow.com/questions/26876590",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3526887/"
] | Because you are floating them so they sit outside of the DOM flow. If you want the parent to consider them, add `overflow: hidden` to the parent CSS or add a div at the bottom of the container with the rule `clear: both;`
Demo : <http://jsfiddle.net/cros1mrv/1/> | You should set the overflow of your wrapper to `overflow: auto` to flow around your floating divs.
```css
#wrapper {
background-color: grey;
border-top: 1px solid black;
border-botton: 1px solid black;
padding: 10px;
overflow: auto;
}
```
See [this fiddle](http://jsfiddle.net/cros1mrv/2/). |
26,876,590 | I have found an interesting problem.
A n\*m matrix is given, with a such form:
```
11111111
11111001
11111001
10111111
10111111
11100111
11111111
```
The goal of the problem is to find the number of '0' blocks. On the previous example, there were 3 '0' blocks.
I don't understand how to solve this problem. I don't ... | 2014/11/11 | [
"https://Stackoverflow.com/questions/26876590",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3526887/"
] | You should set the overflow of your wrapper to `overflow: auto` to flow around your floating divs.
```css
#wrapper {
background-color: grey;
border-top: 1px solid black;
border-botton: 1px solid black;
padding: 10px;
overflow: auto;
}
```
See [this fiddle](http://jsfiddle.net/cros1mrv/2/). | Because of floating. One way to clear that is to use:
```css
#wrapper {
overflow: hidden;
}
``` |
40,445 | Looking at this information page for a dataset hosted on esri.com:
<http://fema-services2.esri.com/arcgis/rest/services/2012_Sandy/ImageCat_NLT/MapServer/layers>
Trying to figure out how I can get access to the raw data (either raw lat/lng coordinates or SHP).
It looks like the data is available, I just can't figu... | 2012/11/06 | [
"https://gis.stackexchange.com/questions/40445",
"https://gis.stackexchange.com",
"https://gis.stackexchange.com/users/2874/"
] | That map service is a ArcGIS Server Dynamic Map service which typically only returns images and specific query results, much like a WMS. Some ArcGIS Server image services allow for data download, but this isn't one of those.
You can get the information you're looking for through the query operation, but it will take m... | Easier yet: Just use the geoprocessing tool Feature Class to Geodatabase. |
40,445 | Looking at this information page for a dataset hosted on esri.com:
<http://fema-services2.esri.com/arcgis/rest/services/2012_Sandy/ImageCat_NLT/MapServer/layers>
Trying to figure out how I can get access to the raw data (either raw lat/lng coordinates or SHP).
It looks like the data is available, I just can't figu... | 2012/11/06 | [
"https://gis.stackexchange.com/questions/40445",
"https://gis.stackexchange.com",
"https://gis.stackexchange.com/users/2874/"
] | To download this data, you can visit <https://geodatadownloader.com>, specify your URL, pick an extent or a where clause if you like, then click "download". It'll save a geojson file to your computer, containing all features regardless of max query size.
I've had this issue many times, so I decided to a build an open ... | Easier yet: Just use the geoprocessing tool Feature Class to Geodatabase. |
40,445 | Looking at this information page for a dataset hosted on esri.com:
<http://fema-services2.esri.com/arcgis/rest/services/2012_Sandy/ImageCat_NLT/MapServer/layers>
Trying to figure out how I can get access to the raw data (either raw lat/lng coordinates or SHP).
It looks like the data is available, I just can't figu... | 2012/11/06 | [
"https://gis.stackexchange.com/questions/40445",
"https://gis.stackexchange.com",
"https://gis.stackexchange.com/users/2874/"
] | To download this data, you can visit <https://geodatadownloader.com>, specify your URL, pick an extent or a where clause if you like, then click "download". It'll save a geojson file to your computer, containing all features regardless of max query size.
I've had this issue many times, so I decided to a build an open ... | I had to do this recently and this was my best attempt so far. I was originally trying to do an `"objectid non in {}".format(ids)` where ids would be a tuple of collected objectid's but the url would not return any data, there must be a limit on how long the where clause string can be. some of this code is hard coded a... |
40,445 | Looking at this information page for a dataset hosted on esri.com:
<http://fema-services2.esri.com/arcgis/rest/services/2012_Sandy/ImageCat_NLT/MapServer/layers>
Trying to figure out how I can get access to the raw data (either raw lat/lng coordinates or SHP).
It looks like the data is available, I just can't figu... | 2012/11/06 | [
"https://gis.stackexchange.com/questions/40445",
"https://gis.stackexchange.com",
"https://gis.stackexchange.com/users/2874/"
] | I always find myself in situations where I need to export all the data from a Map Service into a shapefile. Here is a very easy utility to use that will export every feature from a service and save it as a shapefile and geojson if you need it. You will need to have or install node.js.
<https://github.com/tannerjt/AGSt... | To download this data, you can visit <https://geodatadownloader.com>, specify your URL, pick an extent or a where clause if you like, then click "download". It'll save a geojson file to your computer, containing all features regardless of max query size.
I've had this issue many times, so I decided to a build an open ... |
40,445 | Looking at this information page for a dataset hosted on esri.com:
<http://fema-services2.esri.com/arcgis/rest/services/2012_Sandy/ImageCat_NLT/MapServer/layers>
Trying to figure out how I can get access to the raw data (either raw lat/lng coordinates or SHP).
It looks like the data is available, I just can't figu... | 2012/11/06 | [
"https://gis.stackexchange.com/questions/40445",
"https://gis.stackexchange.com",
"https://gis.stackexchange.com/users/2874/"
] | That map service is a ArcGIS Server Dynamic Map service which typically only returns images and specific query results, much like a WMS. Some ArcGIS Server image services allow for data download, but this isn't one of those.
You can get the information you're looking for through the query operation, but it will take m... | The functionality you are looking for is that of a Web Feature Service (WFS), not a Web Map Service (WMS). Here's a little more info... <http://blog.geoserver.org/2006/11/27/the-wfs-and-wms-services/> |
40,445 | Looking at this information page for a dataset hosted on esri.com:
<http://fema-services2.esri.com/arcgis/rest/services/2012_Sandy/ImageCat_NLT/MapServer/layers>
Trying to figure out how I can get access to the raw data (either raw lat/lng coordinates or SHP).
It looks like the data is available, I just can't figu... | 2012/11/06 | [
"https://gis.stackexchange.com/questions/40445",
"https://gis.stackexchange.com",
"https://gis.stackexchange.com/users/2874/"
] | I always find myself in situations where I need to export all the data from a Map Service into a shapefile. Here is a very easy utility to use that will export every feature from a service and save it as a shapefile and geojson if you need it. You will need to have or install node.js.
<https://github.com/tannerjt/AGSt... | The functionality you are looking for is that of a Web Feature Service (WFS), not a Web Map Service (WMS). Here's a little more info... <http://blog.geoserver.org/2006/11/27/the-wfs-and-wms-services/> |
40,445 | Looking at this information page for a dataset hosted on esri.com:
<http://fema-services2.esri.com/arcgis/rest/services/2012_Sandy/ImageCat_NLT/MapServer/layers>
Trying to figure out how I can get access to the raw data (either raw lat/lng coordinates or SHP).
It looks like the data is available, I just can't figu... | 2012/11/06 | [
"https://gis.stackexchange.com/questions/40445",
"https://gis.stackexchange.com",
"https://gis.stackexchange.com/users/2874/"
] | Download data stored on an ArcGIS REST MapServer one layer at a time using the command line and the Python package [pyesridump](https://github.com/openaddresses/pyesridump).
Example command:
```
esri2geojson http://gis.naperville.il.us/arcgis/rest/services/OpenData/OpenDataMapService/MapServer/4 naperville_parking_l... | The functionality you are looking for is that of a Web Feature Service (WFS), not a Web Map Service (WMS). Here's a little more info... <http://blog.geoserver.org/2006/11/27/the-wfs-and-wms-services/> |
40,445 | Looking at this information page for a dataset hosted on esri.com:
<http://fema-services2.esri.com/arcgis/rest/services/2012_Sandy/ImageCat_NLT/MapServer/layers>
Trying to figure out how I can get access to the raw data (either raw lat/lng coordinates or SHP).
It looks like the data is available, I just can't figu... | 2012/11/06 | [
"https://gis.stackexchange.com/questions/40445",
"https://gis.stackexchange.com",
"https://gis.stackexchange.com/users/2874/"
] | Download data stored on an ArcGIS REST MapServer one layer at a time using the command line and the Python package [pyesridump](https://github.com/openaddresses/pyesridump).
Example command:
```
esri2geojson http://gis.naperville.il.us/arcgis/rest/services/OpenData/OpenDataMapService/MapServer/4 naperville_parking_l... | I know this is old, but I found an easier way using the ArcGIS Arcpy Python site package. If you don't need the GeoJSON/JSON and instead want the entire feature class as a result (or a subset using a where clause), you can just feature class to feature class it.
```
import arcpy
OutputLocation = "PATH_TO_OUTPUT_LOCAT... |
40,445 | Looking at this information page for a dataset hosted on esri.com:
<http://fema-services2.esri.com/arcgis/rest/services/2012_Sandy/ImageCat_NLT/MapServer/layers>
Trying to figure out how I can get access to the raw data (either raw lat/lng coordinates or SHP).
It looks like the data is available, I just can't figu... | 2012/11/06 | [
"https://gis.stackexchange.com/questions/40445",
"https://gis.stackexchange.com",
"https://gis.stackexchange.com/users/2874/"
] | I always find myself in situations where I need to export all the data from a Map Service into a shapefile. Here is a very easy utility to use that will export every feature from a service and save it as a shapefile and geojson if you need it. You will need to have or install node.js.
<https://github.com/tannerjt/AGSt... | Easier yet: Just use the geoprocessing tool Feature Class to Geodatabase. |
40,445 | Looking at this information page for a dataset hosted on esri.com:
<http://fema-services2.esri.com/arcgis/rest/services/2012_Sandy/ImageCat_NLT/MapServer/layers>
Trying to figure out how I can get access to the raw data (either raw lat/lng coordinates or SHP).
It looks like the data is available, I just can't figu... | 2012/11/06 | [
"https://gis.stackexchange.com/questions/40445",
"https://gis.stackexchange.com",
"https://gis.stackexchange.com/users/2874/"
] | The functionality you are looking for is that of a Web Feature Service (WFS), not a Web Map Service (WMS). Here's a little more info... <http://blog.geoserver.org/2006/11/27/the-wfs-and-wms-services/> | Easier yet: Just use the geoprocessing tool Feature Class to Geodatabase. |
6,337,344 | Is the term "activation object" just another name of "variable object" or is there actually any difference between them? I have been reading a few JavaScript articles about how variable scopes are formed in an execution context, and from my point of view it seems that in most of the articles they use these two terms in... | 2011/06/13 | [
"https://Stackoverflow.com/questions/6337344",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/711926/"
] | Well, I just learned something :). From [this article](http://jibbering.com/faq/notes/closures/), it would appear that *within the execution context of a function*, the Activation Object is used as the Variable Object:
>
> When an execution context is created a number of things happen in a defined order. First, in th... | An **activation object** is the uppermost object in a *scope-chain* with the lowermost being **global object**.
Whereas **variable object** is abstract concept and therefore, depending on its execution context, is any link in *scope-chain* including **activation/global object**.
---
It contains:
* all the *variables... |
6,337,344 | Is the term "activation object" just another name of "variable object" or is there actually any difference between them? I have been reading a few JavaScript articles about how variable scopes are formed in an execution context, and from my point of view it seems that in most of the articles they use these two terms in... | 2011/06/13 | [
"https://Stackoverflow.com/questions/6337344",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/711926/"
] | Well, I just learned something :). From [this article](http://jibbering.com/faq/notes/closures/), it would appear that *within the execution context of a function*, the Activation Object is used as the Variable Object:
>
> When an execution context is created a number of things happen in a defined order. First, in th... | It's more accurate to say that an Activation object is a type of Variable object. This is similar to how a man is a type of HUMAN. As stated [here](http://ify.io/javascripts-variable-global-and-activation-object/), the term 'Variable object' is just a GENERALISED term used to describe any object that holds the properti... |
6,337,344 | Is the term "activation object" just another name of "variable object" or is there actually any difference between them? I have been reading a few JavaScript articles about how variable scopes are formed in an execution context, and from my point of view it seems that in most of the articles they use these two terms in... | 2011/06/13 | [
"https://Stackoverflow.com/questions/6337344",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/711926/"
] | Well, I just learned something :). From [this article](http://jibbering.com/faq/notes/closures/), it would appear that *within the execution context of a function*, the Activation Object is used as the Variable Object:
>
> When an execution context is created a number of things happen in a defined order. First, in th... | An activated object just means an object that represents an element on a web page that an event occurred on. So if an image is clicked, the JavaScript object that represents that image is the activated object. |
6,337,344 | Is the term "activation object" just another name of "variable object" or is there actually any difference between them? I have been reading a few JavaScript articles about how variable scopes are formed in an execution context, and from my point of view it seems that in most of the articles they use these two terms in... | 2011/06/13 | [
"https://Stackoverflow.com/questions/6337344",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/711926/"
] | An **activation object** is the uppermost object in a *scope-chain* with the lowermost being **global object**.
Whereas **variable object** is abstract concept and therefore, depending on its execution context, is any link in *scope-chain* including **activation/global object**.
---
It contains:
* all the *variables... | It's more accurate to say that an Activation object is a type of Variable object. This is similar to how a man is a type of HUMAN. As stated [here](http://ify.io/javascripts-variable-global-and-activation-object/), the term 'Variable object' is just a GENERALISED term used to describe any object that holds the properti... |
6,337,344 | Is the term "activation object" just another name of "variable object" or is there actually any difference between them? I have been reading a few JavaScript articles about how variable scopes are formed in an execution context, and from my point of view it seems that in most of the articles they use these two terms in... | 2011/06/13 | [
"https://Stackoverflow.com/questions/6337344",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/711926/"
] | An **activation object** is the uppermost object in a *scope-chain* with the lowermost being **global object**.
Whereas **variable object** is abstract concept and therefore, depending on its execution context, is any link in *scope-chain* including **activation/global object**.
---
It contains:
* all the *variables... | An activated object just means an object that represents an element on a web page that an event occurred on. So if an image is clicked, the JavaScript object that represents that image is the activated object. |
6,337,344 | Is the term "activation object" just another name of "variable object" or is there actually any difference between them? I have been reading a few JavaScript articles about how variable scopes are formed in an execution context, and from my point of view it seems that in most of the articles they use these two terms in... | 2011/06/13 | [
"https://Stackoverflow.com/questions/6337344",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/711926/"
] | It's more accurate to say that an Activation object is a type of Variable object. This is similar to how a man is a type of HUMAN. As stated [here](http://ify.io/javascripts-variable-global-and-activation-object/), the term 'Variable object' is just a GENERALISED term used to describe any object that holds the properti... | An activated object just means an object that represents an element on a web page that an event occurred on. So if an image is clicked, the JavaScript object that represents that image is the activated object. |
19,470,956 | I have an array:
`array = ["one", "two", "two", "three"]`
Now I need to create a separate array with the percentages of each of these items out of the total array.
Final result:
`percentages_array = [".25",".50",".50",".25]`
I can do something like this:
```
percentage_array = []
one_count = array.grep(/one/).cou... | 2013/10/19 | [
"https://Stackoverflow.com/questions/19470956",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2665588/"
] | I would use the group by function:
```
my_array = ["one", "two", "two", "three"]
percentages = Hash[array.group_by{|x|x}.map{|x, y| [x, 1.0*y.size/my_array.size]}]
p percentages #=> {"one"=>0.25, "two"=>0.5, "three"=>0.25}
final = array.map{|x| percentages[x]}
p final #=> [0.25, 0.5, 0.5, 0.25]
```
Alternative... | ```
percentage_array = []
percents = [0.0, 0.0, 0.0]
array.each do |x|
number = find_number(x)
percents[number] += 1.0 / array.length
end
array.each do |x|
percentage_array.append(percents[find_number(x)].to_s)
end
def find_number(x)
if x == "two"
return 1
elsif x == "three"
return 2
end
return 0... |
19,470,956 | I have an array:
`array = ["one", "two", "two", "three"]`
Now I need to create a separate array with the percentages of each of these items out of the total array.
Final result:
`percentages_array = [".25",".50",".50",".25]`
I can do something like this:
```
percentage_array = []
one_count = array.grep(/one/).cou... | 2013/10/19 | [
"https://Stackoverflow.com/questions/19470956",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2665588/"
] | You could do this, but you find it more useful to just use the hash `h`:
```
array = ["one", "two", "two", "three"]
fac = 1.0/array.size
h = array.reduce(Hash.new(0)) {|h, e| h[e] += fac; h}
# => {"one"=>0.25, "two"=>0.5, "three"=>0.25}
array.map {|e| h[e]} # => [0.25, 0.5, 0.5, 0.25]
```
Edit: as @Victor sugg... | ```
percentage_array = []
percents = [0.0, 0.0, 0.0]
array.each do |x|
number = find_number(x)
percents[number] += 1.0 / array.length
end
array.each do |x|
percentage_array.append(percents[find_number(x)].to_s)
end
def find_number(x)
if x == "two"
return 1
elsif x == "three"
return 2
end
return 0... |
19,470,956 | I have an array:
`array = ["one", "two", "two", "three"]`
Now I need to create a separate array with the percentages of each of these items out of the total array.
Final result:
`percentages_array = [".25",".50",".50",".25]`
I can do something like this:
```
percentage_array = []
one_count = array.grep(/one/).cou... | 2013/10/19 | [
"https://Stackoverflow.com/questions/19470956",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2665588/"
] | I would use the group by function:
```
my_array = ["one", "two", "two", "three"]
percentages = Hash[array.group_by{|x|x}.map{|x, y| [x, 1.0*y.size/my_array.size]}]
p percentages #=> {"one"=>0.25, "two"=>0.5, "three"=>0.25}
final = array.map{|x| percentages[x]}
p final #=> [0.25, 0.5, 0.5, 0.25]
```
Alternative... | Here is a generalized way to do this:
```
def percents(arr)
map = Hash.new(0)
arr.each { |val| map[val] += 1 }
arr.map { |val| (map[val]/arr.count.to_f).to_s }
end
p percents(["one", "two", "two", "three"]) # prints ["0.25", "0.5", "0.5", "0.25"]
``` |
19,470,956 | I have an array:
`array = ["one", "two", "two", "three"]`
Now I need to create a separate array with the percentages of each of these items out of the total array.
Final result:
`percentages_array = [".25",".50",".50",".25]`
I can do something like this:
```
percentage_array = []
one_count = array.grep(/one/).cou... | 2013/10/19 | [
"https://Stackoverflow.com/questions/19470956",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2665588/"
] | I would use the group by function:
```
my_array = ["one", "two", "two", "three"]
percentages = Hash[array.group_by{|x|x}.map{|x, y| [x, 1.0*y.size/my_array.size]}]
p percentages #=> {"one"=>0.25, "two"=>0.5, "three"=>0.25}
final = array.map{|x| percentages[x]}
p final #=> [0.25, 0.5, 0.5, 0.25]
```
Alternative... | You could do this, but you find it more useful to just use the hash `h`:
```
array = ["one", "two", "two", "three"]
fac = 1.0/array.size
h = array.reduce(Hash.new(0)) {|h, e| h[e] += fac; h}
# => {"one"=>0.25, "two"=>0.5, "three"=>0.25}
array.map {|e| h[e]} # => [0.25, 0.5, 0.5, 0.25]
```
Edit: as @Victor sugg... |
19,470,956 | I have an array:
`array = ["one", "two", "two", "three"]`
Now I need to create a separate array with the percentages of each of these items out of the total array.
Final result:
`percentages_array = [".25",".50",".50",".25]`
I can do something like this:
```
percentage_array = []
one_count = array.grep(/one/).cou... | 2013/10/19 | [
"https://Stackoverflow.com/questions/19470956",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2665588/"
] | You could do this, but you find it more useful to just use the hash `h`:
```
array = ["one", "two", "two", "three"]
fac = 1.0/array.size
h = array.reduce(Hash.new(0)) {|h, e| h[e] += fac; h}
# => {"one"=>0.25, "two"=>0.5, "three"=>0.25}
array.map {|e| h[e]} # => [0.25, 0.5, 0.5, 0.25]
```
Edit: as @Victor sugg... | Here is a generalized way to do this:
```
def percents(arr)
map = Hash.new(0)
arr.each { |val| map[val] += 1 }
arr.map { |val| (map[val]/arr.count.to_f).to_s }
end
p percents(["one", "two", "two", "three"]) # prints ["0.25", "0.5", "0.5", "0.25"]
``` |
1,907,736 | I've started building an app with Flex/Air but am getting sick of it's clunkyness.
The app that I'm building has similar behaviour to Prezi (www.prezi.com) but in a completely different field.
I'm looking for something on the desktop which has flex like capabilities, such as drawing vectors then zooming in/out, rotat... | 2009/12/15 | [
"https://Stackoverflow.com/questions/1907736",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/37196/"
] | Qt (Python bindings: [PyQt](http://www.riverbankcomputing.co.uk/software/pyqt/intro)) is a flexible and mature framework that can certainly do that (take a look at QGraphicsView and QGraphicsScene for example).
You'll have to code most of it 'by hand' though (the designer is good for standard GUI widgets but is lacki... | If you have any .NET experience I would recommend Silverlight. I have worked with it in the academic setting and it has impressed me very much. Some of the examples are pretty mind blowing, for the web applications at least. I also know they did focus on making silverlight into exactly what your question asks, a framew... |
32,771,970 | Basically I am creating a form and I have looked at onchange with the targetElement toggle but I can't seem to figure it out.
Dropdown: A, B, C
Radio: A, B
If Dropdown A and Radio A is selected then it shows a certain div with text. If Dropdown B and Radio A it shows another set. It will all show and hide with the d... | 2015/09/24 | [
"https://Stackoverflow.com/questions/32771970",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5374089/"
] | I wasn't able to get any closer than your closest one.
But if it helps, here's an alternative way of writing the "I'm feeling lucky" URL.
<http://google.com/search?q=haimer+usa+40%2F840%2F1%2F8Z&btnI> | You can create a google custom search engine of your own, and either exclude certain sites or include specific sites only, use <http://cse.google.com> to do this.
There is a [SO tag](https://stackoverflow.com/questions/tagged/google-custom-search) for google custom search |
32,771,970 | Basically I am creating a form and I have looked at onchange with the targetElement toggle but I can't seem to figure it out.
Dropdown: A, B, C
Radio: A, B
If Dropdown A and Radio A is selected then it shows a certain div with text. If Dropdown B and Radio A it shows another set. It will all show and hide with the d... | 2015/09/24 | [
"https://Stackoverflow.com/questions/32771970",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5374089/"
] | I wasn't able to get any closer than your closest one.
But if it helps, here's an alternative way of writing the "I'm feeling lucky" URL.
<http://google.com/search?q=haimer+usa+40%2F840%2F1%2F8Z&btnI> | What I did to find the right url is to navigate to google.com. After this I turned my internet connection off. I entered the search details and pressed submit. You can now see the url in the address bar, but it doesn't redirect you to the first result. You can now copy the url and see how google treats your dots and ot... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.