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
36,527,873
My Request looks something like this: User-Agent: Fiddler Content-Type: application/json; charset=utf-8 Host: localhost:12841 Content-Length: 4512954 Inside Body I have--> "*base64encoded String*" API Controller contains a method : ``` [HttpPost] public bool SaveProductImage([FromBody]string image) ...
2016/04/10
[ "https://Stackoverflow.com/questions/36527873", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4711916/" ]
Be sure to allow the application to receive large POSTs in your **web.config**. Here's an example for **10mb**. For **ASP.NET**. ```xml <system.web> <httpRuntime targetFramework="4.6" maxRequestLength="102400" executionTimeout="3600" /> </system.web> ``` For **IIS** ```xml <security> <requestFiltering> <r...
I fix it using this in the controller ``` [HttpPost] [RequestFormLimits(ValueLengthLimit = int.MaxValue)] ```
36,527,873
My Request looks something like this: User-Agent: Fiddler Content-Type: application/json; charset=utf-8 Host: localhost:12841 Content-Length: 4512954 Inside Body I have--> "*base64encoded String*" API Controller contains a method : ``` [HttpPost] public bool SaveProductImage([FromBody]string image) ...
2016/04/10
[ "https://Stackoverflow.com/questions/36527873", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4711916/" ]
this is my solution. in your web.config(in server) ``` ---------- <system.serviceModel> <serviceHostingEnvironment aspNetCompatibilityEnabled="true"/> <standardEndpoints> <webHttpEndpoint> <standardEndpoint name="" helpEnabled="true"automaticFormatSelectionEnabled="false" defaultOutgoingRespon...
I fix it using this in the controller ``` [HttpPost] [RequestFormLimits(ValueLengthLimit = int.MaxValue)] ```
34,979,260
I am trying to apply a class to an HTML element based on a click event. This works fine when setting the class property for the child component's selector from the parent component's template as seen by the following snippet from the parent component: ```ts [class.bordered]='isSelected(item)' ``` This will appropria...
2016/01/24
[ "https://Stackoverflow.com/questions/34979260", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1100640/" ]
I found a better way to solve this making good use of Angular2 features. Specifically instead of doing trickery with :host and CSS functionality you can just pass in a variable to the child component by changing: ``` [class.bordered]='isSelected(item)' ``` being set in the element of the child class change it to `...
Add a style to the `child-component` ```ts @Component({ selector: 'child-component', inputs: ['item'], template: ` <div class="This is where I really want to apply the style"> {{ item.val }} </div> `, styles: [` :host(.bordered) > div { // if this selector doesn't work use instead ...
34,979,260
I am trying to apply a class to an HTML element based on a click event. This works fine when setting the class property for the child component's selector from the parent component's template as seen by the following snippet from the parent component: ```ts [class.bordered]='isSelected(item)' ``` This will appropria...
2016/01/24
[ "https://Stackoverflow.com/questions/34979260", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1100640/" ]
Add a style to the `child-component` ```ts @Component({ selector: 'child-component', inputs: ['item'], template: ` <div class="This is where I really want to apply the style"> {{ item.val }} </div> `, styles: [` :host(.bordered) > div { // if this selector doesn't work use instead ...
Something like this works very nicely for me: ``` import { Component } from '@angular/core'; @Component({ selector: 'my-app', styleUrls: [ './app.component.css' ], template: ` <button (click)='buttonClick1()' [disabled] = "btnDisabled" [ngStyle]="{'color': (btnDisabled)? 'gray': 'black'}"> ...
34,979,260
I am trying to apply a class to an HTML element based on a click event. This works fine when setting the class property for the child component's selector from the parent component's template as seen by the following snippet from the parent component: ```ts [class.bordered]='isSelected(item)' ``` This will appropria...
2016/01/24
[ "https://Stackoverflow.com/questions/34979260", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1100640/" ]
I found a better way to solve this making good use of Angular2 features. Specifically instead of doing trickery with :host and CSS functionality you can just pass in a variable to the child component by changing: ``` [class.bordered]='isSelected(item)' ``` being set in the element of the child class change it to `...
Something like this works very nicely for me: ``` import { Component } from '@angular/core'; @Component({ selector: 'my-app', styleUrls: [ './app.component.css' ], template: ` <button (click)='buttonClick1()' [disabled] = "btnDisabled" [ngStyle]="{'color': (btnDisabled)? 'gray': 'black'}"> ...
44,054,266
I have a CMake project with next post\_build command: ``` add_custom_command(TARGET ncd_json POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/ncd.json $<TARGET_FILE_DIR:ncd_json>/ncd.json COMMENT "Copy...
2017/05/18
[ "https://Stackoverflow.com/questions/44054266", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3743145/" ]
Something like the following should do close to what you want: ``` add_custom_target(copyJson ALL COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_CURRENT_SOURCE_DIR}/ncd.json $<TARGET_FILE_DIR:ncd_json>/ncd.json ) add_dependencies(copyJson ncd_json) ``` It will only copy the file if...
While writing question I found a good answer [here](https://stackoverflow.com/a/31635069/3743145) ``` configure_file(input_file output_file COPYONLY) ``` or in my case ``` configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/ncd.json ${CMAKE_CURRENT_BINARY_DIR}/ncd.json COPYONLY ) ``` ...
13,021,825
I want to change properties of another object, when a method is called in another class. The code to change the properties of this object sits in a method of the first class, and works when calling it from it's own class, but when called from the other class the object in the method returns nil. *Here is the code:* ...
2012/10/23
[ "https://Stackoverflow.com/questions/13021825", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1265071/" ]
EDIT 2: Well, you shipped your code over to me, so now I can no longer say that I don't have enough information to solve your problem. Let's see. Now I see that your ViewController is the rootViewController of your app, like so: ``` - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSD...
``` #import "SDMenuViewController.h" #import "ViewController.h" - (void) item:(SDGroupCell *)item subItemDidChange:(SDSelectableCell *)subItem { ``` > > // why are we allocating this object here, if it is only required in case Checked : > > > ``` ViewController *firstViewController = [[[ViewController alloc...
13,021,825
I want to change properties of another object, when a method is called in another class. The code to change the properties of this object sits in a method of the first class, and works when calling it from it's own class, but when called from the other class the object in the method returns nil. *Here is the code:* ...
2012/10/23
[ "https://Stackoverflow.com/questions/13021825", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1265071/" ]
I think this may help you. At Your `AppDelegate` class, you have to declare an object of `ViewController` class. Make it as a property of the `YourAppDelegate` class. like below. (This would import `ViewController` class and creates a shared object of `YourAppDelegate` class so that you can access the members of `Your...
the problem is: ``` - (void) item:(SDGroupCell *)item subItemDidChange:(SDSelectableCell *)subItem { ViewController *firstViewController = [[[ViewController alloc] init] autorelease]; ... [firstViewController closeMenu]; } ``` When you call `closeMenu` from there, it is never initialized, because not...
13,021,825
I want to change properties of another object, when a method is called in another class. The code to change the properties of this object sits in a method of the first class, and works when calling it from it's own class, but when called from the other class the object in the method returns nil. *Here is the code:* ...
2012/10/23
[ "https://Stackoverflow.com/questions/13021825", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1265071/" ]
What you posted looks like: ``` -(void)closeMenu{ // menuView is never initialized, == nil [nil setFrame:CGRectMake(0, -0, 0, 0)]; NSLog(@"%f", 0); //returns height when method is called from it's own class. But returns 0 (nil) when called from the other class. } ``` So you are doing `NSLog(@"%f", 0);`...
try to remove **UIView \*menuView; //the object** from the interface file ``` @interface ViewController : UIViewController { // try to remove this line UIView *menuView; //the object } ``` and update this method ``` -(void)closeMenu{ [self.menuView setFrame:CGRectMake(self.menuView.frame.origin.x, -s...
13,021,825
I want to change properties of another object, when a method is called in another class. The code to change the properties of this object sits in a method of the first class, and works when calling it from it's own class, but when called from the other class the object in the method returns nil. *Here is the code:* ...
2012/10/23
[ "https://Stackoverflow.com/questions/13021825", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1265071/" ]
I think this may help you. At Your `AppDelegate` class, you have to declare an object of `ViewController` class. Make it as a property of the `YourAppDelegate` class. like below. (This would import `ViewController` class and creates a shared object of `YourAppDelegate` class so that you can access the members of `Your...
try to remove **UIView \*menuView; //the object** from the interface file ``` @interface ViewController : UIViewController { // try to remove this line UIView *menuView; //the object } ``` and update this method ``` -(void)closeMenu{ [self.menuView setFrame:CGRectMake(self.menuView.frame.origin.x, -s...
13,021,825
I want to change properties of another object, when a method is called in another class. The code to change the properties of this object sits in a method of the first class, and works when calling it from it's own class, but when called from the other class the object in the method returns nil. *Here is the code:* ...
2012/10/23
[ "https://Stackoverflow.com/questions/13021825", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1265071/" ]
I think this may help you. At Your `AppDelegate` class, you have to declare an object of `ViewController` class. Make it as a property of the `YourAppDelegate` class. like below. (This would import `ViewController` class and creates a shared object of `YourAppDelegate` class so that you can access the members of `Your...
There is a difference between `alloc-init`'ing a ViewController and `alloc-init`'ing that view controller's properties. Regarding your second example (calling from another class). Your current code indicates that you `alloc-init` firstViewController, but then don't do anything with it. Assuming you have not overriden ...
13,021,825
I want to change properties of another object, when a method is called in another class. The code to change the properties of this object sits in a method of the first class, and works when calling it from it's own class, but when called from the other class the object in the method returns nil. *Here is the code:* ...
2012/10/23
[ "https://Stackoverflow.com/questions/13021825", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1265071/" ]
EDIT 2: Well, you shipped your code over to me, so now I can no longer say that I don't have enough information to solve your problem. Let's see. Now I see that your ViewController is the rootViewController of your app, like so: ``` - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSD...
I suggest you use this: ``` if(menuView) { [menuView setFrame:CGRectMake(menuView.frame.origin.x, -menuView.frame.size.height, menuView.frame.size.width, menuView.frame.size.height)]; } else { NSLog(@"menuView is nil"); } ```
13,021,825
I want to change properties of another object, when a method is called in another class. The code to change the properties of this object sits in a method of the first class, and works when calling it from it's own class, but when called from the other class the object in the method returns nil. *Here is the code:* ...
2012/10/23
[ "https://Stackoverflow.com/questions/13021825", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1265071/" ]
I think this may help you. At Your `AppDelegate` class, you have to declare an object of `ViewController` class. Make it as a property of the `YourAppDelegate` class. like below. (This would import `ViewController` class and creates a shared object of `YourAppDelegate` class so that you can access the members of `Your...
I suggest you use this: ``` if(menuView) { [menuView setFrame:CGRectMake(menuView.frame.origin.x, -menuView.frame.size.height, menuView.frame.size.width, menuView.frame.size.height)]; } else { NSLog(@"menuView is nil"); } ```
13,021,825
I want to change properties of another object, when a method is called in another class. The code to change the properties of this object sits in a method of the first class, and works when calling it from it's own class, but when called from the other class the object in the method returns nil. *Here is the code:* ...
2012/10/23
[ "https://Stackoverflow.com/questions/13021825", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1265071/" ]
I think this may help you. At Your `AppDelegate` class, you have to declare an object of `ViewController` class. Make it as a property of the `YourAppDelegate` class. like below. (This would import `ViewController` class and creates a shared object of `YourAppDelegate` class so that you can access the members of `Your...
``` #import "SDMenuViewController.h" #import "ViewController.h" - (void) item:(SDGroupCell *)item subItemDidChange:(SDSelectableCell *)subItem { ``` > > // why are we allocating this object here, if it is only required in case Checked : > > > ``` ViewController *firstViewController = [[[ViewController alloc...
13,021,825
I want to change properties of another object, when a method is called in another class. The code to change the properties of this object sits in a method of the first class, and works when calling it from it's own class, but when called from the other class the object in the method returns nil. *Here is the code:* ...
2012/10/23
[ "https://Stackoverflow.com/questions/13021825", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1265071/" ]
the problem is: ``` - (void) item:(SDGroupCell *)item subItemDidChange:(SDSelectableCell *)subItem { ViewController *firstViewController = [[[ViewController alloc] init] autorelease]; ... [firstViewController closeMenu]; } ``` When you call `closeMenu` from there, it is never initialized, because not...
``` #import "SDMenuViewController.h" #import "ViewController.h" - (void) item:(SDGroupCell *)item subItemDidChange:(SDSelectableCell *)subItem { ``` > > // why are we allocating this object here, if it is only required in case Checked : > > > ``` ViewController *firstViewController = [[[ViewController alloc...
13,021,825
I want to change properties of another object, when a method is called in another class. The code to change the properties of this object sits in a method of the first class, and works when calling it from it's own class, but when called from the other class the object in the method returns nil. *Here is the code:* ...
2012/10/23
[ "https://Stackoverflow.com/questions/13021825", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1265071/" ]
EDIT 2: Well, you shipped your code over to me, so now I can no longer say that I don't have enough information to solve your problem. Let's see. Now I see that your ViewController is the rootViewController of your app, like so: ``` - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSD...
There is a difference between `alloc-init`'ing a ViewController and `alloc-init`'ing that view controller's properties. Regarding your second example (calling from another class). Your current code indicates that you `alloc-init` firstViewController, but then don't do anything with it. Assuming you have not overriden ...
31,669,238
Here is an array object that contains an array [body]. How do I get to know that this object has array inside and give me it's keys? ``` Array ( [6] => stdClass Object ( [vid] => 6 [uid] => 1 [title] => om [log] => [status] => 1 [comm...
2015/07/28
[ "https://Stackoverflow.com/questions/31669238", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2555662/" ]
You need to check whether the object has `body` property, `which is array` and `which should not be empty`. And fetch the keys it all three conditions fulfill. Use [is\_array(](http://php.net/manual/en/function.is-array.php)), [array\_keys()](http://php.net/manual/en/function.array-keys.php) and [isset()](http://php....
Considering `$main_array` as your given result. Try this ``` if( is_array($main_array->body) ) { // do your process } ```
31,669,238
Here is an array object that contains an array [body]. How do I get to know that this object has array inside and give me it's keys? ``` Array ( [6] => stdClass Object ( [vid] => 6 [uid] => 1 [title] => om [log] => [status] => 1 [comm...
2015/07/28
[ "https://Stackoverflow.com/questions/31669238", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2555662/" ]
Considering `$main_array` as your given result. Try this ``` if( is_array($main_array->body) ) { // do your process } ```
Check if it is an array with: <http://php.net/manual/de/function.is-array.php>
31,669,238
Here is an array object that contains an array [body]. How do I get to know that this object has array inside and give me it's keys? ``` Array ( [6] => stdClass Object ( [vid] => 6 [uid] => 1 [title] => om [log] => [status] => 1 [comm...
2015/07/28
[ "https://Stackoverflow.com/questions/31669238", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2555662/" ]
You need to check whether the object has `body` property, `which is array` and `which should not be empty`. And fetch the keys it all three conditions fulfill. Use [is\_array(](http://php.net/manual/en/function.is-array.php)), [array\_keys()](http://php.net/manual/en/function.array-keys.php) and [isset()](http://php....
Check if it is an array with: <http://php.net/manual/de/function.is-array.php>
55,085,683
My main model `Tag` has a one-to-many relationship with `Product` where one `Tag` can have many `Products` assigned to them via `tag_id` relationship on the DB. On my edit view, I am allowing users to edit the tag `products`. These products can be added/edited/deleted on the form request. Each `product` field on the ...
2019/03/10
[ "https://Stackoverflow.com/questions/55085683", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5986598/" ]
As per my view, you are on the wrong track. Tagging relationship should be **Many To Many.** You must check about `sync()` method of Laravel in ManyToMany relationship. Please check this: <https://laravel.com/docs/5.8/eloquent-relationships#many-to-many> **Notes:** Please add codes as per your business logic. **Prod...
Normally I do something similar on the frontend side ``` <div class="product"> <!-- For Products that may be edited --> <input type="hidden" name="id" value={{$product->id??0}}> <input type="hidden" name="action" value="update"> <input type="text" name="title" value={{$product->title}}> ... </div> <d...
4,344,940
I'm developing a C# asp.net web application. I'm basically done with it, but I have this little problem. I want to save xml files to the "Users" folder within my project, but if I don't psychically hard code the path "C:......\Users" in my project it wants to save the file in this "C:\Program Files (x86)\Common Files\m...
2010/12/03
[ "https://Stackoverflow.com/questions/4344940", "https://Stackoverflow.com", "https://Stackoverflow.com/users/529272/" ]
You don't want to use the working directory at all; you want to use a directory relative to where the web application is located (which can be retrieved from [`HttpRequest.ApplicationPath`](http://msdn.microsoft.com/en-us/library/system.web.httprequest.applicationpath.aspx). ``` HttpRequest request = HttpContext.Curre...
That did fix the one problem I'm having, but the downloads are still not downloading from the right place, the program still wants to get the files from "C:\Program Files (x86)\Common Files\microsoft shared\DevServer\10.0\" directory here is the code I'm using --Code to populate the checkbox-- ``` HttpRequest request...
51,881,728
``` a=['abc', '234', 'wdg', '220', '400', '395', '230', '350', ' ', '300', '300', '340', '420', '190', '300', '380', '270', 'wdg', '350', '380'] for i in range(len(a)): if a[i]=="wdg": a.pop(i) print(a) ``` When I run these code, the error message shows" IndexError: list index out of range".(in li...
2018/08/16
[ "https://Stackoverflow.com/questions/51881728", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10043318/" ]
Do not remove items from list while iterating through it. Every time, you `pop` from list, the length of list reduces by one. But you never account for this change in your loop. This causes `list index out of range` and stops your program abruptly. A more secure and effective way is to use a list-comprehension like be...
The list is getting shorter every time you pop an item, so by the time you get to the end, the index is longer than the length of the list. Try a list comprehension: ``` newList=[x for x in a if x!="wdg"] ```
51,881,728
``` a=['abc', '234', 'wdg', '220', '400', '395', '230', '350', ' ', '300', '300', '340', '420', '190', '300', '380', '270', 'wdg', '350', '380'] for i in range(len(a)): if a[i]=="wdg": a.pop(i) print(a) ``` When I run these code, the error message shows" IndexError: list index out of range".(in li...
2018/08/16
[ "https://Stackoverflow.com/questions/51881728", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10043318/" ]
To remove an element you can do: ``` >>> a = ['a', 'b', 'c', 'd'] >>> a.remove('b') >>> print a ['a', 'c', 'd'] ``` The error is occurring because you are iterating over a sequence of numbers - the original size of the list. Once the list shrinks, the index no longer exists. I would recommend iterating over the ele...
The list is getting shorter every time you pop an item, so by the time you get to the end, the index is longer than the length of the list. Try a list comprehension: ``` newList=[x for x in a if x!="wdg"] ```
51,881,728
``` a=['abc', '234', 'wdg', '220', '400', '395', '230', '350', ' ', '300', '300', '340', '420', '190', '300', '380', '270', 'wdg', '350', '380'] for i in range(len(a)): if a[i]=="wdg": a.pop(i) print(a) ``` When I run these code, the error message shows" IndexError: list index out of range".(in li...
2018/08/16
[ "https://Stackoverflow.com/questions/51881728", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10043318/" ]
To remove an element you can do: ``` >>> a = ['a', 'b', 'c', 'd'] >>> a.remove('b') >>> print a ['a', 'c', 'd'] ``` The error is occurring because you are iterating over a sequence of numbers - the original size of the list. Once the list shrinks, the index no longer exists. I would recommend iterating over the ele...
Do not remove items from list while iterating through it. Every time, you `pop` from list, the length of list reduces by one. But you never account for this change in your loop. This causes `list index out of range` and stops your program abruptly. A more secure and effective way is to use a list-comprehension like be...
51,881,728
``` a=['abc', '234', 'wdg', '220', '400', '395', '230', '350', ' ', '300', '300', '340', '420', '190', '300', '380', '270', 'wdg', '350', '380'] for i in range(len(a)): if a[i]=="wdg": a.pop(i) print(a) ``` When I run these code, the error message shows" IndexError: list index out of range".(in li...
2018/08/16
[ "https://Stackoverflow.com/questions/51881728", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10043318/" ]
Do not remove items from list while iterating through it. Every time, you `pop` from list, the length of list reduces by one. But you never account for this change in your loop. This causes `list index out of range` and stops your program abruptly. A more secure and effective way is to use a list-comprehension like be...
Since you measure the lenght of the list *before* the for loop, and you remove items *during* the for loop, your `len(list)` becomes wrong during iteration. That's why you run out of range. A simple way would be to iterate the list *in reverse* eg `for i in reversed(range(len(mylist)))`. That way, when you are removing...
51,881,728
``` a=['abc', '234', 'wdg', '220', '400', '395', '230', '350', ' ', '300', '300', '340', '420', '190', '300', '380', '270', 'wdg', '350', '380'] for i in range(len(a)): if a[i]=="wdg": a.pop(i) print(a) ``` When I run these code, the error message shows" IndexError: list index out of range".(in li...
2018/08/16
[ "https://Stackoverflow.com/questions/51881728", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10043318/" ]
To remove an element you can do: ``` >>> a = ['a', 'b', 'c', 'd'] >>> a.remove('b') >>> print a ['a', 'c', 'd'] ``` The error is occurring because you are iterating over a sequence of numbers - the original size of the list. Once the list shrinks, the index no longer exists. I would recommend iterating over the ele...
Since you measure the lenght of the list *before* the for loop, and you remove items *during* the for loop, your `len(list)` becomes wrong during iteration. That's why you run out of range. A simple way would be to iterate the list *in reverse* eg `for i in reversed(range(len(mylist)))`. That way, when you are removing...
77,019
Most PhD students I know have the problem that their supervisor is not involved enough. I have a different problem, my supervisor is too involved. He wants to be a co author on all three of my PhD papers, and to get them published. I know that this sounds great, but I do not want to free ride on my supervisors work,...
2016/09/17
[ "https://academia.stackexchange.com/questions/77019", "https://academia.stackexchange.com", "https://academia.stackexchange.com/users/61988/" ]
You seem to have a lot of problems with this: > > He wants to be a co author on all three of my PhD papers, and to get them published. > > > I do not know what your field is and what are the conventions there, but in all of the fields I am familiar with, this is not a bad thing. Having your supervisor as a co-aut...
First off, please be aware that I have not personally put to practice the advice I am offering; this is more of an after-the-fact "I should have done that" situation. I assume that the papers you publish will be part of your thesis. I don't know enough about job-market papers or the significance of sole authorship in ...
77,019
Most PhD students I know have the problem that their supervisor is not involved enough. I have a different problem, my supervisor is too involved. He wants to be a co author on all three of my PhD papers, and to get them published. I know that this sounds great, but I do not want to free ride on my supervisors work,...
2016/09/17
[ "https://academia.stackexchange.com/questions/77019", "https://academia.stackexchange.com", "https://academia.stackexchange.com/users/61988/" ]
I feel you! Being a phd researcher in social sciences isn't what I expected. It is more about doing things the right way than it is being innovative or creative. This right way is where our kind supervisors try to guide us for the articles to be published. If and when you come up with a special idea you want to do your...
Your's is not an isolated case. In my experience, what works best is to be assertive and convey him your intellectual capacities. Such degree of involvement indicates that he feels more prepared than you to do the work, show him that you have very relevant things to offer. This is a challenging task, the key is on logi...
77,019
Most PhD students I know have the problem that their supervisor is not involved enough. I have a different problem, my supervisor is too involved. He wants to be a co author on all three of my PhD papers, and to get them published. I know that this sounds great, but I do not want to free ride on my supervisors work,...
2016/09/17
[ "https://academia.stackexchange.com/questions/77019", "https://academia.stackexchange.com", "https://academia.stackexchange.com/users/61988/" ]
The first part (rewriting your text) is quite frequent. Believe it or not, most PhD students are terrible writers and though a good adviser would patiently go over the paper with a student pointing out the presentation flaws and asking the student to fix them himself (take my word for it, you do not want to get that li...
You seem to have a lot of problems with this: > > He wants to be a co author on all three of my PhD papers, and to get them published. > > > I do not know what your field is and what are the conventions there, but in all of the fields I am familiar with, this is not a bad thing. Having your supervisor as a co-aut...
77,019
Most PhD students I know have the problem that their supervisor is not involved enough. I have a different problem, my supervisor is too involved. He wants to be a co author on all three of my PhD papers, and to get them published. I know that this sounds great, but I do not want to free ride on my supervisors work,...
2016/09/17
[ "https://academia.stackexchange.com/questions/77019", "https://academia.stackexchange.com", "https://academia.stackexchange.com/users/61988/" ]
You seem to have a lot of problems with this: > > He wants to be a co author on all three of my PhD papers, and to get them published. > > > I do not know what your field is and what are the conventions there, but in all of the fields I am familiar with, this is not a bad thing. Having your supervisor as a co-aut...
I feel you! Being a phd researcher in social sciences isn't what I expected. It is more about doing things the right way than it is being innovative or creative. This right way is where our kind supervisors try to guide us for the articles to be published. If and when you come up with a special idea you want to do your...
77,019
Most PhD students I know have the problem that their supervisor is not involved enough. I have a different problem, my supervisor is too involved. He wants to be a co author on all three of my PhD papers, and to get them published. I know that this sounds great, but I do not want to free ride on my supervisors work,...
2016/09/17
[ "https://academia.stackexchange.com/questions/77019", "https://academia.stackexchange.com", "https://academia.stackexchange.com/users/61988/" ]
The first part (rewriting your text) is quite frequent. Believe it or not, most PhD students are terrible writers and though a good adviser would patiently go over the paper with a student pointing out the presentation flaws and asking the student to fix them himself (take my word for it, you do not want to get that li...
Your's is not an isolated case. In my experience, what works best is to be assertive and convey him your intellectual capacities. Such degree of involvement indicates that he feels more prepared than you to do the work, show him that you have very relevant things to offer. This is a challenging task, the key is on logi...
77,019
Most PhD students I know have the problem that their supervisor is not involved enough. I have a different problem, my supervisor is too involved. He wants to be a co author on all three of my PhD papers, and to get them published. I know that this sounds great, but I do not want to free ride on my supervisors work,...
2016/09/17
[ "https://academia.stackexchange.com/questions/77019", "https://academia.stackexchange.com", "https://academia.stackexchange.com/users/61988/" ]
Regarding the argument of an article as a single article (to get a job), I doubt that, at least in my field (chemical engineering). Every supervisor is different, so I'll just focus on my own process as a Ph.D. student and I will hope it helps you in any way. I published 6 articles on my direct Ph.D.; 4 as a first au...
I think this is a great question, thanks for coming up with it. What you report is common -- though not widespread --, **advisor** behaviour in my field. I have, myself done this. And I believe it is not productive behaviour for the advisee for the exact reason you state, feeling "(...) very uncomfortable about this,...
77,019
Most PhD students I know have the problem that their supervisor is not involved enough. I have a different problem, my supervisor is too involved. He wants to be a co author on all three of my PhD papers, and to get them published. I know that this sounds great, but I do not want to free ride on my supervisors work,...
2016/09/17
[ "https://academia.stackexchange.com/questions/77019", "https://academia.stackexchange.com", "https://academia.stackexchange.com/users/61988/" ]
Regarding the argument of an article as a single article (to get a job), I doubt that, at least in my field (chemical engineering). Every supervisor is different, so I'll just focus on my own process as a Ph.D. student and I will hope it helps you in any way. I published 6 articles on my direct Ph.D.; 4 as a first au...
Your's is not an isolated case. In my experience, what works best is to be assertive and convey him your intellectual capacities. Such degree of involvement indicates that he feels more prepared than you to do the work, show him that you have very relevant things to offer. This is a challenging task, the key is on logi...
77,019
Most PhD students I know have the problem that their supervisor is not involved enough. I have a different problem, my supervisor is too involved. He wants to be a co author on all three of my PhD papers, and to get them published. I know that this sounds great, but I do not want to free ride on my supervisors work,...
2016/09/17
[ "https://academia.stackexchange.com/questions/77019", "https://academia.stackexchange.com", "https://academia.stackexchange.com/users/61988/" ]
Your's is not an isolated case. In my experience, what works best is to be assertive and convey him your intellectual capacities. Such degree of involvement indicates that he feels more prepared than you to do the work, show him that you have very relevant things to offer. This is a challenging task, the key is on logi...
First off, please be aware that I have not personally put to practice the advice I am offering; this is more of an after-the-fact "I should have done that" situation. I assume that the papers you publish will be part of your thesis. I don't know enough about job-market papers or the significance of sole authorship in ...
77,019
Most PhD students I know have the problem that their supervisor is not involved enough. I have a different problem, my supervisor is too involved. He wants to be a co author on all three of my PhD papers, and to get them published. I know that this sounds great, but I do not want to free ride on my supervisors work,...
2016/09/17
[ "https://academia.stackexchange.com/questions/77019", "https://academia.stackexchange.com", "https://academia.stackexchange.com/users/61988/" ]
I feel you! Being a phd researcher in social sciences isn't what I expected. It is more about doing things the right way than it is being innovative or creative. This right way is where our kind supervisors try to guide us for the articles to be published. If and when you come up with a special idea you want to do your...
First off, please be aware that I have not personally put to practice the advice I am offering; this is more of an after-the-fact "I should have done that" situation. I assume that the papers you publish will be part of your thesis. I don't know enough about job-market papers or the significance of sole authorship in ...
77,019
Most PhD students I know have the problem that their supervisor is not involved enough. I have a different problem, my supervisor is too involved. He wants to be a co author on all three of my PhD papers, and to get them published. I know that this sounds great, but I do not want to free ride on my supervisors work,...
2016/09/17
[ "https://academia.stackexchange.com/questions/77019", "https://academia.stackexchange.com", "https://academia.stackexchange.com/users/61988/" ]
Regarding the argument of an article as a single article (to get a job), I doubt that, at least in my field (chemical engineering). Every supervisor is different, so I'll just focus on my own process as a Ph.D. student and I will hope it helps you in any way. I published 6 articles on my direct Ph.D.; 4 as a first au...
This post really resonates with me as I have been in the same situation for now 6+ years as PhD and now Postdoc under a similar supervisor. I disagree with some of the comments above that imply the goal of a PhD program is simply to get papers accepted. Papers are important but the purpose of a PhD program is to develo...
3,000
I work currently as an IT contractor through a placement agency in Massachusetts, as a sole proprietor. I do not have any sort of liability insurance, or "workers comp" insurance for that matter. I recently applied for a consulting position with a company in Connecticut, and when they asked if I was looking for a perm...
2015/03/12
[ "https://freelancing.stackexchange.com/questions/3000", "https://freelancing.stackexchange.com", "https://freelancing.stackexchange.com/users/-1/" ]
This is quite a strange request honestly. It is even stranger if you have a proper corporation/LLC that you have established. As a 1099 (sole proprietor) contractor, some of this could be attempting to force you to have the same insurance as the employer. There are a few things that I can think of as to why they requ...
I have not had a "company" ask me anything about my insurance before. But every time I've proposed work for a government agency (A city or county in California) they have required insurance. Sometimes they will waive it. Sometimes not. But it's not as high as what this company wants of you. (Are you driving a truck for...
3,000
I work currently as an IT contractor through a placement agency in Massachusetts, as a sole proprietor. I do not have any sort of liability insurance, or "workers comp" insurance for that matter. I recently applied for a consulting position with a company in Connecticut, and when they asked if I was looking for a perm...
2015/03/12
[ "https://freelancing.stackexchange.com/questions/3000", "https://freelancing.stackexchange.com", "https://freelancing.stackexchange.com/users/-1/" ]
This is a complicated area and the answers vary from state to state in the US also the contracting firm paying you on the 1099 might have there own idiosyncrasies based on the state where they are incorporated, or the municipality where the contract client is located, or just stuff that happened to them in the past. I...
I have not had a "company" ask me anything about my insurance before. But every time I've proposed work for a government agency (A city or county in California) they have required insurance. Sometimes they will waive it. Sometimes not. But it's not as high as what this company wants of you. (Are you driving a truck for...
27,777,092
I am creating a json response in golang.I have a question that i am able to generate a json such as : ``` { "Name" : "Country", "Value" : "abc" } ``` The value of name and value can change based on the user and the struct I am using is like: ``` type xAxis struct { Name string, Value string } ``` I want m...
2015/01/05
[ "https://Stackoverflow.com/questions/27777092", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3481046/" ]
you can override the way Go's json package marshals a struct by writing a custom `MarshalJSON` function: ``` type xAxis struct { Name string Value string } func (a xAxis) MarshalJSON() ([]byte, error) { return json.Marshal(map[string]interface{}{a.Name: a.Value}) } ``` to try it: <http://play.golang.or...
The `encoding/json` package allows you to use a map instead of a struct. That's probably not as performant as structures, but it works. ``` data := map[string]string { "Country": "abc", "Foo": "bar", } // Creating JSON from a map j, err := json.Marshal(data) if err != nil { log.Fatal(err) } fmt.Println(s...
42,515,859
So I am trying to get my head around AWS Cognito but I have hit some walls. So, right now I can register an account, and verify it and sign in. Simple enough. The edge cases are where my walls are. Here's the info I have so far: * `username`'s cannot be changed once created * I am using UUIDs as my `username` values...
2017/02/28
[ "https://Stackoverflow.com/questions/42515859", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1060314/" ]
You are correct. Another solution is to create a lambda (not triggered by preSignUp) and called whenever the user finished typing into the email field. And getting a response "This email is already used" or "This email is available" before even sending the sign-up event. Referring the first part of your question. If t...
Knowing that this is an old question, here's a solution for posterity... I am using generated UUIDs for usernames, just like you, undisclosed to the user. When the user wants to confirm the code at a later time (or perhaps ask to resend it), he doesn't know the username but he does know the email address that he regis...
10,269,764
I have a problem that I've searched the internet for a solution for with no avail. I'm following along in chapter 10 of Apress' Beginning iOS 5 development which is on storyboards. I'm thinking the book is missing a simple piece of code and since I'm going through this for the first time, I don't know how to resolve ...
2012/04/22
[ "https://Stackoverflow.com/questions/10269764", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1349737/" ]
You need to enclose your function using raw pointers in an `unsafe` block. ``` unsafe { //your code } ```
Perhaps I've missed it, but you don't appear to be doing anything that actually requires the use of a `int*`. Why not simply pass it an int array and change the ParseBits function signature to: `public int ParseBits(string bits, **int[]** buffer)` and remove the `unsafe{ ... }` blocks altogether.
10,269,764
I have a problem that I've searched the internet for a solution for with no avail. I'm following along in chapter 10 of Apress' Beginning iOS 5 development which is on storyboards. I'm thinking the book is missing a simple piece of code and since I'm going through this for the first time, I don't know how to resolve ...
2012/04/22
[ "https://Stackoverflow.com/questions/10269764", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1349737/" ]
You need to enclose your function using raw pointers in an `unsafe` block. ``` unsafe { //your code } ```
I had the same problem, but it wasn't solved by any of the other answers up here. I kept getting different errors. Whatever functions use unsafe code simply need to be declared with the "unsafe" keyword. For example: ``` static unsafe void myFunction(int* myInt, float* myFloat) { // Function definition } `...
10,269,764
I have a problem that I've searched the internet for a solution for with no avail. I'm following along in chapter 10 of Apress' Beginning iOS 5 development which is on storyboards. I'm thinking the book is missing a simple piece of code and since I'm going through this for the first time, I don't know how to resolve ...
2012/04/22
[ "https://Stackoverflow.com/questions/10269764", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1349737/" ]
Perhaps I've missed it, but you don't appear to be doing anything that actually requires the use of a `int*`. Why not simply pass it an int array and change the ParseBits function signature to: `public int ParseBits(string bits, **int[]** buffer)` and remove the `unsafe{ ... }` blocks altogether.
I had the same problem, but it wasn't solved by any of the other answers up here. I kept getting different errors. Whatever functions use unsafe code simply need to be declared with the "unsafe" keyword. For example: ``` static unsafe void myFunction(int* myInt, float* myFloat) { // Function definition } `...
69,946,919
To explain my problem, I'm a beginner in Python and I've got to do a loop in Python to make an automatic map production in Qgis. There are 2 facts. The first is that I'm using the French Government's API called "Addresses" that return addresses (and many data linked to this address) from geographic coordinates. When I ...
2021/11/12
[ "https://Stackoverflow.com/questions/69946919", "https://Stackoverflow.com", "https://Stackoverflow.com/users/17397602/" ]
My answer includes the potential for skipped steps which OP mentioned in comments. Rather than using a strictly matching sequence this approach looks for adjacent pairs where the preceding step was numbered higher: ``` with A as ( select *, case status when 'CLICKED' then 1 ...
Here is one way using some string aggregation and manipulations. This works as expected against the sample data and also accounts for edge cases that include skipping status, missing status, and single status. ``` with cte as (select *,listagg(status,'>') within group (order by datetime,charindex(status,'CLICKED>CLAI...
69,946,919
To explain my problem, I'm a beginner in Python and I've got to do a loop in Python to make an automatic map production in Qgis. There are 2 facts. The first is that I'm using the French Government's API called "Addresses" that return addresses (and many data linked to this address) from geographic coordinates. When I ...
2021/11/12
[ "https://Stackoverflow.com/questions/69946919", "https://Stackoverflow.com", "https://Stackoverflow.com/users/17397602/" ]
Using ARRAY\_AGG ordered by datetime: ``` SELECT number_id, ARRAY_AGG(status) WITHIN GROUP(ORDER BY datetime) AS statuses, -- debug CASE WHEN ARRAY_AGG(status) WITHIN GROUP(ORDER BY datetime) IN (ARRAY_CONSTRUCT('CLICKED', 'CLAIMED', 'BOUGHT'), ARRAY_CONSTRUCT('CLICKED', 'CLAIMED')) THE...
Here is one way using some string aggregation and manipulations. This works as expected against the sample data and also accounts for edge cases that include skipping status, missing status, and single status. ``` with cte as (select *,listagg(status,'>') within group (order by datetime,charindex(status,'CLICKED>CLAI...
43,332,208
**UPDATE: PROBLEM FIXED** - The ActionBar was covering the first item on the list. **SOLUTION:** [Android AppBarLayout overlaps listview](https://stackoverflow.com/questions/32653767/android-appbarlayout-overlaps-listview) In my program, I am retrieving data from the database and displaying it using List View. Howev...
2017/04/10
[ "https://Stackoverflow.com/questions/43332208", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4242616/" ]
Try changing ``` while(res.moveToNext()){ buffer.add(res.getString(1)); }; ``` to Edit: change the while so it increments after: ``` do { buffer.add(res.getString(1)); } while (cursor.moveToNext()); ```
Personally, I would recommend a `CursorAdapter` when using a database. ``` lv = (ListView) findViewById(R.id.idListView); String from = { COLUMN_NAME }; int[] to = { android.R.id.text1 }; SimpleCursorAdapter adapter = new SimpleCursorAdapter(this, android.R.layout.simple_list_item_1, myDb.getAllData...
43,332,208
**UPDATE: PROBLEM FIXED** - The ActionBar was covering the first item on the list. **SOLUTION:** [Android AppBarLayout overlaps listview](https://stackoverflow.com/questions/32653767/android-appbarlayout-overlaps-listview) In my program, I am retrieving data from the database and displaying it using List View. Howev...
2017/04/10
[ "https://Stackoverflow.com/questions/43332208", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4242616/" ]
Try changing ``` while(res.moveToNext()){ buffer.add(res.getString(1)); }; ``` to Edit: change the while so it increments after: ``` do { buffer.add(res.getString(1)); } while (cursor.moveToNext()); ```
Try out this this code may be useful for fetching data from db using cursor. ``` public ArrayList<BasicInfo> getFetchBasicInfo() { ArrayList<BasicInfo> data = new ArrayList<BasicInfo>(); String sql = "select * from basic_info; Cursor c = fetchData(sql); if (c != null) { while (c.moveToNex...
31,322,347
I need a fast way to check if a 2d array is entirely adjacent, meaning all values are adjacent to other same values. Adjacent means the four cardinal directions. ``` This would be an adjacent array [1 1 2] [1 2 2] [3 3 3] This isn't [1 2 1] [1 2 2] [3 3 3] This is [1 2 4] [1 2 2] [3 3 3] ``` So far, I've tried an ...
2015/07/09
[ "https://Stackoverflow.com/questions/31322347", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3273194/" ]
I'm reminded of the game Minesweeper. 1. Outer loop: Scan the entire array (row by row, from left to right). This is to find the next position for the inner loop. If we have not visited this position from the inner loop, and the number at this position has not yet been seen, start the inner loop at this position. If ...
Since, I assume, similar values can be arbitrarily far from each other, and can take any shape, in the matrix I don't see how you do it with out first computing the connected components of the values: 1. Find the [connected components labeling](https://en.wikipedia.org/wiki/Connected-component_labeling) of your matrix...
31,322,347
I need a fast way to check if a 2d array is entirely adjacent, meaning all values are adjacent to other same values. Adjacent means the four cardinal directions. ``` This would be an adjacent array [1 1 2] [1 2 2] [3 3 3] This isn't [1 2 1] [1 2 2] [3 3 3] This is [1 2 4] [1 2 2] [3 3 3] ``` So far, I've tried an ...
2015/07/09
[ "https://Stackoverflow.com/questions/31322347", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3273194/" ]
Since, I assume, similar values can be arbitrarily far from each other, and can take any shape, in the matrix I don't see how you do it with out first computing the connected components of the values: 1. Find the [connected components labeling](https://en.wikipedia.org/wiki/Connected-component_labeling) of your matrix...
I just want to mention that you can't create an algorithm which is better than `O(M*N)`(of course this is worst case complexity), because in worst case you will have to visit all the elements. As you said your `O(M*N)` algorithm does not work for all cases, you can solve this using BFS and `Time complexity is O(M*N)` ...
31,322,347
I need a fast way to check if a 2d array is entirely adjacent, meaning all values are adjacent to other same values. Adjacent means the four cardinal directions. ``` This would be an adjacent array [1 1 2] [1 2 2] [3 3 3] This isn't [1 2 1] [1 2 2] [3 3 3] This is [1 2 4] [1 2 2] [3 3 3] ``` So far, I've tried an ...
2015/07/09
[ "https://Stackoverflow.com/questions/31322347", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3273194/" ]
I'm reminded of the game Minesweeper. 1. Outer loop: Scan the entire array (row by row, from left to right). This is to find the next position for the inner loop. If we have not visited this position from the inner loop, and the number at this position has not yet been seen, start the inner loop at this position. If ...
I just want to mention that you can't create an algorithm which is better than `O(M*N)`(of course this is worst case complexity), because in worst case you will have to visit all the elements. As you said your `O(M*N)` algorithm does not work for all cases, you can solve this using BFS and `Time complexity is O(M*N)` ...
146
How should we deal with questions that are posted simultaneously at Unix.SE and another Stack Exchange site? I've found some discussion on [Meta Stack Overflow](http://meta.stackoverflow.com), but no official policy: * [Cross-posting on StackExchange sites](https://meta.stackexchange.com/questions/65931/cross-posting...
2010/09/19
[ "https://unix.meta.stackexchange.com/questions/146", "https://unix.meta.stackexchange.com", "https://unix.meta.stackexchange.com/users/885/" ]
At the moment we don't deal with it at all. We can't migrate then merge... or anything like that. Basically our hands are tied. Plus I've no interest in watching for cross posting. Actually I've been encouraging cross posting due to lack of migration capabilities in a way. Since I tell people "you'd be better off askin...
I think if someone posts an Ubuntu-specific question both here and on Ask Ubuntu, it should be closed here. I say this because I really care about quality, and Ubuntu folk are surely going to give a superior Answer (and it's a larger community too, so will have a quicker response). As for Super User, I think both Ask ...
146
How should we deal with questions that are posted simultaneously at Unix.SE and another Stack Exchange site? I've found some discussion on [Meta Stack Overflow](http://meta.stackoverflow.com), but no official policy: * [Cross-posting on StackExchange sites](https://meta.stackexchange.com/questions/65931/cross-posting...
2010/09/19
[ "https://unix.meta.stackexchange.com/questions/146", "https://unix.meta.stackexchange.com", "https://unix.meta.stackexchange.com/users/885/" ]
We're in line with the SE policy on this now; the [FAQ](https://unix.stackexchange.com/faq) explicitly discourages cross-posting: > > Cross-posting is [strongly discouraged](https://meta.stackexchange.com/questions/71938/can-i-cross-post-my-question-from-one-site-to-another/71949#71949) -- if you post on one site and...
At the moment we don't deal with it at all. We can't migrate then merge... or anything like that. Basically our hands are tied. Plus I've no interest in watching for cross posting. Actually I've been encouraging cross posting due to lack of migration capabilities in a way. Since I tell people "you'd be better off askin...
146
How should we deal with questions that are posted simultaneously at Unix.SE and another Stack Exchange site? I've found some discussion on [Meta Stack Overflow](http://meta.stackoverflow.com), but no official policy: * [Cross-posting on StackExchange sites](https://meta.stackexchange.com/questions/65931/cross-posting...
2010/09/19
[ "https://unix.meta.stackexchange.com/questions/146", "https://unix.meta.stackexchange.com", "https://unix.meta.stackexchange.com/users/885/" ]
We're in line with the SE policy on this now; the [FAQ](https://unix.stackexchange.com/faq) explicitly discourages cross-posting: > > Cross-posting is [strongly discouraged](https://meta.stackexchange.com/questions/71938/can-i-cross-post-my-question-from-one-site-to-another/71949#71949) -- if you post on one site and...
I think if someone posts an Ubuntu-specific question both here and on Ask Ubuntu, it should be closed here. I say this because I really care about quality, and Ubuntu folk are surely going to give a superior Answer (and it's a larger community too, so will have a quicker response). As for Super User, I think both Ask ...
110,318
[![Guitar studies excerpt](https://i.stack.imgur.com/jLb87.png)](https://i.stack.imgur.com/jLb87.png) I am trying to learn how to read sheet music for my guitar. I am starting with this beginner exercise, but I am confused on how I am supposed to know, for example, which F note to play when it comes up on the sheet mu...
2021/01/30
[ "https://music.stackexchange.com/questions/110318", "https://music.stackexchange.com", "https://music.stackexchange.com/users/74815/" ]
Because these exercises are to be played entirely in first position, each F indicated has only one option. The lowest F, for example (the second note of the first exercise), can only be played on the first fret of the 6th string. Here's a chart that may be helpful: [![Natural notes in first position](https://i.stack....
Answering directly, there are 3 F notes in that music. Since the whole exercise is in first position, open, 1st, 2nd, 3rd 4th and for the very highest note, A, the 5th fret are used. There is only one place on guitar for the lowest F - the second note shown - and that is 6th string, 1st fret. The F in the bottom space ...
110,318
[![Guitar studies excerpt](https://i.stack.imgur.com/jLb87.png)](https://i.stack.imgur.com/jLb87.png) I am trying to learn how to read sheet music for my guitar. I am starting with this beginner exercise, but I am confused on how I am supposed to know, for example, which F note to play when it comes up on the sheet mu...
2021/01/30
[ "https://music.stackexchange.com/questions/110318", "https://music.stackexchange.com", "https://music.stackexchange.com/users/74815/" ]
Because these exercises are to be played entirely in first position, each F indicated has only one option. The lowest F, for example (the second note of the first exercise), can only be played on the first fret of the 6th string. Here's a chart that may be helpful: [![Natural notes in first position](https://i.stack....
You are in the first position and there is no duplicate of notes in the first position with the exception of the B on the 4th fret of the G string and the corresponding open string. It is not enough to ask "what F do I play", you also want to understand which octave you are in. While there may be 3 F's in the first po...
10,621,383
Using JQuery, I created a simple date text field with `dateFormat: "mmddyy"`. There is no problem in the way it works. But the corresponding database field is of type DATE and stores the value in "YYYY-MM-DD" format. So, when I read the value from database and set it to the date text field, the date format appears to b...
2012/05/16
[ "https://Stackoverflow.com/questions/10621383", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1158189/" ]
Set the target's build settings as follows: ``` GCC_PRECOMPILE_PREFIX_HEADER=YES GCC_PREFIX_HEADER="Prefix.pch" ``` Note that you can plop these keys in the Build Settings search field, if you prefer to use Xcode's UI for your build settings.
I got this error in my flutter app when using the library flutter\_inappwebview and tried to set deployment version of ios in Runner > General to 12.0. I set it back to 11.4 and it built with no problems.
77,788
Here is the situation. There are two machines, laptop A and workstation B. B has a fixed IP, A has a dynamic IP, and I want to avoid the need of connecting from B to A (setting up an ssh tunnel for example; for the sake of the argument, assume that ssh from B to A is not possible). There is a git repository, `/home/us...
2013/05/31
[ "https://unix.stackexchange.com/questions/77788", "https://unix.stackexchange.com", "https://unix.stackexchange.com/users/24405/" ]
**Your post-receive hook** has some pretty dire caveats IMO! I have a similar setup, but server B has two copies of the repo. One is a bare repo and used as the default remote ("origin") for both. Then I don't have to supply arguments to "git push" and "git pull". That last is the only simplification I have over the c...
I think that `git` it's not good for you, I also think that [`rsync`](http://en.wikipedia.org/wiki/Rsync) it's much better suited for your task, since you simply have to keep files in sync git is not ideal in my opinion because: * you don't apparently need any branching/versioning/distributed model * you need to deal ...
77,788
Here is the situation. There are two machines, laptop A and workstation B. B has a fixed IP, A has a dynamic IP, and I want to avoid the need of connecting from B to A (setting up an ssh tunnel for example; for the sake of the argument, assume that ssh from B to A is not possible). There is a git repository, `/home/us...
2013/05/31
[ "https://unix.stackexchange.com/questions/77788", "https://unix.stackexchange.com", "https://unix.stackexchange.com/users/24405/" ]
If all that's keeping you is that you can't ssh from B to A, but you can ssh from A to B, then [establish a reverse ssh tunnel](https://unix.stackexchange.com/questions/46235/how-does-reverse-ssh-tunneling-work).
I think that `git` it's not good for you, I also think that [`rsync`](http://en.wikipedia.org/wiki/Rsync) it's much better suited for your task, since you simply have to keep files in sync git is not ideal in my opinion because: * you don't apparently need any branching/versioning/distributed model * you need to deal ...
77,788
Here is the situation. There are two machines, laptop A and workstation B. B has a fixed IP, A has a dynamic IP, and I want to avoid the need of connecting from B to A (setting up an ssh tunnel for example; for the sake of the argument, assume that ssh from B to A is not possible). There is a git repository, `/home/us...
2013/05/31
[ "https://unix.stackexchange.com/questions/77788", "https://unix.stackexchange.com", "https://unix.stackexchange.com/users/24405/" ]
**Your post-receive hook** has some pretty dire caveats IMO! I have a similar setup, but server B has two copies of the repo. One is a bare repo and used as the default remote ("origin") for both. Then I don't have to supply arguments to "git push" and "git pull". That last is the only simplification I have over the c...
If all that's keeping you is that you can't ssh from B to A, but you can ssh from A to B, then [establish a reverse ssh tunnel](https://unix.stackexchange.com/questions/46235/how-does-reverse-ssh-tunneling-work).
19,507,775
I have to make a function for take all the circle elements and make them clickable. With my code i can click only the last node created and i can't understand why. Can you help me please? I use the d3 library, thats my code: ``` var allCircles = vis.selectAll('circle'); allCircles.on('click', function(){ /* make ...
2013/10/22
[ "https://Stackoverflow.com/questions/19507775", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2448854/" ]
It's probably better to add the event listener on the (parent) container element of the circles instead. This implies that you have such an element, e.g a `<g>` where you can add the listener. ``` var circleContainer = /* find your g element that contains the circles here */; circleContainer.on('click', function(){ ...
I don't use the d3 library and I've never heard of it but I can do it without ``` var circles=document.getElementsByTagName('circle'); function onclik() { //do stuff } for(var i=0;i<circles.length;i++){ circles[i].setAttribute("onclick","onclik()") } ``` I hope it helps!
49,007,908
It seems that I am still missing some basics of python. I was trying to understand [submodules importing](https://docs.python.org/3/reference/import.html#submodules), which I feel I have not understood yet. But I have also stumbled upon something new. I am having following two packages in two different PyDev projects:...
2018/02/27
[ "https://Stackoverflow.com/questions/49007908", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1317018/" ]
There is a subtle different between how Python is treating both of those packages. `package1` is treated as a **namespace** package in that it **does not** contain an `__init__.py` file. `package2` is treated as a **regular** package in that it **does** contain an `__init__.py` file. So I'll give a quick breakdown o...
Python modules are optional "additions" to Python that can be imported using the `import` command like so: ``` import package1 package1.mod1 # Can be accessed using this ``` To import individual parts of the package, use `from` like so: ``` from package1 import mod1 mod1 # Can be accessed usi...
9,412,501
I have created plugin for background service (to run the application in background) in phonegap. here is my java code for plugin: ``` public class BackgroundService extends Plugin { @Override public PluginResult execute(String action, JSONArray args, String callbackId) { PluginResult.Status status...
2012/02/23
[ "https://Stackoverflow.com/questions/9412501", "https://Stackoverflow.com", "https://Stackoverflow.com/users/993437/" ]
Creation of plugin is fine.You create your service just like a normal java file. And then As soon as you call this plugin . you just start your service like ``` startService(new Intent(this, MyService.class)); ``` Then your service will run in background.This is an easy way to do. If separately you create service t...
In the onCreate method of your Java class that extends from DroidGap make sure you have set "keepRunning" properly. ``` super.setBooleanProperty("keepRunning", true); ```
479,555
I am looking to drive a piezo transducer at its resonant frequency (20kHz) to generate sound waves. I am doing an application similar to sonar technology. I was looking into how to drive the transducer and I thought I would have to generate and feed it sine waves with its resonant frequency. I have access to an Arduin...
2020/02/05
[ "https://electronics.stackexchange.com/questions/479555", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/241804/" ]
A square wave will work fine -- in fact better than a sine wave ! This is because the piezo barely responds to any signals not at its resonant frequency, and the amplitude of the sinusoidal component of a squarewave at the fundamental is *higher* than the amplitude of a square wave.
I'm not sure what the specs. of your piezo is, but you need a really high voltage to drive them. You will probably not be able to drive them with the outputs of a regular MCUs. If you have a DAC inside Arduino, connect it to a high Voltage audio amp specific for piezo speakers.
9,498,318
I'd like to create a custom context menu. The idea is to create a panel with a textBox a button and a list of labels and be able to show it on right click and make it behave exactly like a contextMenu. I can probably use a form without borders but I was thinking there might be a class I can derive from that would help ...
2012/02/29
[ "https://Stackoverflow.com/questions/9498318", "https://Stackoverflow.com", "https://Stackoverflow.com/users/875130/" ]
You can use the method described here: <http://www.codeproject.com/Articles/22780/Super-Context-Menu-Strip> Since it uses ContextMenuStrip you can set its position: ``` contextMenuStrip1.Show(Cursor.Position); ``` and shadow effect: <http://msdn.microsoft.com/en-us/library/system.windows.controls.contextmenu.hasd...
The simplest way (since this doesn't appear to be an actual menu) would be to create a borderless form and add shadow to it: ``` public class ShadowForm : Form { // Define the CS_DROPSHADOW constant private const int CS_DROPSHADOW = 0x00020000; // Override the CreateParams property protected override ...
9,498,318
I'd like to create a custom context menu. The idea is to create a panel with a textBox a button and a list of labels and be able to show it on right click and make it behave exactly like a contextMenu. I can probably use a form without borders but I was thinking there might be a class I can derive from that would help ...
2012/02/29
[ "https://Stackoverflow.com/questions/9498318", "https://Stackoverflow.com", "https://Stackoverflow.com/users/875130/" ]
The simplest way (since this doesn't appear to be an actual menu) would be to create a borderless form and add shadow to it: ``` public class ShadowForm : Form { // Define the CS_DROPSHADOW constant private const int CS_DROPSHADOW = 0x00020000; // Override the CreateParams property protected override ...
When you click outside the ContextMenu it disappears. Yes. With this CustomMenu also you can do that. ``` protected override void OnDeactivate(EventArgs e) { this.Close(); base.OnDeactivate(e); } ``` I tested this and it worked fine for me. OnLeave and OnLostFocus did not fire when you cl...
9,498,318
I'd like to create a custom context menu. The idea is to create a panel with a textBox a button and a list of labels and be able to show it on right click and make it behave exactly like a contextMenu. I can probably use a form without borders but I was thinking there might be a class I can derive from that would help ...
2012/02/29
[ "https://Stackoverflow.com/questions/9498318", "https://Stackoverflow.com", "https://Stackoverflow.com/users/875130/" ]
You can use the method described here: <http://www.codeproject.com/Articles/22780/Super-Context-Menu-Strip> Since it uses ContextMenuStrip you can set its position: ``` contextMenuStrip1.Show(Cursor.Position); ``` and shadow effect: <http://msdn.microsoft.com/en-us/library/system.windows.controls.contextmenu.hasd...
When you click outside the ContextMenu it disappears. Yes. With this CustomMenu also you can do that. ``` protected override void OnDeactivate(EventArgs e) { this.Close(); base.OnDeactivate(e); } ``` I tested this and it worked fine for me. OnLeave and OnLostFocus did not fire when you cl...
163,885
I'd like to route only Ips from within the US via my vpn. I can't find a specific range for States. How can I do that properly?
2010/07/25
[ "https://serverfault.com/questions/163885", "https://serverfault.com", "https://serverfault.com/users/17573/" ]
There is no US-only [IP address](http://en.wikipedia.org/wiki/IP_address) range. See also [Geolocation](http://en.wikipedia.org/wiki/Geolocation). [![](https://imgs.xkcd.com/comics/map_of_the_internet.jpg "xkcd IP map")](http://xkcd.com/195/)
You can do a decent approximation by looking at what [RIRs](http://en.wikipedia.org/wiki/Regional_Internet_registry) various /8s have been assigned to, but it's going to be just that--an approximation. To take another approach, you can conclusively determine if someone is connecting via a computer in the States based o...
12,704,217
I have a link in a dialog modal window. I need this link to show in the same DIALOG MODAL window where it is. Here's how my link looks like, it is formed in a php file and then passed to the html template: ``` $link = "<a href='mypage.php?f=dosomething&param1=".$var1."&param2=".$var2."' id='dosomething' >Need to ope...
2012/10/03
[ "https://Stackoverflow.com/questions/12704217", "https://Stackoverflow.com", "https://Stackoverflow.com/users/523129/" ]
The probable solution would be you **create a base class** which **extends TextView**, and use this text view class as edit text. Hope you are asking for size in first screen. In any case, u set the text size in the base class. This will solve your problem. like u create this class in package com.example and class nam...
Create a function and pass the spinner size value as ``` void setSize(int size){ ... setTextSize() // on All of the layout texts and views on screen } ``` Call setTextSize() on all of your views and layout texts on the screen. Check out the Documentations [Here](http://developer.android.com/reference/android/widge...
12,704,217
I have a link in a dialog modal window. I need this link to show in the same DIALOG MODAL window where it is. Here's how my link looks like, it is formed in a php file and then passed to the html template: ``` $link = "<a href='mypage.php?f=dosomething&param1=".$var1."&param2=".$var2."' id='dosomething' >Need to ope...
2012/10/03
[ "https://Stackoverflow.com/questions/12704217", "https://Stackoverflow.com", "https://Stackoverflow.com/users/523129/" ]
`Android` documentation is not specific on the most efficient way to change the font size globally through the user’s selection at application level. There is a problem I think with the [answer](https://stackoverflow.com/a/12706334/1554935) given by **Black Devil**. The problem is that many of the `Android` widgets ...
I'm not sure if it help. But there is something called "SSP" - Scalable size Unit for Text. Add this to your build gradle ``` implementation 'com.intuit.ssp:ssp-android:1.0.6' ``` And this to use ``` android:textSize="@dimen/_22ssp" ``` <https://github.com/intuit/ssp>
12,704,217
I have a link in a dialog modal window. I need this link to show in the same DIALOG MODAL window where it is. Here's how my link looks like, it is formed in a php file and then passed to the html template: ``` $link = "<a href='mypage.php?f=dosomething&param1=".$var1."&param2=".$var2."' id='dosomething' >Need to ope...
2012/10/03
[ "https://Stackoverflow.com/questions/12704217", "https://Stackoverflow.com", "https://Stackoverflow.com/users/523129/" ]
`Android` documentation is not specific on the most efficient way to change the font size globally through the user’s selection at application level. There is a problem I think with the [answer](https://stackoverflow.com/a/12706334/1554935) given by **Black Devil**. The problem is that many of the `Android` widgets ...
Create a function and pass the spinner size value as ``` void setSize(int size){ ... setTextSize() // on All of the layout texts and views on screen } ``` Call setTextSize() on all of your views and layout texts on the screen. Check out the Documentations [Here](http://developer.android.com/reference/android/widge...
12,704,217
I have a link in a dialog modal window. I need this link to show in the same DIALOG MODAL window where it is. Here's how my link looks like, it is formed in a php file and then passed to the html template: ``` $link = "<a href='mypage.php?f=dosomething&param1=".$var1."&param2=".$var2."' id='dosomething' >Need to ope...
2012/10/03
[ "https://Stackoverflow.com/questions/12704217", "https://Stackoverflow.com", "https://Stackoverflow.com/users/523129/" ]
you can scale to text size of your app up/down using base activity Configuration, make all activities inherent base activity. Scale normal value is 1.0, 2.0 would double the font size and .50 would make it half. ``` public void adjustFontScale( Configuration configuration,float scale) { configuration.fontScale ...
To scale the font size of all components(mean whole application), there is pretty well approach which is implemented and tested trough several devices. This solution could be applied for cases like; declaring ***dp*** size unit statically(android sp by default) , scaling to desired font sizes and etc. The solution is...
12,704,217
I have a link in a dialog modal window. I need this link to show in the same DIALOG MODAL window where it is. Here's how my link looks like, it is formed in a php file and then passed to the html template: ``` $link = "<a href='mypage.php?f=dosomething&param1=".$var1."&param2=".$var2."' id='dosomething' >Need to ope...
2012/10/03
[ "https://Stackoverflow.com/questions/12704217", "https://Stackoverflow.com", "https://Stackoverflow.com/users/523129/" ]
you can scale to text size of your app up/down using base activity Configuration, make all activities inherent base activity. Scale normal value is 1.0, 2.0 would double the font size and .50 would make it half. ``` public void adjustFontScale( Configuration configuration,float scale) { configuration.fontScale ...
The probable solution would be you **create a base class** which **extends TextView**, and use this text view class as edit text. Hope you are asking for size in first screen. In any case, u set the text size in the base class. This will solve your problem. like u create this class in package com.example and class nam...
12,704,217
I have a link in a dialog modal window. I need this link to show in the same DIALOG MODAL window where it is. Here's how my link looks like, it is formed in a php file and then passed to the html template: ``` $link = "<a href='mypage.php?f=dosomething&param1=".$var1."&param2=".$var2."' id='dosomething' >Need to ope...
2012/10/03
[ "https://Stackoverflow.com/questions/12704217", "https://Stackoverflow.com", "https://Stackoverflow.com/users/523129/" ]
`Android` documentation is not specific on the most efficient way to change the font size globally through the user’s selection at application level. There is a problem I think with the [answer](https://stackoverflow.com/a/12706334/1554935) given by **Black Devil**. The problem is that many of the `Android` widgets ...
To scale the font size of all components(mean whole application), there is pretty well approach which is implemented and tested trough several devices. This solution could be applied for cases like; declaring ***dp*** size unit statically(android sp by default) , scaling to desired font sizes and etc. The solution is...
12,704,217
I have a link in a dialog modal window. I need this link to show in the same DIALOG MODAL window where it is. Here's how my link looks like, it is formed in a php file and then passed to the html template: ``` $link = "<a href='mypage.php?f=dosomething&param1=".$var1."&param2=".$var2."' id='dosomething' >Need to ope...
2012/10/03
[ "https://Stackoverflow.com/questions/12704217", "https://Stackoverflow.com", "https://Stackoverflow.com/users/523129/" ]
Create a function and pass the spinner size value as ``` void setSize(int size){ ... setTextSize() // on All of the layout texts and views on screen } ``` Call setTextSize() on all of your views and layout texts on the screen. Check out the Documentations [Here](http://developer.android.com/reference/android/widge...
I'm not sure if it help. But there is something called "SSP" - Scalable size Unit for Text. Add this to your build gradle ``` implementation 'com.intuit.ssp:ssp-android:1.0.6' ``` And this to use ``` android:textSize="@dimen/_22ssp" ``` <https://github.com/intuit/ssp>
12,704,217
I have a link in a dialog modal window. I need this link to show in the same DIALOG MODAL window where it is. Here's how my link looks like, it is formed in a php file and then passed to the html template: ``` $link = "<a href='mypage.php?f=dosomething&param1=".$var1."&param2=".$var2."' id='dosomething' >Need to ope...
2012/10/03
[ "https://Stackoverflow.com/questions/12704217", "https://Stackoverflow.com", "https://Stackoverflow.com/users/523129/" ]
The probable solution would be you **create a base class** which **extends TextView**, and use this text view class as edit text. Hope you are asking for size in first screen. In any case, u set the text size in the base class. This will solve your problem. like u create this class in package com.example and class nam...
I'm not sure if it help. But there is something called "SSP" - Scalable size Unit for Text. Add this to your build gradle ``` implementation 'com.intuit.ssp:ssp-android:1.0.6' ``` And this to use ``` android:textSize="@dimen/_22ssp" ``` <https://github.com/intuit/ssp>
12,704,217
I have a link in a dialog modal window. I need this link to show in the same DIALOG MODAL window where it is. Here's how my link looks like, it is formed in a php file and then passed to the html template: ``` $link = "<a href='mypage.php?f=dosomething&param1=".$var1."&param2=".$var2."' id='dosomething' >Need to ope...
2012/10/03
[ "https://Stackoverflow.com/questions/12704217", "https://Stackoverflow.com", "https://Stackoverflow.com/users/523129/" ]
you can scale to text size of your app up/down using base activity Configuration, make all activities inherent base activity. Scale normal value is 1.0, 2.0 would double the font size and .50 would make it half. ``` public void adjustFontScale( Configuration configuration,float scale) { configuration.fontScale ...
I'm not sure if it help. But there is something called "SSP" - Scalable size Unit for Text. Add this to your build gradle ``` implementation 'com.intuit.ssp:ssp-android:1.0.6' ``` And this to use ``` android:textSize="@dimen/_22ssp" ``` <https://github.com/intuit/ssp>
12,704,217
I have a link in a dialog modal window. I need this link to show in the same DIALOG MODAL window where it is. Here's how my link looks like, it is formed in a php file and then passed to the html template: ``` $link = "<a href='mypage.php?f=dosomething&param1=".$var1."&param2=".$var2."' id='dosomething' >Need to ope...
2012/10/03
[ "https://Stackoverflow.com/questions/12704217", "https://Stackoverflow.com", "https://Stackoverflow.com/users/523129/" ]
`Android` documentation is not specific on the most efficient way to change the font size globally through the user’s selection at application level. There is a problem I think with the [answer](https://stackoverflow.com/a/12706334/1554935) given by **Black Devil**. The problem is that many of the `Android` widgets ...
The probable solution would be you **create a base class** which **extends TextView**, and use this text view class as edit text. Hope you are asking for size in first screen. In any case, u set the text size in the base class. This will solve your problem. like u create this class in package com.example and class nam...
11,815
I have a 2006 Nissan Altima 2.5S that has been making a metallic shh-shh noise. I've replaced the front brake pads and rotors, but the noise continues and is now becoming a distinct grinding noise. It's difficult to tell, but it seems that the noise is coming from the front of the vehicle and when brakes are applied c...
2014/08/13
[ "https://mechanics.stackexchange.com/questions/11815", "https://mechanics.stackexchange.com", "https://mechanics.stackexchange.com/users/6706/" ]
In this case, the sound came from the rear brake pads which had completely worn away down to the metal backing. Once I replaced the rear pads and rotors (which had significant scoring) the sound went away.
When you are driving in a straight line, the load on the front axle is shared equally between the two front hubs, so any noises will be low. When you turn to the left, there is a weight transfer to the outside wheel(right wheel) and any noises from it will be more accentuated/louder. It is the opposite when you turn ri...
31,146,647
On a page I'm working on, the results of the Google Places Autocomplete is showing up 70px below where it should, leaving a gap between the search box and the beginning of the results container. The height of the gap happens to be the exact height of Chrome's autofill feature, so I'm suspicious that the Autocomplete l...
2015/06/30
[ "https://Stackoverflow.com/questions/31146647", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2324475/" ]
I have tried many approaches and the best thing so far that worked for me is the good old (negative) margin. I wanted the resulting menu to be shown on top and I did this: ``` <style type="text/css"> .pac-container{ margin-top: -210px; } </style> ```
please check parent element of searchbox, if parent element has margin-top, then convert it into padding-top example code ` ``` .parent_element { /* margin-top: 70px; */ padding-top: 70px; } </style> <div class="parent_element"> <input type="text" class="autocomplete"> </div>` ``` I hope will work for y...
31,146,647
On a page I'm working on, the results of the Google Places Autocomplete is showing up 70px below where it should, leaving a gap between the search box and the beginning of the results container. The height of the gap happens to be the exact height of Chrome's autofill feature, so I'm suspicious that the Autocomplete l...
2015/06/30
[ "https://Stackoverflow.com/questions/31146647", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2324475/" ]
**The below snippet worked for me.** In this initially, it will remove the previous **pac-container** div anywhere in the DOM. Later on, It tries to find the **pac-container** div element inside autocomplete object and it will place **pac-container** the div element inside another div in this case it is **"book-billing...
Add css on body tag with position: relative It worked.
31,146,647
On a page I'm working on, the results of the Google Places Autocomplete is showing up 70px below where it should, leaving a gap between the search box and the beginning of the results container. The height of the gap happens to be the exact height of Chrome's autofill feature, so I'm suspicious that the Autocomplete l...
2015/06/30
[ "https://Stackoverflow.com/questions/31146647", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2324475/" ]
I have tried many approaches and the best thing so far that worked for me is the good old (negative) margin. I wanted the resulting menu to be shown on top and I did this: ``` <style type="text/css"> .pac-container{ margin-top: -210px; } </style> ```
**The below snippet worked for me.** In this initially, it will remove the previous **pac-container** div anywhere in the DOM. Later on, It tries to find the **pac-container** div element inside autocomplete object and it will place **pac-container** the div element inside another div in this case it is **"book-billing...
31,146,647
On a page I'm working on, the results of the Google Places Autocomplete is showing up 70px below where it should, leaving a gap between the search box and the beginning of the results container. The height of the gap happens to be the exact height of Chrome's autofill feature, so I'm suspicious that the Autocomplete l...
2015/06/30
[ "https://Stackoverflow.com/questions/31146647", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2324475/" ]
I have tried many approaches and the best thing so far that worked for me is the good old (negative) margin. I wanted the resulting menu to be shown on top and I did this: ``` <style type="text/css"> .pac-container{ margin-top: -210px; } </style> ```
Add css on body tag with position: relative It worked.
31,146,647
On a page I'm working on, the results of the Google Places Autocomplete is showing up 70px below where it should, leaving a gap between the search box and the beginning of the results container. The height of the gap happens to be the exact height of Chrome's autofill feature, so I'm suspicious that the Autocomplete l...
2015/06/30
[ "https://Stackoverflow.com/questions/31146647", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2324475/" ]
**The below snippet worked for me.** In this initially, it will remove the previous **pac-container** div anywhere in the DOM. Later on, It tries to find the **pac-container** div element inside autocomplete object and it will place **pac-container** the div element inside another div in this case it is **"book-billing...
Yes, you can style the Autocomplete <https://google-developers.appspot.com/maps/documentation/javascript/places-autocomplete#style_autocomplete> However, lets look at WHY the "gap" is happening. **Double check your HTML and BODY tags, see if they have margin/padding added to them** So, the way Autocomplete detects ...
31,146,647
On a page I'm working on, the results of the Google Places Autocomplete is showing up 70px below where it should, leaving a gap between the search box and the beginning of the results container. The height of the gap happens to be the exact height of Chrome's autofill feature, so I'm suspicious that the Autocomplete l...
2015/06/30
[ "https://Stackoverflow.com/questions/31146647", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2324475/" ]
please check parent element of searchbox, if parent element has margin-top, then convert it into padding-top example code ` ``` .parent_element { /* margin-top: 70px; */ padding-top: 70px; } </style> <div class="parent_element"> <input type="text" class="autocomplete"> </div>` ``` I hope will work for y...
It's perfectly work for me , no issue with position bug when scroll ``` function initAutocomplete() { //....codes... //....add this code just before close function... setTimeout(function(){ $(".pac-container").prependTo("#mapMoveHere"); }, 300); } ``` <https://codepen.i...
31,146,647
On a page I'm working on, the results of the Google Places Autocomplete is showing up 70px below where it should, leaving a gap between the search box and the beginning of the results container. The height of the gap happens to be the exact height of Chrome's autofill feature, so I'm suspicious that the Autocomplete l...
2015/06/30
[ "https://Stackoverflow.com/questions/31146647", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2324475/" ]
**The below snippet worked for me.** In this initially, it will remove the previous **pac-container** div anywhere in the DOM. Later on, It tries to find the **pac-container** div element inside autocomplete object and it will place **pac-container** the div element inside another div in this case it is **"book-billing...
It's perfectly work for me , no issue with position bug when scroll ``` function initAutocomplete() { //....codes... //....add this code just before close function... setTimeout(function(){ $(".pac-container").prependTo("#mapMoveHere"); }, 300); } ``` <https://codepen.i...
31,146,647
On a page I'm working on, the results of the Google Places Autocomplete is showing up 70px below where it should, leaving a gap between the search box and the beginning of the results container. The height of the gap happens to be the exact height of Chrome's autofill feature, so I'm suspicious that the Autocomplete l...
2015/06/30
[ "https://Stackoverflow.com/questions/31146647", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2324475/" ]
I have tried many approaches and the best thing so far that worked for me is the good old (negative) margin. I wanted the resulting menu to be shown on top and I did this: ``` <style type="text/css"> .pac-container{ margin-top: -210px; } </style> ```
Yes, you can style the Autocomplete <https://google-developers.appspot.com/maps/documentation/javascript/places-autocomplete#style_autocomplete> However, lets look at WHY the "gap" is happening. **Double check your HTML and BODY tags, see if they have margin/padding added to them** So, the way Autocomplete detects ...
31,146,647
On a page I'm working on, the results of the Google Places Autocomplete is showing up 70px below where it should, leaving a gap between the search box and the beginning of the results container. The height of the gap happens to be the exact height of Chrome's autofill feature, so I'm suspicious that the Autocomplete l...
2015/06/30
[ "https://Stackoverflow.com/questions/31146647", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2324475/" ]
Yes, you can style the Autocomplete <https://google-developers.appspot.com/maps/documentation/javascript/places-autocomplete#style_autocomplete> However, lets look at WHY the "gap" is happening. **Double check your HTML and BODY tags, see if they have margin/padding added to them** So, the way Autocomplete detects ...
please check parent element of searchbox, if parent element has margin-top, then convert it into padding-top example code ` ``` .parent_element { /* margin-top: 70px; */ padding-top: 70px; } </style> <div class="parent_element"> <input type="text" class="autocomplete"> </div>` ``` I hope will work for y...
31,146,647
On a page I'm working on, the results of the Google Places Autocomplete is showing up 70px below where it should, leaving a gap between the search box and the beginning of the results container. The height of the gap happens to be the exact height of Chrome's autofill feature, so I'm suspicious that the Autocomplete l...
2015/06/30
[ "https://Stackoverflow.com/questions/31146647", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2324475/" ]
I have tried many approaches and the best thing so far that worked for me is the good old (negative) margin. I wanted the resulting menu to be shown on top and I did this: ``` <style type="text/css"> .pac-container{ margin-top: -210px; } </style> ```
It's perfectly work for me , no issue with position bug when scroll ``` function initAutocomplete() { //....codes... //....add this code just before close function... setTimeout(function(){ $(".pac-container").prependTo("#mapMoveHere"); }, 300); } ``` <https://codepen.i...
37,372,436
I'm using ASP.NET with C# 4.0. My problem is that I want only one button to activate a certain method on server. What do i mean? I'm glad you asked. I have 2 buttons.[!["Filter" and "FetchEvents"](https://i.stack.imgur.com/Fp7qB.png)](https://i.stack.imgur.com/Fp7qB.png) Any my aspx code is: ``` <form id=...
2016/05/22
[ "https://Stackoverflow.com/questions/37372436", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3434672/" ]
In Kotlin [classes and members are final by default](https://kotlinlang.org/docs/reference/classes.html#wait-how-will-i-hack-my-libraries-now). In other words the following declarations have the same bytecode: ``` @JvmField final val CREATOR: Parcelable.Creator<Person> = PersonCreator() @JvmField val CREATOR: Parcelab...
In Kotlin you can use the `@Parcelize` Kotlin Android Extension: ``` @Parcelize data class User(val id: String, val name: String) : Parcelable ``` This is a compiler plugin that automatically generates the [Parcelable](https://developer.android.com/reference/android/os/Parcelable) implementation for you. [This page...
37,372,436
I'm using ASP.NET with C# 4.0. My problem is that I want only one button to activate a certain method on server. What do i mean? I'm glad you asked. I have 2 buttons.[!["Filter" and "FetchEvents"](https://i.stack.imgur.com/Fp7qB.png)](https://i.stack.imgur.com/Fp7qB.png) Any my aspx code is: ``` <form id=...
2016/05/22
[ "https://Stackoverflow.com/questions/37372436", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3434672/" ]
In Kotlin [classes and members are final by default](https://kotlinlang.org/docs/reference/classes.html#wait-how-will-i-hack-my-libraries-now). In other words the following declarations have the same bytecode: ``` @JvmField final val CREATOR: Parcelable.Creator<Person> = PersonCreator() @JvmField val CREATOR: Parcelab...
Use @Parcelize annotation to data class and extends Parcelable. Kotlin automatically do the rest for you. Example- Person data class. ``` @Parcelize data class Person(val name: String, val age: Int, val email: String) : Parcelable ``` You can send value lets press on a button click like below from an activity. ``` ...
37,372,436
I'm using ASP.NET with C# 4.0. My problem is that I want only one button to activate a certain method on server. What do i mean? I'm glad you asked. I have 2 buttons.[!["Filter" and "FetchEvents"](https://i.stack.imgur.com/Fp7qB.png)](https://i.stack.imgur.com/Fp7qB.png) Any my aspx code is: ``` <form id=...
2016/05/22
[ "https://Stackoverflow.com/questions/37372436", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3434672/" ]
In Kotlin you can use the `@Parcelize` Kotlin Android Extension: ``` @Parcelize data class User(val id: String, val name: String) : Parcelable ``` This is a compiler plugin that automatically generates the [Parcelable](https://developer.android.com/reference/android/os/Parcelable) implementation for you. [This page...
Use @Parcelize annotation to data class and extends Parcelable. Kotlin automatically do the rest for you. Example- Person data class. ``` @Parcelize data class Person(val name: String, val age: Int, val email: String) : Parcelable ``` You can send value lets press on a button click like below from an activity. ``` ...
50,975,032
I am trying to connect local mongodb from a docker container ruby on rails application. I have added the variable as `env MONGODB_URI` in envFile file with value: `MONGODB_URI=mongodb://username:password@host:27017/database` command I am using to run the image in container: `docker run -p 80:80 --env-file ~/envFile ...
2018/06/21
[ "https://Stackoverflow.com/questions/50975032", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2510165/" ]
So, I figured out the answer as I had this same problem. My encoding was wrong and so it wouldn't read the text correctly. I opened it in Visual Studio Code and found the encoding was UTF-16 LE. My output came from powershell so yours likely did too and you probably just need to specify the output encoding or change th...
Works perfectly with the sample input that you have given Sample input also shown Version of Python and pandas also shown ``` ~ $ python Python 3.6.4 |Anaconda custom (64-bit)| (default, Jan 16 2018, 18:10:19) [GCC 7.2.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import pan...
50,975,032
I am trying to connect local mongodb from a docker container ruby on rails application. I have added the variable as `env MONGODB_URI` in envFile file with value: `MONGODB_URI=mongodb://username:password@host:27017/database` command I am using to run the image in container: `docker run -p 80:80 --env-file ~/envFile ...
2018/06/21
[ "https://Stackoverflow.com/questions/50975032", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2510165/" ]
I found this issue and here are some steps to diagnostic: First check with command line if the file is human readable: ``` head file.txt ``` After that in python3 console try to print some lines: ``` with open("file.txt", encoding="latin1", errors='ignore') as f: for i in f: print([str(i.strip())]) ``...
Works perfectly with the sample input that you have given Sample input also shown Version of Python and pandas also shown ``` ~ $ python Python 3.6.4 |Anaconda custom (64-bit)| (default, Jan 16 2018, 18:10:19) [GCC 7.2.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import pan...
50,975,032
I am trying to connect local mongodb from a docker container ruby on rails application. I have added the variable as `env MONGODB_URI` in envFile file with value: `MONGODB_URI=mongodb://username:password@host:27017/database` command I am using to run the image in container: `docker run -p 80:80 --env-file ~/envFile ...
2018/06/21
[ "https://Stackoverflow.com/questions/50975032", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2510165/" ]
So, I figured out the answer as I had this same problem. My encoding was wrong and so it wouldn't read the text correctly. I opened it in Visual Studio Code and found the encoding was UTF-16 LE. My output came from powershell so yours likely did too and you probably just need to specify the output encoding or change th...
I found this issue and here are some steps to diagnostic: First check with command line if the file is human readable: ``` head file.txt ``` After that in python3 console try to print some lines: ``` with open("file.txt", encoding="latin1", errors='ignore') as f: for i in f: print([str(i.strip())]) ``...
1,136,549
I realise that this might be a question that has been asked and answered, but please bear with me. I want to know if it is possible to use annotations to inject code into your classes compile time. The classic example is to generate a getter and setter for the members of your object. This is not exactly what I need it...
2009/07/16
[ "https://Stackoverflow.com/questions/1136549", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
It is not supported to modify code at compile time but it seems to be possible by using non-supported javac-internal APIs, [here](http://forums.sun.com/thread.jspa?threadID=5269463) is a post referencing the hanbuy-panno solution with also a link to the [code](http://svntrac.hanhuy.com/repo/browser/hanhuy/trunk/panno/s...
Something needs to process the annotations, so it either happens at compile time with an annotation processor or at runtime with reflection (yes I know, there are even more exotic ways of doing it at runtime). He most definitely is using an annotation processor, it's just that it's implicit. The `javac` command will s...
1,136,549
I realise that this might be a question that has been asked and answered, but please bear with me. I want to know if it is possible to use annotations to inject code into your classes compile time. The classic example is to generate a getter and setter for the members of your object. This is not exactly what I need it...
2009/07/16
[ "https://Stackoverflow.com/questions/1136549", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
I went looking for [something similar](https://stackoverflow.com/questions/340353/plugging-in-to-java-compilers) last year. There is no standard way to alter classes using annotation processors or the compiler and the annotation API documentation recommends creating decorators. If you are willing to live with the hack...
Something needs to process the annotations, so it either happens at compile time with an annotation processor or at runtime with reflection (yes I know, there are even more exotic ways of doing it at runtime). He most definitely is using an annotation processor, it's just that it's implicit. The `javac` command will s...
1,136,549
I realise that this might be a question that has been asked and answered, but please bear with me. I want to know if it is possible to use annotations to inject code into your classes compile time. The classic example is to generate a getter and setter for the members of your object. This is not exactly what I need it...
2009/07/16
[ "https://Stackoverflow.com/questions/1136549", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
You can do this, but you're not supposed to modify the class containing the annotations. (The trick you link to uses the compile tree api to modify the bytecode being generated...) This is not supported and will probably be guarded against in later Java SDKs. The proper way to do it is to generate a superclass, subcla...
Something needs to process the annotations, so it either happens at compile time with an annotation processor or at runtime with reflection (yes I know, there are even more exotic ways of doing it at runtime). He most definitely is using an annotation processor, it's just that it's implicit. The `javac` command will s...
1,136,549
I realise that this might be a question that has been asked and answered, but please bear with me. I want to know if it is possible to use annotations to inject code into your classes compile time. The classic example is to generate a getter and setter for the members of your object. This is not exactly what I need it...
2009/07/16
[ "https://Stackoverflow.com/questions/1136549", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
It is not supported to modify code at compile time but it seems to be possible by using non-supported javac-internal APIs, [here](http://forums.sun.com/thread.jspa?threadID=5269463) is a post referencing the hanbuy-panno solution with also a link to the [code](http://svntrac.hanhuy.com/repo/browser/hanhuy/trunk/panno/s...
I went looking for [something similar](https://stackoverflow.com/questions/340353/plugging-in-to-java-compilers) last year. There is no standard way to alter classes using annotation processors or the compiler and the annotation API documentation recommends creating decorators. If you are willing to live with the hack...
1,136,549
I realise that this might be a question that has been asked and answered, but please bear with me. I want to know if it is possible to use annotations to inject code into your classes compile time. The classic example is to generate a getter and setter for the members of your object. This is not exactly what I need it...
2009/07/16
[ "https://Stackoverflow.com/questions/1136549", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
It is not supported to modify code at compile time but it seems to be possible by using non-supported javac-internal APIs, [here](http://forums.sun.com/thread.jspa?threadID=5269463) is a post referencing the hanbuy-panno solution with also a link to the [code](http://svntrac.hanhuy.com/repo/browser/hanhuy/trunk/panno/s...
You can do this, but you're not supposed to modify the class containing the annotations. (The trick you link to uses the compile tree api to modify the bytecode being generated...) This is not supported and will probably be guarded against in later Java SDKs. The proper way to do it is to generate a superclass, subcla...
5,032,552
I have an ASP.NET MVC 3 application, [WouldBeBetter.com](http://www.wouldbebetter.com), currently hosted on Windows Azure. I have an Introductory Special subscription package that was free for several months but was surprised at how expensive it has turned out to be (€150 p/m on average!) now that I have started paying...
2011/02/17
[ "https://Stackoverflow.com/questions/5032552", "https://Stackoverflow.com", "https://Stackoverflow.com/users/93356/" ]
I use DiscountASP myself. It's pretty basic hosting for sure, a little behind the times. But I have found just creating a subdirectory and publishing my beta/test/whatever versions there works pretty well. It's not fancy or pretty, but does get the job done. In order to do this you need to create the subdirectory fir...
1) Get an automated deployment tool. There are plenty of free/open-source ones that million/billion dollar companies actually use for their production environments. 2) Get a second hosting package identical to the first. Use it as your staging, then just redeploy to production when staging passes.