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
14,022,533
> > **Possible Duplicate:** > > [PHP: “Notice: Undefined variable” and “Notice: Undefined index”](https://stackoverflow.com/questions/4261133/php-notice-undefined-variable-and-notice-undefined-index) > > [Notice: Undefined variable but it’s defined](https://stackoverflow.com/questions/14022290/notice-undefined-v...
2012/12/24
[ "https://Stackoverflow.com/questions/14022533", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1924832/" ]
You sure can. Here's how: ``` awk '$2 = toupper($2)' file ``` Results: ``` 1 HTTP http 3 4 5 2 DNS dns 4 3 FTP ftp 4 5 6 8 ``` From the manual: > > tolower(str) > > > > > > > Returns a copy of the string str, with all the upper-case > > characters in str translated to their corresponding lower-case > > c...
``` perl -F -ane '$F[1] = lc($F[1]);print "@F"' your_file ```
45,373,151
``` String Date1 = (((JTextField)jDateChooser1.getDateEditor().getUiComponent()).getText()); String Date2 = (((JTextField)jDateChooser2.getDateEditor().getUiComponent()).getText()); String query="SELECT * FROM work_hours WHERE ID ="+A+" AND Date >= "+Date1+" AND Date <= "+Date2+" "; ResultSet rs = db.Select(query); `...
2017/07/28
[ "https://Stackoverflow.com/questions/45373151", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8381794/" ]
Use STR\_TO\_DATE function; ``` String query="SELECT * FROM work_hours WHERE ID ="+A+" AND Date >= STR_TO_DATE("+Date1+") AND Date <= STR_TO_DATE("+Date2+") "; ```
Try to qoute the dates 'date1'. ``` String query="SELECT * FROM work_hours WHERE ID ="+A+" AND Date >= '"+Date1+"' AND Date <= '"+Date2+"' "; ```
45,373,151
``` String Date1 = (((JTextField)jDateChooser1.getDateEditor().getUiComponent()).getText()); String Date2 = (((JTextField)jDateChooser2.getDateEditor().getUiComponent()).getText()); String query="SELECT * FROM work_hours WHERE ID ="+A+" AND Date >= "+Date1+" AND Date <= "+Date2+" "; ResultSet rs = db.Select(query); `...
2017/07/28
[ "https://Stackoverflow.com/questions/45373151", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8381794/" ]
Use STR\_TO\_DATE function; ``` String query="SELECT * FROM work_hours WHERE ID ="+A+" AND Date >= STR_TO_DATE("+Date1+") AND Date <= STR_TO_DATE("+Date2+") "; ```
You can try to use 'BETWEEN'. Exempel: `SELECT * FROM table_name WHERE date BETWEEN '2017-07-01 07:07:07' AND '2017-07-31 07:07:07';` I hope I was able to help you.
45,373,151
``` String Date1 = (((JTextField)jDateChooser1.getDateEditor().getUiComponent()).getText()); String Date2 = (((JTextField)jDateChooser2.getDateEditor().getUiComponent()).getText()); String query="SELECT * FROM work_hours WHERE ID ="+A+" AND Date >= "+Date1+" AND Date <= "+Date2+" "; ResultSet rs = db.Select(query); `...
2017/07/28
[ "https://Stackoverflow.com/questions/45373151", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8381794/" ]
Use STR\_TO\_DATE function; ``` String query="SELECT * FROM work_hours WHERE ID ="+A+" AND Date >= STR_TO_DATE("+Date1+") AND Date <= STR_TO_DATE("+Date2+") "; ```
To solve this issue you need to accomplish to steps: * Proper date format from JAVA snippet * Add single quotes wrapping dates in SQL script I'm not sure how you format a date variable en JAVA to return the ANSI date standard 'YYYYMMDD' The SQL script needs to look like this: ``` String query="SELECT * FROM work_ho...
45,373,151
``` String Date1 = (((JTextField)jDateChooser1.getDateEditor().getUiComponent()).getText()); String Date2 = (((JTextField)jDateChooser2.getDateEditor().getUiComponent()).getText()); String query="SELECT * FROM work_hours WHERE ID ="+A+" AND Date >= "+Date1+" AND Date <= "+Date2+" "; ResultSet rs = db.Select(query); `...
2017/07/28
[ "https://Stackoverflow.com/questions/45373151", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8381794/" ]
Date-time types =============== For date-time values, use date-time data types to define your column, and use date-time classes in Java. The job of your JDBC driver is to mediate between these types. You are trying to pass strings rather than date-time objects. Half-Open logic =============== In date-time work, us...
Try to qoute the dates 'date1'. ``` String query="SELECT * FROM work_hours WHERE ID ="+A+" AND Date >= '"+Date1+"' AND Date <= '"+Date2+"' "; ```
45,373,151
``` String Date1 = (((JTextField)jDateChooser1.getDateEditor().getUiComponent()).getText()); String Date2 = (((JTextField)jDateChooser2.getDateEditor().getUiComponent()).getText()); String query="SELECT * FROM work_hours WHERE ID ="+A+" AND Date >= "+Date1+" AND Date <= "+Date2+" "; ResultSet rs = db.Select(query); `...
2017/07/28
[ "https://Stackoverflow.com/questions/45373151", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8381794/" ]
Date-time types =============== For date-time values, use date-time data types to define your column, and use date-time classes in Java. The job of your JDBC driver is to mediate between these types. You are trying to pass strings rather than date-time objects. Half-Open logic =============== In date-time work, us...
You can try to use 'BETWEEN'. Exempel: `SELECT * FROM table_name WHERE date BETWEEN '2017-07-01 07:07:07' AND '2017-07-31 07:07:07';` I hope I was able to help you.
45,373,151
``` String Date1 = (((JTextField)jDateChooser1.getDateEditor().getUiComponent()).getText()); String Date2 = (((JTextField)jDateChooser2.getDateEditor().getUiComponent()).getText()); String query="SELECT * FROM work_hours WHERE ID ="+A+" AND Date >= "+Date1+" AND Date <= "+Date2+" "; ResultSet rs = db.Select(query); `...
2017/07/28
[ "https://Stackoverflow.com/questions/45373151", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8381794/" ]
Date-time types =============== For date-time values, use date-time data types to define your column, and use date-time classes in Java. The job of your JDBC driver is to mediate between these types. You are trying to pass strings rather than date-time objects. Half-Open logic =============== In date-time work, us...
To solve this issue you need to accomplish to steps: * Proper date format from JAVA snippet * Add single quotes wrapping dates in SQL script I'm not sure how you format a date variable en JAVA to return the ANSI date standard 'YYYYMMDD' The SQL script needs to look like this: ``` String query="SELECT * FROM work_ho...
190,284
I am trying to change the way "Search results" header is rendered in D8. Unfortunately HTML is hardcoded in SearchController and not themeable. I figured I could use hook\_block\_view\_alter to change the $build['search\_results\_title'], but the hook implementation from my theme never gets called: ``` function labweb...
2016/02/12
[ "https://drupal.stackexchange.com/questions/190284", "https://drupal.stackexchange.com", "https://drupal.stackexchange.com/users/57712/" ]
> > ...but the hook implementation from my **theme** never gets called: > > > `hook_block_view_alter()` will not be called for themes; it is invoked only for modules. This is why your hook is never invoked. To implement this hook, you need to create a custom module. If you need help to create a module you can che...
Since you are trying to change the output returned from a page controller, you are implementing the wrong hook. The output of a page controller doesn't normally go in a block, but in a page. The only block the Search module implement is the [SearchBlock](https://api.drupal.org/api/drupal/core!modules!search!src!Plugin!...
50,068,995
I have currently this code: ``` <ul class="char"> <li> <label class="textOverImage" style="background-image:url(img/text.png)"> <input type="checkbox"> <h3>Joyce Byers</h3> <div> text </div> </label> ...
2018/04/27
[ "https://Stackoverflow.com/questions/50068995", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7321098/" ]
After doing some research on this, I think I have an answer. I could write a significantly *longer* answer, but I think I'll just cut to the chase here. Each class loaded by a ClassLoader has a [ProtectionDomain](https://docs.oracle.com/javase/9/docs/api/java/security/ProtectionDomain.html)+[CodeSource](https://docs.o...
Here is one way for the example to run as intended, i.e., to effectively blacklist subsequent execution paths under the same domain. The core permission-intersection-based authorization model should still hold. The sample must be run with `-Djava.system.class.loader=com.example.Test$AppClassLoader` (this replacement sy...
18,036,992
I am trying to make a tab-based layout, I have it working if it is in a vertical orientation, but I would like to make them horizontal. When a tab is clicked, I would like to make a `div` expand then the tab is, I am having trouble with this. I also added an `X` for exiting. This is my [jsFiddle](http://jsfiddle.net/FF...
2013/08/03
[ "https://Stackoverflow.com/questions/18036992", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2635873/" ]
Which solution are you building? If you're using VS2010, then use ide\VisualC2010\fltk.sln to build it. Make sure you select debug or release. It defaults to Debug Cairo, which you don't really want.
It seems that FLTK is using the [CMake build system](http://www.cmake.org/). CMake can build projects for many different compilers and tools, including native project files for Visual Studio 2010. You should download CMake from their official site and then use cmake-gui, a very straightforward GUI tool that will guide ...
6,649,446
I have two sortable ul lists, after you drag and drop an element from one list to another i want the name attribute of that element to be changed, so i keep having 2 groups to send to my asp backend. The only problem is that I don't know how to change that attribute. ``` <script type="text/javascript"> $('form...
2011/07/11
[ "https://Stackoverflow.com/questions/6649446", "https://Stackoverflow.com", "https://Stackoverflow.com/users/838772/" ]
You can leverage the sortable 'receive' method. This method takes an 'ui' argument which you can access 'ui.item' to get the sorted element. something like ``` $("#groep1").sortable({ receive: function (event, ui) { var element = ui.item; //change name on element here } }); ```
You can change the name attribute of an element like this: ``` $MyDiv = $("#MyDiv"); $MyDiv.attr("name", "Sue"); ```
1,114,299
I am using the jQuery [cycle plugin](http://malsup.com/jquery/cycle/) to cycle through some images. These images are all contained inside a DIV. I don't want the cycle plugin to run until after all of the images have loaded, or at least the first 4 or 5 so that an image doesn't appear that isn't loaded yet. Is there an...
2009/07/11
[ "https://Stackoverflow.com/questions/1114299", "https://Stackoverflow.com", "https://Stackoverflow.com/users/83096/" ]
Markup: ``` <div id='cycle'> <img src='path1' class='preload' /> <img src='path2' class='preload' /> <img src='path3' class='preload'/> </div> ``` Try this: ``` var cyclerLoaded = false; var numberOfPreloaded = 0; function imageLoaded() { numberOfPreloaded++; if (numberOfPreloaded >= 4 && !cyclerL...
A better way will be to write a function to preload sufficient number of images and then call cycle function. Because how, when and in what order the images in page are loaded may vary by browser or other circumstances. Here is a great little function at [ajaxian](http://ajaxian.com/archives/preloading-images-with-jqu...
1,114,299
I am using the jQuery [cycle plugin](http://malsup.com/jquery/cycle/) to cycle through some images. These images are all contained inside a DIV. I don't want the cycle plugin to run until after all of the images have loaded, or at least the first 4 or 5 so that an image doesn't appear that isn't loaded yet. Is there an...
2009/07/11
[ "https://Stackoverflow.com/questions/1114299", "https://Stackoverflow.com", "https://Stackoverflow.com/users/83096/" ]
A better way will be to write a function to preload sufficient number of images and then call cycle function. Because how, when and in what order the images in page are loaded may vary by browser or other circumstances. Here is a great little function at [ajaxian](http://ajaxian.com/archives/preloading-images-with-jqu...
One thing that's wrong in your code is you are using `$('lastImg')`, but it should be `$('.lastImg')`. Thus, your code will never run at all.
1,114,299
I am using the jQuery [cycle plugin](http://malsup.com/jquery/cycle/) to cycle through some images. These images are all contained inside a DIV. I don't want the cycle plugin to run until after all of the images have loaded, or at least the first 4 or 5 so that an image doesn't appear that isn't loaded yet. Is there an...
2009/07/11
[ "https://Stackoverflow.com/questions/1114299", "https://Stackoverflow.com", "https://Stackoverflow.com/users/83096/" ]
Markup: ``` <div id='cycle'> <img src='path1' class='preload' /> <img src='path2' class='preload' /> <img src='path3' class='preload'/> </div> ``` Try this: ``` var cyclerLoaded = false; var numberOfPreloaded = 0; function imageLoaded() { numberOfPreloaded++; if (numberOfPreloaded >= 4 && !cyclerL...
Why not hookup the cycle plugin in document's load event? Document's load event fires when all the artificats have been downloaded. [ready event fires when DOM is available.] Try ``` $(document).load(function() { //your cycle plugin hookup } ); ```
1,114,299
I am using the jQuery [cycle plugin](http://malsup.com/jquery/cycle/) to cycle through some images. These images are all contained inside a DIV. I don't want the cycle plugin to run until after all of the images have loaded, or at least the first 4 or 5 so that an image doesn't appear that isn't loaded yet. Is there an...
2009/07/11
[ "https://Stackoverflow.com/questions/1114299", "https://Stackoverflow.com", "https://Stackoverflow.com/users/83096/" ]
Markup: ``` <div id='cycle'> <img src='path1' class='preload' /> <img src='path2' class='preload' /> <img src='path3' class='preload'/> </div> ``` Try this: ``` var cyclerLoaded = false; var numberOfPreloaded = 0; function imageLoaded() { numberOfPreloaded++; if (numberOfPreloaded >= 4 && !cyclerL...
One thing that's wrong in your code is you are using `$('lastImg')`, but it should be `$('.lastImg')`. Thus, your code will never run at all.
1,114,299
I am using the jQuery [cycle plugin](http://malsup.com/jquery/cycle/) to cycle through some images. These images are all contained inside a DIV. I don't want the cycle plugin to run until after all of the images have loaded, or at least the first 4 or 5 so that an image doesn't appear that isn't loaded yet. Is there an...
2009/07/11
[ "https://Stackoverflow.com/questions/1114299", "https://Stackoverflow.com", "https://Stackoverflow.com/users/83096/" ]
Why not hookup the cycle plugin in document's load event? Document's load event fires when all the artificats have been downloaded. [ready event fires when DOM is available.] Try ``` $(document).load(function() { //your cycle plugin hookup } ); ```
One thing that's wrong in your code is you are using `$('lastImg')`, but it should be `$('.lastImg')`. Thus, your code will never run at all.
60,568,485
Is there a simple way to split a list into sublists by grouping **only** repeated elements that are adjacent to each other? Simple example with the folowing list of strings: ``` Input: [RED,RED,BLUE,BLUE,BLUE,GREEN,BLUE,BLUE,RED,RED] Output: [[RED,RED],[BLUE,BLUE,BLUE],[GREEN],[BLUE,BLUE],[RED,RED]] ``` If I use...
2020/03/06
[ "https://Stackoverflow.com/questions/60568485", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12125351/" ]
You can create a custom collector: ``` List<String> input = Arrays.asList("RED", "RED", "BLUE", "BLUE", "BLUE", "BLUE", "RED", "RED"); List<List<String>> output = input.stream() .collect(Collector.of(ArrayList::new, (accumulator, item) -> { ...
I'm sure there's a better way to do this with streams, but for a quick and dirty: ``` List<String> values = Arrays.asList("RED", "RED", "BLUE", "BLUE", "BLUE", "BLUE", "RED", "RED"); List<List<String>> output = new ArrayList<List<String>>(); String previous = null; List<String> subList = new ArrayList<Stri...
60,689,969
I am trying to write a bit of code that will use regex to expand abbreviations in a text file to full words but not replace all instances of the abbreviation text. I can’t figure out what goes in the pattern portion of the substitution function where I have placed ‘\*\*\*’ below. I can make the code work by hard codi...
2020/03/15
[ "https://Stackoverflow.com/questions/60689969", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3495364/" ]
You can iterate over dictionary, replacing key found in string with value: ``` import re sample = 'premedicate with 0.3 mg/kg goofballs and 1.2 mg/kg happy dust with test string bmge or bmg or mgb' fr_dict = {'kg': 'kilogram', 'mg': 'miligram', '/': ' per '} for key, value in fr_dict.items(): sample = re.sub(rf...
This seems a bit simpler than you may think. If you use `.items()` on the replacements dict, you have access to both the key and replacement value in your loop. Another way to do it is to join the keys into an alternation and substitute using the lambda to look up the correct swap pair: ``` pattern = "|".join(rf"\b{x...
52,288,287
I have gone through the 'point-along-path' d3 visualization through the code: <https://bl.ocks.org/mbostock/1705868>. I have noticed that while the point is moving along its path it consumes 7 to 11% of CPU Usage. Current scenario, I have around 100 paths and on each path, I will have to move points(circles) from sou...
2018/09/12
[ "https://Stackoverflow.com/questions/52288287", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6376213/" ]
> > **Post edit:** > > > * [Here](https://cdn.rawgit.com/IbrahimTanyalcin/65ecb6e98b36b97051e1c91e076ad426/raw/fdd11e16fd27c2ef4ac7efbf8236469ceee8ad87/defPointAlongPath_many.html) is the default. (peak CPU around %99 for 100 points at 2.7Ghz i7) > * [Here](https://cdn.rawgit.com/IbrahimTanyalcin/2915f7a33d806c1aaa1...
Another way of achieving this might be to use an [svg:animateMotion](https://developer.mozilla.org/en-US/docs/Web/SVG/Element/animateMotion) which you can use to move an element along a given path. Here is an example from the [docs](https://jsfiddle.net/api/mdn/). In essence you want: ``` <svg> <path id="path1" d="....
52,288,287
I have gone through the 'point-along-path' d3 visualization through the code: <https://bl.ocks.org/mbostock/1705868>. I have noticed that while the point is moving along its path it consumes 7 to 11% of CPU Usage. Current scenario, I have around 100 paths and on each path, I will have to move points(circles) from sou...
2018/09/12
[ "https://Stackoverflow.com/questions/52288287", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6376213/" ]
> > **Post edit:** > > > * [Here](https://cdn.rawgit.com/IbrahimTanyalcin/65ecb6e98b36b97051e1c91e076ad426/raw/fdd11e16fd27c2ef4ac7efbf8236469ceee8ad87/defPointAlongPath_many.html) is the default. (peak CPU around %99 for 100 points at 2.7Ghz i7) > * [Here](https://cdn.rawgit.com/IbrahimTanyalcin/2915f7a33d806c1aaa1...
On my computer: * @mbostock uses 8% CPU. * @ibrahimtanyalcin uses 11% CPU. * @Ian uses 10% CPU. For @mbostock and @ibrahimtanyalcin this means the `transition` and the `transform` update use the CPU. If I put 100 of these animations in 1 SVG I get * @mbostock uses 50% CPU. (1 core full) * @Ian uses 40% CPU. All an...
52,288,287
I have gone through the 'point-along-path' d3 visualization through the code: <https://bl.ocks.org/mbostock/1705868>. I have noticed that while the point is moving along its path it consumes 7 to 11% of CPU Usage. Current scenario, I have around 100 paths and on each path, I will have to move points(circles) from sou...
2018/09/12
[ "https://Stackoverflow.com/questions/52288287", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6376213/" ]
Another way of achieving this might be to use an [svg:animateMotion](https://developer.mozilla.org/en-US/docs/Web/SVG/Element/animateMotion) which you can use to move an element along a given path. Here is an example from the [docs](https://jsfiddle.net/api/mdn/). In essence you want: ``` <svg> <path id="path1" d="....
On my computer: * @mbostock uses 8% CPU. * @ibrahimtanyalcin uses 11% CPU. * @Ian uses 10% CPU. For @mbostock and @ibrahimtanyalcin this means the `transition` and the `transform` update use the CPU. If I put 100 of these animations in 1 SVG I get * @mbostock uses 50% CPU. (1 core full) * @Ian uses 40% CPU. All an...
52,288,287
I have gone through the 'point-along-path' d3 visualization through the code: <https://bl.ocks.org/mbostock/1705868>. I have noticed that while the point is moving along its path it consumes 7 to 11% of CPU Usage. Current scenario, I have around 100 paths and on each path, I will have to move points(circles) from sou...
2018/09/12
[ "https://Stackoverflow.com/questions/52288287", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6376213/" ]
There are a few approaches to this, which vary greatly in potential efficacy. Ultimately, you are conducting expensive operations every animation frame to calculate each point's new location and to re render it. So, every effort should be made to reduce the cost of those operations. If frame rate is dropping below 6...
Another way of achieving this might be to use an [svg:animateMotion](https://developer.mozilla.org/en-US/docs/Web/SVG/Element/animateMotion) which you can use to move an element along a given path. Here is an example from the [docs](https://jsfiddle.net/api/mdn/). In essence you want: ``` <svg> <path id="path1" d="....
52,288,287
I have gone through the 'point-along-path' d3 visualization through the code: <https://bl.ocks.org/mbostock/1705868>. I have noticed that while the point is moving along its path it consumes 7 to 11% of CPU Usage. Current scenario, I have around 100 paths and on each path, I will have to move points(circles) from sou...
2018/09/12
[ "https://Stackoverflow.com/questions/52288287", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6376213/" ]
There are a few approaches to this, which vary greatly in potential efficacy. Ultimately, you are conducting expensive operations every animation frame to calculate each point's new location and to re render it. So, every effort should be made to reduce the cost of those operations. If frame rate is dropping below 6...
On my computer: * @mbostock uses 8% CPU. * @ibrahimtanyalcin uses 11% CPU. * @Ian uses 10% CPU. For @mbostock and @ibrahimtanyalcin this means the `transition` and the `transform` update use the CPU. If I put 100 of these animations in 1 SVG I get * @mbostock uses 50% CPU. (1 core full) * @Ian uses 40% CPU. All an...
71,393,057
I cannot access google cli or google cloud command line console, the button for command line is not available and when I access via google cli in virtual machine access is still not available. Why this is a big deal because my Debian password is my vm id which is only accessible via google cloud command cli. also I can...
2022/03/08
[ "https://Stackoverflow.com/questions/71393057", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18406977/" ]
We had this problem today on several users and we fixed it by clearing the browser caches / use incognito mode.
I have had the same issue and in incognito should work.
71,393,057
I cannot access google cli or google cloud command line console, the button for command line is not available and when I access via google cli in virtual machine access is still not available. Why this is a big deal because my Debian password is my vm id which is only accessible via google cloud command cli. also I can...
2022/03/08
[ "https://Stackoverflow.com/questions/71393057", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18406977/" ]
We had this problem today on several users and we fixed it by clearing the browser caches / use incognito mode.
This is an ongoing issue in Google Cloud. You can try the following workarounds: * Using the [Cloud Shell URL](https://shell.cloud.google.com/%60) directly. * Using Google Chrome in Incognito Mode. * Using another Browsers. The following actions will not help the issue. * Logged out and logged in. * Clearing Chrome...
4,367,737
I have the following value in my XML -1.8959581529998104E-4. I want to format this to the exact number it should be using XSL to give me -0.000189595815299981. format-number(-1.8959581529998104E-4,'0.000000;-0.000000') gives me NaN. Any ideas? Cheers Andez
2010/12/06
[ "https://Stackoverflow.com/questions/4367737", "https://Stackoverflow.com", "https://Stackoverflow.com/users/405022/" ]
**XSLT 1.0 does not have support for scientific notation.** This: `number('-1.8959581529998104E-4')` Result: `NaN` This: `number('-0.000189595815299981')` Result: `-0.000189595815299981` XSLT 2.0 has support for scientific notation This: `number('-1.8959581529998104E-4')` Result: `-0.000189595815299981` **EDIT**: ...
Just tried this with xsltproc using libxslt1.1 in version 1.1.24 under Linux: XSLT 1.1 is able to read in exponential/scientific format now even without any dedicated template, it seems to simply work :-))
4,367,737
I have the following value in my XML -1.8959581529998104E-4. I want to format this to the exact number it should be using XSL to give me -0.000189595815299981. format-number(-1.8959581529998104E-4,'0.000000;-0.000000') gives me NaN. Any ideas? Cheers Andez
2010/12/06
[ "https://Stackoverflow.com/questions/4367737", "https://Stackoverflow.com", "https://Stackoverflow.com/users/405022/" ]
**XSLT 1.0 does not have support for scientific notation.** This: `number('-1.8959581529998104E-4')` Result: `NaN` This: `number('-0.000189595815299981')` Result: `-0.000189595815299981` XSLT 2.0 has support for scientific notation This: `number('-1.8959581529998104E-4')` Result: `-0.000189595815299981` **EDIT**: ...
This is based on user357812 answer. But I made it act like a function and handle non-scientific notation ``` <xsl:template name="convertSciToNumString" > <xsl:param name="inputVal" select="0"/> <xsl:variable name="vExponent" select="substring-after($inputVal,'E')"/> <xsl:variable name="vMantissa" select="s...
4,367,737
I have the following value in my XML -1.8959581529998104E-4. I want to format this to the exact number it should be using XSL to give me -0.000189595815299981. format-number(-1.8959581529998104E-4,'0.000000;-0.000000') gives me NaN. Any ideas? Cheers Andez
2010/12/06
[ "https://Stackoverflow.com/questions/4367737", "https://Stackoverflow.com", "https://Stackoverflow.com/users/405022/" ]
**XSLT 1.0 does not have support for scientific notation.** This: `number('-1.8959581529998104E-4')` Result: `NaN` This: `number('-0.000189595815299981')` Result: `-0.000189595815299981` XSLT 2.0 has support for scientific notation This: `number('-1.8959581529998104E-4')` Result: `-0.000189595815299981` **EDIT**: ...
Another possible workaround without a template: ``` <xsl:stylesheet version="1.0" ... xmlns:java="http://xml.apache.org/xslt/java"> ... <xsl:value-of select="format-number(java:java.lang.Double.parseDouble('1E-6'), '0.000')"/> ```
4,367,737
I have the following value in my XML -1.8959581529998104E-4. I want to format this to the exact number it should be using XSL to give me -0.000189595815299981. format-number(-1.8959581529998104E-4,'0.000000;-0.000000') gives me NaN. Any ideas? Cheers Andez
2010/12/06
[ "https://Stackoverflow.com/questions/4367737", "https://Stackoverflow.com", "https://Stackoverflow.com/users/405022/" ]
**XSLT 1.0 does not have support for scientific notation.** This: `number('-1.8959581529998104E-4')` Result: `NaN` This: `number('-0.000189595815299981')` Result: `-0.000189595815299981` XSLT 2.0 has support for scientific notation This: `number('-1.8959581529998104E-4')` Result: `-0.000189595815299981` **EDIT**: ...
The logic doesn't appear to work correctly in the above answers by [Moop](https://stackoverflow.com/a/27369614/2047725) and [user357812](https://stackoverflow.com/a/4367826/2047725) when determining `vFactor` in one particular scenario. If `vExponent` is a single-digit positive number (without a preceding '+' sign), ...
4,367,737
I have the following value in my XML -1.8959581529998104E-4. I want to format this to the exact number it should be using XSL to give me -0.000189595815299981. format-number(-1.8959581529998104E-4,'0.000000;-0.000000') gives me NaN. Any ideas? Cheers Andez
2010/12/06
[ "https://Stackoverflow.com/questions/4367737", "https://Stackoverflow.com", "https://Stackoverflow.com/users/405022/" ]
This is based on user357812 answer. But I made it act like a function and handle non-scientific notation ``` <xsl:template name="convertSciToNumString" > <xsl:param name="inputVal" select="0"/> <xsl:variable name="vExponent" select="substring-after($inputVal,'E')"/> <xsl:variable name="vMantissa" select="s...
Just tried this with xsltproc using libxslt1.1 in version 1.1.24 under Linux: XSLT 1.1 is able to read in exponential/scientific format now even without any dedicated template, it seems to simply work :-))
4,367,737
I have the following value in my XML -1.8959581529998104E-4. I want to format this to the exact number it should be using XSL to give me -0.000189595815299981. format-number(-1.8959581529998104E-4,'0.000000;-0.000000') gives me NaN. Any ideas? Cheers Andez
2010/12/06
[ "https://Stackoverflow.com/questions/4367737", "https://Stackoverflow.com", "https://Stackoverflow.com/users/405022/" ]
Another possible workaround without a template: ``` <xsl:stylesheet version="1.0" ... xmlns:java="http://xml.apache.org/xslt/java"> ... <xsl:value-of select="format-number(java:java.lang.Double.parseDouble('1E-6'), '0.000')"/> ```
Just tried this with xsltproc using libxslt1.1 in version 1.1.24 under Linux: XSLT 1.1 is able to read in exponential/scientific format now even without any dedicated template, it seems to simply work :-))
4,367,737
I have the following value in my XML -1.8959581529998104E-4. I want to format this to the exact number it should be using XSL to give me -0.000189595815299981. format-number(-1.8959581529998104E-4,'0.000000;-0.000000') gives me NaN. Any ideas? Cheers Andez
2010/12/06
[ "https://Stackoverflow.com/questions/4367737", "https://Stackoverflow.com", "https://Stackoverflow.com/users/405022/" ]
The logic doesn't appear to work correctly in the above answers by [Moop](https://stackoverflow.com/a/27369614/2047725) and [user357812](https://stackoverflow.com/a/4367826/2047725) when determining `vFactor` in one particular scenario. If `vExponent` is a single-digit positive number (without a preceding '+' sign), ...
Just tried this with xsltproc using libxslt1.1 in version 1.1.24 under Linux: XSLT 1.1 is able to read in exponential/scientific format now even without any dedicated template, it seems to simply work :-))
4,367,737
I have the following value in my XML -1.8959581529998104E-4. I want to format this to the exact number it should be using XSL to give me -0.000189595815299981. format-number(-1.8959581529998104E-4,'0.000000;-0.000000') gives me NaN. Any ideas? Cheers Andez
2010/12/06
[ "https://Stackoverflow.com/questions/4367737", "https://Stackoverflow.com", "https://Stackoverflow.com/users/405022/" ]
This is based on user357812 answer. But I made it act like a function and handle non-scientific notation ``` <xsl:template name="convertSciToNumString" > <xsl:param name="inputVal" select="0"/> <xsl:variable name="vExponent" select="substring-after($inputVal,'E')"/> <xsl:variable name="vMantissa" select="s...
Another possible workaround without a template: ``` <xsl:stylesheet version="1.0" ... xmlns:java="http://xml.apache.org/xslt/java"> ... <xsl:value-of select="format-number(java:java.lang.Double.parseDouble('1E-6'), '0.000')"/> ```
4,367,737
I have the following value in my XML -1.8959581529998104E-4. I want to format this to the exact number it should be using XSL to give me -0.000189595815299981. format-number(-1.8959581529998104E-4,'0.000000;-0.000000') gives me NaN. Any ideas? Cheers Andez
2010/12/06
[ "https://Stackoverflow.com/questions/4367737", "https://Stackoverflow.com", "https://Stackoverflow.com/users/405022/" ]
This is based on user357812 answer. But I made it act like a function and handle non-scientific notation ``` <xsl:template name="convertSciToNumString" > <xsl:param name="inputVal" select="0"/> <xsl:variable name="vExponent" select="substring-after($inputVal,'E')"/> <xsl:variable name="vMantissa" select="s...
The logic doesn't appear to work correctly in the above answers by [Moop](https://stackoverflow.com/a/27369614/2047725) and [user357812](https://stackoverflow.com/a/4367826/2047725) when determining `vFactor` in one particular scenario. If `vExponent` is a single-digit positive number (without a preceding '+' sign), ...
24,340,681
If I have two parametrized fixtures, how can I create a single test function that is called first with the instances of one fixture and then with the instances of the other fixture? I guess it would make sense to create a new fixture that somehow concatenates the two existing fixtures. This works well for "normal" fix...
2014/06/21
[ "https://Stackoverflow.com/questions/24340681", "https://Stackoverflow.com", "https://Stackoverflow.com/users/500098/" ]
I had the exact same [question](https://stackoverflow.com/q/52307317/2988730) (and received a similar, but distinct [answer](https://stackoverflow.com/a/52321058/2988730)). The best solution I was able to come up with was to reconsider how I parametrize my tests. Instead of having multiple fixtures with compatible outp...
It is not beautiful, but may be today you know the better way. Request object inside 'all' fixture know only about own params: 'lower', 'upper'. One way [using fixtures from a fixture function](https://pytest.org/latest/fixture.html#modularity-using-fixtures-from-a-fixture-function). ``` import pytest @pytest.fixtur...
24,340,681
If I have two parametrized fixtures, how can I create a single test function that is called first with the instances of one fixture and then with the instances of the other fixture? I guess it would make sense to create a new fixture that somehow concatenates the two existing fixtures. This works well for "normal" fix...
2014/06/21
[ "https://Stackoverflow.com/questions/24340681", "https://Stackoverflow.com", "https://Stackoverflow.com/users/500098/" ]
There is now a solution available in `pytest-cases`, named `fixture_union`. Here is how you create the fixture union that you requested in your example: ``` from pytest_cases import fixture_union, pytest_fixture_plus @pytest_fixture_plus(params=[1, 2, 3]) def lower(request): return "i" * request.param @pytest_fi...
It is not beautiful, but may be today you know the better way. Request object inside 'all' fixture know only about own params: 'lower', 'upper'. One way [using fixtures from a fixture function](https://pytest.org/latest/fixture.html#modularity-using-fixtures-from-a-fixture-function). ``` import pytest @pytest.fixtur...
24,340,681
If I have two parametrized fixtures, how can I create a single test function that is called first with the instances of one fixture and then with the instances of the other fixture? I guess it would make sense to create a new fixture that somehow concatenates the two existing fixtures. This works well for "normal" fix...
2014/06/21
[ "https://Stackoverflow.com/questions/24340681", "https://Stackoverflow.com", "https://Stackoverflow.com/users/500098/" ]
There is now a solution available in `pytest-cases`, named `fixture_union`. Here is how you create the fixture union that you requested in your example: ``` from pytest_cases import fixture_union, pytest_fixture_plus @pytest_fixture_plus(params=[1, 2, 3]) def lower(request): return "i" * request.param @pytest_fi...
I had the exact same [question](https://stackoverflow.com/q/52307317/2988730) (and received a similar, but distinct [answer](https://stackoverflow.com/a/52321058/2988730)). The best solution I was able to come up with was to reconsider how I parametrize my tests. Instead of having multiple fixtures with compatible outp...
70,673,970
I have the following table consisting of one column with same feature names, but different values: [![enter image description here](https://i.stack.imgur.com/erFBS.png)](https://i.stack.imgur.com/erFBS.png) and I would like to convert it into multiple columns data frame driven by feature names- like that: [![enter i...
2022/01/11
[ "https://Stackoverflow.com/questions/70673970", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13726983/" ]
You can try to use [`emitAll`](https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.flow/emit-all.html) function for your case: ``` fun myFunction1(): Flow<String> = flow { /*some code*/ emitAll(myFunction2()) } fun myFunction2(): Flow<String> = flow { /*some code*/ e...
Unless you have a very specific reason the functions returning a `Flow` from your repo shouldn't be suspending (As the `flow{}` builder isn't suspending). Since the suspending operation is collecting (waiting for values to come out of it). From the code you've provided you're looking for the `flatMapLatest` function. ...
42,386
I've used [ScreenFlow](https://www.telestream.net/screenflow/overview.htm?__c=1) on a Mac for many years. As a software developer it is useful to record my screen. Then immediately drop into a simple video editor. I typically cut video, freeze frames, add text, add images and sometimes remove audio. I don't think I'm...
2017/05/17
[ "https://softwarerecs.stackexchange.com/questions/42386", "https://softwarerecs.stackexchange.com", "https://softwarerecs.stackexchange.com/users/12470/" ]
**Screenrecording: Kazam** Kazam is pretty easy to handle but quite powerful for a simple screen recorder. You can record a single Window, the whole Screen or a predefined area. You can set a timer when the Recording should start. The best thing: It just works! It does not come with any video editing. **Simple Video...
For recording on my Linux desktops I use gtkRecordMyDesktop. Saves in Ogg format. For editing, I've only used old versions of Premier with Wine (way old, like version 5.0 from 2000-ish) and I've played with kdenlive but not in many moons.
229,112
What implementations of the [Prototype](http://en.wikipedia.org/wiki/Prototype_pattern) Pattern exist on the Java platform? > > A prototype pattern is a creational design pattern used in software development when the type of objects to create is determined by a prototypical instance, which is cloned to produce new ob...
2008/10/23
[ "https://Stackoverflow.com/questions/229112", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3366/" ]
According to Josh Bloch and Doug Lea, [Cloneable is broken](http://www.artima.com/intv/bloch13.html). In that case, you can use a [copy constructor](http://www.javapractices.com/topic/TopicAction.do?Id=12).
Java defines the [Cloneable](http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Cloneable.html) interface, described here at [JGuru](http://www.jguru.com/faq/view.jsp?EID=255004) > > Java provides a simple interface named Cloneable that provides an implementation of the Prototype pattern. If you have an object that is...
229,112
What implementations of the [Prototype](http://en.wikipedia.org/wiki/Prototype_pattern) Pattern exist on the Java platform? > > A prototype pattern is a creational design pattern used in software development when the type of objects to create is determined by a prototypical instance, which is cloned to produce new ob...
2008/10/23
[ "https://Stackoverflow.com/questions/229112", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3366/" ]
According to Josh Bloch and Doug Lea, [Cloneable is broken](http://www.artima.com/intv/bloch13.html). In that case, you can use a [copy constructor](http://www.javapractices.com/topic/TopicAction.do?Id=12).
[Steve Yegge](http://steve-yegge.blogspot.com/2008/10/universal-design-pattern.html) describes the [Eclipse](http://www.eclipse.org/) implementation of the [ASTNode](http://publib.boulder.ibm.com/infocenter/rsdhelp/v7r0m0/index.jsp?topic=/org.eclipse.jdt.doc.isv/reference/api/org/eclipse/jdt/core/dom/package-summary.ht...
35,616,756
I'm trying to exit using the words that are in exit, I am trying to do a program were you can input an integer or a string and if num is in exit it will exit the program. ``` loop = True status = True exit = set(["exit","leave"]) while loop: while status: print ("Any of these commands will quit the porgram...
2016/02/25
[ "https://Stackoverflow.com/questions/35616756", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5977669/" ]
Your indentation is wrong. You are looping and collecting input, but not running your `if` statements. Try this instead: ``` while loop: while status: print ("Any of these commands will quit the porgram",exit) num = input("Pick a number: ") # Note extra indents below here if 1 == 2:...
You didn't put your test within the `while status:` loop. You just need to indent those lines: ``` loop = True status = True exit = set(["exit","leave"]) while loop: while status: print ("Any of these commands will quit the porgram",exit) num = input("Pick a number: ") if 1 == 2: ...
35,616,756
I'm trying to exit using the words that are in exit, I am trying to do a program were you can input an integer or a string and if num is in exit it will exit the program. ``` loop = True status = True exit = set(["exit","leave"]) while loop: while status: print ("Any of these commands will quit the porgram...
2016/02/25
[ "https://Stackoverflow.com/questions/35616756", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5977669/" ]
I think the program is correct and all you need is proper indentation, so that the conditional clauses are within the "while status" look and can essentially change the value of status to help it exit the loop (actually, I am wondering why you need two loops with one embedded into another). ``` loop = True status = Tr...
You didn't put your test within the `while status:` loop. You just need to indent those lines: ``` loop = True status = True exit = set(["exit","leave"]) while loop: while status: print ("Any of these commands will quit the porgram",exit) num = input("Pick a number: ") if 1 == 2: ...
23,929,655
I'm putting together a sql script. Basically half way through the script I want to check a table for the existance of any rows based on an EventID number. In theory there shouldn't be any results returned but if there is I want to quit the remainder of the script and perhaps display an error message. Any help / sugges...
2014/05/29
[ "https://Stackoverflow.com/questions/23929655", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2841861/" ]
``` select planid, production_nr from information inf1 where not exists (select 1 from information inf2 where inf1.planid = inf2.planid and status < 3) ``` You might consider amending the select clause (first row) according to your needs: * Add distinct (if the table PK includes...
Try this, ``` SELECT planid , production_nr FROM information WHERE production_nr IN(SELECT production_nr FROM information) AND STATUS >=3 ```
23,929,655
I'm putting together a sql script. Basically half way through the script I want to check a table for the existance of any rows based on an EventID number. In theory there shouldn't be any results returned but if there is I want to quit the remainder of the script and perhaps display an error message. Any help / sugges...
2014/05/29
[ "https://Stackoverflow.com/questions/23929655", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2841861/" ]
``` select planid, production_nr from information inf1 where not exists (select 1 from information inf2 where inf1.planid = inf2.planid and status < 3) ``` You might consider amending the select clause (first row) according to your needs: * Add distinct (if the table PK includes...
Your problem is known as relational division. There are basically two ways to approach it 1) planid where it does not exist a production\_nr with status < 3 ``` select planid from information i1 where not exists ( select 1 from information i2 where i1.planid = i2.planid and i2.planid < 3 ) ``` 2) pl...
69,288,275
I've written a user defined function to calculate the RMSE for the predicted results from my model, the function code is this: ``` def rmse(result): forecast = result.forecast(point) t = test['X'] y = forecast mse=np.mean((t-y)**2) return np.sqrt(mse) ``` `point` is just the test-train split index number that...
2021/09/22
[ "https://Stackoverflow.com/questions/69288275", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16918192/" ]
As Mustafa Aydin pointed out above in the comments, the indexing was the reason behind the issue, once that was fixed, the function properly returned the RMSE values.
Simply replace: ``` np.mean((t-y)**2) ``` with: ``` np.mean((t.values-y.values)**2) ``` Assuming `t` and `y` are both pandas series.
7,003,314
I'm trying to replicate a spinner control (please don't ask why) I'm struggling with the divider. The fake spinner looks fine until I add the divider to the left of the imageview. Once I add the divider it's height fills the remaining portion of the screen. Can someone please explain this? The following xml: ....... ...
2011/08/09
[ "https://Stackoverflow.com/questions/7003314", "https://Stackoverflow.com", "https://Stackoverflow.com/users/806821/" ]
You should use a nine-patch image for this instead of using multiple views. That's what the default Spinner does. I don't know why you want to create a new spinner, but if you're keeping the visuals the same you can just reuse the built-in images. `android.R.layout.simple_spinner_item` is a TextView layout you could r...
You have the height set to fill parent which fills the remainder of the Relative Layout. Have you tried putting the View inside the button or imageview as follows: ``` <Button android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_alignParentRight="tr...
3,227,537
By intuition, I found that the result of evaluating the following expression $$ \frac{1}{M} \frac{\sum\_{N=0}^M \frac{M!}{(M-N)!N!} N e^{cN}}{\sum\_{N=0}^M \frac{M!}{(M-N)!N!} e^{cN}} $$ does not depend on the positive value of the integer $M$, i.e. it only depends on $c\in\mathbb R$. I corroborated this with the h...
2019/05/15
[ "https://math.stackexchange.com/questions/3227537", "https://math.stackexchange.com", "https://math.stackexchange.com/users/225568/" ]
By the [Binomial Theorem](https://en.wikipedia.org/wiki/Binomial_theorem), the denominator is $(e^c+1)^M$. The numerator can also be manipulated to apply the Binomial Theorem: \begin{align\*} \sum\_{N=0}^M \frac{M!}{(M-N)!N!} Ne^{cN} &= \sum\_{N=1}^M \frac{M\cdot (M-1)!}{((M-1)-(N-1))!(N-1)!}e^{c(N-1)}\cdot e^c\\ &=Me^...
By the binomial theorem we have \begin{eqnarray\*} \sum\_{N=0}^{M} \binom{M}{N} x^N =(1+x)^M. \end{eqnarray\*} Differentiate this and we have \begin{eqnarray\*} \frac{d}{dx} \sum\_{N=0}^{M} \binom{M}{N} x^N =\sum\_{N=0}^{M} \binom{M}{N}N x^{N-1} =M (1+x)^{M-1}. \end{eqnarray\*} So your expression becomes \begin{eqnarra...
3,227,537
By intuition, I found that the result of evaluating the following expression $$ \frac{1}{M} \frac{\sum\_{N=0}^M \frac{M!}{(M-N)!N!} N e^{cN}}{\sum\_{N=0}^M \frac{M!}{(M-N)!N!} e^{cN}} $$ does not depend on the positive value of the integer $M$, i.e. it only depends on $c\in\mathbb R$. I corroborated this with the h...
2019/05/15
[ "https://math.stackexchange.com/questions/3227537", "https://math.stackexchange.com", "https://math.stackexchange.com/users/225568/" ]
By the [Binomial Theorem](https://en.wikipedia.org/wiki/Binomial_theorem), the denominator is $(e^c+1)^M$. The numerator can also be manipulated to apply the Binomial Theorem: \begin{align\*} \sum\_{N=0}^M \frac{M!}{(M-N)!N!} Ne^{cN} &= \sum\_{N=1}^M \frac{M\cdot (M-1)!}{((M-1)-(N-1))!(N-1)!}e^{c(N-1)}\cdot e^c\\ &=Me^...
Let $\phi(c) = \Bbb E[e^{cZ}]$ denote the moment generating function of a standard bernoilli(1/2) random variable $Z$ taking values in $\{0,1\}$. Since the sum of $M$ independent copies gives the binomial distribution, the quantity in question is simply $$\frac1M \frac{\partial\_c (\phi(c)^M)}{\phi(c)^M} = \frac1M \fra...
4,959,634
How can I delay a CSS change in jquery? Here is my code: ``` $("document").ready(function() { $(".pressimage img").mouseenter(function() { $jq(this).css('z-index','1000'); }); $(".pressimage img").mouseleave(1000,function() { $jq(this).css('z-index','1'); }); }); ``` ...
2011/02/10
[ "https://Stackoverflow.com/questions/4959634", "https://Stackoverflow.com", "https://Stackoverflow.com/users/467875/" ]
Delay only works on items in the queue so you need to add your css change to the queue for the delay to work. Then dequeue. The following code illustrates this: ``` $('.pressimage img') .delay(1000) .queue(function(){ $(this).css({'z-index','1'}); $(this).dequeue(); }); ```
<http://forum.jquery.com/topic/delay-css> tested and working for my purpose of delaying a css property following an animate.
4,959,634
How can I delay a CSS change in jquery? Here is my code: ``` $("document").ready(function() { $(".pressimage img").mouseenter(function() { $jq(this).css('z-index','1000'); }); $(".pressimage img").mouseleave(1000,function() { $jq(this).css('z-index','1'); }); }); ``` ...
2011/02/10
[ "https://Stackoverflow.com/questions/4959634", "https://Stackoverflow.com", "https://Stackoverflow.com/users/467875/" ]
Note that sanon's solution above is more natural than this one because it uses jQuery's `.queue` method instead of abusing `.animate` for the same purpose. Original answer below: --- setTimeout is the most natural way to go, but if you want to stay in your jQuery function chain, you can use an animate function with...
You can do this with setTimeout(); ``` $("document").ready(function() { var timer; $(".pressimage img").mouseenter(function() { $jq(this).css('z-index','1000'); clearTimeout(timer); }); $(".pressimage img").mouseleave(1000,function() { timer = setTimeout(function(){ ...
4,959,634
How can I delay a CSS change in jquery? Here is my code: ``` $("document").ready(function() { $(".pressimage img").mouseenter(function() { $jq(this).css('z-index','1000'); }); $(".pressimage img").mouseleave(1000,function() { $jq(this).css('z-index','1'); }); }); ``` ...
2011/02/10
[ "https://Stackoverflow.com/questions/4959634", "https://Stackoverflow.com", "https://Stackoverflow.com/users/467875/" ]
Note that sanon's solution above is more natural than this one because it uses jQuery's `.queue` method instead of abusing `.animate` for the same purpose. Original answer below: --- setTimeout is the most natural way to go, but if you want to stay in your jQuery function chain, you can use an animate function with...
<http://jsfiddle.net/loktar/yK5ga/> Check that one out what I am doing is assigning the timeout to a variable and then clearing it on mouseover, so it wont fire if you do a mouse over quickly. ``` $("document").ready(function() { var imgTimeout; $("img").hover( function() { clearTimeout(i...
4,959,634
How can I delay a CSS change in jquery? Here is my code: ``` $("document").ready(function() { $(".pressimage img").mouseenter(function() { $jq(this).css('z-index','1000'); }); $(".pressimage img").mouseleave(1000,function() { $jq(this).css('z-index','1'); }); }); ``` ...
2011/02/10
[ "https://Stackoverflow.com/questions/4959634", "https://Stackoverflow.com", "https://Stackoverflow.com/users/467875/" ]
Try this: ``` $(".pressimage img").mouseleave( function(){ var that = this; setTimeout( function(){ $(that).css('z-index','1'); },500); }); ```
Delay only works on items in the queue so you need to add your css change to the queue for the delay to work. Then dequeue. The following code illustrates this: ``` $('.pressimage img') .delay(1000) .queue(function(){ $(this).css({'z-index','1'}); $(this).dequeue(); }); ```
4,959,634
How can I delay a CSS change in jquery? Here is my code: ``` $("document").ready(function() { $(".pressimage img").mouseenter(function() { $jq(this).css('z-index','1000'); }); $(".pressimage img").mouseleave(1000,function() { $jq(this).css('z-index','1'); }); }); ``` ...
2011/02/10
[ "https://Stackoverflow.com/questions/4959634", "https://Stackoverflow.com", "https://Stackoverflow.com/users/467875/" ]
You can do this with setTimeout(); ``` $("document").ready(function() { var timer; $(".pressimage img").mouseenter(function() { $jq(this).css('z-index','1000'); clearTimeout(timer); }); $(".pressimage img").mouseleave(1000,function() { timer = setTimeout(function(){ ...
<http://forum.jquery.com/topic/delay-css> tested and working for my purpose of delaying a css property following an animate.
4,959,634
How can I delay a CSS change in jquery? Here is my code: ``` $("document").ready(function() { $(".pressimage img").mouseenter(function() { $jq(this).css('z-index','1000'); }); $(".pressimage img").mouseleave(1000,function() { $jq(this).css('z-index','1'); }); }); ``` ...
2011/02/10
[ "https://Stackoverflow.com/questions/4959634", "https://Stackoverflow.com", "https://Stackoverflow.com/users/467875/" ]
Try this: ``` $(".pressimage img").mouseleave( function(){ var that = this; setTimeout( function(){ $(that).css('z-index','1'); },500); }); ```
You can do this with setTimeout(); ``` $("document").ready(function() { var timer; $(".pressimage img").mouseenter(function() { $jq(this).css('z-index','1000'); clearTimeout(timer); }); $(".pressimage img").mouseleave(1000,function() { timer = setTimeout(function(){ ...
4,959,634
How can I delay a CSS change in jquery? Here is my code: ``` $("document").ready(function() { $(".pressimage img").mouseenter(function() { $jq(this).css('z-index','1000'); }); $(".pressimage img").mouseleave(1000,function() { $jq(this).css('z-index','1'); }); }); ``` ...
2011/02/10
[ "https://Stackoverflow.com/questions/4959634", "https://Stackoverflow.com", "https://Stackoverflow.com/users/467875/" ]
Delay only works on items in the queue so you need to add your css change to the queue for the delay to work. Then dequeue. The following code illustrates this: ``` $('.pressimage img') .delay(1000) .queue(function(){ $(this).css({'z-index','1'}); $(this).dequeue(); }); ```
<http://jsfiddle.net/loktar/yK5ga/> Check that one out what I am doing is assigning the timeout to a variable and then clearing it on mouseover, so it wont fire if you do a mouse over quickly. ``` $("document").ready(function() { var imgTimeout; $("img").hover( function() { clearTimeout(i...
4,959,634
How can I delay a CSS change in jquery? Here is my code: ``` $("document").ready(function() { $(".pressimage img").mouseenter(function() { $jq(this).css('z-index','1000'); }); $(".pressimage img").mouseleave(1000,function() { $jq(this).css('z-index','1'); }); }); ``` ...
2011/02/10
[ "https://Stackoverflow.com/questions/4959634", "https://Stackoverflow.com", "https://Stackoverflow.com/users/467875/" ]
Delay only works on items in the queue so you need to add your css change to the queue for the delay to work. Then dequeue. The following code illustrates this: ``` $('.pressimage img') .delay(1000) .queue(function(){ $(this).css({'z-index','1'}); $(this).dequeue(); }); ```
Note that sanon's solution above is more natural than this one because it uses jQuery's `.queue` method instead of abusing `.animate` for the same purpose. Original answer below: --- setTimeout is the most natural way to go, but if you want to stay in your jQuery function chain, you can use an animate function with...
4,959,634
How can I delay a CSS change in jquery? Here is my code: ``` $("document").ready(function() { $(".pressimage img").mouseenter(function() { $jq(this).css('z-index','1000'); }); $(".pressimage img").mouseleave(1000,function() { $jq(this).css('z-index','1'); }); }); ``` ...
2011/02/10
[ "https://Stackoverflow.com/questions/4959634", "https://Stackoverflow.com", "https://Stackoverflow.com/users/467875/" ]
Try this: ``` $(".pressimage img").mouseleave( function(){ var that = this; setTimeout( function(){ $(that).css('z-index','1'); },500); }); ```
Note that sanon's solution above is more natural than this one because it uses jQuery's `.queue` method instead of abusing `.animate` for the same purpose. Original answer below: --- setTimeout is the most natural way to go, but if you want to stay in your jQuery function chain, you can use an animate function with...
4,959,634
How can I delay a CSS change in jquery? Here is my code: ``` $("document").ready(function() { $(".pressimage img").mouseenter(function() { $jq(this).css('z-index','1000'); }); $(".pressimage img").mouseleave(1000,function() { $jq(this).css('z-index','1'); }); }); ``` ...
2011/02/10
[ "https://Stackoverflow.com/questions/4959634", "https://Stackoverflow.com", "https://Stackoverflow.com/users/467875/" ]
Note that sanon's solution above is more natural than this one because it uses jQuery's `.queue` method instead of abusing `.animate` for the same purpose. Original answer below: --- setTimeout is the most natural way to go, but if you want to stay in your jQuery function chain, you can use an animate function with...
Try the following. ``` jQuery.fn.extend({ qcss: function(map){ $(this).queue(function(next){ $(this).css(map); next(); }); return this; } }); ```
227,038
I have found out how to label using multiple attributes via an expression and python. What I have is as follows: ``` [ID] + '\n' + [Notes] ``` An ID example is "MH108" and a notes example is "buried, no access". I have used similar code successfully in the past, but in the current situation I get the following error...
2017/02/03
[ "https://gis.stackexchange.com/questions/227038", "https://gis.stackexchange.com", "https://gis.stackexchange.com/users/8718/" ]
It looks like one of your field values isn't a string already (the `[ID]` field is possibly a number, or one of the fields contains a `NULL`), so using `+` to concatenate them may not work. Use python string formatting to get around concatenating numbers and strings: ``` "{0}\n{1}".format([ID], [Notes]) ```
That error is saying one or more of your field types is neither a string nor a buffer. You can check your field types or try: ``` str([ID]) + '\n' + str([Notes]) ``` My guess is it's the ID as Notes are usually strings.
103,691
I have an EF-EOS-M speedbooster for my M50. I just got a great deal on a FD 135mm 2.5 lens, and was wondering if I can put it together with an FD-EF adapter and the speedbooster. There doesn't seem to be much flange distance on the FD adapter.
2018/12/20
[ "https://photo.stackexchange.com/questions/103691", "https://photo.stackexchange.com", "https://photo.stackexchange.com/users/80775/" ]
Does your FD-to-EF adapter have a glass element? If so, then yes, you *can* do it, but the results will be fairly poor, IMO. If your FD-to-EF adapter doesn't have a glass element, then your proposed combination will cause you to not be able to focus to infinity. This is because the flange focal distance of the FD moun...
You probably can do it, but stacking adapters increases the possibility of manufacturing inaccuracy causing focus issues (either focusing past infinity, if the adapter combination's too thin, or not focusing to infinity if the combination's too thick. The main thing to keep in mind, however, is that **you will lose al...
45,858,055
I am relatively new to C# and i have come across this error while working on a project to spin a VM (and support resources in MS Azure). The code I am using is the one below: ``` using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using Microsoft.Azure...
2017/08/24
[ "https://Stackoverflow.com/questions/45858055", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7436123/" ]
Like luxun said, you have to define the environment variable. For that open the cmd (on windows) and write: > > set AZURE\_AUTH\_LOCATION > > > this will show the environment variable "AZURE\_AUTH\_LOCATION". If the result is "Environment variable AZURE\_AUTH\_LOCATION not defined" or if the path is wrong then wr...
`Environment.GetEnvironmentVariable("AZURE_AUTH_LOCATION")` must be returning null. If this is the case you may want to check if that environment variable has actually been defined or whether the file exists. Define a variable like: ``` var location = Environment.GetEnvironmentVariable("AZURE_AUTH_LOCATION"); ``...
45,858,055
I am relatively new to C# and i have come across this error while working on a project to spin a VM (and support resources in MS Azure). The code I am using is the one below: ``` using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using Microsoft.Azure...
2017/08/24
[ "https://Stackoverflow.com/questions/45858055", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7436123/" ]
Like luxun said, you have to define the environment variable. For that open the cmd (on windows) and write: > > set AZURE\_AUTH\_LOCATION > > > this will show the environment variable "AZURE\_AUTH\_LOCATION". If the result is "Environment variable AZURE\_AUTH\_LOCATION not defined" or if the path is wrong then wr...
Many thanks for your suggestions. in the end the error was generated by a school-boy mistake in setting the Env Variable in the first place (relative path contained an error I didn't spot earlier). I was able to run it in the end. Made a change to define the path in the config file instead too. thanks
20,778,246
I the following PHP code: ``` echo "<img src='../images/edit.png' onclick='showEditDiv(" . json_encode($row) . ");'>"; ``` Here is the HTML result: ``` <img src='../images/edit.png' onclick='showEditDiv({"ID":"2","NAME":"John Smith","EMAIL":"johnsmith@domain.com"});'> ``` And here is the Javascript code: ``` fun...
2013/12/26
[ "https://Stackoverflow.com/questions/20778246", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3103650/" ]
You aren't passing JSON to the function (JSON would be a string, hence ending/beginning with quotes). What you're passing is a JavaScript object literal. See the difference: ### Object literal ``` {"ID":"2","NAME":"John Smith","EMAIL":"johnsmith@domain.com"} ``` ### JSON string ``` "{\"ID\":\"2\",\"NAME\":\"John S...
> > All I want is to pass an array to JS function > > > That's an object in JS, not an array. (PHP nomenclature is a bit weird.) And you have successfully passed it. However, when you convert an object into a string (which is what `alert` has to do), it shows up as `[object Object]`. If you want the string represe...
20,778,246
I the following PHP code: ``` echo "<img src='../images/edit.png' onclick='showEditDiv(" . json_encode($row) . ");'>"; ``` Here is the HTML result: ``` <img src='../images/edit.png' onclick='showEditDiv({"ID":"2","NAME":"John Smith","EMAIL":"johnsmith@domain.com"});'> ``` And here is the Javascript code: ``` fun...
2013/12/26
[ "https://Stackoverflow.com/questions/20778246", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3103650/" ]
You aren't passing JSON to the function (JSON would be a string, hence ending/beginning with quotes). What you're passing is a JavaScript object literal. See the difference: ### Object literal ``` {"ID":"2","NAME":"John Smith","EMAIL":"johnsmith@domain.com"} ``` ### JSON string ``` "{\"ID\":\"2\",\"NAME\":\"John S...
JSON is a subset of Javascript. Which means that if used appropriately it is valid javascript as well. In this case you are effectively putting through an object, which is also what your alert has told you. The JSON.parse should then error. If you want to pass an array you have to change your data source. (Although f...
20,778,246
I the following PHP code: ``` echo "<img src='../images/edit.png' onclick='showEditDiv(" . json_encode($row) . ");'>"; ``` Here is the HTML result: ``` <img src='../images/edit.png' onclick='showEditDiv({"ID":"2","NAME":"John Smith","EMAIL":"johnsmith@domain.com"});'> ``` And here is the Javascript code: ``` fun...
2013/12/26
[ "https://Stackoverflow.com/questions/20778246", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3103650/" ]
You aren't passing JSON to the function (JSON would be a string, hence ending/beginning with quotes). What you're passing is a JavaScript object literal. See the difference: ### Object literal ``` {"ID":"2","NAME":"John Smith","EMAIL":"johnsmith@domain.com"} ``` ### JSON string ``` "{\"ID\":\"2\",\"NAME\":\"John S...
``` {"ID":"2","NAME":"John Smith","EMAIL":"johnsmith@domain.com"} is already a json. ``` That's why your `alert` is `[object Object]`. Also It's not an array for loop. You can get it's data by this way: ``` function showEditDiv(data) { alert(data); alert(data.ID); alert(data.NAME); // etc.. } ``` If you wan...
20,778,246
I the following PHP code: ``` echo "<img src='../images/edit.png' onclick='showEditDiv(" . json_encode($row) . ");'>"; ``` Here is the HTML result: ``` <img src='../images/edit.png' onclick='showEditDiv({"ID":"2","NAME":"John Smith","EMAIL":"johnsmith@domain.com"});'> ``` And here is the Javascript code: ``` fun...
2013/12/26
[ "https://Stackoverflow.com/questions/20778246", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3103650/" ]
> > All I want is to pass an array to JS function > > > That's an object in JS, not an array. (PHP nomenclature is a bit weird.) And you have successfully passed it. However, when you convert an object into a string (which is what `alert` has to do), it shows up as `[object Object]`. If you want the string represe...
JSON is a subset of Javascript. Which means that if used appropriately it is valid javascript as well. In this case you are effectively putting through an object, which is also what your alert has told you. The JSON.parse should then error. If you want to pass an array you have to change your data source. (Although f...
20,778,246
I the following PHP code: ``` echo "<img src='../images/edit.png' onclick='showEditDiv(" . json_encode($row) . ");'>"; ``` Here is the HTML result: ``` <img src='../images/edit.png' onclick='showEditDiv({"ID":"2","NAME":"John Smith","EMAIL":"johnsmith@domain.com"});'> ``` And here is the Javascript code: ``` fun...
2013/12/26
[ "https://Stackoverflow.com/questions/20778246", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3103650/" ]
> > All I want is to pass an array to JS function > > > That's an object in JS, not an array. (PHP nomenclature is a bit weird.) And you have successfully passed it. However, when you convert an object into a string (which is what `alert` has to do), it shows up as `[object Object]`. If you want the string represe...
``` {"ID":"2","NAME":"John Smith","EMAIL":"johnsmith@domain.com"} is already a json. ``` That's why your `alert` is `[object Object]`. Also It's not an array for loop. You can get it's data by this way: ``` function showEditDiv(data) { alert(data); alert(data.ID); alert(data.NAME); // etc.. } ``` If you wan...
26,309,193
I need help...while creating a database I kept running into this error: ``` ERROR 1452 (23000): Cannot add or update a child row: a foreign key constraint fails (`accident_db`.`participated`, CONSTRAINT `participated_ibfk_2` FOREIGN KEY (`license`) REFERENCES `car` (`license`)) ``` The problem come in hand when I tr...
2014/10/10
[ "https://Stackoverflow.com/questions/26309193", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4131058/" ]
Pay attention to your error messages. ``` insert into person values('DRIVER001','John Smith','Tech, TN'); ``` You inserted 'DRIVER001'. ``` insert into participated values('DRIVER002','AR2197','CCDD3000','1500'); ``` But this row tries to reference 'DRIVER002'. Fixing this will lead you to *another* FK error, tho...
I hope you know how the primary key and foreign key works. If you want to insert a data to a particalar field which is a foreign key, it'll lookup for the same data in its reference table's primary key field. If it matches, it'll add. If it doesn't match, the error will occur as you stated. Like Mike Sherrill said, you...
52,270,871
I'm trying to print my collection sorted alphabeticall. Here's what I've tried inside my controller: ``` public function listForCategories(Category $category) { return $category->subcategories->sortBy('title'); } ``` But It's not sorting my output :/ Please help!
2018/09/11
[ "https://Stackoverflow.com/questions/52270871", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9542556/" ]
try `return $category->subcategories->orderBy('title');`
The `sortBy` method sorts the internal fields, however, it preserves the original keys, therefore, if you want to have the sorted values, you should call the `values()` method after you've sorted the collection. That way you get the sorted collection back. `return $category->subcategories->sortBy('title')->values()->...
52,270,871
I'm trying to print my collection sorted alphabeticall. Here's what I've tried inside my controller: ``` public function listForCategories(Category $category) { return $category->subcategories->sortBy('title'); } ``` But It's not sorting my output :/ Please help!
2018/09/11
[ "https://Stackoverflow.com/questions/52270871", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9542556/" ]
try `return $category->subcategories->orderBy('title');`
Try using orderBy when you retrieve them from the database (I'm assuming you do) ``` public function listForCategories(Category $category) { return $category->subcategories()->orderBy('title')->get(); } ```
52,270,871
I'm trying to print my collection sorted alphabeticall. Here's what I've tried inside my controller: ``` public function listForCategories(Category $category) { return $category->subcategories->sortBy('title'); } ``` But It's not sorting my output :/ Please help!
2018/09/11
[ "https://Stackoverflow.com/questions/52270871", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9542556/" ]
$category->subcategories->sortBy('title')->values()->all(); I don't know exact hierarchy but you can use the solution as per your needs: The sortBy method sorts the collection by the given key. The sorted collection keeps the original array keys, so in this example, we'll use the values method to reset the keys to ...
try `return $category->subcategories->orderBy('title');`
52,270,871
I'm trying to print my collection sorted alphabeticall. Here's what I've tried inside my controller: ``` public function listForCategories(Category $category) { return $category->subcategories->sortBy('title'); } ``` But It's not sorting my output :/ Please help!
2018/09/11
[ "https://Stackoverflow.com/questions/52270871", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9542556/" ]
$category->subcategories->sortBy('title')->values()->all(); I don't know exact hierarchy but you can use the solution as per your needs: The sortBy method sorts the collection by the given key. The sorted collection keeps the original array keys, so in this example, we'll use the values method to reset the keys to ...
The `sortBy` method sorts the internal fields, however, it preserves the original keys, therefore, if you want to have the sorted values, you should call the `values()` method after you've sorted the collection. That way you get the sorted collection back. `return $category->subcategories->sortBy('title')->values()->...
52,270,871
I'm trying to print my collection sorted alphabeticall. Here's what I've tried inside my controller: ``` public function listForCategories(Category $category) { return $category->subcategories->sortBy('title'); } ``` But It's not sorting my output :/ Please help!
2018/09/11
[ "https://Stackoverflow.com/questions/52270871", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9542556/" ]
$category->subcategories->sortBy('title')->values()->all(); I don't know exact hierarchy but you can use the solution as per your needs: The sortBy method sorts the collection by the given key. The sorted collection keeps the original array keys, so in this example, we'll use the values method to reset the keys to ...
Try using orderBy when you retrieve them from the database (I'm assuming you do) ``` public function listForCategories(Category $category) { return $category->subcategories()->orderBy('title')->get(); } ```
1,586,803
Let $A$ be an $n\times n$ matrix over $\mathbb{C}$ such that every nonzero vector of $\mathbb{C}^n$ is an eigenvector of $A$. Then which of the following hold? 1. All eigenvalues of $A$ are equal. 2. All eigenvalues of $A$ are distinct. 3. $A=\lambda I$ for some $\lambda \in \mathbb{C}$, where $I$ is the $n\times n$ i...
2015/12/23
[ "https://math.stackexchange.com/questions/1586803", "https://math.stackexchange.com", "https://math.stackexchange.com/users/294692/" ]
The inequality $|\sin(x)|\leq 1$ is only true for real values of $x$. In fact, $\sin$ is unbounded when considered as a complex function. Note that we have $$ \sin(z)=\frac{e^{iz}-e^{-iz}}{2i} $$ so $\sin$ grows unbounded along the imaginary axis.
The function $\sin$ [**isn't** bounded in $\Bbb C$](https://math.stackexchange.com/questions/564382/complex-sine-not-bounded).
632,664
I have a collection of datapoints, each with different and known errors. I then fitted a line of best fit for the data and calculated its gradient. How can I use these to calculate the error in the gradient for the fitted slope? My intuition told me that since the datapoints each make an equal contribution to the over...
2021/04/28
[ "https://physics.stackexchange.com/questions/632664", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/222769/" ]
It's a common **misconception** that the contribution of every datapoint is the same. It's simply not true. That's why we look at things like the "leverage of a fit" or "cook's distance". There are mathematical formulas how to write the standard deviation of the fit parameters. These formulas are not complicated and y...
take the max of all points , do the best fit, then take the min of all points, do the best fit. Now you have 3 slopes, the measured, the max and the min. The max and min slopes are the errors of the measured slope
632,664
I have a collection of datapoints, each with different and known errors. I then fitted a line of best fit for the data and calculated its gradient. How can I use these to calculate the error in the gradient for the fitted slope? My intuition told me that since the datapoints each make an equal contribution to the over...
2021/04/28
[ "https://physics.stackexchange.com/questions/632664", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/222769/" ]
For a two parameter (linear) fit of a data set $(x\_i, y\_i, \sigma\_i)$: $$ y = m x + b $$ you compute the total chi-squared: $$ \chi^2(m, b)= \sum\_i{\frac{[y\_i - (mx\_i +b)]^2}{\sigma\_i^2}}$$ The best fit parameters, $(\bar m,\bar b)$, minimize chi-squared: $$ \chi^2\_{min} = \chi^2(\bar m, \bar b)$$ From th...
take the max of all points , do the best fit, then take the min of all points, do the best fit. Now you have 3 slopes, the measured, the max and the min. The max and min slopes are the errors of the measured slope
270,221
Hello Good Day to All I have Attribute "Malakas","Mahina","Payat" On a Product Page it will Show ``` Malakas --Choose an Option-- Mahina --Choose an Option-- Payat --Choose an Option-- ``` Is this a way to change the Postiton of Super Attribute so the Attribute "Payat" will be first ?? ``` Payat --Choose an Opti...
2019/04/16
[ "https://magento.stackexchange.com/questions/270221", "https://magento.stackexchange.com", "https://magento.stackexchange.com/users/39274/" ]
I check the magento collection.php thank you @magefms ``` /** * Set order collection by Position * * @param string $dir * @return Mage_Catalog_Model_Resource_Product_Type_Configurable_Attribute_Collection */ public function orderByPosition($dir = self::SORT_ORDER_ASC) { $t...
Try this fix: Copy the file ``` app/code/core/Mage/Catalog/Model/Resource/Product/Type/Configurable/Attribute/Collection.php ``` to local folder ``` app/code/local/Mage/Catalog/Model/Resource/Product/Type/Configurable/Attribute/Collection.php ``` > > Please add the following code in line 305 > > > ``` ...
42,952,318
Hi I'm trying to figure out the way I can access elements in div using ones class. ``` <div class='hs_terms_conditions field hs-form-field> <label class placeholder='Enter your name'> </label> <div class='input'> <ul class='input-list'> <li class='checkbox> </li> </ul> </div> </div> ``` My question i...
2017/03/22
[ "https://Stackoverflow.com/questions/42952318", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
Use ">": ``` .hs_terms_conditions > .input > .input-list > .checkbox { /*some style*/ } ``` If you use `.class1.class2.class3` it will match an element which belongs to all the classes. You could also use `.hs_terms_conditions .input .input-list .checkbox`.
You can access to `.checkbox` with parent access selector : ``` .hs_terms_conditions > .input > .input-list > .checkbox{ /*some style*/ } ```
3,032
I'm looking for a way of adding tone marks above characters. It's fairly easy to add Pinyin with tone marks, but I want to add only tone marks. I want to use this as a teaching tool, because even though most students don't have a big problem with the syllables, they do need to focus more on tones. Thus, adding the tone...
2013/04/16
[ "https://chinese.stackexchange.com/questions/3032", "https://chinese.stackexchange.com", "https://chinese.stackexchange.com/users/507/" ]
I'm not quite sure what your question actually is. Do you want to know how: 1. to better teach Chinese tones? (cram specific tone recall quizzes) 2. to automate adding pinyin with diacritical marks to your text? (google, find e.g. [annotator.jiang-long.com](http://annotator.jiang-long.com)) 3. to use Ruby annotations ...
I have written some software that does, this <https://code.google.com/p/tghz-word-tone-annotator/> . It is however a Microsoft word add-in.
3,032
I'm looking for a way of adding tone marks above characters. It's fairly easy to add Pinyin with tone marks, but I want to add only tone marks. I want to use this as a teaching tool, because even though most students don't have a big problem with the syllables, they do need to focus more on tones. Thus, adding the tone...
2013/04/16
[ "https://chinese.stackexchange.com/questions/3032", "https://chinese.stackexchange.com", "https://chinese.stackexchange.com/users/507/" ]
I'm not quite sure what your question actually is. Do you want to know how: 1. to better teach Chinese tones? (cram specific tone recall quizzes) 2. to automate adding pinyin with diacritical marks to your text? (google, find e.g. [annotator.jiang-long.com](http://annotator.jiang-long.com)) 3. to use Ruby annotations ...
Check <https://www.purpleculture.net/chinese-pinyin-converter/>, this tool can add tone numbers only
3,032
I'm looking for a way of adding tone marks above characters. It's fairly easy to add Pinyin with tone marks, but I want to add only tone marks. I want to use this as a teaching tool, because even though most students don't have a big problem with the syllables, they do need to focus more on tones. Thus, adding the tone...
2013/04/16
[ "https://chinese.stackexchange.com/questions/3032", "https://chinese.stackexchange.com", "https://chinese.stackexchange.com/users/507/" ]
I'm not quite sure what your question actually is. Do you want to know how: 1. to better teach Chinese tones? (cram specific tone recall quizzes) 2. to automate adding pinyin with diacritical marks to your text? (google, find e.g. [annotator.jiang-long.com](http://annotator.jiang-long.com)) 3. to use Ruby annotations ...
Also check out my little web site: <https://tonemarks.org>
3,032
I'm looking for a way of adding tone marks above characters. It's fairly easy to add Pinyin with tone marks, but I want to add only tone marks. I want to use this as a teaching tool, because even though most students don't have a big problem with the syllables, they do need to focus more on tones. Thus, adding the tone...
2013/04/16
[ "https://chinese.stackexchange.com/questions/3032", "https://chinese.stackexchange.com", "https://chinese.stackexchange.com/users/507/" ]
I have written some software that does, this <https://code.google.com/p/tghz-word-tone-annotator/> . It is however a Microsoft word add-in.
Check <https://www.purpleculture.net/chinese-pinyin-converter/>, this tool can add tone numbers only
3,032
I'm looking for a way of adding tone marks above characters. It's fairly easy to add Pinyin with tone marks, but I want to add only tone marks. I want to use this as a teaching tool, because even though most students don't have a big problem with the syllables, they do need to focus more on tones. Thus, adding the tone...
2013/04/16
[ "https://chinese.stackexchange.com/questions/3032", "https://chinese.stackexchange.com", "https://chinese.stackexchange.com/users/507/" ]
I have written some software that does, this <https://code.google.com/p/tghz-word-tone-annotator/> . It is however a Microsoft word add-in.
Also check out my little web site: <https://tonemarks.org>
70,451,114
I have data: ``` id|date 1 |12-12-2021 2 |12-12-2021 3 |13-12-2021 ``` Want to get a list of dates: ["12-12-2021", "13-12-2021"] Using stream, I can get a map: ``` txs.stream().collect(Collectors.groupingBy(g -> g.getDate())); ``` I would like to convert to list in from the stream above.
2021/12/22
[ "https://Stackoverflow.com/questions/70451114", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1394953/" ]
`groupingBy` is not the best choice in your case. Use `distinct` instead. It will automatically filter out all duplicates. ``` txs.stream().map(g -> g.getDate()).distinct().collect(Collectors.toList()); ```
If you have the data in `Map<Integer,LocalDate>` the you can use `values()` and collect to `Set` to eliminate duplicates ``` Set<LocalDate> dates = txs.values().stream().collect(Collectors.toSet()) ``` or using `HashSet` ``` new HashSet<>(txs.values()); ```
20,576,211
I keep running into a blank page! Everytime I attempt to visit the site, it's blank! This is supposed to be a simple SQL retrieval page (<https://www.youtube.com/watch?v=IYmS5HRo6JI>) but it just won't work. Any ideas? ``` <html> <head> <title>Search</title> <style type="text/css"> table { ...
2013/12/13
[ "https://Stackoverflow.com/questions/20576211", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3100759/" ]
This usually means that either there is a **folder** named "G:\Song", so you can't replace a directory with a file, or that your windows user account doesn't have **permission** to write to that drive. Right-click on the drive and look at security permissions to be sure you have permission. Also, make sure the drive i...
I had a similar issue and stumbled across this thread looking for an answer to another issue I am having. But you issue sounds similar to one I had a few weeks ago, and the issue was that **SYSTEM** needed to also have Full Control over the folder. May or may not be the issue, but mentioned incase it solves your or ...
61,880,334
I'm developing a Vue application. I would like to know if a form field is in an invalid state. For example, if the field is required, and the user hits submit, but they haven't filled out the field, then the browser's validation should trigger and the field shows in red with a validation message under it. That's what I...
2020/05/18
[ "https://Stackoverflow.com/questions/61880334", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9334823/" ]
`v-text-field` has two mixin properties that could be used to determine its validation status: [`hasError`](https://github.com/vuetifyjs/vuetify/blob/33132a2277f50f3c20f56312a555e211dde30f25/packages/vuetify/src/mixins/validatable/index.ts#L77) or [`valid`](https://github.com/vuetifyjs/vuetify/blob/33132a2277f50f3c20f5...
You can use `v-model` binding on `v-form` element to get form valid state. If you can't do that you can bind ref to `v-form` and probably access `valid` state internally Take a look at below snippet! ```js Vue.config.productionTip = false; Vue.config.devtools = false; new Vue({ el: '#app', data: () => ({ ...
20,063,555
I have a script which we use internally to keep track of client names, hostnames, and SSH port numbers. This lives in /etc/clients.ssh my script called "connect" (symlink "c") takes one argument $1 which is the client name. Then it opens a SSH session to the client, on that hostname, using that port number.. "C" can a...
2013/11/19
[ "https://Stackoverflow.com/questions/20063555", "https://Stackoverflow.com", "https://Stackoverflow.com/users/336600/" ]
From what I understand, you could replace your clients.ssh by creating an entry in `.ssh/config` for each client. For example, an entry called "foobar": ``` Host foobar HostName example.com #or IP address Port 980 User test CheckHostIP no ``` Would enable you to simply `ssh foobar` into the host, as...
I've scraped this idea and just gone with stock `ssh` client from openssh.
34,880,360
Basically, I have a ListView with two conditions: * Don't let the user select any items (for usability reason) * Display rows with a special background color if they fulfill a certain condition Doing either of the points is easy, but I don't manage to do both at the same time. An example to make explanations easier: ...
2016/01/19
[ "https://Stackoverflow.com/questions/34880360", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2674859/" ]
With your current code you are effectively setting the style twice, so the second style declaration is being ignored. Get rid of the ItemContainerStyle and move your Focusable property into the second style as below: ``` <ListView ItemsSource="{Binding Items}"> <ListView.Resources> <Style TargetType="{x:Type ListV...
It seems you need one more trigger to address "if selected" appearance. Something like that: ``` <Style.Triggers> <DataTrigger Binding="{Binding Path=IsSelected, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type ListViewItem}}}" Value="True"> <Setter Property="Background" Value="place ...
129,679
The Chicago Manual of Style, 14th Edition contains the following (on the hyphenation or otherwise of compounds): > > 6.38: The trend in spelling compound words has been away from the use of hyphens; there seems to be a tendency to spell compounds solid . . > . > > > One could argue that the word 'solid' is being...
2013/10/02
[ "https://english.stackexchange.com/questions/129679", "https://english.stackexchange.com", "https://english.stackexchange.com/users/21655/" ]
The OED has no entry for *solid* as an adverb, but under its entry for *solid* as an adjective its definition of *to book solid* is ‘to sell all the tickets of (a theatre, cinema, etc.)’. If *solid* cannot be an adverb, there seems to me to be no alternative to regarding it as a predicative adjective in the examples ...
I would say it's a *flat adverb*. See for example <http://www.dailywritingtips.com/flat-adverbs-are-flat-out-useful/> <http://grammar.about.com/od/fh/g/flatadverbterm.htm>
6,883
**TL;DR** I quoted Company A a fixed price amount to write some software using a product from a particular Vendor (that I selected). But these products didn't work as advertised and I discovered multiple show-stopping bugs. I spent considerable time and effort researching the root cause of the bugs and convincing tech...
2017/05/19
[ "https://freelancing.stackexchange.com/questions/6883", "https://freelancing.stackexchange.com", "https://freelancing.stackexchange.com/users/7557/" ]
Like @AlexD said, it depends on the license agreement. Also, did you pay for the vendor product? If it's free or open source then you can 100% forget about compensation. If you paid and they advertised certain functionality that simply didn't exist or clearly not functioning, you may have a small chance because then ...
I did *not* read the entire thing.. just the first paragraph synopsis. ... (real scenario, not fabricated) I purchased a Adobe Photoshop.... While using Photoshop I discover a few "show stopping" bugs, primarily due to how *I* use the application and *my particular system*. Nonetheless clear bugs in the software. I de...
52,149,803
I am required to make an input field that has an autocomplete functionality and they want a custom kind of button that shows that the input field is something different than just an input field. but I can't seem to customize the class `-ms-expand` because all my css gets ignored. as you can see, it has `display:none;`...
2018/09/03
[ "https://Stackoverflow.com/questions/52149803", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7241073/" ]
With many thanks to @sake92 on <https://gitter.im/lihaoyi/Ammonite> ``` #!/usr/bin/env amm interp.repositories() ++= Seq(coursier.Cache.Dangerous.maven2Local) @ import $ivy.`com.foo:artifact:1.3.0` ``` The @ forces the script to be compiled in two parts. Without it the extra repo will simply be ignored.
There was [an issue some time ago](https://github.com/lihaoyi/Ammonite/issues/611) with [a following PR](https://github.com/lihaoyi/Ammonite/pull/612) that concluded that there quite often local Maven repository contains broken things, so it is not there by default. However, later ability to add your own resolvers wa...
52,149,803
I am required to make an input field that has an autocomplete functionality and they want a custom kind of button that shows that the input field is something different than just an input field. but I can't seem to customize the class `-ms-expand` because all my css gets ignored. as you can see, it has `display:none;`...
2018/09/03
[ "https://Stackoverflow.com/questions/52149803", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7241073/" ]
It changed in v 1.7.1 Now the correct way to do this is like this : ``` import coursierapi.MavenRepository interp.repositories.update( interp.repositories() ::: List(MavenRepository.of("https://some_repo")) ) ``` If you wish to link up a local repository, you can replace `https://some_repo` with `file://path_to_l...
There was [an issue some time ago](https://github.com/lihaoyi/Ammonite/issues/611) with [a following PR](https://github.com/lihaoyi/Ammonite/pull/612) that concluded that there quite often local Maven repository contains broken things, so it is not there by default. However, later ability to add your own resolvers wa...
477,293
As stated in title itself, I want to know if there's a resumable upload manager (like download managers) in windows ? I have googled but couldnt find anything. The best I could search is [upload manager](http://uploadmanager.codeplex.com/)
2012/09/20
[ "https://superuser.com/questions/477293", "https://superuser.com", "https://superuser.com/users/160286/" ]
For FTP, [FileZilla](http://filezilla-project.org/) can pause uploads when you click on the toggle processing button in the toolbar. ![enter image description here](https://i.stack.imgur.com/U9C7z.png) Your upload will be paused and resumed when you press the button once again. ![enter image description here](https:...
An idea is to use the bit-torrent network. All files transferred over it are resumable.
70,873,415
For example: ``` List<Integer> list = Lists.newArrayList(3, 1, 2) for(int i = list.size() - 1; i>=0; i--) { System.out.println(list.get(i)); } ``` How do I go about implementing the above code in Java8 Stream?
2022/01/27
[ "https://Stackoverflow.com/questions/70873415", "https://Stackoverflow.com", "https://Stackoverflow.com/users/17692587/" ]
You can try the below piece of code - ``` ListIterator<Integer> iterator = list.listIterator(list.size()); Stream.generate(iterator::previous) .limit(list.size()) .forEach(System.out::println); ```
What if something like: ``` List<Integer> list = Arrays.asList(3, 1, 2); Collections.reverse(list); list.forEach(System.out::println); ```
70,873,415
For example: ``` List<Integer> list = Lists.newArrayList(3, 1, 2) for(int i = list.size() - 1; i>=0; i--) { System.out.println(list.get(i)); } ``` How do I go about implementing the above code in Java8 Stream?
2022/01/27
[ "https://Stackoverflow.com/questions/70873415", "https://Stackoverflow.com", "https://Stackoverflow.com/users/17692587/" ]
You can try the below piece of code - ``` ListIterator<Integer> iterator = list.listIterator(list.size()); Stream.generate(iterator::previous) .limit(list.size()) .forEach(System.out::println); ```
``` int[] array = {3, 1, 2}; IntStream.rangeClosed(1, array.length) .mapToObj(i -> array[array.length - i]) .forEach(System.out::println); ```
13,449,025
I am working on a project where i need inline editing for controls. and i want to edit model's properties using view and then want to send it to controller using jquery ajax. how can i send full model to controller using $.ajax() My model is: ``` public class LeadDetail { public int EntityID { get; set; } ...
2012/11/19
[ "https://Stackoverflow.com/questions/13449025", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1808178/" ]
``` Lead:'@Model' ``` This is server code and it works only in \*.cshtml files, if you look at rendered html markup you will find only object name. Try this: ``` var form = $('#your_form'); form.submit(function (e) { e.preventDefault(); $.ajax({ url: this.action, type...
as your entity members all are simple types(int - string - decimal) you can loop through your form elements and crate a json object. ``` var rawData = "{"; var fieldCount = $("input , textarea , select ",$(".yourform")).length; $("input , textarea , select ", $(".yourform")).each(function (index) { ...
13,449,025
I am working on a project where i need inline editing for controls. and i want to edit model's properties using view and then want to send it to controller using jquery ajax. how can i send full model to controller using $.ajax() My model is: ``` public class LeadDetail { public int EntityID { get; set; } ...
2012/11/19
[ "https://Stackoverflow.com/questions/13449025", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1808178/" ]
``` Lead:'@Model' ``` This is server code and it works only in \*.cshtml files, if you look at rendered html markup you will find only object name. Try this: ``` var form = $('#your_form'); form.submit(function (e) { e.preventDefault(); $.ajax({ url: this.action, type...
``` $('#form').submit(function () { $.ajax({ url: url type: 'POST', data: $(this).serialize(), // 'this' is your form or use form id success: function (result) { //...
769,007
I'm creating a new VPN service, to enable players of the Crysis 1, Crysis Wars, and Crysis 2 games to continue playing after the online multiplayer is shut down at the end of this month. The purpose of this VPN service is to provide a private LAN, where players can connect to the VPN and view the LAN server list to co...
2014/06/15
[ "https://superuser.com/questions/769007", "https://superuser.com", "https://superuser.com/users/300646/" ]
You have two easy approaches for this: Microsoft's horribly insecure PPTP and OpenVPN. PPTP is built-in to Windows, and doesn't require a download for your players. The catch is that the data exchanged will not be secure - a dedicated attacker will be able to break into the data streams because there are flaws in the ...
The solution to this is found [here.](https://superuser.com/questions/294008/use-vpn-connection-only-for-selected-application?rq=1) It is possible to have an installer, which modifies the firewall rules to accomplish this. > > Connect to your VPN as you normally would. > > > Open the Network and Sharing Center - ri...
769,007
I'm creating a new VPN service, to enable players of the Crysis 1, Crysis Wars, and Crysis 2 games to continue playing after the online multiplayer is shut down at the end of this month. The purpose of this VPN service is to provide a private LAN, where players can connect to the VPN and view the LAN server list to co...
2014/06/15
[ "https://superuser.com/questions/769007", "https://superuser.com", "https://superuser.com/users/300646/" ]
So i would use tunggle because it's very stable and easy to setup. You can also setup private networks. Check it out at <http://www.tunngle.net>
The solution to this is found [here.](https://superuser.com/questions/294008/use-vpn-connection-only-for-selected-application?rq=1) It is possible to have an installer, which modifies the firewall rules to accomplish this. > > Connect to your VPN as you normally would. > > > Open the Network and Sharing Center - ri...