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
48,095,096
Default `font-size` for my code is equivalent to `10px` or `0.625em`. So as per this rule, to set the font size of `<p>` as `7px` I can use `0.7em`. But in my case browser is taking the fixed font size of `9px` (checked in "computed" section of browser) even if I decrease the font size of `<p>` as `0.5em` or less. [![...
2018/01/04
[ "https://Stackoverflow.com/questions/48095096", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8873934/" ]
You can not set ``` body { font-size: 0.625em; } ``` You need to set `10px` to the body font-size. **Then the calculations will work as you expected with using `em`. Else it will take the default `font-size` set by the browser.** ```css body { font-size: 10px; } h1 { font-size: 2.5em; } h2 { font-...
As you say ***font size of p as 7px I can use 0.7em***, which is not correct because here your default font size is 16px. if ``` 10px == 0.625em then 7px = (0.625/10)*7em = 0.4375em ``` And if you are using **`10px`** as your default font, you have to set the **`body`** and **`html`** font size in **`px`** i.e. **`1...
85,572
When you ride in a heavy rain, you can easily wear a Gore-tex jacket an to stay "mostly" dry on top and some kind of overshoes to achieve the same for the shoes/socks. However, noone talks about getting wet for the bib shorts? Is there any reasonable solution? Especially on brevets or bikepackings?
2022/08/27
[ "https://bicycles.stackexchange.com/questions/85572", "https://bicycles.stackexchange.com", "https://bicycles.stackexchange.com/users/66520/" ]
There are a few options. I've tried them all, they all have different pros/cons 1. Get wet but use a very heavy chamois cream that doesnt wash away easily 2. Waterproof cycling trousers exist. They work well, but are expensive and often hard to find in stock as they are a fairly low volume item 3. MTB shorts are avail...
You have three options 1. Ride and get wet. 2. Ride, try to stay dry, get wet anyway. 3. Don't ride. You can get wet from rain falling down, road water flying up, and sweatting on the inside **Ambient temperature** The main reason I might try and stay dry is the temperature. Riding in the rain at 25 degrees C is ple...
85,572
When you ride in a heavy rain, you can easily wear a Gore-tex jacket an to stay "mostly" dry on top and some kind of overshoes to achieve the same for the shoes/socks. However, noone talks about getting wet for the bib shorts? Is there any reasonable solution? Especially on brevets or bikepackings?
2022/08/27
[ "https://bicycles.stackexchange.com/questions/85572", "https://bicycles.stackexchange.com", "https://bicycles.stackexchange.com/users/66520/" ]
There are a few options. I've tried them all, they all have different pros/cons 1. Get wet but use a very heavy chamois cream that doesnt wash away easily 2. Waterproof cycling trousers exist. They work well, but are expensive and often hard to find in stock as they are a fairly low volume item 3. MTB shorts are avail...
Take a change of clothes, in a sealed bag. Naturally, this will only work in specific circumstances, here are a few that come to my mind: 1. It rained heavily but now cleared up fully, and on the balance of likelihoods, it seems worthwhile to get changed (perhaps keep an eye on the latest hourly forecast). 2. You're ...
85,572
When you ride in a heavy rain, you can easily wear a Gore-tex jacket an to stay "mostly" dry on top and some kind of overshoes to achieve the same for the shoes/socks. However, noone talks about getting wet for the bib shorts? Is there any reasonable solution? Especially on brevets or bikepackings?
2022/08/27
[ "https://bicycles.stackexchange.com/questions/85572", "https://bicycles.stackexchange.com", "https://bicycles.stackexchange.com/users/66520/" ]
There are a few options. I've tried them all, they all have different pros/cons 1. Get wet but use a very heavy chamois cream that doesnt wash away easily 2. Waterproof cycling trousers exist. They work well, but are expensive and often hard to find in stock as they are a fairly low volume item 3. MTB shorts are avail...
If it is raining and warm, I don't do anything to guard against the rain. If it is raining and cool, though, I don't mess around. On a very long effort, your body's ability to regulate its temperature decreases; hard rain and cool temperatures can leave you hypothermic. In addition to a jacket and rain-resistant bibs,...
85,572
When you ride in a heavy rain, you can easily wear a Gore-tex jacket an to stay "mostly" dry on top and some kind of overshoes to achieve the same for the shoes/socks. However, noone talks about getting wet for the bib shorts? Is there any reasonable solution? Especially on brevets or bikepackings?
2022/08/27
[ "https://bicycles.stackexchange.com/questions/85572", "https://bicycles.stackexchange.com", "https://bicycles.stackexchange.com/users/66520/" ]
For 200 km or even 300 km brevets I just get wet legs, but I don't suffer too much from the cold. I have had plenty of rides of that length when I've been unable to dry out for the whole ride, and a couple where the rain has been incessant for the whole ride. Anything longer (and indeed most of my 300s) tends to be at ...
You have three options 1. Ride and get wet. 2. Ride, try to stay dry, get wet anyway. 3. Don't ride. You can get wet from rain falling down, road water flying up, and sweatting on the inside **Ambient temperature** The main reason I might try and stay dry is the temperature. Riding in the rain at 25 degrees C is ple...
85,572
When you ride in a heavy rain, you can easily wear a Gore-tex jacket an to stay "mostly" dry on top and some kind of overshoes to achieve the same for the shoes/socks. However, noone talks about getting wet for the bib shorts? Is there any reasonable solution? Especially on brevets or bikepackings?
2022/08/27
[ "https://bicycles.stackexchange.com/questions/85572", "https://bicycles.stackexchange.com", "https://bicycles.stackexchange.com/users/66520/" ]
For 200 km or even 300 km brevets I just get wet legs, but I don't suffer too much from the cold. I have had plenty of rides of that length when I've been unable to dry out for the whole ride, and a couple where the rain has been incessant for the whole ride. Anything longer (and indeed most of my 300s) tends to be at ...
Take a change of clothes, in a sealed bag. Naturally, this will only work in specific circumstances, here are a few that come to my mind: 1. It rained heavily but now cleared up fully, and on the balance of likelihoods, it seems worthwhile to get changed (perhaps keep an eye on the latest hourly forecast). 2. You're ...
85,572
When you ride in a heavy rain, you can easily wear a Gore-tex jacket an to stay "mostly" dry on top and some kind of overshoes to achieve the same for the shoes/socks. However, noone talks about getting wet for the bib shorts? Is there any reasonable solution? Especially on brevets or bikepackings?
2022/08/27
[ "https://bicycles.stackexchange.com/questions/85572", "https://bicycles.stackexchange.com", "https://bicycles.stackexchange.com/users/66520/" ]
For 200 km or even 300 km brevets I just get wet legs, but I don't suffer too much from the cold. I have had plenty of rides of that length when I've been unable to dry out for the whole ride, and a couple where the rain has been incessant for the whole ride. Anything longer (and indeed most of my 300s) tends to be at ...
If it is raining and warm, I don't do anything to guard against the rain. If it is raining and cool, though, I don't mess around. On a very long effort, your body's ability to regulate its temperature decreases; hard rain and cool temperatures can leave you hypothermic. In addition to a jacket and rain-resistant bibs,...
64,532,965
PS C:\Users\BM KHAN\react-guide> npm install --save radium npm ERR! code ERESOLVE npm ERR! ERESOLVE unable to resolve dependency tree npm ERR! npm ERR! While resolving: react-guide@0.1.0 npm ERR! Found: react@17.0.1 npm ERR! node\_modules/react npm ERR! react@"^17.0.0" from the root project npm ERR! npm ERR! Could not ...
2020/10/26
[ "https://Stackoverflow.com/questions/64532965", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14520336/" ]
It worked for me , I was having the same problem > > npm install --save radium --legacy-peer-deps > > >
This worked for me I also have the same problem. If we read the errors currently we can resolve them easily [![enter image description here](https://i.stack.imgur.com/lHNyL.png)](https://i.stack.imgur.com/lHNyL.png) ``` npm install --save radium --legacy-peer-deps ```
64,532,965
PS C:\Users\BM KHAN\react-guide> npm install --save radium npm ERR! code ERESOLVE npm ERR! ERESOLVE unable to resolve dependency tree npm ERR! npm ERR! While resolving: react-guide@0.1.0 npm ERR! Found: react@17.0.1 npm ERR! node\_modules/react npm ERR! react@"^17.0.0" from the root project npm ERR! npm ERR! Could not ...
2020/10/26
[ "https://Stackoverflow.com/questions/64532965", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14520336/" ]
It worked for me , I was having the same problem > > npm install --save radium --legacy-peer-deps > > >
``` npm install --save radium --force ```
64,532,965
PS C:\Users\BM KHAN\react-guide> npm install --save radium npm ERR! code ERESOLVE npm ERR! ERESOLVE unable to resolve dependency tree npm ERR! npm ERR! While resolving: react-guide@0.1.0 npm ERR! Found: react@17.0.1 npm ERR! node\_modules/react npm ERR! react@"^17.0.0" from the root project npm ERR! npm ERR! Could not ...
2020/10/26
[ "https://Stackoverflow.com/questions/64532965", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14520336/" ]
This worked for me I also have the same problem. If we read the errors currently we can resolve them easily [![enter image description here](https://i.stack.imgur.com/lHNyL.png)](https://i.stack.imgur.com/lHNyL.png) ``` npm install --save radium --legacy-peer-deps ```
``` npm install --save radium --force ```
46,548,006
I have array in my php file: ``` $invoices_arr = []; foreach ($invoices as $key=>$invoice){ $invoices_arr[$key]['id']=$invoice->get_id(); $invoices_arr[$key]['code_text']=$invoice->get_code_text(); $invoices_arr[$key]['invoice_name']=$invoice->get_invoice_name(); $invoices_arr[$key]['status_in...
2017/10/03
[ "https://Stackoverflow.com/questions/46548006", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8714851/" ]
I guess this is what you want. A matrix of 2 columns and 4 rows and in each "cell" of this matrix you get the histogram for a column with the categories overlapped. ``` import pandas as pd from matplotlib import pyplot as plt df = pd.DataFrame({'V1':[1,2,3,4,5,6], 'V2': [43,35,6,7,31,34], 'V3': [2...
The last code from the question should give you a warning about the axes being cleared - essentially the phenomenon you observe. `UserWarning: To output multiple subplots, the figure containing the passed axes is being cleared` Now the idea could be to let pandas plot each histogram in its own axes, but to make sure ...
34,892,781
I have a question about this code. It is supposed to keep score of a quiz. ``` function point() { var questions = document.getElementsByTagName("input"); var value_list = []; var point = 0; for (var i = 0; i < questions.length; i++) { value_list.push(questions[i].value); if (questions[i].checked) { poi...
2016/01/20
[ "https://Stackoverflow.com/questions/34892781", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5783294/" ]
``` var questions = document.getElementsByTagName("input"); ``` Get all elements that have the tag `<input>`.`questions` is an array of all those elements. ``` var value_list = []; var point = 0; ``` Initialize an array and a variable. ``` for (var i = 0; i < questions.length; i++) { ``` For all the input eleme...
``` function point() { var questions = document.getElementsByTagName("input"); //This line gets all the input tags on your page. Instead you can give all your questions a common class and do this to get count document.getElementsByClass("className"); var value_list = []; //creates an empty array val...
34,892,781
I have a question about this code. It is supposed to keep score of a quiz. ``` function point() { var questions = document.getElementsByTagName("input"); var value_list = []; var point = 0; for (var i = 0; i < questions.length; i++) { value_list.push(questions[i].value); if (questions[i].checked) { poi...
2016/01/20
[ "https://Stackoverflow.com/questions/34892781", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5783294/" ]
``` var questions = document.getElementsByTagName("input"); ``` Get all elements that have the tag `<input>`.`questions` is an array of all those elements. ``` var value_list = []; var point = 0; ``` Initialize an array and a variable. ``` for (var i = 0; i < questions.length; i++) { ``` For all the input eleme...
``` function point() { var questions = document.getElementsByTagName("input"); ``` The getElementsByTagName() method accesses all elements with the specified tagname. ``` var value_list = []; ``` Above line creates the empty list having name value\_list. ``` var point = 0; ``` Set the variable point=0; Purpose...
34,892,781
I have a question about this code. It is supposed to keep score of a quiz. ``` function point() { var questions = document.getElementsByTagName("input"); var value_list = []; var point = 0; for (var i = 0; i < questions.length; i++) { value_list.push(questions[i].value); if (questions[i].checked) { poi...
2016/01/20
[ "https://Stackoverflow.com/questions/34892781", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5783294/" ]
**Line1:** ``` var questions = document.getElementsByTagName("input"); ``` There are be elements with tag input in your HTML file.So you are taking those elements array using `document.getElementsByTagName("input")` and assigning in to variable questions. **So outcome of this line is you will get a variable question...
``` function point() { var questions = document.getElementsByTagName("input"); //This line gets all the input tags on your page. Instead you can give all your questions a common class and do this to get count document.getElementsByClass("className"); var value_list = []; //creates an empty array val...
34,892,781
I have a question about this code. It is supposed to keep score of a quiz. ``` function point() { var questions = document.getElementsByTagName("input"); var value_list = []; var point = 0; for (var i = 0; i < questions.length; i++) { value_list.push(questions[i].value); if (questions[i].checked) { poi...
2016/01/20
[ "https://Stackoverflow.com/questions/34892781", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5783294/" ]
**Line1:** ``` var questions = document.getElementsByTagName("input"); ``` There are be elements with tag input in your HTML file.So you are taking those elements array using `document.getElementsByTagName("input")` and assigning in to variable questions. **So outcome of this line is you will get a variable question...
``` function point() { var questions = document.getElementsByTagName("input"); ``` The getElementsByTagName() method accesses all elements with the specified tagname. ``` var value_list = []; ``` Above line creates the empty list having name value\_list. ``` var point = 0; ``` Set the variable point=0; Purpose...
34,892,781
I have a question about this code. It is supposed to keep score of a quiz. ``` function point() { var questions = document.getElementsByTagName("input"); var value_list = []; var point = 0; for (var i = 0; i < questions.length; i++) { value_list.push(questions[i].value); if (questions[i].checked) { poi...
2016/01/20
[ "https://Stackoverflow.com/questions/34892781", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5783294/" ]
``` // We define a new function, named point. In this case, it doesn't receive any parameters. function point() { // We get all the input elements, and we store it in the variable 'questions' var questions = document.getElementsByTagName("input"); // We are creating a new empty list var value_list = ...
``` function point() { var questions = document.getElementsByTagName("input"); //This line gets all the input tags on your page. Instead you can give all your questions a common class and do this to get count document.getElementsByClass("className"); var value_list = []; //creates an empty array val...
34,892,781
I have a question about this code. It is supposed to keep score of a quiz. ``` function point() { var questions = document.getElementsByTagName("input"); var value_list = []; var point = 0; for (var i = 0; i < questions.length; i++) { value_list.push(questions[i].value); if (questions[i].checked) { poi...
2016/01/20
[ "https://Stackoverflow.com/questions/34892781", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5783294/" ]
``` // We define a new function, named point. In this case, it doesn't receive any parameters. function point() { // We get all the input elements, and we store it in the variable 'questions' var questions = document.getElementsByTagName("input"); // We are creating a new empty list var value_list = ...
``` function point() { var questions = document.getElementsByTagName("input"); ``` The getElementsByTagName() method accesses all elements with the specified tagname. ``` var value_list = []; ``` Above line creates the empty list having name value\_list. ``` var point = 0; ``` Set the variable point=0; Purpose...
60,242,762
I want to put a CDN in front of a Google Cloud Run service in order to cache some responses. Right now it seems Cloud CDN requires a Google Load Balancer, and they cannot point to a Google Cloud Run service (<https://github.com/ahmetb/cloud-run-faq/tree/e7a0fc43d3054456613c09e073db289ddf76dd33#how-can-i-configure-cdn-...
2020/02/15
[ "https://Stackoverflow.com/questions/60242762", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1685538/" ]
[updated] You can use Cloud CDN with Cloud Run via [Google Cloud Load Balancer](https://cloud.google.com/load-balancing/docs/negs/serverless-neg-concepts)
Additionally it's possible without using the Load Balancer by serving it through a Firebase app by adding a `Cache-Control` [header](https://firebase.google.com/docs/hosting/manage-cache#set_cache-control) and via a [rewrite rule](https://firebase.google.com/docs/hosting/cloud-run#direct_requests_to_container) in `fire...
137,492
I downloaded the desktop ISO for Ubuntu 12.04 and burned the ISO to a DVD. When it boots, it loads up to the splash screen and stops until I get impatient and hit enter then it brings uup the language selection screen after which it loads the GUI with the options where I choose install. At this point the screen goes bl...
2012/05/15
[ "https://askubuntu.com/questions/137492", "https://askubuntu.com", "https://askubuntu.com/users/63667/" ]
As Jorge Castro has said, this should be [a bug report](https://askubuntu.com/questions/5121/how-do-i-report-a-bug). ...Unless the problem is due to bad installation media, or is a known graphics problem. You gave us some information about your computer, but you did not tell us the make and model of your graphics card...
Same Thing. It could be that your ACPI is not supported. [Disable the new card](http://pastebin.ubuntu.com/995187/) , [or disable ACPI.](http://www.ehow.com/how_7641485_edit-acpi-bios.html) Use the second option if you can't find "New Card Interface". You can also add the `acpi = off` or the `nolapic` parameter to bo...
137,492
I downloaded the desktop ISO for Ubuntu 12.04 and burned the ISO to a DVD. When it boots, it loads up to the splash screen and stops until I get impatient and hit enter then it brings uup the language selection screen after which it loads the GUI with the options where I choose install. At this point the screen goes bl...
2012/05/15
[ "https://askubuntu.com/questions/137492", "https://askubuntu.com", "https://askubuntu.com/users/63667/" ]
I've had a similar issue and it seems that it is related to the Nvidia card used. I have found the following workaround: 1. Insert the USB stick/CD disk and, as soon as you see a small icon at the bottom of the screen, press Enter. 2. Choose your language 3. Press F6 (More options). 4. Select "nomodeset" and press Ent...
Same Thing. It could be that your ACPI is not supported. [Disable the new card](http://pastebin.ubuntu.com/995187/) , [or disable ACPI.](http://www.ehow.com/how_7641485_edit-acpi-bios.html) Use the second option if you can't find "New Card Interface". You can also add the `acpi = off` or the `nolapic` parameter to bo...
72,821,565
bellow is my code, its written in springboot but im having trouble trying to write it in webflux. im using mono but im not sure how i can log info in mono or how i can return a responseEntity using mono either. ``` @GetMapping("/helloWorld") public ResponseEntity helloWorld() { log.info("Entered hello world"); ...
2022/06/30
[ "https://Stackoverflow.com/questions/72821565", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18614455/" ]
Your function should return a `Mono` (single resource) or a `Flux` (collection resource). ``` @GetMapping("/helloWorld") public Mono<String> helloWorld() { log.info("Entered hello world"); return Mono.just("Hello World"); } ``` You should also make sure you have `spring-boot-starter-webflux` in your depend...
``` @GetMapping("/helloWorld") public Mono<ResponseEntity<String>> helloWorld() { log.info("Entered hello world"); return Mono.just(ResponseEntity.ok("Hello World")); } ``` May suggest reading the spring webflux [docs](https://docs.spring.io/spring-framework/docs/current/reference/html/web-reactive.html) as w...
31,567,002
When launching the application a Failures manifest malformed error occurs what is the problem in my manifest file? I've been looking around and i've already checked for: 1. I've checked for capitalization 2. The packages are set properly 3. All the libraries for Parse and facebook has been imported properly. (or may...
2015/07/22
[ "https://Stackoverflow.com/questions/31567002", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4875555/" ]
`(!$mod)` is true. The `if` condition is evaluated to true You end up having: ``` if ( true || anotherCondition ) { return; } ``` It doesn't matter what the other condition is in this case. It evaluates to `true` Your code is pretty close to what you need. ``` if ( (!$mod) && ($status != 'pending') && ($cu...
``` if( (!$mod) && ( ($status != 'pending') && ($currentuser != $author) ) ) ``` Because the user is not a mod it short circuits the second half of your if statement, by making it an and instead of or it will only return if both of the statements are true. Another option is to do: ``` if(($mod) || ( ( ($status == '...
27,374,156
I am trying to find alphanumeric string including these two characters "/+" with at least 30 characters in length. I have written this code, ``` grep "[a-zA-Z0-9\/\+]{30,}" tmp.txt ``` cat tmp.txt ``` > array('rWmyiJgKT8sFXCmMr639U4nWxcSvVFEur9hNOOvQwF/tpYRqTk9yWV2xPFBAZwAPRVs/s ddd73ZEjfy+airfy8DtqIqKI9+dd 6hdd7...
2014/12/09
[ "https://Stackoverflow.com/questions/27374156", "https://Stackoverflow.com", "https://Stackoverflow.com/users/372108/" ]
In the syntax of `grep`, the repetition braces need to be backslashed. ``` grep -o '[a-zA-Z0-9/+]\{30,\}' file ``` If you want to constrain the match to lines containing only matches to this pattern, add line-start and line-ending anchors: ``` grep '^[a-zA-Z0-9/+]\{30,\}$' file ``` The `-o` option in the first co...
You can use ``` grep -e "^[a-zA-Z0-9/+]\{30,\}" tmp.txt ``` --- ``` grep -e "^[a-zA-Z0-9/+]\{30,\}" tmp.txt +pAzx/t17Crf0T/2+8+reo+MU39lqCr02sAkcC1k/LzyBvSDEtu9N/9NHicr jA3SvDqg5s44DFlaNZ/8BW37fGEf2rk13S/q68OVVyzac7IT7yE7PIL9XZ/6LsmrY 3mh7Y/nZm52hyLa37978f+PyOCqUh0Wfx2PL3vglofi0l QVrOM1pg+mFLEIC88B706UzL4Pss7ouEo...
27,374,156
I am trying to find alphanumeric string including these two characters "/+" with at least 30 characters in length. I have written this code, ``` grep "[a-zA-Z0-9\/\+]{30,}" tmp.txt ``` cat tmp.txt ``` > array('rWmyiJgKT8sFXCmMr639U4nWxcSvVFEur9hNOOvQwF/tpYRqTk9yWV2xPFBAZwAPRVs/s ddd73ZEjfy+airfy8DtqIqKI9+dd 6hdd7...
2014/12/09
[ "https://Stackoverflow.com/questions/27374156", "https://Stackoverflow.com", "https://Stackoverflow.com/users/372108/" ]
In the syntax of `grep`, the repetition braces need to be backslashed. ``` grep -o '[a-zA-Z0-9/+]\{30,\}' file ``` If you want to constrain the match to lines containing only matches to this pattern, add line-start and line-ending anchors: ``` grep '^[a-zA-Z0-9/+]\{30,\}$' file ``` The `-o` option in the first co...
The repetition operator is not directly supported in Basic Regular Expression syntax. Use `grep -E` to enable Extended Regular Expression syntax, or backslash the braces.
27,374,156
I am trying to find alphanumeric string including these two characters "/+" with at least 30 characters in length. I have written this code, ``` grep "[a-zA-Z0-9\/\+]{30,}" tmp.txt ``` cat tmp.txt ``` > array('rWmyiJgKT8sFXCmMr639U4nWxcSvVFEur9hNOOvQwF/tpYRqTk9yWV2xPFBAZwAPRVs/s ddd73ZEjfy+airfy8DtqIqKI9+dd 6hdd7...
2014/12/09
[ "https://Stackoverflow.com/questions/27374156", "https://Stackoverflow.com", "https://Stackoverflow.com/users/372108/" ]
In the syntax of `grep`, the repetition braces need to be backslashed. ``` grep -o '[a-zA-Z0-9/+]\{30,\}' file ``` If you want to constrain the match to lines containing only matches to this pattern, add line-start and line-ending anchors: ``` grep '^[a-zA-Z0-9/+]\{30,\}$' file ``` The `-o` option in the first co...
``` man grep ``` Read up about the difference between between regular and extended patterns. You need the `-E` option.
27,374,156
I am trying to find alphanumeric string including these two characters "/+" with at least 30 characters in length. I have written this code, ``` grep "[a-zA-Z0-9\/\+]{30,}" tmp.txt ``` cat tmp.txt ``` > array('rWmyiJgKT8sFXCmMr639U4nWxcSvVFEur9hNOOvQwF/tpYRqTk9yWV2xPFBAZwAPRVs/s ddd73ZEjfy+airfy8DtqIqKI9+dd 6hdd7...
2014/12/09
[ "https://Stackoverflow.com/questions/27374156", "https://Stackoverflow.com", "https://Stackoverflow.com/users/372108/" ]
The repetition operator is not directly supported in Basic Regular Expression syntax. Use `grep -E` to enable Extended Regular Expression syntax, or backslash the braces.
You can use ``` grep -e "^[a-zA-Z0-9/+]\{30,\}" tmp.txt ``` --- ``` grep -e "^[a-zA-Z0-9/+]\{30,\}" tmp.txt +pAzx/t17Crf0T/2+8+reo+MU39lqCr02sAkcC1k/LzyBvSDEtu9N/9NHicr jA3SvDqg5s44DFlaNZ/8BW37fGEf2rk13S/q68OVVyzac7IT7yE7PIL9XZ/6LsmrY 3mh7Y/nZm52hyLa37978f+PyOCqUh0Wfx2PL3vglofi0l QVrOM1pg+mFLEIC88B706UzL4Pss7ouEo...
27,374,156
I am trying to find alphanumeric string including these two characters "/+" with at least 30 characters in length. I have written this code, ``` grep "[a-zA-Z0-9\/\+]{30,}" tmp.txt ``` cat tmp.txt ``` > array('rWmyiJgKT8sFXCmMr639U4nWxcSvVFEur9hNOOvQwF/tpYRqTk9yWV2xPFBAZwAPRVs/s ddd73ZEjfy+airfy8DtqIqKI9+dd 6hdd7...
2014/12/09
[ "https://Stackoverflow.com/questions/27374156", "https://Stackoverflow.com", "https://Stackoverflow.com/users/372108/" ]
The repetition operator is not directly supported in Basic Regular Expression syntax. Use `grep -E` to enable Extended Regular Expression syntax, or backslash the braces.
``` man grep ``` Read up about the difference between between regular and extended patterns. You need the `-E` option.
154,707
I found this Image on an obscure YouTube channel and since then I've had a hard time trying to recreate this effect . I would like it to know what's the key to achieve that lighting using photoshop , and that grunge lines texture too if possible . thanks alot in advance :) [![enter image description here](https://i.st...
2021/11/15
[ "https://graphicdesign.stackexchange.com/questions/154707", "https://graphicdesign.stackexchange.com", "https://graphicdesign.stackexchange.com/users/170058/" ]
In simple, **rudimentary**, terms... * A **dot** is the smallest possible spot of **ink** on paper. * A **pixel** is the smallest possible spot of **light** on a screen. Dots are *never* on a screen and pixels are *never* on paper. --- This **does not** cover how pixels are *made*. Nor does it cover how ink is *mad...
This is more like a long comment than a answer. The reason why you fail to get this is simply you have no need for this information. The only way you can ever understand this is if you care about the actual technical implementation details of the underlying system. In this case a printer and a screen. Since you most l...
154,707
I found this Image on an obscure YouTube channel and since then I've had a hard time trying to recreate this effect . I would like it to know what's the key to achieve that lighting using photoshop , and that grunge lines texture too if possible . thanks alot in advance :) [![enter image description here](https://i.st...
2021/11/15
[ "https://graphicdesign.stackexchange.com/questions/154707", "https://graphicdesign.stackexchange.com", "https://graphicdesign.stackexchange.com/users/170058/" ]
*(It's clear now that a simple answer to this question doesn't exist. Our language simply isn't precise enough. I like the two other answers, but would still like to give an answer seen more from the viewpoint of a graphic designer.)* A **pixel** is simply the smallest unit of an image. An image file is a collection o...
In simple, **rudimentary**, terms... * A **dot** is the smallest possible spot of **ink** on paper. * A **pixel** is the smallest possible spot of **light** on a screen. Dots are *never* on a screen and pixels are *never* on paper. --- This **does not** cover how pixels are *made*. Nor does it cover how ink is *mad...
154,707
I found this Image on an obscure YouTube channel and since then I've had a hard time trying to recreate this effect . I would like it to know what's the key to achieve that lighting using photoshop , and that grunge lines texture too if possible . thanks alot in advance :) [![enter image description here](https://i.st...
2021/11/15
[ "https://graphicdesign.stackexchange.com/questions/154707", "https://graphicdesign.stackexchange.com", "https://graphicdesign.stackexchange.com/users/170058/" ]
In simple, **rudimentary**, terms... * A **dot** is the smallest possible spot of **ink** on paper. * A **pixel** is the smallest possible spot of **light** on a screen. Dots are *never* on a screen and pixels are *never* on paper. --- This **does not** cover how pixels are *made*. Nor does it cover how ink is *mad...
Some units are very precisely defined. Others much less. And you'll learn that some can have very different definitions depending on context or whoever you're talking to. Supposedly, a **pixel** (**pict**ure **el**ement) is the smallest addressable unit on a **screen**. So your screen may have 1920 x 1080 pixels ("ful...
154,707
I found this Image on an obscure YouTube channel and since then I've had a hard time trying to recreate this effect . I would like it to know what's the key to achieve that lighting using photoshop , and that grunge lines texture too if possible . thanks alot in advance :) [![enter image description here](https://i.st...
2021/11/15
[ "https://graphicdesign.stackexchange.com/questions/154707", "https://graphicdesign.stackexchange.com", "https://graphicdesign.stackexchange.com/users/170058/" ]
In simple, **rudimentary**, terms... * A **dot** is the smallest possible spot of **ink** on paper. * A **pixel** is the smallest possible spot of **light** on a screen. Dots are *never* on a screen and pixels are *never* on paper. --- This **does not** cover how pixels are *made*. Nor does it cover how ink is *mad...
In the beginning, there was no difference between a dot and a pixel - the two terms were interchangeable. That's why you still encounter the term DPI in contexts where they're clearly referring to PPI. Even on a CRT where it was clear that a single pixel lit up a varying amount of phosphor dots, nobody bothered to draw...
154,707
I found this Image on an obscure YouTube channel and since then I've had a hard time trying to recreate this effect . I would like it to know what's the key to achieve that lighting using photoshop , and that grunge lines texture too if possible . thanks alot in advance :) [![enter image description here](https://i.st...
2021/11/15
[ "https://graphicdesign.stackexchange.com/questions/154707", "https://graphicdesign.stackexchange.com", "https://graphicdesign.stackexchange.com/users/170058/" ]
*(It's clear now that a simple answer to this question doesn't exist. Our language simply isn't precise enough. I like the two other answers, but would still like to give an answer seen more from the viewpoint of a graphic designer.)* A **pixel** is simply the smallest unit of an image. An image file is a collection o...
This is more like a long comment than a answer. The reason why you fail to get this is simply you have no need for this information. The only way you can ever understand this is if you care about the actual technical implementation details of the underlying system. In this case a printer and a screen. Since you most l...
154,707
I found this Image on an obscure YouTube channel and since then I've had a hard time trying to recreate this effect . I would like it to know what's the key to achieve that lighting using photoshop , and that grunge lines texture too if possible . thanks alot in advance :) [![enter image description here](https://i.st...
2021/11/15
[ "https://graphicdesign.stackexchange.com/questions/154707", "https://graphicdesign.stackexchange.com", "https://graphicdesign.stackexchange.com/users/170058/" ]
This is more like a long comment than a answer. The reason why you fail to get this is simply you have no need for this information. The only way you can ever understand this is if you care about the actual technical implementation details of the underlying system. In this case a printer and a screen. Since you most l...
Some units are very precisely defined. Others much less. And you'll learn that some can have very different definitions depending on context or whoever you're talking to. Supposedly, a **pixel** (**pict**ure **el**ement) is the smallest addressable unit on a **screen**. So your screen may have 1920 x 1080 pixels ("ful...
154,707
I found this Image on an obscure YouTube channel and since then I've had a hard time trying to recreate this effect . I would like it to know what's the key to achieve that lighting using photoshop , and that grunge lines texture too if possible . thanks alot in advance :) [![enter image description here](https://i.st...
2021/11/15
[ "https://graphicdesign.stackexchange.com/questions/154707", "https://graphicdesign.stackexchange.com", "https://graphicdesign.stackexchange.com/users/170058/" ]
This is more like a long comment than a answer. The reason why you fail to get this is simply you have no need for this information. The only way you can ever understand this is if you care about the actual technical implementation details of the underlying system. In this case a printer and a screen. Since you most l...
In the beginning, there was no difference between a dot and a pixel - the two terms were interchangeable. That's why you still encounter the term DPI in contexts where they're clearly referring to PPI. Even on a CRT where it was clear that a single pixel lit up a varying amount of phosphor dots, nobody bothered to draw...
154,707
I found this Image on an obscure YouTube channel and since then I've had a hard time trying to recreate this effect . I would like it to know what's the key to achieve that lighting using photoshop , and that grunge lines texture too if possible . thanks alot in advance :) [![enter image description here](https://i.st...
2021/11/15
[ "https://graphicdesign.stackexchange.com/questions/154707", "https://graphicdesign.stackexchange.com", "https://graphicdesign.stackexchange.com/users/170058/" ]
*(It's clear now that a simple answer to this question doesn't exist. Our language simply isn't precise enough. I like the two other answers, but would still like to give an answer seen more from the viewpoint of a graphic designer.)* A **pixel** is simply the smallest unit of an image. An image file is a collection o...
Some units are very precisely defined. Others much less. And you'll learn that some can have very different definitions depending on context or whoever you're talking to. Supposedly, a **pixel** (**pict**ure **el**ement) is the smallest addressable unit on a **screen**. So your screen may have 1920 x 1080 pixels ("ful...
154,707
I found this Image on an obscure YouTube channel and since then I've had a hard time trying to recreate this effect . I would like it to know what's the key to achieve that lighting using photoshop , and that grunge lines texture too if possible . thanks alot in advance :) [![enter image description here](https://i.st...
2021/11/15
[ "https://graphicdesign.stackexchange.com/questions/154707", "https://graphicdesign.stackexchange.com", "https://graphicdesign.stackexchange.com/users/170058/" ]
*(It's clear now that a simple answer to this question doesn't exist. Our language simply isn't precise enough. I like the two other answers, but would still like to give an answer seen more from the viewpoint of a graphic designer.)* A **pixel** is simply the smallest unit of an image. An image file is a collection o...
In the beginning, there was no difference between a dot and a pixel - the two terms were interchangeable. That's why you still encounter the term DPI in contexts where they're clearly referring to PPI. Even on a CRT where it was clear that a single pixel lit up a varying amount of phosphor dots, nobody bothered to draw...
154,707
I found this Image on an obscure YouTube channel and since then I've had a hard time trying to recreate this effect . I would like it to know what's the key to achieve that lighting using photoshop , and that grunge lines texture too if possible . thanks alot in advance :) [![enter image description here](https://i.st...
2021/11/15
[ "https://graphicdesign.stackexchange.com/questions/154707", "https://graphicdesign.stackexchange.com", "https://graphicdesign.stackexchange.com/users/170058/" ]
In the beginning, there was no difference between a dot and a pixel - the two terms were interchangeable. That's why you still encounter the term DPI in contexts where they're clearly referring to PPI. Even on a CRT where it was clear that a single pixel lit up a varying amount of phosphor dots, nobody bothered to draw...
Some units are very precisely defined. Others much less. And you'll learn that some can have very different definitions depending on context or whoever you're talking to. Supposedly, a **pixel** (**pict**ure **el**ement) is the smallest addressable unit on a **screen**. So your screen may have 1920 x 1080 pixels ("ful...
69,419,273
I have two custom classes called `OrthogonalPoint` and `PolarPoint`. ``` public class OrthogonalPoint extends AbstractPoint<OrthogonalPoint> { private double x; private double y; // constructor, getters, ... } ``` ``` public class PolarPoint extends AbstractPoint<PolarPoint> { private double rho; ...
2021/10/02
[ "https://Stackoverflow.com/questions/69419273", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11107128/" ]
In Spring Security version `5.6`, which is in `5.6.0.M3` as of now, you can create an `AuthorizationManager` bean and define place your rules anywhere you want, like so: ```java @Autowired private MyCustomAuthorizationManager access; @Override protected void configure(HttpSecurity http) throws Exception { http.au...
I ended up with this [solution](https://www.baeldung.com/java-restart-spring-boot-app). The solution is to close the current context and run the new one. Of course, it has the disadvantage because it causes downtime but I use a load balancer and several nodes so it's was ok for me.
11,116,162
I'm navigating from: * `Main activity` to `Activity 2` * `Activity 2` to `Activity 3` * `Activity 3` to `Activity 4` through `Intent`. I've also created the menu so that user can directly navigate from `Activity 4` to `Main activity`. But after navigating from `Activity 4` to `Main activity` by using menu, when I...
2012/06/20
[ "https://Stackoverflow.com/questions/11116162", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1061728/" ]
You need to consider your "[back stack](http://developer.android.com/guide/topics/fundamentals/tasks-and-back-stack.html)" more closely. What is happening exactly is, your back stack gets populated as follows: ``` Main activity -> Activity 2 -> Activity 3 -> Activity 4 ``` Then from `Activity 4` you launch your `Ma...
In activity 2 and 3, after calling `startActivity(intent)`, call `this.finish()`. This will also be one solution.
11,116,162
I'm navigating from: * `Main activity` to `Activity 2` * `Activity 2` to `Activity 3` * `Activity 3` to `Activity 4` through `Intent`. I've also created the menu so that user can directly navigate from `Activity 4` to `Main activity`. But after navigating from `Activity 4` to `Main activity` by using menu, when I...
2012/06/20
[ "https://Stackoverflow.com/questions/11116162", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1061728/" ]
Just try this code when you navigate from 4th Activity to Main Activity. ``` Intent inMain=new Intent(Activity4.this, MainActivity.class); inMain.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); startActivity(inMain); ``` Note: This code in your case, clears the previous activities and launches the main activity with no ...
use the flag Intent.FLAG\_ACTIVITY\_CLEAR\_TOP with your intent. For more detail - [FLAG\_ACTIVITY\_CLEAR\_TOP](http://developer.android.com/reference/android/content/Intent.html#FLAG_ACTIVITY_CLEAR_TOP)
11,116,162
I'm navigating from: * `Main activity` to `Activity 2` * `Activity 2` to `Activity 3` * `Activity 3` to `Activity 4` through `Intent`. I've also created the menu so that user can directly navigate from `Activity 4` to `Main activity`. But after navigating from `Activity 4` to `Main activity` by using menu, when I...
2012/06/20
[ "https://Stackoverflow.com/questions/11116162", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1061728/" ]
You can set flag `Intent.FLAG_ACTIVITY_CLEAR_TOP` to finish all the intermediate activities and your called activity will come to top of the activity stack.
In activity 2 and 3, after calling `startActivity(intent)`, call `this.finish()`. This will also be one solution.
11,116,162
I'm navigating from: * `Main activity` to `Activity 2` * `Activity 2` to `Activity 3` * `Activity 3` to `Activity 4` through `Intent`. I've also created the menu so that user can directly navigate from `Activity 4` to `Main activity`. But after navigating from `Activity 4` to `Main activity` by using menu, when I...
2012/06/20
[ "https://Stackoverflow.com/questions/11116162", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1061728/" ]
use the flag Intent.FLAG\_ACTIVITY\_CLEAR\_TOP with your intent. For more detail - [FLAG\_ACTIVITY\_CLEAR\_TOP](http://developer.android.com/reference/android/content/Intent.html#FLAG_ACTIVITY_CLEAR_TOP)
When you go back to the `MainActivity` you need to use the `Intent.FLAG_ACTIVITY_CLEAR_TOP` on your `Intent`. This is an example of a `goHome` method that you can used in your `Activity`: ``` public void goHome () { Intent homeIntent = new Intent(); homeIntent.setClass(this, MainActivity.class); homeIntent...
11,116,162
I'm navigating from: * `Main activity` to `Activity 2` * `Activity 2` to `Activity 3` * `Activity 3` to `Activity 4` through `Intent`. I've also created the menu so that user can directly navigate from `Activity 4` to `Main activity`. But after navigating from `Activity 4` to `Main activity` by using menu, when I...
2012/06/20
[ "https://Stackoverflow.com/questions/11116162", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1061728/" ]
use the flag Intent.FLAG\_ACTIVITY\_CLEAR\_TOP with your intent. For more detail - [FLAG\_ACTIVITY\_CLEAR\_TOP](http://developer.android.com/reference/android/content/Intent.html#FLAG_ACTIVITY_CLEAR_TOP)
You need to consider your "[back stack](http://developer.android.com/guide/topics/fundamentals/tasks-and-back-stack.html)" more closely. What is happening exactly is, your back stack gets populated as follows: ``` Main activity -> Activity 2 -> Activity 3 -> Activity 4 ``` Then from `Activity 4` you launch your `Ma...
11,116,162
I'm navigating from: * `Main activity` to `Activity 2` * `Activity 2` to `Activity 3` * `Activity 3` to `Activity 4` through `Intent`. I've also created the menu so that user can directly navigate from `Activity 4` to `Main activity`. But after navigating from `Activity 4` to `Main activity` by using menu, when I...
2012/06/20
[ "https://Stackoverflow.com/questions/11116162", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1061728/" ]
call startActivity Method using clear top flag ``` startActivity(new Intent(this, UI.class) .setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_NEW_TASK)); ```
In activity 2 and 3, after calling `startActivity(intent)`, call `this.finish()`. This will also be one solution.
11,116,162
I'm navigating from: * `Main activity` to `Activity 2` * `Activity 2` to `Activity 3` * `Activity 3` to `Activity 4` through `Intent`. I've also created the menu so that user can directly navigate from `Activity 4` to `Main activity`. But after navigating from `Activity 4` to `Main activity` by using menu, when I...
2012/06/20
[ "https://Stackoverflow.com/questions/11116162", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1061728/" ]
You can set flag `Intent.FLAG_ACTIVITY_CLEAR_TOP` to finish all the intermediate activities and your called activity will come to top of the activity stack.
When you go back to the `MainActivity` you need to use the `Intent.FLAG_ACTIVITY_CLEAR_TOP` on your `Intent`. This is an example of a `goHome` method that you can used in your `Activity`: ``` public void goHome () { Intent homeIntent = new Intent(); homeIntent.setClass(this, MainActivity.class); homeIntent...
11,116,162
I'm navigating from: * `Main activity` to `Activity 2` * `Activity 2` to `Activity 3` * `Activity 3` to `Activity 4` through `Intent`. I've also created the menu so that user can directly navigate from `Activity 4` to `Main activity`. But after navigating from `Activity 4` to `Main activity` by using menu, when I...
2012/06/20
[ "https://Stackoverflow.com/questions/11116162", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1061728/" ]
Just try this code when you navigate from 4th Activity to Main Activity. ``` Intent inMain=new Intent(Activity4.this, MainActivity.class); inMain.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); startActivity(inMain); ``` Note: This code in your case, clears the previous activities and launches the main activity with no ...
You need to consider your "[back stack](http://developer.android.com/guide/topics/fundamentals/tasks-and-back-stack.html)" more closely. What is happening exactly is, your back stack gets populated as follows: ``` Main activity -> Activity 2 -> Activity 3 -> Activity 4 ``` Then from `Activity 4` you launch your `Ma...
11,116,162
I'm navigating from: * `Main activity` to `Activity 2` * `Activity 2` to `Activity 3` * `Activity 3` to `Activity 4` through `Intent`. I've also created the menu so that user can directly navigate from `Activity 4` to `Main activity`. But after navigating from `Activity 4` to `Main activity` by using menu, when I...
2012/06/20
[ "https://Stackoverflow.com/questions/11116162", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1061728/" ]
When you go back to the `MainActivity` you need to use the `Intent.FLAG_ACTIVITY_CLEAR_TOP` on your `Intent`. This is an example of a `goHome` method that you can used in your `Activity`: ``` public void goHome () { Intent homeIntent = new Intent(); homeIntent.setClass(this, MainActivity.class); homeIntent...
In activity 2 and 3, after calling `startActivity(intent)`, call `this.finish()`. This will also be one solution.
11,116,162
I'm navigating from: * `Main activity` to `Activity 2` * `Activity 2` to `Activity 3` * `Activity 3` to `Activity 4` through `Intent`. I've also created the menu so that user can directly navigate from `Activity 4` to `Main activity`. But after navigating from `Activity 4` to `Main activity` by using menu, when I...
2012/06/20
[ "https://Stackoverflow.com/questions/11116162", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1061728/" ]
use the flag Intent.FLAG\_ACTIVITY\_CLEAR\_TOP with your intent. For more detail - [FLAG\_ACTIVITY\_CLEAR\_TOP](http://developer.android.com/reference/android/content/Intent.html#FLAG_ACTIVITY_CLEAR_TOP)
call startActivity Method using clear top flag ``` startActivity(new Intent(this, UI.class) .setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_NEW_TASK)); ```
12,298,481
I've tried [this sketch](http://arduino.cc/playground/Main/MPU-6050#sketch) provided by arduino.cc. (I've an [MPU6050 GY-521 breakout board](https://rads.stackoverflow.com/amzn/click/com/B008BOPN40).) I think it works fine. It gives a weird set of numbers I can't get any meaning out. It says that those are raw values....
2012/09/06
[ "https://Stackoverflow.com/questions/12298481", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1547699/" ]
You need to look at the [datasheet](http://www.invensense.com/mems/gyro/documents/PS-MPU-6000A.pdf) to translate the raw values to meaningful ones. Look for tables like this one for the gyroscope: ![gyro table](https://i.stack.imgur.com/rHj2t.png) If you used the default values, `FS_SEL` will be `0`. That's the sensi...
``` mpu.setFullScaleGyroRange(0); //0 = +/- 250 degrees/sec | 1 = +/- 500 degrees/sec | 2 = +/- 1000 degrees/sec | 3 = +/- 2000 degrees/sec mpu.setFullScaleAccelRange(0); //0 = +/- 2g | 1 = +/- 4g | 2 = +/- 8g | 3 = +/- 16g ```
42,836,750
``` float kernel[kernel_size][kernel_size] = { 0.000036, 0.000363, 0.001446, 0.002291, 0.001446, 0.000363, 0.000036, 0.000363, 0.003676, 0.014662, 0.023226, 0.014662, 0.003676, 0.000363, 0.001446, 0.014662, 0.058488, 0.092651, 0.058488, 0.014662, 0.001446, 0.002291, 0.023226, 0.092651, 0...
2017/03/16
[ "https://Stackoverflow.com/questions/42836750", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6244285/" ]
If `kernel_size` is 7, there's no difference. Otherwise, they are different. The first version will use the initializers sequentially to initialize full rows in row-by-row fashion (and zero-initialize the remainder of the array, if any) The second version will skip to the next `float [kernel_size]` subarray (row) at ...
First one is a 1 dia array with 49 entries and second one is 2 dia array with 7x7 entries
1,049,183
I just bought a recent ASUS laptop. The seller clearly stated on its website that this laptop USB type-C connector was "thunderbolt 3" compatible. Since, my USB connector doesn't have the usual little lightning logo, I'm having doubt that's this connector is really "Thunderbolt 3"... It's clear however that the conne...
2016/03/05
[ "https://superuser.com/questions/1049183", "https://superuser.com", "https://superuser.com/users/204988/" ]
I know this is a fairly old thread, but I have been looking for a definitive answer myself, as the specs for my HP 850 G5 just say Thunderbolt - ditto for all the details I could find in Device Manager. Eventually I came across the freeware HWiNFO64 at hwinfo.com, and found the information I wanted ("Thunderbolt 3 Bri...
I'm not sure if this is definitive, but my Dell Latitude 5401 which has Thunderbolt has this shown in the Device Manager. Maybe that might help someone: [Screen shot of device manager showing "Thunderbolt HSA Component"](https://i.stack.imgur.com/zXwCj.png)
1,049,183
I just bought a recent ASUS laptop. The seller clearly stated on its website that this laptop USB type-C connector was "thunderbolt 3" compatible. Since, my USB connector doesn't have the usual little lightning logo, I'm having doubt that's this connector is really "Thunderbolt 3"... It's clear however that the conne...
2016/03/05
[ "https://superuser.com/questions/1049183", "https://superuser.com", "https://superuser.com/users/204988/" ]
On windows machine you can run dxdiag.exe. From there you can save a text file with all you installed HW/drivers,... Then look for thunderbold in the text. Something like: ``` Name: Thunderbolt(TM) Controller - 15EB Device ID: PCI\VEN_8086&DEV_15EB&SUBSYS_08311028&REV_06\C4520491CDB7D00000 Driver: C:\WINDOWS\syste...
I'm not sure if this is definitive, but my Dell Latitude 5401 which has Thunderbolt has this shown in the Device Manager. Maybe that might help someone: [Screen shot of device manager showing "Thunderbolt HSA Component"](https://i.stack.imgur.com/zXwCj.png)
1,049,183
I just bought a recent ASUS laptop. The seller clearly stated on its website that this laptop USB type-C connector was "thunderbolt 3" compatible. Since, my USB connector doesn't have the usual little lightning logo, I'm having doubt that's this connector is really "Thunderbolt 3"... It's clear however that the conne...
2016/03/05
[ "https://superuser.com/questions/1049183", "https://superuser.com", "https://superuser.com/users/204988/" ]
I finally found a way to verify the thunderbolt compatibility of a computer: * If the laptop is really Thunderbolt enabled, there should be a line in the different *"BIOS setup options"* mentioning "Thunderbolt" somewhere (*or maybe "Alpine Ridge" for the host controller codename*) * If there is no mention of Thunder...
My system came with a thunderbolt software or installed. It's called Thunderbolt Software and it lists the ports available.
1,049,183
I just bought a recent ASUS laptop. The seller clearly stated on its website that this laptop USB type-C connector was "thunderbolt 3" compatible. Since, my USB connector doesn't have the usual little lightning logo, I'm having doubt that's this connector is really "Thunderbolt 3"... It's clear however that the conne...
2016/03/05
[ "https://superuser.com/questions/1049183", "https://superuser.com", "https://superuser.com/users/204988/" ]
Hunt down your laptop specifications online for detailed specifications. For instance a [Google search](https://www.google.com/search?q=hp%2015-eg0073cl%20specs) on "HP 15-eg0073cl specs" leads to a page that says: **External Ports** * SuperSpeed USB Type-C® 10Gbps signaling rate (USB Power Delivery, DisplayPort™ 1.4...
I'm not sure if this is definitive, but my Dell Latitude 5401 which has Thunderbolt has this shown in the Device Manager. Maybe that might help someone: [Screen shot of device manager showing "Thunderbolt HSA Component"](https://i.stack.imgur.com/zXwCj.png)
1,049,183
I just bought a recent ASUS laptop. The seller clearly stated on its website that this laptop USB type-C connector was "thunderbolt 3" compatible. Since, my USB connector doesn't have the usual little lightning logo, I'm having doubt that's this connector is really "Thunderbolt 3"... It's clear however that the conne...
2016/03/05
[ "https://superuser.com/questions/1049183", "https://superuser.com", "https://superuser.com/users/204988/" ]
I finally found a way to verify the thunderbolt compatibility of a computer: * If the laptop is really Thunderbolt enabled, there should be a line in the different *"BIOS setup options"* mentioning "Thunderbolt" somewhere (*or maybe "Alpine Ridge" for the host controller codename*) * If there is no mention of Thunder...
I'm not sure if this is definitive, but my Dell Latitude 5401 which has Thunderbolt has this shown in the Device Manager. Maybe that might help someone: [Screen shot of device manager showing "Thunderbolt HSA Component"](https://i.stack.imgur.com/zXwCj.png)
1,049,183
I just bought a recent ASUS laptop. The seller clearly stated on its website that this laptop USB type-C connector was "thunderbolt 3" compatible. Since, my USB connector doesn't have the usual little lightning logo, I'm having doubt that's this connector is really "Thunderbolt 3"... It's clear however that the conne...
2016/03/05
[ "https://superuser.com/questions/1049183", "https://superuser.com", "https://superuser.com/users/204988/" ]
I know this is a fairly old thread, but I have been looking for a definitive answer myself, as the specs for my HP 850 G5 just say Thunderbolt - ditto for all the details I could find in Device Manager. Eventually I came across the freeware HWiNFO64 at hwinfo.com, and found the information I wanted ("Thunderbolt 3 Bri...
My system came with a thunderbolt software or installed. It's called Thunderbolt Software and it lists the ports available.
1,049,183
I just bought a recent ASUS laptop. The seller clearly stated on its website that this laptop USB type-C connector was "thunderbolt 3" compatible. Since, my USB connector doesn't have the usual little lightning logo, I'm having doubt that's this connector is really "Thunderbolt 3"... It's clear however that the conne...
2016/03/05
[ "https://superuser.com/questions/1049183", "https://superuser.com", "https://superuser.com/users/204988/" ]
I finally found a way to verify the thunderbolt compatibility of a computer: * If the laptop is really Thunderbolt enabled, there should be a line in the different *"BIOS setup options"* mentioning "Thunderbolt" somewhere (*or maybe "Alpine Ridge" for the host controller codename*) * If there is no mention of Thunder...
Hunt down your laptop specifications online for detailed specifications. For instance a [Google search](https://www.google.com/search?q=hp%2015-eg0073cl%20specs) on "HP 15-eg0073cl specs" leads to a page that says: **External Ports** * SuperSpeed USB Type-C® 10Gbps signaling rate (USB Power Delivery, DisplayPort™ 1.4...
1,049,183
I just bought a recent ASUS laptop. The seller clearly stated on its website that this laptop USB type-C connector was "thunderbolt 3" compatible. Since, my USB connector doesn't have the usual little lightning logo, I'm having doubt that's this connector is really "Thunderbolt 3"... It's clear however that the conne...
2016/03/05
[ "https://superuser.com/questions/1049183", "https://superuser.com", "https://superuser.com/users/204988/" ]
I finally found a way to verify the thunderbolt compatibility of a computer: * If the laptop is really Thunderbolt enabled, there should be a line in the different *"BIOS setup options"* mentioning "Thunderbolt" somewhere (*or maybe "Alpine Ridge" for the host controller codename*) * If there is no mention of Thunder...
I know this is a fairly old thread, but I have been looking for a definitive answer myself, as the specs for my HP 850 G5 just say Thunderbolt - ditto for all the details I could find in Device Manager. Eventually I came across the freeware HWiNFO64 at hwinfo.com, and found the information I wanted ("Thunderbolt 3 Bri...
1,049,183
I just bought a recent ASUS laptop. The seller clearly stated on its website that this laptop USB type-C connector was "thunderbolt 3" compatible. Since, my USB connector doesn't have the usual little lightning logo, I'm having doubt that's this connector is really "Thunderbolt 3"... It's clear however that the conne...
2016/03/05
[ "https://superuser.com/questions/1049183", "https://superuser.com", "https://superuser.com/users/204988/" ]
On windows machine you can run dxdiag.exe. From there you can save a text file with all you installed HW/drivers,... Then look for thunderbold in the text. Something like: ``` Name: Thunderbolt(TM) Controller - 15EB Device ID: PCI\VEN_8086&DEV_15EB&SUBSYS_08311028&REV_06\C4520491CDB7D00000 Driver: C:\WINDOWS\syste...
My system came with a thunderbolt software or installed. It's called Thunderbolt Software and it lists the ports available.
1,049,183
I just bought a recent ASUS laptop. The seller clearly stated on its website that this laptop USB type-C connector was "thunderbolt 3" compatible. Since, my USB connector doesn't have the usual little lightning logo, I'm having doubt that's this connector is really "Thunderbolt 3"... It's clear however that the conne...
2016/03/05
[ "https://superuser.com/questions/1049183", "https://superuser.com", "https://superuser.com/users/204988/" ]
Hunt down your laptop specifications online for detailed specifications. For instance a [Google search](https://www.google.com/search?q=hp%2015-eg0073cl%20specs) on "HP 15-eg0073cl specs" leads to a page that says: **External Ports** * SuperSpeed USB Type-C® 10Gbps signaling rate (USB Power Delivery, DisplayPort™ 1.4...
My system came with a thunderbolt software or installed. It's called Thunderbolt Software and it lists the ports available.
139,923
I have a sequence of bytes: <https://drive.google.com/file/d/17sfchPgsySi2ilIxLuBb1q-UUqq5lO87> What the data is, is unknown (see NOTE below). I'm pretty sure this data is compressed in some way, due to the ent analysis results: ``` $ ent first-chunk Entropy = 7.997831 bits per byte. Optimum compression would redu...
2021/05/05
[ "https://cs.stackexchange.com/questions/139923", "https://cs.stackexchange.com", "https://cs.stackexchange.com/users/136249/" ]
This file contains some repeated long byte sequences. In particular, the 66(decimal)-byte sequence beginning `49 97 CE...` occurs many times, and always at an offset that's a multiple of 66. If you decrypt the file as a bitwise [Vigenère cipher](https://en.wikipedia.org/wiki/Vigen%C3%A8re_cipher) with that as the key,...
It's a reasonable hypothesis, but definitely not guaranteed, that it was compressed. There is general no way to know for sure which compression method was used. You've already tried some reasonable things to try.
32,488,313
In PHP, how do variable scope rules apply to Try/Catch blocks? Do variables declared within the `try` block go out of scope when the block has finished? Or are they in scope until the end of the function/method? For example: ``` try { // This may throw an exception when created! $o = new Pronk(); } catch (Excep...
2015/09/09
[ "https://Stackoverflow.com/questions/32488313", "https://Stackoverflow.com", "https://Stackoverflow.com/users/192831/" ]
Your code is valid. Variable scope in PHP is by function, not block. So you can assign a variable inside the `try` block, and access it outside, so long as they're in the same function.
I believe this is opinion based mostly. The code is correct and it will work as expected as long as the `catch` block always has the `return` statement. if the `catch` block does not return, the flow will continue and the code outside the try/catch block will be executed, and it will fail, because `$o` won't be initial...
32,488,313
In PHP, how do variable scope rules apply to Try/Catch blocks? Do variables declared within the `try` block go out of scope when the block has finished? Or are they in scope until the end of the function/method? For example: ``` try { // This may throw an exception when created! $o = new Pronk(); } catch (Excep...
2015/09/09
[ "https://Stackoverflow.com/questions/32488313", "https://Stackoverflow.com", "https://Stackoverflow.com/users/192831/" ]
I believe this is opinion based mostly. The code is correct and it will work as expected as long as the `catch` block always has the `return` statement. if the `catch` block does not return, the flow will continue and the code outside the try/catch block will be executed, and it will fail, because `$o` won't be initial...
the main concept for the exception handling is that if anything goes wrong inside the "try" block the code will enter into the "catch" block. so if ``` $o = new Pronk(); ``` does not raise any error it will be in scope. we don't have to declare it before try/catch block. your code is perfectly valid.
32,488,313
In PHP, how do variable scope rules apply to Try/Catch blocks? Do variables declared within the `try` block go out of scope when the block has finished? Or are they in scope until the end of the function/method? For example: ``` try { // This may throw an exception when created! $o = new Pronk(); } catch (Excep...
2015/09/09
[ "https://Stackoverflow.com/questions/32488313", "https://Stackoverflow.com", "https://Stackoverflow.com/users/192831/" ]
I believe this is opinion based mostly. The code is correct and it will work as expected as long as the `catch` block always has the `return` statement. if the `catch` block does not return, the flow will continue and the code outside the try/catch block will be executed, and it will fail, because `$o` won't be initial...
As long as your obj is correctly constructed you can expect to use `obj` outside of try/catch block However, suppose that there was an exception during construction. Then your `obj` wouldn't be even constructed inside try block. Therefore, you wouldn't be able to call the functions on `obj` because `obj` was not even ...
32,488,313
In PHP, how do variable scope rules apply to Try/Catch blocks? Do variables declared within the `try` block go out of scope when the block has finished? Or are they in scope until the end of the function/method? For example: ``` try { // This may throw an exception when created! $o = new Pronk(); } catch (Excep...
2015/09/09
[ "https://Stackoverflow.com/questions/32488313", "https://Stackoverflow.com", "https://Stackoverflow.com/users/192831/" ]
Your code is valid. Variable scope in PHP is by function, not block. So you can assign a variable inside the `try` block, and access it outside, so long as they're in the same function.
the main concept for the exception handling is that if anything goes wrong inside the "try" block the code will enter into the "catch" block. so if ``` $o = new Pronk(); ``` does not raise any error it will be in scope. we don't have to declare it before try/catch block. your code is perfectly valid.
32,488,313
In PHP, how do variable scope rules apply to Try/Catch blocks? Do variables declared within the `try` block go out of scope when the block has finished? Or are they in scope until the end of the function/method? For example: ``` try { // This may throw an exception when created! $o = new Pronk(); } catch (Excep...
2015/09/09
[ "https://Stackoverflow.com/questions/32488313", "https://Stackoverflow.com", "https://Stackoverflow.com/users/192831/" ]
Your code is valid. Variable scope in PHP is by function, not block. So you can assign a variable inside the `try` block, and access it outside, so long as they're in the same function.
As long as your obj is correctly constructed you can expect to use `obj` outside of try/catch block However, suppose that there was an exception during construction. Then your `obj` wouldn't be even constructed inside try block. Therefore, you wouldn't be able to call the functions on `obj` because `obj` was not even ...
32,488,313
In PHP, how do variable scope rules apply to Try/Catch blocks? Do variables declared within the `try` block go out of scope when the block has finished? Or are they in scope until the end of the function/method? For example: ``` try { // This may throw an exception when created! $o = new Pronk(); } catch (Excep...
2015/09/09
[ "https://Stackoverflow.com/questions/32488313", "https://Stackoverflow.com", "https://Stackoverflow.com/users/192831/" ]
the main concept for the exception handling is that if anything goes wrong inside the "try" block the code will enter into the "catch" block. so if ``` $o = new Pronk(); ``` does not raise any error it will be in scope. we don't have to declare it before try/catch block. your code is perfectly valid.
As long as your obj is correctly constructed you can expect to use `obj` outside of try/catch block However, suppose that there was an exception during construction. Then your `obj` wouldn't be even constructed inside try block. Therefore, you wouldn't be able to call the functions on `obj` because `obj` was not even ...
43,160
A word used when patients say they feel better when they have been lied to. Not necessarily lied to, but told they have been given a drug or undergone an operation which would supposedly make them healed, which was not actually done.
2011/09/24
[ "https://english.stackexchange.com/questions/43160", "https://english.stackexchange.com", "https://english.stackexchange.com/users/13345/" ]
I believe you are referring to the placebo effect. A placebo given as medicine is a pill that has no medical effect (it's made of sugar, has no taste, no nutritional value -- it just 'feels' like you're taking a pill.) It has been scientifically proven that placebos help people recover from illness. This is a counter ...
I think you are referring to the [placebo effect](http://en.wikipedia.org/wiki/Placebo).
47,806,500
So I am trying to use TinyMCE for an editor within an application. and I have correctly installed the npm module, copied the skin into my assets folder and correctly added the scripts to my angular-cli.json. Here is what I have done with my `EditorComponent`: ``` import { Component, OnInit, AfterViewInit, EventEmitter...
2017/12/14
[ "https://Stackoverflow.com/questions/47806500", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1148618/" ]
I had the same error and got it working in Angular 5: Copy the 3 Folders "plugins", "skins", "themes" from the "node\_modules/tinymce" folder into your apps "assets" folder. Also set the baseURL for tinymce to your assets folder afterwards ``` ngAfterViewInit() { tinymce.baseURL = 'assets'; tinymce.init({ ...
Sorry for being late. Here I found the issue on GitHub: > > <https://github.com/tinymce/tinymce/issues/4164> > > > The temporary solution is to import your scripts like this: ``` "../node_modules/tinymce/tinymce.min.js", "../node_modules/tinymce/themes/modern/theme.min.js" ``` Or wait to the next versi...
47,806,500
So I am trying to use TinyMCE for an editor within an application. and I have correctly installed the npm module, copied the skin into my assets folder and correctly added the scripts to my angular-cli.json. Here is what I have done with my `EditorComponent`: ``` import { Component, OnInit, AfterViewInit, EventEmitter...
2017/12/14
[ "https://Stackoverflow.com/questions/47806500", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1148618/" ]
I had the same error and got it working in Angular 5: Copy the 3 Folders "plugins", "skins", "themes" from the "node\_modules/tinymce" folder into your apps "assets" folder. Also set the baseURL for tinymce to your assets folder afterwards ``` ngAfterViewInit() { tinymce.baseURL = 'assets'; tinymce.init({ ...
You might lost the theme folder bundled with the `tinymce` directory. Now look into the `theme` folder if there is no `modern` folder then got to: <https://www.tiny.cloud/get-tiny/self-hosted/>, download the version you prefer and configure to your project manually. Hope this will help! :)
47,806,500
So I am trying to use TinyMCE for an editor within an application. and I have correctly installed the npm module, copied the skin into my assets folder and correctly added the scripts to my angular-cli.json. Here is what I have done with my `EditorComponent`: ``` import { Component, OnInit, AfterViewInit, EventEmitter...
2017/12/14
[ "https://Stackoverflow.com/questions/47806500", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1148618/" ]
I had the same error and got it working in Angular 5: Copy the 3 Folders "plugins", "skins", "themes" from the "node\_modules/tinymce" folder into your apps "assets" folder. Also set the baseURL for tinymce to your assets folder afterwards ``` ngAfterViewInit() { tinymce.baseURL = 'assets'; tinymce.init({ ...
Well actually I had the same problem but in my Syfomny 4 project with webpack. I've searched in many places and ended up with my own idea which works - at least at this moment. First of all in **js file** that's gonna have tinymce logic add: ``` import tinymce from 'tinymce/tinymce'; import 'tinymce/themes/silver'; ...
47,806,500
So I am trying to use TinyMCE for an editor within an application. and I have correctly installed the npm module, copied the skin into my assets folder and correctly added the scripts to my angular-cli.json. Here is what I have done with my `EditorComponent`: ``` import { Component, OnInit, AfterViewInit, EventEmitter...
2017/12/14
[ "https://Stackoverflow.com/questions/47806500", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1148618/" ]
Well actually I had the same problem but in my Syfomny 4 project with webpack. I've searched in many places and ended up with my own idea which works - at least at this moment. First of all in **js file** that's gonna have tinymce logic add: ``` import tinymce from 'tinymce/tinymce'; import 'tinymce/themes/silver'; ...
Sorry for being late. Here I found the issue on GitHub: > > <https://github.com/tinymce/tinymce/issues/4164> > > > The temporary solution is to import your scripts like this: ``` "../node_modules/tinymce/tinymce.min.js", "../node_modules/tinymce/themes/modern/theme.min.js" ``` Or wait to the next versi...
47,806,500
So I am trying to use TinyMCE for an editor within an application. and I have correctly installed the npm module, copied the skin into my assets folder and correctly added the scripts to my angular-cli.json. Here is what I have done with my `EditorComponent`: ``` import { Component, OnInit, AfterViewInit, EventEmitter...
2017/12/14
[ "https://Stackoverflow.com/questions/47806500", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1148618/" ]
I had a very similar issue, and I discovered that somehow TinyMCE changed the location of where it was seeking the asset archives from ``` "/tinymce/skins/", "/tinymce/themes/", "/tinymce/plugins/", ``` to ``` "/skins/", "/themes/", "/plugins/", ``` Because of this the output in the assets config in the Angular.j...
Sorry for being late. Here I found the issue on GitHub: > > <https://github.com/tinymce/tinymce/issues/4164> > > > The temporary solution is to import your scripts like this: ``` "../node_modules/tinymce/tinymce.min.js", "../node_modules/tinymce/themes/modern/theme.min.js" ``` Or wait to the next versi...
47,806,500
So I am trying to use TinyMCE for an editor within an application. and I have correctly installed the npm module, copied the skin into my assets folder and correctly added the scripts to my angular-cli.json. Here is what I have done with my `EditorComponent`: ``` import { Component, OnInit, AfterViewInit, EventEmitter...
2017/12/14
[ "https://Stackoverflow.com/questions/47806500", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1148618/" ]
Well actually I had the same problem but in my Syfomny 4 project with webpack. I've searched in many places and ended up with my own idea which works - at least at this moment. First of all in **js file** that's gonna have tinymce logic add: ``` import tinymce from 'tinymce/tinymce'; import 'tinymce/themes/silver'; ...
You might lost the theme folder bundled with the `tinymce` directory. Now look into the `theme` folder if there is no `modern` folder then got to: <https://www.tiny.cloud/get-tiny/self-hosted/>, download the version you prefer and configure to your project manually. Hope this will help! :)
47,806,500
So I am trying to use TinyMCE for an editor within an application. and I have correctly installed the npm module, copied the skin into my assets folder and correctly added the scripts to my angular-cli.json. Here is what I have done with my `EditorComponent`: ``` import { Component, OnInit, AfterViewInit, EventEmitter...
2017/12/14
[ "https://Stackoverflow.com/questions/47806500", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1148618/" ]
I had a very similar issue, and I discovered that somehow TinyMCE changed the location of where it was seeking the asset archives from ``` "/tinymce/skins/", "/tinymce/themes/", "/tinymce/plugins/", ``` to ``` "/skins/", "/themes/", "/plugins/", ``` Because of this the output in the assets config in the Angular.j...
You might lost the theme folder bundled with the `tinymce` directory. Now look into the `theme` folder if there is no `modern` folder then got to: <https://www.tiny.cloud/get-tiny/self-hosted/>, download the version you prefer and configure to your project manually. Hope this will help! :)
47,806,500
So I am trying to use TinyMCE for an editor within an application. and I have correctly installed the npm module, copied the skin into my assets folder and correctly added the scripts to my angular-cli.json. Here is what I have done with my `EditorComponent`: ``` import { Component, OnInit, AfterViewInit, EventEmitter...
2017/12/14
[ "https://Stackoverflow.com/questions/47806500", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1148618/" ]
I had a very similar issue, and I discovered that somehow TinyMCE changed the location of where it was seeking the asset archives from ``` "/tinymce/skins/", "/tinymce/themes/", "/tinymce/plugins/", ``` to ``` "/skins/", "/themes/", "/plugins/", ``` Because of this the output in the assets config in the Angular.j...
Well actually I had the same problem but in my Syfomny 4 project with webpack. I've searched in many places and ended up with my own idea which works - at least at this moment. First of all in **js file** that's gonna have tinymce logic add: ``` import tinymce from 'tinymce/tinymce'; import 'tinymce/themes/silver'; ...
13,546,654
I found this function on stackoverflow which concates two strings together. Here is the function: ``` char* concatstring(char *s1,char *s2) { char *result = malloc(strlen(s1)+strlen(s2)+1); strcpy(result,s1); strcat(result,s2); return result; } ``` My question is, why do we add 1 to the malloc call?
2012/11/24
[ "https://Stackoverflow.com/questions/13546654", "https://Stackoverflow.com", "https://Stackoverflow.com/users/135605/" ]
It's because in C "strings" are stored as arrays of chars followed by a null byte. This is by convention. Consequently, null bytes may not appear inside any C string. However, the actual string itself does not contain the null byte (which is just part of the *representation* of the string), and so `strlen` reports the...
You need to allocate space for the '\0' (NULL character) which is used to terminate strings in C. i.e. the string "cat" is actually "cat\0".
13,546,654
I found this function on stackoverflow which concates two strings together. Here is the function: ``` char* concatstring(char *s1,char *s2) { char *result = malloc(strlen(s1)+strlen(s2)+1); strcpy(result,s1); strcat(result,s2); return result; } ``` My question is, why do we add 1 to the malloc call?
2012/11/24
[ "https://Stackoverflow.com/questions/13546654", "https://Stackoverflow.com", "https://Stackoverflow.com/users/135605/" ]
You need to allocate space for the '\0' (NULL character) which is used to terminate strings in C. i.e. the string "cat" is actually "cat\0".
If the string is "cat": ``` char * mystring = "cat"; ``` Then strlen(mystring), would return 3. But in reality it takes 4 bytes to store mystring, with one byte to store null character. So if you have two strings, "dog" and "cat", their length will be 3 and 3 , although the number of bytes required to store them w...
13,546,654
I found this function on stackoverflow which concates two strings together. Here is the function: ``` char* concatstring(char *s1,char *s2) { char *result = malloc(strlen(s1)+strlen(s2)+1); strcpy(result,s1); strcat(result,s2); return result; } ``` My question is, why do we add 1 to the malloc call?
2012/11/24
[ "https://Stackoverflow.com/questions/13546654", "https://Stackoverflow.com", "https://Stackoverflow.com/users/135605/" ]
It's because in C "strings" are stored as arrays of chars followed by a null byte. This is by convention. Consequently, null bytes may not appear inside any C string. However, the actual string itself does not contain the null byte (which is just part of the *representation* of the string), and so `strlen` reports the...
If the string is "cat": ``` char * mystring = "cat"; ``` Then strlen(mystring), would return 3. But in reality it takes 4 bytes to store mystring, with one byte to store null character. So if you have two strings, "dog" and "cat", their length will be 3 and 3 , although the number of bytes required to store them w...
24,119,557
I'm trying to work with build flavors. In my build.gradle I've defined 2 flavors, a normal flavor and an admin flavor. Basicly, the admin flavor has an extra button on the main activity. I understand that I can define different packages/classes for different flavors. But is there a way to make a sort of if case to ad...
2014/06/09
[ "https://Stackoverflow.com/questions/24119557", "https://Stackoverflow.com", "https://Stackoverflow.com/users/916705/" ]
`BuildConfig.FLAVOR` gives you combined product flavor. So if you have only one flavor dimension: ``` productFlavors { normal { } admin { } } ``` Then you can just check it: ``` if (BuildConfig.FLAVOR.equals("admin")) { ... } ``` But if you have multiple flavor dimensions: ``` flavorDimensio...
To avoid plain string in the condition, you can define a boolean property: ``` productFlavors { normal { flavorDimension "access" buildConfigField 'boolean', 'IS_ADMIN', 'false' } admin { flavorDimension "access" buildConfigField 'boolean', 'IS_ADMIN', 'true' } } ``` ...
24,119,557
I'm trying to work with build flavors. In my build.gradle I've defined 2 flavors, a normal flavor and an admin flavor. Basicly, the admin flavor has an extra button on the main activity. I understand that I can define different packages/classes for different flavors. But is there a way to make a sort of if case to ad...
2014/06/09
[ "https://Stackoverflow.com/questions/24119557", "https://Stackoverflow.com", "https://Stackoverflow.com/users/916705/" ]
`BuildConfig.FLAVOR` gives you combined product flavor. So if you have only one flavor dimension: ``` productFlavors { normal { } admin { } } ``` Then you can just check it: ``` if (BuildConfig.FLAVOR.equals("admin")) { ... } ``` But if you have multiple flavor dimensions: ``` flavorDimensio...
You can define either different build configuration fields or different resource values (like string values) per flavor, e.g. (as per [Google's gradle tips and recipes](https://developer.android.com/studio/build/gradle-tips)), e.g., ``` android { ... buildTypes { release { // These values are defined on...
24,119,557
I'm trying to work with build flavors. In my build.gradle I've defined 2 flavors, a normal flavor and an admin flavor. Basicly, the admin flavor has an extra button on the main activity. I understand that I can define different packages/classes for different flavors. But is there a way to make a sort of if case to ad...
2014/06/09
[ "https://Stackoverflow.com/questions/24119557", "https://Stackoverflow.com", "https://Stackoverflow.com/users/916705/" ]
`BuildConfig.FLAVOR` gives you combined product flavor. So if you have only one flavor dimension: ``` productFlavors { normal { } admin { } } ``` Then you can just check it: ``` if (BuildConfig.FLAVOR.equals("admin")) { ... } ``` But if you have multiple flavor dimensions: ``` flavorDimensio...
You can try this way ``` productFlavors { def app_name = "you app name" development { versionCode 1 versionName "1.0.1" buildConfigField 'String', 'varibalename', "" } release { versionCode 1 versionName "1.0.1" bui...
24,119,557
I'm trying to work with build flavors. In my build.gradle I've defined 2 flavors, a normal flavor and an admin flavor. Basicly, the admin flavor has an extra button on the main activity. I understand that I can define different packages/classes for different flavors. But is there a way to make a sort of if case to ad...
2014/06/09
[ "https://Stackoverflow.com/questions/24119557", "https://Stackoverflow.com", "https://Stackoverflow.com/users/916705/" ]
To avoid plain string in the condition, you can define a boolean property: ``` productFlavors { normal { flavorDimension "access" buildConfigField 'boolean', 'IS_ADMIN', 'false' } admin { flavorDimension "access" buildConfigField 'boolean', 'IS_ADMIN', 'true' } } ``` ...
You can define either different build configuration fields or different resource values (like string values) per flavor, e.g. (as per [Google's gradle tips and recipes](https://developer.android.com/studio/build/gradle-tips)), e.g., ``` android { ... buildTypes { release { // These values are defined on...
24,119,557
I'm trying to work with build flavors. In my build.gradle I've defined 2 flavors, a normal flavor and an admin flavor. Basicly, the admin flavor has an extra button on the main activity. I understand that I can define different packages/classes for different flavors. But is there a way to make a sort of if case to ad...
2014/06/09
[ "https://Stackoverflow.com/questions/24119557", "https://Stackoverflow.com", "https://Stackoverflow.com/users/916705/" ]
To avoid plain string in the condition, you can define a boolean property: ``` productFlavors { normal { flavorDimension "access" buildConfigField 'boolean', 'IS_ADMIN', 'false' } admin { flavorDimension "access" buildConfigField 'boolean', 'IS_ADMIN', 'true' } } ``` ...
You can try this way ``` productFlavors { def app_name = "you app name" development { versionCode 1 versionName "1.0.1" buildConfigField 'String', 'varibalename', "" } release { versionCode 1 versionName "1.0.1" bui...
18,480,032
I hopefully have a very simple question but if I have the code ``` console.log("my args", args); ``` and the result that comes back is ``` Object { pageList1=null} ``` how do i get the name pageList1 it doesnt matter that this is null i just need the name pageList1.. this is what i have tried ``` parse: func...
2013/08/28
[ "https://Stackoverflow.com/questions/18480032", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1658861/" ]
you should use [for in](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for...in). ``` for (variable in object) { console.log(variable) } ```
Hope this will help: ``` var keys = []; for (x in args) { console.log("Key=>" + x +", val="+args[x]); keys.push (x); //where x is the key } alert(keys); ```
18,480,032
I hopefully have a very simple question but if I have the code ``` console.log("my args", args); ``` and the result that comes back is ``` Object { pageList1=null} ``` how do i get the name pageList1 it doesnt matter that this is null i just need the name pageList1.. this is what i have tried ``` parse: func...
2013/08/28
[ "https://Stackoverflow.com/questions/18480032", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1658861/" ]
`Object.keys` is a fine way to access the keys of an object, but it does give you *all* keys, in an array of strings. Incidentally, your object happens to have only one key, but the function still yields an array, albeit of one string. (In fact, it would be terribly inconvenient if it treated single-key objects as a sp...
you should use [for in](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for...in). ``` for (variable in object) { console.log(variable) } ```
18,480,032
I hopefully have a very simple question but if I have the code ``` console.log("my args", args); ``` and the result that comes back is ``` Object { pageList1=null} ``` how do i get the name pageList1 it doesnt matter that this is null i just need the name pageList1.. this is what i have tried ``` parse: func...
2013/08/28
[ "https://Stackoverflow.com/questions/18480032", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1658861/" ]
`Object.keys` is a fine way to access the keys of an object, but it does give you *all* keys, in an array of strings. Incidentally, your object happens to have only one key, but the function still yields an array, albeit of one string. (In fact, it would be terribly inconvenient if it treated single-key objects as a sp...
Hope this will help: ``` var keys = []; for (x in args) { console.log("Key=>" + x +", val="+args[x]); keys.push (x); //where x is the key } alert(keys); ```
23,673,216
I am getting this error when I run my first "sqlite" app on iPhone simulator. xcode says no issue but when i am clicking on my app it throws error in debug window. i have placed all necessary code here please help me to connect "sqlite" and remove these errors. The error is as follows: ``` Terminating app due to unca...
2014/05/15
[ "https://Stackoverflow.com/questions/23673216", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3522901/" ]
you unused the property `departmentbox` into `departmentTextField` on your `ViewController` but you didn't to remove the `departmentbox` from storyboard, go to your connection inspector and remove the unused key `department box`, and then build your app ![enter image description here](https://i.stack.imgur.com/fOQvJ...
that's because you renamed you property `departmentbox` into `departmentTextField` on `ViewController` but apparently forgot to update storyboard Besides, there is no need to use ivars, declare private properties if you don't need to expose your outlets in `.h` file: in your `.m` declare ``` @interface UIViewControl...
23,673,216
I am getting this error when I run my first "sqlite" app on iPhone simulator. xcode says no issue but when i am clicking on my app it throws error in debug window. i have placed all necessary code here please help me to connect "sqlite" and remove these errors. The error is as follows: ``` Terminating app due to unca...
2014/05/15
[ "https://Stackoverflow.com/questions/23673216", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3522901/" ]
You have connected the UITextField in IB with "departmentbox". ``` @property (weak, nonatomic) IBOutlet UITextField *departmentbox; ``` But later you have commented the above lines in your view controller. When you try to run the app,IB is looking for the "departmentbox" in viewcontroller. That causes the crash. d...
that's because you renamed you property `departmentbox` into `departmentTextField` on `ViewController` but apparently forgot to update storyboard Besides, there is no need to use ivars, declare private properties if you don't need to expose your outlets in `.h` file: in your `.m` declare ``` @interface UIViewControl...
23,673,216
I am getting this error when I run my first "sqlite" app on iPhone simulator. xcode says no issue but when i am clicking on my app it throws error in debug window. i have placed all necessary code here please help me to connect "sqlite" and remove these errors. The error is as follows: ``` Terminating app due to unca...
2014/05/15
[ "https://Stackoverflow.com/questions/23673216", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3522901/" ]
you unused the property `departmentbox` into `departmentTextField` on your `ViewController` but you didn't to remove the `departmentbox` from storyboard, go to your connection inspector and remove the unused key `department box`, and then build your app ![enter image description here](https://i.stack.imgur.com/fOQvJ...
This error often comes when an unknown property is associated in your xib file. It may happen if you rename a property after the xib association. Here, the associated property was **departmentbox**, but renamed as **departmentTextField**
23,673,216
I am getting this error when I run my first "sqlite" app on iPhone simulator. xcode says no issue but when i am clicking on my app it throws error in debug window. i have placed all necessary code here please help me to connect "sqlite" and remove these errors. The error is as follows: ``` Terminating app due to unca...
2014/05/15
[ "https://Stackoverflow.com/questions/23673216", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3522901/" ]
You have connected the UITextField in IB with "departmentbox". ``` @property (weak, nonatomic) IBOutlet UITextField *departmentbox; ``` But later you have commented the above lines in your view controller. When you try to run the app,IB is looking for the "departmentbox" in viewcontroller. That causes the crash. d...
This error often comes when an unknown property is associated in your xib file. It may happen if you rename a property after the xib association. Here, the associated property was **departmentbox**, but renamed as **departmentTextField**
23,673,216
I am getting this error when I run my first "sqlite" app on iPhone simulator. xcode says no issue but when i am clicking on my app it throws error in debug window. i have placed all necessary code here please help me to connect "sqlite" and remove these errors. The error is as follows: ``` Terminating app due to unca...
2014/05/15
[ "https://Stackoverflow.com/questions/23673216", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3522901/" ]
you unused the property `departmentbox` into `departmentTextField` on your `ViewController` but you didn't to remove the `departmentbox` from storyboard, go to your connection inspector and remove the unused key `department box`, and then build your app ![enter image description here](https://i.stack.imgur.com/fOQvJ...
Perhaps you had declared an iVar named "departmentbox" in your view controller, created a connection in xib file to that iVar and later on you deleted/renamed this iVar but forgot to delete the connection created in xib file. Can you check the xib file of your view controller class and see if there is any connection to...
23,673,216
I am getting this error when I run my first "sqlite" app on iPhone simulator. xcode says no issue but when i am clicking on my app it throws error in debug window. i have placed all necessary code here please help me to connect "sqlite" and remove these errors. The error is as follows: ``` Terminating app due to unca...
2014/05/15
[ "https://Stackoverflow.com/questions/23673216", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3522901/" ]
you unused the property `departmentbox` into `departmentTextField` on your `ViewController` but you didn't to remove the `departmentbox` from storyboard, go to your connection inspector and remove the unused key `department box`, and then build your app ![enter image description here](https://i.stack.imgur.com/fOQvJ...
You have connected the UITextField in IB with "departmentbox". ``` @property (weak, nonatomic) IBOutlet UITextField *departmentbox; ``` But later you have commented the above lines in your view controller. When you try to run the app,IB is looking for the "departmentbox" in viewcontroller. That causes the crash. d...
23,673,216
I am getting this error when I run my first "sqlite" app on iPhone simulator. xcode says no issue but when i am clicking on my app it throws error in debug window. i have placed all necessary code here please help me to connect "sqlite" and remove these errors. The error is as follows: ``` Terminating app due to unca...
2014/05/15
[ "https://Stackoverflow.com/questions/23673216", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3522901/" ]
You have connected the UITextField in IB with "departmentbox". ``` @property (weak, nonatomic) IBOutlet UITextField *departmentbox; ``` But later you have commented the above lines in your view controller. When you try to run the app,IB is looking for the "departmentbox" in viewcontroller. That causes the crash. d...
Perhaps you had declared an iVar named "departmentbox" in your view controller, created a connection in xib file to that iVar and later on you deleted/renamed this iVar but forgot to delete the connection created in xib file. Can you check the xib file of your view controller class and see if there is any connection to...
282,784
I'm using Sybase ASE version 16.0.0.1915, (follows t-sql syntax) and trying to create a new trigger. This new trigger emulates another existing trigger, however is slightly modified. It would be a whole lot harder to modify the existing trigger to address both "workflows", so copying into a new trigger with modified de...
2021/01/07
[ "https://dba.stackexchange.com/questions/282784", "https://dba.stackexchange.com", "https://dba.stackexchange.com/users/198464/" ]
There are 4x different RDBMS products under the `Sybase` name ... `Adaptiver Server Enterprise (ASE)`, `SQLAnywhere`, `IQ` and `Advantage`. The 4x products do **not** share a common SQL language/syntax. The question references a link for the `create trigger` syntax in `ASE`. The sample code in the question appears to...
@mustaccio has already answered your question in the comments: place it just before `AS` at the top of the trigger. You have a **much bigger** problem though. Your trigger does not deal with multi-row inserts. It needs a full rewrite. I hope I've got these joins right, as I don't have your full relational model: ``` ...
27,550,376
I want to use custom JSON deserializer for some classes(**Role** here) but I can't get it working. The custom deserializer just isn't called. I use Spring Boot 1.2. Deserializer: ``` public class ModelDeserializer extends JsonDeserializer<Role> { @Override public Role deserialize(JsonParser jsonParser, Dese...
2014/12/18
[ "https://Stackoverflow.com/questions/27550376", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1712934/" ]
First of all you don't need to override `Jackson2ObjectMapperBuilder` to add custom deserializer. This approach should be used when you can't add `@JsonDeserialize` annotation. You should use `@JsonDeserialize` or override `Jackson2ObjectMapperBuilder`. What is missed is the `@RequestBody` annotation: ``` @RestContro...
There is also another pretty interesting solution which can be helpful in case when you want to modify your JSON body before calling default deserializer. And let's imagine that you need to use some additional bean for that (use `@Autowire` mechanism) Let's image situation, that you have the following controller: ```...
5,428,199
Height of a div I'm trying to set the size of a div according to its content. See the complete code [here](http://jsfiddle.net/Ridermansb/nqSxC/6/). Basically my problem is in the div: content In the HTML code look for the comment: wrongly There had to add a tag p, I'm giving it a clear that the div align to the end...
2011/03/25
[ "https://Stackoverflow.com/questions/5428199", "https://Stackoverflow.com", "https://Stackoverflow.com/users/491181/" ]
To make a container expand to fill floated elements, give it an overflow property: ``` div.wrapper { overflow: auto; } ```
A better method than using an empty `<div class="clear">` is to use the 'cearfix' method. This is an example borrowed straight from [HTML5Bolierplate](http://html5boilerplate.com/), just apply it to the div that is giving you trouble. In your case `#content` will become `#content.clearfix` ``` /* The Magnificent Cl...
5,428,199
Height of a div I'm trying to set the size of a div according to its content. See the complete code [here](http://jsfiddle.net/Ridermansb/nqSxC/6/). Basically my problem is in the div: content In the HTML code look for the comment: wrongly There had to add a tag p, I'm giving it a clear that the div align to the end...
2011/03/25
[ "https://Stackoverflow.com/questions/5428199", "https://Stackoverflow.com", "https://Stackoverflow.com/users/491181/" ]
Add a "overflow:hidden;" to the div#content so it will look like the following. You won't need a separate clear property and a p tag. Good luck :) ``` div#content { margin:auto 40px; width:200; border:2px solid red; overflow:hidden; } ```
To make a container expand to fill floated elements, give it an overflow property: ``` div.wrapper { overflow: auto; } ```
5,428,199
Height of a div I'm trying to set the size of a div according to its content. See the complete code [here](http://jsfiddle.net/Ridermansb/nqSxC/6/). Basically my problem is in the div: content In the HTML code look for the comment: wrongly There had to add a tag p, I'm giving it a clear that the div align to the end...
2011/03/25
[ "https://Stackoverflow.com/questions/5428199", "https://Stackoverflow.com", "https://Stackoverflow.com/users/491181/" ]
Add a "overflow:hidden;" to the div#content so it will look like the following. You won't need a separate clear property and a p tag. Good luck :) ``` div#content { margin:auto 40px; width:200; border:2px solid red; overflow:hidden; } ```
A better method than using an empty `<div class="clear">` is to use the 'cearfix' method. This is an example borrowed straight from [HTML5Bolierplate](http://html5boilerplate.com/), just apply it to the div that is giving you trouble. In your case `#content` will become `#content.clearfix` ``` /* The Magnificent Cl...
101,061
Consider a random variable $\tau$: $$\tau := \inf \left\{ {k = \sigma , \ldots ,T:S\_k \ge u} \right\}\wedge T,$$ where $\sigma$ is a stopping time, $S\_k$ - stochastic process, $T, u$ are constants and $a\wedge b=\min(a,b)$. I would like to prove that $\tau$ is a stopping time, i.e. I need to show that $\{ \tau\le k...
2012/01/21
[ "https://math.stackexchange.com/questions/101061", "https://math.stackexchange.com", "https://math.stackexchange.com/users/15871/" ]
Let $\mathcal F$ denote the filtration $(\mathcal F\_n)\_{n\geqslant0}$ and $S$ the process $(S\_n)\_{n\geqslant0}$. The result follows from the fact that, for every $0\leqslant k\leqslant T-1$, $$ [\tau\leqslant k]=\bigcup\_{i=0}^kA\_i^k$$ with $$A\_i^k=[\sigma=i]\cup\bigcup\_{j=i}^k[S\_j\geqslant u] $$ Fix $0\leqsla...
Is it also correct if we replace $S\_k$ by a right-continuous stochastic process $X\_t$, a right-continuous filtration $\mathcal{F}\_t$, an open set $B$ and a stopping time $S$ with values in $[0,\infty[$? Or to be more precise i formulate it as a Theorem: Theorem: Assume we have a right-continuous stochastic process ...