qid
int64
1
74.7M
question
stringlengths
15
58.3k
date
stringlengths
10
10
metadata
list
response_j
stringlengths
4
30.2k
response_k
stringlengths
11
36.5k
313,161
In other words, is there a website where I can find a simple list of all the packages that apt-get install searches through, along with descriptions of what each package does? When I run apt-get update, I see that my computer hits <http://security.ubuntu.com> and finds something called oneiric-updates. Is there a huma...
2013/06/27
[ "https://askubuntu.com/questions/313161", "https://askubuntu.com", "https://askubuntu.com/users/170549/" ]
You can find all the packages depending on the build installed here: [Ubuntu Packages Search](http://packages.ubuntu.com/) But Oneiric Ocelot is the Codename for 11.10, so it is probably just downloading the security updates for your version. I wouldn't be worried about anything. EDIT: After looking here: [Ubuntu on...
Depends on what you mean by "human-friendly" You can browse here: <http://packages.ubuntu.com/>
313,161
In other words, is there a website where I can find a simple list of all the packages that apt-get install searches through, along with descriptions of what each package does? When I run apt-get update, I see that my computer hits <http://security.ubuntu.com> and finds something called oneiric-updates. Is there a huma...
2013/06/27
[ "https://askubuntu.com/questions/313161", "https://askubuntu.com", "https://askubuntu.com/users/170549/" ]
You can find all the packages depending on the build installed here: [Ubuntu Packages Search](http://packages.ubuntu.com/) But Oneiric Ocelot is the Codename for 11.10, so it is probably just downloading the security updates for your version. I wouldn't be worried about anything. EDIT: After looking here: [Ubuntu on...
I guess what you are looking for is software manager. It has GUI and categorized package lists. It is in your ubuntu by default. Try may be.
54,235,317
I'm having trouble with the `contentInset` property. I have a `UITableView`, with dynamic cell sizes (AutoLayout). I'm setting the `contentInset` property to leave some space above the top of the content. But I'm getting the following result: [![Unexpected Result](https://i.stack.imgur.com/0VZbq.png)](https://i.stack...
2019/01/17
[ "https://Stackoverflow.com/questions/54235317", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3780788/" ]
Not sure if it's the best way but I fixed it by adding: ``` tableView.contentOffset.y = -70 ``` after the line: ``` tableView.contentInset = UIEdgeInsets(top: 70, left: 0, bottom: 50, right: 0) ```
This is how it can be fixed easily from the Storyboard: Table View > Size Inspector > Content Insets: Never
54,235,317
I'm having trouble with the `contentInset` property. I have a `UITableView`, with dynamic cell sizes (AutoLayout). I'm setting the `contentInset` property to leave some space above the top of the content. But I'm getting the following result: [![Unexpected Result](https://i.stack.imgur.com/0VZbq.png)](https://i.stack...
2019/01/17
[ "https://Stackoverflow.com/questions/54235317", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3780788/" ]
you can scroll programmatically when the view loads. ``` tableView.setContentOffset(CGPoint(x: 0, y: -70), animated: false) ```
This is how it can be fixed easily from the Storyboard: Table View > Size Inspector > Content Insets: Never
54,235,317
I'm having trouble with the `contentInset` property. I have a `UITableView`, with dynamic cell sizes (AutoLayout). I'm setting the `contentInset` property to leave some space above the top of the content. But I'm getting the following result: [![Unexpected Result](https://i.stack.imgur.com/0VZbq.png)](https://i.stack...
2019/01/17
[ "https://Stackoverflow.com/questions/54235317", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3780788/" ]
Not sure if it's the best way but I fixed it by adding: ``` tableView.contentOffset.y = -70 ``` after the line: ``` tableView.contentInset = UIEdgeInsets(top: 70, left: 0, bottom: 50, right: 0) ```
You provide an UIEdgeInset object, ``` UIEdgeInsets(top: 50, left: 0, bottom: 0, right: 0) ``` The top property shows the distance from top of content to top border of the area.
54,235,317
I'm having trouble with the `contentInset` property. I have a `UITableView`, with dynamic cell sizes (AutoLayout). I'm setting the `contentInset` property to leave some space above the top of the content. But I'm getting the following result: [![Unexpected Result](https://i.stack.imgur.com/0VZbq.png)](https://i.stack...
2019/01/17
[ "https://Stackoverflow.com/questions/54235317", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3780788/" ]
you can scroll programmatically when the view loads. ``` tableView.setContentOffset(CGPoint(x: 0, y: -70), animated: false) ```
You provide an UIEdgeInset object, ``` UIEdgeInsets(top: 50, left: 0, bottom: 0, right: 0) ``` The top property shows the distance from top of content to top border of the area.
54,235,317
I'm having trouble with the `contentInset` property. I have a `UITableView`, with dynamic cell sizes (AutoLayout). I'm setting the `contentInset` property to leave some space above the top of the content. But I'm getting the following result: [![Unexpected Result](https://i.stack.imgur.com/0VZbq.png)](https://i.stack...
2019/01/17
[ "https://Stackoverflow.com/questions/54235317", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3780788/" ]
Not sure if it's the best way but I fixed it by adding: ``` tableView.contentOffset.y = -70 ``` after the line: ``` tableView.contentInset = UIEdgeInsets(top: 70, left: 0, bottom: 50, right: 0) ```
you can scroll programmatically when the view loads. ``` tableView.setContentOffset(CGPoint(x: 0, y: -70), animated: false) ```
47,389,508
I have searched on Google and here on SO before posting this question. I have found several solution to my problem, but none of them fits my needs. Here is my code: [Plunker](https://plnkr.co/edit/Vb0y4ZCLKyiXlClXuhBk) ``` <div *ngIf="description.length > 200" class="ui mini compact buttons expand"> <butt...
2017/11/20
[ "https://Stackoverflow.com/questions/47389508", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2516399/" ]
Edit with a possible solution: ``` //our root app component import {Component, NgModule, VERSION, OnInit} from '@angular/core' import {BrowserModule} from '@angular/platform-browser' import {ElementRef,ViewChild} from '@angular/core'; @Component({ selector: 'my-app', template: ` <div class="ui segment detail-...
I Recommend using the "ng2-truncate". With this component, you can truncate your codes with length or word count or something else. I hope this component help you. [Plunker](https://embed.plnkr.co/d3JiQCw756OEjS0HkVuY) [npm](https://www.npmjs.com/package/ng2-truncate)
68,533,939
I'm very new to python and need some help. I'm not sure if my question is the right terminology but I cant figure it out. I've tried .format f-string but I cant get it to work. The codes purpose is to ask a user to fill in a story. Edit: Forgot to Add character input. Forgot to add issue. Fixed Ty kind stranger! This ...
2021/07/26
[ "https://Stackoverflow.com/questions/68533939", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16530818/" ]
There is additional information on initialization strategies in the [paper](https://www.sciencedirect.com/science/article/abs/pii/S0098135415001179): > > Safdarnejad, S.M., Hedengren, J.D., Lewis, N.R., Haseltine, E., > Initialization Strategies for Optimization of Dynamic Systems, > Computers and Chemical Engineerin...
I have tried to use this model as a subject to learn the GEKKO (). I advise on using `I=Model0D.intermediate()` instead of; ``` Model0D.Equation(ETAh == V - Eh) Model0D.Equation(ETAl == V - El) ``` Also the time step are very large, creating unstable solution.
14,548,727
My MVC application has a classic parent-child (master-detail) relations. I want to have a single page that create both the new parent and the children on the same page. I have added an action the returns a partial view that and adds the child HTML to the parent’s view, but I don’t know how to associate the newly crea...
2013/01/27
[ "https://Stackoverflow.com/questions/14548727", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2015251/" ]
I think the best and simplest way for you is that you have a view for creating `Form` and at the bottom of it put a `fieldset` to assign `FormFields` to it. For the fieldset, you should have two partial views: One for create and another for edit. The partial view for creating should be something like this: ``` @model...
The problem is that your partial view needs to use: ``` @model Form //Instead of FormField ``` and then inside of the partial view you must use model => model.**FormField**.x ``` <div class="editor-label"> @Html.LabelFor(model => model.FormField.Name) </div> <div class="editor-field"> @Html.EditorFor(model ...
14,548,727
My MVC application has a classic parent-child (master-detail) relations. I want to have a single page that create both the new parent and the children on the same page. I have added an action the returns a partial view that and adds the child HTML to the parent’s view, but I don’t know how to associate the newly crea...
2013/01/27
[ "https://Stackoverflow.com/questions/14548727", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2015251/" ]
You can use @Html.RenderPartial(\_CreateFormField.cshtml) htlper method inside your parent cshtml page. For mode info, <http://msdn.microsoft.com/en-us/library/dd492962(v=vs.118).aspx> I am providing an pseudo code example, ``` @Foreach(childModel in model.FormFields) { @Html.RenderPartial("childView.cshtml","Na...
The problem is that your partial view needs to use: ``` @model Form //Instead of FormField ``` and then inside of the partial view you must use model => model.**FormField**.x ``` <div class="editor-label"> @Html.LabelFor(model => model.FormField.Name) </div> <div class="editor-field"> @Html.EditorFor(model ...
14,548,727
My MVC application has a classic parent-child (master-detail) relations. I want to have a single page that create both the new parent and the children on the same page. I have added an action the returns a partial view that and adds the child HTML to the parent’s view, but I don’t know how to associate the newly crea...
2013/01/27
[ "https://Stackoverflow.com/questions/14548727", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2015251/" ]
I think the best and simplest way for you is that you have a view for creating `Form` and at the bottom of it put a `fieldset` to assign `FormFields` to it. For the fieldset, you should have two partial views: One for create and another for edit. The partial view for creating should be something like this: ``` @model...
If you want to use grid based layout you may want to try [Kendo UI grid](http://demos.telerik.com/kendo-ui/grid/detailtemplate)
14,548,727
My MVC application has a classic parent-child (master-detail) relations. I want to have a single page that create both the new parent and the children on the same page. I have added an action the returns a partial view that and adds the child HTML to the parent’s view, but I don’t know how to associate the newly crea...
2013/01/27
[ "https://Stackoverflow.com/questions/14548727", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2015251/" ]
I think the best and simplest way for you is that you have a view for creating `Form` and at the bottom of it put a `fieldset` to assign `FormFields` to it. For the fieldset, you should have two partial views: One for create and another for edit. The partial view for creating should be something like this: ``` @model...
Use jQueryto add FormField on click of button. Similar I've used it as follows ``` <div class="accomp-multi-field-wrapper"> <table class="table"> <thead> <tr> <th>Name</th> <th>FormId</th> <th>Remove</th> </tr> </thead> <tbody class="accomp-multi-field...
14,548,727
My MVC application has a classic parent-child (master-detail) relations. I want to have a single page that create both the new parent and the children on the same page. I have added an action the returns a partial view that and adds the child HTML to the parent’s view, but I don’t know how to associate the newly crea...
2013/01/27
[ "https://Stackoverflow.com/questions/14548727", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2015251/" ]
You can use @Html.RenderPartial(\_CreateFormField.cshtml) htlper method inside your parent cshtml page. For mode info, <http://msdn.microsoft.com/en-us/library/dd492962(v=vs.118).aspx> I am providing an pseudo code example, ``` @Foreach(childModel in model.FormFields) { @Html.RenderPartial("childView.cshtml","Na...
If you want to use grid based layout you may want to try [Kendo UI grid](http://demos.telerik.com/kendo-ui/grid/detailtemplate)
14,548,727
My MVC application has a classic parent-child (master-detail) relations. I want to have a single page that create both the new parent and the children on the same page. I have added an action the returns a partial view that and adds the child HTML to the parent’s view, but I don’t know how to associate the newly crea...
2013/01/27
[ "https://Stackoverflow.com/questions/14548727", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2015251/" ]
You can use @Html.RenderPartial(\_CreateFormField.cshtml) htlper method inside your parent cshtml page. For mode info, <http://msdn.microsoft.com/en-us/library/dd492962(v=vs.118).aspx> I am providing an pseudo code example, ``` @Foreach(childModel in model.FormFields) { @Html.RenderPartial("childView.cshtml","Na...
Use jQueryto add FormField on click of button. Similar I've used it as follows ``` <div class="accomp-multi-field-wrapper"> <table class="table"> <thead> <tr> <th>Name</th> <th>FormId</th> <th>Remove</th> </tr> </thead> <tbody class="accomp-multi-field...
195,770
I need to build up a sentence saying like this "She has no false pride like other actresses, she replies to every message sent by her fans". I need to emphasize that she has no false pride like other actresses. Much appreciated if someone can build a better sentence than mine. thanks.
2014/09/10
[ "https://english.stackexchange.com/questions/195770", "https://english.stackexchange.com", "https://english.stackexchange.com/users/93075/" ]
Celebrities are sometimes [egotistical](http://www.thefreedictionary.com/egotistical): characteristic of those having an *inflated idea of their own importance*; A *conceited*, boastful person. [conceited](http://www.thefreedictionary.com/conceited): having a high or exaggerated opinion of oneself or one's accomplis...
I think [conceit](http://www.thefreedictionary.com/Conceit) or vanity, may convey the idea: > > * a high, often exaggerated, opinion of oneself or one's accomplishments, [vanity](http://www.thefreedictionary.com/vanity). > > > Source: /www.thefreedictionary.com
195,770
I need to build up a sentence saying like this "She has no false pride like other actresses, she replies to every message sent by her fans". I need to emphasize that she has no false pride like other actresses. Much appreciated if someone can build a better sentence than mine. thanks.
2014/09/10
[ "https://english.stackexchange.com/questions/195770", "https://english.stackexchange.com", "https://english.stackexchange.com/users/93075/" ]
Celebrities are sometimes [egotistical](http://www.thefreedictionary.com/egotistical): characteristic of those having an *inflated idea of their own importance*; A *conceited*, boastful person. [conceited](http://www.thefreedictionary.com/conceited): having a high or exaggerated opinion of oneself or one's accomplis...
**hubris** - defined by Google dictionary as: excessive pride or self-confidence, and in Greek tragedy an excessive pride toward or defiance of the gods, leading to nemesis. So there is a hint with this word that such pride will lead to a humilating fall in time.
60,448
I have a multi-class classification problem. It performs quite well but on the least represented classes it doesn't. Indeed, here is the distribution : [![enter image description here](https://i.stack.imgur.com/YXUYI.png)](https://i.stack.imgur.com/YXUYI.png) And here are the classification results of my former class...
2019/09/19
[ "https://datascience.stackexchange.com/questions/60448", "https://datascience.stackexchange.com", "https://datascience.stackexchange.com/users/41692/" ]
Going according to your problem, you should set the NaN values to 0. It follows logically as the number of minutes spent with the nurse or doctor will be zero if the patient hasn't visited them yet. And yes as you said filling with mean is not correct as it would not represent the problem correctly. Also, if you fill ...
This is a feature engineering problem. That patients have not been visited yet is valuable informationen but also clearly not on the same scale as minutes until visit. Create a new categorical variable 1=visited and 0=not visited. Additionally instead of imputation try using a model that can cope with NA like random...
17,111,247
I need to retrieve a number version from database to add this as dll version. I can add manually this version each time I publish, but I'll like to run this in an automatic process. So, is it possible at compile time to execute a SQL or any operation to get this number ? Thanks for your help.
2013/06/14
[ "https://Stackoverflow.com/questions/17111247", "https://Stackoverflow.com", "https://Stackoverflow.com/users/255673/" ]
You could write a small simple application (command line) that looks up the version or build number and replaces it in the appropriate file. Then you could add it as a pre-build event to your Visual Studio project.
``` is it possible at compile time to execute a SQL or any operation to get this number ``` No you cannot call SQL at compile time. Compiling is purely for creating MSIL (dll or exe) to be executed later by the CLR. All work is performed by the JIT compiler of the CLR (which is at runtime). No work can be done at c...
36,894,357
I'm trying to map a column name dynamically in Dataweave using the contents of a flow variable. The static version of what I'm trying to achieve looks something like: ``` payload map ((payload01 , indexOfPayload01) -> { COLUMNA: payload01.INPUTA }) ``` Now the part that I need to be dynamic is `INPUTA` - I need ...
2016/04/27
[ "https://Stackoverflow.com/questions/36894357", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3327896/" ]
Use it like below. Note the parenthesis around key which is very important because () tells DataWeave to first execute script inside it and then use the result as the value for outside expression. ``` payload map ((payload01 , indexOfPayload01) -> { COLUMNA: payload01[('INPUT' ++ flowVars.varName)] }) ``` Le...
Try to access flowVar just like MEL way: `#[flowVars.varName]`, donot prefix with `payload01`
36,894,357
I'm trying to map a column name dynamically in Dataweave using the contents of a flow variable. The static version of what I'm trying to achieve looks something like: ``` payload map ((payload01 , indexOfPayload01) -> { COLUMNA: payload01.INPUTA }) ``` Now the part that I need to be dynamic is `INPUTA` - I need ...
2016/04/27
[ "https://Stackoverflow.com/questions/36894357", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3327896/" ]
Use it like below. Note the parenthesis around key which is very important because () tells DataWeave to first execute script inside it and then use the result as the value for outside expression. ``` payload map ((payload01 , indexOfPayload01) -> { COLUMNA: payload01[('INPUT' ++ flowVars.varName)] }) ``` Le...
From Dataweave you have to access the flowvars or session vars as given below. flowVars.varName sessionVars.varName You can use various Dataweave operators to form final field names or value. Understanding Dataweave Operators is crucial to to make best use of Dataweave component. Please go through the link below for a...
325,407
Essentially i want to have a generic function which accepts a LINQ anonymous list and returns an array back. I was hoping to use generics but i just can seem to get it to work. hopefully the example below helps say i have a person object with id, fname, lname and dob. i have a generic class with contains a list of ob...
2008/11/28
[ "https://Stackoverflow.com/questions/325407", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
Your question is a little unclear, so I'm not sure how much my answers will help, but here goes... * [An anonymous type has method scope](http://msdn.microsoft.com/en-us/library/bb397696.aspx) so you cannot return it from a function, at least not in a strongly-typed manner. [You can cast to `object` and then back to a...
I'm not sure that you can easily pass anonymous objects as parameters, anymore than you can have them as return values. I say easily, because: * <http://tomasp.net/blog/cannot-return-anonymous-type-from-method.aspx> * <http://blog.decarufel.net/2007/11/passing-anonymous-to-and-from-methods.html> *[Try the code forma...
325,407
Essentially i want to have a generic function which accepts a LINQ anonymous list and returns an array back. I was hoping to use generics but i just can seem to get it to work. hopefully the example below helps say i have a person object with id, fname, lname and dob. i have a generic class with contains a list of ob...
2008/11/28
[ "https://Stackoverflow.com/questions/325407", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
You'd just call [ToArray](http://msdn.microsoft.com/en-us/library/bb298736.aspx). Sure, the type is anonymous... but because of type inference, you don't have to say the type's name. From the example code: ``` packages _ .Select(Function(pkg) pkg.Company) _ .ToArray() ``` Company happens to be string, b...
Your question is a little unclear, so I'm not sure how much my answers will help, but here goes... * [An anonymous type has method scope](http://msdn.microsoft.com/en-us/library/bb397696.aspx) so you cannot return it from a function, at least not in a strongly-typed manner. [You can cast to `object` and then back to a...
325,407
Essentially i want to have a generic function which accepts a LINQ anonymous list and returns an array back. I was hoping to use generics but i just can seem to get it to work. hopefully the example below helps say i have a person object with id, fname, lname and dob. i have a generic class with contains a list of ob...
2008/11/28
[ "https://Stackoverflow.com/questions/325407", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
You can bind a grid directly to the array of anonymous types. Here's an example: ``` var qry = from a in Enumerable.Range(0, 100) select new { SomeField1 = a, SomeField2 = a * 2, SomeField3 = a * 3 }; object[] objs = qry.ToArray(); dataGridView1.DataSource = objs; ``` Note a...
Your question is a little unclear, so I'm not sure how much my answers will help, but here goes... * [An anonymous type has method scope](http://msdn.microsoft.com/en-us/library/bb397696.aspx) so you cannot return it from a function, at least not in a strongly-typed manner. [You can cast to `object` and then back to a...
325,407
Essentially i want to have a generic function which accepts a LINQ anonymous list and returns an array back. I was hoping to use generics but i just can seem to get it to work. hopefully the example below helps say i have a person object with id, fname, lname and dob. i have a generic class with contains a list of ob...
2008/11/28
[ "https://Stackoverflow.com/questions/325407", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
You'd just call [ToArray](http://msdn.microsoft.com/en-us/library/bb298736.aspx). Sure, the type is anonymous... but because of type inference, you don't have to say the type's name. From the example code: ``` packages _ .Select(Function(pkg) pkg.Company) _ .ToArray() ``` Company happens to be string, b...
I'm not sure that you can easily pass anonymous objects as parameters, anymore than you can have them as return values. I say easily, because: * <http://tomasp.net/blog/cannot-return-anonymous-type-from-method.aspx> * <http://blog.decarufel.net/2007/11/passing-anonymous-to-and-from-methods.html> *[Try the code forma...
325,407
Essentially i want to have a generic function which accepts a LINQ anonymous list and returns an array back. I was hoping to use generics but i just can seem to get it to work. hopefully the example below helps say i have a person object with id, fname, lname and dob. i have a generic class with contains a list of ob...
2008/11/28
[ "https://Stackoverflow.com/questions/325407", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
You can bind a grid directly to the array of anonymous types. Here's an example: ``` var qry = from a in Enumerable.Range(0, 100) select new { SomeField1 = a, SomeField2 = a * 2, SomeField3 = a * 3 }; object[] objs = qry.ToArray(); dataGridView1.DataSource = objs; ``` Note a...
I'm not sure that you can easily pass anonymous objects as parameters, anymore than you can have them as return values. I say easily, because: * <http://tomasp.net/blog/cannot-return-anonymous-type-from-method.aspx> * <http://blog.decarufel.net/2007/11/passing-anonymous-to-and-from-methods.html> *[Try the code forma...
654,697
I am asked to prove that: > > For integers $n, x,y > 0$, where $x,y$ are relatively prime, > every $n \ge (x-1) (y-1)$ can be expressed as $xa + yb$, with nonnegative integers $a,b \ge0$. > > > How should I approach this? I have very limited knowledge in number theory.
2014/01/28
[ "https://math.stackexchange.com/questions/654697", "https://math.stackexchange.com", "https://math.stackexchange.com/users/11855/" ]
We **sketch** a proof. For my comfort, I will use $a$ and $b$ instead of $x$ and $y$. Sorry! So we show that every $n\ge (a-1)(b-1)$ is representable in the form $au + bv$ with $u$ and $v$ being nonnegative integers. **1.** Because $a$ and $b$ are relatively prime, there exist integers $x\_0,y\_0$ (not necessarily bot...
Let me show another proof of this elementary problem (in terms of $a$ and $b$ as constants and $x$, $y$ as variables). Let $i$ be the least (non-negative) residue of $y$ modulo $a$. Then one can rewrite the form $ax+by$ as $ax+b(i+az)=bi+a(x+bz)$. Given $0 \leq i \leq a-1$, we obtain the sequence $bi+an$, $n\geq 0$, ...
654,697
I am asked to prove that: > > For integers $n, x,y > 0$, where $x,y$ are relatively prime, > every $n \ge (x-1) (y-1)$ can be expressed as $xa + yb$, with nonnegative integers $a,b \ge0$. > > > How should I approach this? I have very limited knowledge in number theory.
2014/01/28
[ "https://math.stackexchange.com/questions/654697", "https://math.stackexchange.com", "https://math.stackexchange.com/users/11855/" ]
This problem is similar to the "coin problem", where you need to find the smallest integer from which every integer can be obtained with a linear combination of the values of your coins with positive coefficients. For your problem with 2 numbers (aka 2 coin values), a solution can be found here : <http://www.cut-the-k...
Let me show another proof of this elementary problem (in terms of $a$ and $b$ as constants and $x$, $y$ as variables). Let $i$ be the least (non-negative) residue of $y$ modulo $a$. Then one can rewrite the form $ax+by$ as $ax+b(i+az)=bi+a(x+bz)$. Given $0 \leq i \leq a-1$, we obtain the sequence $bi+an$, $n\geq 0$, ...
654,697
I am asked to prove that: > > For integers $n, x,y > 0$, where $x,y$ are relatively prime, > every $n \ge (x-1) (y-1)$ can be expressed as $xa + yb$, with nonnegative integers $a,b \ge0$. > > > How should I approach this? I have very limited knowledge in number theory.
2014/01/28
[ "https://math.stackexchange.com/questions/654697", "https://math.stackexchange.com", "https://math.stackexchange.com/users/11855/" ]
**Key Idea** $ $ In the plane $\,\mathbb R^2,\,$ a line $\rm\,a\,x+b\,y = c\,$ of negative slope has points in the first quadrant $\rm\,x,y\ge 0\ $ iff its $\rm\,y$-intercept $\rm\,(0,\,y\_0)\,$ is in the first quadrant, i.e. $\,\rm y\_0 \ge 0\,.$ We can use an analogous "normalized" point test to check if a discrete l...
This problem is similar to the "coin problem", where you need to find the smallest integer from which every integer can be obtained with a linear combination of the values of your coins with positive coefficients. For your problem with 2 numbers (aka 2 coin values), a solution can be found here : <http://www.cut-the-k...
654,697
I am asked to prove that: > > For integers $n, x,y > 0$, where $x,y$ are relatively prime, > every $n \ge (x-1) (y-1)$ can be expressed as $xa + yb$, with nonnegative integers $a,b \ge0$. > > > How should I approach this? I have very limited knowledge in number theory.
2014/01/28
[ "https://math.stackexchange.com/questions/654697", "https://math.stackexchange.com", "https://math.stackexchange.com/users/11855/" ]
We **sketch** a proof. For my comfort, I will use $a$ and $b$ instead of $x$ and $y$. Sorry! So we show that every $n\ge (a-1)(b-1)$ is representable in the form $au + bv$ with $u$ and $v$ being nonnegative integers. **1.** Because $a$ and $b$ are relatively prime, there exist integers $x\_0,y\_0$ (not necessarily bot...
HINT: We have $$a x + b y = (a - q y) x + (b + q x) y$$ Therefore, every number that is an integer combination $n = a x + b y$ is also an integer combination $n = a x + b y$, with $0 < a \le y$. Now, consider a number $n > x y$ that is an integral combination of $x$, $y$, that is $n = a x + b y$. We may assume that ...
654,697
I am asked to prove that: > > For integers $n, x,y > 0$, where $x,y$ are relatively prime, > every $n \ge (x-1) (y-1)$ can be expressed as $xa + yb$, with nonnegative integers $a,b \ge0$. > > > How should I approach this? I have very limited knowledge in number theory.
2014/01/28
[ "https://math.stackexchange.com/questions/654697", "https://math.stackexchange.com", "https://math.stackexchange.com/users/11855/" ]
By the extended Euclidean algorithm one finds $u,v\in\mathbb Z$ with $ux+vy=1$, hence for *any* integer $n$ we can find a representation $n=a x+b y$ with $a,b\in\mathbb Z$. With $ax+by=n$ we also have $(a+ky)x+(b-kx)y=n$, hence there exist solutions to $n=ax+by$ with $a\ge 0$. Among all those solutions pick one that mi...
This problem is similar to the "coin problem", where you need to find the smallest integer from which every integer can be obtained with a linear combination of the values of your coins with positive coefficients. For your problem with 2 numbers (aka 2 coin values), a solution can be found here : <http://www.cut-the-k...
654,697
I am asked to prove that: > > For integers $n, x,y > 0$, where $x,y$ are relatively prime, > every $n \ge (x-1) (y-1)$ can be expressed as $xa + yb$, with nonnegative integers $a,b \ge0$. > > > How should I approach this? I have very limited knowledge in number theory.
2014/01/28
[ "https://math.stackexchange.com/questions/654697", "https://math.stackexchange.com", "https://math.stackexchange.com/users/11855/" ]
We **sketch** a proof. For my comfort, I will use $a$ and $b$ instead of $x$ and $y$. Sorry! So we show that every $n\ge (a-1)(b-1)$ is representable in the form $au + bv$ with $u$ and $v$ being nonnegative integers. **1.** Because $a$ and $b$ are relatively prime, there exist integers $x\_0,y\_0$ (not necessarily bot...
**Key Idea** $ $ In the plane $\,\mathbb R^2,\,$ a line $\rm\,a\,x+b\,y = c\,$ of negative slope has points in the first quadrant $\rm\,x,y\ge 0\ $ iff its $\rm\,y$-intercept $\rm\,(0,\,y\_0)\,$ is in the first quadrant, i.e. $\,\rm y\_0 \ge 0\,.$ We can use an analogous "normalized" point test to check if a discrete l...
654,697
I am asked to prove that: > > For integers $n, x,y > 0$, where $x,y$ are relatively prime, > every $n \ge (x-1) (y-1)$ can be expressed as $xa + yb$, with nonnegative integers $a,b \ge0$. > > > How should I approach this? I have very limited knowledge in number theory.
2014/01/28
[ "https://math.stackexchange.com/questions/654697", "https://math.stackexchange.com", "https://math.stackexchange.com/users/11855/" ]
We **sketch** a proof. For my comfort, I will use $a$ and $b$ instead of $x$ and $y$. Sorry! So we show that every $n\ge (a-1)(b-1)$ is representable in the form $au + bv$ with $u$ and $v$ being nonnegative integers. **1.** Because $a$ and $b$ are relatively prime, there exist integers $x\_0,y\_0$ (not necessarily bot...
This problem is similar to the "coin problem", where you need to find the smallest integer from which every integer can be obtained with a linear combination of the values of your coins with positive coefficients. For your problem with 2 numbers (aka 2 coin values), a solution can be found here : <http://www.cut-the-k...
654,697
I am asked to prove that: > > For integers $n, x,y > 0$, where $x,y$ are relatively prime, > every $n \ge (x-1) (y-1)$ can be expressed as $xa + yb$, with nonnegative integers $a,b \ge0$. > > > How should I approach this? I have very limited knowledge in number theory.
2014/01/28
[ "https://math.stackexchange.com/questions/654697", "https://math.stackexchange.com", "https://math.stackexchange.com/users/11855/" ]
By the extended Euclidean algorithm one finds $u,v\in\mathbb Z$ with $ux+vy=1$, hence for *any* integer $n$ we can find a representation $n=a x+b y$ with $a,b\in\mathbb Z$. With $ax+by=n$ we also have $(a+ky)x+(b-kx)y=n$, hence there exist solutions to $n=ax+by$ with $a\ge 0$. Among all those solutions pick one that mi...
Let me show another proof of this elementary problem (in terms of $a$ and $b$ as constants and $x$, $y$ as variables). Let $i$ be the least (non-negative) residue of $y$ modulo $a$. Then one can rewrite the form $ax+by$ as $ax+b(i+az)=bi+a(x+bz)$. Given $0 \leq i \leq a-1$, we obtain the sequence $bi+an$, $n\geq 0$, ...
654,697
I am asked to prove that: > > For integers $n, x,y > 0$, where $x,y$ are relatively prime, > every $n \ge (x-1) (y-1)$ can be expressed as $xa + yb$, with nonnegative integers $a,b \ge0$. > > > How should I approach this? I have very limited knowledge in number theory.
2014/01/28
[ "https://math.stackexchange.com/questions/654697", "https://math.stackexchange.com", "https://math.stackexchange.com/users/11855/" ]
We **sketch** a proof. For my comfort, I will use $a$ and $b$ instead of $x$ and $y$. Sorry! So we show that every $n\ge (a-1)(b-1)$ is representable in the form $au + bv$ with $u$ and $v$ being nonnegative integers. **1.** Because $a$ and $b$ are relatively prime, there exist integers $x\_0,y\_0$ (not necessarily bot...
By the extended Euclidean algorithm one finds $u,v\in\mathbb Z$ with $ux+vy=1$, hence for *any* integer $n$ we can find a representation $n=a x+b y$ with $a,b\in\mathbb Z$. With $ax+by=n$ we also have $(a+ky)x+(b-kx)y=n$, hence there exist solutions to $n=ax+by$ with $a\ge 0$. Among all those solutions pick one that mi...
654,697
I am asked to prove that: > > For integers $n, x,y > 0$, where $x,y$ are relatively prime, > every $n \ge (x-1) (y-1)$ can be expressed as $xa + yb$, with nonnegative integers $a,b \ge0$. > > > How should I approach this? I have very limited knowledge in number theory.
2014/01/28
[ "https://math.stackexchange.com/questions/654697", "https://math.stackexchange.com", "https://math.stackexchange.com/users/11855/" ]
**Key Idea** $ $ In the plane $\,\mathbb R^2,\,$ a line $\rm\,a\,x+b\,y = c\,$ of negative slope has points in the first quadrant $\rm\,x,y\ge 0\ $ iff its $\rm\,y$-intercept $\rm\,(0,\,y\_0)\,$ is in the first quadrant, i.e. $\,\rm y\_0 \ge 0\,.$ We can use an analogous "normalized" point test to check if a discrete l...
Let me show another proof of this elementary problem (in terms of $a$ and $b$ as constants and $x$, $y$ as variables). Let $i$ be the least (non-negative) residue of $y$ modulo $a$. Then one can rewrite the form $ax+by$ as $ax+b(i+az)=bi+a(x+bz)$. Given $0 \leq i \leq a-1$, we obtain the sequence $bi+an$, $n\geq 0$, ...
126,978
I am having this weird issue with IIS 7.5 on Windows 2008 R2 x64. I created a site in IIS and **manually created** a test file index.html and everything worked. When I try to do a deployment, I copy all the files from my local PC to the IIS server, try to access index.html (this is the proper deployed file) and getting...
2010/03/28
[ "https://serverfault.com/questions/126978", "https://serverfault.com", "https://serverfault.com/users/27318/" ]
Sounds like a file permission issue to me. Make sure that you are indeed copying files into the wwwroot folder and not moving them from another folder. When you copy the files they will automatically inherit the permissions from the parent folder, but if you move files they will retain their original permissions. I wou...
IIS 7.5 should have given you detailed error on where you have ACCESS DENIED. If that does not help, use [Process Monitor](http://live.sysinternals.com/procmon.exe) and reproduce the error again and look for any ACCESS DENIED.
126,978
I am having this weird issue with IIS 7.5 on Windows 2008 R2 x64. I created a site in IIS and **manually created** a test file index.html and everything worked. When I try to do a deployment, I copy all the files from my local PC to the IIS server, try to access index.html (this is the proper deployed file) and getting...
2010/03/28
[ "https://serverfault.com/questions/126978", "https://serverfault.com", "https://serverfault.com/users/27318/" ]
Sounds like a file permission issue to me. Make sure that you are indeed copying files into the wwwroot folder and not moving them from another folder. When you copy the files they will automatically inherit the permissions from the parent folder, but if you move files they will retain their original permissions. I wou...
[See my answer here](https://serverfault.com/questions/70050/adding-a-virtual-directory-iis-7-5-windows-7-ultimate-x64/130322#130322). This IMO is a *breaking* change in Windows Server 2008 R2.
126,978
I am having this weird issue with IIS 7.5 on Windows 2008 R2 x64. I created a site in IIS and **manually created** a test file index.html and everything worked. When I try to do a deployment, I copy all the files from my local PC to the IIS server, try to access index.html (this is the proper deployed file) and getting...
2010/03/28
[ "https://serverfault.com/questions/126978", "https://serverfault.com", "https://serverfault.com/users/27318/" ]
Sounds like a file permission issue to me. Make sure that you are indeed copying files into the wwwroot folder and not moving them from another folder. When you copy the files they will automatically inherit the permissions from the parent folder, but if you move files they will retain their original permissions. I wou...
I was just struggling with this same issue. I'd deployed files to the IIS 7.5 server from another computer, and was getting 401 access denied errors. I tried adding the Application Domain Identity account (more on these here: <http://stevesmithblog.com/blog/working-with-application-pool-identities/>), the NETWORK SERVI...
126,978
I am having this weird issue with IIS 7.5 on Windows 2008 R2 x64. I created a site in IIS and **manually created** a test file index.html and everything worked. When I try to do a deployment, I copy all the files from my local PC to the IIS server, try to access index.html (this is the proper deployed file) and getting...
2010/03/28
[ "https://serverfault.com/questions/126978", "https://serverfault.com", "https://serverfault.com/users/27318/" ]
Sounds like a file permission issue to me. Make sure that you are indeed copying files into the wwwroot folder and not moving them from another folder. When you copy the files they will automatically inherit the permissions from the parent folder, but if you move files they will retain their original permissions. I wou...
The problem not lies precisely in the authorization/authentication but in the modules that now manages the IIS. Inside system.webServer you should have **runAllManagedModulesForAllRequests** set to **false** so you can display all images/css without problems with authentication. In ASP.NET websites, the value of **run...
126,978
I am having this weird issue with IIS 7.5 on Windows 2008 R2 x64. I created a site in IIS and **manually created** a test file index.html and everything worked. When I try to do a deployment, I copy all the files from my local PC to the IIS server, try to access index.html (this is the proper deployed file) and getting...
2010/03/28
[ "https://serverfault.com/questions/126978", "https://serverfault.com", "https://serverfault.com/users/27318/" ]
IIS 7.5 should have given you detailed error on where you have ACCESS DENIED. If that does not help, use [Process Monitor](http://live.sysinternals.com/procmon.exe) and reproduce the error again and look for any ACCESS DENIED.
[See my answer here](https://serverfault.com/questions/70050/adding-a-virtual-directory-iis-7-5-windows-7-ultimate-x64/130322#130322). This IMO is a *breaking* change in Windows Server 2008 R2.
126,978
I am having this weird issue with IIS 7.5 on Windows 2008 R2 x64. I created a site in IIS and **manually created** a test file index.html and everything worked. When I try to do a deployment, I copy all the files from my local PC to the IIS server, try to access index.html (this is the proper deployed file) and getting...
2010/03/28
[ "https://serverfault.com/questions/126978", "https://serverfault.com", "https://serverfault.com/users/27318/" ]
I was just struggling with this same issue. I'd deployed files to the IIS 7.5 server from another computer, and was getting 401 access denied errors. I tried adding the Application Domain Identity account (more on these here: <http://stevesmithblog.com/blog/working-with-application-pool-identities/>), the NETWORK SERVI...
[See my answer here](https://serverfault.com/questions/70050/adding-a-virtual-directory-iis-7-5-windows-7-ultimate-x64/130322#130322). This IMO is a *breaking* change in Windows Server 2008 R2.
126,978
I am having this weird issue with IIS 7.5 on Windows 2008 R2 x64. I created a site in IIS and **manually created** a test file index.html and everything worked. When I try to do a deployment, I copy all the files from my local PC to the IIS server, try to access index.html (this is the proper deployed file) and getting...
2010/03/28
[ "https://serverfault.com/questions/126978", "https://serverfault.com", "https://serverfault.com/users/27318/" ]
The problem not lies precisely in the authorization/authentication but in the modules that now manages the IIS. Inside system.webServer you should have **runAllManagedModulesForAllRequests** set to **false** so you can display all images/css without problems with authentication. In ASP.NET websites, the value of **run...
[See my answer here](https://serverfault.com/questions/70050/adding-a-virtual-directory-iis-7-5-windows-7-ultimate-x64/130322#130322). This IMO is a *breaking* change in Windows Server 2008 R2.
8,180,189
we're using JIRA with svn and looking for a way to include the revision id of the file automatically in the comment that appears in the dialog when commiting the file(s) so that JIRA catch that task. Something like [ E-2 ] where the '2' is the id of the revision set by svn. Is there a way to create somethin similar to...
2011/11/18
[ "https://Stackoverflow.com/questions/8180189", "https://Stackoverflow.com", "https://Stackoverflow.com/users/715415/" ]
All the JIRA/Subversion integrations I've used (svn plugin, fisheye) handle this automatically. You add the JIRA issue key such as "TEST-123" somewhere in the svn commit message, and then the integration periodically notes all new commits and looks for JIRA issue keys in their messages. Then each JIRA issue has a tab w...
If you are not in the habit of doing commits in a particular way, and you don't mind doing a bit of scripting, this is what comes to mind -- I will probably do something like this myself, though I am using HG and not SVN... Get the command line interface for Jira, rig it up so you can download 'my issues' into a list,...
57,629,751
I have `a_1.py`~`a_10.py` I want to run 10 python programs in parallel. I tried: ``` from multiprocessing import Process import os def info(title): I want to execute python program def f(name): for i in range(1, 11): subprocess.Popen(['python3', f'a_{i}.py']) if __name__ == '__main__': info('m...
2019/08/23
[ "https://Stackoverflow.com/questions/57629751", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11309950/" ]
I would suggest using the [`subprocess`](https://docs.python.org/3/library/subprocess.html#module-subprocess) module instead of `multiprocessing`: ``` import os import subprocess import sys MAX_SUB_PROCESSES = 10 def info(title): print(title, flush=True) if __name__ == '__main__': info('main line') # C...
If you just need to call 10 external `py` scripts (`a_1.py` ~ `a_10.py`) as a separate processes - use [subprocess.Popen](https://docs.python.org/dev/library/subprocess.html#popen-constructor) class: ``` import subprocess, sys for i in range(1, 11): subprocess.Popen(['python3', f'a_{i}.py']) # sys.exit() # opt...
57,629,751
I have `a_1.py`~`a_10.py` I want to run 10 python programs in parallel. I tried: ``` from multiprocessing import Process import os def info(title): I want to execute python program def f(name): for i in range(1, 11): subprocess.Popen(['python3', f'a_{i}.py']) if __name__ == '__main__': info('m...
2019/08/23
[ "https://Stackoverflow.com/questions/57629751", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11309950/" ]
I would suggest using the [`subprocess`](https://docs.python.org/3/library/subprocess.html#module-subprocess) module instead of `multiprocessing`: ``` import os import subprocess import sys MAX_SUB_PROCESSES = 10 def info(title): print(title, flush=True) if __name__ == '__main__': info('main line') # C...
You can use a multiprocessing pool to run them concurrently. ```py import multiprocessing as mp def worker(module_name): """ Executes a module externally with python """ __import__(module_name) return if __name__ == "__main__": max_processes = 5 module_names = [f"a_{i}" for i in range(1, 11)] ...
49,181,215
This is a [solved problem](http://massivealgorithms.blogspot.com/2016/07/missing-int.html) where the we have to find a missing integer from the input data which is in form of a file containing 4 billion unsorted unsigned integers. The catch is that only 10 MBytes of memory can be used. The author gives a solution wher...
2018/03/08
[ "https://Stackoverflow.com/questions/49181215", "https://Stackoverflow.com", "https://Stackoverflow.com/users/641752/" ]
Not stated, but I'm assuming that the problem is to find the one missing integer from a file with a set of 2^32 (4294967296) unique 32 bit unsigned integers of values 0 to 4294967295. The file takes 17179869184 bytes of space. Using 2^23 = 8388608 of memory space allows for 2^21 = 2097152 32 bit unsigned integer coun...
I belive it should be 10\*2^23 or 5\*2^24 in bits. Try to see if it is in byte or bit ``` 10 MB = 2*5*2^20*2^3 M=2^20 B=2^3b 10=2*5 ```
49,181,215
This is a [solved problem](http://massivealgorithms.blogspot.com/2016/07/missing-int.html) where the we have to find a missing integer from the input data which is in form of a file containing 4 billion unsorted unsigned integers. The catch is that only 10 MBytes of memory can be used. The author gives a solution wher...
2018/03/08
[ "https://Stackoverflow.com/questions/49181215", "https://Stackoverflow.com", "https://Stackoverflow.com/users/641752/" ]
Not stated, but I'm assuming that the problem is to find the one missing integer from a file with a set of 2^32 (4294967296) unique 32 bit unsigned integers of values 0 to 4294967295. The file takes 17179869184 bytes of space. Using 2^23 = 8388608 of memory space allows for 2^21 = 2097152 32 bit unsigned integer coun...
It's not. 1 MB is 2^20 bytes (1024 X 1024) = 1048576 10 MB is then 10485760. 2^23 = 8388608 Of course that website says 10 MB is "roughly 2^23", which could be accurate depending on what is meant by roughly.
4,825
As I understand it there is a general recommendation towards wearing weight lifting shoes when lifting heavy weights for three main reasons: * Less compression in a weight lifting shoe's than in a normal training shoe * A more favourable angle for a more 'upright' position(surely just a more hips forward position) * G...
2011/12/08
[ "https://fitness.stackexchange.com/questions/4825", "https://fitness.stackexchange.com", "https://fitness.stackexchange.com/users/720/" ]
Most weightlifting shoes were designed for OLYMPIC weightlifting - the Clean and Jerk and the Snatch. You can read all about it on the web including the history and evolution of the shoes. Basically you absolutely need the heel to perform Olympic lifts with any real weight on the bar. With that said, I do not believe ...
Some of the more successful heavy lifters at my Crossfit Box swear by firm shoes with elevated heels, but only when doing some very heavy loads. To me this approach makes a lost of sense. If you're trying to exercise a muscle by performing a movement that is unnatural or really difficult, something like this may put ...
4,825
As I understand it there is a general recommendation towards wearing weight lifting shoes when lifting heavy weights for three main reasons: * Less compression in a weight lifting shoe's than in a normal training shoe * A more favourable angle for a more 'upright' position(surely just a more hips forward position) * G...
2011/12/08
[ "https://fitness.stackexchange.com/questions/4825", "https://fitness.stackexchange.com", "https://fitness.stackexchange.com/users/720/" ]
All weightlifting shoes have one thing in common: an incompressible sole. The more inexpensive shoes use a hard plastic, and the more expensive shoes use wood. At one point in time there were power lifting shoes that had a flat sole. I haven't been able to find any of these lately, and almost all have a heel. Whether ...
Some of the more successful heavy lifters at my Crossfit Box swear by firm shoes with elevated heels, but only when doing some very heavy loads. To me this approach makes a lost of sense. If you're trying to exercise a muscle by performing a movement that is unnatural or really difficult, something like this may put ...
4,825
As I understand it there is a general recommendation towards wearing weight lifting shoes when lifting heavy weights for three main reasons: * Less compression in a weight lifting shoe's than in a normal training shoe * A more favourable angle for a more 'upright' position(surely just a more hips forward position) * G...
2011/12/08
[ "https://fitness.stackexchange.com/questions/4825", "https://fitness.stackexchange.com", "https://fitness.stackexchange.com/users/720/" ]
Most weightlifting shoes were designed for OLYMPIC weightlifting - the Clean and Jerk and the Snatch. You can read all about it on the web including the history and evolution of the shoes. Basically you absolutely need the heel to perform Olympic lifts with any real weight on the bar. With that said, I do not believe ...
All weightlifting shoes have one thing in common: an incompressible sole. The more inexpensive shoes use a hard plastic, and the more expensive shoes use wood. At one point in time there were power lifting shoes that had a flat sole. I haven't been able to find any of these lately, and almost all have a heel. Whether ...
14,077,100
At my company we have a master pricing sheet in Excel that we keep updated. However, we have marketing materials in InDesign, Excel, on our website (with a MYSQL database), and 3rd party websites. Every month we update our prices, we have to update all of them by hand which is a lot of work, and prone to errors. I am...
2012/12/28
[ "https://Stackoverflow.com/questions/14077100", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1679202/" ]
The approach i would take is to move the master sheet into a database. This would allow me to create a simple web based gui that uses web services and role based authentication. The web services would generate xml, csv, etc. This would further allow for central management of pricing which in turn prevents rogue manager...
I don't disagree with Woot4Moo's suggestion, however business reality (cost, experience, ongoing maintenance) may prevent you from moving off Excel as the master price list. Fortunately Excel works fine as an ODBC-compliant data source for simple queries. Assuming the master Excel sheet is in an accessible location (i...
4,360,058
I have installed the Like Box in my blog, and I want to know if the user already like my page. I want to implement something like this to my reader because I want to offer them hidden contents if they already liked my page. Is there an event where I will detect if the user already liked the page in the Like Box?
2010/12/05
[ "https://Stackoverflow.com/questions/4360058", "https://Stackoverflow.com", "https://Stackoverflow.com/users/526816/" ]
You only assigning the new node to your local `head` variable in your `add()` method, not to the actual `CircleList` instance member. You might want to do something like: ``` def add(self, element): head = self.head print(head) size = self.size if head is None: self.head = head = Node(element,...
Easy to fix! In your add function, you assign the new head to the `head` variable -- which is restricted to the scope of the function, and will dissapear when it returns! You have to set the value of `self.head`, the attribute of the current instance. Edit: when you assign `head = self.head` you are making them both ...
1,028,604
**Ubuntu 18.04** came out April 26, 2018 and I want to try it to upgrade my programs and convert my data but don't want to commit if there are bugs. I've shrunk Windows from 410 GB to 385 GB, rebooted Ubuntu 16.04 and ran `gparted` to create a new 25 GB partition labeled "Ubuntu18.04". I ran `rm-kernels` and removed a...
2018/04/27
[ "https://askubuntu.com/questions/1028604", "https://askubuntu.com", "https://askubuntu.com/users/307523/" ]
Bash script to clone active Ubuntu Partition to clone partition =============================================================== The `clone-ubuntu.sh` bash script will seamlessly and safely replicate 16.04 LTS into a partition for upgrading to 18.04 LTS: [![clone-ubuntu.png](https://i.stack.imgur.com/MgM3p.png)](https...
Problems with upgrading from previous releases to 18.04 LTS =========================================================== It is not at all straightforward to upgrade from previous releases to 18.04 LTS. I don't know if there are more problems than such upgrading in the past, but **people who do release upgrading now tak...
475,373
"The original definition, in terms of a finitely additive invariant measure (or mean) on subsets of G, was introduced by John von Neumann in 1929 under the German name "messbar" ("measurable" in English) in response to the Banach–Tarski paradox. In 1949 Mahlon M. Day introduced the English translation "amenable", appar...
2013/08/24
[ "https://math.stackexchange.com/questions/475373", "https://math.stackexchange.com", "https://math.stackexchange.com/users/70687/" ]
I will add a quote from Runde, V. (2002), Lectures on Amenability, Lecture Notes in Mathematics 1774, Springer, ISBN 9783540428527, [p.34](https://books.google.com/books?id=-YLoYK26rTsC&pg=PA34). (Notice that the Wikipedia article says in a footnote: "Day's first published use of the word is in his abstract for an AMS ...
It suggests a group of people who get along well with one another. :) I hadn't thought of @André's interpretation; pronunciation notwithstanding, I yield. :)
11,880,549
Using this code to exchange the initial code of the requests coming from Drive UI with a token i can use to make API requests. ``` public GoogleCredential exchangeCode(String authorizationCode) throws CodeExchangeException { try { GoogleTokenResponse response = new GoogleAuthorizationCodeTokenReque...
2012/08/09
[ "https://Stackoverflow.com/questions/11880549", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1587037/" ]
Yes, you can if you want. They work well in Symbian Emulator which is a usual Windows application. More over, you can build them from sources and use only those UI components, which you need. [Here](http://goo.gl/u2TCy) I published a sample project, which demonstrates that idea.
I don't think that you can use them for Desktop apps. However, some Qt Quick components for Desktop exists : <http://labs.qt.nokia.com/2011/03/10/qml-components-for-desktop/>
5,919,760
I'm trying to parse some string and it has some http links embedded in it. I'd like to dynamically create anchor tags within this string using jquery then display them on the front end so the user can click them. Is there a way to do this? Thanks!
2011/05/07
[ "https://Stackoverflow.com/questions/5919760", "https://Stackoverflow.com", "https://Stackoverflow.com/users/382906/" ]
You can do it like this: ``` $(function(){ //get the string var str = $("#text").html(); //create good link matching regexp var regex = /(https?:\/\/([-\w\.]+)+(:\d+)?(\/([\w\/_\.]*(\?\S+)?)?)?)/g // $1 is the found URL in the text // str.replace replaces the found url with <a href='THE URL'>TH...
@cfarm , you can grab the urls and construct html of your own. parse the string and start making the urls and keep a place holder in your Html , use <http://api.jquery.com/html/> or <http://api.jquery.com/append/>
59,807,958
I was building React Native Mobile Application with GraphQL. Now I've been stuck with passing array inside GraphQL mutation. I have been using redux-thunk as middleware to pass data to GraphQL mutation. My GraphQL mutation info: ``` createVirtualChallenge( name: String! target: String! image: String description: St...
2020/01/19
[ "https://Stackoverflow.com/questions/59807958", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7867613/" ]
Remove the quotes for that argument since the quote is using for wrapping String. Since it's an array convert into a corresponding JSON string and which will be valid array input for graphql. `selectedUsers: "${selectedUsers}"` ===> `selectedUsers: ${JSON.stringify(selectedUsers)}` ``` body: JSON.stringify({ query...
You should never use string interpolation to inject values into a GraphQL query. The preferred way is to utilize variables, which can be sent along with your query as JSON object that the GraphQL service will parse appropriately. For example, instead of ``` mutation { createVirtualChallenge(name: "someName"){ ...
7,182,786
I was about to implement a table view behavior like the one used in a certain part of the twitter app for iPhone, precisely I'm talking about the tableview shown when, in a geolocalized tweet, I tap on the location displayed under the tweet. . .here's some pictures just to give it a look: ![Image](https://i.stack.imgu...
2011/08/24
[ "https://Stackoverflow.com/questions/7182786", "https://Stackoverflow.com", "https://Stackoverflow.com/users/245558/" ]
It would be far easier to just use [`strftime()`](http://php.net/manual/en/function.strftime.php). All you have to do is set a `locale` and you can output in your desired language. Example: ``` setlocale(LC_ALL, 'es_ES'); // I think it´s es_ES $my_time = strftime("%B %e, %G, %I:%M %P"); // something like that.....
I think you mean ``` $search = array('August', 'September', 'October', 'November', 'December'); $replace = array('Agosto', 'Septiembre', 'Octubre', 'Noviembre', 'Diciembre'); ``` instead of ``` $search = $time_english('August', 'September', 'October', 'November', 'December'); $replace = $times_sp...
7,182,786
I was about to implement a table view behavior like the one used in a certain part of the twitter app for iPhone, precisely I'm talking about the tableview shown when, in a geolocalized tweet, I tap on the location displayed under the tweet. . .here's some pictures just to give it a look: ![Image](https://i.stack.imgu...
2011/08/24
[ "https://Stackoverflow.com/questions/7182786", "https://Stackoverflow.com", "https://Stackoverflow.com/users/245558/" ]
It would be far easier to just use [`strftime()`](http://php.net/manual/en/function.strftime.php). All you have to do is set a `locale` and you can output in your desired language. Example: ``` setlocale(LC_ALL, 'es_ES'); // I think it´s es_ES $my_time = strftime("%B %e, %G, %I:%M %P"); // something like that.....
This is probably correct one ``` $p['time'] = date("F j, Y, g:i a"); $search = array('August', 'September', 'October', 'November', 'December'); $replace = array('Agosto', 'Septiembre', 'Octubre', 'Noviembre', 'Diciembre'); str_replace($search, $replace, $subject); ```
11,707,678
i been reading for hours trying to make this work but i dont have much knowledge to do it. I have this js code: ``` var username=$(this).attr("username"); ``` It pull a list of users f.e (admin, test1, test2, test3) and i needs to split it into another var like this: ``` var members = [ ['admin'], ['test1...
2012/07/29
[ "https://Stackoverflow.com/questions/11707678", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1133401/" ]
To get an array of usernames: ``` var username = $(this).attr("username"); var members = username.split(','); ``` To get exactly what you've suggested you want (an array of arrays? - I don't think this is actually what you want): ``` var username = $(this).attr("username"); var membersArr = username.split(','); var...
**Update** To get the array of arrays, ``` var username=$(this).attr("username"); var membersArray= username.split(' ').map(function(username){ return [username]; }) //[["admin"],["test"],["test1"],["test2"]] ``` I've added a [fiddle here](http://jsfiddle.net/NVENA/)
27,520,257
I need to close the window after alertbox, I used the codes which was asked in [Stack Question](https://stackoverflow.com/questions/17567126/how-to-close-the-current-window-in-browser-after-clicking-ok-in-the-alert-messag) But my alert box is inside a php code, I am getting the alert box but once i close it the window ...
2014/12/17
[ "https://Stackoverflow.com/questions/27520257", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2700327/" ]
You need `window.open(...)` to be able to `window.close()`. You are using `window.alert()`. See **Best Practice** in the link <https://developer.mozilla.org/en-US/docs/Web/API/Window.open>
Some browsers won't respect the command unless it is user-initiated. But... Here's a workaround that may work for you. try this instead of `close`: ``` open(location, '_self').close(); ``` Or maybe fool the browser into thinking it was user initiated. This may or may not work; haven't tested. I'm just throwing spagh...
19,173,774
Can someone explain this question to me? I don't understand how the book arrived at its values or how one would arrive at the answer. Here is the question: > > Suppose that `ch` is a type `char` variable. Show how to assign the carriage-return character to `ch` by using an escape sequence, a decimal value, an octal ...
2013/10/04
[ "https://Stackoverflow.com/questions/19173774", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2839484/" ]
Look into the mod operator. It is typed `%` and will produce the remainder of a long division operation. Once you have the remainder, you can greatly simplify your rounding. You know if you need to round up or down with a simple if statement. Then to find out *which* multiple of 9 you need to round up or down to, divi...
``` private int getInventorySize(int max) { if (max < 9) { return 9; } if (max <= 54 && max > 9) { int a = max / 9; return a * 9; } else return 54; } ```
19,173,774
Can someone explain this question to me? I don't understand how the book arrived at its values or how one would arrive at the answer. Here is the question: > > Suppose that `ch` is a type `char` variable. Show how to assign the carriage-return character to `ch` by using an escape sequence, a decimal value, an octal ...
2013/10/04
[ "https://Stackoverflow.com/questions/19173774", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2839484/" ]
You can do: ``` private int getInventorySize(int max) { if (max <= 0) return 9; int quotient = (int)Math.ceil(max / 9.0); return quotient > 5 ? 54: quotient * 9; } ``` Divide the number by `9.0`. And taking the ceiling will get you the next integral quotient. If quotient is `> 5`, then simply return `54`...
``` int round(int num) { return (num>54)?54:(num%9==0)?num:((num/9)+1)*9; } ```
19,173,774
Can someone explain this question to me? I don't understand how the book arrived at its values or how one would arrive at the answer. Here is the question: > > Suppose that `ch` is a type `char` variable. Show how to assign the carriage-return character to `ch` by using an escape sequence, a decimal value, an octal ...
2013/10/04
[ "https://Stackoverflow.com/questions/19173774", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2839484/" ]
Look into the mod operator. It is typed `%` and will produce the remainder of a long division operation. Once you have the remainder, you can greatly simplify your rounding. You know if you need to round up or down with a simple if statement. Then to find out *which* multiple of 9 you need to round up or down to, divi...
``` int round(int num) { return (num>54)?54:(num%9==0)?num:((num/9)+1)*9; } ```
19,173,774
Can someone explain this question to me? I don't understand how the book arrived at its values or how one would arrive at the answer. Here is the question: > > Suppose that `ch` is a type `char` variable. Show how to assign the carriage-return character to `ch` by using an escape sequence, a decimal value, an octal ...
2013/10/04
[ "https://Stackoverflow.com/questions/19173774", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2839484/" ]
You can do: ``` private int getInventorySize(int max) { if (max <= 0) return 9; int quotient = (int)Math.ceil(max / 9.0); return quotient > 5 ? 54: quotient * 9; } ``` Divide the number by `9.0`. And taking the ceiling will get you the next integral quotient. If quotient is `> 5`, then simply return `54`...
Look into the mod operator. It is typed `%` and will produce the remainder of a long division operation. Once you have the remainder, you can greatly simplify your rounding. You know if you need to round up or down with a simple if statement. Then to find out *which* multiple of 9 you need to round up or down to, divi...
19,173,774
Can someone explain this question to me? I don't understand how the book arrived at its values or how one would arrive at the answer. Here is the question: > > Suppose that `ch` is a type `char` variable. Show how to assign the carriage-return character to `ch` by using an escape sequence, a decimal value, an octal ...
2013/10/04
[ "https://Stackoverflow.com/questions/19173774", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2839484/" ]
You can do: ``` private int getInventorySize(int max) { if (max <= 0) return 9; int quotient = (int)Math.ceil(max / 9.0); return quotient > 5 ? 54: quotient * 9; } ``` Divide the number by `9.0`. And taking the ceiling will get you the next integral quotient. If quotient is `> 5`, then simply return `54`...
``` private int getInventorySize (int max) { if (max < 9) return 9; for (int i = 9; i <= 54; i += 9) { if (max <= i) { return i; } } return 54; } ```
19,173,774
Can someone explain this question to me? I don't understand how the book arrived at its values or how one would arrive at the answer. Here is the question: > > Suppose that `ch` is a type `char` variable. Show how to assign the carriage-return character to `ch` by using an escape sequence, a decimal value, an octal ...
2013/10/04
[ "https://Stackoverflow.com/questions/19173774", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2839484/" ]
Look into the mod operator. It is typed `%` and will produce the remainder of a long division operation. Once you have the remainder, you can greatly simplify your rounding. You know if you need to round up or down with a simple if statement. Then to find out *which* multiple of 9 you need to round up or down to, divi...
its super easy! here you go: ``` Math.ceil((number/9))*9 ```
19,173,774
Can someone explain this question to me? I don't understand how the book arrived at its values or how one would arrive at the answer. Here is the question: > > Suppose that `ch` is a type `char` variable. Show how to assign the carriage-return character to `ch` by using an escape sequence, a decimal value, an octal ...
2013/10/04
[ "https://Stackoverflow.com/questions/19173774", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2839484/" ]
You do a one-liner with modulo like this: ``` return (max>=54) ? 54 : max+(9-max%9)*Math.min(1,max%9); ```
``` private int getInventorySize(int max) { if (max < 9) { return 9; } if (max <= 54 && max > 9) { int a = max / 9; return a * 9; } else return 54; } ```
19,173,774
Can someone explain this question to me? I don't understand how the book arrived at its values or how one would arrive at the answer. Here is the question: > > Suppose that `ch` is a type `char` variable. Show how to assign the carriage-return character to `ch` by using an escape sequence, a decimal value, an octal ...
2013/10/04
[ "https://Stackoverflow.com/questions/19173774", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2839484/" ]
You do a one-liner with modulo like this: ``` return (max>=54) ? 54 : max+(9-max%9)*Math.min(1,max%9); ```
The easiest way to do it with a formula is probably with integer divide, catching the special conditions first: ``` private int getInventorySize (int max) { if (max < 1) return 9; if (max > 54) return 54; max += 8; return max - (max % 9); } ``` The following table shows how this works: ``` max m...
19,173,774
Can someone explain this question to me? I don't understand how the book arrived at its values or how one would arrive at the answer. Here is the question: > > Suppose that `ch` is a type `char` variable. Show how to assign the carriage-return character to `ch` by using an escape sequence, a decimal value, an octal ...
2013/10/04
[ "https://Stackoverflow.com/questions/19173774", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2839484/" ]
You do a one-liner with modulo like this: ``` return (max>=54) ? 54 : max+(9-max%9)*Math.min(1,max%9); ```
``` private int getInventorySize (int max) { if (max < 9) return 9; for (int i = 9; i <= 54; i += 9) { if (max <= i) { return i; } } return 54; } ```
19,173,774
Can someone explain this question to me? I don't understand how the book arrived at its values or how one would arrive at the answer. Here is the question: > > Suppose that `ch` is a type `char` variable. Show how to assign the carriage-return character to `ch` by using an escape sequence, a decimal value, an octal ...
2013/10/04
[ "https://Stackoverflow.com/questions/19173774", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2839484/" ]
Look into the mod operator. It is typed `%` and will produce the remainder of a long division operation. Once you have the remainder, you can greatly simplify your rounding. You know if you need to round up or down with a simple if statement. Then to find out *which* multiple of 9 you need to round up or down to, divi...
``` private int getInventorySize (int max) { if (max < 9) return 9; for (int i = 9; i <= 54; i += 9) { if (max <= i) { return i; } } return 54; } ```
29,455,732
I have this Angular code: ``` .state('UserTables', { url: '/Tables', resolve: { auth: function resolveAuthentication(SessionService) { return SessionService.isUser(); } }, views: { "containerMain": { templateUrl: 'V...
2015/04/05
[ "https://Stackoverflow.com/questions/29455732", "https://Stackoverflow.com", "https://Stackoverflow.com/users/728188/" ]
I created [working plunker here](http://plnkr.co/edit/EfVzz9TQihNW4oOv6O7l?p=preview) To load template with custom headers, we can call do it like this *(check the state 'UserTables' in the plunker)*: ``` views: { "containerMain": { //templateUrl: 'Views/Tables', templateProvider: ['$http', ...
`templateUrl` property can also take function as value. So you can add dynamic properties to the templateUrl via there. ``` templateUrl : function(stateParams) { // before returning the URL, add additional properties and send // stateParamsargument object refers to $stateParams and you can access any url p...
1,811,665
I have a fully calibrated camera setup (that means $K$ and $P = [R|t]$ are known) and want to project a 3d line into the camera image. The 3d line is defined via world coordinates $A$ and $B$ (as $4x1$ homogeneous vectors) and represented with Plücker coordinates: $$ L = A\cdot B^T - B\cdot A^T\\ L\_{coord} = \{l\_{1...
2016/06/03
[ "https://math.stackexchange.com/questions/1811665", "https://math.stackexchange.com", "https://math.stackexchange.com/users/128886/" ]
I found what I was looking for in "Harley & Zisserman" (I must overlooked it). The projected line in the image can be calculated by: $$ [l]\_x = P\cdot L\cdot P^T $$ and $$ [l]\_x =\begin{bmatrix} 0&-c&b&\\ c&0&-a\\ -b&a&0 \end{bmatrix} $$ where $(a,b,c)$ are coefficients in the line equation $ax+by+c=0$ and $P$ i...
Start by computing the plane spanned by the line and the point of the camera. If you don't know how to compute such a join using Plücker coordinates, I can expand on this. The projection of the line is the intersection of that plane with the plane of your image. If you can choose the embedding of your drawing plane, e...
1,811,665
I have a fully calibrated camera setup (that means $K$ and $P = [R|t]$ are known) and want to project a 3d line into the camera image. The 3d line is defined via world coordinates $A$ and $B$ (as $4x1$ homogeneous vectors) and represented with Plücker coordinates: $$ L = A\cdot B^T - B\cdot A^T\\ L\_{coord} = \{l\_{1...
2016/06/03
[ "https://math.stackexchange.com/questions/1811665", "https://math.stackexchange.com", "https://math.stackexchange.com/users/128886/" ]
Start by computing the plane spanned by the line and the point of the camera. If you don't know how to compute such a join using Plücker coordinates, I can expand on this. The projection of the line is the intersection of that plane with the plane of your image. If you can choose the embedding of your drawing plane, e...
You could have simply projected the points A and B to image points a and b $$a=PA$$ $$b=PB$$ Then compute the 2D line from the 2D image points with cross product.
1,811,665
I have a fully calibrated camera setup (that means $K$ and $P = [R|t]$ are known) and want to project a 3d line into the camera image. The 3d line is defined via world coordinates $A$ and $B$ (as $4x1$ homogeneous vectors) and represented with Plücker coordinates: $$ L = A\cdot B^T - B\cdot A^T\\ L\_{coord} = \{l\_{1...
2016/06/03
[ "https://math.stackexchange.com/questions/1811665", "https://math.stackexchange.com", "https://math.stackexchange.com/users/128886/" ]
I found what I was looking for in "Harley & Zisserman" (I must overlooked it). The projected line in the image can be calculated by: $$ [l]\_x = P\cdot L\cdot P^T $$ and $$ [l]\_x =\begin{bmatrix} 0&-c&b&\\ c&0&-a\\ -b&a&0 \end{bmatrix} $$ where $(a,b,c)$ are coefficients in the line equation $ax+by+c=0$ and $P$ i...
You could have simply projected the points A and B to image points a and b $$a=PA$$ $$b=PB$$ Then compute the 2D line from the 2D image points with cross product.
10,125
After moving to Canada six months ago, I still haven't found Yukon Gold potatoes at the grocery stores. Instead I find Yellow potatoes and was curious as to whether or not they are considered to be the same or if they are completely different. I find that the texture is a little bit "harder" than the Yukon Gold potatoe...
2010/12/14
[ "https://cooking.stackexchange.com/questions/10125", "https://cooking.stackexchange.com", "https://cooking.stackexchange.com/users/3478/" ]
They are often used interchangeably. The truth is, yukon gold potatoes are a type of yellow potato. They were developed in Canada. You will definitely see them on store shelves here in Canada, but it can be seasonal, depending on your location. I am in Winnipeg, and I find YG about six months of the year.
Look for Maine Carola Potatoes. They are the closest to the actual Yukon in both flavor and texture. Maine grows lots of Yellow White and Russet potatoes. I'm willing to bet that some stores in the maritime have the Carola Potatoes.
10,125
After moving to Canada six months ago, I still haven't found Yukon Gold potatoes at the grocery stores. Instead I find Yellow potatoes and was curious as to whether or not they are considered to be the same or if they are completely different. I find that the texture is a little bit "harder" than the Yukon Gold potatoe...
2010/12/14
[ "https://cooking.stackexchange.com/questions/10125", "https://cooking.stackexchange.com", "https://cooking.stackexchange.com/users/3478/" ]
They are often used interchangeably. The truth is, yukon gold potatoes are a type of yellow potato. They were developed in Canada. You will definitely see them on store shelves here in Canada, but it can be seasonal, depending on your location. I am in Winnipeg, and I find YG about six months of the year.
In Ontario I find that yellow potatoes are not the same as Yukon gold! Yukons have a different texture and cook differently. I can't find them right now (late September) and am disappointed. Hope they are available soon!
10,125
After moving to Canada six months ago, I still haven't found Yukon Gold potatoes at the grocery stores. Instead I find Yellow potatoes and was curious as to whether or not they are considered to be the same or if they are completely different. I find that the texture is a little bit "harder" than the Yukon Gold potatoe...
2010/12/14
[ "https://cooking.stackexchange.com/questions/10125", "https://cooking.stackexchange.com", "https://cooking.stackexchange.com/users/3478/" ]
Look for Maine Carola Potatoes. They are the closest to the actual Yukon in both flavor and texture. Maine grows lots of Yellow White and Russet potatoes. I'm willing to bet that some stores in the maritime have the Carola Potatoes.
In Ontario I find that yellow potatoes are not the same as Yukon gold! Yukons have a different texture and cook differently. I can't find them right now (late September) and am disappointed. Hope they are available soon!
12,517,938
I have these 2 tables, ``` Student (Id, Name, DOB) School (Id, name) Table 3 (student.Id, School.Id, expiryDate) ``` I need to ADD, new student, new school and create new record for table 3) Is there a way I can do this through entity framework?
2012/09/20
[ "https://Stackoverflow.com/questions/12517938", "https://Stackoverflow.com", "https://Stackoverflow.com/users/214082/" ]
`$` is not the start of a variable name, it indicates the start of an expression. You should use `${map[key]}` to access the property `key` in map `map`. You can try it on a page with a `GET` parameter, using the following query string for example `?whatEver=something` ``` <c:set var="myParam" value="whatEver"/> what...
I think that you should access your map something like: ``` ${map.key} ``` and check some tutorials about jstl like [1](http://www.ibm.com/developerworks/java/library/j-jstl0211/index.html) and [2](http://www.ibm.com/developerworks/java/library/j-jstl0318/) (a little bit outdated, but still functional)
12,517,938
I have these 2 tables, ``` Student (Id, Name, DOB) School (Id, name) Table 3 (student.Id, School.Id, expiryDate) ``` I need to ADD, new student, new school and create new record for table 3) Is there a way I can do this through entity framework?
2012/09/20
[ "https://Stackoverflow.com/questions/12517938", "https://Stackoverflow.com", "https://Stackoverflow.com/users/214082/" ]
You can put the key-value in a map on `Java` side and access the same using `JSTL` on `JSP` page as below: **Prior java 1.7:** ``` Map<String, String> map = new HashMap<String, String>(); map.put("key","value"); ``` **Java 1.7 and above:** ``` Map<String, String> map = new HashMap<>(); map.put("key","value"); ```...
I think that you should access your map something like: ``` ${map.key} ``` and check some tutorials about jstl like [1](http://www.ibm.com/developerworks/java/library/j-jstl0211/index.html) and [2](http://www.ibm.com/developerworks/java/library/j-jstl0318/) (a little bit outdated, but still functional)
12,517,938
I have these 2 tables, ``` Student (Id, Name, DOB) School (Id, name) Table 3 (student.Id, School.Id, expiryDate) ``` I need to ADD, new student, new school and create new record for table 3) Is there a way I can do this through entity framework?
2012/09/20
[ "https://Stackoverflow.com/questions/12517938", "https://Stackoverflow.com", "https://Stackoverflow.com/users/214082/" ]
I have faced this issue before. This typically happens when the key is not a String. The fix is to cast the key to a String before using the key to get a value from the map Something like this: `<c:set var="keyString">${someKeyThatIsNotString}</c:set>` `<c:out value="${map[keyString]}"/>` Hope that helps
I think that you should access your map something like: ``` ${map.key} ``` and check some tutorials about jstl like [1](http://www.ibm.com/developerworks/java/library/j-jstl0211/index.html) and [2](http://www.ibm.com/developerworks/java/library/j-jstl0318/) (a little bit outdated, but still functional)
12,517,938
I have these 2 tables, ``` Student (Id, Name, DOB) School (Id, name) Table 3 (student.Id, School.Id, expiryDate) ``` I need to ADD, new student, new school and create new record for table 3) Is there a way I can do this through entity framework?
2012/09/20
[ "https://Stackoverflow.com/questions/12517938", "https://Stackoverflow.com", "https://Stackoverflow.com/users/214082/" ]
My five cents. Now I am working with EL 3.0 (jakarta impl) and I can access map value using three ways: ``` 1. ${map.someKey} 2. ${map['someKey']} 3. ${map[someVar]} //if someVar == 'someKey' ```
I think that you should access your map something like: ``` ${map.key} ``` and check some tutorials about jstl like [1](http://www.ibm.com/developerworks/java/library/j-jstl0211/index.html) and [2](http://www.ibm.com/developerworks/java/library/j-jstl0318/) (a little bit outdated, but still functional)
12,517,938
I have these 2 tables, ``` Student (Id, Name, DOB) School (Id, name) Table 3 (student.Id, School.Id, expiryDate) ``` I need to ADD, new student, new school and create new record for table 3) Is there a way I can do this through entity framework?
2012/09/20
[ "https://Stackoverflow.com/questions/12517938", "https://Stackoverflow.com", "https://Stackoverflow.com/users/214082/" ]
`$` is not the start of a variable name, it indicates the start of an expression. You should use `${map[key]}` to access the property `key` in map `map`. You can try it on a page with a `GET` parameter, using the following query string for example `?whatEver=something` ``` <c:set var="myParam" value="whatEver"/> what...
You can put the key-value in a map on `Java` side and access the same using `JSTL` on `JSP` page as below: **Prior java 1.7:** ``` Map<String, String> map = new HashMap<String, String>(); map.put("key","value"); ``` **Java 1.7 and above:** ``` Map<String, String> map = new HashMap<>(); map.put("key","value"); ```...
12,517,938
I have these 2 tables, ``` Student (Id, Name, DOB) School (Id, name) Table 3 (student.Id, School.Id, expiryDate) ``` I need to ADD, new student, new school and create new record for table 3) Is there a way I can do this through entity framework?
2012/09/20
[ "https://Stackoverflow.com/questions/12517938", "https://Stackoverflow.com", "https://Stackoverflow.com/users/214082/" ]
`$` is not the start of a variable name, it indicates the start of an expression. You should use `${map[key]}` to access the property `key` in map `map`. You can try it on a page with a `GET` parameter, using the following query string for example `?whatEver=something` ``` <c:set var="myParam" value="whatEver"/> what...
I have faced this issue before. This typically happens when the key is not a String. The fix is to cast the key to a String before using the key to get a value from the map Something like this: `<c:set var="keyString">${someKeyThatIsNotString}</c:set>` `<c:out value="${map[keyString]}"/>` Hope that helps
12,517,938
I have these 2 tables, ``` Student (Id, Name, DOB) School (Id, name) Table 3 (student.Id, School.Id, expiryDate) ``` I need to ADD, new student, new school and create new record for table 3) Is there a way I can do this through entity framework?
2012/09/20
[ "https://Stackoverflow.com/questions/12517938", "https://Stackoverflow.com", "https://Stackoverflow.com/users/214082/" ]
`$` is not the start of a variable name, it indicates the start of an expression. You should use `${map[key]}` to access the property `key` in map `map`. You can try it on a page with a `GET` parameter, using the following query string for example `?whatEver=something` ``` <c:set var="myParam" value="whatEver"/> what...
My five cents. Now I am working with EL 3.0 (jakarta impl) and I can access map value using three ways: ``` 1. ${map.someKey} 2. ${map['someKey']} 3. ${map[someVar]} //if someVar == 'someKey' ```
12,517,938
I have these 2 tables, ``` Student (Id, Name, DOB) School (Id, name) Table 3 (student.Id, School.Id, expiryDate) ``` I need to ADD, new student, new school and create new record for table 3) Is there a way I can do this through entity framework?
2012/09/20
[ "https://Stackoverflow.com/questions/12517938", "https://Stackoverflow.com", "https://Stackoverflow.com/users/214082/" ]
I have faced this issue before. This typically happens when the key is not a String. The fix is to cast the key to a String before using the key to get a value from the map Something like this: `<c:set var="keyString">${someKeyThatIsNotString}</c:set>` `<c:out value="${map[keyString]}"/>` Hope that helps
You can put the key-value in a map on `Java` side and access the same using `JSTL` on `JSP` page as below: **Prior java 1.7:** ``` Map<String, String> map = new HashMap<String, String>(); map.put("key","value"); ``` **Java 1.7 and above:** ``` Map<String, String> map = new HashMap<>(); map.put("key","value"); ```...
12,517,938
I have these 2 tables, ``` Student (Id, Name, DOB) School (Id, name) Table 3 (student.Id, School.Id, expiryDate) ``` I need to ADD, new student, new school and create new record for table 3) Is there a way I can do this through entity framework?
2012/09/20
[ "https://Stackoverflow.com/questions/12517938", "https://Stackoverflow.com", "https://Stackoverflow.com/users/214082/" ]
You can put the key-value in a map on `Java` side and access the same using `JSTL` on `JSP` page as below: **Prior java 1.7:** ``` Map<String, String> map = new HashMap<String, String>(); map.put("key","value"); ``` **Java 1.7 and above:** ``` Map<String, String> map = new HashMap<>(); map.put("key","value"); ```...
My five cents. Now I am working with EL 3.0 (jakarta impl) and I can access map value using three ways: ``` 1. ${map.someKey} 2. ${map['someKey']} 3. ${map[someVar]} //if someVar == 'someKey' ```
12,517,938
I have these 2 tables, ``` Student (Id, Name, DOB) School (Id, name) Table 3 (student.Id, School.Id, expiryDate) ``` I need to ADD, new student, new school and create new record for table 3) Is there a way I can do this through entity framework?
2012/09/20
[ "https://Stackoverflow.com/questions/12517938", "https://Stackoverflow.com", "https://Stackoverflow.com/users/214082/" ]
I have faced this issue before. This typically happens when the key is not a String. The fix is to cast the key to a String before using the key to get a value from the map Something like this: `<c:set var="keyString">${someKeyThatIsNotString}</c:set>` `<c:out value="${map[keyString]}"/>` Hope that helps
My five cents. Now I am working with EL 3.0 (jakarta impl) and I can access map value using three ways: ``` 1. ${map.someKey} 2. ${map['someKey']} 3. ${map[someVar]} //if someVar == 'someKey' ```
44,185,042
Let `long_text`, `keyword1` and `keyword2` be three `char*` pointers. `_keyword1_` and `_keyword2_` being two substrings of `long_text`. Using `strstr(long_text, keyword1)` I can get a `char*` which points to the first occurrence of `keyword1` in `long_text`, and using `strstr(long_text, keyword2)` I can get a `char*` ...
2017/05/25
[ "https://Stackoverflow.com/questions/44185042", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1264899/" ]
This is the part you are missing ``` // Move k1_start to end of keyword1 k1_start += strlen(keyword1); // Copy text from k1_start to k2_start char sub_string[32]; int len = k2_start - k1_start; strncpy(sub_string, k1_start, len); // Be sure to terminate the string sub_string[len] = '\0'; ```
``` void look_for_middle(const char *haystack, const char *needle1, const char *needle2) { const char *start; /* start of region between keywords */ const char *end; /* end of region between keywords */ const char *pos1; /* match needle1 within haystack */ const char *pos2; /* m...
44,185,042
Let `long_text`, `keyword1` and `keyword2` be three `char*` pointers. `_keyword1_` and `_keyword2_` being two substrings of `long_text`. Using `strstr(long_text, keyword1)` I can get a `char*` which points to the first occurrence of `keyword1` in `long_text`, and using `strstr(long_text, keyword2)` I can get a `char*` ...
2017/05/25
[ "https://Stackoverflow.com/questions/44185042", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1264899/" ]
Yeah.. This is C-like and uses `char *` and supporting char array. ``` #include <stdio.h> #include <string.h> int main(void) { char* long_text = "key1(text)key2"; char* keyword1 = "key1"; char* keyword2 = "key2"; char* k1 = strstr(long_text, keyword1); char* k2 = strstr(long_text, keyword2); ...
``` void look_for_middle(const char *haystack, const char *needle1, const char *needle2) { const char *start; /* start of region between keywords */ const char *end; /* end of region between keywords */ const char *pos1; /* match needle1 within haystack */ const char *pos2; /* m...
44,185,042
Let `long_text`, `keyword1` and `keyword2` be three `char*` pointers. `_keyword1_` and `_keyword2_` being two substrings of `long_text`. Using `strstr(long_text, keyword1)` I can get a `char*` which points to the first occurrence of `keyword1` in `long_text`, and using `strstr(long_text, keyword2)` I can get a `char*` ...
2017/05/25
[ "https://Stackoverflow.com/questions/44185042", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1264899/" ]
``` void look_for_middle(const char *haystack, const char *needle1, const char *needle2) { const char *start; /* start of region between keywords */ const char *end; /* end of region between keywords */ const char *pos1; /* match needle1 within haystack */ const char *pos2; /* m...
This function can do your job . . ``` char* strInner(char *long_text , char *keyword1 , char* keyword2) { char * a = strstr(long_text,keyword1); a+= strlen(keyword1); if(a==NULL) { cout<<"Keyword1 didn't found ! "; return a ; } char * b ...
44,185,042
Let `long_text`, `keyword1` and `keyword2` be three `char*` pointers. `_keyword1_` and `_keyword2_` being two substrings of `long_text`. Using `strstr(long_text, keyword1)` I can get a `char*` which points to the first occurrence of `keyword1` in `long_text`, and using `strstr(long_text, keyword2)` I can get a `char*` ...
2017/05/25
[ "https://Stackoverflow.com/questions/44185042", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1264899/" ]
This is the part you are missing ``` // Move k1_start to end of keyword1 k1_start += strlen(keyword1); // Copy text from k1_start to k2_start char sub_string[32]; int len = k2_start - k1_start; strncpy(sub_string, k1_start, len); // Be sure to terminate the string sub_string[len] = '\0'; ```
Yeah.. This is C-like and uses `char *` and supporting char array. ``` #include <stdio.h> #include <string.h> int main(void) { char* long_text = "key1(text)key2"; char* keyword1 = "key1"; char* keyword2 = "key2"; char* k1 = strstr(long_text, keyword1); char* k2 = strstr(long_text, keyword2); ...
44,185,042
Let `long_text`, `keyword1` and `keyword2` be three `char*` pointers. `_keyword1_` and `_keyword2_` being two substrings of `long_text`. Using `strstr(long_text, keyword1)` I can get a `char*` which points to the first occurrence of `keyword1` in `long_text`, and using `strstr(long_text, keyword2)` I can get a `char*` ...
2017/05/25
[ "https://Stackoverflow.com/questions/44185042", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1264899/" ]
This is the part you are missing ``` // Move k1_start to end of keyword1 k1_start += strlen(keyword1); // Copy text from k1_start to k2_start char sub_string[32]; int len = k2_start - k1_start; strncpy(sub_string, k1_start, len); // Be sure to terminate the string sub_string[len] = '\0'; ```
This function can do your job . . ``` char* strInner(char *long_text , char *keyword1 , char* keyword2) { char * a = strstr(long_text,keyword1); a+= strlen(keyword1); if(a==NULL) { cout<<"Keyword1 didn't found ! "; return a ; } char * b ...
44,185,042
Let `long_text`, `keyword1` and `keyword2` be three `char*` pointers. `_keyword1_` and `_keyword2_` being two substrings of `long_text`. Using `strstr(long_text, keyword1)` I can get a `char*` which points to the first occurrence of `keyword1` in `long_text`, and using `strstr(long_text, keyword2)` I can get a `char*` ...
2017/05/25
[ "https://Stackoverflow.com/questions/44185042", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1264899/" ]
Yeah.. This is C-like and uses `char *` and supporting char array. ``` #include <stdio.h> #include <string.h> int main(void) { char* long_text = "key1(text)key2"; char* keyword1 = "key1"; char* keyword2 = "key2"; char* k1 = strstr(long_text, keyword1); char* k2 = strstr(long_text, keyword2); ...
This function can do your job . . ``` char* strInner(char *long_text , char *keyword1 , char* keyword2) { char * a = strstr(long_text,keyword1); a+= strlen(keyword1); if(a==NULL) { cout<<"Keyword1 didn't found ! "; return a ; } char * b ...
293,532
People who don't understand Terminal are often afraid to use it for fear that they might mess up their command and crash their computer. Those who know Terminal better know that that's not the case - usually Terminal will just output an error. But are there actually commands that will crash your computer? WARNING: yo...
2017/07/31
[ "https://apple.stackexchange.com/questions/293532", "https://apple.stackexchange.com", "https://apple.stackexchange.com/users/234283/" ]
Modern macOS makes it *really* hard to crash your machine as an unprivileged user (i.e. without using `sudo`), because UNIX systems are meant to handle thousands of users without letting any of them break the whole system. So, thankfully, you'll usually have to be prompted before you do something that destroys your mac...
``` sudo kill -9 -1 ``` I accidently performed a `kill -9 -1` in a perl-script, running as root. That was as fast, as pulling the power-cord. On reboot, the server made a filesystem-check and continued running properly. I never tried that `sudo kill -9 -1` command on the commandline. It might not work, because the...
293,532
People who don't understand Terminal are often afraid to use it for fear that they might mess up their command and crash their computer. Those who know Terminal better know that that's not the case - usually Terminal will just output an error. But are there actually commands that will crash your computer? WARNING: yo...
2017/07/31
[ "https://apple.stackexchange.com/questions/293532", "https://apple.stackexchange.com", "https://apple.stackexchange.com/users/234283/" ]
Causing a kernel panic is a more akin to crashing than the other answers I've seen here thus far: ``` sudo dtrace -w -n "BEGIN{ panic();}" ``` (code taken from [here](https://stackoverflow.com/a/8829277/2636454) and [also found in Apple's own documentation](https://developer.apple.com/library/content/technotes/tn200...
Another one you can do (that I have done by mistake before) is: ``` sudo chmod 0 / ``` This will render your entire file system (which means all commands and programs) unaccessible...except by the root user. This means you would need to log in directly as the root user and restore the file system, BUT you are unable...
293,532
People who don't understand Terminal are often afraid to use it for fear that they might mess up their command and crash their computer. Those who know Terminal better know that that's not the case - usually Terminal will just output an error. But are there actually commands that will crash your computer? WARNING: yo...
2017/07/31
[ "https://apple.stackexchange.com/questions/293532", "https://apple.stackexchange.com", "https://apple.stackexchange.com/users/234283/" ]
Suppose you don't know what your doing and attempting to do a backup of some hard drive ``` dd if=/dev/disk1 of=/dev/disk2 ``` Well if you mix those up (switch if and of), it will overwrite the fresh data with old data, no questions asked. Similar mix ups can happen with archive utils. And frankly with most comma...
Modern macOS makes it *really* hard to crash your machine as an unprivileged user (i.e. without using `sudo`), because UNIX systems are meant to handle thousands of users without letting any of them break the whole system. So, thankfully, you'll usually have to be prompted before you do something that destroys your mac...
293,532
People who don't understand Terminal are often afraid to use it for fear that they might mess up their command and crash their computer. Those who know Terminal better know that that's not the case - usually Terminal will just output an error. But are there actually commands that will crash your computer? WARNING: yo...
2017/07/31
[ "https://apple.stackexchange.com/questions/293532", "https://apple.stackexchange.com", "https://apple.stackexchange.com/users/234283/" ]
Modern macOS makes it *really* hard to crash your machine as an unprivileged user (i.e. without using `sudo`), because UNIX systems are meant to handle thousands of users without letting any of them break the whole system. So, thankfully, you'll usually have to be prompted before you do something that destroys your mac...
I am only a bash beginner, but you could use something like this: `while True; do COMMAND; done;` Most people would try to use Ctrl+C to stop the command, not the external process (Ctrl+Z, which then need to be killed). If the command in the `while True` loop is a resource-intensive operation (such as multiplying la...
293,532
People who don't understand Terminal are often afraid to use it for fear that they might mess up their command and crash their computer. Those who know Terminal better know that that's not the case - usually Terminal will just output an error. But are there actually commands that will crash your computer? WARNING: yo...
2017/07/31
[ "https://apple.stackexchange.com/questions/293532", "https://apple.stackexchange.com", "https://apple.stackexchange.com/users/234283/" ]
Suppose you don't know what your doing and attempting to do a backup of some hard drive ``` dd if=/dev/disk1 of=/dev/disk2 ``` Well if you mix those up (switch if and of), it will overwrite the fresh data with old data, no questions asked. Similar mix ups can happen with archive utils. And frankly with most comma...
Surely you still can cause a system crash using commands entered with Terminal. With years it's getting harder probably due to all kinds of limits and protective measures applied but as Murphy's-like law states: "Nothing is foolproof to a sufficiently capable fool." "Fork bombs" and all that `rm -rf` script kiddies s...