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
64,951,561
I am trying Learning Nodejs and MongoDb. So what I did is created a simple Webpage which saves quotes to MongoDb and retrieves it. But I am unable to get data from MongoDb I am getting the Nodejs Error which says ``` Error [ERR_HTTP_HEADERS_SENT]: Cannot set headers after they are sent to the client at ServerResp...
2020/11/22
[ "https://Stackoverflow.com/questions/64951561", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13998817/" ]
Remove the `res.end()` that's after your call to `res.render()` because `res.render()` already ends the request and trying to end it again is causing your warning message.
One of the way that I find very helpful that when you are sending a response or rendering something you can place return before that so the function will not go after the return statement example:- `return res.status(200).json({success:true, msg:"something good happened"})`
54,807,939
I am going to create the spring boot application having JPA for database operations and I have to provide the search engine (search for only data(like module links, documents along with small description) inside my web application) using Elastic search. My question is to: * Can I have to search the text around the ta...
2019/02/21
[ "https://Stackoverflow.com/questions/54807939", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9565072/" ]
**For any insert/update:** 1. First fire a DB insert/update call. Wait for it to complete. 2. Fire an insert/update into Elasticsearch call in Async way using REST API. **For any Search:** 1. Fire every search call to ElasticSearch.
Mmm, May be you can use Logstash (It's an element of elasticsearch stack) In a project, years ago, I used Logstash to migrate mysql databases to elasticsearch I think that may be the best way is: Persist elements in transactions, this elements will be availables to search. The best way to search? Can you be more sp...
60,936,479
I have a windows server 2012 with bitvise ssh server installed on it, beside git and git bash, I have set up a virtual user and git it full permission over a folder contains a git repository (Let's call it GR). Now when I open the server via remove desktop connection and open GR folder using cmd and perform `git pull` ...
2020/03/30
[ "https://Stackoverflow.com/questions/60936479", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5638364/" ]
The right answer totally depends on you! If you *already* have ansible playbooks that you can run locally, I'd use them! If you *already* have bash scripts that can bootstrap your instances, I'd use them! Either way, you'll need to utilize [user-data](https://www.terraform.io/docs/providers/aws/r/launch_configuratio...
I will always prefer for bash or power-shell script to invoked through user data rather than Ansible as I am more comfortable to write bash/powershell scripts. So basically, its choice and how convenient you are in Ansible. If you need any sample user data code to invoke bash, pls let me know.
77,404
I have this MacBook Pro that I recently bought, I love the fact that it is glass and metal almost more than I like the OS but something recently occurred to me. Is it possible that in my years of sweaty palms resting on this aluminum that I will be rubbing off aluminum and absorbing it in my skin? I heard aluminum toxi...
2009/12/01
[ "https://superuser.com/questions/77404", "https://superuser.com", "https://superuser.com/users/48219/" ]
Aluminum is the third most common element on Earth. We are exposed to it constantly. The amount of extra Aluminum you would absorb from your laptop is too small to measure. On exposure to oxygen Aluminum forms an oxide that seals the surface. This is form we are exposed to.
The amount you would possibly absorb is very small if any. There are likley more sources that you encounter every day. Last I read, the link between Alzheimer's and Aluminium was unproven and there were more likely triggers. I am sure there is a fair bit of info from your local Alzheimer's society.
77,404
I have this MacBook Pro that I recently bought, I love the fact that it is glass and metal almost more than I like the OS but something recently occurred to me. Is it possible that in my years of sweaty palms resting on this aluminum that I will be rubbing off aluminum and absorbing it in my skin? I heard aluminum toxi...
2009/12/01
[ "https://superuser.com/questions/77404", "https://superuser.com", "https://superuser.com/users/48219/" ]
The amount you would possibly absorb is very small if any. There are likley more sources that you encounter every day. Last I read, the link between Alzheimer's and Aluminium was unproven and there were more likely triggers. I am sure there is a fair bit of info from your local Alzheimer's society.
Aluminium is a real concern as it was linked to Alzheimer and the oxide layer gets rubbed off by sweat acidity - so yes you should be worried about extra exposure through your skin. If you want to minimize that, install a palm rest made of neutral plastic and that will minimize that exposure.
77,404
I have this MacBook Pro that I recently bought, I love the fact that it is glass and metal almost more than I like the OS but something recently occurred to me. Is it possible that in my years of sweaty palms resting on this aluminum that I will be rubbing off aluminum and absorbing it in my skin? I heard aluminum toxi...
2009/12/01
[ "https://superuser.com/questions/77404", "https://superuser.com", "https://superuser.com/users/48219/" ]
Aluminum is the third most common element on Earth. We are exposed to it constantly. The amount of extra Aluminum you would absorb from your laptop is too small to measure. On exposure to oxygen Aluminum forms an oxide that seals the surface. This is form we are exposed to.
Aluminum quickly forms a thin layer of oxidation when exposed to air. Most harmful exposure to aluminum is in the form of water-soluble aluminum ions, or very fine particles such as in manufacturing. I would be more afraid of that aluminum Pepsi can or the pan I prepare my dinner in. (hint) I don't spend much time worr...
77,404
I have this MacBook Pro that I recently bought, I love the fact that it is glass and metal almost more than I like the OS but something recently occurred to me. Is it possible that in my years of sweaty palms resting on this aluminum that I will be rubbing off aluminum and absorbing it in my skin? I heard aluminum toxi...
2009/12/01
[ "https://superuser.com/questions/77404", "https://superuser.com", "https://superuser.com/users/48219/" ]
Aluminum is the third most common element on Earth. We are exposed to it constantly. The amount of extra Aluminum you would absorb from your laptop is too small to measure. On exposure to oxygen Aluminum forms an oxide that seals the surface. This is form we are exposed to.
Aluminium is a real concern as it was linked to Alzheimer and the oxide layer gets rubbed off by sweat acidity - so yes you should be worried about extra exposure through your skin. If you want to minimize that, install a palm rest made of neutral plastic and that will minimize that exposure.
77,404
I have this MacBook Pro that I recently bought, I love the fact that it is glass and metal almost more than I like the OS but something recently occurred to me. Is it possible that in my years of sweaty palms resting on this aluminum that I will be rubbing off aluminum and absorbing it in my skin? I heard aluminum toxi...
2009/12/01
[ "https://superuser.com/questions/77404", "https://superuser.com", "https://superuser.com/users/48219/" ]
Aluminum quickly forms a thin layer of oxidation when exposed to air. Most harmful exposure to aluminum is in the form of water-soluble aluminum ions, or very fine particles such as in manufacturing. I would be more afraid of that aluminum Pepsi can or the pan I prepare my dinner in. (hint) I don't spend much time worr...
Aluminium is a real concern as it was linked to Alzheimer and the oxide layer gets rubbed off by sweat acidity - so yes you should be worried about extra exposure through your skin. If you want to minimize that, install a palm rest made of neutral plastic and that will minimize that exposure.
965,602
I have enabled Apache proxy and http\_proxy modules in order to reverse proxy some requests coming on port 80, only for a virtualhost, to localhost:3000 (where nuxt with node is running). The proxy configuration in the virtualhost is pretty easy: ``` ProxyRequests off <Proxy *> Require all granted </Proxy> ProxyPres...
2019/05/02
[ "https://serverfault.com/questions/965602", "https://serverfault.com", "https://serverfault.com/users/521837/" ]
`[proxy:error] [pid :pid] [client xxx.xxx.xxx.xxx:xxxxx] AH00898: Error reading from remote server returned by /` This means that Apache could not read the response from the service behind `ProxyPass`. Perhaps the service on port 3000 actually does have issues serving it's content. Try looking for the issue there, t...
Have you tried adding starting & ending quote(`""`) around slash(`/`) ? Means: ``` ProxyPass "/" "http://localhost:3000/" retry=1 acquire=3000 timeout=3000 keepalive=off ProxyPassReverse "/" "http://localhost:3000/" ``` May be it's causing trouble. Reference: <https://httpd.apache.org/docs/2.4/mod/mod_proxy.html>
11,746,801
im getting EXC\_BAD\_ACCESS when i scroll my TableView. I heard something like alloc being called wrong, I dont know. Here's my code: ``` -(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { return [[resultsDictionary objectForKey: @"bills"] count]; } ...
2012/07/31
[ "https://Stackoverflow.com/questions/11746801", "https://Stackoverflow.com", "https://Stackoverflow.com/users/486509/" ]
It looks like `resultsDictionary` is a dangling pointer. If you are using ARC, you need a strong reference to it somewhere. If you are not using ARC, you need to retain it somewhere.
Fixed. My billsArray was missing 'self' instance, as inside of cellForRowAtIndexPath method. Thanks to everyone.
15,705,150
after I import the project from **git**, it succesfully download all libraries. But when I tried to **rebuild project**, it throws this error, that I didn't find anywhere on the internet. ``` Android Dex: [name_of_project] Unable to execute DX Android Dex: [name_of_project] java.io.FileNotFoundException: C:\Windows\S...
2013/03/29
[ "https://Stackoverflow.com/questions/15705150", "https://Stackoverflow.com", "https://Stackoverflow.com/users/997777/" ]
Your system has profile redirection enabled and you are affected by a [Java Bug](http://bugs.sun.com/view_bug.do?bug_id=4787931). Check [this KB document](http://intellij-support.jetbrains.com/entries/23348963) for the solution.
In my case the problem was in module sdk version. I changed it from 2.2 to 4.4 and the problem was solved.
17,436,498
I have a C++ function that converts a unsigned long into a 8 bit hex char string. I need to come up with a reverse function that takes a 8 bit hex char string and converts it into an unsigned integer representing it's bytes. Original UINT -> char[8] method: ``` std::string ResultsToHex( unsigned int EncodeResults) { ...
2013/07/02
[ "https://Stackoverflow.com/questions/17436498", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2544408/" ]
You need to scan the string and convert each hexadecimal character back to it's corresponding 4 bit binary value. You can do this with a simple set of `if` statements that checks the character to see if it's valid and if so convert it back. After a character has been converted, shift your result variable left by 4 bit...
Why do you do it manually? There's plenty of tools that do that for you. For example, stringstream. This converts an int to a hex-string: ``` std::stringstream stream; stream << std::hex << your_int; std::string result( stream.str() ); ``` [code copied from [Integer to hex string in C++](https://stackoverflow.com/q...
64,424
This may sound like a silly question, but I have been wondering about this for a while. I live in a suburban neighborhood with a lot of trees. A lot of trees means birds and squirrels. You can hear them all day and cant leave the house without seeing them. So why don't we see dead birds and squirrels more often? I onl...
2017/08/04
[ "https://biology.stackexchange.com/questions/64424", "https://biology.stackexchange.com", "https://biology.stackexchange.com/users/35485/" ]
A major cause of squirrel death is predation: * [Survival and mortality of the Arizona gray squirrel (Sciurus arizonensis)](https://cals.arizona.edu/research/redsquirrel/res_pdf/Cudworth&Koprowski2014SWNat_Survival&MortAZGraySqrl.pdf) * [Causes of red squirrel (Sciurus vulgaris) mortality in England](http://veterinary...
When a squirrel dies in a nest, the other squirrels who use the nest leave the remains there. The deceased body adds insulation and structure to the nest. I read where when a drey (squirrel nest) is removed it is not uncommon to find the skeletal remains of more than one squirrel. As for the birds, I had a bird hit my...
32,400,639
I am working through Learn Python the Hard Way using Power Shell and NotePad++. I have gotten to the part where I am using `.readline()` and I noticed the first character of the first argument in my function gets deleted or overwritten with a space. I know there already is a question that sort of seems to answer this...
2015/09/04
[ "https://Stackoverflow.com/questions/32400639", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5233224/" ]
The method readline() reads one entire line from the file. A trailing newline character is kept in the string. You don't have to put readline twice. If you will put that then you will get the result like line2,line4,line6 and empty string for the arg3 passed. try the following code for the method defined. ``` def foo...
The readline() output always contains end-of-line character at the end. You can see them with repr() function: ``` print repr(bl.readline()) ``` In most cases, you want to strip them: ``` bl.readline().rstrip('\r\n') ``` If you do not care about regular spaces at the beginning/end of the line, you can simplify th...
32,400,639
I am working through Learn Python the Hard Way using Power Shell and NotePad++. I have gotten to the part where I am using `.readline()` and I noticed the first character of the first argument in my function gets deleted or overwritten with a space. I know there already is a question that sort of seems to answer this...
2015/09/04
[ "https://Stackoverflow.com/questions/32400639", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5233224/" ]
The method readline() reads one entire line from the file. A trailing newline character is kept in the string. You don't have to put readline twice. If you will put that then you will get the result like line2,line4,line6 and empty string for the arg3 passed. try the following code for the method defined. ``` def foo...
Upon advise of theamk, jonrsharpe, Martijn Pieters and Nitu I tried the following script: ``` from sys import argv script, input_filename = argv def foo (arg1,arg2,arg3): print arg1,arg2,arg3.readline().strip("\r\n") def bar (arg1, arg2, arg3): print arg2,arg1,repr(arg3.readline().strip("\r\n")) open_input_...
2,394,659
This question is a follow up of my previous question. First thanks for the links and examples, they do work voor a CMDIChildWnd derived CChildFrame class, but not for a CMDIChildWndEx derived one. What i want to do: I want to create a toolbar in the CChildFrame window (derived from CMDIChildWndEx !!) What i have do...
2010/03/07
[ "https://Stackoverflow.com/questions/2394659", "https://Stackoverflow.com", "https://Stackoverflow.com/users/284622/" ]
This seems to work for a CMFCToolBar ``` int CChildFrame::OnCreate(LPCREATESTRUCT lpCreateStruct) { if (CMDIChildWndEx::OnCreate(lpCreateStruct) == -1) return -1; m_wndToolBar.Create(this, AFX_DEFAULT_TOOLBAR_STYLE, IDR_CHILDFRAME); m_wndToolBar.LoadToolBar(IDR_CHILDFRAME, 0, 0, TRUE ); m_wndToolBar.Set...
You should set m\_bEnableFloatingBars = TRUE in MDIChild constructor. Without this your toolbar will no be docked by mouse, only static docking.
64,141,013
Im wondering why this function is returning this error: Uncaught ReferenceError: capasPlay is not defined at funPlay.handleFunPlay ``` funPlay.prototype.handleFunPlay = function handleFunPlay() { capasPlay = [capa4_48R, capa4_49R, capa4_50R, capa4_51R, capa4_52R, capa4_53R, capa4_54R, capa4_55R, capa4_56R]; ...
2020/09/30
[ "https://Stackoverflow.com/questions/64141013", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14353648/" ]
> > If you are not using vanilla Javascript, you need to explicitly define > variables with a `var`, `const` or `let`. > > > ``` const capasPlay = [ ... ] ```
I'm assuming that you replaced whatever property you're actually calling with "X"? I see an issue with your loop which would cause an undefined property error. `index` will be out of range when the function triggered by `setTimeout` is called. To fix this, you need to save a copy of the current index for each iteratio...
51,460,540
I have the following program and I am trying to replace the space in the character array with "%20". For example, if I have this ['a','b',' '], the output would be this ['a','b','%20']. This is the program: ``` import java.util.*; import java.util.Scanner; class some_str { String str1; String space_method(String ...
2018/07/21
[ "https://Stackoverflow.com/questions/51460540", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8857690/" ]
This is what you want: ``` String replaceSpace(String string) { StringBuilder sb = new StringBuilder(); for(char c : string.toCharArray()) { if (c == ' ') { sb.append("%20"); } else { sb.append(c); } } return sb.toString(); } ``` Note that you can't put...
We know that Strings are immutable so to replace all the space characters with the %20 in our string, we can either first convert our String to the array of characters which is what you did and manipulate or we can use StringBuilder class, which you can think of as a mutable string but it is basically an array of chars...
51,460,540
I have the following program and I am trying to replace the space in the character array with "%20". For example, if I have this ['a','b',' '], the output would be this ['a','b','%20']. This is the program: ``` import java.util.*; import java.util.Scanner; class some_str { String str1; String space_method(String ...
2018/07/21
[ "https://Stackoverflow.com/questions/51460540", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8857690/" ]
Try this:- ``` str.replace(" ", "%20"); ``` This method replace all spaces with `%20` substring and not **char** because `%20` is not a char.
We know that Strings are immutable so to replace all the space characters with the %20 in our string, we can either first convert our String to the array of characters which is what you did and manipulate or we can use StringBuilder class, which you can think of as a mutable string but it is basically an array of chars...
24,324
I have an RF link module with surface mount connectors 2mm apart. This is the [datasheet](http://www.maplin.co.uk/media/pdfs/A58JN%20Datasheet.pdf). How would I connect this to a breadboard with 2.54mm spacing?
2011/12/29
[ "https://electronics.stackexchange.com/questions/24324", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/7258/" ]
You'd need to build a board which breaks out these pins to 0.1" pitch headers. That said, think about what you're connecting: An RF module! The datasheet reads: > > It needs only an MCU, crystal, decoupling capacitor and antenna to build a high reliability FSK transmitter. > > > The MCU will communicate over SPI...
I'd considering making a toner-transfer PC board with pads for a single row of 2.54mm headers overhanging one edge, which I would solder to the surface of the board (ie, surface mount a straight header as a substitute for a through hole right angle one). I'd probably make the connections up to the module by soldering b...
24,324
I have an RF link module with surface mount connectors 2mm apart. This is the [datasheet](http://www.maplin.co.uk/media/pdfs/A58JN%20Datasheet.pdf). How would I connect this to a breadboard with 2.54mm spacing?
2011/12/29
[ "https://electronics.stackexchange.com/questions/24324", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/7258/" ]
I'd considering making a toner-transfer PC board with pads for a single row of 2.54mm headers overhanging one edge, which I would solder to the surface of the board (ie, surface mount a straight header as a substitute for a through hole right angle one). I'd probably make the connections up to the module by soldering b...
I have soldered pins to a very similar RFM12 and bent them to get the 2.54mm spacing. In your case you only need to connect four pins on each side to the breadboard, so this is easily possible.
24,324
I have an RF link module with surface mount connectors 2mm apart. This is the [datasheet](http://www.maplin.co.uk/media/pdfs/A58JN%20Datasheet.pdf). How would I connect this to a breadboard with 2.54mm spacing?
2011/12/29
[ "https://electronics.stackexchange.com/questions/24324", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/7258/" ]
I'd considering making a toner-transfer PC board with pads for a single row of 2.54mm headers overhanging one edge, which I would solder to the surface of the board (ie, surface mount a straight header as a substitute for a through hole right angle one). I'd probably make the connections up to the module by soldering b...
You can use 2mm pins to connect the device to 2.54mm breadboard , not all pins are in total of 16 pins 3 are out but they not needed for my purpose(link to product in comment) : [![enter image description here](https://i.stack.imgur.com/iqKjz.jpg)](https://i.stack.imgur.com/iqKjz.jpg) [![enter image description here]...
24,324
I have an RF link module with surface mount connectors 2mm apart. This is the [datasheet](http://www.maplin.co.uk/media/pdfs/A58JN%20Datasheet.pdf). How would I connect this to a breadboard with 2.54mm spacing?
2011/12/29
[ "https://electronics.stackexchange.com/questions/24324", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/7258/" ]
You'd need to build a board which breaks out these pins to 0.1" pitch headers. That said, think about what you're connecting: An RF module! The datasheet reads: > > It needs only an MCU, crystal, decoupling capacitor and antenna to build a high reliability FSK transmitter. > > > The MCU will communicate over SPI...
I have soldered pins to a very similar RFM12 and bent them to get the 2.54mm spacing. In your case you only need to connect four pins on each side to the breadboard, so this is easily possible.
24,324
I have an RF link module with surface mount connectors 2mm apart. This is the [datasheet](http://www.maplin.co.uk/media/pdfs/A58JN%20Datasheet.pdf). How would I connect this to a breadboard with 2.54mm spacing?
2011/12/29
[ "https://electronics.stackexchange.com/questions/24324", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/7258/" ]
You'd need to build a board which breaks out these pins to 0.1" pitch headers. That said, think about what you're connecting: An RF module! The datasheet reads: > > It needs only an MCU, crystal, decoupling capacitor and antenna to build a high reliability FSK transmitter. > > > The MCU will communicate over SPI...
You can use 2mm pins to connect the device to 2.54mm breadboard , not all pins are in total of 16 pins 3 are out but they not needed for my purpose(link to product in comment) : [![enter image description here](https://i.stack.imgur.com/iqKjz.jpg)](https://i.stack.imgur.com/iqKjz.jpg) [![enter image description here]...
81,423
I've been working at my current job for around 18 months and the business have had its share of ups and downs. My job is team lead of a small team, which includes software development and also conversations with the software team, team mates, management, etc. The conversations are increased further because we are also ...
2016/12/14
[ "https://workplace.stackexchange.com/questions/81423", "https://workplace.stackexchange.com", "https://workplace.stackexchange.com/users/61617/" ]
Divert with basic time management ================================= At the start of the meetings just outline a brief agenda and how long the meeting will take. This should negate entirely the need for a timer and you just carry on as normal. If the timer is placed on the table during ad-hoc meetings, then this could...
There's a few things that make me thing your manager doesn't really know how to utilise agile properly. The idea is that in sprint planning the topics are discussed and the workload for the sprint is set. This is the time where the discussions you are having should happen (although I clearly get that these discussions ...
81,423
I've been working at my current job for around 18 months and the business have had its share of ups and downs. My job is team lead of a small team, which includes software development and also conversations with the software team, team mates, management, etc. The conversations are increased further because we are also ...
2016/12/14
[ "https://workplace.stackexchange.com/questions/81423", "https://workplace.stackexchange.com", "https://workplace.stackexchange.com/users/61617/" ]
Divert with basic time management ================================= At the start of the meetings just outline a brief agenda and how long the meeting will take. This should negate entirely the need for a timer and you just carry on as normal. If the timer is placed on the table during ad-hoc meetings, then this could...
If a manager is timing work-related conversations, I'd say "we will be having this conversation until we've resolved the issue. We're trying to get work done here." It sounds to me like despite hearing the conversation he's trying to paint you as goofing off.
81,423
I've been working at my current job for around 18 months and the business have had its share of ups and downs. My job is team lead of a small team, which includes software development and also conversations with the software team, team mates, management, etc. The conversations are increased further because we are also ...
2016/12/14
[ "https://workplace.stackexchange.com/questions/81423", "https://workplace.stackexchange.com", "https://workplace.stackexchange.com/users/61617/" ]
> > How should I approach this? > > > In an agile setting, you put this on the table in your next **retrospective meeting**. Decide how you feel about it as a team and talk to the member of the management staff. You may need help with your *agile* setting. The fact that a member of the management staff has not a ...
There's a few things that make me thing your manager doesn't really know how to utilise agile properly. The idea is that in sprint planning the topics are discussed and the workload for the sprint is set. This is the time where the discussions you are having should happen (although I clearly get that these discussions ...
81,423
I've been working at my current job for around 18 months and the business have had its share of ups and downs. My job is team lead of a small team, which includes software development and also conversations with the software team, team mates, management, etc. The conversations are increased further because we are also ...
2016/12/14
[ "https://workplace.stackexchange.com/questions/81423", "https://workplace.stackexchange.com", "https://workplace.stackexchange.com/users/61617/" ]
> > How should I approach this? > > > In an agile setting, you put this on the table in your next **retrospective meeting**. Decide how you feel about it as a team and talk to the member of the management staff. You may need help with your *agile* setting. The fact that a member of the management staff has not a ...
If a manager is timing work-related conversations, I'd say "we will be having this conversation until we've resolved the issue. We're trying to get work done here." It sounds to me like despite hearing the conversation he's trying to paint you as goofing off.
81,423
I've been working at my current job for around 18 months and the business have had its share of ups and downs. My job is team lead of a small team, which includes software development and also conversations with the software team, team mates, management, etc. The conversations are increased further because we are also ...
2016/12/14
[ "https://workplace.stackexchange.com/questions/81423", "https://workplace.stackexchange.com", "https://workplace.stackexchange.com/users/61617/" ]
There's a few things that make me thing your manager doesn't really know how to utilise agile properly. The idea is that in sprint planning the topics are discussed and the workload for the sprint is set. This is the time where the discussions you are having should happen (although I clearly get that these discussions ...
If a manager is timing work-related conversations, I'd say "we will be having this conversation until we've resolved the issue. We're trying to get work done here." It sounds to me like despite hearing the conversation he's trying to paint you as goofing off.
4,053,748
I have been trying to find an 'easy' way of including files in my PHP docs that are subject to mod\_rewrite address changes. At the moment our config.php file is located in public\_html/lib/config.php, and what I have tried to do is `include('lib/config.php')` but it errors on pages that have had their address changed...
2010/10/29
[ "https://Stackoverflow.com/questions/4053748", "https://Stackoverflow.com", "https://Stackoverflow.com/users/479112/" ]
Includes are not affected by `mod_rewrite`. Your problem must lie somewhere else.
Use full path, that must help... Like this include dirname($\_SERVER["SCRIPT\_FILENAME"]) . DIRECTORY\_SEPARATOR . 'lib/config.php'; (But that's strange, rewrite souldn't mess with the path, it's just don't work like that, probably error is somewhere else)
4,053,748
I have been trying to find an 'easy' way of including files in my PHP docs that are subject to mod\_rewrite address changes. At the moment our config.php file is located in public\_html/lib/config.php, and what I have tried to do is `include('lib/config.php')` but it errors on pages that have had their address changed...
2010/10/29
[ "https://Stackoverflow.com/questions/4053748", "https://Stackoverflow.com", "https://Stackoverflow.com/users/479112/" ]
Includes are not affected by `mod_rewrite`. Your problem must lie somewhere else.
First, make sure to check the issues about mod\_rewrite that others are mentioning. But to answer your specific question: There are two common ways to handle this. 1) You can make the include be the full path to the file. Without going into too much detail, this is especially advisable if you are going to be using A...
15,591,546
I am trying to select a span with specific text in jquery. Jquery "contains" is not very strict, so if I use it and search for "tab", it would also select "table", which I dont want. ``` $(".spanbox:contains('Tab')").css('background-color', 'Green') ``` The example-spans: ``` <span class="spanbox">Tab</span> <span ...
2013/03/23
[ "https://Stackoverflow.com/questions/15591546", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1456235/" ]
You can do it using [**.filter()**](http://api.jquery.com/filter/) with a function parameter, like so: ``` $(".spanbox").filter(function() { return $(this).text() == 'Tab'; }).css('background-color', 'Green'); ```
try this way : ``` $.fn.textEquals = function (text) { var match = false; $(this).each(function () { if ($(this).text().match("^" + escapeRegex(text) + "$")) { match = true; return false; } }); return match; }; $(".spanbox").textEquals('Tab').css('background-col...
14,354,773
i have view: ``` <Grid> <!--Some Stuff--> <Control XXX="{Binding ButtomControl}"/> <!--Some Stuff--> </Grid> ``` i have VM: ``` public sealed class SelectionDialogV3VM : PropertyChanges { // Some Stuff public Control ButtomControl { get{return _buttomControl;} set { ...
2013/01/16
[ "https://Stackoverflow.com/questions/14354773", "https://Stackoverflow.com", "https://Stackoverflow.com/users/328829/" ]
Try something like this : ``` <ContentControl Content="{Binding ButtomControl}"/> ``` But honestly, having a property in your ViewModel of type `Control` is not a good omen :D
Use a ContentPresenter: ``` <ContentPresenter Content="{Binding ButtomControl}"/> ``` Anyway, it's odd to bind to a control!
14,354,773
i have view: ``` <Grid> <!--Some Stuff--> <Control XXX="{Binding ButtomControl}"/> <!--Some Stuff--> </Grid> ``` i have VM: ``` public sealed class SelectionDialogV3VM : PropertyChanges { // Some Stuff public Control ButtomControl { get{return _buttomControl;} set { ...
2013/01/16
[ "https://Stackoverflow.com/questions/14354773", "https://Stackoverflow.com", "https://Stackoverflow.com/users/328829/" ]
I just wanted to add something else: Referencing a UI control in the view model should be avoided at all cost. If you want to switch the view via the view model, try using DataTemplates and a ContentControl instead. See: <http://rachel53461.wordpress.com/2011/05/28/switching-between-viewsusercontrols-using-mvvm/>
Try something like this : ``` <ContentControl Content="{Binding ButtomControl}"/> ``` But honestly, having a property in your ViewModel of type `Control` is not a good omen :D
14,354,773
i have view: ``` <Grid> <!--Some Stuff--> <Control XXX="{Binding ButtomControl}"/> <!--Some Stuff--> </Grid> ``` i have VM: ``` public sealed class SelectionDialogV3VM : PropertyChanges { // Some Stuff public Control ButtomControl { get{return _buttomControl;} set { ...
2013/01/16
[ "https://Stackoverflow.com/questions/14354773", "https://Stackoverflow.com", "https://Stackoverflow.com/users/328829/" ]
Try something like this : ``` <ContentControl Content="{Binding ButtomControl}"/> ``` But honestly, having a property in your ViewModel of type `Control` is not a good omen :D
Thanks you all, all answers was valuable Finally, i used DataTriggers, as described here: [MVVM : how to switch between views using DataTemplate + Triggers](https://stackoverflow.com/questions/6546436/mvvm-how-to-switch-between-views-using-datatemplate-triggers) Thanks
14,354,773
i have view: ``` <Grid> <!--Some Stuff--> <Control XXX="{Binding ButtomControl}"/> <!--Some Stuff--> </Grid> ``` i have VM: ``` public sealed class SelectionDialogV3VM : PropertyChanges { // Some Stuff public Control ButtomControl { get{return _buttomControl;} set { ...
2013/01/16
[ "https://Stackoverflow.com/questions/14354773", "https://Stackoverflow.com", "https://Stackoverflow.com/users/328829/" ]
I just wanted to add something else: Referencing a UI control in the view model should be avoided at all cost. If you want to switch the view via the view model, try using DataTemplates and a ContentControl instead. See: <http://rachel53461.wordpress.com/2011/05/28/switching-between-viewsusercontrols-using-mvvm/>
Use a ContentPresenter: ``` <ContentPresenter Content="{Binding ButtomControl}"/> ``` Anyway, it's odd to bind to a control!
14,354,773
i have view: ``` <Grid> <!--Some Stuff--> <Control XXX="{Binding ButtomControl}"/> <!--Some Stuff--> </Grid> ``` i have VM: ``` public sealed class SelectionDialogV3VM : PropertyChanges { // Some Stuff public Control ButtomControl { get{return _buttomControl;} set { ...
2013/01/16
[ "https://Stackoverflow.com/questions/14354773", "https://Stackoverflow.com", "https://Stackoverflow.com/users/328829/" ]
Use a ContentPresenter: ``` <ContentPresenter Content="{Binding ButtomControl}"/> ``` Anyway, it's odd to bind to a control!
Thanks you all, all answers was valuable Finally, i used DataTriggers, as described here: [MVVM : how to switch between views using DataTemplate + Triggers](https://stackoverflow.com/questions/6546436/mvvm-how-to-switch-between-views-using-datatemplate-triggers) Thanks
14,354,773
i have view: ``` <Grid> <!--Some Stuff--> <Control XXX="{Binding ButtomControl}"/> <!--Some Stuff--> </Grid> ``` i have VM: ``` public sealed class SelectionDialogV3VM : PropertyChanges { // Some Stuff public Control ButtomControl { get{return _buttomControl;} set { ...
2013/01/16
[ "https://Stackoverflow.com/questions/14354773", "https://Stackoverflow.com", "https://Stackoverflow.com/users/328829/" ]
I just wanted to add something else: Referencing a UI control in the view model should be avoided at all cost. If you want to switch the view via the view model, try using DataTemplates and a ContentControl instead. See: <http://rachel53461.wordpress.com/2011/05/28/switching-between-viewsusercontrols-using-mvvm/>
Thanks you all, all answers was valuable Finally, i used DataTriggers, as described here: [MVVM : how to switch between views using DataTemplate + Triggers](https://stackoverflow.com/questions/6546436/mvvm-how-to-switch-between-views-using-datatemplate-triggers) Thanks
11,778,724
I implemented an application that are fed from an XML stream. The XML feed changes every once daily. I want to know if I can meter the xml file caching for one day for each round has not questioned the service that provided the xml But every day at midnight I want it retrieves the new version of XML cordially
2012/08/02
[ "https://Stackoverflow.com/questions/11778724", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1569158/" ]
use the xml file in the sdcard
You can save the xml on card and replace it every 24 hours (use `filelastModified()` to get last time the file was modified)
68,631,585
how to click a button in a webpage without class name or id, this is the web code ``` <a href="https://example.com" style="text-decoration:none;line-height:100%;background:#5865f2;color:white;font-family:Ubuntu, Helvetica, Arial, sans-serif;font-size:15px;font-weight:normal;text-transform:none;margin:0px;" target="_bl...
2021/08/03
[ "https://Stackoverflow.com/questions/68631585", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15665139/" ]
looks like there are **spaces**, so can you try with **partial\_link\_text** as well :- ``` driver.find_element_by_partial_link_text('Verify Email').click() ``` or with the below xpath : ``` //a[@href='https://example.com'] ``` or ``` //a[contains(@href,'https://example.com')] ``` or ``` //a[contains(text()...
Try this XPath locator: ```py //a[contains(text(),'Verify Email')] ``` Or this: ```py //a[@href='https://example.com'] ``` So your code will be ```py driver.find_element_by_xpath("//a[contains(text(),'Verify Email')]").click() ``` or ```py driver.find_element_by_xpath("//a[@href='https://example.com']").clic...
23,428,439
I am following this [tutorial](http://book.py2neo.org/en/latest/graphs_nodes_relationships/) to access neo4j db using python. According to this tutorial I have created 2 relations among 4 nodes. The code is given below ``` alice, bob, rel = graph_db.create( {"name": "Alice"}, {"name": "Bob"}, ...
2014/05/02
[ "https://Stackoverflow.com/questions/23428439", "https://Stackoverflow.com", "https://Stackoverflow.com/users/848930/" ]
I tried the following and got the results I think you want: ``` from py2neo import neo4j, node, rel graph = neo4j.GraphDatabaseService("http://localhost:7474/db/data/") alice, = graph.create(node(name="Alice")) # Comma unpacks length-1 tuple. bob, = graph.create(node(name="Bob")) carol, = graph.create(node(name="Car...
The reference node was a feature included in earlier versions of Neo4j and, by extension, py2neo. It has since been deprecated and removed so I should have also removed all traces from the py2neo documentation - it appears I've missed one! Thanks for pointing this out, I'll add myself a task to get this page up to dat...
212,175
I am currently using 9 digit numbers to authenticate writers on two apps. In the first app, this unlocks editing tools for use in making content rich dhtml documents which are stored on the local machine by default. With the second app, it opens up create/edit/delete functionality for content items (meant for low secur...
2019/06/20
[ "https://security.stackexchange.com/questions/212175", "https://security.stackexchange.com", "https://security.stackexchange.com/users/210578/" ]
You need to assess the impact of an attack considering at least three aspects: confidentiality, availability, integrity. Here are some points to consider: * **Confidentiality:** what's the damage if an attacker can see the private data that is protected by your password? Is it personal data? Are there any trade secret...
No, not always. It depends on what will you loose when password is compromised. If the costs are low, there may be no sense to keep passwords too complex. In your case the costs seem to be low and even 9 digits might be superfluous. It depends also on possibility to brute force passwords. If you lock accounts after a ...
212,175
I am currently using 9 digit numbers to authenticate writers on two apps. In the first app, this unlocks editing tools for use in making content rich dhtml documents which are stored on the local machine by default. With the second app, it opens up create/edit/delete functionality for content items (meant for low secur...
2019/06/20
[ "https://security.stackexchange.com/questions/212175", "https://security.stackexchange.com", "https://security.stackexchange.com/users/210578/" ]
You need to assess the impact of an attack considering at least three aspects: confidentiality, availability, integrity. Here are some points to consider: * **Confidentiality:** what's the damage if an attacker can see the private data that is protected by your password? Is it personal data? Are there any trade secret...
Building upon what [reed](https://security.stackexchange.com/users/175681/reed) wrote: If your applications are publicly accessible and do not lock out failed attempts, a password cracker could discover your passwords (numbers only?) fairly quickly. Here is a good list of modern password crackers if you'd care to try...
41,612,505
I have 9 `<li>` elements in my template, every one of them has a \*ngIf condition. It's possible that 5 of them return true or maybe more or less, but i want to display only the first 4 or less if the case. The order of the `<li>` is the priority I tried this: ``` // Template <li *ngIf="checkCond(profile.Projects...
2017/01/12
[ "https://Stackoverflow.com/questions/41612505", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3264998/" ]
**Without a Parse/Split function** ``` Declare @String varchar(max) = '0|33|6|2|30|12|4|1|8|29|9|34|7|13|11|5|3|31|10|36|37|37|37|38|39|40|44|65|66' Select Sorted = Stuff((Select '|' +RetVal From ( Select RetSeq = Row_Number() over (Order By (Select null)) ...
``` declare @str varchar(100) = '0|33|6|2|30|12|4|1|8|29|9|34|7|13|11|5|3|31|10|36|37|37|37|38|39|40|44|65|66'; declare @s varchar(100) = '|' + @str + '|'; declare @result varchar(100); with D(d) as ( select v from (values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9)) V(v) ), N(n) as ( select top (l...
3,554,694
I have tried the question but not sure if my solution is correct or not... My try.. \begin{align}a^3 + b^3 + c^3 = (a+b+c)^3 - 3(a+b)(b+c)(c+a)\end{align} So , if \begin{align}6 |(a^3 + b^3 + c^3)\end{align} Then, \begin{align}6 | [(a+b+c)^3 - 3(a+b)(b+c)(c+a)]\end{align} So, also \begin{align}6 | (a+b+c)^3\end{...
2020/02/21
[ "https://math.stackexchange.com/questions/3554694", "https://math.stackexchange.com", "https://math.stackexchange.com/users/752624/" ]
I'm not sure how you got > > Then, > > > 6 | [(a+b+c)^3 - 3(a+b)(b+c)(c+a)] > > > So, also > > > 6 | (a+b+c)^3 > > > 6 | (a+b+c)(a+b+c)(a+b+c) > > > As [Iris](https://math.stackexchange.com/users/656794/iris)'s question [comment](https://math.stackexchange.com/questions/3554694/prove-that-6-abc-if-and-onl...
The reason for your incorrect solution has been pointed out by Iris in the comments. \begin{align} &(a^3+b^3+c^3) - (a+b+c) = (a^3 - a) + (b^3-b) + (c^3-c) \\ &\quad \quad \ = (a-1)a(a+1) + (b-1)b(b+1) + (c-1)c(c+1) \end{align} The set of terms in $(a-1)a(a+1)$ contains at least one multiple of $2$ and one multiple o...
3,554,694
I have tried the question but not sure if my solution is correct or not... My try.. \begin{align}a^3 + b^3 + c^3 = (a+b+c)^3 - 3(a+b)(b+c)(c+a)\end{align} So , if \begin{align}6 |(a^3 + b^3 + c^3)\end{align} Then, \begin{align}6 | [(a+b+c)^3 - 3(a+b)(b+c)(c+a)]\end{align} So, also \begin{align}6 | (a+b+c)^3\end{...
2020/02/21
[ "https://math.stackexchange.com/questions/3554694", "https://math.stackexchange.com", "https://math.stackexchange.com/users/752624/" ]
I'm not sure how you got > > Then, > > > 6 | [(a+b+c)^3 - 3(a+b)(b+c)(c+a)] > > > So, also > > > 6 | (a+b+c)^3 > > > 6 | (a+b+c)(a+b+c)(a+b+c) > > > As [Iris](https://math.stackexchange.com/users/656794/iris)'s question [comment](https://math.stackexchange.com/questions/3554694/prove-that-6-abc-if-and-onl...
$a^3+b^3+c^3=(a+b+c)^3-3(a+b)(b+c)(a+c)$ At least one pair from $(a+b) , (b+c) , (a+c)$ is even number. Therefore, $6 | 3(a+b)(b+c)(a+c)$. Consequently, $a^3+b^3+c^3 \equiv (a+b+c)^3 \mod{6}$ $a^3+b^3+c^3 \equiv a+b+c \mod{6}$
3,554,694
I have tried the question but not sure if my solution is correct or not... My try.. \begin{align}a^3 + b^3 + c^3 = (a+b+c)^3 - 3(a+b)(b+c)(c+a)\end{align} So , if \begin{align}6 |(a^3 + b^3 + c^3)\end{align} Then, \begin{align}6 | [(a+b+c)^3 - 3(a+b)(b+c)(c+a)]\end{align} So, also \begin{align}6 | (a+b+c)^3\end{...
2020/02/21
[ "https://math.stackexchange.com/questions/3554694", "https://math.stackexchange.com", "https://math.stackexchange.com/users/752624/" ]
The reason for your incorrect solution has been pointed out by Iris in the comments. \begin{align} &(a^3+b^3+c^3) - (a+b+c) = (a^3 - a) + (b^3-b) + (c^3-c) \\ &\quad \quad \ = (a-1)a(a+1) + (b-1)b(b+1) + (c-1)c(c+1) \end{align} The set of terms in $(a-1)a(a+1)$ contains at least one multiple of $2$ and one multiple o...
$a^3+b^3+c^3=(a+b+c)^3-3(a+b)(b+c)(a+c)$ At least one pair from $(a+b) , (b+c) , (a+c)$ is even number. Therefore, $6 | 3(a+b)(b+c)(a+c)$. Consequently, $a^3+b^3+c^3 \equiv (a+b+c)^3 \mod{6}$ $a^3+b^3+c^3 \equiv a+b+c \mod{6}$
14,736,411
I have a file like: ``` something1 something2 201101130000 thing thing1 thing2 AAA, -2, 4, 0, 54; thing3 thing4 AAA, 43, 43, 0, 5, 0, 0,; thing5 AAA, 132.0, 43.0, 0.0, 0.0, 43.0,210.0,' thing5 ``` How to copy the date (201101130000) from the second line, add a comma (,) then put the numbers of the line ...
2013/02/06
[ "https://Stackoverflow.com/questions/14736411", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2031063/" ]
Here's how I've interpreted your question: * You're trying to 'grep' and join parts of two lines. These two lines are always the second and second last lines. * You're also trying to redirect output to another file. You can use [shell redirection](http://www.tldp.org/LDP/abs/html/io-redirection.html) for this, like: `...
`AWK` do the trick: ``` awk '/something[0-9][ ]*[0-9]+/{d = $2;} /AAA/{v = $0;} END{gsub("AAA",d,v); print v;}' file.txt ``` The output is: ``` 201101130000, 132.0, 43.0, 0.0, 0.0, 43.0,210.0 ```
23,578,819
I ‘ve written a function to plot the histogram for an 1-D array theta . But one thing I do not like in this function is that the data is in the code. Could you know how to keep the data in a *file* and to make the function *read* them from the file? Since the data is usually much larger. PS: The code is ``` #hist.py ...
2014/05/10
[ "https://Stackoverflow.com/questions/23578819", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3441544/" ]
Create a subquery with a limit, then create the join from there. ``` SELECT s.id, s.name, su.id, su.updates FROM (select id, name from students limit 2) AS s LEFT JOIN `student_updates` AS su ON s.id = su.sid ```
``` SELECT s.id, s.name, su.id, su.updates FROM students AS s LEFT JOIN `student_updates` AS su ON s.id = su.sid where s.id in (select id from students limit 2) ```
23,578,819
I ‘ve written a function to plot the histogram for an 1-D array theta . But one thing I do not like in this function is that the data is in the code. Could you know how to keep the data in a *file* and to make the function *read* them from the file? Since the data is usually much larger. PS: The code is ``` #hist.py ...
2014/05/10
[ "https://Stackoverflow.com/questions/23578819", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3441544/" ]
Create a subquery with a limit, then create the join from there. ``` SELECT s.id, s.name, su.id, su.updates FROM (select id, name from students limit 2) AS s LEFT JOIN `student_updates` AS su ON s.id = su.sid ```
use IN operator for where clause ``` SELECT s.id, s.name, su.id, su.updates FROM students AS s LEFT JOIN `student_updates` AS su ON s.id = su.sid WHERE su.sid IN ('1','2'); ```
23,578,819
I ‘ve written a function to plot the histogram for an 1-D array theta . But one thing I do not like in this function is that the data is in the code. Could you know how to keep the data in a *file* and to make the function *read* them from the file? Since the data is usually much larger. PS: The code is ``` #hist.py ...
2014/05/10
[ "https://Stackoverflow.com/questions/23578819", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3441544/" ]
Create a subquery with a limit, then create the join from there. ``` SELECT s.id, s.name, su.id, su.updates FROM (select id, name from students limit 2) AS s LEFT JOIN `student_updates` AS su ON s.id = su.sid ```
You could use [CROSS JOIN](http://dev.mysql.com/doc/refman/5.0/en/join.html) ``` SELECT s.id, s.name, su.id, su.updates FROM students AS s CROSS JOIN (select su.id, su.updates FROM `student_updates` limit 1 AS su WHERE s.id = su.sid) ```
23,578,819
I ‘ve written a function to plot the histogram for an 1-D array theta . But one thing I do not like in this function is that the data is in the code. Could you know how to keep the data in a *file* and to make the function *read* them from the file? Since the data is usually much larger. PS: The code is ``` #hist.py ...
2014/05/10
[ "https://Stackoverflow.com/questions/23578819", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3441544/" ]
``` SELECT s.id, s.name, su.id, su.updates FROM students AS s LEFT JOIN `student_updates` AS su ON s.id = su.sid where s.id in (select id from students limit 2) ```
use IN operator for where clause ``` SELECT s.id, s.name, su.id, su.updates FROM students AS s LEFT JOIN `student_updates` AS su ON s.id = su.sid WHERE su.sid IN ('1','2'); ```
23,578,819
I ‘ve written a function to plot the histogram for an 1-D array theta . But one thing I do not like in this function is that the data is in the code. Could you know how to keep the data in a *file* and to make the function *read* them from the file? Since the data is usually much larger. PS: The code is ``` #hist.py ...
2014/05/10
[ "https://Stackoverflow.com/questions/23578819", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3441544/" ]
You could use [CROSS JOIN](http://dev.mysql.com/doc/refman/5.0/en/join.html) ``` SELECT s.id, s.name, su.id, su.updates FROM students AS s CROSS JOIN (select su.id, su.updates FROM `student_updates` limit 1 AS su WHERE s.id = su.sid) ```
use IN operator for where clause ``` SELECT s.id, s.name, su.id, su.updates FROM students AS s LEFT JOIN `student_updates` AS su ON s.id = su.sid WHERE su.sid IN ('1','2'); ```
42,934,673
[Number Pattern](https://i.stack.imgur.com/S2fuS.png) I am asked to enter a number rc, and based on rc construct this pattern. I am able to initialize the table but without the highlighted numbers: ``` int [][] num2 = new int [rc][rc]; counter = 1; for(int i = 0; i < rc; i++){ if(i!=0) counter--;...
2017/03/21
[ "https://Stackoverflow.com/questions/42934673", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7747243/" ]
If your query fails it is because you are comparing a char to an int ``` where Trips.TripId.Equals('1') ``` You should instead compare ``` where Trips.TripId == 1 ``` Once you get your trip it is now `return View(trip)`. ``` public ActionResult ViewTrip(int id) { using (ApplicationDbContext db = new Applicat...
You can simply try: ``` ActionResult View(int id) { using (ApplicationDbContext _db = new ApplicationDbContext()) { var trip = (from Trips in _db.Trips where Trips.TripId.Equals('1') select Trips.TripId); if (trip == null) return HttpNotFound(); return View() } } ``` ...
137,871
I've taken two classes in a row that require research papers to be written as an assignment, and since the second one has had a similar criteria for which topics are allowed, I decided to continue researching the same topic. However, after checking with the school's plagiarism checker, it flagged me for roughly half of...
2019/10/01
[ "https://academia.stackexchange.com/questions/137871", "https://academia.stackexchange.com", "https://academia.stackexchange.com/users/114606/" ]
**In general, no (and how did you get access to your school's plagiarism checker)** If the papers are related they should share sources. From a published peer-reviewed standpoint, I'd bet several papers reuse half their sources. This sounds like a paper for a grade though. In which case you actually have a 3rd option...
Self plagiarism is reusing your old work and representing it as new. You avoid it by citing the old work within the new, just as you would the work of any other author. If I read your question correctly, you copied something like the bibliography of the old work, and maybe a section on "prior work" into the new paper...
809,102
In my career I have seen literally dozens of ways that people choose to handle implementing state and country data (as in NY or USA). I've seen enumerations, multi-dimensional arrays, data driven classes from XML docs or databases, and good old-fashioned strings. So, I'm wondering, what do people consider the "best wa...
2009/04/30
[ "https://Stackoverflow.com/questions/809102", "https://Stackoverflow.com", "https://Stackoverflow.com/users/95021/" ]
If you consider the number of states in the united states to be unchanging then what you have is a finite, small, fixed set of values which can easily be associated with a number. For that type of data structure an enumeration works great. My choice then would be an enumeration as they have good compile time validation...
I think enums or XML is fine if all you want is a simple list of states. If you have other dependent data like say state tax rates or postcode data then I think I'd store the states in the database. Same with countries. You may want to control languages, currencies etc. based on country. I think that's just easier to ...
809,102
In my career I have seen literally dozens of ways that people choose to handle implementing state and country data (as in NY or USA). I've seen enumerations, multi-dimensional arrays, data driven classes from XML docs or databases, and good old-fashioned strings. So, I'm wondering, what do people consider the "best wa...
2009/04/30
[ "https://Stackoverflow.com/questions/809102", "https://Stackoverflow.com", "https://Stackoverflow.com/users/95021/" ]
If you consider the number of states in the united states to be unchanging then what you have is a finite, small, fixed set of values which can easily be associated with a number. For that type of data structure an enumeration works great. My choice then would be an enumeration as they have good compile time validation...
I would pick a standard for enumerating the geogrpahical areas and then associate keys in a table. In the past I have used [FIPS 5-2 place codes](http://en.wikipedia.org/wiki/FIPS_place_code). Its a federal standard and the numbers and abbreviations are reasonablly well known. for international country codes we use [FI...
809,102
In my career I have seen literally dozens of ways that people choose to handle implementing state and country data (as in NY or USA). I've seen enumerations, multi-dimensional arrays, data driven classes from XML docs or databases, and good old-fashioned strings. So, I'm wondering, what do people consider the "best wa...
2009/04/30
[ "https://Stackoverflow.com/questions/809102", "https://Stackoverflow.com", "https://Stackoverflow.com/users/95021/" ]
I would pick a standard for enumerating the geogrpahical areas and then associate keys in a table. In the past I have used [FIPS 5-2 place codes](http://en.wikipedia.org/wiki/FIPS_place_code). Its a federal standard and the numbers and abbreviations are reasonablly well known. for international country codes we use [FI...
I think enums or XML is fine if all you want is a simple list of states. If you have other dependent data like say state tax rates or postcode data then I think I'd store the states in the database. Same with countries. You may want to control languages, currencies etc. based on country. I think that's just easier to ...
9,888,140
I have a mysql table that has 2 columns - Column 1 contains a string value, and Column 2 contains the number of times that string value occurred. I'm trying to find the string abc.X.def, where the beginning of the string is "abc.", followed by one or more characters, then the string ".def". There could be more charact...
2012/03/27
[ "https://Stackoverflow.com/questions/9888140", "https://Stackoverflow.com", "https://Stackoverflow.com/users/270043/" ]
I think you can use `LIKE` and `SUM`: ``` SELECT StringValue, SUM(InstanceSubCount) AS InstanceCount FROM ValueInstanceSubcounts WHERE StringValue LIKE 'abc.%.def%' GROUP BY StringValue ``` Note the `GROUP BY` clause, since your table doesn't seem to have a primary or unique key on StringValue. Also, note the second...
You are looking for the 'LIKE' clause, see [manual](http://dev.mysql.com/doc/refman/5.0/en/string-comparison-functions.html). In that clause you can use `%` to match any amount of characters. Resulting in: ``` SELECT * FROM table WHERE value LIKE 'abc.%.def%' ```
9,888,140
I have a mysql table that has 2 columns - Column 1 contains a string value, and Column 2 contains the number of times that string value occurred. I'm trying to find the string abc.X.def, where the beginning of the string is "abc.", followed by one or more characters, then the string ".def". There could be more charact...
2012/03/27
[ "https://Stackoverflow.com/questions/9888140", "https://Stackoverflow.com", "https://Stackoverflow.com/users/270043/" ]
I think you can use `LIKE` and `SUM`: ``` SELECT StringValue, SUM(InstanceSubCount) AS InstanceCount FROM ValueInstanceSubcounts WHERE StringValue LIKE 'abc.%.def%' GROUP BY StringValue ``` Note the `GROUP BY` clause, since your table doesn't seem to have a primary or unique key on StringValue. Also, note the second...
I don't see the connection to regexp here really based on what you have and what you want. This looks more like a `GROUP BY` and `SUM()` case: ``` SELECT str_example, SUM(number) FROM table_name GROUP BY str_example ``` `str_example` would be the abc ... def `number` would be the number which increased in the exa...
66,225,822
Hey I have a list of files * B123245.xml * B123245-ext.xml * 1234W01.xml * 1234W01-ext.xml Now I need a regular expression filter only the files without -ext in the name. I tried already this `^.+(?!-ext)\.xml$` but it is not working. What am I doing wrong?
2021/02/16
[ "https://Stackoverflow.com/questions/66225822", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1825245/" ]
Not sure about your exact needs, but if you want to exclude those file where "-ext" is right before the xml extension I think you could use: ``` ^.+(?<!-ext)\.xml$ ``` See the [demo](https://regex101.com/r/XANhCV/1) * `^` - Start string anchor. * `.+` - 1+ character apart from newline. * `(?<!-ext)` - A negative lo...
With the help of user 'The fourth bird' I found out the correct structure. Here is the correct result ``` ^(?!.*-ext).+\.xml$ ```
2,109,563
It works great to send emails (to Outlook) in HTML format by assigning the text/html content type string like so: ``` using (MailMessage message = new MailMessage()) { message.From = new MailAddress("--@---.com"); message.ReplyTo = new MailAddress("--@---.com"); message.To.Add(new MailAddress("---@---.com")); ...
2010/01/21
[ "https://Stackoverflow.com/questions/2109563", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3584/" ]
The bottom line is, you can't do this easily using System.Net.Mail. The rich text in Outlook is sent as a winmail.dat file in the SMTP world (outside of Exchange). The winmail.dat file is a TNEF message. So, you would need to create your richtext inside of the winmail.dat file (formatted to TNEF rules). However, tha...
You can also achieve this by adding another alternate view before your calendar view as below: ``` var body = AlternateView.CreateAlternateViewFromString(bodyHtml, new System.Net.Mime.ContentType("text/html")); mailMessage.AlternateViews.Add(body); ```
2,109,563
It works great to send emails (to Outlook) in HTML format by assigning the text/html content type string like so: ``` using (MailMessage message = new MailMessage()) { message.From = new MailAddress("--@---.com"); message.ReplyTo = new MailAddress("--@---.com"); message.To.Add(new MailAddress("---@---.com")); ...
2010/01/21
[ "https://Stackoverflow.com/questions/2109563", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3584/" ]
The bottom line is, you can't do this easily using System.Net.Mail. The rich text in Outlook is sent as a winmail.dat file in the SMTP world (outside of Exchange). The winmail.dat file is a TNEF message. So, you would need to create your richtext inside of the winmail.dat file (formatted to TNEF rules). However, tha...
This worked for me.. ``` public void sendUsersMail(string recipientMailId, string ccMailList, string body, string subject) { try { MailMessage Msg = new MailMessage(); Msg.From = new MailAddress("norepl@xyz.com", "Tracker Tool"); Msg.To.Add(recipientMailId); ...
8,672,228
I'm attempting a fetch request with the following code: ``` NSPredicate *predicate = [NSPredicate predicateWithFormat:@"dateModified > CAST(CAST(now(), \"NSNumber\") - %d, \"NSDate\")", (30*86400)]; NSFetchRequest *itemRequest = [NSFetchRequest fetchRequestWithEntityName:@"Item"]; [itemRequest setPredicate:predicate];...
2011/12/29
[ "https://Stackoverflow.com/questions/8672228", "https://Stackoverflow.com", "https://Stackoverflow.com/users/296708/" ]
I found my own solution... Function calls are unsupported when fetching data from a SQLite store type. It is only possible to use function calls in fetches for in-memory data. In order to still use this predicate I had to first fetch the data set and then filter the array using: ``` [allItems filteredArrayUsingPredic...
Following code worked out just well in my case: `now() - 2592000`
25,587,106
I am doing some fancy stuff, where I really need to allocate about 1 GB. My Computer has 8GB 64 bit System, so that's not a problem. I use `-Xmx 4g` to increase my heap space, but sadly enough that doesn't work at all. I use: ``` Runtime rt = Runtime.getRuntime(); long totalMem = rt.totalMemory(); long maxMem = r...
2014/08/30
[ "https://Stackoverflow.com/questions/25587106", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3993643/" ]
It is `-Xmx4g`, without a space in between.
-Xmx4g (with no space, as has been pointed out already) will only set a maxium for the heap size not automatically assign the full amount on startup. -Xms4g may well do this, as this sets the initial heap size. Typically people set these as a pair on app startup. For example when launching servers using classes that ...
25,587,106
I am doing some fancy stuff, where I really need to allocate about 1 GB. My Computer has 8GB 64 bit System, so that's not a problem. I use `-Xmx 4g` to increase my heap space, but sadly enough that doesn't work at all. I use: ``` Runtime rt = Runtime.getRuntime(); long totalMem = rt.totalMemory(); long maxMem = r...
2014/08/30
[ "https://Stackoverflow.com/questions/25587106", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3993643/" ]
Tell us your whole command line, I suspect you use: ``` java -jar file.jar -Xmx 4G ``` or ``` java -cp file.jar package.Main -Xmx 4G ``` Both are wrong, you can use one of the following instead: ``` java -Xmx4G -jar file.jar java -Xmx4G -cp file.jar package.Main ```
It is `-Xmx4g`, without a space in between.
25,587,106
I am doing some fancy stuff, where I really need to allocate about 1 GB. My Computer has 8GB 64 bit System, so that's not a problem. I use `-Xmx 4g` to increase my heap space, but sadly enough that doesn't work at all. I use: ``` Runtime rt = Runtime.getRuntime(); long totalMem = rt.totalMemory(); long maxMem = r...
2014/08/30
[ "https://Stackoverflow.com/questions/25587106", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3993643/" ]
It is `-Xmx4g`, without a space in between.
The `-Xmx` option sets the *maximum* size of the heap. But the JVM typically starts with a smaller heap, and expands it as required. To tell the JVM the initial size of the heap, use the `-Xms` option as well; e.g. ``` java -Xmx4g -Xms4g ... ``` tells Java to us a 4g heap, and set that size from the start. Note ...
25,587,106
I am doing some fancy stuff, where I really need to allocate about 1 GB. My Computer has 8GB 64 bit System, so that's not a problem. I use `-Xmx 4g` to increase my heap space, but sadly enough that doesn't work at all. I use: ``` Runtime rt = Runtime.getRuntime(); long totalMem = rt.totalMemory(); long maxMem = r...
2014/08/30
[ "https://Stackoverflow.com/questions/25587106", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3993643/" ]
Tell us your whole command line, I suspect you use: ``` java -jar file.jar -Xmx 4G ``` or ``` java -cp file.jar package.Main -Xmx 4G ``` Both are wrong, you can use one of the following instead: ``` java -Xmx4G -jar file.jar java -Xmx4G -cp file.jar package.Main ```
-Xmx4g (with no space, as has been pointed out already) will only set a maxium for the heap size not automatically assign the full amount on startup. -Xms4g may well do this, as this sets the initial heap size. Typically people set these as a pair on app startup. For example when launching servers using classes that ...
25,587,106
I am doing some fancy stuff, where I really need to allocate about 1 GB. My Computer has 8GB 64 bit System, so that's not a problem. I use `-Xmx 4g` to increase my heap space, but sadly enough that doesn't work at all. I use: ``` Runtime rt = Runtime.getRuntime(); long totalMem = rt.totalMemory(); long maxMem = r...
2014/08/30
[ "https://Stackoverflow.com/questions/25587106", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3993643/" ]
Tell us your whole command line, I suspect you use: ``` java -jar file.jar -Xmx 4G ``` or ``` java -cp file.jar package.Main -Xmx 4G ``` Both are wrong, you can use one of the following instead: ``` java -Xmx4G -jar file.jar java -Xmx4G -cp file.jar package.Main ```
The `-Xmx` option sets the *maximum* size of the heap. But the JVM typically starts with a smaller heap, and expands it as required. To tell the JVM the initial size of the heap, use the `-Xms` option as well; e.g. ``` java -Xmx4g -Xms4g ... ``` tells Java to us a 4g heap, and set that size from the start. Note ...
44,793,065
I have this error when attempting to `install` the maven project: > > [ERROR] Failed to execute goal > org.apache.maven.plugins:maven-dependency-plugin:2.10:analyze-only > (analyze-only) on project functional-tests: Dependency > problems found -> [Help 1] > > > It appears right after the integration tests, dur...
2017/06/28
[ "https://Stackoverflow.com/questions/44793065", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1119381/" ]
Apparently the used undeclared dependencies warning **was** the culprit of my problem. After adding the dependency explicitly to the pom file, the issue was resolved.
The reason of this is: ``` [WARNING] Used undeclared dependencies found: [WARNING] javax.activation:activation:jar:1.1:test [WARNING] Unused declared dependencies found: [WARNING] org.slf4j:slf4j-log4j12:jar:1.7.6:compile ``` you should remove `org.slf4j:slf4j-log4j12` dependency and add `javax.activation:acti...
44,793,065
I have this error when attempting to `install` the maven project: > > [ERROR] Failed to execute goal > org.apache.maven.plugins:maven-dependency-plugin:2.10:analyze-only > (analyze-only) on project functional-tests: Dependency > problems found -> [Help 1] > > > It appears right after the integration tests, dur...
2017/06/28
[ "https://Stackoverflow.com/questions/44793065", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1119381/" ]
Apparently the used undeclared dependencies warning **was** the culprit of my problem. After adding the dependency explicitly to the pom file, the issue was resolved.
Same here, got same problem (few times for last few months) and found that fixing all warnings with Used undeclared dependencies/Unused declared dependencies fixes the issue.
44,793,065
I have this error when attempting to `install` the maven project: > > [ERROR] Failed to execute goal > org.apache.maven.plugins:maven-dependency-plugin:2.10:analyze-only > (analyze-only) on project functional-tests: Dependency > problems found -> [Help 1] > > > It appears right after the integration tests, dur...
2017/06/28
[ "https://Stackoverflow.com/questions/44793065", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1119381/" ]
The reason of this is: ``` [WARNING] Used undeclared dependencies found: [WARNING] javax.activation:activation:jar:1.1:test [WARNING] Unused declared dependencies found: [WARNING] org.slf4j:slf4j-log4j12:jar:1.7.6:compile ``` you should remove `org.slf4j:slf4j-log4j12` dependency and add `javax.activation:acti...
Same here, got same problem (few times for last few months) and found that fixing all warnings with Used undeclared dependencies/Unused declared dependencies fixes the issue.
27,325,390
``` s = input() s.lower() for i in range (0, len(s)): if(s[i] in "aoyeui"): s.replace(s[i], '') for i in range(0, len(s)): s.replace(s[i], '.' + s[i]) print(s) ``` this code should remove all the vowels and split the string by '.'
2014/12/05
[ "https://Stackoverflow.com/questions/27325390", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4330468/" ]
Lets comment it line by line: ``` s = input () #wrong indentation s.lower() # you have to assign it to s. for i in range (0, len(s)): # range(0, x) is the same as range(x) if (s[i] in "aoyeui"): # ok s.replace(s[i], '') # strings are not mutable so replace does not modify the string. You ha...
`str` is immutable. All operations on it create a new `str`. You want to reassign `s` when you use `replace`. Or `lower`. ``` s = s.lower() s = s.replace(s[i], '') ```
27,325,390
``` s = input() s.lower() for i in range (0, len(s)): if(s[i] in "aoyeui"): s.replace(s[i], '') for i in range(0, len(s)): s.replace(s[i], '.' + s[i]) print(s) ``` this code should remove all the vowels and split the string by '.'
2014/12/05
[ "https://Stackoverflow.com/questions/27325390", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4330468/" ]
`str` is immutable. All operations on it create a new `str`. You want to reassign `s` when you use `replace`. Or `lower`. ``` s = s.lower() s = s.replace(s[i], '') ```
`s.lower()` should be assigned to `s` otherwise the original string will remain intact. I rewrote a working code. Hope it helps you: ``` s = str(input("Text: ")) s = s.lower() t ="" for char in s: if char not in "aoyeui": t+=char t = t.split('.') for i in t: print(i) ```
27,325,390
``` s = input() s.lower() for i in range (0, len(s)): if(s[i] in "aoyeui"): s.replace(s[i], '') for i in range(0, len(s)): s.replace(s[i], '.' + s[i]) print(s) ``` this code should remove all the vowels and split the string by '.'
2014/12/05
[ "https://Stackoverflow.com/questions/27325390", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4330468/" ]
Lets comment it line by line: ``` s = input () #wrong indentation s.lower() # you have to assign it to s. for i in range (0, len(s)): # range(0, x) is the same as range(x) if (s[i] in "aoyeui"): # ok s.replace(s[i], '') # strings are not mutable so replace does not modify the string. You ha...
`s.lower()` should be assigned to `s` otherwise the original string will remain intact. I rewrote a working code. Hope it helps you: ``` s = str(input("Text: ")) s = s.lower() t ="" for char in s: if char not in "aoyeui": t+=char t = t.split('.') for i in t: print(i) ```
66,646,762
i have a problem with my function console.log return 3xexample after click and class open doesn't add. Could you please look at my code? ``` const accordionFunction = () => { const accordionProduct = document.querySelectorAll( '.cost-accordion__content-box ', ); // eslint-disable-next-line no-plusplus acco...
2021/03/15
[ "https://Stackoverflow.com/questions/66646762", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15099633/" ]
You could set up something like the below: ``` <img src="image1.jpg" onclick="switchImage(event)" data-second="image2.jpeg"> ``` ``` function switchImage(e) { e = e || window.event; let target = e.target || e.srcElement; let originalSrc = target.src; let secondImage = target.dataset.second; tar...
You can simplify this using ternary operator: ```js function toggleImage(src1, src2, imgID) { const img = document.getElementById(imgID); const url = 'https://example.com' const newImg = img.src === url + src2 ? src1 : src2; img.src = url + newImg; } ```
66,646,762
i have a problem with my function console.log return 3xexample after click and class open doesn't add. Could you please look at my code? ``` const accordionFunction = () => { const accordionProduct = document.querySelectorAll( '.cost-accordion__content-box ', ); // eslint-disable-next-line no-plusplus acco...
2021/03/15
[ "https://Stackoverflow.com/questions/66646762", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15099633/" ]
You could set up something like the below: ``` <img src="image1.jpg" onclick="switchImage(event)" data-second="image2.jpeg"> ``` ``` function switchImage(e) { e = e || window.event; let target = e.target || e.srcElement; let originalSrc = target.src; let secondImage = target.dataset.second; tar...
You can just pass 'this' to your changeImage function, which will reference the HTML-Element which triggered the click event in your DOM. This should work: ```html <img src="/image1.jpeg" alt="Alt Name" id="Test" onclick="changeImage(this,'/image2.jpeg','Test' )"> ``` ```js function changeImage(SenderElement, src2,...
71,265,911
I'm trying to align three elements (Views) in the center of the screen like the image below: ![Example Image](https://i.stack.imgur.com/Yi01E.png) The goal is to align those 3 boxes in the center of the screen with that "inverted triangle" format, where two boxes stay in the first line, above the third box in the sec...
2022/02/25
[ "https://Stackoverflow.com/questions/71265911", "https://Stackoverflow.com", "https://Stackoverflow.com/users/17437060/" ]
Checkout `modestbranding` in the YouTube Embed Parameters <https://developers.google.com/youtube/player_parameters>
im not at all sure if this works, but it could. download the video via mobile device, and then add the downloaded video
14,113,196
I am pulling my hairs. I have ZK grid then within the grid there's another grid. Both are bound to separate view models. Think about it as a social network wall. Outer Grid is a ViewModel that render posts. Then for each post an inner grid is used which is bound to another ViewModel to render comments. Okay, the ...
2013/01/01
[ "https://Stackoverflow.com/questions/14113196", "https://Stackoverflow.com", "https://Stackoverflow.com/users/271989/" ]
Regarding to debug this kind of issue, you can try something like below: .1. Open the debug mode (see ref) **zk.xml** ``` <zk> <client-config> <debug-js>true</debug-js> </client-config> <library-property> <name>org.zkoss.web.classWebResource.cache</name> <value>false</value> <...
This particular error seems due to updating a component that is already detached/removed from ZK desktop. In other words, on server side you have a reference to a component that is cached but no longer attached to the component tree. When you try to update it ZK might try to sync its status with its corresponding Widge...
14,113,196
I am pulling my hairs. I have ZK grid then within the grid there's another grid. Both are bound to separate view models. Think about it as a social network wall. Outer Grid is a ViewModel that render posts. Then for each post an inner grid is used which is bound to another ViewModel to render comments. Okay, the ...
2013/01/01
[ "https://Stackoverflow.com/questions/14113196", "https://Stackoverflow.com", "https://Stackoverflow.com/users/271989/" ]
This particular error seems due to updating a component that is already detached/removed from ZK desktop. In other words, on server side you have a reference to a component that is cached but no longer attached to the component tree. When you try to update it ZK might try to sync its status with its corresponding Widge...
It come when we are setting something to a already element which is already set previously.. like ``` OFCchart chart = new OFCchart; chart.setJSONScript("somedata"); //----- Some other place setting to the same--- chart.setJSONScript("somedata"); ```
14,113,196
I am pulling my hairs. I have ZK grid then within the grid there's another grid. Both are bound to separate view models. Think about it as a social network wall. Outer Grid is a ViewModel that render posts. Then for each post an inner grid is used which is bound to another ViewModel to render comments. Okay, the ...
2013/01/01
[ "https://Stackoverflow.com/questions/14113196", "https://Stackoverflow.com", "https://Stackoverflow.com/users/271989/" ]
Regarding to debug this kind of issue, you can try something like below: .1. Open the debug mode (see ref) **zk.xml** ``` <zk> <client-config> <debug-js>true</debug-js> </client-config> <library-property> <name>org.zkoss.web.classWebResource.cache</name> <value>false</value> <...
It come when we are setting something to a already element which is already set previously.. like ``` OFCchart chart = new OFCchart; chart.setJSONScript("somedata"); //----- Some other place setting to the same--- chart.setJSONScript("somedata"); ```
14,113,196
I am pulling my hairs. I have ZK grid then within the grid there's another grid. Both are bound to separate view models. Think about it as a social network wall. Outer Grid is a ViewModel that render posts. Then for each post an inner grid is used which is bound to another ViewModel to render comments. Okay, the ...
2013/01/01
[ "https://Stackoverflow.com/questions/14113196", "https://Stackoverflow.com", "https://Stackoverflow.com/users/271989/" ]
Regarding to debug this kind of issue, you can try something like below: .1. Open the debug mode (see ref) **zk.xml** ``` <zk> <client-config> <debug-js>true</debug-js> </client-config> <library-property> <name>org.zkoss.web.classWebResource.cache</name> <value>false</value> <...
Although the best answer possible is already provided I wanted to add I was hitting this error and after debugging it turned out that there was a hflex="min" in a grid component. I changed this to hflex="1" and the error went away. This error started after updating zk version several versions at once so I'm not sure be...
14,113,196
I am pulling my hairs. I have ZK grid then within the grid there's another grid. Both are bound to separate view models. Think about it as a social network wall. Outer Grid is a ViewModel that render posts. Then for each post an inner grid is used which is bound to another ViewModel to render comments. Okay, the ...
2013/01/01
[ "https://Stackoverflow.com/questions/14113196", "https://Stackoverflow.com", "https://Stackoverflow.com/users/271989/" ]
Although the best answer possible is already provided I wanted to add I was hitting this error and after debugging it turned out that there was a hflex="min" in a grid component. I changed this to hflex="1" and the error went away. This error started after updating zk version several versions at once so I'm not sure be...
It come when we are setting something to a already element which is already set previously.. like ``` OFCchart chart = new OFCchart; chart.setJSONScript("somedata"); //----- Some other place setting to the same--- chart.setJSONScript("somedata"); ```
142,730
I know that for any continuous variable $P[X=x]=0$. But I can't visualize that if $P[X=x]=0$, there is an infinite number of possible $x$'s. And also why do their probabilities get infinitely small ?
2015/03/21
[ "https://stats.stackexchange.com/questions/142730", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/26130/" ]
Let $(\Omega,\mathscr{F},P)$ be the underlying probability space. We say that a measurable function $X:\Omega\to\mathbb{R}$ is an absolutely continuous random variable if the probability measure $\mu\_X$ over $(\mathbb{R},\mathscr{B})$ defined by $\mu\_X(B)=P\{X\in B\}$, known as the distribution of $X$, is dominated b...
This question is very simple. PDF is the density, then to get the probability you need to multiply it by the width of the region. So, when you get a smaller region around the point of interest $x$ the height of the density doesn't change, hence the probability is smaller and smaller while you squeeze the area around yo...
142,730
I know that for any continuous variable $P[X=x]=0$. But I can't visualize that if $P[X=x]=0$, there is an infinite number of possible $x$'s. And also why do their probabilities get infinitely small ?
2015/03/21
[ "https://stats.stackexchange.com/questions/142730", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/26130/" ]
$X$ is a continuous random variable means its distribution function ***$F$ is continuous***. This is the only condition we have but from which we can derive that $P(X = x) = 0$. In fact, by continuity of $F$, we have $F(x) = F(x-)$ for every $x \in \mathbb{R}^1$, therefore: $$P(X = x) = P(X \leq x) - P(X < x) = F(x) ...
**This is really a question about probabilities.** It could be rephrased something like > > Suppose there are an infinite number of *disjoint* events. Why must their probabilities eventually become arbitrarily small? > > > Well, if they didn't become small, there would be a positive number $\epsilon$ smaller tha...
142,730
I know that for any continuous variable $P[X=x]=0$. But I can't visualize that if $P[X=x]=0$, there is an infinite number of possible $x$'s. And also why do their probabilities get infinitely small ?
2015/03/21
[ "https://stats.stackexchange.com/questions/142730", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/26130/" ]
**This is really a question about probabilities.** It could be rephrased something like > > Suppose there are an infinite number of *disjoint* events. Why must their probabilities eventually become arbitrarily small? > > > Well, if they didn't become small, there would be a positive number $\epsilon$ smaller tha...
This question is very simple. PDF is the density, then to get the probability you need to multiply it by the width of the region. So, when you get a smaller region around the point of interest $x$ the height of the density doesn't change, hence the probability is smaller and smaller while you squeeze the area around yo...
142,730
I know that for any continuous variable $P[X=x]=0$. But I can't visualize that if $P[X=x]=0$, there is an infinite number of possible $x$'s. And also why do their probabilities get infinitely small ?
2015/03/21
[ "https://stats.stackexchange.com/questions/142730", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/26130/" ]
$X$ is a continuous random variable means its distribution function ***$F$ is continuous***. This is the only condition we have but from which we can derive that $P(X = x) = 0$. In fact, by continuity of $F$, we have $F(x) = F(x-)$ for every $x \in \mathbb{R}^1$, therefore: $$P(X = x) = P(X \leq x) - P(X < x) = F(x) ...
There are many answers here which address the technical reasons for why infinitesimally small slices of a continuous probability distribution, $Pr(X=x)$, are 0. The key idea here is that this probability is uncountable. Instead of adding to the mathematically driven answers here, I would like to connect this phenomeno...
142,730
I know that for any continuous variable $P[X=x]=0$. But I can't visualize that if $P[X=x]=0$, there is an infinite number of possible $x$'s. And also why do their probabilities get infinitely small ?
2015/03/21
[ "https://stats.stackexchange.com/questions/142730", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/26130/" ]
Let $(\Omega,\mathscr{F},P)$ be the underlying probability space. We say that a measurable function $X:\Omega\to\mathbb{R}$ is an absolutely continuous random variable if the probability measure $\mu\_X$ over $(\mathbb{R},\mathscr{B})$ defined by $\mu\_X(B)=P\{X\in B\}$, known as the distribution of $X$, is dominated b...
There are many answers here which address the technical reasons for why infinitesimally small slices of a continuous probability distribution, $Pr(X=x)$, are 0. The key idea here is that this probability is uncountable. Instead of adding to the mathematically driven answers here, I would like to connect this phenomeno...
142,730
I know that for any continuous variable $P[X=x]=0$. But I can't visualize that if $P[X=x]=0$, there is an infinite number of possible $x$'s. And also why do their probabilities get infinitely small ?
2015/03/21
[ "https://stats.stackexchange.com/questions/142730", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/26130/" ]
Let $(\Omega,\mathscr{F},P)$ be the underlying probability space. We say that a measurable function $X:\Omega\to\mathbb{R}$ is an absolutely continuous random variable if the probability measure $\mu\_X$ over $(\mathbb{R},\mathscr{B})$ defined by $\mu\_X(B)=P\{X\in B\}$, known as the distribution of $X$, is dominated b...
**This is really a question about probabilities.** It could be rephrased something like > > Suppose there are an infinite number of *disjoint* events. Why must their probabilities eventually become arbitrarily small? > > > Well, if they didn't become small, there would be a positive number $\epsilon$ smaller tha...
142,730
I know that for any continuous variable $P[X=x]=0$. But I can't visualize that if $P[X=x]=0$, there is an infinite number of possible $x$'s. And also why do their probabilities get infinitely small ?
2015/03/21
[ "https://stats.stackexchange.com/questions/142730", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/26130/" ]
Probabilities are models for the *relative frequencies* of observations. If an event $A$ is observed to have occurred $N\_A$ times on $N$ trials, then its relative frequency is $$\text{relative frequency of }(A) = \frac{N\_A}{N}$$ and it is generally believed that the numerical value of the above ratio is a close appr...
$X$ is a continuous random variable means its distribution function ***$F$ is continuous***. This is the only condition we have but from which we can derive that $P(X = x) = 0$. In fact, by continuity of $F$, we have $F(x) = F(x-)$ for every $x \in \mathbb{R}^1$, therefore: $$P(X = x) = P(X \leq x) - P(X < x) = F(x) ...
142,730
I know that for any continuous variable $P[X=x]=0$. But I can't visualize that if $P[X=x]=0$, there is an infinite number of possible $x$'s. And also why do their probabilities get infinitely small ?
2015/03/21
[ "https://stats.stackexchange.com/questions/142730", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/26130/" ]
**This is really a question about probabilities.** It could be rephrased something like > > Suppose there are an infinite number of *disjoint* events. Why must their probabilities eventually become arbitrarily small? > > > Well, if they didn't become small, there would be a positive number $\epsilon$ smaller tha...
There are many answers here which address the technical reasons for why infinitesimally small slices of a continuous probability distribution, $Pr(X=x)$, are 0. The key idea here is that this probability is uncountable. Instead of adding to the mathematically driven answers here, I would like to connect this phenomeno...
142,730
I know that for any continuous variable $P[X=x]=0$. But I can't visualize that if $P[X=x]=0$, there is an infinite number of possible $x$'s. And also why do their probabilities get infinitely small ?
2015/03/21
[ "https://stats.stackexchange.com/questions/142730", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/26130/" ]
Probabilities are models for the *relative frequencies* of observations. If an event $A$ is observed to have occurred $N\_A$ times on $N$ trials, then its relative frequency is $$\text{relative frequency of }(A) = \frac{N\_A}{N}$$ and it is generally believed that the numerical value of the above ratio is a close appr...
There are many answers here which address the technical reasons for why infinitesimally small slices of a continuous probability distribution, $Pr(X=x)$, are 0. The key idea here is that this probability is uncountable. Instead of adding to the mathematically driven answers here, I would like to connect this phenomeno...
142,730
I know that for any continuous variable $P[X=x]=0$. But I can't visualize that if $P[X=x]=0$, there is an infinite number of possible $x$'s. And also why do their probabilities get infinitely small ?
2015/03/21
[ "https://stats.stackexchange.com/questions/142730", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/26130/" ]
Let $(\Omega,\mathscr{F},P)$ be the underlying probability space. We say that a measurable function $X:\Omega\to\mathbb{R}$ is an absolutely continuous random variable if the probability measure $\mu\_X$ over $(\mathbb{R},\mathscr{B})$ defined by $\mu\_X(B)=P\{X\in B\}$, known as the distribution of $X$, is dominated b...
$X$ is a continuous random variable means its distribution function ***$F$ is continuous***. This is the only condition we have but from which we can derive that $P(X = x) = 0$. In fact, by continuity of $F$, we have $F(x) = F(x-)$ for every $x \in \mathbb{R}^1$, therefore: $$P(X = x) = P(X \leq x) - P(X < x) = F(x) ...
18,112,567
I've run into this situation several times: there are multiple patterns some text may match against, and you want to do something specific based on which pattern it is. In the past I've always just used a list of regular expressions and iterated until finding a match. What I'm wondering is if there is a more efficien...
2013/08/07
[ "https://Stackoverflow.com/questions/18112567", "https://Stackoverflow.com", "https://Stackoverflow.com/users/105570/" ]
Let's assume that these regular expressions are truly regular. Each can then be converted into a [Nondeterministic Finite Automaton](http://en.wikipedia.org/wiki/Nondeterministic_finite_automata), which can be [converted](http://en.wikipedia.org/wiki/Regular_expression#Implementations_and_running_times) into a [Determi...
The fgrep tool does exactly what you're talking about: matches text against multiple regular expressions. My understanding is that the original version used something very similar to the [Aho-Corasick string matching algorithm](http://en.wikipedia.org/wiki/Aho%E2%80%93Corasick_string_matching_algorithm) to search multi...
18,112,567
I've run into this situation several times: there are multiple patterns some text may match against, and you want to do something specific based on which pattern it is. In the past I've always just used a list of regular expressions and iterated until finding a match. What I'm wondering is if there is a more efficien...
2013/08/07
[ "https://Stackoverflow.com/questions/18112567", "https://Stackoverflow.com", "https://Stackoverflow.com/users/105570/" ]
Let's assume that these regular expressions are truly regular. Each can then be converted into a [Nondeterministic Finite Automaton](http://en.wikipedia.org/wiki/Nondeterministic_finite_automata), which can be [converted](http://en.wikipedia.org/wiki/Regular_expression#Implementations_and_running_times) into a [Determi...
Few years back I made an implementation of a regex search engine based on a deterministic finite state machine, very similar to what Thomas describes in his answer. It compiles a list of regex keys and values into a single finite state automaton, which references objects of a defined type in its terminal states (for in...
18,112,567
I've run into this situation several times: there are multiple patterns some text may match against, and you want to do something specific based on which pattern it is. In the past I've always just used a list of regular expressions and iterated until finding a match. What I'm wondering is if there is a more efficien...
2013/08/07
[ "https://Stackoverflow.com/questions/18112567", "https://Stackoverflow.com", "https://Stackoverflow.com/users/105570/" ]
The fgrep tool does exactly what you're talking about: matches text against multiple regular expressions. My understanding is that the original version used something very similar to the [Aho-Corasick string matching algorithm](http://en.wikipedia.org/wiki/Aho%E2%80%93Corasick_string_matching_algorithm) to search multi...
Few years back I made an implementation of a regex search engine based on a deterministic finite state machine, very similar to what Thomas describes in his answer. It compiles a list of regex keys and values into a single finite state automaton, which references objects of a defined type in its terminal states (for in...
55,198,213
I have a drop down which displays 'value2'. Its id is "select" like below. ``` <select class="selectOneMenu_Medium_class searchField" id="selectBase"> <option value="Select">Select</option> </select> ``` ```js option.attr('value', value['value']); option.text(value['value2']); option.attr('label', value['value2'])...
2019/03/16
[ "https://Stackoverflow.com/questions/55198213", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8957092/" ]
You have a working query which you need to join to the table `department`: ``` select d.Dept_Name from department d inner join ( select dept_no from employee group by dept_no order by count(*) desc fetch first row only ) t on t.dept_no = d.dept_no ``` Edit Try this (I cannot try it): ``` select d.de...
If you are not looking for duplicates, then: ``` select d.dept_name, count(*) from department d join employee e on d.dept_no = e.dept_no group by d.dept_no, d.dept_name order by count(dept_no) desc fetch first row only; ```
55,198,213
I have a drop down which displays 'value2'. Its id is "select" like below. ``` <select class="selectOneMenu_Medium_class searchField" id="selectBase"> <option value="Select">Select</option> </select> ``` ```js option.attr('value', value['value']); option.text(value['value2']); option.attr('label', value['value2'])...
2019/03/16
[ "https://Stackoverflow.com/questions/55198213", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8957092/" ]
You may have used `FETCH..FIRST` syntax using `WITH TIES` instead of `ONLY`. ``` SELECT d.dept_name FROM department d JOIN employee e ON d.dept_no = e.dept_no GROUP BY d.dept_name ORDER BY COUNT(*) DESC FETCH FIRST 1 ROW WITH TIES ; ``` [**Demo**](https://dbfiddle.uk/?rdbms=oracle_18&fiddle=55690e36bfbdd3a20c...
You have a working query which you need to join to the table `department`: ``` select d.Dept_Name from department d inner join ( select dept_no from employee group by dept_no order by count(*) desc fetch first row only ) t on t.dept_no = d.dept_no ``` Edit Try this (I cannot try it): ``` select d.de...
55,198,213
I have a drop down which displays 'value2'. Its id is "select" like below. ``` <select class="selectOneMenu_Medium_class searchField" id="selectBase"> <option value="Select">Select</option> </select> ``` ```js option.attr('value', value['value']); option.text(value['value2']); option.attr('label', value['value2'])...
2019/03/16
[ "https://Stackoverflow.com/questions/55198213", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8957092/" ]
You may have used `FETCH..FIRST` syntax using `WITH TIES` instead of `ONLY`. ``` SELECT d.dept_name FROM department d JOIN employee e ON d.dept_no = e.dept_no GROUP BY d.dept_name ORDER BY COUNT(*) DESC FETCH FIRST 1 ROW WITH TIES ; ``` [**Demo**](https://dbfiddle.uk/?rdbms=oracle_18&fiddle=55690e36bfbdd3a20c...
If you are not looking for duplicates, then: ``` select d.dept_name, count(*) from department d join employee e on d.dept_no = e.dept_no group by d.dept_no, d.dept_name order by count(dept_no) desc fetch first row only; ```
66,813,183
I have an ASP.NET Core API app which runs some background processes via HangFire. One of the process includes writing a csv file onto the wwwroot folder as following: ``` public async Task Work(PerformContext context) { var latestLikes = await this.likeRepository .All() ...
2021/03/26
[ "https://Stackoverflow.com/questions/66813183", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14521616/" ]
After one week of researching I finally found out the **solution** I should have mentioned that I use Azure DevOps for CI & CD. By default the azure app service is deployed as a zip (which cuts the direct access to the file system) What I had to do was to change the Deployment method to a Web Deploy ([Additional Depl...
Below code works fine on my side: ``` using System.IO; using System.Threading.Tasks; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc; using Microsoft.Azure.WebJobs; using Microsoft.Azure.WebJobs.Extensions.Http; using Microsoft.Extensions.Logging; using Newtonsoft.Json; namespace FunctionApp97 { p...