Search is not available for this dataset
qid
int64
1
74.7M
question
stringlengths
1
70k
date
stringlengths
10
10
metadata
list
response_j
stringlengths
0
115k
response_k
stringlengths
0
60.5k
3,702,859
I am new to javascript/jquery . I have a small question. I have some thing like the following in the java script file. ``` <button id="button1" onclick=click() /> <button id="button2" onclick=click() /> <button id="button3" onclick=click() /> ``` so the click function looks like the follwoing ``` click(id){ /do so...
2010/09/13
[ "https://Stackoverflow.com/questions/3702859", "https://Stackoverflow.com", "https://Stackoverflow.com/users/436175/" ]
I advise the use of unobtrusive script as always, but if you *have* to have it inline use `this`, for example: ``` <button id="button1" onclick="click(this.id)" /> ``` The unobtrusive way would look like this: ``` $("button").click(function() { click(this.id); }); ```
For starters: Don't use onclick(). [This is the way](http://www.quirksmode.org/js/introevents.html) to do it properly. When you get your head around all this and think "boy that's a load of cowpat to write for a litte event!", turn towards jquery. Doing the same in jquery is [simple](http://api.jquery.com/click/).
3,702,859
I am new to javascript/jquery . I have a small question. I have some thing like the following in the java script file. ``` <button id="button1" onclick=click() /> <button id="button2" onclick=click() /> <button id="button3" onclick=click() /> ``` so the click function looks like the follwoing ``` click(id){ /do so...
2010/09/13
[ "https://Stackoverflow.com/questions/3702859", "https://Stackoverflow.com", "https://Stackoverflow.com/users/436175/" ]
I advise the use of unobtrusive script as always, but if you *have* to have it inline use `this`, for example: ``` <button id="button1" onclick="click(this.id)" /> ``` The unobtrusive way would look like this: ``` $("button").click(function() { click(this.id); }); ```
That not very jQuery-ish. You should rather use event listeners: ``` $(function() { $('#button1,#button2,#button3').click(clicked); function clicked() { // "this" will refer to the clicked button inside the function alert($(this).attr('id')); } }); ```
3,702,859
I am new to javascript/jquery . I have a small question. I have some thing like the following in the java script file. ``` <button id="button1" onclick=click() /> <button id="button2" onclick=click() /> <button id="button3" onclick=click() /> ``` so the click function looks like the follwoing ``` click(id){ /do so...
2010/09/13
[ "https://Stackoverflow.com/questions/3702859", "https://Stackoverflow.com", "https://Stackoverflow.com/users/436175/" ]
You don't need to. ``` function handleClick(){ //use $(this).attr("id"); //or $(this) to refer to the object being clicked } $(document).ready(function(){ $('#myButton').click(handleClick); }); ```
For starters: Don't use onclick(). [This is the way](http://www.quirksmode.org/js/introevents.html) to do it properly. When you get your head around all this and think "boy that's a load of cowpat to write for a litte event!", turn towards jquery. Doing the same in jquery is [simple](http://api.jquery.com/click/).
3,702,859
I am new to javascript/jquery . I have a small question. I have some thing like the following in the java script file. ``` <button id="button1" onclick=click() /> <button id="button2" onclick=click() /> <button id="button3" onclick=click() /> ``` so the click function looks like the follwoing ``` click(id){ /do so...
2010/09/13
[ "https://Stackoverflow.com/questions/3702859", "https://Stackoverflow.com", "https://Stackoverflow.com/users/436175/" ]
That not very jQuery-ish. You should rather use event listeners: ``` $(function() { $('#button1,#button2,#button3').click(clicked); function clicked() { // "this" will refer to the clicked button inside the function alert($(this).attr('id')); } }); ```
For starters: Don't use onclick(). [This is the way](http://www.quirksmode.org/js/introevents.html) to do it properly. When you get your head around all this and think "boy that's a load of cowpat to write for a litte event!", turn towards jquery. Doing the same in jquery is [simple](http://api.jquery.com/click/).
14,292,555
I am using spring's BasicDataSource in my applicationContext.xml as following: ``` <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springfr...
2013/01/12
[ "https://Stackoverflow.com/questions/14292555", "https://Stackoverflow.com", "https://Stackoverflow.com/users/970255/" ]
They are all [unprintable control characters](http://en.wikipedia.org/wiki/C0_and_C1_control_codes), the box is just a way to print them. Another option is to not show them at all but then you wouldn't know about them as easily. There's * `0x1F` Unit separator * `0x7F` Delete * `0x01` Start of Heading * `0x1C` File S...
Open the file in a hex editor. Hex editors normally show the value of each character in both binary and hexadecimal values.
14,292,555
I am using spring's BasicDataSource in my applicationContext.xml as following: ``` <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springfr...
2013/01/12
[ "https://Stackoverflow.com/questions/14292555", "https://Stackoverflow.com", "https://Stackoverflow.com/users/970255/" ]
They are all [unprintable control characters](http://en.wikipedia.org/wiki/C0_and_C1_control_codes), the box is just a way to print them. Another option is to not show them at all but then you wouldn't know about them as easily. There's * `0x1F` Unit separator * `0x7F` Delete * `0x01` Start of Heading * `0x1C` File S...
Clearly, those are "non printable" characters (in your current language, but quite possibly in all languages). Use `fprintf("%02x, %02x, %02x, %02x", buf[0], buf[1], buf[2], buf[3]);` to show their actual value.
34,491,004
I have a database with a large set of email addresses. Because of a bug in a script, the database is full of wrong email addresses. These addresses has a known pattern. They are made of a true email address, concatenated with a string in the beginning. This string is itself a part of the email address. Example: The...
2015/12/28
[ "https://Stackoverflow.com/questions/34491004", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2837813/" ]
You can use below query to take care of `LASTNAMEfirstname.lastname@something.com` pattern, This will first find the last\_name and then replace that with null in the first part before first `.`. ``` concat(replace(substr(email,1,locate('.',email)),substr(email,LOCATE('.',email)+1,locate('@',email)-LOCATE('.',email)-...
Can't test right now but this might work: `^([^@]{5,})[^@]{1,}\.\1@[^@]+$`
54,878,621
I have source code like the code below. I'm trying to scrape out the '11 tigers' string. I'm new to xpath, can anyone suggest how to get it using selenium or beatiful soup? I'm thinking `driver.find_element_by_xpath` or `soup.find_all`. source: ``` <div class="count-box fixed_when_handheld s-vgLeft0_5 s-vgPullBottom1...
2019/02/26
[ "https://Stackoverflow.com/questions/54878621", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5978130/" ]
You can use same `.count-box .label-container` css selector for both BS and Selenium. BS: ``` page = BeautifulSoup(yourhtml, "html.parser") # if you need first one label = page.select_one(".count-box .label-container").text # if you need all labels = page.select(".count-box .label-container") for label in labels: ...
Variant of the answer given by Sers. ``` page = BeautifulSoup(html_text, "lxml") # first one label = page.find('div',{'class':'count-box label-container')).text # for all labels = page.find('div',{'class':'count-box label-container')) for label in labels: print(label.text) ``` Use `lxml` parser as it's faster....
54,878,621
I have source code like the code below. I'm trying to scrape out the '11 tigers' string. I'm new to xpath, can anyone suggest how to get it using selenium or beatiful soup? I'm thinking `driver.find_element_by_xpath` or `soup.find_all`. source: ``` <div class="count-box fixed_when_handheld s-vgLeft0_5 s-vgPullBottom1...
2019/02/26
[ "https://Stackoverflow.com/questions/54878621", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5978130/" ]
You can use same `.count-box .label-container` css selector for both BS and Selenium. BS: ``` page = BeautifulSoup(yourhtml, "html.parser") # if you need first one label = page.select_one(".count-box .label-container").text # if you need all labels = page.select(".count-box .label-container") for label in labels: ...
To extract the text **11 tigers** you can use either of the following solution: * Using `css_selector`: ``` my_text = driver.find_element_by_css_selector("div.count-box>div.label-container.u-floatLeft").get_attribute("innerHTML") ``` * Using `xpath`: ``` my_text = driver.find_element_by_xpath("//div[contains(@class...
15,922,823
I am implementing a file-based queue of serialized objects, using C#. * `Push()` will serialize an object as binary and append it to the end of the file. * `Pop()` should deserialize an object from the beginning of the file (this part I got working). Then, the deserialized part should be removed from the file, making ...
2013/04/10
[ "https://Stackoverflow.com/questions/15922823", "https://Stackoverflow.com", "https://Stackoverflow.com/users/236660/" ]
Yes see the log eip <http://camel.apache.org/logeip.html> This allows you to log human readable messages to the log. You could have spotted it, by the green tip box on the log component page: <http://camel.apache.org/log>
> > **TL;DR** > > > * DO NOT forget about `camel.springboot.main-run-controller=true` in `application.properties` > * from("timer://scheduler?fixedRate=true&period=5s") > .log("Hello World!"); > > > Let me provide you the simplest example written in Java DSL. I will use the Spring Boot Camel starter to setup th...
3,802,669
> > $m^3-3m^2+2m$ is divisible by $79$ and $83$ where $m>2$. Find the > lowest value of $m$ > > > $m^3-3m^2+2m$ is the product of three consecutive integers. Both $79$ and $83$ are prime numbers. The product of three consecutive positive integers is divisible by $6$. So, $m^3-3m^2+2m$ is a multiple of $lcm(6,79,83...
2020/08/25
[ "https://math.stackexchange.com/questions/3802669", "https://math.stackexchange.com", "https://math.stackexchange.com/users/632797/" ]
The brute force method: as $m^3−3m^2+2m=m(m−1)(m−2)$, and $79,83$ are prime, you can just solve the following nine congruences: $m\equiv\alpha\pmod{79}$, $m\equiv\beta\pmod{83}$, where $\alpha,\beta\in\{0,1,2\}$. This is possible as per Chinese Remainder Theorem, and the smallest of the nine $m$'s you will get (greater...
You computed some admissible number (if you take the correct value for $m$) in the comments. Now you can just let the computer test all the smaller cases ``` m=np.arange(5000) x=m*(m-1)*(m-2) m[(x%83==0) & (x%79==0)] ``` which gives the result ``` [ 0, 1, 2, 1660, 1661, 3239, 3320, 4898, 4899] ``` from wh...
66,196,249
How do I increase the textarea height automatically so that the columns on the left and right are of the same height? [![enter image description here](https://i.stack.imgur.com/zgJt2.png)](https://i.stack.imgur.com/zgJt2.png)
2021/02/14
[ "https://Stackoverflow.com/questions/66196249", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14372041/" ]
The task is to split a string separated by '+'. In the below example, the delimiter ',' is used. Splitting a string into tokens is a very old task. There are many many solutions available. All have different properties. Some are difficult to understand, some are hard to develop, some are more complex, slower or faster...
You can use an `std::vector<std::string>` instead of `char[]`, that way, it would work with more than one-digit numbers. Try this: ``` #include <iostream> #include <vector> #include <string> #include <sstream> int main() { using namespace std; std::string str("1+2+3"); std::string buff; std::stringstr...
66,196,249
How do I increase the textarea height automatically so that the columns on the left and right are of the same height? [![enter image description here](https://i.stack.imgur.com/zgJt2.png)](https://i.stack.imgur.com/zgJt2.png)
2021/02/14
[ "https://Stackoverflow.com/questions/66196249", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14372041/" ]
The task is to split a string separated by '+'. In the below example, the delimiter ',' is used. Splitting a string into tokens is a very old task. There are many many solutions available. All have different properties. Some are difficult to understand, some are hard to develop, some are more complex, slower or faster...
Here are my steps: * convert the original `string` into `char*` * split the obtained `char*` with the delimiter `+` by using the function `strtok`. I store each token into a `vector<char>` * convert this `vector<char>` into a C char array `char*` ```cpp #include <iostream> #include <string.h> #include <vector> using ...
66,196,249
How do I increase the textarea height automatically so that the columns on the left and right are of the same height? [![enter image description here](https://i.stack.imgur.com/zgJt2.png)](https://i.stack.imgur.com/zgJt2.png)
2021/02/14
[ "https://Stackoverflow.com/questions/66196249", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14372041/" ]
The task is to split a string separated by '+'. In the below example, the delimiter ',' is used. Splitting a string into tokens is a very old task. There are many many solutions available. All have different properties. Some are difficult to understand, some are hard to develop, some are more complex, slower or faster...
You can run/check this code in <https://repl.it/@JomaCorpFX/StringSplit#main.cpp> **Code** ``` #include <iostream> #include <vector> std::vector<std::string> Split(const std::string &data, const std::string &toFind) { std::vector<std::string> v; if (data.empty() || toFind.empty()) { v.push_back(d...
66,196,249
How do I increase the textarea height automatically so that the columns on the left and right are of the same height? [![enter image description here](https://i.stack.imgur.com/zgJt2.png)](https://i.stack.imgur.com/zgJt2.png)
2021/02/14
[ "https://Stackoverflow.com/questions/66196249", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14372041/" ]
You can use an `std::vector<std::string>` instead of `char[]`, that way, it would work with more than one-digit numbers. Try this: ``` #include <iostream> #include <vector> #include <string> #include <sstream> int main() { using namespace std; std::string str("1+2+3"); std::string buff; std::stringstr...
Here are my steps: * convert the original `string` into `char*` * split the obtained `char*` with the delimiter `+` by using the function `strtok`. I store each token into a `vector<char>` * convert this `vector<char>` into a C char array `char*` ```cpp #include <iostream> #include <string.h> #include <vector> using ...
66,196,249
How do I increase the textarea height automatically so that the columns on the left and right are of the same height? [![enter image description here](https://i.stack.imgur.com/zgJt2.png)](https://i.stack.imgur.com/zgJt2.png)
2021/02/14
[ "https://Stackoverflow.com/questions/66196249", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14372041/" ]
You can use an `std::vector<std::string>` instead of `char[]`, that way, it would work with more than one-digit numbers. Try this: ``` #include <iostream> #include <vector> #include <string> #include <sstream> int main() { using namespace std; std::string str("1+2+3"); std::string buff; std::stringstr...
You can run/check this code in <https://repl.it/@JomaCorpFX/StringSplit#main.cpp> **Code** ``` #include <iostream> #include <vector> std::vector<std::string> Split(const std::string &data, const std::string &toFind) { std::vector<std::string> v; if (data.empty() || toFind.empty()) { v.push_back(d...
65,140,738
We have a case like this. ```java class A{ class foo{ //Map with a lot of entries private HashMap<String,String> dataMap; public updater(){ // updates dataMap // takes several milliseconds } public someAction(){ // needs to perform read on dataMap // several time...
2020/12/04
[ "https://Stackoverflow.com/questions/65140738", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14008598/" ]
You can use [IntersectionObserver](https://developer.mozilla.org/en-US/docs/Web/API/Intersection_Observer_API) API. In Angular you can write a directive for handle that: ``` @Directive({ selector: '[lazySrc]' }) export class ImgDataDirective implements OnInit, OnChanges { @Input('lazySrc') src: string; construc...
Your objective is to load the images visible on the screen. You can achieve this by adding an attribute to image tag. ``` <img loading=lazy> ``` Source: * <https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img#attr-loading> * <https://web.dev/browser-level-image-lazy-loading/> Working Example: <https://sta...
66,147,347
I'm trying to create a new column, "condition\_any", in `df` with {data.table} that is TRUE if any of the of the 3 conditions are TRUE, per row. I tried using `any(.SD)` with no luck: ``` library(data.table) df <- data.table(id = 1:3, date = Sys.Date() + 1:3, condition1 = c(T, F, F)...
2021/02/11
[ "https://Stackoverflow.com/questions/66147347", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8675075/" ]
This also doesn't use `any` but is a nice way to do it, ``` df[, condition_any := Reduce('|', .SD), .SDcols = patterns("^condition")] ```
I believe the code below will give what you want. You can check [this post](https://stackoverflow.com/questions/38032814/trying-to-understand-r-error-error-in-funxi-only-defined-on-a-data) to see the explanation of the error. ``` df$condition_any <- apply(df[,3:5], 1, function(x) any(x)) ```
66,147,347
I'm trying to create a new column, "condition\_any", in `df` with {data.table} that is TRUE if any of the of the 3 conditions are TRUE, per row. I tried using `any(.SD)` with no luck: ``` library(data.table) df <- data.table(id = 1:3, date = Sys.Date() + 1:3, condition1 = c(T, F, F)...
2021/02/11
[ "https://Stackoverflow.com/questions/66147347", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8675075/" ]
I believe the code below will give what you want. You can check [this post](https://stackoverflow.com/questions/38032814/trying-to-understand-r-error-error-in-funxi-only-defined-on-a-data) to see the explanation of the error. ``` df$condition_any <- apply(df[,3:5], 1, function(x) any(x)) ```
This uses `any` and works as intended but it would be slow since it is grouping the data rowwise. ``` library(data.table) df[, condition_any := any(unlist(.SD)), .SDcols = patterns("^condition"), 1:nrow(df)] df # id date condition1 condition2 condition3 condition_any #1: 1 2021-02-12 TRUE T...
66,147,347
I'm trying to create a new column, "condition\_any", in `df` with {data.table} that is TRUE if any of the of the 3 conditions are TRUE, per row. I tried using `any(.SD)` with no luck: ``` library(data.table) df <- data.table(id = 1:3, date = Sys.Date() + 1:3, condition1 = c(T, F, F)...
2021/02/11
[ "https://Stackoverflow.com/questions/66147347", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8675075/" ]
This also doesn't use `any` but is a nice way to do it, ``` df[, condition_any := Reduce('|', .SD), .SDcols = patterns("^condition")] ```
This uses `any` and works as intended but it would be slow since it is grouping the data rowwise. ``` library(data.table) df[, condition_any := any(unlist(.SD)), .SDcols = patterns("^condition"), 1:nrow(df)] df # id date condition1 condition2 condition3 condition_any #1: 1 2021-02-12 TRUE T...
160,370
I have been tasked with ensuring the CIS Bechmark on Amazon Linux 2016.09. Does anyone know of an examination tool that will output the difference between the current and the benchmark? Unfortunately I cannot use one of the existing marketplace AMI's.
2017/05/25
[ "https://security.stackexchange.com/questions/160370", "https://security.stackexchange.com", "https://security.stackexchange.com/users/149282/" ]
[Lynis](https://cisofy.com/lynis/) is the open source alternative which not only does CIS but few other compliance tests as well. The ability to modify the code to generate custom reports is handy for large number of systems.
Although it's not free, one way of assessing systems against CIS benchmarks is to use [Temable Nessus](https://www.tenable.com/products/nessus-vulnerability-scanner) Amongst other things, they have CIS audit files for Amazon Linux.
9,626,995
Ive been using the 'event' parameter for my KeyboardEvents and MouseEvents in a recent project ive been working on for my course (VERY BASIC). Im not entirely sure on what the 'e' part of e:KeyboardEvent actually does, and ive been asked to find out what information the parameter 'e' can actually access when using it....
2012/03/09
[ "https://Stackoverflow.com/questions/9626995", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1256106/" ]
I'm assuming you have some function like this ``` function someFunction(e:KeyboardEvent):void { // code } ``` You can access any information from the [KeyboardEvent](http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/events/KeyboardEvent.html) class, just the same as if the parameter were c...
You're naming the event that triggers the function, just like any other var it can be named anything. Then, depending on the type of event, you'll have access to a number of vars and function relating to whatever caused the event to trigger. Edit: [Here's](http://help.adobe.com/en_US/FlashPlatform/reference/actionscri...
9,626,995
Ive been using the 'event' parameter for my KeyboardEvents and MouseEvents in a recent project ive been working on for my course (VERY BASIC). Im not entirely sure on what the 'e' part of e:KeyboardEvent actually does, and ive been asked to find out what information the parameter 'e' can actually access when using it....
2012/03/09
[ "https://Stackoverflow.com/questions/9626995", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1256106/" ]
`e` represents an instance of `KeyboardEvent` (the instance being passed to your listening function). The most important property of `KeyboardEvent` (referenced by `e` in your example) is `keyCode`. This determines which key is being pressed/released. eg: ``` stage.addEventListener(KeyboardEvent.KEY_DOWN, _keyDown)...
You're naming the event that triggers the function, just like any other var it can be named anything. Then, depending on the type of event, you'll have access to a number of vars and function relating to whatever caused the event to trigger. Edit: [Here's](http://help.adobe.com/en_US/FlashPlatform/reference/actionscri...
9,626,995
Ive been using the 'event' parameter for my KeyboardEvents and MouseEvents in a recent project ive been working on for my course (VERY BASIC). Im not entirely sure on what the 'e' part of e:KeyboardEvent actually does, and ive been asked to find out what information the parameter 'e' can actually access when using it....
2012/03/09
[ "https://Stackoverflow.com/questions/9626995", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1256106/" ]
``` import flash.events.KeyboardEvent; stage.addEventListener(KeyboardEvent.KEY_DOWN, keyboardHandler); function keyboardHandler(Jack:KeyboardEvent):void{ trace(Jack.keyCode);///----------see output pannel } /////////////////--------or stage.addEventListener(KeyboardEvent.KEY_DOWN, keyboardHandler2); functio...
You're naming the event that triggers the function, just like any other var it can be named anything. Then, depending on the type of event, you'll have access to a number of vars and function relating to whatever caused the event to trigger. Edit: [Here's](http://help.adobe.com/en_US/FlashPlatform/reference/actionscri...
6,728,212
This is the point, I have a WCF service, it is working now. So I begin to work on the client side. And when the application was running, then an exception showed up: timeout. So I began to read, there are many examples about how to keep the connection alive, but, also I found that the best way, is create channel, use i...
2011/07/18
[ "https://Stackoverflow.com/questions/6728212", "https://Stackoverflow.com", "https://Stackoverflow.com/users/818519/" ]
the UseService method accepts a delegate, which uses the channel to send request. The delegate has a parameter and a return value. You can put the call to WCF service in the delegate. And in the UseService, it creates the channel and pass the channel to the delegate, which should be provided by you. After finishing th...
The proxy object implements more than just your contract - it also implements [IClientChannel](http://msdn.microsoft.com/en-us/library/system.servicemodel.iclientchannel.aspx) which allows control of the proxy lifetime The code in the first example is not reliable - it will leak if the channel is already busted (e.g. ...
6,728,212
This is the point, I have a WCF service, it is working now. So I begin to work on the client side. And when the application was running, then an exception showed up: timeout. So I began to read, there are many examples about how to keep the connection alive, but, also I found that the best way, is create channel, use i...
2011/07/18
[ "https://Stackoverflow.com/questions/6728212", "https://Stackoverflow.com", "https://Stackoverflow.com/users/818519/" ]
the UseService method accepts a delegate, which uses the channel to send request. The delegate has a parameter and a return value. You can put the call to WCF service in the delegate. And in the UseService, it creates the channel and pass the channel to the delegate, which should be provided by you. After finishing th...
To answer the question left in the comment in Jason's answer, a simple example of GetCachedFactory may look like the below. The example looks up the endpoint to create by finding the endpoint in the config file with the "Contract" attribute equal to the ConfigurationName of the service the factory is to create. ``` Ch...
6,728,212
This is the point, I have a WCF service, it is working now. So I begin to work on the client side. And when the application was running, then an exception showed up: timeout. So I began to read, there are many examples about how to keep the connection alive, but, also I found that the best way, is create channel, use i...
2011/07/18
[ "https://Stackoverflow.com/questions/6728212", "https://Stackoverflow.com", "https://Stackoverflow.com/users/818519/" ]
The proxy object implements more than just your contract - it also implements [IClientChannel](http://msdn.microsoft.com/en-us/library/system.servicemodel.iclientchannel.aspx) which allows control of the proxy lifetime The code in the first example is not reliable - it will leak if the channel is already busted (e.g. ...
To answer the question left in the comment in Jason's answer, a simple example of GetCachedFactory may look like the below. The example looks up the endpoint to create by finding the endpoint in the config file with the "Contract" attribute equal to the ConfigurationName of the service the factory is to create. ``` Ch...
37,945,115
I am using Rfacebook to extract some content from Facebook's API through R. I somehow get sometimes posts two or three times back even though they only appear 1 time in facebook. Probably some problem with my crawler. I extracted already a lot of data and don't want to rerun the crawling. So I was thinking about cleani...
2016/06/21
[ "https://Stackoverflow.com/questions/37945115", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5223902/" ]
You just need a brief wait to wait until the `DIV` that contains the error message appears. The code below is working for me. ``` WebDriver driver = new FirefoxDriver(); driver.get("https://app.ghostinspector.com/account/create"); driver.findElement(By.id("input-firstName")).sendKeys("Johnny"); driver.findElement(By.i...
Try usinfg this to clear the text box ``` driver.switchTo().alert().getText(); ```
37,945,115
I am using Rfacebook to extract some content from Facebook's API through R. I somehow get sometimes posts two or three times back even though they only appear 1 time in facebook. Probably some problem with my crawler. I extracted already a lot of data and don't want to rerun the crawling. So I was thinking about cleani...
2016/06/21
[ "https://Stackoverflow.com/questions/37945115", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5223902/" ]
You just need a brief wait to wait until the `DIV` that contains the error message appears. The code below is working for me. ``` WebDriver driver = new FirefoxDriver(); driver.get("https://app.ghostinspector.com/account/create"); driver.findElement(By.id("input-firstName")).sendKeys("Johnny"); driver.findElement(By.i...
you are using getAttribute("value") to get the text from the div element. try using email\_in\_use.getText().
37,945,115
I am using Rfacebook to extract some content from Facebook's API through R. I somehow get sometimes posts two or three times back even though they only appear 1 time in facebook. Probably some problem with my crawler. I extracted already a lot of data and don't want to rerun the crawling. So I was thinking about cleani...
2016/06/21
[ "https://Stackoverflow.com/questions/37945115", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5223902/" ]
You just need a brief wait to wait until the `DIV` that contains the error message appears. The code below is working for me. ``` WebDriver driver = new FirefoxDriver(); driver.get("https://app.ghostinspector.com/account/create"); driver.findElement(By.id("input-firstName")).sendKeys("Johnny"); driver.findElement(By.i...
You need to implement `WebDriverWait` here to `getText()` because the `error` element already present there without any text and it fill with text when any error occurred like **E-mail address is already in use.** So you need to wait until `error` element has some text as like below :- ``` WebDriverWait wait = new W...
37,945,115
I am using Rfacebook to extract some content from Facebook's API through R. I somehow get sometimes posts two or three times back even though they only appear 1 time in facebook. Probably some problem with my crawler. I extracted already a lot of data and don't want to rerun the crawling. So I was thinking about cleani...
2016/06/21
[ "https://Stackoverflow.com/questions/37945115", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5223902/" ]
You just need a brief wait to wait until the `DIV` that contains the error message appears. The code below is working for me. ``` WebDriver driver = new FirefoxDriver(); driver.get("https://app.ghostinspector.com/account/create"); driver.findElement(By.id("input-firstName")).sendKeys("Johnny"); driver.findElement(By.i...
Have you tried `element.getAttribute('value')` ? [src](https://github.com/angular/protractor/issues/1794)
17,887,757
I am using JQuery for autocompleting the search textbox with my database. The problem rises when I want to access the text of the search textbox in query string since I am using html textbox. To make it in context, either I have to use `runat="server"` or I can use `asp:Textbox` but in both the cases my autocompleting ...
2013/07/26
[ "https://Stackoverflow.com/questions/17887757", "https://Stackoverflow.com", "https://Stackoverflow.com/users/550927/" ]
In short, yes - this will standardize the dummy variables, but there's a reason for doing so. The `glmnet` function takes a matrix as an input for its `X` parameter, not a data frame, so it doesn't make the distinction for `factor` columns which you may have if the parameter was a `data.frame`. If you take a look at th...
`glmnet` doesn't know anything about dummy variables, because it doesn't have a formula interface (and hence doesn't touch `model.frame` and `model.matrix`.) If you want them to be treated specially, you'll have to do it yourself.
13,376,682
I have a BizTalk 2010 project containing an orchestration that needs to make an HTTP Post and then examine the Status Code and Body of the Response to determine the next course of action. I can configure the orchestration and port to make the HTTP Post, but I am unable to receive a response. Should I be using a send...
2012/11/14
[ "https://Stackoverflow.com/questions/13376682", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1823305/" ]
If you are looking for a kind of notification ( not in content of the message) that the message has been successfully transmitted, you can set the logical send port property in the orchestration as follows: ``` "Delivery Notification" = Transmitted ``` And delivery failures can be handled using the Microsoft.XLANGs....
The Http Status Code should be available on the Response message as a Context Property, which you can access in an Expression shape. ``` statusCode = ResponseMessage(HTTP.ResponseStatusCode); ``` Your ResponseMessage should be of type System.Xml.XmlDocument, but as it won't be a real Xml Document, make sure the Requ...