new object causes corruption on the heap

I've been struggling with a heap corruption problem for a few days. I was first warned by the vs 2005 debugger that I may have corrupted the heap, after deleting an object I had previously...

How to get Selected view from the listView in android?

I had created a custom list view. i added a list of contact details using custom adapter by subclassing the arrayadapter. if i select the particular contact in the list means i need to get that...

How to set viewport property in google maps MapOptions v3

I'm using google.maps.Geocoder to get viewport. Then I want to create google.maps.Map so the map will fit this viewport. There is a method fitBounds. It works perfectly. But it's better to specify...

Why isn't the static constructor from my base class called?

Lets say I have 2 classes: public abstract class Foo { static Foo() { print("4"); } } public class Bar : Foo { static Bar() { print("2"); } static...

How to mock RestSharp portable library in Unit Test

I would like to mockup the RestClient class for test purposes public class DataServices : IDataServices { private readonly IRestClient _restClient; public DataServices(IRestClient...

Jackson: Set class/object properties that are not coming from JSON when deserializing

I've got the following POJO: public class POJO { private final String id; private final String name; // constructor, getters omitted } And here's my JSON: { "name":"foo" } I get the id...

Angular - Connects to Proxy server and gets response but then shows Error occured while trying to proxy to: localhost to actual server

I'm new to Angular(2,4). I was trying to connect to proxy server. Added proxy.config.json in project root directory { "/api/*": { "target": "http://<server_ip_address>:<port>", ...

Apply Nested list comprehension in a function

How do I apply nested list comprehension, on the nested for loop in addCoordinate function in my program, without affecting the output. I have gotten it to print a maze in the format as achieved...

Using an array of function pointers to member functions in C++

I have often made liberal use of function pointers when working with 'command and control'-type scenarios where a message is sent to a process wherein a function is executed based on the request....

React + Material-UI - Warning: Prop className did not match

I'm having difficulty with differences between client-side and server-side rendering of styles in Material-UI components due to classNames being assigned differently. The classNames are assigned...

TypeError: Object(...) is not a function reactjs

I was trying to clean up this react component by extracting fillCalendar() from being a method of the component into it's own js file and importing it instead. Originally this.state.datesArray was...

Symfony 4 Service Dependency Injection - Constructor vs Method

So I've got a Symfony controller, and I'm injecting needed services into my methods via params. One of the params (MySqlGroupDAO $groupDAO) is used by all methods of this controller...

How do I re render the entire React Pivot Table UI component when I change the selection in select tag?

I am new to react js and I am trying to create a pivot table using React Pivot table. I want to be able to select a data set using a select drop down menu and update the state and re render the...

Angular i18n for text containing routerLink and requires different word order

I am struggling to find the most efficient way to translate the text containing routerLink or text where some words should be wrapped in html tags ( word ). Let's see how it looks without the i18n...

How to use this in a dart constructor with private variables

When I try to create a constructor in dart like Student(this._name) it doesn't work with private variables. I have already tried using setters but it doesn't work either. class Student{ ...

React PerfectScrollBar scroll at bottom of container for dynamically generated content

I am using react perfectscrollbar https://www.npmjs.com/package/react-perfect-scrollbar I am trying to implement the chat feature where on clicked on user, the chat message is requested via ajax...

combineLatest throws TS2349 with 6 or more streams

This is my first foray into RxJS, so if there is a better solution I am all for it. My goal is to collect related objects and join them (essentially a sql left join) in code. This stems from me...

How to consume SOAP web service from .NET Core 3.0 WPF app

I have a SOAP web service. I want to consume it in my WPF app. I am using .NET Core 3.0, Visual Studio 2019. So I used the Microsoft WCF Web Service Reference Provider to add reference to my...

Jasmine/Angular: Testing the reception of a void EventEmitter onInit?

I'm writing unit testing for one of my components. Said component has a visible boolean, initialized as false. When said boolean property becomes true, the component's display css attribute goes...

create an instance of the abstract class DomSanitizer

in an Angular component we can inject DomSanitizer and use it. @component({..}) export class myComponent{ constructor(private sanitizer: DomSanitizer){ //now we can use...

ERROR TypeError: Cannot read property 'getRole' of undefined - angular

I am doing a small project on Angular and one of the tasks is display 2 buttons ONLY if an admin is logged in. Now, to check if the admin is logged in, I have a method inside user.service.ts...

Laravel Broadcast notification - Error "array_key_exists()" when try to send notification

I'm trying to send broadcast notification to users when data changes. But every time I try to send a notification, I get this error: array_key_exists(): The first argument should be either a...

JSON value of type NSMutableArray cannot be converted to NSString

Description I've just installed the module and implemented the sample example, in Android, it is working fine but I'm getting an issue on iOS. When I'm dismissing the error by clicking on Dismiss,...

Generating UUID based on strings

How to generate deterministic GUID/UUIDs v3/v5 in C# having both namespace and name as strings (according to RFC4122, you need to provide namespace as GUID and name as string) provided to...

SignalR .Net Core 3.1 Web Application not working on local IIS

Trying to create a chat based on an online example using ASP.Net Core 3.1 and Angular. The following works perfectly well on IIS Express, but not on local IIS. Error...

SyntaxError: Unexpected token v in JSON at position 0 at JSON.parse (<anonymous>) at XMLHttpRequest.onLoad

I'm new to Angular.I have some problems regarding the passing data between back-end and front-end.I have a system which passes booking data to the back-end to be saved in the database.Here is my...

Combine multiple Kotlin flows with synchronous

I want to make 3 API calls. But 2 API calls must be asynchronous and the last one must be wait this results. And I want to write this in usecase so there is no viewmodelscope. I tried to write...

Writing a Python pdfrw PdfReader object to an array of bytes / filestream

I'm currently working on a simple proof of concept for a pdf-editor application. The example is supposed to be a simplified python script showcasing how we could use the pdfrw library to edit PDF...

Circular-Dependency with IVY partial

in a project I wanted to switch my libs to the ivy partial compilation mode (angular 12). But got now some nasty circular dependency errors: Error from example ✖ Compiling with Angular sources...

Why are highlighted items lost after scrolling in recylerview android

I want to highlight the item when the action mode is active in the adapter class. I am able to do so but the highlight state is gone after scrolling. I have tried various solutions but I don't...

Relevant tags