qid
int64
1
74.7M
question
stringlengths
0
58.3k
date
stringlengths
10
10
metadata
list
response_j
stringlengths
2
48.3k
response_k
stringlengths
2
40.5k
72,889,304
I'm writing a program that detects duplicate frames in h264 encoded video. I'm using the `ac-ffmpeg` crate Here's my code: ``` use std::fs::File; use ac_ffmpeg::{ codec::{ video::{frame::Planes, VideoDecoder}, CodecParameters, Decoder, }, format::{ demuxer::{Demuxer, DemuxerWithStr...
2022/07/06
[ "https://Stackoverflow.com/questions/72889304", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8422322/" ]
You need to keep the *frame* itself from one loop iteration to the next instead of the planes. So have a `prev_frame` variable instead of `prev_planes`: ``` let mut prev_frame = None; let mut diffs = Vec::<(i64, u64)>::new(); while let Some(packet) = demuxer.take()? { if packet.stream_index() != stream_index { ...
It's a bit tricky to reproduce this, so I'll try to answer from the top of my head. Did you try: ```rust let planes = frame.planes().to_owned(); ``` Mainly you're giving ownership of `planes` (i.e. the child), while the parent (`frame`) goes out of scope. Why `to_owned`? (if the child is a ref, clone will return a...
72,889,304
I'm writing a program that detects duplicate frames in h264 encoded video. I'm using the `ac-ffmpeg` crate Here's my code: ``` use std::fs::File; use ac_ffmpeg::{ codec::{ video::{frame::Planes, VideoDecoder}, CodecParameters, Decoder, }, format::{ demuxer::{Demuxer, DemuxerWithStr...
2022/07/06
[ "https://Stackoverflow.com/questions/72889304", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8422322/" ]
[VideoFrame](https://docs.rs/ac-ffmpeg/0.17.4/ac_ffmpeg/codec/video/frame/struct.VideoFrame.html) doesn't allow you to *take* the planes, it only allows you to *borrow* them from the `frame`. You can see that because a lifetime is attached to the planes: ```rust pub fn planes(&self) -> Planes<'_> ``` The `'_` lifet...
It's a bit tricky to reproduce this, so I'll try to answer from the top of my head. Did you try: ```rust let planes = frame.planes().to_owned(); ``` Mainly you're giving ownership of `planes` (i.e. the child), while the parent (`frame`) goes out of scope. Why `to_owned`? (if the child is a ref, clone will return a...
72,889,304
I'm writing a program that detects duplicate frames in h264 encoded video. I'm using the `ac-ffmpeg` crate Here's my code: ``` use std::fs::File; use ac_ffmpeg::{ codec::{ video::{frame::Planes, VideoDecoder}, CodecParameters, Decoder, }, format::{ demuxer::{Demuxer, DemuxerWithStr...
2022/07/06
[ "https://Stackoverflow.com/questions/72889304", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8422322/" ]
[VideoFrame](https://docs.rs/ac-ffmpeg/0.17.4/ac_ffmpeg/codec/video/frame/struct.VideoFrame.html) doesn't allow you to *take* the planes, it only allows you to *borrow* them from the `frame`. You can see that because a lifetime is attached to the planes: ```rust pub fn planes(&self) -> Planes<'_> ``` The `'_` lifet...
You need to keep the *frame* itself from one loop iteration to the next instead of the planes. So have a `prev_frame` variable instead of `prev_planes`: ``` let mut prev_frame = None; let mut diffs = Vec::<(i64, u64)>::new(); while let Some(packet) = demuxer.take()? { if packet.stream_index() != stream_index { ...
42,253,645
I have a HTML table with several rows. In each row there is a question (text) in the first column, and 3 radio buttons to answer Yes, No, or N/A, in the 2nd, 3rd, and 4th columns, respectively. I want to be able to change the font color of the text in the first column when either of the radio buttons in the same row i...
2017/02/15
[ "https://Stackoverflow.com/questions/42253645", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1062227/" ]
You can set an event listener. You can also get the selected value to set the color based on the value if you want. ```js $("input[name='student']").change(function(){ console.log($(this).val()); $(this).closest('tr').children('td').first().css('color', '#455434'); }); ``` ```html <script src="https://ajax....
``` $(document).ready(function() { $('input[type=radio][name=student]').change(function() { $("td:first-child").css("color", "red"); }); }); ``` This could change the question in the first td cell's font colour when a radio button is selected. If you wanted you could then add conditional statements to ...
42,253,645
I have a HTML table with several rows. In each row there is a question (text) in the first column, and 3 radio buttons to answer Yes, No, or N/A, in the 2nd, 3rd, and 4th columns, respectively. I want to be able to change the font color of the text in the first column when either of the radio buttons in the same row i...
2017/02/15
[ "https://Stackoverflow.com/questions/42253645", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1062227/" ]
You can set an event listener. You can also get the selected value to set the color based on the value if you want. ```js $("input[name='student']").change(function(){ console.log($(this).val()); $(this).closest('tr').children('td').first().css('color', '#455434'); }); ``` ```html <script src="https://ajax....
You can traverse the DOM to find the first column in the row that is clicked, and change the color based on which radio was selected. Here is a [Fiddle Demo](https://jsfiddle.net/zephyr_hex/yoyppjda/). ``` $('input:radio').on('click', function() { //clear any existing background colors in the first column $('tabl...
21,108,762
I am creating setup of large data approximetly 10 GB with NSIS Script and trying to create a single setup (exe). Its giving an Error - Internal compiler error #12345: error mmapping file (xxxxxxxxxx, xxxxxxxx) is out of range. Note: you may have one or two (large) stale temporary file(s) left in your temporary direct...
2014/01/14
[ "https://Stackoverflow.com/questions/21108762", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1758962/" ]
NSIS installers are limited to 2Gb. If you absolutely need it to be one file and you want to continue to use NSIS you have to append the data to the end of the generated setup. I'm not sure I would recommend that approach but it could work if the appended data is a zip file (or some other format with the header at the...
I have used <https://sourceforge.net/projects/nsisbi/> instead of normal NSIS. It solved the problem.
21,108,762
I am creating setup of large data approximetly 10 GB with NSIS Script and trying to create a single setup (exe). Its giving an Error - Internal compiler error #12345: error mmapping file (xxxxxxxxxx, xxxxxxxx) is out of range. Note: you may have one or two (large) stale temporary file(s) left in your temporary direct...
2014/01/14
[ "https://Stackoverflow.com/questions/21108762", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1758962/" ]
NSIS installers are limited to 2Gb. If you absolutely need it to be one file and you want to continue to use NSIS you have to append the data to the end of the generated setup. I'm not sure I would recommend that approach but it could work if the appended data is a zip file (or some other format with the header at the...
I was using Silent Install Builder 5 and received this same error with a package installer that had LESS that 2 GB total. Once I determined that the NSIS compiler was to blame, I began experimenting with several possible solutions and here's what worked: I downloaded the newer NSISBI compiler from here <https://sourcef...
21,108,762
I am creating setup of large data approximetly 10 GB with NSIS Script and trying to create a single setup (exe). Its giving an Error - Internal compiler error #12345: error mmapping file (xxxxxxxxxx, xxxxxxxx) is out of range. Note: you may have one or two (large) stale temporary file(s) left in your temporary direct...
2014/01/14
[ "https://Stackoverflow.com/questions/21108762", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1758962/" ]
I have used <https://sourceforge.net/projects/nsisbi/> instead of normal NSIS. It solved the problem.
I was using Silent Install Builder 5 and received this same error with a package installer that had LESS that 2 GB total. Once I determined that the NSIS compiler was to blame, I began experimenting with several possible solutions and here's what worked: I downloaded the newer NSISBI compiler from here <https://sourcef...
50,295
I want to create a VF page inside which I will have component, where the user will have the flexibility to change the component without touching the code of the page. Dynamic, like this: ``` <apex:page> <!-- could be defined in a label or custom setting --> <c:{{{customer_defined_component_name}}} /> </apex:pa...
2014/09/23
[ "https://salesforce.stackexchange.com/questions/50295", "https://salesforce.stackexchange.com", "https://salesforce.stackexchange.com/users/11828/" ]
You referred to `<c:{!@label.ComponentName} />` as the kind of solution you want. While it probably won't involve Custom Labels, you are definitely close with Dynamic Visualforce. To do this in a package does require a number of moving parts, but the following is probably the most native-friendly and future-proof appr...
You can dynamically display/hide page block sections by having the **rendered** attribute point to true/false checkbox field (this can be editable or calculated). When the checkbox is true, the page block section displays, if false, it's hidden. apex:pageBlockSection title="My Section Title" id="section1" **rendered=*...
50,295
I want to create a VF page inside which I will have component, where the user will have the flexibility to change the component without touching the code of the page. Dynamic, like this: ``` <apex:page> <!-- could be defined in a label or custom setting --> <c:{{{customer_defined_component_name}}} /> </apex:pa...
2014/09/23
[ "https://salesforce.stackexchange.com/questions/50295", "https://salesforce.stackexchange.com", "https://salesforce.stackexchange.com/users/11828/" ]
You referred to `<c:{!@label.ComponentName} />` as the kind of solution you want. While it probably won't involve Custom Labels, you are definitely close with Dynamic Visualforce. To do this in a package does require a number of moving parts, but the following is probably the most native-friendly and future-proof appr...
I would agree with David, there is a lot of capabilities with the rendered attribute, or basic HTML techniques for hiding and showing data. In addition to that, there is an an actual "Dynamic Visualforce Component" <https://developer.salesforce.com/page/Dynamic_Visualforce_Components> that could be leveraged to accompl...
378,225
I have a MacBook Pro with a touchpad, and the only way I can figure out how to use the right click in my remote desktop session is by plugging in a mouse. `Ctrl`-click (what I usually use for right click), doesn't work, as `ctrl` is used in Windows for other things. Is there an alternative?
2012/01/14
[ "https://superuser.com/questions/378225", "https://superuser.com", "https://superuser.com/users/113585/" ]
**Microsoft Remote Desktop Connection Keyboard Shortcuts** * **CTRL + SHIFT + CLICK:** Right Click (OS X) * **CTRL + ALT + END :** Opens the Microsoft Widnows NT security dialog box. * **ALT + PAGEUP :** Switch between programs left to right. * **ALT + PAGEDOWN :** Switch between programs right to left. * **ALT + INSE...
This is kind of embarrassing, but the real problem was I didn't know how to right click with a touchpad on the macbook (it was still less than a month old). Update: You can do this by clicking or tapping with both fingers at the same time.
378,225
I have a MacBook Pro with a touchpad, and the only way I can figure out how to use the right click in my remote desktop session is by plugging in a mouse. `Ctrl`-click (what I usually use for right click), doesn't work, as `ctrl` is used in Windows for other things. Is there an alternative?
2012/01/14
[ "https://superuser.com/questions/378225", "https://superuser.com", "https://superuser.com/users/113585/" ]
**Microsoft Remote Desktop Connection Keyboard Shortcuts** * **CTRL + SHIFT + CLICK:** Right Click (OS X) * **CTRL + ALT + END :** Opens the Microsoft Widnows NT security dialog box. * **ALT + PAGEUP :** Switch between programs left to right. * **ALT + PAGEDOWN :** Switch between programs right to left. * **ALT + INSE...
Either using two finger tap, or two finger "click" (by pressing down on the touchpad).
378,225
I have a MacBook Pro with a touchpad, and the only way I can figure out how to use the right click in my remote desktop session is by plugging in a mouse. `Ctrl`-click (what I usually use for right click), doesn't work, as `ctrl` is used in Windows for other things. Is there an alternative?
2012/01/14
[ "https://superuser.com/questions/378225", "https://superuser.com", "https://superuser.com/users/113585/" ]
**Microsoft Remote Desktop Connection Keyboard Shortcuts** * **CTRL + SHIFT + CLICK:** Right Click (OS X) * **CTRL + ALT + END :** Opens the Microsoft Widnows NT security dialog box. * **ALT + PAGEUP :** Switch between programs left to right. * **ALT + PAGEDOWN :** Switch between programs right to left. * **ALT + INSE...
I found that you can simulate the RIGHT-CLICK as follows; use the arrow to position where you wish to right-click then use the keyboard icon and select SHIFT and F10 When you tap the keyboard pad to disappear you hopefully will have the right-click menu you want.
378,225
I have a MacBook Pro with a touchpad, and the only way I can figure out how to use the right click in my remote desktop session is by plugging in a mouse. `Ctrl`-click (what I usually use for right click), doesn't work, as `ctrl` is used in Windows for other things. Is there an alternative?
2012/01/14
[ "https://superuser.com/questions/378225", "https://superuser.com", "https://superuser.com/users/113585/" ]
Either using two finger tap, or two finger "click" (by pressing down on the touchpad).
This is kind of embarrassing, but the real problem was I didn't know how to right click with a touchpad on the macbook (it was still less than a month old). Update: You can do this by clicking or tapping with both fingers at the same time.
378,225
I have a MacBook Pro with a touchpad, and the only way I can figure out how to use the right click in my remote desktop session is by plugging in a mouse. `Ctrl`-click (what I usually use for right click), doesn't work, as `ctrl` is used in Windows for other things. Is there an alternative?
2012/01/14
[ "https://superuser.com/questions/378225", "https://superuser.com", "https://superuser.com/users/113585/" ]
This is kind of embarrassing, but the real problem was I didn't know how to right click with a touchpad on the macbook (it was still less than a month old). Update: You can do this by clicking or tapping with both fingers at the same time.
I found that you can simulate the RIGHT-CLICK as follows; use the arrow to position where you wish to right-click then use the keyboard icon and select SHIFT and F10 When you tap the keyboard pad to disappear you hopefully will have the right-click menu you want.
378,225
I have a MacBook Pro with a touchpad, and the only way I can figure out how to use the right click in my remote desktop session is by plugging in a mouse. `Ctrl`-click (what I usually use for right click), doesn't work, as `ctrl` is used in Windows for other things. Is there an alternative?
2012/01/14
[ "https://superuser.com/questions/378225", "https://superuser.com", "https://superuser.com/users/113585/" ]
Either using two finger tap, or two finger "click" (by pressing down on the touchpad).
I found that you can simulate the RIGHT-CLICK as follows; use the arrow to position where you wish to right-click then use the keyboard icon and select SHIFT and F10 When you tap the keyboard pad to disappear you hopefully will have the right-click menu you want.
62,307,791
I need to install the RediSearch module on top of a GCP memorystore redis instance. I followed the steps: --------------------- `docker run -p 6379:6379 redislabs/redisearch:latest` I pushed this docker image to a Kubernetes cluster and exposed the external IP. I used that external IP and the 6379 port as [configura...
2020/06/10
[ "https://Stackoverflow.com/questions/62307791", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12186339/" ]
Since you have 2 different classes, you should have 2 neurons in your final `dense` layer, instead of the number of observations you have. The number of observations should not be specified in your neural network architecture.
Use class\_mode = 'raw' as below: ``` train_generator=datagen.flow_from_dataframe(dataframe=df, directory="D:\\Milou", x_col="Path", y_col=label_names, ...
62,307,791
I need to install the RediSearch module on top of a GCP memorystore redis instance. I followed the steps: --------------------- `docker run -p 6379:6379 redislabs/redisearch:latest` I pushed this docker image to a Kubernetes cluster and exposed the external IP. I used that external IP and the 6379 port as [configura...
2020/06/10
[ "https://Stackoverflow.com/questions/62307791", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12186339/" ]
Since you have 2 different classes, you should have 2 neurons in your final `dense` layer, instead of the number of observations you have. The number of observations should not be specified in your neural network architecture.
you need to flatten your network before final layer, because of this unflatten input you are getting all these kind of error. In reality at the final layer you are passing multi dimensional array ``` tf.keras.layers.Flatten() ```
29,774,944
How can I add big **AND** small letters in a TextView like in the image below: **Sorry: "nuber" = "number"** ![enter image description here](https://i.stack.imgur.com/MPlX5l.png)
2015/04/21
[ "https://Stackoverflow.com/questions/29774944", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4583267/" ]
It looks like the button you see in the UI isn't a standard Android Button, but rather a composite View made up of two TextViews. You should make sure that your composite View is focusable and clickable, (not the two TextViews that its made of) and provide default, focus and pressed states for this View. ``` public c...
You can try to use `Html.fromHtml` as: ``` button.setText(Html.fromHtml("html_code_with")); ``` instead of html\_code\_with set your html code for big text and small text.
56,887,810
I've got nginx to run my (node.js/react) application on the server. But I can't seem to connect to the database. In the nginx.conf file I've added the following inside http. ``` http { ... server { listen 80; server_name localhost; ...} ...} ``` And above the http section I have ...
2019/07/04
[ "https://Stackoverflow.com/questions/56887810", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11561643/" ]
You wrote `current_profit =+finance.getProfit()` where you meant `current_profit += finance.getProfit()`. You just assign the value, with unary `+` called on it, which does nothing. The operator of adding a value to the previous value is `+=`.
The corrected method, the problem was =+, changed into += ``` public MutableLiveData<Integer> getProfit() { //the method getFinanceList returns a financeList of size 2 as illustrated above in the debug code. getFinanceList(); int current_profit = 0; for (int i = 0; i < financeList.size(); i++) { ...
27,204,952
I have a list of Object **Product** : ``` public Class Product { public int ID { get; set; } public string Title { get; set; } public string Status { get; set; } } ``` I have a list of the above product : ``` List<Product> p ; ``` I am trying to filter this List , based on Search Criteria `ID, Title,...
2014/11/29
[ "https://Stackoverflow.com/questions/27204952", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1408809/" ]
Basically you want to use `AND` between your conditions, what you are currently doing is an OR, and you will add the same item twice when it satisfies more than one condition. You could built a dynamic linq query based on parameters: ``` var query = Product.AsQueryable(); query = txtProd != string.Empty ? query.Wher...
Try this: ``` results = p.Where(((product.ID < yourIDLowerBound) || (product.ID == yourID)) && (string.IsNullOrEmpty(product.yourTitle) || product.Title == yourTitle) && (string.IsNullOrEmpty(product.yourStatus) || product.Status == yourStatus)).ToList(); ```
27,204,952
I have a list of Object **Product** : ``` public Class Product { public int ID { get; set; } public string Title { get; set; } public string Status { get; set; } } ``` I have a list of the above product : ``` List<Product> p ; ``` I am trying to filter this List , based on Search Criteria `ID, Title,...
2014/11/29
[ "https://Stackoverflow.com/questions/27204952", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1408809/" ]
Basically you want to use `AND` between your conditions, what you are currently doing is an OR, and you will add the same item twice when it satisfies more than one condition. You could built a dynamic linq query based on parameters: ``` var query = Product.AsQueryable(); query = txtProd != string.Empty ? query.Wher...
As a single Linq query it would look like this: ``` var results = p.Where(x => (string.IsNullOrEmpty(txtProd) || x.ID == Convert.ToInt32(txtProd)) && (string.IsNullOrEmpty(txtTitle) || x.Title == txtTitle) && (string.IsNullOrEmpty(strStatus) || x.Status == strStatus)).ToList(); ``` By the wa...
27,204,952
I have a list of Object **Product** : ``` public Class Product { public int ID { get; set; } public string Title { get; set; } public string Status { get; set; } } ``` I have a list of the above product : ``` List<Product> p ; ``` I am trying to filter this List , based on Search Criteria `ID, Title,...
2014/11/29
[ "https://Stackoverflow.com/questions/27204952", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1408809/" ]
Basically you want to use `AND` between your conditions, what you are currently doing is an OR, and you will add the same item twice when it satisfies more than one condition. You could built a dynamic linq query based on parameters: ``` var query = Product.AsQueryable(); query = txtProd != string.Empty ? query.Wher...
``` var results = new List < Product > (); if (strStatus == "ALL" || txtProd == "" || txtTitle == "") results = p; else foreach(var prod in p) { if (prod.ID == Int32.Parse(txtProd)) { results.Add(prod); } if (prod.Title.ToUpper() == txtTitl...
27,204,952
I have a list of Object **Product** : ``` public Class Product { public int ID { get; set; } public string Title { get; set; } public string Status { get; set; } } ``` I have a list of the above product : ``` List<Product> p ; ``` I am trying to filter this List , based on Search Criteria `ID, Title,...
2014/11/29
[ "https://Stackoverflow.com/questions/27204952", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1408809/" ]
Basically you want to use `AND` between your conditions, what you are currently doing is an OR, and you will add the same item twice when it satisfies more than one condition. You could built a dynamic linq query based on parameters: ``` var query = Product.AsQueryable(); query = txtProd != string.Empty ? query.Wher...
How about creating a product query method. I think this meets all of requirements, I don't think any other covered the "ALL" requirement. ``` public List<Product> ProductQuery(List<Product> Products , int? IDCriteria , string TitleCriteria , string StatusCriteria) { var query = ...
16,280,784
Im in windows 7 cmd prompt,,, Im trying to instal by: `npm install node-mysql` Im getting this: ``` C:\Program Files\nodejs>npm install node-mysql npm http GET https://registry.npmjs.org/node-mysql npm http 404 https://registry.npmjs.org/node-mysql npm ERR! 404 'node-mysql' is not in the npm registry. npm ERR! 404 Yo...
2013/04/29
[ "https://Stackoverflow.com/questions/16280784", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1606928/" ]
Try: ``` npm install mysql ``` Node-msql (<https://github.com/felixge/node-mysql/blob/master/package.json>) is named simply mysql in package.json and it exists under that name in npm registry.
Try ``` npm install felixge/node-mysql ``` Reference : readme.md from <https://github.com/felixge/node-mysql>
16,280,784
Im in windows 7 cmd prompt,,, Im trying to instal by: `npm install node-mysql` Im getting this: ``` C:\Program Files\nodejs>npm install node-mysql npm http GET https://registry.npmjs.org/node-mysql npm http 404 https://registry.npmjs.org/node-mysql npm ERR! 404 'node-mysql' is not in the npm registry. npm ERR! 404 Yo...
2013/04/29
[ "https://Stackoverflow.com/questions/16280784", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1606928/" ]
Try: ``` npm install mysql ``` Node-msql (<https://github.com/felixge/node-mysql/blob/master/package.json>) is named simply mysql in package.json and it exists under that name in npm registry.
Following are the steps for adding the mysql module for node js 1 Open your command prompt ========================== > > type npm install g-mysql for global use. > > > It will take time. mysql module will not get installed in the nodejs module directory. Please copy the module from the administrator directory t...
16,280,784
Im in windows 7 cmd prompt,,, Im trying to instal by: `npm install node-mysql` Im getting this: ``` C:\Program Files\nodejs>npm install node-mysql npm http GET https://registry.npmjs.org/node-mysql npm http 404 https://registry.npmjs.org/node-mysql npm ERR! 404 'node-mysql' is not in the npm registry. npm ERR! 404 Yo...
2013/04/29
[ "https://Stackoverflow.com/questions/16280784", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1606928/" ]
Try: ``` npm install mysql ``` Node-msql (<https://github.com/felixge/node-mysql/blob/master/package.json>) is named simply mysql in package.json and it exists under that name in npm registry.
Please follow the given steps, which work for me: 1. Make a folder named `mysql` in this location: ``` C:\Users\newusers\AppData\Roaming\npm\node_modules ``` 2. Then run the command `npm -g install mysql`
16,280,784
Im in windows 7 cmd prompt,,, Im trying to instal by: `npm install node-mysql` Im getting this: ``` C:\Program Files\nodejs>npm install node-mysql npm http GET https://registry.npmjs.org/node-mysql npm http 404 https://registry.npmjs.org/node-mysql npm ERR! 404 'node-mysql' is not in the npm registry. npm ERR! 404 Yo...
2013/04/29
[ "https://Stackoverflow.com/questions/16280784", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1606928/" ]
Try: ``` npm install mysql ``` Node-msql (<https://github.com/felixge/node-mysql/blob/master/package.json>) is named simply mysql in package.json and it exists under that name in npm registry.
You can use below commands to use mysql globally ``` npm install mysql -g ```
16,280,784
Im in windows 7 cmd prompt,,, Im trying to instal by: `npm install node-mysql` Im getting this: ``` C:\Program Files\nodejs>npm install node-mysql npm http GET https://registry.npmjs.org/node-mysql npm http 404 https://registry.npmjs.org/node-mysql npm ERR! 404 'node-mysql' is not in the npm registry. npm ERR! 404 Yo...
2013/04/29
[ "https://Stackoverflow.com/questions/16280784", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1606928/" ]
Try ``` npm install felixge/node-mysql ``` Reference : readme.md from <https://github.com/felixge/node-mysql>
You can use below commands to use mysql globally ``` npm install mysql -g ```
16,280,784
Im in windows 7 cmd prompt,,, Im trying to instal by: `npm install node-mysql` Im getting this: ``` C:\Program Files\nodejs>npm install node-mysql npm http GET https://registry.npmjs.org/node-mysql npm http 404 https://registry.npmjs.org/node-mysql npm ERR! 404 'node-mysql' is not in the npm registry. npm ERR! 404 Yo...
2013/04/29
[ "https://Stackoverflow.com/questions/16280784", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1606928/" ]
Following are the steps for adding the mysql module for node js 1 Open your command prompt ========================== > > type npm install g-mysql for global use. > > > It will take time. mysql module will not get installed in the nodejs module directory. Please copy the module from the administrator directory t...
You can use below commands to use mysql globally ``` npm install mysql -g ```
16,280,784
Im in windows 7 cmd prompt,,, Im trying to instal by: `npm install node-mysql` Im getting this: ``` C:\Program Files\nodejs>npm install node-mysql npm http GET https://registry.npmjs.org/node-mysql npm http 404 https://registry.npmjs.org/node-mysql npm ERR! 404 'node-mysql' is not in the npm registry. npm ERR! 404 Yo...
2013/04/29
[ "https://Stackoverflow.com/questions/16280784", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1606928/" ]
Please follow the given steps, which work for me: 1. Make a folder named `mysql` in this location: ``` C:\Users\newusers\AppData\Roaming\npm\node_modules ``` 2. Then run the command `npm -g install mysql`
You can use below commands to use mysql globally ``` npm install mysql -g ```
18,783,734
i have made a small code for html form and trying to validate it with javascript but it is not working and not even giving any error... I am not getting whats the problem behind.... i have seen [javascript simple validation not working? here is my code.. ``` <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional...
2013/09/13
[ "https://Stackoverflow.com/questions/18783734", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1049600/" ]
And add `method="post"` to your `form` tag.
Change this in formValidate() `document.myForm.Name.value == ""` to `document.myForm.dob.value == ""` ``` document.myForm.EMail.value == "" to document.myForm.email.value == "" ``` **Do not use** ``` document.write("<b>" + day + "/" + month + "/" + year + "</b>"); ``` It will replace the whole contents of your...
18,783,734
i have made a small code for html form and trying to validate it with javascript but it is not working and not even giving any error... I am not getting whats the problem behind.... i have seen [javascript simple validation not working? here is my code.. ``` <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional...
2013/09/13
[ "https://Stackoverflow.com/questions/18783734", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1049600/" ]
And add `method="post"` to your `form` tag.
First of all,in your `formValidate(),` **First** if condition is incorrect.Your form does not have a "name" element, it should either be "dob" or "age" or "value". **Secondly**, in the second if instead of this `if( document.myForm.EMail.value == "" )`, it should be `if( document.myForm.email.value == "" )`.
14,565,366
I'm trying to plot data in a barchart using lattice graphics. I'd like to sort the bars by one factor and group by another (i.e., position by the first factor and contrast within position by the second). However, I'd like to color the bars by the first (i.e., position) factor. In the following example, the plot is ren...
2013/01/28
[ "https://Stackoverflow.com/questions/14565366", "https://Stackoverflow.com", "https://Stackoverflow.com/users/719469/" ]
This is not perfect but I think it does the trick (if I understood correctly your question). ``` barchart( FactorB ~ Data | FactorA, data = df, groups=FactorA, horizontal = TRUE, col = test_colors, origin = 0, layout=c(1,3)) ``` `Factor B ~ Data | FactorA` means it divides your data in panels correspondi...
If you wanted to do this with 'ggplot2', you would write it like so: ``` ggplot(df, aes(x=FactorA, y=data, group=FactorB, fill=FactorA)) + geom_bar(stat="identity", position="dodge") + coord_flip() ``` From there, it's just cosmetic tailoring to suit your tastes, including picking the colors for the fill.
115,297
You are playing a game on the following 4x4 grid. Each turn you can slide **all** the orange balls into one of four directions: left, up, right or down. A ball will continue sliding along a direction until it hits a wall (solid blue squares), boundary of the grid or another ball. All the balls move at once. Walls do no...
2022/03/15
[ "https://puzzling.stackexchange.com/questions/115297", "https://puzzling.stackexchange.com", "https://puzzling.stackexchange.com/users/62537/" ]
Is this a trick question? (New here) Is the answer just > > "yes"? > > > Otherwise, > > up left up right > > > > > up right up right > > > > > down right down left > > > > > up right down > > > > > The trick is to "disrupt" the alignment of two balls that the instinctive approach want...
@user already posted a [solution](https://puzzling.stackexchange.com/a/115298/36023), mine differs slightly at the end: > > ULU RURUR DR ULURD > > > (spaces inserted at the points where I was mentally switching to another task; the final 5 moves are where the solution differs from @user's) This is what it looks...
115,297
You are playing a game on the following 4x4 grid. Each turn you can slide **all** the orange balls into one of four directions: left, up, right or down. A ball will continue sliding along a direction until it hits a wall (solid blue squares), boundary of the grid or another ball. All the balls move at once. Walls do no...
2022/03/15
[ "https://puzzling.stackexchange.com/questions/115297", "https://puzzling.stackexchange.com", "https://puzzling.stackexchange.com/users/62537/" ]
Is this a trick question? (New here) Is the answer just > > "yes"? > > > Otherwise, > > up left up right > > > > > up right up right > > > > > down right down left > > > > > up right down > > > > > The trick is to "disrupt" the alignment of two balls that the instinctive approach want...
I have a completely different solution, the same length as the [other](https://puzzling.stackexchange.com/a/115301/79147) [two](https://puzzling.stackexchange.com/a/115298/79147) at time of posting - still 15 moves. I am wondering if there is a way to solve this in less than 15 moves. > > URURD LUR DRD LURD > > > ...
115,297
You are playing a game on the following 4x4 grid. Each turn you can slide **all** the orange balls into one of four directions: left, up, right or down. A ball will continue sliding along a direction until it hits a wall (solid blue squares), boundary of the grid or another ball. All the balls move at once. Walls do no...
2022/03/15
[ "https://puzzling.stackexchange.com/questions/115297", "https://puzzling.stackexchange.com", "https://puzzling.stackexchange.com/users/62537/" ]
@user already posted a [solution](https://puzzling.stackexchange.com/a/115298/36023), mine differs slightly at the end: > > ULU RURUR DR ULURD > > > (spaces inserted at the points where I was mentally switching to another task; the final 5 moves are where the solution differs from @user's) This is what it looks...
I have a completely different solution, the same length as the [other](https://puzzling.stackexchange.com/a/115301/79147) [two](https://puzzling.stackexchange.com/a/115298/79147) at time of posting - still 15 moves. I am wondering if there is a way to solve this in less than 15 moves. > > URURD LUR DRD LURD > > > ...
38,627,184
When viewing VCS window in Pycharm IDE, I have no idea what *git local branch* I'm working on as well as its mapped *git remote branch*. So how to show **current working branch name** in Pycharm? p.s. I'm using PyCharm Community Edition 2016.2
2016/07/28
[ "https://Stackoverflow.com/questions/38627184", "https://Stackoverflow.com", "https://Stackoverflow.com/users/248616/" ]
Local Working Branch ==================== The section "[Which branch we are working in?](https://confluence.jetbrains.com/display/PYH/Using+PyCharm%27s+Git+integration+locally#UsingPyCharm%27sGitintegrationlocally-Whichbranchweareworkingin?)" is quite clear: > > Actually, this information is available in the Logs ta...
A small update to the wonderful answer by @VonC: there is an option to show the git branch in the git widget in the bottom of the screen. It's called `Show Git Branch` and you can turn it on either using the command lookup or from `View > Appearance > Status Bar Widgets > Git Branch`. [![enter image description here](h...
19,139,001
I have got a strange problem with the styling of my pivot control. I edited a copy of the default template in Expression Blend because I want to remove the entire header. The adapted style: ``` <Style x:Key="PivotWithoutHeader" TargetType="phone:Pivot"> <Setter Property="Margin" Value="0"/> <Setter Pr...
2013/10/02
[ "https://Stackoverflow.com/questions/19139001", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1211299/" ]
The template of the Pivot control was changed in WP8 and it now requires that the `PivotHeadersControl` be present in the template. (You could remove it in WP7.x) Just have a zero height or other "empty" content in your header instead. I'm not aware of this having been publically documented as most people who've up...
dBlisse's solution worked for me to hide the header template but for title I played with margins and the below trick worked for me, not sure if this is a good idea, but checked on different resolutions and looks fine. Notice the `Margin="0,-39,0,0"` for stack panel below: ``` <phone:Pivot Background="Transparent" Mar...
19,139,001
I have got a strange problem with the styling of my pivot control. I edited a copy of the default template in Expression Blend because I want to remove the entire header. The adapted style: ``` <Style x:Key="PivotWithoutHeader" TargetType="phone:Pivot"> <Setter Property="Margin" Value="0"/> <Setter Pr...
2013/10/02
[ "https://Stackoverflow.com/questions/19139001", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1211299/" ]
Try this one: ``` <UserControl.Resources> <ResourceDictionary> <Thickness x:Key="PivotPortraitThemePadding">0,0,0,0</Thickness> <Thickness x:Key="PivotLandscapeThemePadding">0,0,0,0</Thickness> <Style x:Key="PivotWithoutHeaderStyle" TargetType="Pivot"> <Setter Property="Margin" ...
dBlisse's solution worked for me to hide the header template but for title I played with margins and the below trick worked for me, not sure if this is a good idea, but checked on different resolutions and looks fine. Notice the `Margin="0,-39,0,0"` for stack panel below: ``` <phone:Pivot Background="Transparent" Mar...
19,139,001
I have got a strange problem with the styling of my pivot control. I edited a copy of the default template in Expression Blend because I want to remove the entire header. The adapted style: ``` <Style x:Key="PivotWithoutHeader" TargetType="phone:Pivot"> <Setter Property="Margin" Value="0"/> <Setter Pr...
2013/10/02
[ "https://Stackoverflow.com/questions/19139001", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1211299/" ]
You can remove the PivotItem header on the Pivot Control by replacing the Pivot.HeaderTemplate property with a blank DataTemplate. If you're trying to remove the Title rather than the Header, then I would like to know the solution too. ^^ ``` <phone:Pivot ItemsSource="{Binding Data}" ItemTemplate="{StaticResource Cust...
So removing the header AND the title doesn't work anymore on Windows Phone 8. So I ported an existing control from: <http://www.codeproject.com/Articles/136786/Creating-an-Animated-ContentControl> to Windows Phone 8.
19,139,001
I have got a strange problem with the styling of my pivot control. I edited a copy of the default template in Expression Blend because I want to remove the entire header. The adapted style: ``` <Style x:Key="PivotWithoutHeader" TargetType="phone:Pivot"> <Setter Property="Margin" Value="0"/> <Setter Pr...
2013/10/02
[ "https://Stackoverflow.com/questions/19139001", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1211299/" ]
So removing the header AND the title doesn't work anymore on Windows Phone 8. So I ported an existing control from: <http://www.codeproject.com/Articles/136786/Creating-an-Animated-ContentControl> to Windows Phone 8.
I finally figured it out! (I'm building a Universal Windows 10 App and had the same question.) Add a blank HeaderTemplate to your Pivot controls as dBlisse suggested: ``` <Pivot ItemsPanel="{StaticResource ItemsPanelTemplate1}"> <Pivot.HeaderTemplate> <DataTemplate/> </Pivot.HeaderTemplate> </Pivot> ...
19,139,001
I have got a strange problem with the styling of my pivot control. I edited a copy of the default template in Expression Blend because I want to remove the entire header. The adapted style: ``` <Style x:Key="PivotWithoutHeader" TargetType="phone:Pivot"> <Setter Property="Margin" Value="0"/> <Setter Pr...
2013/10/02
[ "https://Stackoverflow.com/questions/19139001", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1211299/" ]
Try this one: ``` <UserControl.Resources> <ResourceDictionary> <Thickness x:Key="PivotPortraitThemePadding">0,0,0,0</Thickness> <Thickness x:Key="PivotLandscapeThemePadding">0,0,0,0</Thickness> <Style x:Key="PivotWithoutHeaderStyle" TargetType="Pivot"> <Setter Property="Margin" ...
I finally figured it out! (I'm building a Universal Windows 10 App and had the same question.) Add a blank HeaderTemplate to your Pivot controls as dBlisse suggested: ``` <Pivot ItemsPanel="{StaticResource ItemsPanelTemplate1}"> <Pivot.HeaderTemplate> <DataTemplate/> </Pivot.HeaderTemplate> </Pivot> ...
19,139,001
I have got a strange problem with the styling of my pivot control. I edited a copy of the default template in Expression Blend because I want to remove the entire header. The adapted style: ``` <Style x:Key="PivotWithoutHeader" TargetType="phone:Pivot"> <Setter Property="Margin" Value="0"/> <Setter Pr...
2013/10/02
[ "https://Stackoverflow.com/questions/19139001", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1211299/" ]
You can remove the PivotItem header on the Pivot Control by replacing the Pivot.HeaderTemplate property with a blank DataTemplate. If you're trying to remove the Title rather than the Header, then I would like to know the solution too. ^^ ``` <phone:Pivot ItemsSource="{Binding Data}" ItemTemplate="{StaticResource Cust...
dBlisse's solution worked for me to hide the header template but for title I played with margins and the below trick worked for me, not sure if this is a good idea, but checked on different resolutions and looks fine. Notice the `Margin="0,-39,0,0"` for stack panel below: ``` <phone:Pivot Background="Transparent" Mar...
19,139,001
I have got a strange problem with the styling of my pivot control. I edited a copy of the default template in Expression Blend because I want to remove the entire header. The adapted style: ``` <Style x:Key="PivotWithoutHeader" TargetType="phone:Pivot"> <Setter Property="Margin" Value="0"/> <Setter Pr...
2013/10/02
[ "https://Stackoverflow.com/questions/19139001", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1211299/" ]
The template of the Pivot control was changed in WP8 and it now requires that the `PivotHeadersControl` be present in the template. (You could remove it in WP7.x) Just have a zero height or other "empty" content in your header instead. I'm not aware of this having been publically documented as most people who've up...
I finally figured it out! (I'm building a Universal Windows 10 App and had the same question.) Add a blank HeaderTemplate to your Pivot controls as dBlisse suggested: ``` <Pivot ItemsPanel="{StaticResource ItemsPanelTemplate1}"> <Pivot.HeaderTemplate> <DataTemplate/> </Pivot.HeaderTemplate> </Pivot> ...
19,139,001
I have got a strange problem with the styling of my pivot control. I edited a copy of the default template in Expression Blend because I want to remove the entire header. The adapted style: ``` <Style x:Key="PivotWithoutHeader" TargetType="phone:Pivot"> <Setter Property="Margin" Value="0"/> <Setter Pr...
2013/10/02
[ "https://Stackoverflow.com/questions/19139001", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1211299/" ]
You can remove the PivotItem header on the Pivot Control by replacing the Pivot.HeaderTemplate property with a blank DataTemplate. If you're trying to remove the Title rather than the Header, then I would like to know the solution too. ^^ ``` <phone:Pivot ItemsSource="{Binding Data}" ItemTemplate="{StaticResource Cust...
The template of the Pivot control was changed in WP8 and it now requires that the `PivotHeadersControl` be present in the template. (You could remove it in WP7.x) Just have a zero height or other "empty" content in your header instead. I'm not aware of this having been publically documented as most people who've up...
19,139,001
I have got a strange problem with the styling of my pivot control. I edited a copy of the default template in Expression Blend because I want to remove the entire header. The adapted style: ``` <Style x:Key="PivotWithoutHeader" TargetType="phone:Pivot"> <Setter Property="Margin" Value="0"/> <Setter Pr...
2013/10/02
[ "https://Stackoverflow.com/questions/19139001", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1211299/" ]
You can remove the PivotItem header on the Pivot Control by replacing the Pivot.HeaderTemplate property with a blank DataTemplate. If you're trying to remove the Title rather than the Header, then I would like to know the solution too. ^^ ``` <phone:Pivot ItemsSource="{Binding Data}" ItemTemplate="{StaticResource Cust...
Try this one: ``` <UserControl.Resources> <ResourceDictionary> <Thickness x:Key="PivotPortraitThemePadding">0,0,0,0</Thickness> <Thickness x:Key="PivotLandscapeThemePadding">0,0,0,0</Thickness> <Style x:Key="PivotWithoutHeaderStyle" TargetType="Pivot"> <Setter Property="Margin" ...
19,139,001
I have got a strange problem with the styling of my pivot control. I edited a copy of the default template in Expression Blend because I want to remove the entire header. The adapted style: ``` <Style x:Key="PivotWithoutHeader" TargetType="phone:Pivot"> <Setter Property="Margin" Value="0"/> <Setter Pr...
2013/10/02
[ "https://Stackoverflow.com/questions/19139001", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1211299/" ]
So removing the header AND the title doesn't work anymore on Windows Phone 8. So I ported an existing control from: <http://www.codeproject.com/Articles/136786/Creating-an-Animated-ContentControl> to Windows Phone 8.
dBlisse's solution worked for me to hide the header template but for title I played with margins and the below trick worked for me, not sure if this is a good idea, but checked on different resolutions and looks fine. Notice the `Margin="0,-39,0,0"` for stack panel below: ``` <phone:Pivot Background="Transparent" Mar...
307,916
I've just installed a fresh install of WordPress and before doing anything else I've tried to setup a multisite, which I would like to do with subdirectories. But when I click on Network Setup I get the notification: > > Because your installation is not new, the sites in your WordPress > network must use sub-doma...
2018/07/07
[ "https://wordpress.stackexchange.com/questions/307916", "https://wordpress.stackexchange.com", "https://wordpress.stackexchange.com/users/59568/" ]
You don't need to do anything just past this code in your activated theme's `functions.php` ``` add_filter( 'allow_subdirectory_install', '__return_true' ); ```
[This thread](https://premium.wpmudev.org/forums/topic/enabling-network-because-your-install-is-not-new-the-sites-in-your-wordpress-network-must-use-sub-domains) might be helpful. In essence: try to delete sample post and page.
51,180,359
I have an array: ``` let numbers = [8,4,2,1,7,5,3,0]; ``` I want to send this array to the client using socket.emit. But when i send this data using: ``` var numbers1 = JSON.stringify(numbers); socket.emit('new',{num:numbers1}); ``` And listen it on the client side using: ``` socket.on('new',(data)=>{...
2018/07/04
[ "https://Stackoverflow.com/questions/51180359", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10033940/" ]
OK so I found this, which says it's not possible at the moment: <https://github.com/aws/aws-lambda-dotnet/issues/246> Am moving to NodeJs and the Serverless package to do this for now: <https://www.npmjs.com/package/serverless> Will update this if / when things change for dotnet core
processId it should be set to 1, because Docker assigns entry point executable PID of 1. It is in launch.json of VS Code.
15,375,987
I need to search a string for a list of several different matches, let's say I have this list: ``` ['this', 'is', 'a', 'regex', 'test'] ``` I want to see if any of those items is within a string, either using regex or any other method in Python. I tried first just doing `string in list`, but that proved to be insuf...
2013/03/13
[ "https://Stackoverflow.com/questions/15375987", "https://Stackoverflow.com", "https://Stackoverflow.com/users/478108/" ]
You can use the built-in function `any()`: ``` In [1]: strs="I am a string" In [2]: lis=['this', 'is', 'a', 'regex', 'test'] In [3]: any(x in strs for x in lis) Out[3]: True ``` This will return `True` for something like `"thisisafoobar"` as well. But if you want to match the exact word, then try `re.search()` or...
You could do: ``` if any(test in your_string for test in tests): ... ```
15,375,987
I need to search a string for a list of several different matches, let's say I have this list: ``` ['this', 'is', 'a', 'regex', 'test'] ``` I want to see if any of those items is within a string, either using regex or any other method in Python. I tried first just doing `string in list`, but that proved to be insuf...
2013/03/13
[ "https://Stackoverflow.com/questions/15375987", "https://Stackoverflow.com", "https://Stackoverflow.com/users/478108/" ]
``` >>> l = ['this', 'is', 'a', 'regex', 'test'] >>> s = 'this is a test string' >>> def check(elements, string): ... for element in elements: ... if element in string: ... return True ... return False ... >>> check(l, s) True ``` Apparently this function has better performance than `any(...
You could do: ``` if any(test in your_string for test in tests): ... ```
15,375,987
I need to search a string for a list of several different matches, let's say I have this list: ``` ['this', 'is', 'a', 'regex', 'test'] ``` I want to see if any of those items is within a string, either using regex or any other method in Python. I tried first just doing `string in list`, but that proved to be insuf...
2013/03/13
[ "https://Stackoverflow.com/questions/15375987", "https://Stackoverflow.com", "https://Stackoverflow.com/users/478108/" ]
You can use the built-in function `any()`: ``` In [1]: strs="I am a string" In [2]: lis=['this', 'is', 'a', 'regex', 'test'] In [3]: any(x in strs for x in lis) Out[3]: True ``` This will return `True` for something like `"thisisafoobar"` as well. But if you want to match the exact word, then try `re.search()` or...
``` >>> l = ['this', 'is', 'a', 'regex', 'test'] >>> s = 'this is a test string' >>> def check(elements, string): ... for element in elements: ... if element in string: ... return True ... return False ... >>> check(l, s) True ``` Apparently this function has better performance than `any(...
571,212
Say I have a set of 10 values I want to draw 3 values from, uniformly, without replacement. For instance: $$S = \{0,0,0,0,22.95,0,0,0,19.125,25.5\}$$ With replacement, this seems simple, you just add all the values up and divide by $10$, giving $6.7575$, and multiplying by $3$ you get $20.2725$. However, if you don't r...
2022/04/11
[ "https://stats.stackexchange.com/questions/571212", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/354446/" ]
@BruceET's answer has some nice information, and simulations are often a good starting place for this sort of thing in practice. In this answer, I'll detail an exact approach, which demonstrates that the exact answer is actually $20.275$, **the same as in the sampling without replacement approach**. Note that this is ...
The mean of the values in $S$ is $6.7576,$ as you say. So, with replacement, each of the three chosen values has an expected value of $6.7575$ and thus the average of the three is again $\bar X\_3 = 6.7575.$ ``` s = c(0,0,0,0, 22.95, 0,0,0, 19.125,25.5) mean(s) [1] 6.7575 ``` In sampling without replacement, the mea...
571,212
Say I have a set of 10 values I want to draw 3 values from, uniformly, without replacement. For instance: $$S = \{0,0,0,0,22.95,0,0,0,19.125,25.5\}$$ With replacement, this seems simple, you just add all the values up and divide by $10$, giving $6.7575$, and multiplying by $3$ you get $20.2725$. However, if you don't r...
2022/04/11
[ "https://stats.stackexchange.com/questions/571212", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/354446/" ]
@BruceET's answer has some nice information, and simulations are often a good starting place for this sort of thing in practice. In this answer, I'll detail an exact approach, which demonstrates that the exact answer is actually $20.275$, **the same as in the sampling without replacement approach**. Note that this is ...
When sampling without replacement from the set $S=\{s\_1,s\_2,\dots,s\_n\}$, the sampled values $X\_1,X\_2,\dots,X\_m$ have an exchangeable distribution. Hence, for any $k$, $E(X\_k)=\frac1n\sum s\_i=\bar s$ and $\operatorname{Var}X\_k=\frac1n\sum\_{i=1}^n s\_i^2-\bar{s}^2=\bar{s^2}-{\bar s}^2$. Furthermore, for any pa...
59,270,456
I'm in college and I've been granted a task to make an app that calculates and shows the hash of a file in UWP application. Every time when I want to compute the hash of the file that I picked, I get "Access to path is denied." error. I want to compute the hash passing a filestream as a parameter. I've tried to run Vis...
2019/12/10
[ "https://Stackoverflow.com/questions/59270456", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8418905/" ]
Your input string is UTF8-encoded, which means each character is encoded by anything from one to four bytes. You cannot just scan through the string and convert them, unless your loop has an understanding of how Unicode characters are encoded in UTF8. **You need a UTF8 decoder.** Fortunately there are really lightwei...
I just solved the issue: ```cpp std::string Tools::encode_utf8(const std::wstring &wstr) { std::string utf8_encoded; //iterate through the whole string for(size_t j = 0; j < wstr.size(); ++j) { if(wstr.at(j) <= 0x7F) utf8_encoded += wstr.at(j); else if(wstr.at(j) <= 0x7FF) ...
23,691
I've started to hear creaking/clicking sounds from the saddle tube. **Is the frame giving up?** I could look for [a longer saddle post](http://www.amazon.de/XXL-ALU-SATTELST%C3%9CTZE-%C3%9CBERL%C3%84NGE-50/dp/B003IB77WC/ref=sr_1_9?ie=UTF8&qid=1405670710&sr=8-9&keywords=fahrrad%20sattelstange), if that would relieve som...
2014/07/18
[ "https://bicycles.stackexchange.com/questions/23691", "https://bicycles.stackexchange.com", "https://bicycles.stackexchange.com/users/275/" ]
Often, dirt gets between the seat post and seat tube. Remove the seat post. Clean the post. Clean inside the seat tube. Grease the post and re-install. Hopefully the noise will be gone. You say the post is close to the max mark. For a little added safety, longer seat posts are available.
Try to put tube lower enough and check how it sounds in that position. If any sounds don't appear then just replace with new longer tube. It saves your frame. Or it might be sand or dirt cause noise. So try to clean up tube and frame.
23,691
I've started to hear creaking/clicking sounds from the saddle tube. **Is the frame giving up?** I could look for [a longer saddle post](http://www.amazon.de/XXL-ALU-SATTELST%C3%9CTZE-%C3%9CBERL%C3%84NGE-50/dp/B003IB77WC/ref=sr_1_9?ie=UTF8&qid=1405670710&sr=8-9&keywords=fahrrad%20sattelstange), if that would relieve som...
2014/07/18
[ "https://bicycles.stackexchange.com/questions/23691", "https://bicycles.stackexchange.com", "https://bicycles.stackexchange.com/users/275/" ]
Most probably, the seatpost just needs to be cleaned (dust gets in) AND/OR tightened a little bit. Don't overdo it, it's best to stay within the 5-6 Nm range so as not to bust your seatpost ring or seat tube. Greasing the seatpost might also help. I wouldn't recommend any actual grease for this (messy, tends to get the...
Try to put tube lower enough and check how it sounds in that position. If any sounds don't appear then just replace with new longer tube. It saves your frame. Or it might be sand or dirt cause noise. So try to clean up tube and frame.
23,691
I've started to hear creaking/clicking sounds from the saddle tube. **Is the frame giving up?** I could look for [a longer saddle post](http://www.amazon.de/XXL-ALU-SATTELST%C3%9CTZE-%C3%9CBERL%C3%84NGE-50/dp/B003IB77WC/ref=sr_1_9?ie=UTF8&qid=1405670710&sr=8-9&keywords=fahrrad%20sattelstange), if that would relieve som...
2014/07/18
[ "https://bicycles.stackexchange.com/questions/23691", "https://bicycles.stackexchange.com", "https://bicycles.stackexchange.com/users/275/" ]
As a fellow tall guy, try temporarily lowering your seat by half and see if the creaking goes away. If yes, your seatpost is simply too high and unsupported, so buy a longer one. 350mm and 400mm are available now, not overly expensive. Have a good close look at the frame for cracks too - I broke a frame by having the ...
Try to put tube lower enough and check how it sounds in that position. If any sounds don't appear then just replace with new longer tube. It saves your frame. Or it might be sand or dirt cause noise. So try to clean up tube and frame.
23,691
I've started to hear creaking/clicking sounds from the saddle tube. **Is the frame giving up?** I could look for [a longer saddle post](http://www.amazon.de/XXL-ALU-SATTELST%C3%9CTZE-%C3%9CBERL%C3%84NGE-50/dp/B003IB77WC/ref=sr_1_9?ie=UTF8&qid=1405670710&sr=8-9&keywords=fahrrad%20sattelstange), if that would relieve som...
2014/07/18
[ "https://bicycles.stackexchange.com/questions/23691", "https://bicycles.stackexchange.com", "https://bicycles.stackexchange.com/users/275/" ]
Often, dirt gets between the seat post and seat tube. Remove the seat post. Clean the post. Clean inside the seat tube. Grease the post and re-install. Hopefully the noise will be gone. You say the post is close to the max mark. For a little added safety, longer seat posts are available.
As a fellow tall guy, try temporarily lowering your seat by half and see if the creaking goes away. If yes, your seatpost is simply too high and unsupported, so buy a longer one. 350mm and 400mm are available now, not overly expensive. Have a good close look at the frame for cracks too - I broke a frame by having the ...
23,691
I've started to hear creaking/clicking sounds from the saddle tube. **Is the frame giving up?** I could look for [a longer saddle post](http://www.amazon.de/XXL-ALU-SATTELST%C3%9CTZE-%C3%9CBERL%C3%84NGE-50/dp/B003IB77WC/ref=sr_1_9?ie=UTF8&qid=1405670710&sr=8-9&keywords=fahrrad%20sattelstange), if that would relieve som...
2014/07/18
[ "https://bicycles.stackexchange.com/questions/23691", "https://bicycles.stackexchange.com", "https://bicycles.stackexchange.com/users/275/" ]
Most probably, the seatpost just needs to be cleaned (dust gets in) AND/OR tightened a little bit. Don't overdo it, it's best to stay within the 5-6 Nm range so as not to bust your seatpost ring or seat tube. Greasing the seatpost might also help. I wouldn't recommend any actual grease for this (messy, tends to get the...
As a fellow tall guy, try temporarily lowering your seat by half and see if the creaking goes away. If yes, your seatpost is simply too high and unsupported, so buy a longer one. 350mm and 400mm are available now, not overly expensive. Have a good close look at the frame for cracks too - I broke a frame by having the ...
2,525
I want a "product shot" style photo of several small objects without any background (pure white background). Knowing the hours of work involved in properly deep-etching, but not having nice lighting or a curved-white-matte background, I photographed them on white paper. My hope was that instead of laboriously removing...
2010/08/16
[ "https://photo.stackexchange.com/questions/2525", "https://photo.stackexchange.com", "https://photo.stackexchange.com/users/1065/" ]
I'll show how you can do this in GIMP, it should be similar in photoshop. We start with our object on paper. Curves dialog basically shows us histogram of the image. When I click into the image, I can see where in the histogram given area is. This way I can find out where approximately my future white point is going t...
Unless it's a terribly complex item, I would suggest just going and removing the background. You may get somewhere first with using a magic wand selection. Removing the background manually either with a selection tool or an eraser will give you the cleanest result without affecting the item itself. That's how I would...
2,525
I want a "product shot" style photo of several small objects without any background (pure white background). Knowing the hours of work involved in properly deep-etching, but not having nice lighting or a curved-white-matte background, I photographed them on white paper. My hope was that instead of laboriously removing...
2010/08/16
[ "https://photo.stackexchange.com/questions/2525", "https://photo.stackexchange.com", "https://photo.stackexchange.com/users/1065/" ]
I'll show how you can do this in GIMP, it should be similar in photoshop. We start with our object on paper. Curves dialog basically shows us histogram of the image. When I click into the image, I can see where in the histogram given area is. This way I can find out where approximately my future white point is going t...
If there is no bright areas on your products, then you can use curves to blow all the highlights until the paper is all white. Go near the top right and experiment with bringing a spot near the top up, but it will probably change the lighter areas of your product noticeably.
2,525
I want a "product shot" style photo of several small objects without any background (pure white background). Knowing the hours of work involved in properly deep-etching, but not having nice lighting or a curved-white-matte background, I photographed them on white paper. My hope was that instead of laboriously removing...
2010/08/16
[ "https://photo.stackexchange.com/questions/2525", "https://photo.stackexchange.com", "https://photo.stackexchange.com/users/1065/" ]
I'll show how you can do this in GIMP, it should be similar in photoshop. We start with our object on paper. Curves dialog basically shows us histogram of the image. When I click into the image, I can see where in the histogram given area is. This way I can find out where approximately my future white point is going t...
I would recommend reading through [How do I properly do shadowless product photos?](https://photo.stackexchange.com/questions/14991) as a lot of the same principles there apply here. In general: 1) Use a back-splash light which is brighter than the product. or 2) Post-process fix it up. For 2, you can use Photoshop...
17,299,915
My question is pretty like [my last topic](https://stackoverflow.com/questions/17298413/div-backgroundcolor-change-to-element-backgroundcolor-using-javascript), but it's not the same. --- I have several buttons and styled by CSS. HTML codes is here : ``` <button class="Btn red">Btn1</button> <button class="Btn blue...
2013/06/25
[ "https://Stackoverflow.com/questions/17299915", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1345050/" ]
Pure Javascript (no jQuery dependency): ``` var buttons = document.getElementsByTagName("button"); for(var i=0; i<buttons.length; i++){ buttons[i].onclick = function(){ document.getElementById("Content").style.backgroundColor = getComputedStyle(this).backgroundColor; } } ``` [Demo](http://jsfiddle.ne...
if you are using $(".Btn").click then you are using jquery. This means that you can simplify a lot the subsequent line. ``` $(".Btn").click(function(){ $("#Content").css('background-color',$(this).css('background-color')); }); ``` and here is your fiddle edited: [DEMO](http://jsfiddle.net/AFBTp/)
10,543,561
I made a simple quiz scoring using PHP but its coming up with unidentifed offset errors, but it works fine. errors: ``` Notice: Undefined offset: 0 in C:\Users\scorequiz1.php on line 17 Notice: Undefined offset: 1 in C:\Users\scorequiz1.php on line 18 Notice: Undefined offset: 2 in C:\Users\scorequiz1.php on line 19 ...
2012/05/10
[ "https://Stackoverflow.com/questions/10543561", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1365708/" ]
The `ls -l` command gave a list of all the subdirectories in your current present-working-directory (PWD). The `rm` command can delete multiple files/directories if you pass them to it as a list. eg: `rm test1.txt test2.txt myApp` will delete all three of the files with names: ``` test1.txt test2.txt myApp ``` Als...
The `-r` argument means "delete recursively" (ie descend into subdirectories). The `-f` command means "force" (in other words, don't ask for confirmation). `-rf` means "descend recursively into subdirectories without asking for confirmation" `ls -l` lists all files in the directory. `xargs` takes the input from `ls -l...
10,543,561
I made a simple quiz scoring using PHP but its coming up with unidentifed offset errors, but it works fine. errors: ``` Notice: Undefined offset: 0 in C:\Users\scorequiz1.php on line 17 Notice: Undefined offset: 1 in C:\Users\scorequiz1.php on line 18 Notice: Undefined offset: 2 in C:\Users\scorequiz1.php on line 19 ...
2012/05/10
[ "https://Stackoverflow.com/questions/10543561", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1365708/" ]
The `ls -l` command gave a list of all the subdirectories in your current present-working-directory (PWD). The `rm` command can delete multiple files/directories if you pass them to it as a list. eg: `rm test1.txt test2.txt myApp` will delete all three of the files with names: ``` test1.txt test2.txt myApp ``` Als...
`rm(1)` deleted every file and directory in the current working directory because you asked it to. To see roughly what happened, run this: ``` cd /etc ; ls -l | xargs echo ``` Pay careful attention to the output. I strongly recommend using `echo` in place of `rm -rf` when constructing command lines. Only if the o...
6,786,106
I've recently converted a highly threaded, unmanaged Win32 C++ console application (MediaServer.exe) to an unmanaged Win32 DLL (MediaServer.dll). I'm hosting and debugging this DLL in a separate unmanaged Win32 console app, and everything compiles and runs, but after a minute or so, I'll get a random crash, in a place ...
2011/07/22
[ "https://Stackoverflow.com/questions/6786106", "https://Stackoverflow.com", "https://Stackoverflow.com/users/68231/" ]
I would say you are initializing memory in DLL\_THREAD\_ATTACH instead of DLL\_PROCESS\_ATTACH. The situation would cause you to use a pointer or memory that has been allocated in another thread than the executing thread. The other thing would be to check your loading of your dependencies for the DLL. Let me explain....
I'll leave the other answer as the "accepted" answer, but it might be helpful for people to know that a key part of the problem was the fact that I was initializing libxml2 on the wrong thread. Specifically, you need to call xmlInitParser() on your main thread, before making any calls. For me, this meant: ``` MediaSer...
68,428,761
``` from random import randint class Card: suits = ["spades", "hearts", "diamonds", "clubs"] values = [None, None, "2", "3", "4", "5", "6", "7", "8", "9", "10", "Jack", "Queen", "King", "Ace"] def __init__(self, v, s): """suit + value are ints""" self.value = v self....
2021/07/18
[ "https://Stackoverflow.com/questions/68428761", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16401725/" ]
The reason you don't use 'self' for win is because it only needs to exist inside the method it was created in, whereas the other variables(i.e. things that are defined outside of the method) have to exhist in more than one function always (the **init** and also in whatever function you implement those values). With the...
> > Instance Variables get defined in the init method, so they can get initialized. > > > They are **attributes**, getting initialised and not variables. There is a difference. > > So whats the difference between the win variable and the instance Variables > > > The difference is that once you initialise the...
27,539,419
I was trying to convert my 2D String into 2D Integer ArrayList, but I don't know how to. I have read some reference but didn't find anything related. Here is my method: ``` public static ArrayList<int[]> convert2DStringTo2DIntArrayList(String[][] originalString, int lengthOfRow, int lengthOfColumn) { ArrayList<in...
2014/12/18
[ "https://Stackoverflow.com/questions/27539419", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4372809/" ]
You may need to start the `couchdb` process as the `couchdb` user, with `su couchdb -c ./couchdb` (assuming the current directory contains the executable) - double-check the `su` command options for your system. Also, check the permissions on `/usr/local/var/log/couchdb/couch.log` - make sure it is writeable by the `c...
You can start couchdb using below command sudo couchdb stop sudo couchdb start
27,539,419
I was trying to convert my 2D String into 2D Integer ArrayList, but I don't know how to. I have read some reference but didn't find anything related. Here is my method: ``` public static ArrayList<int[]> convert2DStringTo2DIntArrayList(String[][] originalString, int lengthOfRow, int lengthOfColumn) { ArrayList<in...
2014/12/18
[ "https://Stackoverflow.com/questions/27539419", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4372809/" ]
You may need to start the `couchdb` process as the `couchdb` user, with `su couchdb -c ./couchdb` (assuming the current directory contains the executable) - double-check the `su` command options for your system. Also, check the permissions on `/usr/local/var/log/couchdb/couch.log` - make sure it is writeable by the `c...
Although on CentOS, the "problem" is avoided using `service couchdb [start|status|stop|restart]`.
27,539,419
I was trying to convert my 2D String into 2D Integer ArrayList, but I don't know how to. I have read some reference but didn't find anything related. Here is my method: ``` public static ArrayList<int[]> convert2DStringTo2DIntArrayList(String[][] originalString, int lengthOfRow, int lengthOfColumn) { ArrayList<in...
2014/12/18
[ "https://Stackoverflow.com/questions/27539419", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4372809/" ]
You may need to start the `couchdb` process as the `couchdb` user, with `su couchdb -c ./couchdb` (assuming the current directory contains the executable) - double-check the `su` command options for your system. Also, check the permissions on `/usr/local/var/log/couchdb/couch.log` - make sure it is writeable by the `c...
<https://medium.com/@tomiwatech_45998/installing-couchdb-on-ubuntu-17-10-18148e2eb846> Hi there, this helped me resolve the issue and solved the problem. My ubuntu version is 16.04 and i downloaded couchdb-1.7.0 version.
27,539,419
I was trying to convert my 2D String into 2D Integer ArrayList, but I don't know how to. I have read some reference but didn't find anything related. Here is my method: ``` public static ArrayList<int[]> convert2DStringTo2DIntArrayList(String[][] originalString, int lengthOfRow, int lengthOfColumn) { ArrayList<in...
2014/12/18
[ "https://Stackoverflow.com/questions/27539419", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4372809/" ]
Although on CentOS, the "problem" is avoided using `service couchdb [start|status|stop|restart]`.
You can start couchdb using below command sudo couchdb stop sudo couchdb start
27,539,419
I was trying to convert my 2D String into 2D Integer ArrayList, but I don't know how to. I have read some reference but didn't find anything related. Here is my method: ``` public static ArrayList<int[]> convert2DStringTo2DIntArrayList(String[][] originalString, int lengthOfRow, int lengthOfColumn) { ArrayList<in...
2014/12/18
[ "https://Stackoverflow.com/questions/27539419", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4372809/" ]
I would like to make a note here for how I fixed this problem in my environment. In my case, the `/opt/couchdb/data` folder was a symlink to `/var/lib/couchdb`. No matter what I tried I would get a permission denied error at startup, even though all the files seemed to be owned by user `couchdb`. I eventually figured ...
You can start couchdb using below command sudo couchdb stop sudo couchdb start
27,539,419
I was trying to convert my 2D String into 2D Integer ArrayList, but I don't know how to. I have read some reference but didn't find anything related. Here is my method: ``` public static ArrayList<int[]> convert2DStringTo2DIntArrayList(String[][] originalString, int lengthOfRow, int lengthOfColumn) { ArrayList<in...
2014/12/18
[ "https://Stackoverflow.com/questions/27539419", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4372809/" ]
<https://medium.com/@tomiwatech_45998/installing-couchdb-on-ubuntu-17-10-18148e2eb846> Hi there, this helped me resolve the issue and solved the problem. My ubuntu version is 16.04 and i downloaded couchdb-1.7.0 version.
You can start couchdb using below command sudo couchdb stop sudo couchdb start
27,539,419
I was trying to convert my 2D String into 2D Integer ArrayList, but I don't know how to. I have read some reference but didn't find anything related. Here is my method: ``` public static ArrayList<int[]> convert2DStringTo2DIntArrayList(String[][] originalString, int lengthOfRow, int lengthOfColumn) { ArrayList<in...
2014/12/18
[ "https://Stackoverflow.com/questions/27539419", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4372809/" ]
I would like to make a note here for how I fixed this problem in my environment. In my case, the `/opt/couchdb/data` folder was a symlink to `/var/lib/couchdb`. No matter what I tried I would get a permission denied error at startup, even though all the files seemed to be owned by user `couchdb`. I eventually figured ...
Although on CentOS, the "problem" is avoided using `service couchdb [start|status|stop|restart]`.
27,539,419
I was trying to convert my 2D String into 2D Integer ArrayList, but I don't know how to. I have read some reference but didn't find anything related. Here is my method: ``` public static ArrayList<int[]> convert2DStringTo2DIntArrayList(String[][] originalString, int lengthOfRow, int lengthOfColumn) { ArrayList<in...
2014/12/18
[ "https://Stackoverflow.com/questions/27539419", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4372809/" ]
I would like to make a note here for how I fixed this problem in my environment. In my case, the `/opt/couchdb/data` folder was a symlink to `/var/lib/couchdb`. No matter what I tried I would get a permission denied error at startup, even though all the files seemed to be owned by user `couchdb`. I eventually figured ...
<https://medium.com/@tomiwatech_45998/installing-couchdb-on-ubuntu-17-10-18148e2eb846> Hi there, this helped me resolve the issue and solved the problem. My ubuntu version is 16.04 and i downloaded couchdb-1.7.0 version.
182,341
In Package `KnotTheory`, there's a function called `PD[]` that takes a tabulated knot and returns its PD codes, for example: `PD[Knot[4, Alternating, 1]]` returns `PD[X[4, 2, 5, 1], X[6, 3, 7, 4], X[8, 6, 1, 5], X[2, 7, 3, 8]]`. My question: what is the data type of this output above and what could be its design purpo...
2018/09/22
[ "https://mathematica.stackexchange.com/questions/182341", "https://mathematica.stackexchange.com", "https://mathematica.stackexchange.com/users/60308/" ]
One could agree on a following convention for describing the same knot by agreeing on what is represented in each dimension: ``` {{4, 2, 5, 1}, {6, 3, 7, 4}, {8, 6, 1, 5}, {2, 7, 3, 8}} ``` The first dimension is a list of crossings and the second dimension is a list of edges. The same [expression](https://reference...
*Mathematica* is an expression rewriting language. "Functions" are implemented with rewriting rules. In this case, `PD` appears to be associated with a rule that rewrites `PD[Knot[...]` as `PD[X[...],...` but no rule to rewrite it further. This design pattern allows an expression to rewrite itself into a standard form....
64,335
How do I sync Calendar-Evolution between laptop (Ubuntu 10-10) and desktop (Ubuntu 11-04)? Information for new Ubuntu One users provided a warning and FAQ link, but the link is broken.
2011/10/05
[ "https://askubuntu.com/questions/64335", "https://askubuntu.com", "https://askubuntu.com/users/26219/" ]
Yes, synchronizing calendar with Ubuntu One doesn't work. But you can use SyncEvolution to do that. There is also a GUI called Genesis to simplify. If you want an online solution, then you can also get an account at Funambol.com, or similar. You could sync Evolutions data directory on Ubuntu One, but I wouldn't recom...
Read Step-by-step methods here: [Synchronize-evolution-data-among-computers-over-lan](https://help.ubuntu.com/community/SyncEvolution/synchronize-evolution-data-among-computers-over-lan) **Source:** <https://help.ubuntu.com/community/SyncEvolution/>
56,327,738
I want to take message value, which is under message array and parameter name equal to documentId.(which is bold in bellow code) bellow code which i have tried but not working as described above. `dynamic obj = JsonConvert.DeserializeObject(JsonDATA); var recid = obj.messages.message;` **JSON Data** ``` { "me...
2019/05/27
[ "https://Stackoverflow.com/questions/56327738", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9131197/" ]
You need to get the message at the correct index in the messages-array: ``` dynamic obj = JsonConvert.DeserializeObject(JsonDATA); var recid = obj.messages[0].message; ```
As `messages` is an array in your JSON, If you need to read any property of perticular element of an array then you need to use **index**. Something like ``` var recid = obj.messages[0].message; ```
93,603
We are looking for a song (artist and title). [![enter image description here](https://i.stack.imgur.com/H98kr.png)](https://i.stack.imgur.com/H98kr.png) --- Other (independently solvable) puzzles of this type: [1](https://puzzling.stackexchange.com/questions/93441/fun-with-flags-part-1-something-different), [3](htt...
2020/02/11
[ "https://puzzling.stackexchange.com/questions/93603", "https://puzzling.stackexchange.com", "https://puzzling.stackexchange.com/users/60396/" ]
The song you are looking for is: > > **[AFRICA](https://en.wikipedia.org/wiki/Africa_(Toto_song))**, by the band **TOTO** > > > How? Well, first note that @legodude5000 (go upvote their answer!) has done a lot of the heavy lifting here and managed in the majority of cases to: > > Identify which two countries'...
Partial answer because I'm not certain where to go from here, possibly because I've made some sort of error. I noticed that > > Each flag appears to be a combination of two flags from different African countries. > > > A graphic showing this: > > [![Flag Combinations](https://i.stack.imgur.com/IQvmk.png)](h...
58,351,458
I have the following data frame with column 'Name' having a pattern '///' in its values ``` data = [['a1','yahoo', 'apple'], ['a2','gma///il', 'mango'], ['a3','amazon', 'papaya'], ['a4','bi///ng', 'guava']] df = pd.DataFrame(data, columns = ['ID', 'Name', 'Info']) ``` I need to extract the entire row from this da...
2019/10/12
[ "https://Stackoverflow.com/questions/58351458", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8791858/" ]
Use `Series.str.contains`: ``` import pandas as pd data = [['a1','yahoo', 'apple'], ['a2','gma///il', 'mango'], ['a3','amazon', 'papaya'],['a4','bi///ng', 'guava']] df = pd.DataFrame(data, columns = ['ID', 'Name', 'Info']) print (df[df["Name"].str.contains("///")]) # ID Name Info 1 a2 gma///il ...
If you want to filter on perticular one column then use this solution ```py import numpy as np immport pandas as pd data = [['a1','yahoo', 'apple'], ['a2','gma///il', 'mango'], ['a3','amazon', 'papaya'], ['a4','bi///ng', 'guava']] df = pd.DataFrame(data, columns = ['ID', 'Name', 'Info']) mask = np.column_stack([d...
58,351,458
I have the following data frame with column 'Name' having a pattern '///' in its values ``` data = [['a1','yahoo', 'apple'], ['a2','gma///il', 'mango'], ['a3','amazon', 'papaya'], ['a4','bi///ng', 'guava']] df = pd.DataFrame(data, columns = ['ID', 'Name', 'Info']) ``` I need to extract the entire row from this da...
2019/10/12
[ "https://Stackoverflow.com/questions/58351458", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8791858/" ]
Use `Series.str.contains`: ``` import pandas as pd data = [['a1','yahoo', 'apple'], ['a2','gma///il', 'mango'], ['a3','amazon', 'papaya'],['a4','bi///ng', 'guava']] df = pd.DataFrame(data, columns = ['ID', 'Name', 'Info']) print (df[df["Name"].str.contains("///")]) # ID Name Info 1 a2 gma///il ...
`DataFrame` has string function `contains()` for this ``` new_df = df[ df['Name'].str.contains('///') ] ```
28,581,544
I am trying to find the difference of expenses of previous and current month in sql. I have a table like this ``` Date Amount Category 2/18/2015 100 Salary 2/12/2015 150 Rent 2/21/2015 200 Allowances 1/4/2015 200 Salary 1/17/2015 50 Rent 1/20/2015 100 Allowances ``` Now I want a res...
2015/02/18
[ "https://Stackoverflow.com/questions/28581544", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3655932/" ]
You can use something like below on the Calender Click Method: ``` DateTime date = Convert.ToDateTime(calendar.SelectedDate.ToString()); ``` Here calendar is the ID of your calendar control! Hope this helps.
Because it'is a web application i could just use JQuery UI <http://jqueryui.com/datepicker/#inline> ``` <!doctype html> <html lang="en"> <head> <meta charset="utf-8"> <title>jQuery UI Datepicker - Display inline</title> <link rel="stylesheet" href="//code.jquery.com/ui/1.11.3/themes/smoothness/jquery-ui.css"> <script...
12,592,994
I have a page that is listing links to other websites. Each link is followed by a brief description of the site being linked to. I want the link text to be slightly larger than the description so I added a CSS class definition a.link, in which I define font-size as 16px. The complete list is inside a standard `<p>` tag...
2012/09/26
[ "https://Stackoverflow.com/questions/12592994", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1698803/" ]
Good answer on the `<p>, <hr>` You'd be better off not using the `<p>`. Style the `a.link` into `display:block` which will display the a tag just like the enclosing `<p>` tag. Also auto-close your `<hr/>` Then correct your css selector: `#pane > a.link` if you need to actually be that selective. Probably better to j...
I think that you have problem with your HR tag, in XHTML you have to close your tag. So your HR should look like `<hr/>` ``` <div id="pane"> <p> <a href="http://www.google.com" class="link">Google</a> - For finding stuff <hr/> <a href="http://www.newegg.com" class="link">Newegg</a> - For buying stuff ...
12,592,994
I have a page that is listing links to other websites. Each link is followed by a brief description of the site being linked to. I want the link text to be slightly larger than the description so I added a CSS class definition a.link, in which I define font-size as 16px. The complete list is inside a standard `<p>` tag...
2012/09/26
[ "https://Stackoverflow.com/questions/12592994", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1698803/" ]
You can't put an `<hr>` inside of a `<p>` tag. If you try to, the browser automatically corrects it by closing the `<p>` tag for you. The second link is no longer within a `<p>` element and so your CSS rules no longer apply. This is what the browser fixes your code to and why your CSS classes are no longer applied. `...
I think that you have problem with your HR tag, in XHTML you have to close your tag. So your HR should look like `<hr/>` ``` <div id="pane"> <p> <a href="http://www.google.com" class="link">Google</a> - For finding stuff <hr/> <a href="http://www.newegg.com" class="link">Newegg</a> - For buying stuff ...
12,592,994
I have a page that is listing links to other websites. Each link is followed by a brief description of the site being linked to. I want the link text to be slightly larger than the description so I added a CSS class definition a.link, in which I define font-size as 16px. The complete list is inside a standard `<p>` tag...
2012/09/26
[ "https://Stackoverflow.com/questions/12592994", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1698803/" ]
hr can't in p tag. you can change p tag to div ``` <!doctype html> <html> <head> <style> #pane { float: right; width: 800px; } #pane div { margin-left: 15px; font-family: verdana; font-size: 12px; } #pane div a.large { font-size: 26px; } </style> </head> <body> <div id="pane"> <div> <a href="http://...
I think that you have problem with your HR tag, in XHTML you have to close your tag. So your HR should look like `<hr/>` ``` <div id="pane"> <p> <a href="http://www.google.com" class="link">Google</a> - For finding stuff <hr/> <a href="http://www.newegg.com" class="link">Newegg</a> - For buying stuff ...
12,592,994
I have a page that is listing links to other websites. Each link is followed by a brief description of the site being linked to. I want the link text to be slightly larger than the description so I added a CSS class definition a.link, in which I define font-size as 16px. The complete list is inside a standard `<p>` tag...
2012/09/26
[ "https://Stackoverflow.com/questions/12592994", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1698803/" ]
You can't put an `<hr>` inside of a `<p>` tag. If you try to, the browser automatically corrects it by closing the `<p>` tag for you. The second link is no longer within a `<p>` element and so your CSS rules no longer apply. This is what the browser fixes your code to and why your CSS classes are no longer applied. `...
A collection of links is probably more suited to an unordered list (`UL`) perhaps inside a `NAV`. Your issue is caused because `HR` inside of `P` doesn't [validate](http://validator.w3.org/) (and for a good reason). To confirm, I used this sample: ``` <!doctype html> <html> <head> <title>Test</title> </head> <bod...
12,592,994
I have a page that is listing links to other websites. Each link is followed by a brief description of the site being linked to. I want the link text to be slightly larger than the description so I added a CSS class definition a.link, in which I define font-size as 16px. The complete list is inside a standard `<p>` tag...
2012/09/26
[ "https://Stackoverflow.com/questions/12592994", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1698803/" ]
Is it necessary to wrap it as a paragraph? If not then you can lose that tag and then it works without that clutter. <http://jsfiddle.net/bqhC9/> ``` <div id="pane"> <p> <a href="http://www.google.com" class="link">Google</a> - For finding stuff </p> <hr> <p> <a href="http://www...
hr can't in p tag. you can change p tag to div ``` <!doctype html> <html> <head> <style> #pane { float: right; width: 800px; } #pane div { margin-left: 15px; font-family: verdana; font-size: 12px; } #pane div a.large { font-size: 26px; } </style> </head> <body> <div id="pane"> <div> <a href="http://...
12,592,994
I have a page that is listing links to other websites. Each link is followed by a brief description of the site being linked to. I want the link text to be slightly larger than the description so I added a CSS class definition a.link, in which I define font-size as 16px. The complete list is inside a standard `<p>` tag...
2012/09/26
[ "https://Stackoverflow.com/questions/12592994", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1698803/" ]
Is it necessary to wrap it as a paragraph? If not then you can lose that tag and then it works without that clutter. <http://jsfiddle.net/bqhC9/> ``` <div id="pane"> <p> <a href="http://www.google.com" class="link">Google</a> - For finding stuff </p> <hr> <p> <a href="http://www...
I think that you have problem with your HR tag, in XHTML you have to close your tag. So your HR should look like `<hr/>` ``` <div id="pane"> <p> <a href="http://www.google.com" class="link">Google</a> - For finding stuff <hr/> <a href="http://www.newegg.com" class="link">Newegg</a> - For buying stuff ...
12,592,994
I have a page that is listing links to other websites. Each link is followed by a brief description of the site being linked to. I want the link text to be slightly larger than the description so I added a CSS class definition a.link, in which I define font-size as 16px. The complete list is inside a standard `<p>` tag...
2012/09/26
[ "https://Stackoverflow.com/questions/12592994", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1698803/" ]
A collection of links is probably more suited to an unordered list (`UL`) perhaps inside a `NAV`. Your issue is caused because `HR` inside of `P` doesn't [validate](http://validator.w3.org/) (and for a good reason). To confirm, I used this sample: ``` <!doctype html> <html> <head> <title>Test</title> </head> <bod...
I think that you have problem with your HR tag, in XHTML you have to close your tag. So your HR should look like `<hr/>` ``` <div id="pane"> <p> <a href="http://www.google.com" class="link">Google</a> - For finding stuff <hr/> <a href="http://www.newegg.com" class="link">Newegg</a> - For buying stuff ...
12,592,994
I have a page that is listing links to other websites. Each link is followed by a brief description of the site being linked to. I want the link text to be slightly larger than the description so I added a CSS class definition a.link, in which I define font-size as 16px. The complete list is inside a standard `<p>` tag...
2012/09/26
[ "https://Stackoverflow.com/questions/12592994", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1698803/" ]
You can't put an `<hr>` inside of a `<p>` tag. If you try to, the browser automatically corrects it by closing the `<p>` tag for you. The second link is no longer within a `<p>` element and so your CSS rules no longer apply. This is what the browser fixes your code to and why your CSS classes are no longer applied. `...
hr can't in p tag. you can change p tag to div ``` <!doctype html> <html> <head> <style> #pane { float: right; width: 800px; } #pane div { margin-left: 15px; font-family: verdana; font-size: 12px; } #pane div a.large { font-size: 26px; } </style> </head> <body> <div id="pane"> <div> <a href="http://...
12,592,994
I have a page that is listing links to other websites. Each link is followed by a brief description of the site being linked to. I want the link text to be slightly larger than the description so I added a CSS class definition a.link, in which I define font-size as 16px. The complete list is inside a standard `<p>` tag...
2012/09/26
[ "https://Stackoverflow.com/questions/12592994", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1698803/" ]
You can't put an `<hr>` inside of a `<p>` tag. If you try to, the browser automatically corrects it by closing the `<p>` tag for you. The second link is no longer within a `<p>` element and so your CSS rules no longer apply. This is what the browser fixes your code to and why your CSS classes are no longer applied. `...
Good answer on the `<p>, <hr>` You'd be better off not using the `<p>`. Style the `a.link` into `display:block` which will display the a tag just like the enclosing `<p>` tag. Also auto-close your `<hr/>` Then correct your css selector: `#pane > a.link` if you need to actually be that selective. Probably better to j...
12,592,994
I have a page that is listing links to other websites. Each link is followed by a brief description of the site being linked to. I want the link text to be slightly larger than the description so I added a CSS class definition a.link, in which I define font-size as 16px. The complete list is inside a standard `<p>` tag...
2012/09/26
[ "https://Stackoverflow.com/questions/12592994", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1698803/" ]
Is it necessary to wrap it as a paragraph? If not then you can lose that tag and then it works without that clutter. <http://jsfiddle.net/bqhC9/> ``` <div id="pane"> <p> <a href="http://www.google.com" class="link">Google</a> - For finding stuff </p> <hr> <p> <a href="http://www...
A collection of links is probably more suited to an unordered list (`UL`) perhaps inside a `NAV`. Your issue is caused because `HR` inside of `P` doesn't [validate](http://validator.w3.org/) (and for a good reason). To confirm, I used this sample: ``` <!doctype html> <html> <head> <title>Test</title> </head> <bod...
69,593,730
Using Admin-sdk, Is there a way to delete a particular provider from a user record in firebase? For eg: Assume a given user has the following providers linked to his account 1. password 2. google.com 3. facebook.com Say, I would like to revoke the user's ability to login via facebook to his account. Can this be done...
2021/10/16
[ "https://Stackoverflow.com/questions/69593730", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6179988/" ]
You need to declare the variable first, and then assign it values on separate lines. ``` pragma solidity ^0.8; contract MyContract { mapping(address => bool) public myMap; constructor() { myMap[address(0x123)] = true; myMap[address(0x456)] = false; myMap[address(0x789)] = true; } ...
Unfortunately, you can't. See the Solidity documentation for details on the reasons why. Your only option is to iterate through the keys. If you don't know your set of keys ahead of time, you'll have to keep the keys in a separate array inside your contract.
30,109,014
I am trying to extract the length of an integer column but I get this error as below. Can someone share their thoughts on this? Thanks. **`Error: Argument type mismatch in function LENGTH: first argument is type int64`**
2015/05/07
[ "https://Stackoverflow.com/questions/30109014", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1049893/" ]
I might be wrong, but these two must be your major problems: 1. `signaling_server.send(...` I am not seeing any target here, so guessing that the server just broadcasts this message to everyone. When you are sending an sdp to already established peer connection, you are bound to get the error which you are getting no...
i had the same problem when i was implementing one-to-many rtc broadcast, and what mido22 said is right. you might be sending/resetting existing established peer object with other incoming client. you have to create new RTCPeerConenction object for every new incoming client. the general work flow would be as follow. ...
48,129,014
I'm trying to write my own boolean "abstract" with some additional functions. ``` @forward abstract MyBool(Bool) { public inline function new(b:Bool) { this = b; } @:from public static inline function fromBool(b:Bool):MyBool { return new MyBool(b); } @:to public inline function toBool():Bool { ...
2018/01/06
[ "https://Stackoverflow.com/questions/48129014", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3009636/" ]
There's an open feature request regarding this: [Can @:forward also forward underlying operator overloads? (#5035)](https://github.com/HaxeFoundation/haxe/issues/5035) One way to make your code example work is to allow implicit conversions with `to Bool`. I'm not entirely sure why the equivalent `@:to` function doesn...
If your main goal is to just add methods to the `Bool` type, then perhaps avoid the problem altogether by instead creating a class that adds methods to Bool via static extension (documented in the Haxe manual). This method would eliminate the need for operator forwarding.
717,939
I recently restarted after an update on 15.10, and now the keyboard on my laptop (Lenovo Thinkpad Yoga) doesn't work. I can't even ctrl-alt-[N] to get to a virtual terminal, nor does a USB keyboard work. The keyboard *does* work in BIOS setup and GRUB mode, but that's it. Also, the touchscreen stopped working at the sa...
2016/01/07
[ "https://askubuntu.com/questions/717939", "https://askubuntu.com", "https://askubuntu.com/users/4749/" ]
NetworkManager includes an `nmcli` program, which has a `monitor` command. Here is what its output looks like for me when I disconnect then connect to a Wi-Fi access point: ``` $ nmcli monitor There's no primary connection wlp4s0: unavailable Networkmanager is now in the 'disconnected' state wlp4s0: disconnected wlp4s...
While it's certainly possible to use `dbus` , personally I'd go with simple bash while loop + awk ``` while [ "$(iwconfig 2> /dev/null | awk '/Access Point/ && /XX:YY:ZZ:11:22:33/ {print "true" }')" != "true" ]; do : ; sleep 0.25 ;done ; echo DONE ``` What is happening there ? While loop keeps running, testing outp...
717,939
I recently restarted after an update on 15.10, and now the keyboard on my laptop (Lenovo Thinkpad Yoga) doesn't work. I can't even ctrl-alt-[N] to get to a virtual terminal, nor does a USB keyboard work. The keyboard *does* work in BIOS setup and GRUB mode, but that's it. Also, the touchscreen stopped working at the sa...
2016/01/07
[ "https://askubuntu.com/questions/717939", "https://askubuntu.com", "https://askubuntu.com/users/4749/" ]
Run > > dbus-monitor --system "type='signal',interface='org.freedesktop.NetworkManager'" > > > Then change your wifi connection. You will get the signal that property changed. It returns a "PrimaryConnection" that is activated. You can then query the activated connection and see if it matches the connection you ...
While it's certainly possible to use `dbus` , personally I'd go with simple bash while loop + awk ``` while [ "$(iwconfig 2> /dev/null | awk '/Access Point/ && /XX:YY:ZZ:11:22:33/ {print "true" }')" != "true" ]; do : ; sleep 0.25 ;done ; echo DONE ``` What is happening there ? While loop keeps running, testing outp...
58,539,906
I have widget with following info: ``` <appwidget-provider xmlns:android="http://schemas.android.com/apk/res/android" android:minWidth="328dp" android:minHeight="56dp" android:updatePeriodMillis="1000000" android:initialLayout="@layout/home_widget" android:previewImage="@drawable/widget_preview...
2019/10/24
[ "https://Stackoverflow.com/questions/58539906", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1619036/" ]
becuase of we use diffrent screen size and diffrent density of the screen to solve this dont use dp or sp rather than use sdp or ssp which is provide in this library <https://github.com/intuit/sdp> And this make your space preamter screen responsive
If you want widget width match as parent then you can use the `android:layout_width="match_parent"` `match_parent` defines the width/height as match of parent, there is not any need to define the static dimen. It is adjust the width according to parent's width. I hope its work for you.