INSTRUCTION
stringlengths
25
999
RESPONSE
stringlengths
0
999
SOURCE
stringlengths
16
38
METADATA
dict
a question about how to use 'the' Which way is correct? 1. For the 5th,7th and 8th sets of parameters 2. For the 5th, the 7th and the 8th sets of parameters Thanks!!
This is correct: > For the 5th,7th and 8th sets of parameters
stackexchange-english
{ "answer_score": -3, "question_score": 0, "tags": "vocabulary" }
mongoose $inc is not working would like to insert value increment by one I am trying to increment view field by one always when it hit this api but does not work error : Posts validation failed: view: Cast to number failed for value view: { type: Number, default: 0 }, ...
In your way, you need to do `post.view = post.view + 1` instead of `post.view = { $inc: { view: 1 } };` because it will set the `view` field to be the object `{ $inc: { view: 1 } }`. Or if you want to use `$inc`, you need to make an **update operation**. Something like: await PostsModel.findOneAndUpdate(...
stackexchange-stackoverflow
{ "answer_score": 1, "question_score": 0, "tags": "mongodb, mongoose" }
Magento, how to get price array from grouped products? I am looking to retrieve an array with all of the final_prices for a grouped product. The goal is to be able to use this information in product/view.phtml and display a price range that reads From: $25.00 - $899.00 I have been able to get the array somewhat worki...
You could try this in view.phtml file: $prices = array (Mage::helper('tax')->getPrice($_product, $_product->getFinalPrice())); print_r ($prices); Hope this helps!
stackexchange-stackoverflow
{ "answer_score": 0, "question_score": 0, "tags": "php, mysql, magento" }
Factor space norm calculation when the subspace is finite-dimensional Let $(X,\|\;\|_X)$ be a normed vector space and let $M$ be a closed finite-dimensional subspace of $X$. I want to prove that: $$ \forall x\in X\;\;\exists\;m\in M\text{ s.t. } \|[x]_M\|_{X/M}=\|x+m\|_X $$ I'm really lost with this one since I don't g...
Let $x\in X$ be arbitrary. Then $\|x-m\|\ge 0,\,\forall m\in M\Rightarrow \inf\limits_{m\in M}{\|x-m\|_X}$ exists. Let $\\{m_n\\}$ be a minimizing sequence, i.e $\|x-m_n\|\to \inf\limits_{m\in M}{\|x-m\|_X}$. Because the functional $J(m)=\|x-m\|$ is coercive over $M$ it follows that $\\{m_n\\}$ is bounded in $M$ and th...
stackexchange-math
{ "answer_score": 1, "question_score": 1, "tags": "analysis, functional analysis, convex analysis, convex optimization" }
kendo datepicker depth year last day I am trying to initialize a Kendo "datepicker" with the following options: $("#elementid").kendoDatePicker({ //... depth: "year" }); When I change month in the widget I would like to set in my view model the last day of the selected month (no...
Define you `kendoDatePicker` as: $("#elementid").kendoDatePicker({ ... depth : "year", change: function (e) { var val = this.value(); this.value(new Date(val.setMonth(val.getMonth() + 1, 0))); } }); We handle the `change` event and use Java...
stackexchange-stackoverflow
{ "answer_score": 0, "question_score": 0, "tags": "datepicker, kendo ui" }
Monitoring us president promises between times Nominees for president elections make very promises. In action, after election, the resolute on the some promises; but about some others... Is there a media/NGO/... that Monitor us president promises time to time, e.g. every month/year?
CNN, Politifact, and Washington Post are tracking Trumps promises. Politifact also tracked Obamas promises. I am not aware of any trackers for other presidents. I'm also not sure how meaningful these really are (a president could have a lot of small, simple to fulfill promises, or may be unable to fulfill promises ...
stackexchange-politics
{ "answer_score": 3, "question_score": 1, "tags": "united states" }
Negate match in RE2 syntax? How can I write a regex in RE2 for "match strings not starting with 4 or 5"? In PCRE I'd use `^(?!4)` but RE2 doesn't support that syntax.
You can use this regex: ^[^45] `^` matches start and `[^45]` matches anything but `4` or `5` at start.
stackexchange-stackoverflow
{ "answer_score": 9, "question_score": 10, "tags": "regex, re2" }
li attribute returns undefined I have a nav list on the side of my bootstrap page and I would like to grab the value of the custom attribute of each item each time it is clicked. I have tried numerous various methods but I can't seem to figure out why the attribute keeps returning undefined. Here is some sample HTML: ...
Your custom attribute isn't on the LI. You have to get the attribute from it's child. var currentVal= $(this).children('a').attr('myval');
stackexchange-stackoverflow
{ "answer_score": 4, "question_score": 0, "tags": "jquery, html, twitter bootstrap" }
Toggling a bool value is being flagged in the Visual Studio IDE Take this simple code: void CChristianLifeMinistryEditorDlg::OnOptionsAddTimeToConcludingComments() { BOOL bAddTime = CChristianLifeMinistryUtils::AddRemainingTimeToConcludingComments(); bAddTime = !bAddTime; CChri...
Simply change BOOL bAddTime = ... to bool bAddTime = ... I guess the static code analysis gets confused by `BOOL` being a type alias for `int`.
stackexchange-stackoverflow
{ "answer_score": 3, "question_score": 1, "tags": "visual c++, mfc, visual studio 2019, boolean expression" }
SQL CONVERT and FLOOR query What is the difference between these two queries? Why do they give different results? **Query 1** DECLARE @test nvarchar SET @test = CONVERT(nvarchar, FLOOR(10.5)) SELECT @test Results: ['1'] **Query 2** SELECT CONVERT(nvarchar, ...
DECLARE @test nvarchar That's 1 character long so truncates its assigned value; add a (size)
stackexchange-stackoverflow
{ "answer_score": 5, "question_score": 1, "tags": "sql, tsql, floor" }
Absolute Value Inequalities with Two Branches please treat my brackets as absolute value bars, or fix my formatting - I'm new here :) Q: $2 < |2x-3| < 7$ I tried to break it up, $2 < 2x-3 < 7$ $5 < 2x < 10$ $5/2 < x < 5$ Other branch, $2 < -2x+3 < 7$ $-1 < -2x < 4$ $1/2 > x > -2$ $-2 < x < 1/2$ How do I solv...
### By the definition of absolute function we get: $|2x-3| = \max(2x-3, -(2x-3))$ ### What does it mean? Examples: 1). $x=1 \Rightarrow |2\cdot1 -3| = |-1| = \max(-1,-(-1)) =-(-1) = 1$ 2). $x=2 \Rightarrow |2\cdot2 -3| = |1| = \max(1,-(1)) = 1$ As you can see, if $2x-3\ge 0$, the absolute function chooses $2...
stackexchange-math
{ "answer_score": 0, "question_score": 0, "tags": "algebra precalculus, absolute value" }
Are the memory mapped IO address(es) of a device mapped to the kernel space of a process? Say that I have a device that uses memory mapped IO. And we know that in Linux, each process have 3 GB of user space, and 1 GB of kernel space. Now I assume that the address(es) for this device will be mapped to the kernel space...
> Now I assume that the address(es) for this device will be mapped to the kernel space of a process, so that a process (which is running in user mode) cannot access the device. Am I correct? Mostly. Since devices exist in physical memory, they can be mapped to multiple virtual addresses. An appropriately privileged us...
stackexchange-stackoverflow
{ "answer_score": 5, "question_score": 0, "tags": "linux, assembly, x86, operating system" }
How do I apply a patch from gist to the Django source? I want to try out a patch on gist that modifies the source code of Django: gist: 550436 How do I do it? I have never used git so a step by step instruction would be greatly appreciated.
You can use `patch` to apply diffs. Make sure you're in your django source directory (or wherever you want to apply the patch), and run something like `patch -p1 < downloaded-patch.diff`. You may want to experiment with the `-p` argument if it fails; -p tells `patch` to strip some of the directory prefix for each file...
stackexchange-stackoverflow
{ "answer_score": 7, "question_score": 2, "tags": "python, git, github, patch" }
How to fill entire browser window on initial load How would I fill the entire browser window with the dark brown color. Right now, the top of a YouTube video is clipping the bottom. To better understand what it is I'm describing, I'll attach at picture.![enter image description here]( On the initial page load, I do no...
Something like this should work: <div class="mask"></div> .mask { position: fixed; width: 100vw; height: 100vh; z-index: 11; background-color: brown; }
stackexchange-stackoverflow
{ "answer_score": 1, "question_score": -2, "tags": "javascript, html, css, reactjs" }
When does a Sequelize (ORM) instance method need `sequelize.` to refer to a different model and when not? Suppose inside a model you have the following Sequelize instance method: const Admins = require("./admin"); Organization.prototype.getAdmins = function () { // option 1 return...
It depends on what you import in a certain model file: `sequelize` instance or an initialized model (that also should be initialized using `sequelize` instance). The goal is to access needed model to call its methods like `findAll`. It's up to you what approach to use but I'd recommend to access all models from `sequ...
stackexchange-stackoverflow
{ "answer_score": 0, "question_score": 0, "tags": "node.js, sequelize.js" }
How to prevent cached binaries to get deleted on file system in DXA? Knowing the fact that DXA expects all items including binaries to be published to the CD Broker database and it will cache binaries on file system of the web application server. But if we do a new EAR deployement, these cached binaries will get delete...
**Option1:** Try to use the persistent storage mapping in your web app, for example, try to use EFS (NFS storage) symbolic or soft link folder map to your web application for **BinaryData** folder so that every time if you do deployment it will not be getting deleted images folder. **Option2:** Alternatively, a possib...
stackexchange-tridion
{ "answer_score": 2, "question_score": 1, "tags": "dxa, publishing, dxa java, binary" }
$L^p$ convergence proof check I don't have much experience with measure theory, so I want to make sure that I'm not making any bad mistakes. I also want to be sure that the theorem is true so I can use it. **Theorem:** Let $\\{u_i\\}$ be a Cauchy sequence in $L^p(U)$. Then for all $\epsilon>0$, there exists an $N$ suc...
Your theorem is wrong (you proved convergence even in $L^\infty(U)$). The problem in your proof is, that your set $S$ (and, hence, it's measure) depends on $i,j$. Therefore, you can't choose $M$ as desired.
stackexchange-math
{ "answer_score": 3, "question_score": 1, "tags": "measure theory, convergence divergence, lp spaces" }
C# converting a decimal to an int safely I am trying to convert a decimal to an integer safely. Something like public static bool Decimal.TryConvertToInt32(decimal val, out int val) this will return false if it cannot convert to an integer, and true w/ successful output if it can. This is to avoid...
Here: public static bool TryConvertToInt32(decimal val, out int intval) { if (val > int.MaxValue || val < int.MinValue) { intval = 0; // assignment required for out parameter return false; } intval = Decimal.ToInt32(val); return tru...
stackexchange-stackoverflow
{ "answer_score": 11, "question_score": 11, "tags": "c#, decimal" }
What does 出来になる mean? I saw it used and don't understand it. Here's the usage: > Any translation of () I can think of sounds nonsensical. Could someone point me in the right direction?
The means []{}, , , etc. // means //. I think it's like: "(Something) was so well-made that it could~~" "The quality (of something) was good enough to~~"
stackexchange-japanese
{ "answer_score": 2, "question_score": 0, "tags": "translation, meaning" }
Show the Items in the Folder location and not the full directory I have an array with of folders in a Directory. I want them displayed in the combo-box but I don't the full directory to display, I just want the folder names in the directory. I haven't been successful with what I have tried MY CODE string...
Look at the DirectoryInfo class - you can do something like this: string folder = new DirectoryInfo(path).Name; To get an array (using System.Linq), you could do the following: string[] filePaths = Directory.GetDirectories("<yourpath>").Select(d => new DirectoryInfo(d).Name).ToArray();...
stackexchange-stackoverflow
{ "answer_score": 2, "question_score": 0, "tags": "c#, getdirectories" }
How to use React Moment Use fromNow in element title? I am using the `react-moment` library and I am having a hard time figuring out how to set the title as follows. <Moment title={<Moment>{createdAt}</Moment>} format="MMM DD, YYYY">{createdAt}</Moment> # Output `<time datetime="1389364532000...
Not familiar with react-moment (it is not updated in the last 6 months -> red flag for any js library), and I am not sure why would you need it? The original moment.js which you can use by by `const moment = require("moment")` can do this just by doing <time datetime={moment().format("x")}, title={moment(...
stackexchange-stackoverflow
{ "answer_score": 1, "question_score": 1, "tags": "reactjs, momentjs" }
Export joomla user with same password I am merging a small group on sort of site with my joomla site. I already have members in my joomla site so I somehow want to migrate the users of joomla to groupon database which uses a different encryption scheme for password. Is there a way to do that?
You would have to have the unencrypted passwords to be able to use that. There is no conversion from one encryption scheme to another.
stackexchange-stackoverflow
{ "answer_score": 2, "question_score": 0, "tags": "joomla, migration, export" }
Alternative to positive lookbehind regex I am working with Prism.js for syntax highlighting and I have a regex for detecting Kotlin infix function `(?<=\w\s)(\w+)(?=\s\w)` (< which uses a positive look ahead and a positive look behind, however this does not work on Safari browsers which breaks my entire website. I ha...
If you can only provide a regex and the whole match value is highlighted, there is no way to mimic the current lookbehind pattern. The best you could think of is a regex like `/\b\s(\w+)(?=\s\w)/` that would also highlight the leading whitespace (unless there is an option to highlight only some group value). If you ca...
stackexchange-stackoverflow
{ "answer_score": 1, "question_score": 1, "tags": "regex, safari, positive lookbehind" }
How to disable functionality of <a href> I want to disable this: <a href="javascript:void(0);" role="button" onclick="edit_user('<?php echo $data['user_id']; ?>')"><i class="glyphicon glyphicon-pencil"></i> when user_id = 1. Can someone help me?
You could check in php for $user_id ==1 and echo the code you need <a <?php echo ( $user_id ==1 ) ? '' : 'href="javascript:void(0);"' ?> role="button" onclick="edit_user('<?php echo $data['user_id']; ?>')"> <i class="glyphicon glyphicon-pencil"></i> </a>
stackexchange-stackoverflow
{ "answer_score": 2, "question_score": 0, "tags": "php, jquery, mysql" }
Type Conversion in Informix 4GL I want to convert a variable of type `VARCHAR` to `INTEGER` and vice versa (i.e. from `INTEGER` type to `VARCHAR`) in Informix 4GL.
DEFINE v VARCHAR(20) DEFINE i INTEGER LET v = "12345" LET i = v DISPLAY "i = ", i, "; v = ", v LET i = 123456 LET v = i DISPLAY "i = ", i, "; v = ", v Easy, huh? You run into problems if the string can't be converted to a number (run time errors, etc). In essence, I4GL will...
stackexchange-stackoverflow
{ "answer_score": 5, "question_score": 2, "tags": "informix, 4gl" }
How do I parse content with regular expression using jQuery? I am trying to use jQuery to break right ascension and declination data into their constituents (hours, minutes, and seconds) and (degrees, arc-minutes, and arc-seconds), respectively from a string and store them in variables as numbers. For example: ...
This should do it: var dec = '-35:48:00'; var parts = dec.split(':'); `parts[0]` would then be `-35`, `parts[1]` would be `48`, and `parts[2]` would be `00` You could run them all through `parseInt(parts[x], 0)` if you want integers out of the strings: var dec_d = parseInt(parts[0...
stackexchange-stackoverflow
{ "answer_score": 4, "question_score": 0, "tags": "javascript, jquery, regex" }
Number Appears after Array Stored in SESSION I'm doing a print_r on a array stored on a session variable and for some unknown reason it's adding a number after the array prints. Example: Array ( [0] => 868 [userid] => 868 ) 1 If I do a print_r directly in the function ...
Can you post the code you are using to do this around `print_r`? The most common reason for getting a 1 is when you try to print a boolean: $my_bool = true; print $my_bool; // will be printed as 1 print_r($my_bool); // will also be printed as 1
stackexchange-stackoverflow
{ "answer_score": 0, "question_score": 2, "tags": "php, arrays, session" }
Remove Backtick From String I am using the npm 'mysql' for a Node app I am working on. At one point that app saves a link to a table. In order to add the link to the table I have to use the npm's escapeId() function. My issue is that when I got to retrieve that link from the database I get something like this: ...
Use replace to remove the unwanted characters. var newStr = '` "");
stackexchange-stackoverflow
{ "answer_score": 9, "question_score": 1, "tags": "javascript, mysql, node.js" }
Asp.net Mvc Routing problem * * * alt text **Global.asax Code:** routes.MapRoute( "Default", // Route name "{controller}/{action}/{id}", // URL with parameters new { controller = "article", action = "article", id = UrlParameter.Optional } // Parameter defaults ); I want to use url...
Like this: routes.MapRoute( "Article", "Article/{id}", new { controller = "article", action = "article", id = UrlParameter.Optional } );
stackexchange-stackoverflow
{ "answer_score": 2, "question_score": 1, "tags": "asp.net, asp.net mvc" }
Metric spaces in which the only open sets are empty set and the full set > What are the metric spaces in which the only open sets are the empty set$(\emptyset)$ and the full set$(X)$? **My attempt** : If $X=\emptyset$ then the above statement is trivially true. Suppose $(X\ne\emptyset,d)$ is a metric space in which t...
Yes, you're correct: if there are two points or more, there is an open ball that is not empty nor $X$: if $x \neq y$ are two points of $X$, set $r=d(x,y)>0$ and $x \in B(x,r), y \notin B(x,r)$. So $\emptyset \neq B(x,r) \neq X$.
stackexchange-math
{ "answer_score": 3, "question_score": 0, "tags": "metric spaces, solution verification" }
How do I select only an image that's NOT inside a link when both are inside the same ID? I have some code that I can't alter that's like this: <div id="wombat"> <a href=""><img src="a"></a> <img src="b"> </div> I want to only target img b. #wombat img {blah} is getting both of th...
You can use the sibling or the descendant operator, depending on what you want to achieve: #wombat > img { /* any images that reside directly below #wombat, without any more levels in between */ } a ~ img { /* any image that follows as a sibling to an anchor */ } ...
stackexchange-stackoverflow
{ "answer_score": 6, "question_score": 3, "tags": "html, css" }
Grid-like dataframe to list I have an excel dataset which contains 100 rows and 100 clolumns with order frequencies in locations described by x and y.(gird like structure) I'd like to convert it to the following structure with 3 columns: x-Coördinaten | y-Coördinaten | value The "value" column only...
Assuming this input: l = [[1,5,3,5],[4,2,5,6],[2,3,1,5]] df = pd.DataFrame(l) you can use `stack`: df2 = df.rename_axis(index='x', columns='y').stack().reset_index(name='value') output: x y value 0 0 0 1 1 0 1 5 2 0 2 3 ...
stackexchange-stackoverflow
{ "answer_score": 1, "question_score": 0, "tags": "python, pandas, list, merge" }
Url rewriting issue on azure I have a subdomain, test1.test.com, i want to do a url rewriting on that subdomain to rewrite all requests to point other domain. For example i want to rewrite all request to test1.test.com to point < here is my rewrite rule. <rewrite> <rules> <rule name=...
It's not possible to rewrite to another domain. Rewrite deals only with the last part of the url (after the domain) so the only way to change domain is to use redirect like this: <rewrite> <rules> <rule name="Test" stopProcessing="true"> <match url="test1.test.com" /> <ac...
stackexchange-stackoverflow
{ "answer_score": 0, "question_score": 0, "tags": "asp.net, azure, url rewriting" }
Expectation of square root of binomial r.v. Let $X\sim B(n,p)$ denote a binomial random variable. Is there any approximation available for the quantity $E(\sqrt{X})$? Clearly Jensen's inequality holds, but rudimentary tooling around with Maple hasn't turned up anything more substantial.
$\newcommand{\E}{\mathbf{E}}$ $\renewcommand{\P}{\mathbf{P}}$ $\DeclareMathOperator{\var}{Var}$ If we use Taylor expansion (as Anthony suggested) for $\sqrt{x}$ around 1, we get: $$\sqrt{x}\approx 1 + \frac{x-1}{2} - \frac{(x-1)^2}{8} .$$ We can use this to get an approximation of $$\E(\sqrt{X})\approx 1-\frac{\var(X)...
stackexchange-mathoverflow_net_7z
{ "answer_score": 18, "question_score": 12, "tags": "pr.probability" }
Expectation of Absolute Deviation From Mean Consider a random variable $X$ and $E[|X|] < 1$. Hence, its expectation $E[X]$ exists. Let us denote $\mu_X := E[X]$ for notational simplicity. The absolute deviation from the mean is $|X-\mu_X|$, and its expectation is denoted as $d_X := E [|X-\mu_X|]$ a) Show that $d_X ≤...
$E[X-\mu_X]$ is $0$ but $d_X=E|X-\mu_X|$ is not $0$ unless $X$ is a constant. Part a) is an immediate apllication of Holder's / C-S inequality: $E|X-\mu_X| \leq \sqrt {E(X-\mu_X)^{2}}=\sqrt {var (X)} =\sigma_X$. For b) let $Y=\frac {X-\mu_X} {\sigma_X}$ Then $Y \sim N(0,1)$ so $d_X=E|X-\mu_X|=\sigma_X E|Y|$. You can...
stackexchange-math
{ "answer_score": 0, "question_score": 1, "tags": "probability, expected value, means" }
Is it an offence to ignore a portable traffic light This is a question about laws regarding traffic lights in the UK. When companies are carrying out works on or near roads they sometimes put up their own lights to control traffic and keep it flowing. Is it an offence to ignore the lights, or do they hold the same au...
Portable signs are legal and you have to obey then. < <
stackexchange-law
{ "answer_score": 4, "question_score": 0, "tags": "traffic, england and wales" }
best_in_place not saving So, I'm using the best in place gem to allow users to edit their photos caption in place. However, the text that is entered isn't being saved or stored in the database. Here is a snapshot of the schema relevant to this area: create_table "photos", force: true do |t| t....
Your aren't using the `best_in_place` helper method into the view. Check out the README or the Railscasts #302. You must do something like that: <%= best_in_place @photo, :description, type: :input %> Adjust it to your needs. FYI: `text_field` is a helper method provided by Rails.
stackexchange-stackoverflow
{ "answer_score": 0, "question_score": 0, "tags": "ruby on rails, ruby" }
Which is better: letting Java do autoboxing or using valueOf() I am just wondering is there any difference in letting java autobox say an integer: Integer myInteger = 3; // This will call Integer.valueOf() or having your code as Integer myInteger = Integer.valueOf(3); Is there an...
They are equal anyway internally, so use the first variant. Chances are good, that future compiler optimizations may make the first even faster in the future.
stackexchange-stackoverflow
{ "answer_score": 19, "question_score": 20, "tags": "java, performance, autoboxing" }
How to base 64 encode a dataframe in r As an example lets take `df <- head(iris)`. How would I encode this into a base64 string. I need it for the GitHub API content argument. At the moment I have been trying to use the `base64encode()` function but get the _" error in normalizePath"_.
Specifically for the GitHub API after some research the following code worked perfectly as it was able to decode and move the table to Github: df1<-charToRaw(paste(capture.output(write.table(Table, quote=FALSE, row.names=FALSE , sep=",")), collapse="\n")) base64_code<-base64enc::base64encode(df1...
stackexchange-stackoverflow
{ "answer_score": 0, "question_score": 0, "tags": "r, base64, github api" }
Find the same numbers from two array Hello to everyone please help me get the same numbers from two array with function. function getIntersect(arrF, arrS){ var arrF = [ 3, 5, 8]; var arrS = [1, 2, 3, 5, 8]; var nums = []; for ( var i = 0; i < arrF.length; i++...
Here is the updated code, couple of updates: * added the parameters in function * put the return statement outside both the `for` loops * compare values instead of indexes * instead of pushing both the values, push only one (since they are same) var arrF = [3, 5, 8]; var arrS = [1, 2, 3, ...
stackexchange-stackoverflow
{ "answer_score": 1, "question_score": 0, "tags": "javascript" }
Transfer MFVideoFormat from RGB24 to any other supported format by encoder I need to use the encoder H264.aspx) but the problem is that encoder does not accept except a list of MFVideoFormat. > MFVideoFormat_I420 > > MFVideoFormat_IYUV > > MFVideoFormat_NV12 > > MFVideoFormat_YUY2 > > MFVideoFormat_YV12 The probl...
You have (at least) two options: 1. Transform (by yourself) your RGB24 samples (bitmaps) into NV12 (or other) samples before you pass them to the encoder. It is not that hard. There are examples: < 2. You can create an instance of Color Converter DSP (< and configure it's input to receive RGB24 samples and it's o...
stackexchange-stackoverflow
{ "answer_score": 2, "question_score": 2, "tags": "ms media foundation" }
Can i add more numbers to my field number value in my collection? Is it possible to to add numbers to my total price on firebase collection? For example, I have collection called wallet and there is a field called pocketMoney with number. I want to update my pocketMoney with more values. Sorry for the bad explanation ...
I think you're looking for `FieldValue.increment`, which allows you to increment a value in the database without knowing its current value on the client. For all on this see the documentation on incrementing a numeric value, which also contains this JavaScript example: var washingtonRef = db.collection('c...
stackexchange-stackoverflow
{ "answer_score": 0, "question_score": -1, "tags": "angular, firebase, google cloud firestore" }
Create New Post link not showing in magento I am running magento on localhost and want to create new post. But new post link is not showing. Pages showing under Content > Pages. I can only create pages not posts. But according to this article i can create new post too. Please let me know how to add new post. ![Snapsh...
Please read this doc. it will help you to run command and give you clear understanding of what it does. < php bin/magento setup:upgrade php bin/magento setup:static-content:deploy
stackexchange-magento
{ "answer_score": 0, "question_score": 0, "tags": "magento2" }
How are DOM/rendered html and Coded-Ui are related, can coded-ui test a web application without even considering how that page is rendered in DOM? I want to know how the coded-ui in web application utilizes DOM of that page. Or is it related to that page's rendered html is coming? Edited: If suppose i have a grid havi...
I used codedui jquery extensions available in NuGet here . Once you will add this dll as a reference you can make use ExecuteScript() method for running a jquery script inside coded-ui. Similary you can make use of other built in members.
stackexchange-stackoverflow
{ "answer_score": 0, "question_score": 1, "tags": "html, dom, coded ui tests" }
What are the different properties available in System.DirectoryServices.DirectorySearcher.PropertiesToLoad Everything I've googled just says you can add them as a string array, but doesn't say what the available options are. What are all the different properties that are available from Directory Services?
You can put **any** of the valid LDAP attributes into `PropertiesToLoad` \- see a list of all Active Directory attributes here \- what you need is the `Ldap-Display-Name` for each attribute you're interested in. Also: Richard Mueller has a site with lots of good info on AD and LDAP \- including Excel spreadsheets of t...
stackexchange-stackoverflow
{ "answer_score": 18, "question_score": 11, "tags": "c#, active directory, directoryservices" }
System hangs on "Open document" right click context menu (Xubuntu) Ok I recently installed Xubuntu 11.10 and I enjoy working with it. However, one issue that really stresses me, is the following; When I open **Thunar** anywere, and right click to open the Context menu, all goes well. However, when I hoover over the "...
So I have found the answer, after a extensive search on the internet and some helpful topics on Thunar. For the "Create document" right click context menu, Thunar looks in your /home/templates folder. So if you have this folder filled with random stuff (like I did, icons, other folders, backgrounds), Thunar will try to...
stackexchange-askubuntu
{ "answer_score": 0, "question_score": 2, "tags": "11.10, xubuntu, thunar" }
How to pass data to dompdf? I need to pass data to my template of pdf : So I initialize my variable with 0 value but even that I have data in DB I get always 0 as final value; It's not because of DB because even if I do just $ProductProd +=1 I get 0 also $ProductProd = 0 ; foreach ($Products as $key...
$view=''; require($view); Maybe you want to require a real view such as file called `require('view.php');` here ?
stackexchange-stackoverflow
{ "answer_score": 0, "question_score": 0, "tags": "php, zend framework, dompdf" }
BitVector operations impossible I want to perform an xor operation on two BitVectors. While trying to turn one of the strings into a bitVector to then proceed into the xor operation, I get the following error: ValueError: invalid literal for int() with base 10: '\x91' How can I bypass this problem? ...
`bitstring` is for sequences of `'0'`s and `'1'`s. To use text use `textstring` instead.
stackexchange-stackoverflow
{ "answer_score": 2, "question_score": 0, "tags": "python, python 3.x, bitvector" }
Do you use the debugger of the language to understand code? Do you use the debugger of the language that you work in to step through code to understand what the code is doing, or do you find it easy to look at code written by someone else to figure out what is going on? I am talking about code written in C#, but it cou...
Yes, but generally only to investigate bugs that prove resistant to other methods. I write embedded software, so running a debugger normally involves having to physically plug a debug module into the PCB under test, add/remove links, solder on a debug socket (if not already present), etc - hence why I try to avoid it ...
stackexchange-stackoverflow
{ "answer_score": 0, "question_score": 2, "tags": "language agnostic, debugging, complexity theory" }
socket.io disconnects when using breakpoints in client code What is the best way to debug my app that uses socket.io ? The app is working fine but when I set breakpoints in the app using the chrome dev tools, after a few seconds, the socket.io client disconnects from the server ( or the server closes the connection), ...
I disabled polling in transports and that seems to have done the trick. This is what my transports look like now. io.set('transports', ['websocket']);
stackexchange-stackoverflow
{ "answer_score": 0, "question_score": 3, "tags": "socket.io, google chrome devtools" }
Transparent water shader for EEVEE? I followed a simple "how to make water in EEVEE" tutorial on youtube, but I don't know how to make it transparent. My current node setup: ![enter image description here]( **Q:** How to get the water transparent?
For EEVEE: 1. Turn “Transmission” all the way up. 2. Turn alpha down to about 0.5 3. Set blend method to either hashed or blend.
stackexchange-blender
{ "answer_score": 3, "question_score": 1, "tags": "rendering, texturing, materials, eevee render engine, transparency" }
Running the CorDapp (based on spring webserver) nodes on separate machines How can I deploy and run Corda nodes of spring webserver based "Yo!CorDapp" example (< on separate machines? What are the configuration changes I need to implement in this regard.
As long as you are running each server on the same machine as the node it talks to, there shouldn't be any configuration required. Simply start the nodes on their separate machines, then start the webserver on each machine, with the application properties modified or overridden to point to that node's RPC port. Since...
stackexchange-stackoverflow
{ "answer_score": 1, "question_score": 0, "tags": "corda" }
Problem with installing pytorch with pip3: -f option requires 1 argument I am trying to install torch in linux with cuda version 11.1 I checked this: Start Locally | PyTorch It says that the code is pip3 install --user torch==1.9.0+cu111 torchvision==0.10.0+cu111 torchaudio==0.9.0 -f However, this...
you must have missed ` use the below cmd pip3 install torch==1.9.0+cu102 torchvision==0.10.0+cu102 torchaudio===0.9.0 -f
stackexchange-stackoverflow
{ "answer_score": 2, "question_score": 1, "tags": "linux, pip, pytorch, torch" }
How to track asynchronous scripts (that do not provide a callback)? We are testing a new kind of advertising method that does call scripts asynchronously but they DO NOT provide a callback for anything. We want to track the loading time of this new method after it has finished loading and written new elements into a di...
It appears there is an onload event for the script, and also an onreadystatechange event. IE uses the readystate event, others use onload. See article for details. < var script = document.createElement('script'); script.type= 'text/javascript'; script.async = true; script.onreadystatechange= ...
stackexchange-stackoverflow
{ "answer_score": 2, "question_score": 1, "tags": "javascript, asynchronous, tracking" }
Image Intervention URL Manipulation shows blank image I'm trying to use the url manipulation of the Image Intervention package to handle image via url this tutorial. But the browser returns an empty image like this: !error I changed these line in the config file: 'route' => 'imagecache', 'paths' => ...
I found the solution here. There are some blank spaces before the `<?php` tag in the `config/imagecache.php` file. Delete them and everything starts working fine
stackexchange-stackoverflow
{ "answer_score": 0, "question_score": 0, "tags": "php, laravel, intervention" }
Partitioning $\mathbb R$ into sets such that no mutual points have distance $1$ I was trying to partition $\mathbb R$ into two sets $A, B$ such that for all $a\in A, b\in B$ we have $|a-b|\neq 1$. An obvious way to do it is to take $\mathbb Z$ and ${\mathbb R}\setminus {\mathbb Z}$. The other examples I found all consi...
Converting my comment to an answer: Choose any $X\subseteq [0,1)$ which is uncountable and for which $[0,1)\setminus X$ is also uncountable (for example, $X=[0,\frac{1}{2}]$). Then set $A := \\{n+x\colon n\in\mathbb{Z}, x\in X\\}$ and $B := \\{n+x\colon n \in \mathbb{Z}, x \in [0,1)\setminus X\\}$. It is easy to see...
stackexchange-mathoverflow_net_7z
{ "answer_score": 6, "question_score": 1, "tags": "infinite combinatorics, partitions" }
Numbers arranged in a circle are painted blue or red. Prove that the sum of the red numbers is 0. Numbers are arranged around a circle and are painted either blue or red. Every red number is equal to the sum of its two neighbors (left and right) and every blue number is equal to half the sum of its two neighbors (left ...
Subtract from each number half the sum of its neighbors (left and right) . This will make blue numbers equal to zero and red numbers half their initial value. The total sum on the other hand will also become zero, as the value of each number is subtracted exactly once (half from its left neighbor and half from its righ...
stackexchange-math
{ "answer_score": 5, "question_score": 4, "tags": "combinatorics" }
Necessity of auto-incrementing ID Every implementation of a credentials table I've seen has an auto-incrmenting id to to track users. However, If I verify unique email addresses before inserting into a mySQL table, than I can guarantee the uniqueness of each row by email address...furthermore I can access the table a...
Those email addresses are much larger than 4 bytes, perhaps even worse for the storage engine they are variable length. Also one person might want two accounts, or might have several email addresses over time. Then there are the problems associated with case folding.
stackexchange-stackoverflow
{ "answer_score": 2, "question_score": 0, "tags": "mysql" }
Is this momentum and if so how is it derived? So I'm reading Susskind's "The Theoretical Minimum" and on pages 128 and 129, he has the following equations: First he starts with the Lagrangian for the system: $$L=\frac{1}{2}(\dot{q_1}^2+\dot{q_2}^2) -V(q_1-q_2)$$ Then he shows the following two derivations: $$\dot{p...
I know knzhou already offered the proper answer in the form of a comment, but allow me to expand on it by showing a series of canonical relationships, not all of which are mentioned I believe in Susskind's book. Given the action $S=\int L~dt$, defined in terms of the Lagrangian $L(q,\dot{q})$, we have the following re...
stackexchange-physics
{ "answer_score": 1, "question_score": 0, "tags": "lagrangian formalism, momentum, hamiltonian formalism" }
How can I use methods defined in this delegate? I'm new to iOS development, and I'm playing with an interface trying to understand some concepts. The provided SDK(which is compiled and I can't do anything to it) has the following definitions: @class HRMonitor; @protocol HRMonitorDelegate - (void) ...
1. conform your interface to the delegate 2. init HRMonitor, passing your interface instance as the _delegate 3. then the - (void) hrmon: (HRMonitor*) mon heartRateUpdate: (double) hr of you interface will be called 4. make a interface conforms to the delegate, and call the method of it when you need, remember...
stackexchange-stackoverflow
{ "answer_score": 1, "question_score": 0, "tags": "ios, interface" }
About Redirect as POST I want to redirect the user to some url in other website, but to send with his redirect some post variable.. is this possible? And if yes, how? Thanks.
It is not. :( You can however submit an hidden form using Javascript. **EDIT** : shame upon me. It seems it can be achieved w/o Javascript. Try to post some data to a PHP page you write yourself, which basically tells the browser to do a `303 See Other` redirect. It shall work, in the sense that the browser should re...
stackexchange-stackoverflow
{ "answer_score": 1, "question_score": 1, "tags": "php, post, redirect" }
CVCalendar DayView.date Error I'm using the CVCalendar by Mozharovsky from GitHub. I'm trying to mark specific days using this method: func supplementaryView(shouldDisplayOnDayView dayView: DayView) -> Bool { if(dayView.date.day == day && dayView.date.month == month) { return true ...
Just use the basic Optional Unwrapping to test if it's defined and do what suits your needs : func supplementaryView(shouldDisplayOnDayView dayView: DayView) -> Bool { if let date = dayView.date { if(date.day == day && date.month == month) { return true ...
stackexchange-stackoverflow
{ "answer_score": 0, "question_score": 0, "tags": "ios, xcode, swift, github, calendar" }
Como guardar datos de inputs de un Activity al pasar a otra activity y enviarlos en un email? ![MainActivity de mi aplicacion]( Como ven en la imagen, mi MainActivity es simple, con EditTexts que el usuario debe completar, en los botones flotantes, el de check, cumple una funcion que envia el email con los datos carga...
Para pasar datos entre activities puedes usar los **intents**. Intent intent = new Intent(this, SegundoActivity.class); intent.putString("obra", obra.getText().toString(); .... //repites el proceso con todos los datos que quieras pasar al segundo activity startIntent(intent) ; En el segu...
stackexchange-es_stackoverflow
{ "answer_score": 2, "question_score": 0, "tags": "java, android" }
how to install 'intl PHP extension' with Wamp server i want to install 'intl PHP extension' on my WAMP. i am running Wamp on windows. i have looked online but cannot find any guidance on how to do this. does anyone have any ideas.
on wamp icon click on php -> php extensions -> php_intl then restart the server
stackexchange-stackoverflow
{ "answer_score": 5, "question_score": 2, "tags": "php, wamp" }
Are 4-float colors faster than 4-byte colors? Let's say that I'm defining a vertex structure. I can keep the vertex structure small by packing the vertex's RGBA color into a single unsigned int. Thus: struct Vertex { float pos[3]; float normal[3]; float texcoord[2]; uns...
Modern GPUs have dedicated hardware for unpacking packed formats on load so the conversion is effectively free. The reduced memory bandwidth requirements and more efficient vertex cache usage will improve performance so as a rule you should pack all vertex attributes as tightly as possible while still maintaining suffi...
stackexchange-stackoverflow
{ "answer_score": 4, "question_score": 0, "tags": "performance, caching, graphics" }
Do comboboxes support keyboard input in Gtk+ 3? Several of the comboboxes that I use regularly (the box to select syntax highlighting in the gedit statusbar, boxes for choosing smart playlist criteria in Banshee, etc) require me to click on them with the mouse, scroll down for awhile, then click on the item that I want...
**No** , this hasn't changed in gtk+ 3. Back in 2001, a bug was reported that dropdown comboboxes couldn't be navigated using the keyboard (even the arrow keys and `Enter`). All parts of this bug were fixed except the part about typing text while the combobox has focus and having the list select the correct item alpha...
stackexchange-askubuntu
{ "answer_score": 2, "question_score": 4, "tags": "gtk, input method" }
would appreciate for some one pointing me to good DLL tutorial I would appreciate if some one can point me to DLL tutorials ( basic - advanced :) ).
Wikipedia has a good overview, as does the MSDN: < < Here's a tutorial on creating DLLs: < A very generic e-how for a board overview: <
stackexchange-stackoverflow
{ "answer_score": 0, "question_score": 0, "tags": "dll" }
Use multiple line in Elvis operator in kotlin I have this code in Android Studio: val newUser = !intent.hasExtra("newUser") val userData = intent.getParcelableExtra("newUser") ?: UserData() There is a problem in this code. if an extra that isn't `UserData` exists in intent and if its key...
You can wrap the block in the `run` function: val userData = intent.getParcelableExtra("newUser") ?: run { newUser = true UserData() }
stackexchange-stackoverflow
{ "answer_score": 46, "question_score": 19, "tags": "android, kotlin" }
How to change icon when selected A simple question but I do not know if it is possible. Can I change an icon when it is clicked? In the case, my icon is gray, I would like it to go blue when clicked but it's pretty hard to do this in my code, so I want to know if it's possible for me to change to another icon when I cl...
You should be able to bind the attr name and change it via Angular `[]` \- which stand for one way data binding; html <ion-icon [name]="toShowIcon"></ion-icon> ts toShowIcon = 'icon-ico_gastronomia_off'; and than change it on click; If you want to change the icon only one time ...
stackexchange-stackoverflow
{ "answer_score": 1, "question_score": 0, "tags": "html, angular, cordova, ionic framework, ionic3" }
If $P$ is the set of all distributions, the only sufficient subfield is the trivial one According to an article by Bahadur, if $P=\left\\{p\right\\}$ is the set of all probability measures on the measurable space $\left(\Omega,\mathcal{A}\right)$, $\mathcal{A}$ is the only possible sufficient subfield. The claim is l...
Let $\mathcal{A}'$ be a sufficient subfield of $\mathcal{A}$. We'll show that $\mathcal{A}\subseteq\mathcal{A}'$. Let $B\in\mathcal{A}$. Since $\mathcal{A}'$ is sufficient, there's some $\mathcal{A}'/\overline{\mathfrak{B}}$-measurable $\varphi_B:\Omega\rightarrow\overline{\mathbb{R}}$ such that $p(B)=\int_\Omega fdp$ ...
stackexchange-math
{ "answer_score": 0, "question_score": 0, "tags": "statistical inference" }
c# mongodb batch insert I want to import csv file to MongoDB. The csv file have 3,00,000 records and 10 fields. I can't find good tutorial for InsertBatch method described in MongoDB documentation. Inserting records one by one using insert() method is taking more than 15 Minutes.
Does this helps you ? MongoCollection<BsonDocument> books; List<BsonDocument> batch = new List<BsonDocument>(); using (CsvReader reader = new CsvReader("users.csv")) { batch.add( new BsonDocument { { "field1", reader["field1"] }, { ...
stackexchange-stackoverflow
{ "answer_score": 7, "question_score": 1, "tags": "c#, .net, mongodb" }
How to prove the value of an trigonometric term to zero? Given that , in $\triangle ABC$ , $AC \neq BC$ . We have to prove that , $\dfrac{BC\cos C-AC\cos B}{BC\cos B-AC\cos A}+\cos C=0$ ## My trying: As $AC \neq BC \Rightarrow b \neq a \Rightarrow a=c \Rightarrow A=C$ . So for the following term , $$ \\\ $$ \begin{al...
for the first numerator i have got $$1/2\,{\frac {{a}^{2}+{b}^{2}-{c}^{2}}{b}}-1/2\,{\frac {b \left( {a}^{2 }-{b}^{2}+{c}^{2} \right) }{ac}} $$ for the denominator i have got $$1/2\,{\frac {{a}^{2}-{b}^{2}+{c}^{2}}{c}}-1/2\,{\frac {-{a}^{2}+{b}^{2 }+{c}^{2}}{c}} $$ and the sum is given by $${\left( 1/2\,{\frac {{a}^{2}...
stackexchange-math
{ "answer_score": 1, "question_score": 1, "tags": "trigonometry, triangles, recreational mathematics" }
Salesforce to Boomi callback We are doing a test path setup between sanbox boomi environment. In one of our process we had to test callback by initiating the call.But being new to this org I have no idea how to and where to check the call back is happening or not. what are the prerequisites to make a callback. When t...
The call back is going through o/b MSG, I was able to find the call back in outbound message queue.
stackexchange-salesforce
{ "answer_score": 0, "question_score": 2, "tags": "callback" }
Windows 2000 and .Net 2.0+ I have heard, that Windows 2000 can only be used together with .Net 2.0 and no other version above this. Is that true and if it is, do you have an official Post or something like that from Microsoft, where I can read about the restriction? thanks.
If you go to .NET Framework System Requirements, you can select the version you want from the dropdown. Yes, `Windows 2000 Professional with SP4` is listed as being compatible with FW 2.0, but not above.
stackexchange-stackoverflow
{ "answer_score": 4, "question_score": 0, "tags": ".net" }
Regular expression for password validation in c# Need help with regex for password validation in c# 1. minimun length of 8 caracters and maximun of 16 2. at least one digit, lower case and one uppper case What i tired: var rule = new Regex("^(?=.{8,16}(?=*[a-z])(?=.*[A-Z])(?=.*[0-9])$"); but...
You forget to put closing paranthesis in the first lookahead. And also you need to add `.*` after all the lookaheads because lookrounds are zero width assertions, it won't match any character but only assert whether a match is possible or not. var rule = new Regex(@"^(?=.{8,16}$)(?=.*?[a-z])(?=.*?[A-Z])(?...
stackexchange-stackoverflow
{ "answer_score": 3, "question_score": 1, "tags": "c#, regex" }
Nginx allow only root and api locations I have a server configured as a reverse proxy to my server. I want to reject all the requests except to two locations, one for root and another the api root. so the server should only allow requests to the given paths example.com/ (only the root) example.com/ap...
Here it is: location = / { # would serve only the root # ... } location /api/ { # would serve everything after the /api/ # ... } You need a special '=' modifier for the root location to work as expected From the docs: ...
stackexchange-stackoverflow
{ "answer_score": 11, "question_score": 7, "tags": "nginx, webserver, web hosting, access control, nginx location" }
Moving a ball forward, mechanical force I'd like to have a ball (blender game engine) which rolls forward by its own and with real physics and friction. It shouldn't be animated though, what I'd like to have is kind of like a "motorized ball" who rolls forward just by its own force. No work arrounds with wind or invis...
You need to tick the _Animated_ checkbox under the _Rigid Body_ tab: !enter image description here If the object just sets there and doesn't roll, you should make sure your _Friction_ levels are set properly for the involved collision objects: !enter image description here Zero friction will result in no forward mo...
stackexchange-blender
{ "answer_score": 1, "question_score": 2, "tags": "physics, rigid body simulation, keyframes" }
WCF Service Hosted in IIS System.Runtime.InteropServices.SEHException I have a WCF service, hosted in IIS returning the following error (when trying to call a method or even just browse to the service definition): > "Service not available" The error log shows a bit more detail: > An unhandled exception occurred and ...
This problem was being caused b the Execute Permissions in IIS. The virutual directory was set to "Scripts only" and changing this to "Scripts and Executables" has resolved the issue. I'm not sure how you're supposed to get to this answer from the original error (but fiddling for a while seems to work!)
stackexchange-stackoverflow
{ "answer_score": 0, "question_score": -1, "tags": "c#, .net, wcf, iis" }
JSTL hasRole chained with boolean condition So I have a conditional list that may be added to the page, And I only want to check for it if the user has an Admin Role. I am trying to do as so: <sec:authorize access="hasAnyRole('ADMIN')"> <c:if test="${empty list}"> </sec:authorize> ...
It's possible to save the result of `<sec:authorize>` execution in a variable and use it later in the JSTL expression: <sec:authorize var="isAdmin" access="hasAnyRole('ADMIN')"> <c:if test="${isAdmin and empty list}"> //do stuff here </c:if>
stackexchange-stackoverflow
{ "answer_score": 1, "question_score": 0, "tags": "spring, spring security, boolean, jstl" }
Fetch Merchant Name from Transaction SMS - Android I want to fetch Merchant Name from Bank Transaction SMS. For this I used following regx; Pattern.compile("(?i)(?:\\sat\\s|in\\*)([A-Za-z0-9]*\\s?-?\\s?[A-Za-z0-9]*\\s?-?\\.?)") Its works fine with those SMS which contains **at** / **in** but what if...
You can use this below code to fetch Merchant Name from String private void extractMerchantNameFromSMS(){ try{ String mMessage= "Dear Customer, You have made a Debit Card purchase of INR1,600.00 on 30 Jan. Info.VPS*AGGARWAL SH."; Pattern regEx = Pattern.compile("(?i)(?:\\sI...
stackexchange-stackoverflow
{ "answer_score": 1, "question_score": 1, "tags": "android, parsing, sms" }
Does Mono / .NET 4.0 implement AppDomain.FirstChanceException? I am porting a C# app from .NET on Windows to Mono on Linux (both using .NET 4.0). When compiling the code I get the following code: Error CS1061: Type `System.AppDomain` does not contain a definition for `FirstChanceException` and no extension method `Fir...
According to the source file containing AppDomain class, this is not implemented on Mono yet.
stackexchange-stackoverflow
{ "answer_score": 3, "question_score": 2, "tags": "c#, .net, mono" }
What is wrong in this sentence grammatically? I am so sorry for asking such question. But my boss keep saying there are grammatical error in these sentences, and I for one, even after reading them over and over can't find one. > However, these research works lack common methodology and definition of 'X' to measure it...
However, the research **literature** lack common methodology and definition of 'X' to measure efficiency, have been diverse and subjective. Notes: Replaced works with literature as I use it in papers. Plural research works/literature means following word choice must cater to plural, not singular terms. **Similarly**...
stackexchange-english
{ "answer_score": 0, "question_score": 0, "tags": "grammar" }
What does and in python stands for I try some samples in python console. And was confused for the following: >>> (1 and None) >>> (1 and None) == None True >>> (1 or None) == None False >>> (1 and 2) == 2 True >>> (2 and 1) == 2 False >>> (2 and 1) == 1 True I...
In python, empty string, dict, tuple, list are False. The others are True `(1 and None)` is same as `if 1 is False return 1 else None` that is why (1 and None) return None same reason == > (2 and 1) return 1 so, it's not 2. My English isn't good, you can find more information from below links 1. < 2. <
stackexchange-stackoverflow
{ "answer_score": 1, "question_score": -1, "tags": "python" }
drawCircle vs drawBitmap I'm planning on implementing a new set of figures in my game: plain circles. The number of drawn sprites (in this case circles) starts with 2-3, and can go up endlessly (potentially). The maximum will probably be around 60 though. In total there will have to be 5 types of circles, each with a d...
Bitmaps are almost always faster than any kind of draw. With the right preparation drawing a bitmap is simply dumping memory to the screen. Drawing a circle involves a significant number of calculations, including anti-aliasing. I presented a paper which covered this at JavaOne 2009, but papers that old seem to have be...
stackexchange-stackoverflow
{ "answer_score": 8, "question_score": 4, "tags": "java, android, android canvas, draw, geometry" }
Unable to start IBM HTTP Server on Linux I am trying to install IBM HTTP Server 7.0 on my Linux machine 2.6.32-504.el6.x86_64. When i finish installation and try to start IHS using command `/opt/IBM/HTTPServer/bin/apachectl start`, i get below error : /opt/IBM/HTTPServer/bin/apachectl: line 80: @@SERVERR...
Missing libraries was the reason of this kind of error. Here's the link which helped me troubleshoot this error. <
stackexchange-superuser
{ "answer_score": 0, "question_score": 0, "tags": "linux, webserver, http" }
How to get remote host MAC address by using its ip address in c programming in linux Can some one tell me, how to get remote host MAC address by using its ip address in linux by using c programming(could be netlink sockets or BSD sockets)?
This can't be done using C programming. If it was possible then there wouldn't be any protocol like `ARP` to get the link layer address. You can implement ARP request and reply using socket programming. But that's not what you want in this case I think. Anyway in that case you can refer to this discussion link. **You...
stackexchange-stackoverflow
{ "answer_score": 0, "question_score": -1, "tags": "c, linux, macos, ip address, remote host" }
Is there a word for a student/person counted in a roll call I am looking for a word that represents someone who has been accounted for during a roll call or similar process if one exists. It may be considered to be the opposite of an absentee.
Attendee Collins English Dictionary defines it as: > a person who is present at a specified event If they had to sign a register, then they might be a "registered attendee", as opposed to an unregistered attendee (who is, presumably, a "gatecrasher").
stackexchange-english
{ "answer_score": 1, "question_score": 1, "tags": "single word requests" }
Java - Interfaces, methods need to return something? (1st post don't bully me :D) My question is simple, is it imperative that a method included in an interface HAS to return some value? (int, double, String etc..) Cause last time I checked I could not define a Void method in an interface, got compiling errors. Thank...
> My question is simple, is it imperative that a method included in an interface HAS to return some value? No, absolutely not. You can declare a void method in an interface, and indeed there are plenty of standard library interfaces with such methods. `Runnable` is a fine example: public interface Runn...
stackexchange-stackoverflow
{ "answer_score": 6, "question_score": 2, "tags": "java, interface, return value, return type" }
Unity Photon Send data to server How to possible send data to server and save them there in Unity 5 and Photon? for example send device UID, device Model, Device Name.
You can override _OnPhotonSerializeView_ to write & read data. void OnPhotonSerializeView(PhotonStream stream, PhotonMessageInfo info){ if (stream.isWriting) { // Write device info stream.SendNext (deviceUID); stream.SendNext (deviceModel); ...
stackexchange-stackoverflow
{ "answer_score": 0, "question_score": 0, "tags": "c#, unity3d" }
how can i use regex to get a certain string of a file with linux bash shell , how can i use regex to get a certain string of a file by example: for filename *.tgz do "get the certain string of filename (in my case, get 2010.04.12 of file 2010.01.12myfile.tgz)" done or should I turn to perl Merci frank
FILE=2010.01.12myfile.tgz echo ${FILE:0:10} gives 2010.01.12
stackexchange-stackoverflow
{ "answer_score": 1, "question_score": 0, "tags": "linux, bash" }
Robocopy Access Denied Error 5 From Powershell I am copying files from my build server to a web server on Windows Server 2016. I am running the following from PowerShell. I am running this script with an administer account which has read/write access to the destination directory. robocopy $Path\Items $_\I...
* Ensure that you open your powershell session as an administrator (runas) * Also check the NTFS permission on the destination path and not only the security permissions. * If you are using a DFS path you should be better with the UNC path of the actual servername. Hope this helps. Actually I was not able to po...
stackexchange-stackoverflow
{ "answer_score": 2, "question_score": 1, "tags": "powershell, robocopy" }
kdb how to pass a column name into a function As a simplifying example, I have tbl:flip `sym`v1`v2!(`a`b`c`d; 50 280 1200 1800; 40 190 1300 1900) and I d like to pass a column name into a function like f:{[t;c];:update v3:2 * c from t;} In this form it doesnt work. any suggesti...
One option to achieve this is using `@` amend: q){[t;c;n] @[t;n;:;2*t c]}[tbl;`v1;`v3] sym v1 v2 v3 ------------------ a 50 40 100 b 280 190 560 c 1200 1300 2400 d 1800 1900 3600 This updates the column `c` in table `t` saving the new value as column `n`. Yo...
stackexchange-stackoverflow
{ "answer_score": 3, "question_score": 3, "tags": "kdb" }
Geometry question about triangle and a circle We have triangle $ABC$, and we construct a circle on side AC to become its diameter. This circle contains the middle point of side $BC$ and intersects side $AB$ in point D, in ratio of $AD:DB=1:2$. If $AB$ is $3cm$ what is the area of triangle $ABC$? My attempt: $CD$ see...
Refer to the figure: $\hspace{5cm}$![!\[enter image description here]( The angles $ADC$ and $AEC$ are right, because both subtend the diameter $AC$. From $AD:BD=1:2$ and $AB=3$ we can find $AD=1$ and $BD=2$. The line $AE$ is both height and median, it implies the triangle $ABC$ is isosceles. Hence, $AC=3$. From t...
stackexchange-math
{ "answer_score": 1, "question_score": 1, "tags": "geometry" }
Hosting React/Redux Web Apps (front end) One thing I do not quite understand yet is this. Say I have a website or single page app, made with React/Redux. Say I have no API calls or anything like this, so it's just the front-end I am talking about. Do I have any restrictions when it comes to hosting? People speak of ...
There are no specific requirements for hosting a react JS webapp. Let's say you're using webpack to build your webapp, it'll build a static javascript file that need to be served just like regular static assets. So just the way you'd serve any other website that has static html/css/js assets. That is the case whe...
stackexchange-stackoverflow
{ "answer_score": 4, "question_score": 0, "tags": "reactjs, heroku, hosting, react redux, web hosting" }
F#: Why can't I cons an object of type B to a list of type A when B is a subtype of A? According to the 3rd example on this site < F# lists can contain objects of different types as long as both types derive from the same super-type. However, I can't get the cons (::) operator to add subtypes to a list of the supertype...
F# does not always insert upcasts (conversion to a base type) automatically, so you have to insert an explicit cast that turns the `B` value into a value of type `A`. Note that F# distinguishes between _upcasts_ \- casts to a base class (which are always correct) and _downcasts_ \- casts to a derived class (which may ...
stackexchange-stackoverflow
{ "answer_score": 3, "question_score": 1, "tags": "f#" }
Are hosted power counters and advancement tokens the same thing? For example: VIKTOR 2.0: > Hosted Power Counter: Do 1 brain damage Aggressive Secretary: > trash 1 program for each advancement token Can I advance a card that makes use of Hosted Power Counters in the same way that I can advance an agenda or a card ...
Power counters don't (currently) interact with anything other than the card that placed them. A card will define when to place a power counter, and the effects of having them on itself. EG Draco lets you pay to place power counters when it's rezzed, and they boost the strength. The most complicated one currently is Per...
stackexchange-boardgames
{ "answer_score": 4, "question_score": 2, "tags": "android netrunner" }
setting value of dropdownlist I am trying to set the value of a dropdownlist using an integer id value from a table. But whatever syntax I use (SelectedValue, SelectedItem, SelectedIndex), I keep getting a cannot convert int to string error. Here is an example of my code : ddlSupContracts2.SelectedItem.Va...
Try ddlSupContracts2.Items.FindByValue(ObjMeter.intSupplierContract.ToString()).Selected = true; or ddlSupContracts2.SelectedValue = ObjMeter.intSupplierContract.ToString();
stackexchange-stackoverflow
{ "answer_score": 1, "question_score": 0, "tags": "c#, asp.net, drop down menu" }
Get php variable from inline frame I have an inline frame within a form. The inline frame actually contains the form element which is generated programatically (a radio which holds a value). How can I retrieve that value hold by the radio from the page which contains that inline frame. Any idea? thanks for reading
What MvanGeest is suggesting is for you to use javascript to transfer values of the radio buttons to a hidden field in your main page form so for each radio button you would have `onclick="valueSet(this.value)"` and in the function `valueSet` (that you define in the iframe) you would set the value of the hidden form fi...
stackexchange-stackoverflow
{ "answer_score": 2, "question_score": 0, "tags": "php, inline, frame" }
recalculating field from datagridview I have a datagridview which is filled based on a calculation sum of another datagridview. In my DGview I have 4 columns, a number (i++), the person's name, the hours, the minutes. Person's name is a group-by, hours is the sum of all hours of DGview1, minutes is the sum of all minut...
Use the TimeSpan Structure to either calculate the sum all along, or use the TimeSpan.FromMinutes() method to create it from the minutes total.
stackexchange-stackoverflow
{ "answer_score": 0, "question_score": 0, "tags": "c#, sql, visual studio, linq, datagridview" }
How to debug a nodejs readline app? I want to debug a simple nodejs readline programme. var readline = require("readline"); var rl = readline.createInterface({ input: process.stdin, output: process.stdout }); rl.question("What's your name \n",function(answer){ var ...
Have you tried using node-inspector? I was able to debug fine from there. If your program is terminal-based, using a web-based debugger and thus leaving the terminal available for the app might avoid some confusion and trickiness. ![screen grab of node-inspector](
stackexchange-stackoverflow
{ "answer_score": 3, "question_score": 2, "tags": "javascript, node.js" }