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
17,720,594
I've tried searching for about an hour through all the Foreign Key / Collation Questions but I can't find something even remotely close to my question. I have 2 tables from two different software vendors sitting in the same database. One vendor hard codes their collations to Latin1\_General\_BIN while the other uses t...
2013/07/18
[ "https://Stackoverflow.com/questions/17720594", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1538480/" ]
Yes you must use js to do it dynamically on the spot You have a jQuery tag so I will show an example in jQuery This is not the best example but it works and it's a starting point **JS:** ``` $(function(){ $('#master').on('change', function() { var count = $(this).val(); $('#otherInputs').html('...
Here's the **[FIDDLE](http://jsfiddle.net/vonDy2791/h5RTG/)**. Hope it helps. :) html ``` <input type="text" size="3" maxlength="3" id="count" name="count" value="1"> <div id="container"></div> ``` script ``` $('#count').on('keyup', function () { var $this = $(this); var count = $this.val(); $('#contai...
17,720,594
I've tried searching for about an hour through all the Foreign Key / Collation Questions but I can't find something even remotely close to my question. I have 2 tables from two different software vendors sitting in the same database. One vendor hard codes their collations to Latin1\_General\_BIN while the other uses t...
2013/07/18
[ "https://Stackoverflow.com/questions/17720594", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1538480/" ]
Here's a simple javascript snippet that doesn't make use of any frameworks: ``` function addInputs() { var count = parseInt(document.getElementById("count").value); for (var i = 2; i <= count; i++) { document.getElementById('moreinputs').innerHTML += '<input type="text" name="input_' + i + '" id="input...
Yes you must use js to do it dynamically on the spot You have a jQuery tag so I will show an example in jQuery This is not the best example but it works and it's a starting point **JS:** ``` $(function(){ $('#master').on('change', function() { var count = $(this).val(); $('#otherInputs').html('...
17,720,594
I've tried searching for about an hour through all the Foreign Key / Collation Questions but I can't find something even remotely close to my question. I have 2 tables from two different software vendors sitting in the same database. One vendor hard codes their collations to Latin1\_General\_BIN while the other uses t...
2013/07/18
[ "https://Stackoverflow.com/questions/17720594", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1538480/" ]
Yes you must use js to do it dynamically on the spot You have a jQuery tag so I will show an example in jQuery This is not the best example but it works and it's a starting point **JS:** ``` $(function(){ $('#master').on('change', function() { var count = $(this).val(); $('#otherInputs').html('...
This worked for me ``` function AddField() { var count = $("#countetfield").val(); var i = 1; var id = $("#container .testClass:last").attr('name'); var test = id.split("_"); id_name = test[1]; while (i <= count) { id_name++; var a = '<in...
17,720,594
I've tried searching for about an hour through all the Foreign Key / Collation Questions but I can't find something even remotely close to my question. I have 2 tables from two different software vendors sitting in the same database. One vendor hard codes their collations to Latin1\_General\_BIN while the other uses t...
2013/07/18
[ "https://Stackoverflow.com/questions/17720594", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1538480/" ]
Here's a simple javascript snippet that doesn't make use of any frameworks: ``` function addInputs() { var count = parseInt(document.getElementById("count").value); for (var i = 2; i <= count; i++) { document.getElementById('moreinputs').innerHTML += '<input type="text" name="input_' + i + '" id="input...
Here's the **[FIDDLE](http://jsfiddle.net/vonDy2791/h5RTG/)**. Hope it helps. :) html ``` <input type="text" size="3" maxlength="3" id="count" name="count" value="1"> <div id="container"></div> ``` script ``` $('#count').on('keyup', function () { var $this = $(this); var count = $this.val(); $('#contai...
17,720,594
I've tried searching for about an hour through all the Foreign Key / Collation Questions but I can't find something even remotely close to my question. I have 2 tables from two different software vendors sitting in the same database. One vendor hard codes their collations to Latin1\_General\_BIN while the other uses t...
2013/07/18
[ "https://Stackoverflow.com/questions/17720594", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1538480/" ]
Here's a simple javascript snippet that doesn't make use of any frameworks: ``` function addInputs() { var count = parseInt(document.getElementById("count").value); for (var i = 2; i <= count; i++) { document.getElementById('moreinputs').innerHTML += '<input type="text" name="input_' + i + '" id="input...
This worked for me ``` function AddField() { var count = $("#countetfield").val(); var i = 1; var id = $("#container .testClass:last").attr('name'); var test = id.split("_"); id_name = test[1]; while (i <= count) { id_name++; var a = '<in...
723,869
Every once in a while I'm editing some long pair of if-then-else statements (or worse, *nested* if-then-else statements) , like, say, this: ``` if A < B then begin DoSomething; DoSomethingElse; {...and more statements going on and on and on...} FinallyWrapUpThisBit; end else begin DoT...
2009/04/07
[ "https://Stackoverflow.com/questions/723869", "https://Stackoverflow.com", "https://Stackoverflow.com/users/32303/" ]
With plain Delphi out of the box, you would have to surround your begin...end with ``` {$region 'begin...end'} .... {$endregion} ``` which can be done through a code template... I remember Castalia for the nice colored visualization of code blocks (begin..end) but I don't remember if it was foldable.
Use the refactoring tools to move the conditional branches' code into separate functions. Then you won't need to fold anything. You might also find that you can merge code that's common to the two branches, such as that call to `FinallyWrapUpThisBit`.
723,869
Every once in a while I'm editing some long pair of if-then-else statements (or worse, *nested* if-then-else statements) , like, say, this: ``` if A < B then begin DoSomething; DoSomethingElse; {...and more statements going on and on and on...} FinallyWrapUpThisBit; end else begin DoT...
2009/04/07
[ "https://Stackoverflow.com/questions/723869", "https://Stackoverflow.com", "https://Stackoverflow.com/users/32303/" ]
With plain Delphi out of the box, you would have to surround your begin...end with ``` {$region 'begin...end'} .... {$endregion} ``` which can be done through a code template... I remember Castalia for the nice colored visualization of code blocks (begin..end) but I don't remember if it was foldable.
Another big helper here would be [CNPack](http://www.cnpack.org/index.php?lang=en). It is a wizard which installs into Delphi and will colorize your begin/end pairs, making it MUCH easier to follow the code. It doesn't exactly do code folding, for that you need to use the {$REGION} {$ENDREGION} tags.
723,869
Every once in a while I'm editing some long pair of if-then-else statements (or worse, *nested* if-then-else statements) , like, say, this: ``` if A < B then begin DoSomething; DoSomethingElse; {...and more statements going on and on and on...} FinallyWrapUpThisBit; end else begin DoT...
2009/04/07
[ "https://Stackoverflow.com/questions/723869", "https://Stackoverflow.com", "https://Stackoverflow.com/users/32303/" ]
Use the refactoring tools to move the conditional branches' code into separate functions. Then you won't need to fold anything. You might also find that you can merge code that's common to the two branches, such as that call to `FinallyWrapUpThisBit`.
Another big helper here would be [CNPack](http://www.cnpack.org/index.php?lang=en). It is a wizard which installs into Delphi and will colorize your begin/end pairs, making it MUCH easier to follow the code. It doesn't exactly do code folding, for that you need to use the {$REGION} {$ENDREGION} tags.
67,013,686
I am getting an error in CPLEX about profiler error.This is being shown in the Profiler tab at the bottom window. Overflow occurred, please use oplrun -profile I have my outputs written back to excel using the sheetwrite command ( like for example solXbimt to SheetWrite(sheet,"Result!B3:E1000000"); ). The engine log ...
2021/04/09
[ "https://Stackoverflow.com/questions/67013686", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10572464/" ]
You may use **"getOwnPropertyName"** to get all keys of object and assign them to a list or array. Let me know if my answer is helpful! ``` var text = { "28fca3e7-7b5a-95b1-205c-03ff199dc2b4": 6, "426fb283-6fa9-a58c-e896-f795a5d42c50": 8, "629fe212-0d74-f5ce-d476-baa527252ffb": 12}; var keys = Object.getO...
Like this: ``` const obj = { "28fca3e7-7b5a-95b1-205c-03ff199dc2b4": 6, "426fb283-6fa9-a58c-e896-f795a5d42c50": 8, "629fe212-0d74-f5ce-d476-baa527252ffb": 12, }; const arr = Object.keys(obj).map(k => ({ id: k, count: obj[k], })); ```
67,013,686
I am getting an error in CPLEX about profiler error.This is being shown in the Profiler tab at the bottom window. Overflow occurred, please use oplrun -profile I have my outputs written back to excel using the sheetwrite command ( like for example solXbimt to SheetWrite(sheet,"Result!B3:E1000000"); ). The engine log ...
2021/04/09
[ "https://Stackoverflow.com/questions/67013686", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10572464/" ]
You may use **"getOwnPropertyName"** to get all keys of object and assign them to a list or array. Let me know if my answer is helpful! ``` var text = { "28fca3e7-7b5a-95b1-205c-03ff199dc2b4": 6, "426fb283-6fa9-a58c-e896-f795a5d42c50": 8, "629fe212-0d74-f5ce-d476-baa527252ffb": 12}; var keys = Object.getO...
just add the keys you want and put those values on there. try this. ``` Object.keys(arr).map(key => ({"id":key, "count": arr[key]})) ```
67,013,686
I am getting an error in CPLEX about profiler error.This is being shown in the Profiler tab at the bottom window. Overflow occurred, please use oplrun -profile I have my outputs written back to excel using the sheetwrite command ( like for example solXbimt to SheetWrite(sheet,"Result!B3:E1000000"); ). The engine log ...
2021/04/09
[ "https://Stackoverflow.com/questions/67013686", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10572464/" ]
You may use **"getOwnPropertyName"** to get all keys of object and assign them to a list or array. Let me know if my answer is helpful! ``` var text = { "28fca3e7-7b5a-95b1-205c-03ff199dc2b4": 6, "426fb283-6fa9-a58c-e896-f795a5d42c50": 8, "629fe212-0d74-f5ce-d476-baa527252ffb": 12}; var keys = Object.getO...
You'll use the `Object.keys()` iterator to get an array of keys, and then transform that array into an array of objects. ``` const obj = { a: 1, b: 2, c: 3, }; console.log(Object.keys(obj).map(key => ({id: key, count: obj[key]}))); ```
67,013,686
I am getting an error in CPLEX about profiler error.This is being shown in the Profiler tab at the bottom window. Overflow occurred, please use oplrun -profile I have my outputs written back to excel using the sheetwrite command ( like for example solXbimt to SheetWrite(sheet,"Result!B3:E1000000"); ). The engine log ...
2021/04/09
[ "https://Stackoverflow.com/questions/67013686", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10572464/" ]
You may use **"getOwnPropertyName"** to get all keys of object and assign them to a list or array. Let me know if my answer is helpful! ``` var text = { "28fca3e7-7b5a-95b1-205c-03ff199dc2b4": 6, "426fb283-6fa9-a58c-e896-f795a5d42c50": 8, "629fe212-0d74-f5ce-d476-baa527252ffb": 12}; var keys = Object.getO...
Simpler than mapping from the keys is map Object.entries() ```js const data = { "28fca3e7-7b5a-95b1-205c-03ff199dc2b4": 6, "426fb283-6fa9-a58c-e896-f795a5d42c50": 8, "629fe212-0d74-f5ce-d476-baa527252ffb": 12, }, res = Object.entries(data).map(([id, count]) => ({id, count})) console.log(res) ```
67,013,686
I am getting an error in CPLEX about profiler error.This is being shown in the Profiler tab at the bottom window. Overflow occurred, please use oplrun -profile I have my outputs written back to excel using the sheetwrite command ( like for example solXbimt to SheetWrite(sheet,"Result!B3:E1000000"); ). The engine log ...
2021/04/09
[ "https://Stackoverflow.com/questions/67013686", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10572464/" ]
You may use **"getOwnPropertyName"** to get all keys of object and assign them to a list or array. Let me know if my answer is helpful! ``` var text = { "28fca3e7-7b5a-95b1-205c-03ff199dc2b4": 6, "426fb283-6fa9-a58c-e896-f795a5d42c50": 8, "629fe212-0d74-f5ce-d476-baa527252ffb": 12}; var keys = Object.getO...
You can simplify use [`Object.entries`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/entries) combined with `Array#map` like this ```js const object = {"28fca3e7-7b5a-95b1-205c-03ff199dc2b4":6,"426fb283-6fa9-a58c-e896-f795a5d42c50":8,"629fe212-0d74-f5ce-d476-baa527252ffb":12,...
36,863,154
I'm developing Google Cast custom receiver app using WebTorrent (<https://webtorrent.io>, <https://github.com/feross/webtorrent>) and Google Cast sender app using JavaScript (Chrome) SDK. The idea of my app is sending torrent id (magnet URI like `magnet:?xt=urn:btih:6a9759bffd5c0af65319979fb7832189f4f3c35d` or HTTP/HT...
2016/04/26
[ "https://Stackoverflow.com/questions/36863154", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4050470/" ]
There is actually an existing Google Cast UX Guidelines which states that the sender application must provide a top-level Cast button. There are three ways to support a Cast button which were fully discussed in [Android Sender App Development](https://developers.google.com/cast/docs/android_sender#top_of_page) * Using...
I realize it's been 3 years, but what jumps out at me is that you are missing the "controls" attribute on your video tag! Without the attribute, a player will render the video but provide no ui for controlling playback.... Syntax is the same as it is for autoplay: the controls attribute is standalone and takes no valu...
55,485,603
I have setup SMS on Twilio and can receive an SMS via webhooks. I can manipulate the form data to do what I want however every inbound SMS message throws an error on Twilio's dashboard. It's looking for some response. Right now I'm just dumping the form to a text file while testing. ``` <!doctype html> <?xml version="...
2019/04/03
[ "https://Stackoverflow.com/questions/55485603", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10475625/" ]
Twilio expects a content type of `text/xml` and also expects the first line of the response to be `<?xml version="1.0" encoding="UTF-8"?>`. If your response has one or more empty lines before `<?xml version="1.0" encoding="UTF-8"?>` you're still going to get an error. What I ended up doing, was with an Application.c...
Thanks everybody. My final test code looked like this: ``` <cfsetting enablecfoutputonly="true" showdebugoutput="false" requesttimeout="30" /> <cfheader name="content-type" value="text/xml" /> <cfoutput><?xml version="1.0" encoding="UTF-8"?> <Response> <Message>Thanks for getting in touch, I'll call you later...
7,122,782
I want to compress the image with same quality using PHP.What is my situation is I want to display the user images when they loged in.Currently I am showing the original image whatever they uplaod in mysite.So if they uplaod 4MB file I am downloading the 4MB file and showing to them.Instead of that I want to compress t...
2011/08/19
[ "https://Stackoverflow.com/questions/7122782", "https://Stackoverflow.com", "https://Stackoverflow.com/users/197894/" ]
You can't compress an image maintaining the same quality and resolution. You can scale it down however (a 4MB JPEG file is pretty huge - if it's meant for screen use only, 1600 pixels or less image would do fine most of the times), using `GD`, `Imagick`, etc.
Try to convert them to different formats. gif is the best for small images. There are a lot of converting classes so just look around google
7,122,782
I want to compress the image with same quality using PHP.What is my situation is I want to display the user images when they loged in.Currently I am showing the original image whatever they uplaod in mysite.So if they uplaod 4MB file I am downloading the 4MB file and showing to them.Instead of that I want to compress t...
2011/08/19
[ "https://Stackoverflow.com/questions/7122782", "https://Stackoverflow.com", "https://Stackoverflow.com/users/197894/" ]
You can't compress an image maintaining the same quality and resolution. You can scale it down however (a 4MB JPEG file is pretty huge - if it's meant for screen use only, 1600 pixels or less image would do fine most of the times), using `GD`, `Imagick`, etc.
You should resize the images when they have been uploaded to your FTP server. Of course you will have to deal with a loss of quality and resolution. Have a look at <http://www.white-hat-web-design.co.uk/blog/resizing-images-with-php/>
74,427,883
I have a column that contains either letters or numbers. I want to add a column identifying whether each cell contains a letter or a number. The problem is that there are thousands of records in this particular database. I tried the following syntax: `= Table.AddColumn(Source, "Column2", each if [Column1] is number t...
2022/11/14
[ "https://Stackoverflow.com/questions/74427883", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20172589/" ]
Use this expression: ``` = Table.AddColumn(Source, "Column2", each if List.Contains({"0".."9"}, Text.Start([Column1], 1)) then "Numbers" else "Letters") ``` [![enter image description here](https://i.stack.imgur.com/baEGV.png)](https://i.stack.imgur.com/baEGV.png) Note: It would have been smart to add sample data t...
Add column, custom column with ``` = try if Value.Is(Number.From([Column1]), type number) then "number" else "not" otherwise "not" ``` Peter's method works if the choice is AAA/111 but this one tests for A11 and 1BC as well
9,919,909
I want to be able to limit Perl's `File::Find` to a directory depth (below the specified search) to the specified directory **and** 1 & 2 subdirectories beneath it. I want to be able to enumerate the files at the same time, if this is possible. It must work with absolute paths.
2012/03/29
[ "https://Stackoverflow.com/questions/9919909", "https://Stackoverflow.com", "https://Stackoverflow.com/users/504239/" ]
This [perlmonks node](http://www.perlmonks.org/?node_id=217166) explains how to implement mindepth and maxdepth from GNU's find. Basically, they count the number of slashes in a directory, and use that to determine the depth. The [preprocess](http://perldoc.perl.org/File/Find.html#preprocess) function will then only ...
Here is another solution that determines the current depth within `File::Find::find` by counting the number of directories returned by `File::Spec->splitdir`, which should be more portable than counting slashes: ``` use strict; use warnings; use File::Find; # maximum depth to continue search my $maxDepth = 2; # sta...
49,808,350
I'm new to android and I can't seemed to figure out what causes this error. Im trying to experiment a text view or edit view where if you click the button, it will save the inputted text and display it on the text view once you return to the app. The error prompt `error: cannot find symbol variable textView` and some...
2018/04/13
[ "https://Stackoverflow.com/questions/49808350", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9639128/" ]
Problem is: You are not using TextView. ``` textView = (EditText) findViewById(R.id.textView); ``` => ``` textView = (TextView) findViewById(R.id.textView); ``` Yes, EditText is a kind of TextView, but it seems that in your xml, it will be TextView. So, how about cast to TextView ?
It is simply nothing but unused. If you think you need it keep it or else you can remove it. Also most of the time imports are brought automatically so you dont have to worry. If you want to bring imports simply just do: ``` Alt + Enter ```
49,808,350
I'm new to android and I can't seemed to figure out what causes this error. Im trying to experiment a text view or edit view where if you click the button, it will save the inputted text and display it on the text view once you return to the app. The error prompt `error: cannot find symbol variable textView` and some...
2018/04/13
[ "https://Stackoverflow.com/questions/49808350", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9639128/" ]
Check you XML file to see if you have declared `R.id.textView` as TextView or Edittext. Both are different. Your input field is your EditText and your output field where you want to show the data is TextView. also not sure what you have declared as Connect. but `SharedPreference` need the mode from a Context so your ...
It is simply nothing but unused. If you think you need it keep it or else you can remove it. Also most of the time imports are brought automatically so you dont have to worry. If you want to bring imports simply just do: ``` Alt + Enter ```
45,456,179
I have a chunk of code that does something like this: ``` if (sqlStatement.WillUpdateDatabase) DoThing1(); else DoThing2(); ``` Currently `WillUpdateDatabase`is implemented as ``` public bool WillUpdateDatabase { get { return statementText.StartsWith("SELECT"); } } ``` This catches the majority of cases, ...
2017/08/02
[ "https://Stackoverflow.com/questions/45456179", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2053848/" ]
As many others have commented, this really is a nasty problem and inspecting the SQL isn't really ever going to cut it for you because you'll practically end up writing an entire SQL parser (and that really would be reinventing the wheel). You'll probably have to make a database user that only has read permissions for ...
Since your statement text will change values only with the SQL queries beginning with `UPDATE` or `INSERT`, one way to test if you query will try to update could be the following : ``` public bool WillUpdateDatabase { get { return (statementText.StartsWith("UPDATE") || statementText.StartsWith("INSERT") ) } } ```...
193,805
I need a plant that acts as a very relatively effective, portable source of stored chemical energy. I figure the best way to do this is to have a plant/plant-like organism that stores its unused energy as primarily adipose tissue instead of starch. I’ve currently settled on a tuber / potato-type thing that originates ...
2021/01/12
[ "https://worldbuilding.stackexchange.com/questions/193805", "https://worldbuilding.stackexchange.com", "https://worldbuilding.stackexchange.com/users/81873/" ]
**Probably Not** ---------------- @Cadence is entirely right in their assessment: there have been numerous cases throughout history where the expansion if an organized, agrarian society has been opposed by tight-knit groups of predators armed with human intelligence: indigenous peoples. **This isn’t just applicable t...
To stop medieval humans settling in an area, all you need to do is make their crops die. There are so many ways to do this if the animals are out to get us: * Birds that see humans planting crops and go in and eat the seeds (or fly away with them for their own crops). Also they eat anything naturally occurring near th...
193,805
I need a plant that acts as a very relatively effective, portable source of stored chemical energy. I figure the best way to do this is to have a plant/plant-like organism that stores its unused energy as primarily adipose tissue instead of starch. I’ve currently settled on a tuber / potato-type thing that originates ...
2021/01/12
[ "https://worldbuilding.stackexchange.com/questions/193805", "https://worldbuilding.stackexchange.com", "https://worldbuilding.stackexchange.com/users/81873/" ]
A better natural barrier to human settlement in an area would be endemic diseases. There are plenty of pathogens in the real world that have reservoirs in various wild species, so they're almost impossible to properly eliminate. Sicknesses like malaria constrained European colonization for centuries until effective med...
To stop medieval humans settling in an area, all you need to do is make their crops die. There are so many ways to do this if the animals are out to get us: * Birds that see humans planting crops and go in and eat the seeds (or fly away with them for their own crops). Also they eat anything naturally occurring near th...
193,805
I need a plant that acts as a very relatively effective, portable source of stored chemical energy. I figure the best way to do this is to have a plant/plant-like organism that stores its unused energy as primarily adipose tissue instead of starch. I’ve currently settled on a tuber / potato-type thing that originates ...
2021/01/12
[ "https://worldbuilding.stackexchange.com/questions/193805", "https://worldbuilding.stackexchange.com", "https://worldbuilding.stackexchange.com/users/81873/" ]
**Probably Not** ---------------- @Cadence is entirely right in their assessment: there have been numerous cases throughout history where the expansion if an organized, agrarian society has been opposed by tight-knit groups of predators armed with human intelligence: indigenous peoples. **This isn’t just applicable t...
A better natural barrier to human settlement in an area would be endemic diseases. There are plenty of pathogens in the real world that have reservoirs in various wild species, so they're almost impossible to properly eliminate. Sicknesses like malaria constrained European colonization for centuries until effective med...
13,975,595
I am working on an application which is compatible only with IE7 and IE8. I didn't know why but some suggested to use CSS over XPath while identifying the elements in IE. When I visited the official Selenium site. I read the message > > WebDriver uses a browser’s native XPath capabilities wherever possible. On those...
2012/12/20
[ "https://Stackoverflow.com/questions/13975595", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1918282/" ]
According to Ashley Wilson's [report from sauce labs](http://sauceio.com/index.php/2011/05/why-css-locators-are-the-way-to-go-vs-xpath/): **Pros**: 1. They’re faster 2. They’re more readable 3. CSS is jQuery’s locating strategy 4. No one else uses XPATH anyways! It's a bit outdated, however here are the numbers: !...
The biggest reason for suggesting CSS selectors over XPath in IE is performance. IE does not provide a native XPath-over-HTML option as does Firefox and Chrome. It does, however, provide a native CSS selector engine, which will **always** be faster than the JavaScript-only XPath engine implementation used in the IE dri...
13,975,595
I am working on an application which is compatible only with IE7 and IE8. I didn't know why but some suggested to use CSS over XPath while identifying the elements in IE. When I visited the official Selenium site. I read the message > > WebDriver uses a browser’s native XPath capabilities wherever possible. On those...
2012/12/20
[ "https://Stackoverflow.com/questions/13975595", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1918282/" ]
The biggest reason for suggesting CSS selectors over XPath in IE is performance. IE does not provide a native XPath-over-HTML option as does Firefox and Chrome. It does, however, provide a native CSS selector engine, which will **always** be faster than the JavaScript-only XPath engine implementation used in the IE dri...
Using CSS locator is the best option, not only on IE, also on FF and Chrome. Also, xpath is always the worst choice, because it needs to parse the whole page to find a simple element, so if you want performance in your tests and you can avoid it, just do it. Also, if you are using pageObjects I strongly recommend you ...
13,975,595
I am working on an application which is compatible only with IE7 and IE8. I didn't know why but some suggested to use CSS over XPath while identifying the elements in IE. When I visited the official Selenium site. I read the message > > WebDriver uses a browser’s native XPath capabilities wherever possible. On those...
2012/12/20
[ "https://Stackoverflow.com/questions/13975595", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1918282/" ]
The biggest reason for suggesting CSS selectors over XPath in IE is performance. IE does not provide a native XPath-over-HTML option as does Firefox and Chrome. It does, however, provide a native CSS selector engine, which will **always** be faster than the JavaScript-only XPath engine implementation used in the IE dri...
Brevity and Clarity are other reasons, in addition to speed. ------------------------------------------------------------ In addition to speed, I find that css is usually shorter and cleaner and easier to read. For example: xpath: ``` //ol[@class='choice-group'//li//label//input ``` vs css: ``` css=ol.choices-...
13,975,595
I am working on an application which is compatible only with IE7 and IE8. I didn't know why but some suggested to use CSS over XPath while identifying the elements in IE. When I visited the official Selenium site. I read the message > > WebDriver uses a browser’s native XPath capabilities wherever possible. On those...
2012/12/20
[ "https://Stackoverflow.com/questions/13975595", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1918282/" ]
According to Ashley Wilson's [report from sauce labs](http://sauceio.com/index.php/2011/05/why-css-locators-are-the-way-to-go-vs-xpath/): **Pros**: 1. They’re faster 2. They’re more readable 3. CSS is jQuery’s locating strategy 4. No one else uses XPATH anyways! It's a bit outdated, however here are the numbers: !...
Using CSS locator is the best option, not only on IE, also on FF and Chrome. Also, xpath is always the worst choice, because it needs to parse the whole page to find a simple element, so if you want performance in your tests and you can avoid it, just do it. Also, if you are using pageObjects I strongly recommend you ...
13,975,595
I am working on an application which is compatible only with IE7 and IE8. I didn't know why but some suggested to use CSS over XPath while identifying the elements in IE. When I visited the official Selenium site. I read the message > > WebDriver uses a browser’s native XPath capabilities wherever possible. On those...
2012/12/20
[ "https://Stackoverflow.com/questions/13975595", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1918282/" ]
According to Ashley Wilson's [report from sauce labs](http://sauceio.com/index.php/2011/05/why-css-locators-are-the-way-to-go-vs-xpath/): **Pros**: 1. They’re faster 2. They’re more readable 3. CSS is jQuery’s locating strategy 4. No one else uses XPATH anyways! It's a bit outdated, however here are the numbers: !...
Brevity and Clarity are other reasons, in addition to speed. ------------------------------------------------------------ In addition to speed, I find that css is usually shorter and cleaner and easier to read. For example: xpath: ``` //ol[@class='choice-group'//li//label//input ``` vs css: ``` css=ol.choices-...
13,975,595
I am working on an application which is compatible only with IE7 and IE8. I didn't know why but some suggested to use CSS over XPath while identifying the elements in IE. When I visited the official Selenium site. I read the message > > WebDriver uses a browser’s native XPath capabilities wherever possible. On those...
2012/12/20
[ "https://Stackoverflow.com/questions/13975595", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1918282/" ]
Brevity and Clarity are other reasons, in addition to speed. ------------------------------------------------------------ In addition to speed, I find that css is usually shorter and cleaner and easier to read. For example: xpath: ``` //ol[@class='choice-group'//li//label//input ``` vs css: ``` css=ol.choices-...
Using CSS locator is the best option, not only on IE, also on FF and Chrome. Also, xpath is always the worst choice, because it needs to parse the whole page to find a simple element, so if you want performance in your tests and you can avoid it, just do it. Also, if you are using pageObjects I strongly recommend you ...
280,797
I need to choose and install a server-client platform for a ~150 user base. They should be able to upload files (after logging in) through a web form and browse folders, download whatever the other users have uploaded, etc. All files would be private, no public links are generated. Some basic admin tasks would be neede...
2011/06/15
[ "https://serverfault.com/questions/280797", "https://serverfault.com", "https://serverfault.com/users/84658/" ]
Take a look at [filesender](http://www.filesender.org/) it is a new development for the academic (R&D) world, but it might suit your needs. There is a feature list on its website which I will not repeat here. Take a look and decide if it is for you or not.
[nephthys](http://oss.netshadow.at/wiki/nephthys) seems also apropriate, it has nice features as well.
165,756
Simple question: discounting Dumbledore (who knew Snape's loyalty was with him) and, eventually, Harry, **did the other members of the Order of the Phoenix like Sirius, Remus, Hagrid and others know that Snape was on their side?**
2017/07/26
[ "https://scifi.stackexchange.com/questions/165756", "https://scifi.stackexchange.com", "https://scifi.stackexchange.com/users/70135/" ]
Before the Battle of Hogwarts: No. I have no hard source for this, but there is some evidence: * Snape was treated like a traitor, for example, they secured Grimauld Place 12 against him * The Order forced Snape out of Hogwarts shortly before the final battle, that's not something you would do to an ally in such a des...
Snape was always known to be a double-agent, but everyone trusted his loyalty being with Dumbledore. At least, until the Battle of the Astronomy Tower. --- > > [...] Sirius and Snape were eyeing each other with the utmost loathing. > > > "I will settle, in the short term,' said Dumbledore, with a bite of impatienc...
50,088,730
I have a numpy array with shape likes ``` a1.shape # 1000 a1[0].shape # (100, 100, 3) ``` I want to change the shape in the way that ``` a1.shape # (1000, 100, 100, 3) ``` How can I achieve this?
2018/04/29
[ "https://Stackoverflow.com/questions/50088730", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3866981/" ]
Make a list of arrays with differing shapes (but same number of elements): ``` In [72]: alist = [np.ones((2,3),int),np.zeros(6,int),np.arange(6)] In [73]: alist Out[73]: [array([[1, 1, 1], [1, 1, 1]]), array([0, 0, 0, 0, 0, 0]), array([0, 1, 2, 3, 4, 5])] In [74]: np.array(alist) Out[74]: array([array([[1, 1...
Just post a solution in case anyone needs ``` x = [] for fname in fl1: x.append( np.array(Image.open(fname))) for i in range(0, len(x)): x[i] = imresize(x[i], [100,100], interp='bilinear') y = np.array(x) y.shape ```
6,447,898
I'm learning Javascript right now. Can anybody tell me why the second code block traces a empty path for -launch(this)- but using the first code block it gives me the right path? ``` "<form action='"+launchwebsite+"/subsite/' method='post' target='_blank' onsubmit='launch(this)'>" ``` and this not: ``` "<a onclick=...
2011/06/22
[ "https://Stackoverflow.com/questions/6447898", "https://Stackoverflow.com", "https://Stackoverflow.com/users/811334/" ]
The `this` refers to the the element it is attached to. In the first snippet it is the `<form>`- and in the second the `<a>`-element. Also the `<a>` lacks a `href`-attribute.
I'm not shure but if the code you put is exactly what you are testing you are missing a ; ``` <a onclick='launch(this)' title='launch' class='iblack' /></a></div> <-- You're Version <a onclick='launch(this);' title='launch' class='iblack' /></a></div> ``` Else I never really did an onclick on a html control I usual...
247,127
I'm trying to upload documents to SharePoint using web services attaching custom metadata to the files. I've searched but have not found a good tutorial covering all these topics. Can anybody point me in the right direction? Here's why I think I need to use web services: I'm developing on XP and the Sharepoint object ...
2008/10/29
[ "https://Stackoverflow.com/questions/247127", "https://Stackoverflow.com", "https://Stackoverflow.com/users/17234/" ]
Here is some code <http://geek.hubkey.com/2007/10/upload-file-to-sharepoint-document.html> As for why it is that is the way because Microsoft wrote it that way :). Some people have written custom web services that combine them, <http://www.sharepointblogs.com/ssa/archive/2006/11/30/wsuploadservice-web-service-for-uplo...
Here is some stuff on the Sharepoint Designer - <http://office.microsoft.com/en-us/sharepointdesigner/FX100487631033.aspx> Hope that helps a little. You can link to the Sharepoint 2007 training from here: <http://office.microsoft.com/en-us/training/HA102358581033.aspx> The designer I believe has a WS example in it.
54,597,334
i want to make a program reads integers from the user one by one, multiply them and shows the product of the read integers. The loop for reading the integers stops when the user presses 0. If the user enters a 0 as the first number, then user would not be able to provide any other numbers (Not adding the last 0 in the ...
2019/02/08
[ "https://Stackoverflow.com/questions/54597334", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10909546/" ]
You have a nested for loop, why? You only need the outer `while` loop that gets the user's input until the input is `0`. Also this line: ``` product *= i; ``` multiplies `i`, the `for` loop's counter to `product` and not the user's input! Later, at this line: ``` if (isValid = true) ``` you should repla...
One way to solve this is to utilize the `break;` keyword to escape from a loop, and then you can process the final result after the loop. Something like this: ``` int numbersEntered = 0; while (num != 0) { int curNum = // read input if (curNum == 0) break; numbersEntered++; // do existing processing to c...
73,465,299
I´m starting to study PHP and I have a doubt in one lesson about array\_search. The teachers example shows "A peeple who got a 10" and as only one of the people got a 10 everything works fine, showing the person's name. But I've been trying to use it to fetch more than one result. In this case I created this array, w...
2022/08/23
[ "https://Stackoverflow.com/questions/73465299", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18271081/" ]
I found my mistake after trying a lot: Fastify did not like how the JWT Token Sign-Process was async, it seemed to return twice. It was as simple as changing the JWT Process to not use a callback, but rather just return as a let. Please visit [this](https://stackoverflow.com/a/73473685/19832591) answer. It explains ...
Hey your code was looking a bit messy so i've been so free to clear everything up a bit and hope that might work. Please tell me if the issue still persists ``` const login: FastifyPluginAsync = async (fastify, opts): Promise<void> => { fastify.post("/", async function (request: any, reply) { console.log("Request"...
73,465,299
I´m starting to study PHP and I have a doubt in one lesson about array\_search. The teachers example shows "A peeple who got a 10" and as only one of the people got a 10 everything works fine, showing the person's name. But I've been trying to use it to fetch more than one result. In this case I created this array, w...
2022/08/23
[ "https://Stackoverflow.com/questions/73465299", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18271081/" ]
As you already found, the issue is the mix of async / await + `than` and callbacks. It results in a code hard to read and with many edge cases because you don't know when and which code will be executed first (the callback or the statements after the await). Note that there is the same pattern on the `prisma` query, ...
Hey your code was looking a bit messy so i've been so free to clear everything up a bit and hope that might work. Please tell me if the issue still persists ``` const login: FastifyPluginAsync = async (fastify, opts): Promise<void> => { fastify.post("/", async function (request: any, reply) { console.log("Request"...
73,465,299
I´m starting to study PHP and I have a doubt in one lesson about array\_search. The teachers example shows "A peeple who got a 10" and as only one of the people got a 10 everything works fine, showing the person's name. But I've been trying to use it to fetch more than one result. In this case I created this array, w...
2022/08/23
[ "https://Stackoverflow.com/questions/73465299", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18271081/" ]
As you already found, the issue is the mix of async / await + `than` and callbacks. It results in a code hard to read and with many edge cases because you don't know when and which code will be executed first (the callback or the statements after the await). Note that there is the same pattern on the `prisma` query, ...
I found my mistake after trying a lot: Fastify did not like how the JWT Token Sign-Process was async, it seemed to return twice. It was as simple as changing the JWT Process to not use a callback, but rather just return as a let. Please visit [this](https://stackoverflow.com/a/73473685/19832591) answer. It explains ...
6,778,681
``` MyModel _model = new MyModel() { PriceDate = new DateTime(2000, 1, 1)}; var helper = new System.Web.Mvc.HtmlHelper<MyModel>(new ViewContext(), new ViewPage()); var result = helper.DisplayFor(m => _model.PriceDate); Assert.That(result, Is.EqualTo(expected)); ``` I want to test that the output produced by calling...
2011/07/21
[ "https://Stackoverflow.com/questions/6778681", "https://Stackoverflow.com", "https://Stackoverflow.com/users/231999/" ]
The steps are quite long so I couldn't write here. I wrote about it at my blog :D <http://thoai-nguyen.blogspot.com/2011/07/unit-test-displayformat-attribute.html> Cheers
I use the following code to test and validate html helpers. Validation is a another example. Try the following: ``` var sb = new StringBuilder(); var context = new ViewContext(); context.ViewData = new ViewDataDictionary(_testModel); context.Writer = new StringWriter(sb); var page = new ViewPage...
18,660,572
I have an large array, but with similar structure to: ``` [[ 0 1 2 3 4] [ 5 6 7 8 9] [10 11 12 13 14] [15 16 17 18 19]] ``` What would be the best , most efficient way of taking the rolling average of 5 elements **without** flattening the array. i.e. value one would be (0+1+2+3+4)/5=2 value two would be...
2013/09/06
[ "https://Stackoverflow.com/questions/18660572", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1943587/" ]
Probably the "best" way to do this is to submit a view of the array to `uniform_filter`. Im not sure if this defeats your "cannot flatten the array", but without reshaping the array in some way all of these methods will be vastly slower then the following: ``` import numpy as np import scipy.ndimage.filters as filt a...
Pseudocode (though it does probably look a bit like Python): ``` for i = 0 to 15: sum = 0 for j from 0 to 4: // yourLists[m][n] is the nth element of your mth list (zero-indexed) sum = sum + yourLists [ (i + j) / 5 ] [ (i + j) % 5 ] next j print i, sum/5 next i ``` You can probably do...
18,660,572
I have an large array, but with similar structure to: ``` [[ 0 1 2 3 4] [ 5 6 7 8 9] [10 11 12 13 14] [15 16 17 18 19]] ``` What would be the best , most efficient way of taking the rolling average of 5 elements **without** flattening the array. i.e. value one would be (0+1+2+3+4)/5=2 value two would be...
2013/09/06
[ "https://Stackoverflow.com/questions/18660572", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1943587/" ]
Probably the "best" way to do this is to submit a view of the array to `uniform_filter`. Im not sure if this defeats your "cannot flatten the array", but without reshaping the array in some way all of these methods will be vastly slower then the following: ``` import numpy as np import scipy.ndimage.filters as filt a...
**note:** This answer is *not* `numpy` specific. This would be simpler if the list of list could be flattened. ``` from itertools import tee def moving_average(list_of_list, window_size): nums = (n for l in list_of_list for n in l) it1, it2 = tee(nums) window_sum = 0 for _ in range(window_size): ...
18,660,572
I have an large array, but with similar structure to: ``` [[ 0 1 2 3 4] [ 5 6 7 8 9] [10 11 12 13 14] [15 16 17 18 19]] ``` What would be the best , most efficient way of taking the rolling average of 5 elements **without** flattening the array. i.e. value one would be (0+1+2+3+4)/5=2 value two would be...
2013/09/06
[ "https://Stackoverflow.com/questions/18660572", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1943587/" ]
Probably the "best" way to do this is to submit a view of the array to `uniform_filter`. Im not sure if this defeats your "cannot flatten the array", but without reshaping the array in some way all of these methods will be vastly slower then the following: ``` import numpy as np import scipy.ndimage.filters as filt a...
The "best" solution will depend on the reason *why* you don't want to flatten the array in the first place. If the data are contiguous in memory, using stride tricks is an efficient way to compute a rolling average without explicitly flattening the array: ``` In [1]: a = np.arange(20).reshape((4, 5)) In [2]: a Out[2]...
9,516,164
I'm well versed in ASP.NET WebForms, and was considering switching my code to MVC 3. I am learning MVC, and have some understanding in it, but, there's one issue I haven't come to understand yet. It goes like this: With WebForms code, I was able to have a DropDownList, that when selected, would've triggered a Button...
2012/03/01
[ "https://Stackoverflow.com/questions/9516164", "https://Stackoverflow.com", "https://Stackoverflow.com/users/822011/" ]
The big difference to get your head around here is that there are non of the old style postbacks in ASP.NET MVC. In this case, you get to be in control of how you obtain the new data for your dropdown box. When the form is complete and we're ready to send the data to the server, we'll be sending it back as a spcific ...
Asp.net clasic follows a different mindset than asp.net mvc. The first tries to mimic a desktop forms application and abstracs (hides) the web platform details. Asp.net mvc while is a MVC based framework, it is actually a 'real' web framework because it doesn't try to hide anything web related from you. That being sai...
9,516,164
I'm well versed in ASP.NET WebForms, and was considering switching my code to MVC 3. I am learning MVC, and have some understanding in it, but, there's one issue I haven't come to understand yet. It goes like this: With WebForms code, I was able to have a DropDownList, that when selected, would've triggered a Button...
2012/03/01
[ "https://Stackoverflow.com/questions/9516164", "https://Stackoverflow.com", "https://Stackoverflow.com/users/822011/" ]
The big difference to get your head around here is that there are non of the old style postbacks in ASP.NET MVC. In this case, you get to be in control of how you obtain the new data for your dropdown box. When the form is complete and we're ready to send the data to the server, we'll be sending it back as a spcific ...
I just remembered this question I asked a couple years ago. Another way would be to use $.get(...) with jQuery (which is well-documented nowadays...)
71,427,827
I am trying to do fuzzy match and grouping using Python on multiple fields. I want to do the comparison on each column on a different fuzzy threshold. I tried to search on google but could not find any solution which can do deduplication and then create groups on different columns. **Input:** | Name | Address | | ---...
2022/03/10
[ "https://Stackoverflow.com/questions/71427827", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10014867/" ]
I'd recommend reviewing Levenstein distance as this is a common algorithm to identify similar strings. Library FuzzWuzzy(goofy name I know) implements it with 3 different approaches. See this [article](https://www.datacamp.com/community/tutorials/fuzzy-string-python) for more info Here's a starting place that compares...
Stephan explained the code pretty well. I don't need to explain again. You can try using the fuzz.partial\_ratio as well. It might provide some interesting results. ``` from thefuzz import fuzz print(fuzz.ratio("Turkey is the best country", "Turkey is the best country!")) #98 print(fuzz.partial_ratio("Turkey is the be...
44,508,952
I have a page with dynamically generated content. In this page there is a form for users to submit questions. How can I include in this form, a reference that is unique to each one of these pages? ``` <div class="detalle-form-wrap"> <div> <h1> Contact us if you are interested! </h1> ...
2017/06/12
[ "https://Stackoverflow.com/questions/44508952", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6738021/" ]
If that code you posted is inside an HTML form, you can use a hidden input field that contains a variable with your reference as a value: ``` <h2> REF. VC0171 <input type="hidden" name="reference_1" value="<?php echo $reference; ?>"> </h2> ``` That value will be sent with your form on submission, you can get it...
You can add an additional `input`-field with `type="hidden"` and set it's `value` to the reference: ``` <input type="hidden" name="reference", value="REF. VC0171" /> ``` You can access it just like any other form variable with `$_GET["reference"] or`$\_POST["reference"]`. But keep in mind that the user can change th...
29,833
How do I say “stairs” in French? Is it *escalier* or *escaliers*? <https://www.collinsdictionary.com/dictionary/english-french/stair>
2018/04/17
[ "https://french.stackexchange.com/questions/29833", "https://french.stackexchange.com", "https://french.stackexchange.com/users/16701/" ]
That depends on the number of *escaliers* this is about... In standard French, an escalier is a single suite of steps, just like a ladder is a suite of rungs. However, there used te be regional usages in France and Belgium1 where even a single escalier might be used at the plural, so you'll find, *il est tombé dans l...
Moi j'aurais dis une "marche d'escalier" pour stair
29,833
How do I say “stairs” in French? Is it *escalier* or *escaliers*? <https://www.collinsdictionary.com/dictionary/english-french/stair>
2018/04/17
[ "https://french.stackexchange.com/questions/29833", "https://french.stackexchange.com", "https://french.stackexchange.com/users/16701/" ]
Basically the distinction is that *un escalier* is a **single flight of steps**. *Les escaliers*, however, usually refers to several flights of stairs (or in practice, what an English speakers might refer to as a *stairwell*, in French *la cage d'escalier*).
That depends on the number of *escaliers* this is about... In standard French, an escalier is a single suite of steps, just like a ladder is a suite of rungs. However, there used te be regional usages in France and Belgium1 where even a single escalier might be used at the plural, so you'll find, *il est tombé dans l...
29,833
How do I say “stairs” in French? Is it *escalier* or *escaliers*? <https://www.collinsdictionary.com/dictionary/english-french/stair>
2018/04/17
[ "https://french.stackexchange.com/questions/29833", "https://french.stackexchange.com", "https://french.stackexchange.com/users/16701/" ]
One stair as in a single step is *une marche (d'escalier)*. (Or *un degré*, but this word is very uncommon in this sense in modern French.) One stair as in one flight of steps (a series of step from a landing to the next one) is *un escalier*. The singular *escalier* can also refer to a series of flights spanning mul...
That depends on the number of *escaliers* this is about... In standard French, an escalier is a single suite of steps, just like a ladder is a suite of rungs. However, there used te be regional usages in France and Belgium1 where even a single escalier might be used at the plural, so you'll find, *il est tombé dans l...
29,833
How do I say “stairs” in French? Is it *escalier* or *escaliers*? <https://www.collinsdictionary.com/dictionary/english-french/stair>
2018/04/17
[ "https://french.stackexchange.com/questions/29833", "https://french.stackexchange.com", "https://french.stackexchange.com/users/16701/" ]
Basically the distinction is that *un escalier* is a **single flight of steps**. *Les escaliers*, however, usually refers to several flights of stairs (or in practice, what an English speakers might refer to as a *stairwell*, in French *la cage d'escalier*).
Moi j'aurais dis une "marche d'escalier" pour stair
29,833
How do I say “stairs” in French? Is it *escalier* or *escaliers*? <https://www.collinsdictionary.com/dictionary/english-french/stair>
2018/04/17
[ "https://french.stackexchange.com/questions/29833", "https://french.stackexchange.com", "https://french.stackexchange.com/users/16701/" ]
One stair as in a single step is *une marche (d'escalier)*. (Or *un degré*, but this word is very uncommon in this sense in modern French.) One stair as in one flight of steps (a series of step from a landing to the next one) is *un escalier*. The singular *escalier* can also refer to a series of flights spanning mul...
Moi j'aurais dis une "marche d'escalier" pour stair
29,833
How do I say “stairs” in French? Is it *escalier* or *escaliers*? <https://www.collinsdictionary.com/dictionary/english-french/stair>
2018/04/17
[ "https://french.stackexchange.com/questions/29833", "https://french.stackexchange.com", "https://french.stackexchange.com/users/16701/" ]
One stair as in a single step is *une marche (d'escalier)*. (Or *un degré*, but this word is very uncommon in this sense in modern French.) One stair as in one flight of steps (a series of step from a landing to the next one) is *un escalier*. The singular *escalier* can also refer to a series of flights spanning mul...
Basically the distinction is that *un escalier* is a **single flight of steps**. *Les escaliers*, however, usually refers to several flights of stairs (or in practice, what an English speakers might refer to as a *stairwell*, in French *la cage d'escalier*).
52,528,695
I have 3 divs that fades sequentially on page load just like on this link: <http://jsfiddle.net/x4qjscgv/6/> However, I want the fade function to happen once the user clicked a button. I tried to use the function: document.getElementById but it does not appear to be working. See full code below: ``` <html> <head> <...
2018/09/27
[ "https://Stackoverflow.com/questions/52528695", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10227293/" ]
This indeed seems to be an issue when Eclipse is run with Java 11. I have created [Bug 539545](https://bugs.eclipse.org/bugs/show_bug.cgi?id=539545) to report this. In the meantime, you can work around this issue by disabling news feed polling. To do so, go to *Preferences... -> General -> News*, and untick the *Enabl...
This is caused by the <http://openjdk.java.net/jeps/320> - which is removal of Java EE and CORBA Modules from the standard Java 11 version. As mentioned by @Pyves, the simple way would be unchecking "Enable automatic news polling" from the Preferences-> General -> News But if you still need this, you can install "jav...
52,528,695
I have 3 divs that fades sequentially on page load just like on this link: <http://jsfiddle.net/x4qjscgv/6/> However, I want the fade function to happen once the user clicked a button. I tried to use the function: document.getElementById but it does not appear to be working. See full code below: ``` <html> <head> <...
2018/09/27
[ "https://Stackoverflow.com/questions/52528695", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10227293/" ]
This indeed seems to be an issue when Eclipse is run with Java 11. I have created [Bug 539545](https://bugs.eclipse.org/bugs/show_bug.cgi?id=539545) to report this. In the meantime, you can work around this issue by disabling news feed polling. To do so, go to *Preferences... -> General -> News*, and untick the *Enabl...
Turning off the news feed does solve this problem (Per @Pyves, unchecking "Enable automatic news polling" from Preferences-> General -> News), **but** be aware that you may get other issues because of the too-new JDK. Noga Rotman just spent several hours working out for me that Eclipse not being able to find JUnit, eve...
52,528,695
I have 3 divs that fades sequentially on page load just like on this link: <http://jsfiddle.net/x4qjscgv/6/> However, I want the fade function to happen once the user clicked a button. I tried to use the function: document.getElementById but it does not appear to be working. See full code below: ``` <html> <head> <...
2018/09/27
[ "https://Stackoverflow.com/questions/52528695", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10227293/" ]
This indeed seems to be an issue when Eclipse is run with Java 11. I have created [Bug 539545](https://bugs.eclipse.org/bugs/show_bug.cgi?id=539545) to report this. In the meantime, you can work around this issue by disabling news feed polling. To do so, go to *Preferences... -> General -> News*, and untick the *Enabl...
For windows version Eclipse, 1. Enter search key string "news" 2. Check off "Enable automatic news polling" 3. Click [Apply and Close] button. That's it. [![enter image description here](https://i.stack.imgur.com/3IgiV.png)](https://i.stack.imgur.com/3IgiV.png)
52,528,695
I have 3 divs that fades sequentially on page load just like on this link: <http://jsfiddle.net/x4qjscgv/6/> However, I want the fade function to happen once the user clicked a button. I tried to use the function: document.getElementById but it does not appear to be working. See full code below: ``` <html> <head> <...
2018/09/27
[ "https://Stackoverflow.com/questions/52528695", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10227293/" ]
This is caused by the <http://openjdk.java.net/jeps/320> - which is removal of Java EE and CORBA Modules from the standard Java 11 version. As mentioned by @Pyves, the simple way would be unchecking "Enable automatic news polling" from the Preferences-> General -> News But if you still need this, you can install "jav...
Turning off the news feed does solve this problem (Per @Pyves, unchecking "Enable automatic news polling" from Preferences-> General -> News), **but** be aware that you may get other issues because of the too-new JDK. Noga Rotman just spent several hours working out for me that Eclipse not being able to find JUnit, eve...
52,528,695
I have 3 divs that fades sequentially on page load just like on this link: <http://jsfiddle.net/x4qjscgv/6/> However, I want the fade function to happen once the user clicked a button. I tried to use the function: document.getElementById but it does not appear to be working. See full code below: ``` <html> <head> <...
2018/09/27
[ "https://Stackoverflow.com/questions/52528695", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10227293/" ]
This is caused by the <http://openjdk.java.net/jeps/320> - which is removal of Java EE and CORBA Modules from the standard Java 11 version. As mentioned by @Pyves, the simple way would be unchecking "Enable automatic news polling" from the Preferences-> General -> News But if you still need this, you can install "jav...
For windows version Eclipse, 1. Enter search key string "news" 2. Check off "Enable automatic news polling" 3. Click [Apply and Close] button. That's it. [![enter image description here](https://i.stack.imgur.com/3IgiV.png)](https://i.stack.imgur.com/3IgiV.png)
52,528,695
I have 3 divs that fades sequentially on page load just like on this link: <http://jsfiddle.net/x4qjscgv/6/> However, I want the fade function to happen once the user clicked a button. I tried to use the function: document.getElementById but it does not appear to be working. See full code below: ``` <html> <head> <...
2018/09/27
[ "https://Stackoverflow.com/questions/52528695", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10227293/" ]
Turning off the news feed does solve this problem (Per @Pyves, unchecking "Enable automatic news polling" from Preferences-> General -> News), **but** be aware that you may get other issues because of the too-new JDK. Noga Rotman just spent several hours working out for me that Eclipse not being able to find JUnit, eve...
For windows version Eclipse, 1. Enter search key string "news" 2. Check off "Enable automatic news polling" 3. Click [Apply and Close] button. That's it. [![enter image description here](https://i.stack.imgur.com/3IgiV.png)](https://i.stack.imgur.com/3IgiV.png)
434,103
I have a 2 layer PCB that carries a microcontroller (Particle Electron), connects to a sensor with an ADC reading, has an ADC comparator IC, a watchdog timer IC, a PNP switch, an power bus and I2C lines. To protect the Analog reading line from EMI, should I be removing the ground pour around certain areas/ICs? For ex...
2019/04/23
[ "https://electronics.stackexchange.com/questions/434103", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/195488/" ]
You don't remove copper pour to reduce noise. An unconnected copper pour will have more noise than no copper pour, but having a grounded copper pour tends to reduce noise or at least keep it the same compared to no copper pour. You remove copper pour to get rid of parasitic capacitance for sensitive circuits like osci...
> > Does removing ground pour in this situation help, or hurt? > > > It probably doesn't make a difference. You could think of an unconnected copper pour as a capacitor with one end ungrounded/unconnected as a 1"sq area would have ~10-30pF of capacitance. The area could function like an antenna or resonator, but o...
874,625
I have a module which starts a wxPython app, which loads a `wx.Bitmap` from file for use as a toolbar button. It looks like this: `wx.Bitmap("images\\new.png", wx.BITMAP_TYPE_ANY)`. All works well when I run that module by itself, but when I try to import and run it from a different module which is in a different direc...
2009/05/17
[ "https://Stackoverflow.com/questions/874625", "https://Stackoverflow.com", "https://Stackoverflow.com/users/76701/" ]
"images\new.png" is a relative path, so when bitmap gets loaded it will depened what is the cur dir so either you set cur dir ``` os.chdir("location to images folder") ``` or have a function which loads relative to your program e.g. ``` def getProgramFolder(): moduleFile = __file__ moduleDir = os.path.spli...
The [wxPython FAQ](http://wiki.wxpython.org/Frequently%20Asked%20Questions#head-f3905e355271308d301310f0f8c1af64833ed912) recommends using a tool called `img2py.py` to embed icon files into a Python module. This tool comes with the wxPython distribution. Here is an [example of embedding toolbar icons](http://wiki.wxpy...
2,066,269
**Question**: > > Find the continued fraction for $\sqrt{n^2 − 1}$, where $n \ge 2$ is > an integer. > > > **My attempt**: $n - 1 = \sqrt{n^2} - 1 \lt \sqrt{n^2 − 1} \lt \sqrt{n^2}$ So far, $[n-1; ]$ $\sqrt{n^2 − 1} = n - 1 + \frac{1}{x}$ $\to \frac{1}{x} = \sqrt{n^2 - 1} - (n-1) \to \frac{1}{x^2} = n^2-1-n...
2016/12/20
[ "https://math.stackexchange.com/questions/2066269", "https://math.stackexchange.com", "https://math.stackexchange.com/users/49780/" ]
Writting $\sin x+\cos x = \sqrt{2}\sin \left(\frac{\pi}{4}+x\right)$, the integral can be written as $$\frac{1}{\sqrt 2}\int\_{0}^{\pi/4}\frac{\sin x}{\sin(\pi/4+x)}\,\mathrm{d}x=\frac{1}{\sqrt 2}\int\_{\pi/2}^{\pi/4}\frac{\sin(\pi/4-u)}{\sin u}\,\mathrm{d}u=\frac{1}{2}\int\_{\pi/2}^{\pi/4}\frac{1}{\tan u}\,\mathrm{d}u...
**Hint:** $$\frac{\sin x}{\sin x + \cos x}=\frac{1}{2}(\tan 2x - \sec 2x+1)$$ Proof: $$\frac{\sin x}{\sin x + \cos x}=\frac{\sin x(\cos x-\sin x)}{\cos 2x}=\frac{1}{2}\frac{\sin 2x+\cos 2x -1}{\cos 2x}=\frac{1}{2}(\tan 2x - \sec 2x+1)$$ Now integrate $\tan 2x$, $\sec 2x$ and $1$.
2,066,269
**Question**: > > Find the continued fraction for $\sqrt{n^2 − 1}$, where $n \ge 2$ is > an integer. > > > **My attempt**: $n - 1 = \sqrt{n^2} - 1 \lt \sqrt{n^2 − 1} \lt \sqrt{n^2}$ So far, $[n-1; ]$ $\sqrt{n^2 − 1} = n - 1 + \frac{1}{x}$ $\to \frac{1}{x} = \sqrt{n^2 - 1} - (n-1) \to \frac{1}{x^2} = n^2-1-n...
2016/12/20
[ "https://math.stackexchange.com/questions/2066269", "https://math.stackexchange.com", "https://math.stackexchange.com/users/49780/" ]
Define $I$ = $\int\_{0}^{\pi/4} \frac{\sin x}{\sin x + \cos x} \, dx$ and $J$ = $\int\_{0}^{\pi/4} \frac{\cos x}{\sin x + \cos x} \, dx$ Now, what about $J$ + $I$ and $J$ - $I$ ? Can you get it from here?
**Hint:** $$\frac{\sin x}{\sin x + \cos x}=\frac{1}{2}(\tan 2x - \sec 2x+1)$$ Proof: $$\frac{\sin x}{\sin x + \cos x}=\frac{\sin x(\cos x-\sin x)}{\cos 2x}=\frac{1}{2}\frac{\sin 2x+\cos 2x -1}{\cos 2x}=\frac{1}{2}(\tan 2x - \sec 2x+1)$$ Now integrate $\tan 2x$, $\sec 2x$ and $1$.
22,893
I tried removing noise from the image shown below using Median Blur in OpenCV. But i'm not able to remove the colour noise completely as it is done in Neat Image. Any suggestions.? 1. Original Input Image ![Original Input image](https://i.stack.imgur.com/Plj2y.png) Median Blur Output ![Output after applying ...
2015/04/21
[ "https://dsp.stackexchange.com/questions/22893", "https://dsp.stackexchange.com", "https://dsp.stackexchange.com/users/13454/" ]
NeatImage probably uses Wavelets based Noise Reduction. You can look for methods based on that. Today you need methods which are "Edge Aware", namely they smooth yet keep edges in tact. Have a look at [Fast Anisotropic Curvature Preserving Smoothing](https://github.com/RoyiAvital/Fast-Anisotropic-Curvature-Preserv...
Well of course the canned filters are rudimentary, and there is a vast literature of more more advanced solutions out there. The only problem is that most of them exist only on paper; you have to implement them yourself. And since you're prepared to do that, then I suggest studying the literature to see what the latest...
22,893
I tried removing noise from the image shown below using Median Blur in OpenCV. But i'm not able to remove the colour noise completely as it is done in Neat Image. Any suggestions.? 1. Original Input Image ![Original Input image](https://i.stack.imgur.com/Plj2y.png) Median Blur Output ![Output after applying ...
2015/04/21
[ "https://dsp.stackexchange.com/questions/22893", "https://dsp.stackexchange.com", "https://dsp.stackexchange.com/users/13454/" ]
I've had pretty good luck with using `OpenCV`'s built-in [`fastNlMeansDenoisingColored`](http://docs.opencv.org/modules/photo/doc/denoising.html).
Well of course the canned filters are rudimentary, and there is a vast literature of more more advanced solutions out there. The only problem is that most of them exist only on paper; you have to implement them yourself. And since you're prepared to do that, then I suggest studying the literature to see what the latest...
22,893
I tried removing noise from the image shown below using Median Blur in OpenCV. But i'm not able to remove the colour noise completely as it is done in Neat Image. Any suggestions.? 1. Original Input Image ![Original Input image](https://i.stack.imgur.com/Plj2y.png) Median Blur Output ![Output after applying ...
2015/04/21
[ "https://dsp.stackexchange.com/questions/22893", "https://dsp.stackexchange.com", "https://dsp.stackexchange.com/users/13454/" ]
Since you're interested in implementing algorithms yourself, I would suggest it as a very flexible algorithm which can be adapted to a very wide variety of situations - [Adaptive Manifolds for Real Time High Dimensional Filtering](http://inf.ufrgs.br/%7Eeslgastal/AdaptiveManifolds/). The adaptability and flexibility o...
Well of course the canned filters are rudimentary, and there is a vast literature of more more advanced solutions out there. The only problem is that most of them exist only on paper; you have to implement them yourself. And since you're prepared to do that, then I suggest studying the literature to see what the latest...
22,893
I tried removing noise from the image shown below using Median Blur in OpenCV. But i'm not able to remove the colour noise completely as it is done in Neat Image. Any suggestions.? 1. Original Input Image ![Original Input image](https://i.stack.imgur.com/Plj2y.png) Median Blur Output ![Output after applying ...
2015/04/21
[ "https://dsp.stackexchange.com/questions/22893", "https://dsp.stackexchange.com", "https://dsp.stackexchange.com/users/13454/" ]
NeatImage probably uses Wavelets based Noise Reduction. You can look for methods based on that. Today you need methods which are "Edge Aware", namely they smooth yet keep edges in tact. Have a look at [Fast Anisotropic Curvature Preserving Smoothing](https://github.com/RoyiAvital/Fast-Anisotropic-Curvature-Preserv...
Have you tried bilateral filtering? [It is also in OpenCV](http://opencvexamples.blogspot.com/2013/10/applying-bilateral-filter.html).
22,893
I tried removing noise from the image shown below using Median Blur in OpenCV. But i'm not able to remove the colour noise completely as it is done in Neat Image. Any suggestions.? 1. Original Input Image ![Original Input image](https://i.stack.imgur.com/Plj2y.png) Median Blur Output ![Output after applying ...
2015/04/21
[ "https://dsp.stackexchange.com/questions/22893", "https://dsp.stackexchange.com", "https://dsp.stackexchange.com/users/13454/" ]
NeatImage probably uses Wavelets based Noise Reduction. You can look for methods based on that. Today you need methods which are "Edge Aware", namely they smooth yet keep edges in tact. Have a look at [Fast Anisotropic Curvature Preserving Smoothing](https://github.com/RoyiAvital/Fast-Anisotropic-Curvature-Preserv...
I've had pretty good luck with using `OpenCV`'s built-in [`fastNlMeansDenoisingColored`](http://docs.opencv.org/modules/photo/doc/denoising.html).
22,893
I tried removing noise from the image shown below using Median Blur in OpenCV. But i'm not able to remove the colour noise completely as it is done in Neat Image. Any suggestions.? 1. Original Input Image ![Original Input image](https://i.stack.imgur.com/Plj2y.png) Median Blur Output ![Output after applying ...
2015/04/21
[ "https://dsp.stackexchange.com/questions/22893", "https://dsp.stackexchange.com", "https://dsp.stackexchange.com/users/13454/" ]
NeatImage probably uses Wavelets based Noise Reduction. You can look for methods based on that. Today you need methods which are "Edge Aware", namely they smooth yet keep edges in tact. Have a look at [Fast Anisotropic Curvature Preserving Smoothing](https://github.com/RoyiAvital/Fast-Anisotropic-Curvature-Preserv...
Since you're interested in implementing algorithms yourself, I would suggest it as a very flexible algorithm which can be adapted to a very wide variety of situations - [Adaptive Manifolds for Real Time High Dimensional Filtering](http://inf.ufrgs.br/%7Eeslgastal/AdaptiveManifolds/). The adaptability and flexibility o...
22,893
I tried removing noise from the image shown below using Median Blur in OpenCV. But i'm not able to remove the colour noise completely as it is done in Neat Image. Any suggestions.? 1. Original Input Image ![Original Input image](https://i.stack.imgur.com/Plj2y.png) Median Blur Output ![Output after applying ...
2015/04/21
[ "https://dsp.stackexchange.com/questions/22893", "https://dsp.stackexchange.com", "https://dsp.stackexchange.com/users/13454/" ]
I've had pretty good luck with using `OpenCV`'s built-in [`fastNlMeansDenoisingColored`](http://docs.opencv.org/modules/photo/doc/denoising.html).
Have you tried bilateral filtering? [It is also in OpenCV](http://opencvexamples.blogspot.com/2013/10/applying-bilateral-filter.html).
22,893
I tried removing noise from the image shown below using Median Blur in OpenCV. But i'm not able to remove the colour noise completely as it is done in Neat Image. Any suggestions.? 1. Original Input Image ![Original Input image](https://i.stack.imgur.com/Plj2y.png) Median Blur Output ![Output after applying ...
2015/04/21
[ "https://dsp.stackexchange.com/questions/22893", "https://dsp.stackexchange.com", "https://dsp.stackexchange.com/users/13454/" ]
Since you're interested in implementing algorithms yourself, I would suggest it as a very flexible algorithm which can be adapted to a very wide variety of situations - [Adaptive Manifolds for Real Time High Dimensional Filtering](http://inf.ufrgs.br/%7Eeslgastal/AdaptiveManifolds/). The adaptability and flexibility o...
Have you tried bilateral filtering? [It is also in OpenCV](http://opencvexamples.blogspot.com/2013/10/applying-bilateral-filter.html).
22,893
I tried removing noise from the image shown below using Median Blur in OpenCV. But i'm not able to remove the colour noise completely as it is done in Neat Image. Any suggestions.? 1. Original Input Image ![Original Input image](https://i.stack.imgur.com/Plj2y.png) Median Blur Output ![Output after applying ...
2015/04/21
[ "https://dsp.stackexchange.com/questions/22893", "https://dsp.stackexchange.com", "https://dsp.stackexchange.com/users/13454/" ]
I've had pretty good luck with using `OpenCV`'s built-in [`fastNlMeansDenoisingColored`](http://docs.opencv.org/modules/photo/doc/denoising.html).
Since you're interested in implementing algorithms yourself, I would suggest it as a very flexible algorithm which can be adapted to a very wide variety of situations - [Adaptive Manifolds for Real Time High Dimensional Filtering](http://inf.ufrgs.br/%7Eeslgastal/AdaptiveManifolds/). The adaptability and flexibility o...
47,924,606
I am dockerizing my application. I have two containers now. One of it wants to talk to another, in it's config I have `"mongo": "127.0.0.1"` I suppose they should talk through the bridge network: ``` $ docker network inspect bridge [ { "Name": "bridge", "Id": "f7ab26d71dbd6f557852c7156ae0574bbf62c42...
2017/12/21
[ "https://Stackoverflow.com/questions/47924606", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3014866/" ]
You can check a `container` IP. ``` $ docker inspect $(container_name) -f "{{json .NetworkSettings.Networks}}" ``` You can find `IPAddress` attribute from the output of `json`.
Best way to use is using with --link option to avoid to many changes. > > for ex: --link mongo01:mongo it will instruct Docker to use the container named mongo01 as a linked container, and name it mongo inside your application container > > > So in your application you can use mongo:27017. without making any chan...
47,924,606
I am dockerizing my application. I have two containers now. One of it wants to talk to another, in it's config I have `"mongo": "127.0.0.1"` I suppose they should talk through the bridge network: ``` $ docker network inspect bridge [ { "Name": "bridge", "Id": "f7ab26d71dbd6f557852c7156ae0574bbf62c42...
2017/12/21
[ "https://Stackoverflow.com/questions/47924606", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3014866/" ]
Yes, you should use a bridge network. The default "bridge" can be used but won't give you DNS resolution, check <https://docs.docker.com/engine/userguide/networking/#user-defined-networks> for details.
Best way to use is using with --link option to avoid to many changes. > > for ex: --link mongo01:mongo it will instruct Docker to use the container named mongo01 as a linked container, and name it mongo inside your application container > > > So in your application you can use mongo:27017. without making any chan...
47,924,606
I am dockerizing my application. I have two containers now. One of it wants to talk to another, in it's config I have `"mongo": "127.0.0.1"` I suppose they should talk through the bridge network: ``` $ docker network inspect bridge [ { "Name": "bridge", "Id": "f7ab26d71dbd6f557852c7156ae0574bbf62c42...
2017/12/21
[ "https://Stackoverflow.com/questions/47924606", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3014866/" ]
You can check a `container` IP. ``` $ docker inspect $(container_name) -f "{{json .NetworkSettings.Networks}}" ``` You can find `IPAddress` attribute from the output of `json`.
Yes, you should use a bridge network. The default "bridge" can be used but won't give you DNS resolution, check <https://docs.docker.com/engine/userguide/networking/#user-defined-networks> for details.
8,355,982
I am trying to track few rows being deleted from one of the Sql Server table? I am planning to write a trigger to track from which machine or process the delete request was sent. Is it possible to know in a Trigger in Sql Server 2005 to track the machineName and processId from which Sql is invoked?
2011/12/02
[ "https://Stackoverflow.com/questions/8355982", "https://Stackoverflow.com", "https://Stackoverflow.com/users/874520/" ]
You can add other columns from sysprocesses as you see fit, and you need to create the ProcessLog table first. ``` CREATE TRIGGER [dbo].[LogDelete] ON [dbo].[SampleTable] AFTER DELETE AS BEGIN SET NOCOUNT ON; INSERT INTO dbo.ProcessLog SELECT program_name , net_address , host...
you can do it with SQL Server Profiler [http://i.stack.imgur.com/p7Asn.png](https://i.stack.imgur.com/p7Asn.png) ![enter image description here](https://i.stack.imgur.com/p7Asn.png) try this also : ``` SELECT sqltext.TEXT, req.session_id, req.status, req.command, req.cpu_time, req.total_elapsed_time FROM sys.dm_exe...
17,690,103
I want to re-skin ActiveAdmin using a Bootstrap template theme. However I need to change the layout of the page to suit. Is it possible to override the layout of ActiveAdmin to suit what I want? It looks different to normal rails conventions - I'd rather just accomplish it using a regular template and then yield the p...
2013/07/17
[ "https://Stackoverflow.com/questions/17690103", "https://Stackoverflow.com", "https://Stackoverflow.com/users/778675/" ]
Ive done something similar before. Check out this Gist <https://gist.github.com/bigfive/6017435> Essentially you patch the active admin base controller to use your new layout by overriding their `:determine_active_admin_layout` method ``` # config/initializers/active_admin_patch.rb module ActiveAdmin class BaseCont...
Depending on what version of AA you are using. (0.6.0 < commit:ec9996406df5c07f4720eabc0120f710ae46c997): Include your scss, but encapsulate your css selectors in the `body.active_admin` group. Furthermore, specificity is important, so if you want to override the default styling of AA, you may need to ensure you are ...
17,690,103
I want to re-skin ActiveAdmin using a Bootstrap template theme. However I need to change the layout of the page to suit. Is it possible to override the layout of ActiveAdmin to suit what I want? It looks different to normal rails conventions - I'd rather just accomplish it using a regular template and then yield the p...
2013/07/17
[ "https://Stackoverflow.com/questions/17690103", "https://Stackoverflow.com", "https://Stackoverflow.com/users/778675/" ]
A simple answer would be putting @import "bootstrap"; into active\_admin.css.scss Officially, its not supported for now <https://github.com/gregbell/active_admin/issues/1027>
Depending on what version of AA you are using. (0.6.0 < commit:ec9996406df5c07f4720eabc0120f710ae46c997): Include your scss, but encapsulate your css selectors in the `body.active_admin` group. Furthermore, specificity is important, so if you want to override the default styling of AA, you may need to ensure you are ...
17,690,103
I want to re-skin ActiveAdmin using a Bootstrap template theme. However I need to change the layout of the page to suit. Is it possible to override the layout of ActiveAdmin to suit what I want? It looks different to normal rails conventions - I'd rather just accomplish it using a regular template and then yield the p...
2013/07/17
[ "https://Stackoverflow.com/questions/17690103", "https://Stackoverflow.com", "https://Stackoverflow.com/users/778675/" ]
Ive done something similar before. Check out this Gist <https://gist.github.com/bigfive/6017435> Essentially you patch the active admin base controller to use your new layout by overriding their `:determine_active_admin_layout` method ``` # config/initializers/active_admin_patch.rb module ActiveAdmin class BaseCont...
A simple answer would be putting @import "bootstrap"; into active\_admin.css.scss Officially, its not supported for now <https://github.com/gregbell/active_admin/issues/1027>
17,690,103
I want to re-skin ActiveAdmin using a Bootstrap template theme. However I need to change the layout of the page to suit. Is it possible to override the layout of ActiveAdmin to suit what I want? It looks different to normal rails conventions - I'd rather just accomplish it using a regular template and then yield the p...
2013/07/17
[ "https://Stackoverflow.com/questions/17690103", "https://Stackoverflow.com", "https://Stackoverflow.com/users/778675/" ]
Ive done something similar before. Check out this Gist <https://gist.github.com/bigfive/6017435> Essentially you patch the active admin base controller to use your new layout by overriding their `:determine_active_admin_layout` method ``` # config/initializers/active_admin_patch.rb module ActiveAdmin class BaseCont...
BigFive's accepted answer worked for me at the beginning but then produced some bugs when rendering custom partials or when rendering errors in forms. Inspired by his approach I switched to overriding the individual methods that AA uses to dynamically generate the layout (as AA doesn't use a static layout file that c...
17,690,103
I want to re-skin ActiveAdmin using a Bootstrap template theme. However I need to change the layout of the page to suit. Is it possible to override the layout of ActiveAdmin to suit what I want? It looks different to normal rails conventions - I'd rather just accomplish it using a regular template and then yield the p...
2013/07/17
[ "https://Stackoverflow.com/questions/17690103", "https://Stackoverflow.com", "https://Stackoverflow.com/users/778675/" ]
A simple answer would be putting @import "bootstrap"; into active\_admin.css.scss Officially, its not supported for now <https://github.com/gregbell/active_admin/issues/1027>
BigFive's accepted answer worked for me at the beginning but then produced some bugs when rendering custom partials or when rendering errors in forms. Inspired by his approach I switched to overriding the individual methods that AA uses to dynamically generate the layout (as AA doesn't use a static layout file that c...
27,505,561
I have the following code: ``` <?php $myfile = fopen("code2.css", "w") or die("Unable to open file!"); $txt = "John Doe\n"; fwrite($myfile, $txt); $txt = "Jane Doe\n"; fwrite($myfile, $txt); fclose($myfile); ?> ?> ``` code2.css is in the same folder as my PHP f...
2014/12/16
[ "https://Stackoverflow.com/questions/27505561", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4325791/" ]
Check the properties of code2.css. You must found the "read only" permission to it, and change it to "Read and Write". After that your code will work. If you are using a Linux system, then execute: ``` sudo chmod 777 code2.css ```
``` <?php $myfile = fopen("code2.css", "w") or die("Unable to open file!"); $txt = "John Doe\n"; fwrite($myfile, $txt); $txt = "Jane Doe\n"; fwrite($myfile, $txt); fclose($myfile);//just removed the closing php tag from here and it is working fine ?> ```
27,505,561
I have the following code: ``` <?php $myfile = fopen("code2.css", "w") or die("Unable to open file!"); $txt = "John Doe\n"; fwrite($myfile, $txt); $txt = "Jane Doe\n"; fwrite($myfile, $txt); fclose($myfile); ?> ?> ``` code2.css is in the same folder as my PHP f...
2014/12/16
[ "https://Stackoverflow.com/questions/27505561", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4325791/" ]
Check the properties of code2.css. You must found the "read only" permission to it, and change it to "Read and Write". After that your code will work. If you are using a Linux system, then execute: ``` sudo chmod 777 code2.css ```
fopen() returns false **and generates an E\_WARNING alert** on fail. You should begin with displaying all warnings, you'll get more information on the issue: ``` error_reporting(E_ALL); ini_set('display_errors', '1'); ``` Please post the warning. Probably rights on your file or folder. Please make sure your webse...
408,709
I changed a resistor with same color stripes Yellow, Purple, Gold, Gold on a Pioneer surround system but the only difference was that the I put was a bit bigger. The problem is the system went into protected mode because of an error, I forced reset it and the fuse blew up. Was it because of the resistor I changed? UPD...
2018/11/25
[ "https://electronics.stackexchange.com/questions/408709", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/205386/" ]
> > Is a bigger resistor different from a smaller resistor with same color stripes? > > > In general, a resistor can be characterized by three values: * The resistance * The maximum allowed power * The behavior (change of resistance) when the resistor gets heated The color stripes tell you about the resistance (...
> > The problem is the system went into protected mode because of an > error, I forced reset it and the fuse blew up. Was it because of the > resistor I changed? > > > Well, you could have inadvertently changed the resistor for an inductor: - [![enter image description here](https://i.stack.imgur.com/6keUQ.gif)...
408,709
I changed a resistor with same color stripes Yellow, Purple, Gold, Gold on a Pioneer surround system but the only difference was that the I put was a bit bigger. The problem is the system went into protected mode because of an error, I forced reset it and the fuse blew up. Was it because of the resistor I changed? UPD...
2018/11/25
[ "https://electronics.stackexchange.com/questions/408709", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/205386/" ]
> > Is a bigger resistor different from a smaller resistor with same color stripes? > > > In general, a resistor can be characterized by three values: * The resistance * The maximum allowed power * The behavior (change of resistance) when the resistor gets heated The color stripes tell you about the resistance (...
Typically the larger the resistor, the more power it can handle. For example: [![Image of different resistor sizes and power ratings](https://i.stack.imgur.com/Bzd2g.png)](https://i.stack.imgur.com/Bzd2g.png) ([Image source](https://www.mikroe.com/ebooks/components-of-electronic-devices/resistor-dissipation)) That, ...
408,709
I changed a resistor with same color stripes Yellow, Purple, Gold, Gold on a Pioneer surround system but the only difference was that the I put was a bit bigger. The problem is the system went into protected mode because of an error, I forced reset it and the fuse blew up. Was it because of the resistor I changed? UPD...
2018/11/25
[ "https://electronics.stackexchange.com/questions/408709", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/205386/" ]
> > The problem is the system went into protected mode because of an > error, I forced reset it and the fuse blew up. Was it because of the > resistor I changed? > > > Well, you could have inadvertently changed the resistor for an inductor: - [![enter image description here](https://i.stack.imgur.com/6keUQ.gif)...
Typically the larger the resistor, the more power it can handle. For example: [![Image of different resistor sizes and power ratings](https://i.stack.imgur.com/Bzd2g.png)](https://i.stack.imgur.com/Bzd2g.png) ([Image source](https://www.mikroe.com/ebooks/components-of-electronic-devices/resistor-dissipation)) That, ...
41,842,310
I was wondering if there is any benefit to training on high resolution images rather than low resolution. I understand that it will take longer to train on larger images and that the dimensions must be a multiple of 32. My current image set is 1440x1920. Would I be better off resizing to 480x640, or is bigger better?
2017/01/25
[ "https://Stackoverflow.com/questions/41842310", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5350348/" ]
It's certainly not a requirement that your images be powers of two. There may be some cases where it speeds things up (e.g. GPU allocation) but it's not critical. Smaller images will train significantly faster, and possibly even converge quicker (all other factors held constant) as you will be able to train on bigger ...
This depends largely on the application. As a rule of thumb, I'd ask myself the question: can I complete the task myself on the resized images? If so, I'd downsize to the lowest resolution before it makes the task more difficult for you yourself. If not... you're going to have to be -very- patient using images 1440 \* ...
39,870,368
Following is my js ``` $(document).ready(function() { $.ajax({ url: url + 'project/get_project_list', method:'post', dataType:'xml', success:function(data){ $('#datatable').dataTable({ ...
2016/10/05
[ "https://Stackoverflow.com/questions/39870368", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4332335/" ]
This is how I am using multiple layouts in my ASP.NET core MVC application. You can try like this- In `_ViewStart.cshtml` specify default \_Layout like this- ``` @{ Layout = "_Layout"; } ``` If you want to set page specific layout then in that `page.cshtml`, you can assign other view like this- ``` @{ Lay...
If you want to have a different layout based on some condition, you could use this code in the `_ViewStart.cshtml` file: ``` @{ if (some condition) { Layout = "_Layout1"; } else if (some other condition) { Layout = "_Layout2"; } etc. } ``` I use this in one of my projects....
39,870,368
Following is my js ``` $(document).ready(function() { $.ajax({ url: url + 'project/get_project_list', method:'post', dataType:'xml', success:function(data){ $('#datatable').dataTable({ ...
2016/10/05
[ "https://Stackoverflow.com/questions/39870368", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4332335/" ]
This is how I am using multiple layouts in my ASP.NET core MVC application. You can try like this- In `_ViewStart.cshtml` specify default \_Layout like this- ``` @{ Layout = "_Layout"; } ``` If you want to set page specific layout then in that `page.cshtml`, you can assign other view like this- ``` @{ Lay...
To have a Multiple Layout in asp.net core is quite easy, follow the steps below: Step 1: Create the layout inside the "Shared Folder located Under Views" and give it a name with prefix "\_" i.e `_myLoginLayout.cshtml` Step 2: Specify your layout at the beginning of the page you want to apply it e.g @{ `Layout = "~/V...
39,870,368
Following is my js ``` $(document).ready(function() { $.ajax({ url: url + 'project/get_project_list', method:'post', dataType:'xml', success:function(data){ $('#datatable').dataTable({ ...
2016/10/05
[ "https://Stackoverflow.com/questions/39870368", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4332335/" ]
In ASP.NET Core 2.0, I was inspired by the answer of @Daniel J.G. I made a `ViewLayoutAttribute`: ```cs [AttributeUsage(AttributeTargets.Class)] public class ViewLayoutAttribute : Attribute { public ViewLayoutAttribute(string layoutName) { this.LayoutName = layoutName; } public string LayoutN...
You can use `IViewLocationExpander` interface to render view as you want. Please refer this link [Working with IViewLocationExpander in mvc](https://stackoverflow.com/questions/39471627/working-with-iviewlocationexpander-in-mvc) for more details Regards, Rohit
39,870,368
Following is my js ``` $(document).ready(function() { $.ajax({ url: url + 'project/get_project_list', method:'post', dataType:'xml', success:function(data){ $('#datatable').dataTable({ ...
2016/10/05
[ "https://Stackoverflow.com/questions/39870368", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4332335/" ]
If you want to have a different layout based on some condition, you could use this code in the `_ViewStart.cshtml` file: ``` @{ if (some condition) { Layout = "_Layout1"; } else if (some other condition) { Layout = "_Layout2"; } etc. } ``` I use this in one of my projects....
You can use `IViewLocationExpander` interface to render view as you want. Please refer this link [Working with IViewLocationExpander in mvc](https://stackoverflow.com/questions/39471627/working-with-iviewlocationexpander-in-mvc) for more details Regards, Rohit
39,870,368
Following is my js ``` $(document).ready(function() { $.ajax({ url: url + 'project/get_project_list', method:'post', dataType:'xml', success:function(data){ $('#datatable').dataTable({ ...
2016/10/05
[ "https://Stackoverflow.com/questions/39870368", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4332335/" ]
You can still do something very similar to your original approach, using `ViewData` to pass around the layout name (Although I would create it as a [Result Filter](https://docs.asp.net/en/latest/mvc/controllers/filters.html?highlight=action%20filters#result-filters)): ``` public class ViewLayoutAttribute : ResultFilte...
This is how I am using multiple layouts in my ASP.NET core MVC application. You can try like this- In `_ViewStart.cshtml` specify default \_Layout like this- ``` @{ Layout = "_Layout"; } ``` If you want to set page specific layout then in that `page.cshtml`, you can assign other view like this- ``` @{ Lay...
39,870,368
Following is my js ``` $(document).ready(function() { $.ajax({ url: url + 'project/get_project_list', method:'post', dataType:'xml', success:function(data){ $('#datatable').dataTable({ ...
2016/10/05
[ "https://Stackoverflow.com/questions/39870368", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4332335/" ]
You can still do something very similar to your original approach, using `ViewData` to pass around the layout name (Although I would create it as a [Result Filter](https://docs.asp.net/en/latest/mvc/controllers/filters.html?highlight=action%20filters#result-filters)): ``` public class ViewLayoutAttribute : ResultFilte...
In ASP.NET Core 2.0, I was inspired by the answer of @Daniel J.G. I made a `ViewLayoutAttribute`: ```cs [AttributeUsage(AttributeTargets.Class)] public class ViewLayoutAttribute : Attribute { public ViewLayoutAttribute(string layoutName) { this.LayoutName = layoutName; } public string LayoutN...
39,870,368
Following is my js ``` $(document).ready(function() { $.ajax({ url: url + 'project/get_project_list', method:'post', dataType:'xml', success:function(data){ $('#datatable').dataTable({ ...
2016/10/05
[ "https://Stackoverflow.com/questions/39870368", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4332335/" ]
If you want to have a different layout based on some condition, you could use this code in the `_ViewStart.cshtml` file: ``` @{ if (some condition) { Layout = "_Layout1"; } else if (some other condition) { Layout = "_Layout2"; } etc. } ``` I use this in one of my projects....
In ASP.NET Core 2.0, I was inspired by the answer of @Daniel J.G. I made a `ViewLayoutAttribute`: ```cs [AttributeUsage(AttributeTargets.Class)] public class ViewLayoutAttribute : Attribute { public ViewLayoutAttribute(string layoutName) { this.LayoutName = layoutName; } public string LayoutN...
39,870,368
Following is my js ``` $(document).ready(function() { $.ajax({ url: url + 'project/get_project_list', method:'post', dataType:'xml', success:function(data){ $('#datatable').dataTable({ ...
2016/10/05
[ "https://Stackoverflow.com/questions/39870368", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4332335/" ]
You can still do something very similar to your original approach, using `ViewData` to pass around the layout name (Although I would create it as a [Result Filter](https://docs.asp.net/en/latest/mvc/controllers/filters.html?highlight=action%20filters#result-filters)): ``` public class ViewLayoutAttribute : ResultFilte...
To have a Multiple Layout in asp.net core is quite easy, follow the steps below: Step 1: Create the layout inside the "Shared Folder located Under Views" and give it a name with prefix "\_" i.e `_myLoginLayout.cshtml` Step 2: Specify your layout at the beginning of the page you want to apply it e.g @{ `Layout = "~/V...
39,870,368
Following is my js ``` $(document).ready(function() { $.ajax({ url: url + 'project/get_project_list', method:'post', dataType:'xml', success:function(data){ $('#datatable').dataTable({ ...
2016/10/05
[ "https://Stackoverflow.com/questions/39870368", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4332335/" ]
If you want to have a different layout based on some condition, you could use this code in the `_ViewStart.cshtml` file: ``` @{ if (some condition) { Layout = "_Layout1"; } else if (some other condition) { Layout = "_Layout2"; } etc. } ``` I use this in one of my projects....
To have a Multiple Layout in asp.net core is quite easy, follow the steps below: Step 1: Create the layout inside the "Shared Folder located Under Views" and give it a name with prefix "\_" i.e `_myLoginLayout.cshtml` Step 2: Specify your layout at the beginning of the page you want to apply it e.g @{ `Layout = "~/V...
39,870,368
Following is my js ``` $(document).ready(function() { $.ajax({ url: url + 'project/get_project_list', method:'post', dataType:'xml', success:function(data){ $('#datatable').dataTable({ ...
2016/10/05
[ "https://Stackoverflow.com/questions/39870368", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4332335/" ]
In ASP.NET Core 2.0, I was inspired by the answer of @Daniel J.G. I made a `ViewLayoutAttribute`: ```cs [AttributeUsage(AttributeTargets.Class)] public class ViewLayoutAttribute : Attribute { public ViewLayoutAttribute(string layoutName) { this.LayoutName = layoutName; } public string LayoutN...
To have a Multiple Layout in asp.net core is quite easy, follow the steps below: Step 1: Create the layout inside the "Shared Folder located Under Views" and give it a name with prefix "\_" i.e `_myLoginLayout.cshtml` Step 2: Specify your layout at the beginning of the page you want to apply it e.g @{ `Layout = "~/V...
9,073,440
I am creating a information system that will handle financial information, contacts, etc. I am developing the site from complete scratch using object oriented programming (classes, functions, etc). A majority of the data will be from a MySQL database. Users will be able to get and submit data to the database. I am al...
2012/01/31
[ "https://Stackoverflow.com/questions/9073440", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1029393/" ]
First: good for you for giving attention to security issues. It's a big subject and one that many people overlook until it's too late. So, kudos to you for seeking more understanding about best practices. :-) [OWASP](http://owasp.org) is a good resource for understanding web security issues. Another good resource is ...
You are doing it wrong, because: * md5 is considered broken, * preg\_replace() will not give you much. Consider using already developed, tested and secure frameworks (candidates include Zend Framework, Symphony, Kohana, Yii) for your system. You have a long way before you will achieve security at least nearly as good...
9,073,440
I am creating a information system that will handle financial information, contacts, etc. I am developing the site from complete scratch using object oriented programming (classes, functions, etc). A majority of the data will be from a MySQL database. Users will be able to get and submit data to the database. I am al...
2012/01/31
[ "https://Stackoverflow.com/questions/9073440", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1029393/" ]
`preg_replace()` will not do much in terms of security. You should familiarize yourself with some basic security/crypto before doing this work. Also, consider the use of a standard cryptographic library for encrypting/decrypting data instead of arbitrarily using hash or regex functions. Take a look at this: <http://ph...
You are doing it wrong, because: * md5 is considered broken, * preg\_replace() will not give you much. Consider using already developed, tested and secure frameworks (candidates include Zend Framework, Symphony, Kohana, Yii) for your system. You have a long way before you will achieve security at least nearly as good...