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 |
|---|---|---|---|---|---|
226,599 | So I have xml that looks like this:
```html
<todo-list>
<id type="integer">#{id}</id>
<name>#{name}</name>
<description>#{description}</description>
<project-id type="integer">#{project_id}</project-id>
<milestone-id type="integer">#{milestone_id}</milestone-id>
<position type="integer">#{position}</positi... | 2008/10/22 | [
"https://Stackoverflow.com/questions/226599",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/9401/"
] | Boils down to using xsd.exe from tools in VS:
```
xsd.exe "%xsdFile%" /c /out:"%outDirectory%" /l:"%language%"
```
Then load it with reader and deserializer:
```
public GeneratedClassFromXSD GetObjectFromXML()
{
var settings = new XmlReaderSettings();
var obj = new GeneratedClassFromXSD();
var reader = ... | Checkout <http://xsd2code.codeplex.com/>
Xsd2Code is a CSharp or Visual Basic Business Entity class Generator from XSD schema. |
226,599 | So I have xml that looks like this:
```html
<todo-list>
<id type="integer">#{id}</id>
<name>#{name}</name>
<description>#{description}</description>
<project-id type="integer">#{project_id}</project-id>
<milestone-id type="integer">#{milestone_id}</milestone-id>
<position type="integer">#{position}</positi... | 2008/10/22 | [
"https://Stackoverflow.com/questions/226599",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/9401/"
] | Deserialize any object, as long as the type `T` is marked Serializable:
```
function T Deserialize<T>(string serializedResults)
{
var serializer = new XmlSerializer(typeof(T));
using (var stringReader = new StringReader(serializedResults))
return (T)serializer.Deserialize(stringReader);
}
``` | Checkout <http://xsd2code.codeplex.com/>
Xsd2Code is a CSharp or Visual Basic Business Entity class Generator from XSD schema. |
226,599 | So I have xml that looks like this:
```html
<todo-list>
<id type="integer">#{id}</id>
<name>#{name}</name>
<description>#{description}</description>
<project-id type="integer">#{project_id}</project-id>
<milestone-id type="integer">#{milestone_id}</milestone-id>
<position type="integer">#{position}</positi... | 2008/10/22 | [
"https://Stackoverflow.com/questions/226599",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/9401/"
] | Create a class for each element that has a property for each element and a List or Array of objects (use the created one) for each child element. Then call System.Xml.Serialization.XmlSerializer.Deserialize on the string and cast the result as your object. Use the System.Xml.Serialization attributes to make adjustments... | Boils down to using xsd.exe from tools in VS:
```
xsd.exe "%xsdFile%" /c /out:"%outDirectory%" /l:"%language%"
```
Then load it with reader and deserializer:
```
public GeneratedClassFromXSD GetObjectFromXML()
{
var settings = new XmlReaderSettings();
var obj = new GeneratedClassFromXSD();
var reader = ... |
226,599 | So I have xml that looks like this:
```html
<todo-list>
<id type="integer">#{id}</id>
<name>#{name}</name>
<description>#{description}</description>
<project-id type="integer">#{project_id}</project-id>
<milestone-id type="integer">#{milestone_id}</milestone-id>
<position type="integer">#{position}</positi... | 2008/10/22 | [
"https://Stackoverflow.com/questions/226599",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/9401/"
] | Boils down to using xsd.exe from tools in VS:
```
xsd.exe "%xsdFile%" /c /out:"%outDirectory%" /l:"%language%"
```
Then load it with reader and deserializer:
```
public GeneratedClassFromXSD GetObjectFromXML()
{
var settings = new XmlReaderSettings();
var obj = new GeneratedClassFromXSD();
var reader = ... | i had the same questions few years back that how abt mapping xml to C# classes or creating C# classes which are mapped to our XMLs, jst like we do in entity Framework (we map tables to C# classes). I created a framework finally, which can create C# classes out of your XML and these classes can be used to read/write you... |
226,599 | So I have xml that looks like this:
```html
<todo-list>
<id type="integer">#{id}</id>
<name>#{name}</name>
<description>#{description}</description>
<project-id type="integer">#{project_id}</project-id>
<milestone-id type="integer">#{milestone_id}</milestone-id>
<position type="integer">#{position}</positi... | 2008/10/22 | [
"https://Stackoverflow.com/questions/226599",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/9401/"
] | Create a class for each element that has a property for each element and a List or Array of objects (use the created one) for each child element. Then call System.Xml.Serialization.XmlSerializer.Deserialize on the string and cast the result as your object. Use the System.Xml.Serialization attributes to make adjustments... | Checkout <http://xsd2code.codeplex.com/>
Xsd2Code is a CSharp or Visual Basic Business Entity class Generator from XSD schema. |
226,599 | So I have xml that looks like this:
```html
<todo-list>
<id type="integer">#{id}</id>
<name>#{name}</name>
<description>#{description}</description>
<project-id type="integer">#{project_id}</project-id>
<milestone-id type="integer">#{milestone_id}</milestone-id>
<position type="integer">#{position}</positi... | 2008/10/22 | [
"https://Stackoverflow.com/questions/226599",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/9401/"
] | Create a class for each element that has a property for each element and a List or Array of objects (use the created one) for each child element. Then call System.Xml.Serialization.XmlSerializer.Deserialize on the string and cast the result as your object. Use the System.Xml.Serialization attributes to make adjustments... | Well, you'd have to have classes in your assembly that match, roughly, the XML (property called Private, a collection property called ToDo, etc).
The problem is that **the XML has elements that are invalid for class names**. So you'd have to implement IXmlSerializable in these classes to control how they are serialize... |
55,390,770 | I am trying to write a simple express/node.js app that responds to GET requests using data found in a csv file. I would like to read this csv file to generate a javascript object (essentially a key-value mapping), and then make that generated map available for the HTTP request handling logic in the controller.
I wrote... | 2019/03/28 | [
"https://Stackoverflow.com/questions/55390770",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11270096/"
] | How about ensuring http object listens after the file is loaded into memory:
```js
// server.js
var myMap = {};
function readCsv(cb){
fs.createReadStream('filename.csv')
.pipe(csv())
.on('data', (row) => {
// Build javascript object
myMap[row['key']] = row['value'];
})
.on('end', () => {
cons... | In order to meet both of your goals, you can include the code in the app.js file. App.js only runs when the express server starts. It doesn't reload on page refresh. You can run app.listen after the readstream ends.
```
var myMap = {};
fs.createReadStream('filename.csv')
.pipe(csv())
.on('data', (row) => {
... |
55,390,770 | I am trying to write a simple express/node.js app that responds to GET requests using data found in a csv file. I would like to read this csv file to generate a javascript object (essentially a key-value mapping), and then make that generated map available for the HTTP request handling logic in the controller.
I wrote... | 2019/03/28 | [
"https://Stackoverflow.com/questions/55390770",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11270096/"
] | How about ensuring http object listens after the file is loaded into memory:
```js
// server.js
var myMap = {};
function readCsv(cb){
fs.createReadStream('filename.csv')
.pipe(csv())
.on('data', (row) => {
// Build javascript object
myMap[row['key']] = row['value'];
})
.on('end', () => {
cons... | I would look for more synchronous way to read file and handle http request. Here is sample code of what it should look like,
```
import fs from 'fs';
async function processCSV() {
try {
let map = await readCsv();
//handle http request in another function with same async await way
let http ... |
55,390,770 | I am trying to write a simple express/node.js app that responds to GET requests using data found in a csv file. I would like to read this csv file to generate a javascript object (essentially a key-value mapping), and then make that generated map available for the HTTP request handling logic in the controller.
I wrote... | 2019/03/28 | [
"https://Stackoverflow.com/questions/55390770",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11270096/"
] | How about ensuring http object listens after the file is loaded into memory:
```js
// server.js
var myMap = {};
function readCsv(cb){
fs.createReadStream('filename.csv')
.pipe(csv())
.on('data', (row) => {
// Build javascript object
myMap[row['key']] = row['value'];
})
.on('end', () => {
cons... | **Update:**
use <https://csv.js.org/parse/>
Below one is deprecated, not maintained anymore.
**Deprecated:**
Hi I have created an npm package to read CSV synchronously or as a promise :
<https://www.npmjs.com/package/csv-parser-sync-plus-promise>
**Description:**
**csv-parser-sync-plus-promise**
A module to re... |
55,390,770 | I am trying to write a simple express/node.js app that responds to GET requests using data found in a csv file. I would like to read this csv file to generate a javascript object (essentially a key-value mapping), and then make that generated map available for the HTTP request handling logic in the controller.
I wrote... | 2019/03/28 | [
"https://Stackoverflow.com/questions/55390770",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11270096/"
] | I would look for more synchronous way to read file and handle http request. Here is sample code of what it should look like,
```
import fs from 'fs';
async function processCSV() {
try {
let map = await readCsv();
//handle http request in another function with same async await way
let http ... | In order to meet both of your goals, you can include the code in the app.js file. App.js only runs when the express server starts. It doesn't reload on page refresh. You can run app.listen after the readstream ends.
```
var myMap = {};
fs.createReadStream('filename.csv')
.pipe(csv())
.on('data', (row) => {
... |
55,390,770 | I am trying to write a simple express/node.js app that responds to GET requests using data found in a csv file. I would like to read this csv file to generate a javascript object (essentially a key-value mapping), and then make that generated map available for the HTTP request handling logic in the controller.
I wrote... | 2019/03/28 | [
"https://Stackoverflow.com/questions/55390770",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11270096/"
] | I would look for more synchronous way to read file and handle http request. Here is sample code of what it should look like,
```
import fs from 'fs';
async function processCSV() {
try {
let map = await readCsv();
//handle http request in another function with same async await way
let http ... | **Update:**
use <https://csv.js.org/parse/>
Below one is deprecated, not maintained anymore.
**Deprecated:**
Hi I have created an npm package to read CSV synchronously or as a promise :
<https://www.npmjs.com/package/csv-parser-sync-plus-promise>
**Description:**
**csv-parser-sync-plus-promise**
A module to re... |
17,205,224 | In UINavigationController this is child controller
```
.h
@protocol childProtocol <NSObject>
-(void)childMethod:(NSArray*)params;
@end
@property (strong, nonatomic) id<childProtocol>childDelegate;
@property (weak, nonatomic) parentVC *pVC;
```
---
```
.m
if([self.childDelegate respondsToSelector:@selector(ch... | 2013/06/20 | [
"https://Stackoverflow.com/questions/17205224",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1382104/"
] | This is child controller.h
```
@protocol childProtocol <NSObject>
-(void)childMethod:(NSArray*)params;
@end
@property (strong, nonatomic) id<childProtocol>childDelegate;
@property (weak, nonatomic) parentVC *pVC;
```
.m
```
if([self.childDelegate respondsToSelector:@selector(childMethod:)]) {
[self.chi... | First of all, you are not checking for the same selector as you declared in your protocol declaration so it won't respond to that. You declared the method `childMethod:` whereas you are checking if your childDelegate responds to `myMethod:` selector which does not so it won't go into the if condition.
Also the parent ... |
17,205,224 | In UINavigationController this is child controller
```
.h
@protocol childProtocol <NSObject>
-(void)childMethod:(NSArray*)params;
@end
@property (strong, nonatomic) id<childProtocol>childDelegate;
@property (weak, nonatomic) parentVC *pVC;
```
---
```
.m
if([self.childDelegate respondsToSelector:@selector(ch... | 2013/06/20 | [
"https://Stackoverflow.com/questions/17205224",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1382104/"
] | Try this. Check the sample project attached
**ParentViewController.h**
```
#import <UIKit/UIKit.h>
@interface ParentViewController : UIViewController
- (void)passData:(NSString *)strText;
@end
```
**ParentViewController.m**
```
- (IBAction)btnGoToSecondView:(id)sender {
ChildViewController *secondVC = [[Chi... | This is child controller.h
```
@protocol childProtocol <NSObject>
-(void)childMethod:(NSArray*)params;
@end
@property (strong, nonatomic) id<childProtocol>childDelegate;
@property (weak, nonatomic) parentVC *pVC;
```
.m
```
if([self.childDelegate respondsToSelector:@selector(childMethod:)]) {
[self.chi... |
17,205,224 | In UINavigationController this is child controller
```
.h
@protocol childProtocol <NSObject>
-(void)childMethod:(NSArray*)params;
@end
@property (strong, nonatomic) id<childProtocol>childDelegate;
@property (weak, nonatomic) parentVC *pVC;
```
---
```
.m
if([self.childDelegate respondsToSelector:@selector(ch... | 2013/06/20 | [
"https://Stackoverflow.com/questions/17205224",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1382104/"
] | Try this. Check the sample project attached
**ParentViewController.h**
```
#import <UIKit/UIKit.h>
@interface ParentViewController : UIViewController
- (void)passData:(NSString *)strText;
@end
```
**ParentViewController.m**
```
- (IBAction)btnGoToSecondView:(id)sender {
ChildViewController *secondVC = [[Chi... | First of all, you are not checking for the same selector as you declared in your protocol declaration so it won't respond to that. You declared the method `childMethod:` whereas you are checking if your childDelegate responds to `myMethod:` selector which does not so it won't go into the if condition.
Also the parent ... |
8,618,264 | I'm dealing with user subscriptions.
A user creates a recurring subscription. Many things can happen to that subscription, such as it is renewed, or it's canceled, or the latest billing was unsuccessful, or the user has paused or restarted with subscription.
Do you suggest:
1. Having one `subscriptions` record for e... | 2011/12/23 | [
"https://Stackoverflow.com/questions/8618264",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/248220/"
] | Don't go for 1. It's not flexible enough for new events. You don't want a design where you need to alter the table every time a new event comes along. You would also need columns for each event date and it just starts getting ugly when you want to know the order of things.
Also what happens when a user can have multip... | It comes down to the `intention` of the `design`. Here are some out of many---many---approaches to take:
You could use a history table:
```sql
-- stores info re:reason for the last update of a subscription
CREATE TABLE subscription_history (
subscription_id INT
, change_date DATETIME
, change_reason VAR... |
24,121,287 | Anybody knows how to make BUNDLE INSTALL Cache'ing work in latest DOCKER release?
I've tried so far:
```
1.
WORKDIR /tmp
ADD ./Gemfile Gemfile
ADD ./Gemfile.lock Gemfile.lock
RUN bundle install
2.
ADD . opt/railsapp/
WORKIDR opt/rails/app
RUN bundle install
```
None of them work, it still runs "BUNDE INSTALL" eve... | 2014/06/09 | [
"https://Stackoverflow.com/questions/24121287",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3647232/"
] | Each time you change any file in your local app directory, the cache will be wiped out, forcing every step afterwards to be re-run, including the last `bundle install`.
The solution is don't run `bundle install` in step 2. You have already installed your gems in step 1 and there is little chance the Gemfile will chang... | Versions of Docker before 0.9.1 did not cache ADD instructions. Can you check that you're running a version of Docker 0.9.1 or greater?
Also, which installation of Docker are you using? According to [this GitHub issue](https://github.com/dotcloud/docker/issues/5053), some users have experienced cache-busting ADD behav... |
24,121,287 | Anybody knows how to make BUNDLE INSTALL Cache'ing work in latest DOCKER release?
I've tried so far:
```
1.
WORKDIR /tmp
ADD ./Gemfile Gemfile
ADD ./Gemfile.lock Gemfile.lock
RUN bundle install
2.
ADD . opt/railsapp/
WORKIDR opt/rails/app
RUN bundle install
```
None of them work, it still runs "BUNDE INSTALL" eve... | 2014/06/09 | [
"https://Stackoverflow.com/questions/24121287",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3647232/"
] | Each time you change any file in your local app directory, the cache will be wiped out, forcing every step afterwards to be re-run, including the last `bundle install`.
The solution is don't run `bundle install` in step 2. You have already installed your gems in step 1 and there is little chance the Gemfile will chang... | ADD caching is based on all the metadata of the file, not just the contents.
if you are running `docker build` in a CI-like environment with a fresh checkout, then it is possible the timestamps of the files are being updated which would invalidate the cache. |
27,687 | Paypal offer [Automatic Billing Buttons](https://merchant.paypal.com/us/cgi-bin/?cmd=_render-content&content_ID=developer/e_howto_html_autobill_buttons#id105ED800NBF) which allow regular billing for different amounts. After a couple of hours googling I cannot find how to access this functionality using the API, so that... | 2012/03/23 | [
"https://webmasters.stackexchange.com/questions/27687",
"https://webmasters.stackexchange.com",
"https://webmasters.stackexchange.com/users/13862/"
] | [This is the API documentation for creating recurring payments](https://cms.paypal.com/us/cgi-bin/?cmd=_render-content&content_ID=developer/e_howto_api_nvp_r_CreateRecurringPayments)
Another useful page is here on [handling recurring payments.](https://cms.paypal.com/us/cgi-bin/?cmd=_render-content&content_ID=develope... | Paypal have confirmed that this is not possible via the API :( |
27,687 | Paypal offer [Automatic Billing Buttons](https://merchant.paypal.com/us/cgi-bin/?cmd=_render-content&content_ID=developer/e_howto_html_autobill_buttons#id105ED800NBF) which allow regular billing for different amounts. After a couple of hours googling I cannot find how to access this functionality using the API, so that... | 2012/03/23 | [
"https://webmasters.stackexchange.com/questions/27687",
"https://webmasters.stackexchange.com",
"https://webmasters.stackexchange.com/users/13862/"
] | Take a look at PayPal [Reference Transactions](https://developer.paypal.com/docs/classic/express-checkout/integration-guide/ECReferenceTxns/). It appears it does exactly what "Automatic Billing" does (i.e. automated regular billing for different amounts), but you can do it all through API's. | [This is the API documentation for creating recurring payments](https://cms.paypal.com/us/cgi-bin/?cmd=_render-content&content_ID=developer/e_howto_api_nvp_r_CreateRecurringPayments)
Another useful page is here on [handling recurring payments.](https://cms.paypal.com/us/cgi-bin/?cmd=_render-content&content_ID=develope... |
27,687 | Paypal offer [Automatic Billing Buttons](https://merchant.paypal.com/us/cgi-bin/?cmd=_render-content&content_ID=developer/e_howto_html_autobill_buttons#id105ED800NBF) which allow regular billing for different amounts. After a couple of hours googling I cannot find how to access this functionality using the API, so that... | 2012/03/23 | [
"https://webmasters.stackexchange.com/questions/27687",
"https://webmasters.stackexchange.com",
"https://webmasters.stackexchange.com/users/13862/"
] | Doing it with the API is pretty much the same as doing it through a button. By default, PayPal is going to bill the same amount. This is the most common type of recurring payment, and also PayPal only has the fixed amount specified during the creation of the recurring payment.
PayPal can be very convenient, but it's n... | Paypal have confirmed that this is not possible via the API :( |
27,687 | Paypal offer [Automatic Billing Buttons](https://merchant.paypal.com/us/cgi-bin/?cmd=_render-content&content_ID=developer/e_howto_html_autobill_buttons#id105ED800NBF) which allow regular billing for different amounts. After a couple of hours googling I cannot find how to access this functionality using the API, so that... | 2012/03/23 | [
"https://webmasters.stackexchange.com/questions/27687",
"https://webmasters.stackexchange.com",
"https://webmasters.stackexchange.com/users/13862/"
] | Take a look at PayPal [Reference Transactions](https://developer.paypal.com/docs/classic/express-checkout/integration-guide/ECReferenceTxns/). It appears it does exactly what "Automatic Billing" does (i.e. automated regular billing for different amounts), but you can do it all through API's. | Paypal have confirmed that this is not possible via the API :( |
27,687 | Paypal offer [Automatic Billing Buttons](https://merchant.paypal.com/us/cgi-bin/?cmd=_render-content&content_ID=developer/e_howto_html_autobill_buttons#id105ED800NBF) which allow regular billing for different amounts. After a couple of hours googling I cannot find how to access this functionality using the API, so that... | 2012/03/23 | [
"https://webmasters.stackexchange.com/questions/27687",
"https://webmasters.stackexchange.com",
"https://webmasters.stackexchange.com/users/13862/"
] | Take a look at PayPal [Reference Transactions](https://developer.paypal.com/docs/classic/express-checkout/integration-guide/ECReferenceTxns/). It appears it does exactly what "Automatic Billing" does (i.e. automated regular billing for different amounts), but you can do it all through API's. | Doing it with the API is pretty much the same as doing it through a button. By default, PayPal is going to bill the same amount. This is the most common type of recurring payment, and also PayPal only has the fixed amount specified during the creation of the recurring payment.
PayPal can be very convenient, but it's n... |
8,401,631 | Any idea on how to create a decision tree stump for use with boosting in Matlab? I mean is there some parameter I can send to classregtree to make sure i end up with only 1 level? I tried pruning and it doesn't always give a stump (single cut). Sometimes I was only able to get 2 cuts (unbalanced tree).
I'm aware of th... | 2011/12/06 | [
"https://Stackoverflow.com/questions/8401631",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/175843/"
] | I believe you can just set the `minparent` parameter equal to your number of observations. Using the iris example data:
```
>> load fisheriris;
>> t = classregtree(meas,species,...
'names',{'SL' 'SW' 'PL' 'PW'}, 'minparent', 150)
t =
Decision tree for classification
1 if PL<2.45 then node 2 elseif... | If `t1` is your tree, as returned by `classregtree`, I think you can create a decision stump `t2` with the command
```
t2 = prune(t1, 'level', max(prunelist(t1)-1));
```
Does that do what you need? |
70,816,347 | I started learning App development in Android Studio, using the Flutter UI toolkit. Everything seems fine, however when i want to create a **New Image Asset** to edit my app's icon, i can't find it. When i right-click the *android/app/src/main/res* folder, it does not appear within *New*. I am following some older tuto... | 2022/01/22 | [
"https://Stackoverflow.com/questions/70816347",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/17460377/"
] | Does it work for you? If that doesn't work, try right-clicking the drawable folder and selecting "New" -> "Image Asset".
[](https://i.stack.imgur.com/3MTuH.png)
[](https://i.stack.imgur.com/oo0gL.png) | Ah, I've seen this before as you're using Flutter. Despite all the answers, I'd recommend you to right-click the `android/` folder from your Flutter app root and select **Mark as... > Project Root**, then close and reopen the project in Android Studio.
If Android finally recognizes this as an Android project, it will ... |
70,816,347 | I started learning App development in Android Studio, using the Flutter UI toolkit. Everything seems fine, however when i want to create a **New Image Asset** to edit my app's icon, i can't find it. When i right-click the *android/app/src/main/res* folder, it does not appear within *New*. I am following some older tuto... | 2022/01/22 | [
"https://Stackoverflow.com/questions/70816347",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/17460377/"
] | Does it work for you? If that doesn't work, try right-clicking the drawable folder and selecting "New" -> "Image Asset".
[](https://i.stack.imgur.com/3MTuH.png)
[](https://i.stack.imgur.com/oo0gL.png) | Update To Latest Version Frist.
Android Studio Dolphin | 2021.3.1 Patch 1
Visit <https://developer.android.com/> And Download Manually And Install.
After You Can Find Res/New\_resources\_deirectory/midmap
It's Very Simple.
#Android\_Studio |
70,816,347 | I started learning App development in Android Studio, using the Flutter UI toolkit. Everything seems fine, however when i want to create a **New Image Asset** to edit my app's icon, i can't find it. When i right-click the *android/app/src/main/res* folder, it does not appear within *New*. I am following some older tuto... | 2022/01/22 | [
"https://Stackoverflow.com/questions/70816347",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/17460377/"
] | Does it work for you? If that doesn't work, try right-clicking the drawable folder and selecting "New" -> "Image Asset".
[](https://i.stack.imgur.com/3MTuH.png)
[](https://i.stack.imgur.com/oo0gL.png) | I got it to come up when I right click on the root node of the project (a flutter project) and selected `flutter` -> `Open Android module in Android Studio`
Then I was able to right click the `res` folder and clicked on `new` -> `Image Asset` |
70,816,347 | I started learning App development in Android Studio, using the Flutter UI toolkit. Everything seems fine, however when i want to create a **New Image Asset** to edit my app's icon, i can't find it. When i right-click the *android/app/src/main/res* folder, it does not appear within *New*. I am following some older tuto... | 2022/01/22 | [
"https://Stackoverflow.com/questions/70816347",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/17460377/"
] | Does it work for you? If that doesn't work, try right-clicking the drawable folder and selecting "New" -> "Image Asset".
[](https://i.stack.imgur.com/3MTuH.png)
[](https://i.stack.imgur.com/oo0gL.png) | For **Flutter** users: If you created the Android project via `flutter create`, make sure to open the Android Studio project in the `android` subfolder, not the one in the root folder. Then, Android Studio should automatically run gradle. Once this has finished (which can take quite some time on the first run), the And... |
70,816,347 | I started learning App development in Android Studio, using the Flutter UI toolkit. Everything seems fine, however when i want to create a **New Image Asset** to edit my app's icon, i can't find it. When i right-click the *android/app/src/main/res* folder, it does not appear within *New*. I am following some older tuto... | 2022/01/22 | [
"https://Stackoverflow.com/questions/70816347",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/17460377/"
] | Try to do the following:
Right click on `res` directory -> Choose `Mark Directory as` -> `Resources root`
[](https://i.stack.imgur.com/C6V0J.png)
If it is not working, try to change file view to `Android`:
[![enter image descr... | Ah, I've seen this before as you're using Flutter. Despite all the answers, I'd recommend you to right-click the `android/` folder from your Flutter app root and select **Mark as... > Project Root**, then close and reopen the project in Android Studio.
If Android finally recognizes this as an Android project, it will ... |
70,816,347 | I started learning App development in Android Studio, using the Flutter UI toolkit. Everything seems fine, however when i want to create a **New Image Asset** to edit my app's icon, i can't find it. When i right-click the *android/app/src/main/res* folder, it does not appear within *New*. I am following some older tuto... | 2022/01/22 | [
"https://Stackoverflow.com/questions/70816347",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/17460377/"
] | Try to do the following:
Right click on `res` directory -> Choose `Mark Directory as` -> `Resources root`
[](https://i.stack.imgur.com/C6V0J.png)
If it is not working, try to change file view to `Android`:
[![enter image descr... | Update To Latest Version Frist.
Android Studio Dolphin | 2021.3.1 Patch 1
Visit <https://developer.android.com/> And Download Manually And Install.
After You Can Find Res/New\_resources\_deirectory/midmap
It's Very Simple.
#Android\_Studio |
70,816,347 | I started learning App development in Android Studio, using the Flutter UI toolkit. Everything seems fine, however when i want to create a **New Image Asset** to edit my app's icon, i can't find it. When i right-click the *android/app/src/main/res* folder, it does not appear within *New*. I am following some older tuto... | 2022/01/22 | [
"https://Stackoverflow.com/questions/70816347",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/17460377/"
] | Try to do the following:
Right click on `res` directory -> Choose `Mark Directory as` -> `Resources root`
[](https://i.stack.imgur.com/C6V0J.png)
If it is not working, try to change file view to `Android`:
[![enter image descr... | I got it to come up when I right click on the root node of the project (a flutter project) and selected `flutter` -> `Open Android module in Android Studio`
Then I was able to right click the `res` folder and clicked on `new` -> `Image Asset` |
70,816,347 | I started learning App development in Android Studio, using the Flutter UI toolkit. Everything seems fine, however when i want to create a **New Image Asset** to edit my app's icon, i can't find it. When i right-click the *android/app/src/main/res* folder, it does not appear within *New*. I am following some older tuto... | 2022/01/22 | [
"https://Stackoverflow.com/questions/70816347",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/17460377/"
] | Try to do the following:
Right click on `res` directory -> Choose `Mark Directory as` -> `Resources root`
[](https://i.stack.imgur.com/C6V0J.png)
If it is not working, try to change file view to `Android`:
[![enter image descr... | For **Flutter** users: If you created the Android project via `flutter create`, make sure to open the Android Studio project in the `android` subfolder, not the one in the root folder. Then, Android Studio should automatically run gradle. Once this has finished (which can take quite some time on the first run), the And... |
18,166,563 | I got a calculator like program
If the user enters 1 they can add, 2 to subtract, 3 to multiply and 4 to divide
I got functions named
```
add
subtract
multiply
divide
```
By using switch case, if the user enters 1 it has to go to the add function
2 to subtract, 3 to multiply and... | 2013/08/10 | [
"https://Stackoverflow.com/questions/18166563",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2669045/"
] | Do you really need to use functions? This seems pretty straight forward:
```
switch (Choice)
{
case 1:
c = a + b;
break;
...
default:
Console.WriteLine("Invalid choice");
break;
}
```
But if you really do want to use functions, just define them outside of your `Main` metho... | Just call you function and return the result :
```
static void Main()
{
Console.WriteLine("Enter any number");
int a = Convert.ToInt32(ConsoleReadLine());
Console.WriteLine("Enter any number");
int b = Convert.ToInt32(ConsoleReadLine());
int c;
Console.Wri... |
18,166,563 | I got a calculator like program
If the user enters 1 they can add, 2 to subtract, 3 to multiply and 4 to divide
I got functions named
```
add
subtract
multiply
divide
```
By using switch case, if the user enters 1 it has to go to the add function
2 to subtract, 3 to multiply and... | 2013/08/10 | [
"https://Stackoverflow.com/questions/18166563",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2669045/"
] | Do you really need to use functions? This seems pretty straight forward:
```
switch (Choice)
{
case 1:
c = a + b;
break;
...
default:
Console.WriteLine("Invalid choice");
break;
}
```
But if you really do want to use functions, just define them outside of your `Main` metho... | you should just call the add function in switch case
```
switch (Choice)
case 1:
add();
break;
//and so forth.
public void add()
{
c = a + b;
// similar codes for subtraction,multiplicat... |
18,166,563 | I got a calculator like program
If the user enters 1 they can add, 2 to subtract, 3 to multiply and 4 to divide
I got functions named
```
add
subtract
multiply
divide
```
By using switch case, if the user enters 1 it has to go to the add function
2 to subtract, 3 to multiply and... | 2013/08/10 | [
"https://Stackoverflow.com/questions/18166563",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2669045/"
] | Just call you function and return the result :
```
static void Main()
{
Console.WriteLine("Enter any number");
int a = Convert.ToInt32(ConsoleReadLine());
Console.WriteLine("Enter any number");
int b = Convert.ToInt32(ConsoleReadLine());
int c;
Console.Wri... | you should just call the add function in switch case
```
switch (Choice)
case 1:
add();
break;
//and so forth.
public void add()
{
c = a + b;
// similar codes for subtraction,multiplicat... |
110,344 | Not sure if this is my dishwasher or my clogged drains. A few years back, my dishwasher stopped draining; I called my neighbor, I tried all home remedies, my neighbor took the Bosch dishwasher apart and the hose inside was full of grease, so much that there was no way we could clean it. I ordered another one and replac... | 2017/03/15 | [
"https://diy.stackexchange.com/questions/110344",
"https://diy.stackexchange.com",
"https://diy.stackexchange.com/users/67500/"
] | First, check and clean the drain filter in your dishwasher. This is a screen that can be pulled out from inside the dishwasher, designed to prevent food particles from getting sucked into the washing and drainage systems. Consult your manual for detailed instructions. This is something everyone should do regularly (eve... | Here's a trick that will keep your drain hose, drain, and dishwasher free of repeated blockage. Place a coffee cup upright in the back of your dishwasher lower rack, Fill it full of white vinegar and leave it there for two weeks and then refill it and repeat. As the vinegar releases it cleans everything. Also check to ... |
140,021 | I have some question in closing port, I think I got some strange things.
When I use execute
```
nmap --top-ports 10 192.168.1.1
```
it shows that 23/TCP port is open.
But when I execute
```
nmap --top-ports 10 localhost
```
it show that 23/tcp port is closed.
Which of them is true? I want to close this port on... | 2014/06/30 | [
"https://unix.stackexchange.com/questions/140021",
"https://unix.stackexchange.com",
"https://unix.stackexchange.com/users/74080/"
] | A Linux system has a so called loopback interface, which is for internal communication. Its hostname is `localhost` and its IP address is `127.0.0.1`.
When you run `nmap` on `localhost`, you actually run the portscan on the **virtual** loopback interface. `192.168.1.1` is the IP address of your **physical** (most like... | If you do `nmap localhost`, it tells you about a different situation: some programs on linux work as server although they are used only locally. This is because other programs use them like a server they connect to. **So both answers are true, since you ask something different.**
Port 23 is used for telnet. Normally n... |
140,021 | I have some question in closing port, I think I got some strange things.
When I use execute
```
nmap --top-ports 10 192.168.1.1
```
it shows that 23/TCP port is open.
But when I execute
```
nmap --top-ports 10 localhost
```
it show that 23/tcp port is closed.
Which of them is true? I want to close this port on... | 2014/06/30 | [
"https://unix.stackexchange.com/questions/140021",
"https://unix.stackexchange.com",
"https://unix.stackexchange.com/users/74080/"
] | Nmap is a great port scanner, but sometimes you want something more authoritative. You can ask the kernel what processes have which ports open by using the `netstat` utility:
```
me@myhost:~$ sudo netstat -tlnp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State P... | A Linux system has a so called loopback interface, which is for internal communication. Its hostname is `localhost` and its IP address is `127.0.0.1`.
When you run `nmap` on `localhost`, you actually run the portscan on the **virtual** loopback interface. `192.168.1.1` is the IP address of your **physical** (most like... |
140,021 | I have some question in closing port, I think I got some strange things.
When I use execute
```
nmap --top-ports 10 192.168.1.1
```
it shows that 23/TCP port is open.
But when I execute
```
nmap --top-ports 10 localhost
```
it show that 23/tcp port is closed.
Which of them is true? I want to close this port on... | 2014/06/30 | [
"https://unix.stackexchange.com/questions/140021",
"https://unix.stackexchange.com",
"https://unix.stackexchange.com/users/74080/"
] | A Linux system has a so called loopback interface, which is for internal communication. Its hostname is `localhost` and its IP address is `127.0.0.1`.
When you run `nmap` on `localhost`, you actually run the portscan on the **virtual** loopback interface. `192.168.1.1` is the IP address of your **physical** (most like... | *If* you have a service running and listening on port 23, it is arguably cleaner to ***stop*** the process that listens to port 23 (probably `telnet`) than to keep it running and ***close or block*** port 23 using `iptables`.
When there's no process listening on a port, even in the absence of a firewall block, any att... |
140,021 | I have some question in closing port, I think I got some strange things.
When I use execute
```
nmap --top-ports 10 192.168.1.1
```
it shows that 23/TCP port is open.
But when I execute
```
nmap --top-ports 10 localhost
```
it show that 23/tcp port is closed.
Which of them is true? I want to close this port on... | 2014/06/30 | [
"https://unix.stackexchange.com/questions/140021",
"https://unix.stackexchange.com",
"https://unix.stackexchange.com/users/74080/"
] | To "close" the port you can use `iptables`
```
sudo iptables -A INPUT -p tcp --dport 23 -m state --state NEW,ESTABLISHED -j DROP
``` | If you do `nmap localhost`, it tells you about a different situation: some programs on linux work as server although they are used only locally. This is because other programs use them like a server they connect to. **So both answers are true, since you ask something different.**
Port 23 is used for telnet. Normally n... |
140,021 | I have some question in closing port, I think I got some strange things.
When I use execute
```
nmap --top-ports 10 192.168.1.1
```
it shows that 23/TCP port is open.
But when I execute
```
nmap --top-ports 10 localhost
```
it show that 23/tcp port is closed.
Which of them is true? I want to close this port on... | 2014/06/30 | [
"https://unix.stackexchange.com/questions/140021",
"https://unix.stackexchange.com",
"https://unix.stackexchange.com/users/74080/"
] | Nmap is a great port scanner, but sometimes you want something more authoritative. You can ask the kernel what processes have which ports open by using the `netstat` utility:
```
me@myhost:~$ sudo netstat -tlnp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State P... | To "close" the port you can use `iptables`
```
sudo iptables -A INPUT -p tcp --dport 23 -m state --state NEW,ESTABLISHED -j DROP
``` |
140,021 | I have some question in closing port, I think I got some strange things.
When I use execute
```
nmap --top-ports 10 192.168.1.1
```
it shows that 23/TCP port is open.
But when I execute
```
nmap --top-ports 10 localhost
```
it show that 23/tcp port is closed.
Which of them is true? I want to close this port on... | 2014/06/30 | [
"https://unix.stackexchange.com/questions/140021",
"https://unix.stackexchange.com",
"https://unix.stackexchange.com/users/74080/"
] | To "close" the port you can use `iptables`
```
sudo iptables -A INPUT -p tcp --dport 23 -m state --state NEW,ESTABLISHED -j DROP
``` | *If* you have a service running and listening on port 23, it is arguably cleaner to ***stop*** the process that listens to port 23 (probably `telnet`) than to keep it running and ***close or block*** port 23 using `iptables`.
When there's no process listening on a port, even in the absence of a firewall block, any att... |
140,021 | I have some question in closing port, I think I got some strange things.
When I use execute
```
nmap --top-ports 10 192.168.1.1
```
it shows that 23/TCP port is open.
But when I execute
```
nmap --top-ports 10 localhost
```
it show that 23/tcp port is closed.
Which of them is true? I want to close this port on... | 2014/06/30 | [
"https://unix.stackexchange.com/questions/140021",
"https://unix.stackexchange.com",
"https://unix.stackexchange.com/users/74080/"
] | Nmap is a great port scanner, but sometimes you want something more authoritative. You can ask the kernel what processes have which ports open by using the `netstat` utility:
```
me@myhost:~$ sudo netstat -tlnp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State P... | If you do `nmap localhost`, it tells you about a different situation: some programs on linux work as server although they are used only locally. This is because other programs use them like a server they connect to. **So both answers are true, since you ask something different.**
Port 23 is used for telnet. Normally n... |
140,021 | I have some question in closing port, I think I got some strange things.
When I use execute
```
nmap --top-ports 10 192.168.1.1
```
it shows that 23/TCP port is open.
But when I execute
```
nmap --top-ports 10 localhost
```
it show that 23/tcp port is closed.
Which of them is true? I want to close this port on... | 2014/06/30 | [
"https://unix.stackexchange.com/questions/140021",
"https://unix.stackexchange.com",
"https://unix.stackexchange.com/users/74080/"
] | If you do `nmap localhost`, it tells you about a different situation: some programs on linux work as server although they are used only locally. This is because other programs use them like a server they connect to. **So both answers are true, since you ask something different.**
Port 23 is used for telnet. Normally n... | *If* you have a service running and listening on port 23, it is arguably cleaner to ***stop*** the process that listens to port 23 (probably `telnet`) than to keep it running and ***close or block*** port 23 using `iptables`.
When there's no process listening on a port, even in the absence of a firewall block, any att... |
140,021 | I have some question in closing port, I think I got some strange things.
When I use execute
```
nmap --top-ports 10 192.168.1.1
```
it shows that 23/TCP port is open.
But when I execute
```
nmap --top-ports 10 localhost
```
it show that 23/tcp port is closed.
Which of them is true? I want to close this port on... | 2014/06/30 | [
"https://unix.stackexchange.com/questions/140021",
"https://unix.stackexchange.com",
"https://unix.stackexchange.com/users/74080/"
] | Nmap is a great port scanner, but sometimes you want something more authoritative. You can ask the kernel what processes have which ports open by using the `netstat` utility:
```
me@myhost:~$ sudo netstat -tlnp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State P... | *If* you have a service running and listening on port 23, it is arguably cleaner to ***stop*** the process that listens to port 23 (probably `telnet`) than to keep it running and ***close or block*** port 23 using `iptables`.
When there's no process listening on a port, even in the absence of a firewall block, any att... |
39,788,811 | I have an Azure Logic app which picks a file from the Sharepoint site.
In the next step, I want to parse the file contents to read them line-by-line and to pass each line in an Azure function I have already created.
At this stage I am unable to fetch and loop through each line of the file. I can get the complete file ... | 2016/09/30 | [
"https://Stackoverflow.com/questions/39788811",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1480090/"
] | As of now there is no out-of box connector or function in LogicApp which parses a CSV file line by line. You can always vote for new features [feedback.azure.com/forums/287593-logic-apps?query=CSV](http://feedback.azure.com/forums/287593-logic-apps?query=CSV)
1. You will have to pass the whole content to the Azure Fun... | Currently, there is a feature is Azure Logic App which can read Excel file from the given location.
Take a look at this blog - <https://www.pmichaels.net/2018/04/22/what-can-you-do-with-a-logic-app-part-two-use-excel-to-manage-an-e-mail-notification-system/>, it's written pretty well and should give you a heads-up abo... |
34,413,120 | I got a bug on my MediaPlayer.
When i click on an item of my playlist, it create a mp3Player. If i press back the music play in background (all is normal). But if i choose another song from my app, the app create a new mediaplayer:
Then i got 2 music playing !
I tried to use "singleTask", "singleInstance", and it's no... | 2015/12/22 | [
"https://Stackoverflow.com/questions/34413120",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5651162/"
] | My guess would be that you have already added a package globally that used
`symfony/process ~3.0.0` but Lumen installer requires `symfony/process ~2.3` so composer cannot install both.
You can either try to resolve this yourself by removing that package and installing Lumen installer globally, add the installer to you... | Checking out the latest commits for lumen installer <https://github.com/laravel/lumen-installer>. It appears there was a recent fix to the installers dependencies (i.e. symfony/process ~2.3|~3.0).
If you're keen to use the installer sooner rather than later get the dev-master version
`composer global require "laravel... |
59,575,919 | What is driver name to be given in quarkus application?
```
quarkus.datasource.ergoint.driver=org.xxx.xxx.Driver
```
If it does not provide native support then how can we fix this adding dependency in maven project?
**Note**: On official website nothing mentioned related to Oracle -> <https://quarkus.io/guides/data... | 2020/01/03 | [
"https://Stackoverflow.com/questions/59575919",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1382647/"
] | For the moment, there is no Oracle specific extension inside Quarkus, but there is an open issue for it you can +1 on it : <https://github.com/quarkusio/quarkus/issues/1658>
If you need to use Oracle database, you can do it the same way you did for othe framework: add the dependency inside your pom.xml (easy now that ... | Here started to work with the following:
```
quarkus.datasource.db-kind=other
quarkus.hibernate-orm.dialect=org.hibernate.dialect.OracleDialect
quarkus.datasource.jdbc.driver=oracle.jdbc.driver.OracleDriver
quarkus.datasource.jdbc.url=jdbc:oracle:thin:@XXX.XXX.XXX.XXX:1521:XXXXX
quarkus.datasource... |
59,575,919 | What is driver name to be given in quarkus application?
```
quarkus.datasource.ergoint.driver=org.xxx.xxx.Driver
```
If it does not provide native support then how can we fix this adding dependency in maven project?
**Note**: On official website nothing mentioned related to Oracle -> <https://quarkus.io/guides/data... | 2020/01/03 | [
"https://Stackoverflow.com/questions/59575919",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1382647/"
] | For the moment, there is no Oracle specific extension inside Quarkus, but there is an open issue for it you can +1 on it : <https://github.com/quarkusio/quarkus/issues/1658>
If you need to use Oracle database, you can do it the same way you did for othe framework: add the dependency inside your pom.xml (easy now that ... | In release 1.13.2.Final the support for oracle has been added.
```
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-jdbc-oracle</artifactId>
</dependency>
quarkus.datasource.db-kind=oracle
``` |
25,649 | I was reading the [Z80's official manual by Zilog](https://www.zilog.com/docs/z80/um0080.pdf), and there's a passage in the description for the BUSREQ pin that states "Bus Request contains a higher priority than
NMI and is always recognized at the end of the current machine cycle".
It got me thinking though, is it pos... | 2022/11/20 | [
"https://retrocomputing.stackexchange.com/questions/25649",
"https://retrocomputing.stackexchange.com",
"https://retrocomputing.stackexchange.com/users/25931/"
] | A hardware interrupt changes the Program Counter (PC) so that a CPU executes instructions from a specific address, where an interrupt service routine (ISR) is located.
The Z80 Bus Request `/BUSREQ` doesn't change the PC. Instead, the Z80 suspends execution and tri-states its address/data/control buses.
After `/BUSREQ... | The purpose of NMI is to cause the Z80 to execute code located at the NMI handler. The purpose of Bus Request is to prevent the Z80 from executing *any* code until whatever wanted the bus is done with it, but not affect the sequences of instructions and memory operations performed by Z80.
By way of analogy, think of N... |
25,235,453 | I am just setting up nginx as a webserver that proxies directly to a tomcat app server.
When the user connects to my website Nginx should redirect the request to port 8080 where the tomcat app server is running.
I am doing everything on amazon ec2 instance that is running Redhat 7.
What I have so far is this:
``... | 2014/08/11 | [
"https://Stackoverflow.com/questions/25235453",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1653068/"
] | I was able to find a solution after 2 days of searching. Somehow SELinux was not permitting Nginx to proxy to my server. Running the command below fixed the issue.
```
/usr/sbin/setsebool -P httpd_can_network_connect true
```
Adding the -P flag thanks to @DaveTrux | you can move to see this issue:
[stackoverflow questions 23443398](https://stackoverflow.com/questions/23443398/nginx-error-connect-to-php5-fpm-sock-failed-13-permission-denied)
Basically it's the problem of the permission for socket:
*Set permissions for unix socket, if one is used. In Linux, read/write
permissions ... |
62,364,702 | I have a list of lists such as
```
words_list=[['word1', 'word2','word3'],['word1', 'word2', 'word3','word4'],['word5', 'word6'],['word5', 'word6', 'word7'],['word5', 'word6', 'word7'],['... and so on ...']]
```
and I counted how many times a list is in the dataset:
```
c = Counter(tuple(x) for x in iter(words_lis... | 2020/06/13 | [
"https://Stackoverflow.com/questions/62364702",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] | This declaration
```
int a[i][j] ; //i =number of rows and j = number of columns
```
requires that the variables `i` and `j` would be compile-time constants. Variable length arrays is not a standard C++n feature though some compilers can have their own language extensions that include this feature.
The second probl... | If we can do it using the above normal declaration. It will make the code faster or something?
no all in above code you create an array in the stack it will be deleted if the function out of scope it will be removed automatically
the second is created in heap it will still in the heap until u delete it by self |
62,364,702 | I have a list of lists such as
```
words_list=[['word1', 'word2','word3'],['word1', 'word2', 'word3','word4'],['word5', 'word6'],['word5', 'word6', 'word7'],['word5', 'word6', 'word7'],['... and so on ...']]
```
and I counted how many times a list is in the dataset:
```
c = Counter(tuple(x) for x in iter(words_lis... | 2020/06/13 | [
"https://Stackoverflow.com/questions/62364702",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] | This declaration
```
int a[i][j] ; //i =number of rows and j = number of columns
```
requires that the variables `i` and `j` would be compile-time constants. Variable length arrays is not a standard C++n feature though some compilers can have their own language extensions that include this feature.
The second probl... | Both ways of array declaration are useful in different use cases. The declaration:
```
int a[i][j];
```
declares an array statically and it uses stack memory to store the array or we can say that the memory is allocated at the runtime. This type of array declaration requires you to pass the value 'n' and the size of... |
3,363 | I'm currently considering to buy one of the next generation enthusiast DSLRs. Either a Canon EOS 60D or the slightly more expensive Nikon D7000. I'm quite new to the SLR discussion but I know there are some controversial opinions about Canon vs. Nikon.
But I often read that (the better) Nikon lenses are higher quality... | 2010/09/18 | [
"https://photo.stackexchange.com/questions/3363",
"https://photo.stackexchange.com",
"https://photo.stackexchange.com/users/1387/"
] | Some starter references (while these sites might be biased, they do enumerate the points to look at).
Some of the discussions also compare Nikon and Canon bodies
1. [Canon versus Nikon lenses](http://www.radiantlite.com/2008/07/canon-versus-nikon-lenses.html) at Radiant Lite Photography
* rounds up with a referenc... | It's worth knowing that there are certain lenses that only Canon or Nikon make, for example there is no Nikon 800mm f/5.6 currently in production. For some photography niches there's a genuine reasons to go with one manufacturer.
It's also worth noting that there didn't used to be tilt-shift (perspective correction) l... |
3,363 | I'm currently considering to buy one of the next generation enthusiast DSLRs. Either a Canon EOS 60D or the slightly more expensive Nikon D7000. I'm quite new to the SLR discussion but I know there are some controversial opinions about Canon vs. Nikon.
But I often read that (the better) Nikon lenses are higher quality... | 2010/09/18 | [
"https://photo.stackexchange.com/questions/3363",
"https://photo.stackexchange.com",
"https://photo.stackexchange.com/users/1387/"
] | Some starter references (while these sites might be biased, they do enumerate the points to look at).
Some of the discussions also compare Nikon and Canon bodies
1. [Canon versus Nikon lenses](http://www.radiantlite.com/2008/07/canon-versus-nikon-lenses.html) at Radiant Lite Photography
* rounds up with a referenc... | Well, Nikon makes a 12-24/2.8 zoom and Canon has nothing like it.
Canon has the 85/1.2.
For a given price point and spec (e.g. canon or nikon 300/2.8), there's little point arguing as differences will be insignificant.
Canon L's are white, which can attract attention. I recall someone lauding the Canon 200/2.8 becau... |
3,363 | I'm currently considering to buy one of the next generation enthusiast DSLRs. Either a Canon EOS 60D or the slightly more expensive Nikon D7000. I'm quite new to the SLR discussion but I know there are some controversial opinions about Canon vs. Nikon.
But I often read that (the better) Nikon lenses are higher quality... | 2010/09/18 | [
"https://photo.stackexchange.com/questions/3363",
"https://photo.stackexchange.com",
"https://photo.stackexchange.com/users/1387/"
] | Some starter references (while these sites might be biased, they do enumerate the points to look at).
Some of the discussions also compare Nikon and Canon bodies
1. [Canon versus Nikon lenses](http://www.radiantlite.com/2008/07/canon-versus-nikon-lenses.html) at Radiant Lite Photography
* rounds up with a referenc... | I will try to be as impartial as possible here. Both Canon and Nikon make some simply stunning lenses. As already noted, it's worth checking that if you have any specific requirements that the manufacturer does indeed make that lens.
Although it doesn't make any difference to the photos note that the Canon's and Niko... |
3,363 | I'm currently considering to buy one of the next generation enthusiast DSLRs. Either a Canon EOS 60D or the slightly more expensive Nikon D7000. I'm quite new to the SLR discussion but I know there are some controversial opinions about Canon vs. Nikon.
But I often read that (the better) Nikon lenses are higher quality... | 2010/09/18 | [
"https://photo.stackexchange.com/questions/3363",
"https://photo.stackexchange.com",
"https://photo.stackexchange.com/users/1387/"
] | Some starter references (while these sites might be biased, they do enumerate the points to look at).
Some of the discussions also compare Nikon and Canon bodies
1. [Canon versus Nikon lenses](http://www.radiantlite.com/2008/07/canon-versus-nikon-lenses.html) at Radiant Lite Photography
* rounds up with a referenc... | CANON 1Dx is the fastest and toughest camera ever build.
canon has 17mm TS-E, 100mm macro IS (truly effective not like Nikon), 50 mm and 85mm f/1.2 (fastest prime for less than $2k)
Nikon has 14-24mm f/2.8 (sharpest wide angle zoom), 13mm (legendary but not as sharp as other)
Similarity but price/performance differ... |
3,363 | I'm currently considering to buy one of the next generation enthusiast DSLRs. Either a Canon EOS 60D or the slightly more expensive Nikon D7000. I'm quite new to the SLR discussion but I know there are some controversial opinions about Canon vs. Nikon.
But I often read that (the better) Nikon lenses are higher quality... | 2010/09/18 | [
"https://photo.stackexchange.com/questions/3363",
"https://photo.stackexchange.com",
"https://photo.stackexchange.com/users/1387/"
] | It's worth knowing that there are certain lenses that only Canon or Nikon make, for example there is no Nikon 800mm f/5.6 currently in production. For some photography niches there's a genuine reasons to go with one manufacturer.
It's also worth noting that there didn't used to be tilt-shift (perspective correction) l... | Well, Nikon makes a 12-24/2.8 zoom and Canon has nothing like it.
Canon has the 85/1.2.
For a given price point and spec (e.g. canon or nikon 300/2.8), there's little point arguing as differences will be insignificant.
Canon L's are white, which can attract attention. I recall someone lauding the Canon 200/2.8 becau... |
3,363 | I'm currently considering to buy one of the next generation enthusiast DSLRs. Either a Canon EOS 60D or the slightly more expensive Nikon D7000. I'm quite new to the SLR discussion but I know there are some controversial opinions about Canon vs. Nikon.
But I often read that (the better) Nikon lenses are higher quality... | 2010/09/18 | [
"https://photo.stackexchange.com/questions/3363",
"https://photo.stackexchange.com",
"https://photo.stackexchange.com/users/1387/"
] | It's worth knowing that there are certain lenses that only Canon or Nikon make, for example there is no Nikon 800mm f/5.6 currently in production. For some photography niches there's a genuine reasons to go with one manufacturer.
It's also worth noting that there didn't used to be tilt-shift (perspective correction) l... | I will try to be as impartial as possible here. Both Canon and Nikon make some simply stunning lenses. As already noted, it's worth checking that if you have any specific requirements that the manufacturer does indeed make that lens.
Although it doesn't make any difference to the photos note that the Canon's and Niko... |
3,363 | I'm currently considering to buy one of the next generation enthusiast DSLRs. Either a Canon EOS 60D or the slightly more expensive Nikon D7000. I'm quite new to the SLR discussion but I know there are some controversial opinions about Canon vs. Nikon.
But I often read that (the better) Nikon lenses are higher quality... | 2010/09/18 | [
"https://photo.stackexchange.com/questions/3363",
"https://photo.stackexchange.com",
"https://photo.stackexchange.com/users/1387/"
] | It's worth knowing that there are certain lenses that only Canon or Nikon make, for example there is no Nikon 800mm f/5.6 currently in production. For some photography niches there's a genuine reasons to go with one manufacturer.
It's also worth noting that there didn't used to be tilt-shift (perspective correction) l... | CANON 1Dx is the fastest and toughest camera ever build.
canon has 17mm TS-E, 100mm macro IS (truly effective not like Nikon), 50 mm and 85mm f/1.2 (fastest prime for less than $2k)
Nikon has 14-24mm f/2.8 (sharpest wide angle zoom), 13mm (legendary but not as sharp as other)
Similarity but price/performance differ... |
3,363 | I'm currently considering to buy one of the next generation enthusiast DSLRs. Either a Canon EOS 60D or the slightly more expensive Nikon D7000. I'm quite new to the SLR discussion but I know there are some controversial opinions about Canon vs. Nikon.
But I often read that (the better) Nikon lenses are higher quality... | 2010/09/18 | [
"https://photo.stackexchange.com/questions/3363",
"https://photo.stackexchange.com",
"https://photo.stackexchange.com/users/1387/"
] | I will try to be as impartial as possible here. Both Canon and Nikon make some simply stunning lenses. As already noted, it's worth checking that if you have any specific requirements that the manufacturer does indeed make that lens.
Although it doesn't make any difference to the photos note that the Canon's and Niko... | Well, Nikon makes a 12-24/2.8 zoom and Canon has nothing like it.
Canon has the 85/1.2.
For a given price point and spec (e.g. canon or nikon 300/2.8), there's little point arguing as differences will be insignificant.
Canon L's are white, which can attract attention. I recall someone lauding the Canon 200/2.8 becau... |
3,363 | I'm currently considering to buy one of the next generation enthusiast DSLRs. Either a Canon EOS 60D or the slightly more expensive Nikon D7000. I'm quite new to the SLR discussion but I know there are some controversial opinions about Canon vs. Nikon.
But I often read that (the better) Nikon lenses are higher quality... | 2010/09/18 | [
"https://photo.stackexchange.com/questions/3363",
"https://photo.stackexchange.com",
"https://photo.stackexchange.com/users/1387/"
] | Well, Nikon makes a 12-24/2.8 zoom and Canon has nothing like it.
Canon has the 85/1.2.
For a given price point and spec (e.g. canon or nikon 300/2.8), there's little point arguing as differences will be insignificant.
Canon L's are white, which can attract attention. I recall someone lauding the Canon 200/2.8 becau... | CANON 1Dx is the fastest and toughest camera ever build.
canon has 17mm TS-E, 100mm macro IS (truly effective not like Nikon), 50 mm and 85mm f/1.2 (fastest prime for less than $2k)
Nikon has 14-24mm f/2.8 (sharpest wide angle zoom), 13mm (legendary but not as sharp as other)
Similarity but price/performance differ... |
3,363 | I'm currently considering to buy one of the next generation enthusiast DSLRs. Either a Canon EOS 60D or the slightly more expensive Nikon D7000. I'm quite new to the SLR discussion but I know there are some controversial opinions about Canon vs. Nikon.
But I often read that (the better) Nikon lenses are higher quality... | 2010/09/18 | [
"https://photo.stackexchange.com/questions/3363",
"https://photo.stackexchange.com",
"https://photo.stackexchange.com/users/1387/"
] | I will try to be as impartial as possible here. Both Canon and Nikon make some simply stunning lenses. As already noted, it's worth checking that if you have any specific requirements that the manufacturer does indeed make that lens.
Although it doesn't make any difference to the photos note that the Canon's and Niko... | CANON 1Dx is the fastest and toughest camera ever build.
canon has 17mm TS-E, 100mm macro IS (truly effective not like Nikon), 50 mm and 85mm f/1.2 (fastest prime for less than $2k)
Nikon has 14-24mm f/2.8 (sharpest wide angle zoom), 13mm (legendary but not as sharp as other)
Similarity but price/performance differ... |
65,591 | i am adding the form field through the observer but cannot able to post form field on mass action below my code
```
public function render(Varien_Object $row)
{
$orderdata=Mage::getModel('sales/order')->load($row->getEntityId());
$value .='Carrier:';
$value .='<select name="carrier'.$row->getEnt... | 2015/05/04 | [
"https://magento.stackexchange.com/questions/65591",
"https://magento.stackexchange.com",
"https://magento.stackexchange.com/users/24541/"
] | This approach is wrong, you cannot post from the grid area because there is no form in grid area for posting the form fields, form fields must be in between tags.
Try something like this.
```
<form method="post" id="sales_order_grid_massaction-form" action="">
<select class="required-entry select absolute-advice ... | rather than using an Observer why don't you create a module. You could override the collection class and display the carrier type for each order and mass actions will work. You could try with the references from the following sites to help you out
<https://inchoo.net/magento/how-to-extend-magento-order-grid/>
<h... |
21,103,732 | Can I extend syntax in python for dict comprehensions for other dicts, like the OrderedDict in `collections` module or my own types which inherit from `dict`?
Just rebinding the `dict` name obviously doesn't work, the `{key: value}` comprehension syntax still gives you a plain old dict for comprehensions and literals... | 2014/01/13 | [
"https://Stackoverflow.com/questions/21103732",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/674039/"
] | Sorry, not possible. Dict literals and dict comprehensions map to the built-in dict type, in a way that's hardcoded at the C level. That can't be overridden.
You can use this as an alternative, though:
```
OrderedDict((i, i * i) for i in range(3))
```
Addendum: as of Python 3.6, all Python dictionaries are ordered.... | There is no direct way to change Python's syntax from within the language. A dictionary comprehension (or plain display) is always going to create a `dict`, and there's nothing you can do about that. If you're using CPython, it's using special bytecodes that generate a dict directly, which ultimately call the [`PyDict`... |
21,103,732 | Can I extend syntax in python for dict comprehensions for other dicts, like the OrderedDict in `collections` module or my own types which inherit from `dict`?
Just rebinding the `dict` name obviously doesn't work, the `{key: value}` comprehension syntax still gives you a plain old dict for comprehensions and literals... | 2014/01/13 | [
"https://Stackoverflow.com/questions/21103732",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/674039/"
] | Sorry, not possible. Dict literals and dict comprehensions map to the built-in dict type, in a way that's hardcoded at the C level. That can't be overridden.
You can use this as an alternative, though:
```
OrderedDict((i, i * i) for i in range(3))
```
Addendum: as of Python 3.6, all Python dictionaries are ordered.... | Slightly modifying the response of @Max Noel, you can use list comprehension instead of a generator to create an OrderedDict in an ordered way (which of course is not possible using dict comprehension).
```
>>> OrderedDict([(i, i * i) for i in range(5)])
OrderedDict([(0, 0),
(1, 1),
(2, 4),... |
21,103,732 | Can I extend syntax in python for dict comprehensions for other dicts, like the OrderedDict in `collections` module or my own types which inherit from `dict`?
Just rebinding the `dict` name obviously doesn't work, the `{key: value}` comprehension syntax still gives you a plain old dict for comprehensions and literals... | 2014/01/13 | [
"https://Stackoverflow.com/questions/21103732",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/674039/"
] | There is no direct way to change Python's syntax from within the language. A dictionary comprehension (or plain display) is always going to create a `dict`, and there's nothing you can do about that. If you're using CPython, it's using special bytecodes that generate a dict directly, which ultimately call the [`PyDict`... | Slightly modifying the response of @Max Noel, you can use list comprehension instead of a generator to create an OrderedDict in an ordered way (which of course is not possible using dict comprehension).
```
>>> OrderedDict([(i, i * i) for i in range(5)])
OrderedDict([(0, 0),
(1, 1),
(2, 4),... |
21,066,401 | I am developing a website using Adobe Dreamweaver, and when I open up the HTML file in chrome from my local computer, everything is as it should be (mainly the margins). But when I upload it to my hosting service all the margins go wrong. I have compared the source code and they are exactly the same. | 2014/01/11 | [
"https://Stackoverflow.com/questions/21066401",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3185753/"
] | You probably forgot to upload the CSS files as well. You can see them in your code by looking for `<link rel="stylesheet" href="...">` tags.
You could open the Chrome dev-tools window by pressing `F12` and going to the `Console` tab where you would probably see some `Failed to load resource` messages indicating that i... | Because your paths for resources may be referenced as absolute paths(for example: `<img src="c:\mydocs\myimage.jpg">`). Check all your paths and tehn come back if they dont fix your issues |
24,277,087 | I want to be able to found out if two values are equal in a controller action.
```
def completed
@meeting = Meeting.find(params[:id])
if @meeting.day_of_meeting == @meeting.days
@meeting.update_attribute(:day_of_meeting, '1')
redirect_to :back
else
@meeting.increment!
redirect_to :back
end
end
... | 2014/06/18 | [
"https://Stackoverflow.com/questions/24277087",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2004710/"
] | Without seeing more code, I'm guessing that either @meeting.day\_of\_meeting or @meeting.days maybe a string.
```
@meeting.day_of_meeting == @meeting.days.to_i
```
assuming @meeting.days is a string, you can convert to integer and compare. | It's possible the two lists have the same contents, but in a different order, then not exactly the same. So try:
```
@meeting.day_of_meeting.sort == @meeting.days.sort
``` |
15,043 | I want to show entries according to an array.
This is my code:
```
{% set navsubids = craft.amNav.getNavRaw("hoofdnavigatie", {startFromId:25}) %}
{% set navsubidarray = [] %}
{% for navsubid in navsubids %}
{% set navsubidarray = navsubidarray|merge([navsubid... | 2016/05/16 | [
"https://craftcms.stackexchange.com/questions/15043",
"https://craftcms.stackexchange.com",
"https://craftcms.stackexchange.com/users/4892/"
] | As with most performance related questions, the answer is "it depends". :)
Apps like Redis and Memcache store their key => value stores in memory as opposed to disk-based file caching.
Accessing data from memory is usually orders of magnitude faster than accessing data from disk.
All of these fall under "[General pu... | How many servers do you have?
Redis and Memcached are most beneficial/intended for a multiple server setup so if you only have one server, there's probably other/betters thing to worry about. (Best speed increase I've found so far: PHP 7.)
As Brad points out, it all depends on your content, traffic, concurrent users... |
15,043 | I want to show entries according to an array.
This is my code:
```
{% set navsubids = craft.amNav.getNavRaw("hoofdnavigatie", {startFromId:25}) %}
{% set navsubidarray = [] %}
{% for navsubid in navsubids %}
{% set navsubidarray = navsubidarray|merge([navsubid... | 2016/05/16 | [
"https://craftcms.stackexchange.com/questions/15043",
"https://craftcms.stackexchange.com",
"https://craftcms.stackexchange.com/users/4892/"
] | As with most performance related questions, the answer is "it depends". :)
Apps like Redis and Memcache store their key => value stores in memory as opposed to disk-based file caching.
Accessing data from memory is usually orders of magnitude faster than accessing data from disk.
All of these fall under "[General pu... | Redis and Memcache are both Key value pair storage, their key => value stores in memory as opposed to disk-based file caching that make is faster to access compare with accessing data from disk
Few Interesting properties of Redis:
>
> 1. Redis can be accessed by all the processes of your applications, possibly runni... |
15,043 | I want to show entries according to an array.
This is my code:
```
{% set navsubids = craft.amNav.getNavRaw("hoofdnavigatie", {startFromId:25}) %}
{% set navsubidarray = [] %}
{% for navsubid in navsubids %}
{% set navsubidarray = navsubidarray|merge([navsubid... | 2016/05/16 | [
"https://craftcms.stackexchange.com/questions/15043",
"https://craftcms.stackexchange.com",
"https://craftcms.stackexchange.com/users/4892/"
] | As with most performance related questions, the answer is "it depends". :)
Apps like Redis and Memcache store their key => value stores in memory as opposed to disk-based file caching.
Accessing data from memory is usually orders of magnitude faster than accessing data from disk.
All of these fall under "[General pu... | Here you can find an interesting benchmarking between Redis (remote or local) and Python Disk caching. The answer from Didier Spezia is good enough to understand the results.
<https://stackoverflow.com/a/12871072/8520235>
Enough RAM and disk caching are always better solutions for reasonable amounts of data.
Any local... |
15,043 | I want to show entries according to an array.
This is my code:
```
{% set navsubids = craft.amNav.getNavRaw("hoofdnavigatie", {startFromId:25}) %}
{% set navsubidarray = [] %}
{% for navsubid in navsubids %}
{% set navsubidarray = navsubidarray|merge([navsubid... | 2016/05/16 | [
"https://craftcms.stackexchange.com/questions/15043",
"https://craftcms.stackexchange.com",
"https://craftcms.stackexchange.com/users/4892/"
] | How many servers do you have?
Redis and Memcached are most beneficial/intended for a multiple server setup so if you only have one server, there's probably other/betters thing to worry about. (Best speed increase I've found so far: PHP 7.)
As Brad points out, it all depends on your content, traffic, concurrent users... | Redis and Memcache are both Key value pair storage, their key => value stores in memory as opposed to disk-based file caching that make is faster to access compare with accessing data from disk
Few Interesting properties of Redis:
>
> 1. Redis can be accessed by all the processes of your applications, possibly runni... |
15,043 | I want to show entries according to an array.
This is my code:
```
{% set navsubids = craft.amNav.getNavRaw("hoofdnavigatie", {startFromId:25}) %}
{% set navsubidarray = [] %}
{% for navsubid in navsubids %}
{% set navsubidarray = navsubidarray|merge([navsubid... | 2016/05/16 | [
"https://craftcms.stackexchange.com/questions/15043",
"https://craftcms.stackexchange.com",
"https://craftcms.stackexchange.com/users/4892/"
] | Here you can find an interesting benchmarking between Redis (remote or local) and Python Disk caching. The answer from Didier Spezia is good enough to understand the results.
<https://stackoverflow.com/a/12871072/8520235>
Enough RAM and disk caching are always better solutions for reasonable amounts of data.
Any local... | Redis and Memcache are both Key value pair storage, their key => value stores in memory as opposed to disk-based file caching that make is faster to access compare with accessing data from disk
Few Interesting properties of Redis:
>
> 1. Redis can be accessed by all the processes of your applications, possibly runni... |
64,678,856 | I am trying to run an azure container instance but it appears to be getting killed off the second I run it. This works fine in 2 other resource groups but not my production resource group where I see the following:
* In events I see 'Successfully pulled image
selenium/standalone-chrome:latest' with count 1 and then 'S... | 2020/11/04 | [
"https://Stackoverflow.com/questions/64678856",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1702827/"
] | In case this helps someone I renamed the "containerName" parameter in the above example from myinstance to myinstance1 and changed the region from West Europe to UK South. This fixed the issue. I can only think that Azure caches instances somehow to reduce start up times and the cached image I was using was poisoned so... | One issue could be the restart policy - have a look at the Microsoft restart policy troubleshooting on [Microsoft's ACI troubleshooting page](https://learn.microsoft.com/en-us/azure/container-instances/container-instances-troubleshooting?WT.mc_id=Portal-Microsoft_Azure_Support). According to the website under the **Con... |
64,678,856 | I am trying to run an azure container instance but it appears to be getting killed off the second I run it. This works fine in 2 other resource groups but not my production resource group where I see the following:
* In events I see 'Successfully pulled image
selenium/standalone-chrome:latest' with count 1 and then 'S... | 2020/11/04 | [
"https://Stackoverflow.com/questions/64678856",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1702827/"
] | In case this helps someone I renamed the "containerName" parameter in the above example from myinstance to myinstance1 and changed the region from West Europe to UK South. This fixed the issue. I can only think that Azure caches instances somehow to reduce start up times and the cached image I was using was poisoned so... | This [link](https://learn.microsoft.com/en-us/azure/container-instances/container-instances-troubleshooting#container-continually-exits-and-restarts-no-long-running-process) is helpful for this issue.
```
--command-line
linux => "tail -f /dev/null"
windows => "ping -t localhost"
# .yml
command: tail -f /d... |
64,678,856 | I am trying to run an azure container instance but it appears to be getting killed off the second I run it. This works fine in 2 other resource groups but not my production resource group where I see the following:
* In events I see 'Successfully pulled image
selenium/standalone-chrome:latest' with count 1 and then 'S... | 2020/11/04 | [
"https://Stackoverflow.com/questions/64678856",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1702827/"
] | One issue could be the restart policy - have a look at the Microsoft restart policy troubleshooting on [Microsoft's ACI troubleshooting page](https://learn.microsoft.com/en-us/azure/container-instances/container-instances-troubleshooting?WT.mc_id=Portal-Microsoft_Azure_Support). According to the website under the **Con... | This [link](https://learn.microsoft.com/en-us/azure/container-instances/container-instances-troubleshooting#container-continually-exits-and-restarts-no-long-running-process) is helpful for this issue.
```
--command-line
linux => "tail -f /dev/null"
windows => "ping -t localhost"
# .yml
command: tail -f /d... |
64,191,109 | [](https://i.stack.imgur.com/9NC4P.png)In a basic bar plot, I want to add text in a right place but my text overlap with the standard error bar. Here are my code and output. Thank you.
```
d<-data.frame(Proband=c(1400,1500),
Sibling=c( 1700... | 2020/10/04 | [
"https://Stackoverflow.com/questions/64191109",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/12617911/"
] | You can do it in separate lines
```js
const ReduxApp = connect(null,mapDispatchToProps)(App)
export default withRouter(ReduxApp)
```
You won't need `withRouter` if you pass the props in the `Routes`
```
<Route path="/" component={(p) => <Component {...p} {...props}/>} />
```
Here `p` is the props related to reac... | Can you try this
```
import {BrowserRouter,Switch,Route,withRouter} from 'react-router-dom';
export default connect(null,mapDispatchToProps)(withRouter(App)));
``` |
30,778,845 | Im trying to use this <https://gist.github.com/linssen/2773872> on my php work but that code only shows a array text and doesnt update in my database.
Main page:
```
<ul id="test-list">
<?php do { ?>
<li id="listItem_<?php echo $row_dados['id']; ?>"><img src="images/arrow.png" alt="move" width="16" height="16" class=... | 2015/06/11 | [
"https://Stackoverflow.com/questions/30778845",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4978549/"
] | When opening access i was getting security warning which required user confirmation. I changed the security level to low in `tool->macros->security` to make this go away and success.
On the server i had a different warning saying that the file is corrupt or badly closed. Still have not got round to fixing but shouldn'... | Do this: Run Regedit
Local User -> Software -> Microsoft-> Office -> Access -> (Office Version) -> Security
Add:
```
DWORD 32 - VBAWarnings = 1
``` |
1,667,212 | Is there a way to add references to one or more of a method's parameters from the method documentation body?
Something like:
```
/**
* When {@paramref a} is null, we rely on b for the discombobulation.
*
* @param a this is one of the parameters
* @param b another param
*/
void foo(String a, int b)
{...}
``` | 2009/11/03 | [
"https://Stackoverflow.com/questions/1667212",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11236/"
] | As you can see in the Java Source of the `java.lang.String` class:
```
/**
* Allocates a new <code>String</code> that contains characters from
* a subarray of the character array argument. The <code>offset</code>
* argument is the index of the first character of the subarray and
* the <code>count</code> argument s... | I guess you could write your own doclet or taglet to support this behaviour.
[Taglet Overview](http://java.sun.com/j2se/1.5.0/docs/guide/javadoc/taglet/overview.html)
[Doclet Overview](http://java.sun.com/j2se/1.5.0/docs/guide/javadoc/doclet/overview.html) |
1,667,212 | Is there a way to add references to one or more of a method's parameters from the method documentation body?
Something like:
```
/**
* When {@paramref a} is null, we rely on b for the discombobulation.
*
* @param a this is one of the parameters
* @param b another param
*/
void foo(String a, int b)
{...}
``` | 2009/11/03 | [
"https://Stackoverflow.com/questions/1667212",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11236/"
] | As far as I can tell after reading [the docs for javadoc](http://docs.oracle.com/javase/8/docs/technotes/tools/unix/javadoc.html) there is no such feature.
Don't use `<code>foo</code>` as recommended in other answers; you can use `{@code foo}`. This is especially good to know when you refer to a generic type such as `... | I guess you could write your own doclet or taglet to support this behaviour.
[Taglet Overview](http://java.sun.com/j2se/1.5.0/docs/guide/javadoc/taglet/overview.html)
[Doclet Overview](http://java.sun.com/j2se/1.5.0/docs/guide/javadoc/doclet/overview.html) |
1,667,212 | Is there a way to add references to one or more of a method's parameters from the method documentation body?
Something like:
```
/**
* When {@paramref a} is null, we rely on b for the discombobulation.
*
* @param a this is one of the parameters
* @param b another param
*/
void foo(String a, int b)
{...}
``` | 2009/11/03 | [
"https://Stackoverflow.com/questions/1667212",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11236/"
] | The correct way of referring to a method parameter is like this:
[](https://i.stack.imgur.com/Z1IGb.png) | I guess you could write your own doclet or taglet to support this behaviour.
[Taglet Overview](http://java.sun.com/j2se/1.5.0/docs/guide/javadoc/taglet/overview.html)
[Doclet Overview](http://java.sun.com/j2se/1.5.0/docs/guide/javadoc/doclet/overview.html) |
1,667,212 | Is there a way to add references to one or more of a method's parameters from the method documentation body?
Something like:
```
/**
* When {@paramref a} is null, we rely on b for the discombobulation.
*
* @param a this is one of the parameters
* @param b another param
*/
void foo(String a, int b)
{...}
``` | 2009/11/03 | [
"https://Stackoverflow.com/questions/1667212",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11236/"
] | I guess you could write your own doclet or taglet to support this behaviour.
[Taglet Overview](http://java.sun.com/j2se/1.5.0/docs/guide/javadoc/taglet/overview.html)
[Doclet Overview](http://java.sun.com/j2se/1.5.0/docs/guide/javadoc/doclet/overview.html) | Here is how it is written in Eclipse Temurin JDK 8 sources:
[](https://i.stack.imgur.com/CFcSZ.png)
It looks like the only way is or {@code }, but it's not a link - it's just formatting. |
1,667,212 | Is there a way to add references to one or more of a method's parameters from the method documentation body?
Something like:
```
/**
* When {@paramref a} is null, we rely on b for the discombobulation.
*
* @param a this is one of the parameters
* @param b another param
*/
void foo(String a, int b)
{...}
``` | 2009/11/03 | [
"https://Stackoverflow.com/questions/1667212",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11236/"
] | As far as I can tell after reading [the docs for javadoc](http://docs.oracle.com/javase/8/docs/technotes/tools/unix/javadoc.html) there is no such feature.
Don't use `<code>foo</code>` as recommended in other answers; you can use `{@code foo}`. This is especially good to know when you refer to a generic type such as `... | As you can see in the Java Source of the `java.lang.String` class:
```
/**
* Allocates a new <code>String</code> that contains characters from
* a subarray of the character array argument. The <code>offset</code>
* argument is the index of the first character of the subarray and
* the <code>count</code> argument s... |
1,667,212 | Is there a way to add references to one or more of a method's parameters from the method documentation body?
Something like:
```
/**
* When {@paramref a} is null, we rely on b for the discombobulation.
*
* @param a this is one of the parameters
* @param b another param
*/
void foo(String a, int b)
{...}
``` | 2009/11/03 | [
"https://Stackoverflow.com/questions/1667212",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11236/"
] | As you can see in the Java Source of the `java.lang.String` class:
```
/**
* Allocates a new <code>String</code> that contains characters from
* a subarray of the character array argument. The <code>offset</code>
* argument is the index of the first character of the subarray and
* the <code>count</code> argument s... | Here is how it is written in Eclipse Temurin JDK 8 sources:
[](https://i.stack.imgur.com/CFcSZ.png)
It looks like the only way is or {@code }, but it's not a link - it's just formatting. |
1,667,212 | Is there a way to add references to one or more of a method's parameters from the method documentation body?
Something like:
```
/**
* When {@paramref a} is null, we rely on b for the discombobulation.
*
* @param a this is one of the parameters
* @param b another param
*/
void foo(String a, int b)
{...}
``` | 2009/11/03 | [
"https://Stackoverflow.com/questions/1667212",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11236/"
] | As far as I can tell after reading [the docs for javadoc](http://docs.oracle.com/javase/8/docs/technotes/tools/unix/javadoc.html) there is no such feature.
Don't use `<code>foo</code>` as recommended in other answers; you can use `{@code foo}`. This is especially good to know when you refer to a generic type such as `... | The correct way of referring to a method parameter is like this:
[](https://i.stack.imgur.com/Z1IGb.png) |
1,667,212 | Is there a way to add references to one or more of a method's parameters from the method documentation body?
Something like:
```
/**
* When {@paramref a} is null, we rely on b for the discombobulation.
*
* @param a this is one of the parameters
* @param b another param
*/
void foo(String a, int b)
{...}
``` | 2009/11/03 | [
"https://Stackoverflow.com/questions/1667212",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11236/"
] | As far as I can tell after reading [the docs for javadoc](http://docs.oracle.com/javase/8/docs/technotes/tools/unix/javadoc.html) there is no such feature.
Don't use `<code>foo</code>` as recommended in other answers; you can use `{@code foo}`. This is especially good to know when you refer to a generic type such as `... | Here is how it is written in Eclipse Temurin JDK 8 sources:
[](https://i.stack.imgur.com/CFcSZ.png)
It looks like the only way is or {@code }, but it's not a link - it's just formatting. |
1,667,212 | Is there a way to add references to one or more of a method's parameters from the method documentation body?
Something like:
```
/**
* When {@paramref a} is null, we rely on b for the discombobulation.
*
* @param a this is one of the parameters
* @param b another param
*/
void foo(String a, int b)
{...}
``` | 2009/11/03 | [
"https://Stackoverflow.com/questions/1667212",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11236/"
] | The correct way of referring to a method parameter is like this:
[](https://i.stack.imgur.com/Z1IGb.png) | Here is how it is written in Eclipse Temurin JDK 8 sources:
[](https://i.stack.imgur.com/CFcSZ.png)
It looks like the only way is or {@code }, but it's not a link - it's just formatting. |
27,151,130 | I want to repeat first row first column value in every row in a particular column like a group. Please let me know how i will do it?
```
Table
Id - Title
1 - ABC1
2 - ABC2
3 - ABC3
4 - ABC4
5 - ABC5
```
I want result like this in a simple select query, Please dont use variable for it m... | 2014/11/26 | [
"https://Stackoverflow.com/questions/27151130",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2331073/"
] | This query will be helpful to get expected result.
```
SELECT Id, Title, (SELECT TOP 1 Id FROm Table ORDER BY ID) AS [Group] FROM Table
``` | Something like:
SELECT Id, Title, 1 AS [Group] FROM Table
If the Group value is different, then we need to know where that value is coming from. |
27,151,130 | I want to repeat first row first column value in every row in a particular column like a group. Please let me know how i will do it?
```
Table
Id - Title
1 - ABC1
2 - ABC2
3 - ABC3
4 - ABC4
5 - ABC5
```
I want result like this in a simple select query, Please dont use variable for it m... | 2014/11/26 | [
"https://Stackoverflow.com/questions/27151130",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2331073/"
] | This query will be helpful to get expected result.
```
SELECT Id, Title, (SELECT TOP 1 Id FROm Table ORDER BY ID) AS [Group] FROM Table
``` | USE THE QUERY: (ORDER BY ID ASC will make sure that the first ID will selected always even if there is a change of order in ID.)
```
SELECT Id, Title,
(SELECT TOP 1 ID FROM Table ORDER BY ID ASC)
AS [Group] FROM Table
``` |
27,151,130 | I want to repeat first row first column value in every row in a particular column like a group. Please let me know how i will do it?
```
Table
Id - Title
1 - ABC1
2 - ABC2
3 - ABC3
4 - ABC4
5 - ABC5
```
I want result like this in a simple select query, Please dont use variable for it m... | 2014/11/26 | [
"https://Stackoverflow.com/questions/27151130",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2331073/"
] | USE THE QUERY: (ORDER BY ID ASC will make sure that the first ID will selected always even if there is a change of order in ID.)
```
SELECT Id, Title,
(SELECT TOP 1 ID FROM Table ORDER BY ID ASC)
AS [Group] FROM Table
``` | Something like:
SELECT Id, Title, 1 AS [Group] FROM Table
If the Group value is different, then we need to know where that value is coming from. |
4,349,772 | I am using some of the functions from cutil.h to time my code. It compiles fine on windows xp with vs 2008. Recently, I switch to window 7 and vs 2008. The same code doesn't compile and I have following error,
>
> 1>LINK : C:\Users\weiqi\Documents\Visual Studio
> 2008\Projects\corrColumnLateral\Debug\corrColumnLater... | 2010/12/03 | [
"https://Stackoverflow.com/questions/4349772",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/236473/"
] | IF you right click your cu source file and select properties:
Then go to CUDA C/C++ and under Common add the location of the cutil.h to the Additional Include Directories folder.
For me this was: C:\ProgramData\NVIDIA Corporation\NVIDIA GPU Computing SDK 3.2\C\common\inc | You need to link to the cutil library. On linux it's called libcutil.so or libcutil.a. The windows version probably also has "cutil" in its name, so you can search for that file and add it to your linker options. |
66,371,839 | I'm trying to figure out how Stack and Heap work.
So my question about Stack. For example, we have next code:
```
static void Main()
{
int a = 1;
int b = 2;
Console.WriteLine(a);
}
```
Both variables will be pushed onto the stack, and variable 'b' will on top of variable 'a'.
If Stack has only Push an... | 2021/02/25 | [
"https://Stackoverflow.com/questions/66371839",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11324339/"
] | Local variables are defined *before* the dynamic / flexible part of the stack, so what you actually have is (assuming no optimisations):
* define a & b in the stack-frame
* push 1 onto the dynamic stack (*after* a & b)
* write (pop) the value at the top of the stack into the location of a
* push 2 onto the dynamic sta... | You've got a misunderstanding here. Both a and b are put into the same stack frame, as they belong to the same method. Within `main` it is always known that a is at address Stackpointer + 8 and b at Stackpointer + 4 (for instance). For the execution stack, each method call is one stack frame (containing all local varia... |
48,365,051 | I have spent the last four days studying promises, coroutines, fibers, continuations, etc.
I am still unable to see how to resolve my multiplayer turn-based card game moves, in which the starting player is effectively the game 'controller' of up to five, either AI or human players.
The code below works but has one pr... | 2018/01/21 | [
"https://Stackoverflow.com/questions/48365051",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1530235/"
] | Consider having a board state that is a global and player/AI moves modify it. Then, when it is time for the AI opponent to make a move, it consults the current board state and decides the move.
If your board state is just represented by elements on the page you'll need a way to scan it and calculate a useful in-memory... | Maybe start thinking in terms of a play-cycle, something like this :
1. (host) Broadcasts game state.
2. (host) Awaits confirmation from all clients that broadcast was received.
3. (clients) Render game state.
4. (host) Receives confirmations then informs next client (and hence its player) that it is his/her/its turn.... |
48,365,051 | I have spent the last four days studying promises, coroutines, fibers, continuations, etc.
I am still unable to see how to resolve my multiplayer turn-based card game moves, in which the starting player is effectively the game 'controller' of up to five, either AI or human players.
The code below works but has one pr... | 2018/01/21 | [
"https://Stackoverflow.com/questions/48365051",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1530235/"
] | Consider having a board state that is a global and player/AI moves modify it. Then, when it is time for the AI opponent to make a move, it consults the current board state and decides the move.
If your board state is just represented by elements on the page you'll need a way to scan it and calculate a useful in-memory... | The solution hinged around two things:-
1. separating the AI player code from the human player code;
2. adding and removing a window event that's triggered after a human's move is detected.
The condensed code now looks like this:-
```
// if this is game starter give each player a turn
if (joiner == "") {
// the... |
1,899,977 | [](https://i.stack.imgur.com/dmeLa.jpg)
So i have this solution for proving that the chromatic index of graph G, that is drawn on the image, equals 5.
I understand everything until that point, where i put "$?$" in circle.
I don't know what that means, also the ... | 2016/08/22 | [
"https://math.stackexchange.com/questions/1899977",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/246608/"
] | The proof is by contradiction. It assumes the graph can be edge colored using four colors. If each color class had at most four edges, then all the color classes together would contain at most $4\cdot4=16$ edges. But the graph has $18$ edges, so at least one color class must have at least five edges in it.
Now the fiv... | I think they mean there exists a color such that the number of edges of that color is at least $5$. Notice it's first assumed the chromatic index is $4$ so if each color had only $4$ or less edges of that color, you'd have at most $16$ edges, a contradiction since you have $18$ edges.
Since there exists $5$ edges of a... |
185,346 | I have a feeling this is a duplicate somewhere, but how can I ensure that TeX will keep scanning until `\relax` or something similar?
```
\documentclass{article}
\usepackage{xparse}
\pagestyle{empty}
\setlength\parindent{0pt}
\begin{document}
Plain:
\def\test#1/#2/#3{
year:#1 \newline
month:#2 \newline
da... | 2014/06/17 | [
"https://tex.stackexchange.com/questions/185346",
"https://tex.stackexchange.com",
"https://tex.stackexchange.com/users/17423/"
] | An argument is either delimited or undelimited; in the latter case only the first token or braced group is taken as the argument. Your `\test:w` macro has an undelimited third argument; delimit also the third argument and add the final delimiter in the `.code:n` part.
```
\documentclass{article}
\usepackage{xparse}
\... | Not sure what you need, perhaps:
```
\documentclass{article}
\usepackage{xparse}
\pagestyle{empty}
\setlength\parindent{0pt}
\begin{document}
Plain:
\def\test#1/#2/#3 {
year:#1 \newline
month:#2 \newline
day:#3 \newline
}
\test 01/02/03
\bigskip
Expl3:
\ExplSyntaxOn
\cs_new:Npn \test:w #1/#2/#3~{
... |
5,724 | I studied math and economics at a poorly ranked university, and I will graduate in the near future. I have a position lined up at a prestigious, data-heavy research institution, where I'll work with numerous economists for a few years before applying to top PhD programs (Berkeley, Chicago, MIT, Harvard, etc.) I took tw... | 2012/12/13 | [
"https://academia.stackexchange.com/questions/5724",
"https://academia.stackexchange.com",
"https://academia.stackexchange.com/users/4317/"
] | As the commenters have pointed out, a lot will depend on your ability to get good letters of recommendation. However, there is an important issue to note: a good letter of recommendation does **not** mean the same thing as "a letter from someone famous." You can get a letter of recommendation from a big name that is co... | *It will probably affect your chances. But it's not a show-stopper.*
Coming from a top school means students are more likely to get that second look and it means that students are more likely to have recommendations from people than the folks on the admission committee already know and trust. For those reasons, coming... |
5,724 | I studied math and economics at a poorly ranked university, and I will graduate in the near future. I have a position lined up at a prestigious, data-heavy research institution, where I'll work with numerous economists for a few years before applying to top PhD programs (Berkeley, Chicago, MIT, Harvard, etc.) I took tw... | 2012/12/13 | [
"https://academia.stackexchange.com/questions/5724",
"https://academia.stackexchange.com",
"https://academia.stackexchange.com/users/4317/"
] | As the commenters have pointed out, a lot will depend on your ability to get good letters of recommendation. However, there is an important issue to note: a good letter of recommendation does **not** mean the same thing as "a letter from someone famous." You can get a letter of recommendation from a big name that is co... | I would advise to develop a relationship via email with professors at your target schools. Dig in and learn about their research and show how interested you are in working with them. Also target assistant and associate professors at those schools as they are more likely to be in the admissions committee paying their du... |
5,724 | I studied math and economics at a poorly ranked university, and I will graduate in the near future. I have a position lined up at a prestigious, data-heavy research institution, where I'll work with numerous economists for a few years before applying to top PhD programs (Berkeley, Chicago, MIT, Harvard, etc.) I took tw... | 2012/12/13 | [
"https://academia.stackexchange.com/questions/5724",
"https://academia.stackexchange.com",
"https://academia.stackexchange.com/users/4317/"
] | As the commenters have pointed out, a lot will depend on your ability to get good letters of recommendation. However, there is an important issue to note: a good letter of recommendation does **not** mean the same thing as "a letter from someone famous." You can get a letter of recommendation from a big name that is co... | I have been in your situation several years ago (in 2011). I graduated BA in Economics and Business Adminsitration from anranked university from one of the developing countries in Eastern Europe. But then I enrolled in Master's Program where I had a chance to meet highly respected Economists who were professors in US p... |
5,724 | I studied math and economics at a poorly ranked university, and I will graduate in the near future. I have a position lined up at a prestigious, data-heavy research institution, where I'll work with numerous economists for a few years before applying to top PhD programs (Berkeley, Chicago, MIT, Harvard, etc.) I took tw... | 2012/12/13 | [
"https://academia.stackexchange.com/questions/5724",
"https://academia.stackexchange.com",
"https://academia.stackexchange.com/users/4317/"
] | *It will probably affect your chances. But it's not a show-stopper.*
Coming from a top school means students are more likely to get that second look and it means that students are more likely to have recommendations from people than the folks on the admission committee already know and trust. For those reasons, coming... | I would advise to develop a relationship via email with professors at your target schools. Dig in and learn about their research and show how interested you are in working with them. Also target assistant and associate professors at those schools as they are more likely to be in the admissions committee paying their du... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.