rematnarab

1

votes
1

answer
40

views

How does angular know the button is the submit button [duplicate]

This question already has an answer here: Form is submitted when I click on the button in form. How to avoid this? 2 answers When i hit the button which is not defined as submit, submit(formAccessor) button works. I am curious about this behaviour because i did not define it as submit button. In fa...
rematnarab
1

votes
3

answer
67

views

Formatting milliseconds as date in couchDB map function

i am trying to convert milliseconds to my desired date format. But the format that i give to the function doesn`t seem to work. In my map function var date = new Date(item.showTime); var dateString = date.toString('MM/dd/yy HH:mm:ss'); emit([doc.vehicleNumber,doc.advertId],{'seatNumber':item.seatN...
rematnarab
1

votes
1

answer
39

views

Showing a div using the value of a checkbox with reference variable in angular

I am trying to toggle a div's visibility using a checkbox. I am trying to do this using reference variable, but could not figure out how to do it. I am trying to do something like below. I can`t get the checkbox value. Show Some Data Here
rematnarab
1

votes
1

answer
38

views

Should i prefix name attributes in angular components?

I have radio buttons in a custom angular component like below. I am using this custom component in my main component. And in my main component, I am using the exactly the same buttons. The problem is they are not working properly if i do not change the name attributes. Custom component code is belo...
rematnarab
1

votes
1

answer
792

views

Extjs superboxselect keyup event is not firing

I am using superboxselect for one of my projects. I need to perform some additional filtering. Therefore i need to be able to do it in the keyup event. But i can not get it to work. var test = new Ext.ux.form.SuperBoxSelect( { applyTo : 'testId', id : 'test', allowBlank : true, msgTarget : 'title',...
rematnarab
1

votes
3

answer
306

views

Redirect error laravel

Hello i am using createProduct page for my create form. And after i created a product i want to redirect to the same page with parameters. Can you help me with the following error please ? web.php Route::get('/admin/products/create','[email protected]'); Route::post('/admin/products/c...
rematnarab
1

votes
1

answer
68

views

Cannot get Ajax data on init in Angular 2

I am sure the problem is about asynchronization but I could not find the solution. I have created a service which gets an array of JSON data. In my component, I would like to show this data when the page is loaded. I don't get any data when the page is loaded, but I created a button and put the sam...
rematnarab
1

votes
1

answer
79

views

How to add new line in modal body in angular

I have a modal for error messages. I would like to make modal body messages multilined without changing the template of the modal, any help would be great.. {{_modalBody}} I tried this._modalBody = 'Something went Bad'+error ; with no luck.
rematnarab
1

votes
3

answer
999

views

Is there any jquery plugin similar to extjs suberboxselect?

I am looking for a jquery plugin which is similar to extJS superboxselect extenstion. Which allows multiselect and autocomplete functions together combined with cool interface. Any ideas ? http://www.technomedia.co.uk/SuperBoxSelect/examplesRemote.html http://www.technomedia.co.uk/SuperBoxSelect/ex...
rematnarab
0

votes
0

answer
7

views

Validating a selectbox from within the template in Angular

I would like to access to the value of a dropdown and if the value is '-1' i would like to give a message to the user. I know i can use a variable with 2 way binding and check its value but i want to do it only using the template. I am trying to do something like below. Seciniz Option 1 Option 2 Pl...
rematnarab
5

votes
3

answer
35.5k

views

How to access a gridview column on rowdatabound ?

I would like to change the value of my gridview column to active when the value is 1. I have gridview column like and cs code protected void gvCategory_RowDataBound(object sender, GridViewRowEventArgs e) { if (e.Row.RowType == DataControlRowType.DataRow) { if (e.Row.Cells[5].Text=='0') { e.Row.Cell...
rematnarab
5

votes
2

answer
1k

views

Unable to load AWS credentials Error when accessing dynamoDB (local) with java

I have installed the local version of dynamoDB, and set up a maven java project to access the DB. When i run the code i get the below error. Since i have installed the server in local (it runs son localhost:8000), i dont have any credentials to provide... Any idea how to solve it? import java.util.I...
rematnarab
3

votes
0

answer
1.6k

views

getting list separator from regional settings using firefox with javascript

I am trying to get the list separator property which is configured in windows regional settings. I have found the below code which is working for IE and Chrome but unfortunately not working in firefox. function getLocaleDelimeter(){ var array = ['a', 'b']; var list_seperator = array.toLocaleString(...
rematnarab
3

votes
1

answer
297

views

Can not define a constructor with parameters in ErrorHandler in angular 2

I am trying to create a shared service and use it from GlobalErrorHandler class which implements ErrorHandler but i get an error when i write the constructor with parameters. metadata_resolver.js:972 Uncaught SyntaxError {_nativeError: Error: Can't resolve all parameters for GlobalErrorHandler: (?)....
rematnarab
3

votes
1

answer
559

views

What is the event after the chart is completely drawn and animation is finished in ext.js 4

I have a tab panel. Each tab has a chart in it. I am trying to create a loading mask between each tab switch. I have tried to mask the body before render of a chart and unmask afterrender but it seems like the chart is unmasked before the chart is completely drawn. What happens is i dont even see...
rematnarab
7

votes
2

answer
208

views

Accessing a private element through an inline created object in java

I am new to java and trying some accessing methods and i encountered something that i do not understand. The code below working fine, prints 9 and not giving any compilation errors. I think this code should give a compilation error and number should be inaccessible from the test method, since new H...
rematnarab
1

votes
2

answer
1.8k

views

How to access to an ngModel element inside a reusable component

I have an ngModel component inside my reusable component. The field is not part of a form. I would like to access to it to do some changes. I have tried the below code but it comes undefined in OnInit. Could you tell me how to access it ? Below code returns undefined @ViewChild('nameAccessor') ngMod...
rematnarab
3

votes
1

answer
1.6k

views

Accessing a checkbox value on click in angular 2

I have this checkbox which i want to see if it checked through ngModel binding. When i call console.log(activeCheckbox); i can see the ngmodel and its value property set to true in the console. But when i call console.log(activeCheckbox.value); right after or seperately, the value is undefined? Does...
rematnarab
3

votes
4

answer
1.1k

views

Javascript event after the dom is ready but not rendered

Is it possible to do something after the dom is ready but it is not rendered(White screen) I would like to hide the contents from user and after some operations i would like to show the final picture. I could use 'display:none' on my body tag but i am working on a huge project so i dont want to cha...
rematnarab
4

votes
2

answer
1.6k

views

Using a dropdownlist control inside a formview

I am new to asp.net and i have a problem using a dropdownlist control inside a formview and passing its value to the related sqldatasource. When i use the code below i get the following exception Exception Details: System.InvalidOperationException: Could not find control 'ddlCategory' in ControlPar...
rematnarab
2

votes
1

answer
1.5k

views

Accessing an hidden input field in angular 2

I am trying to get the value of an input field. I get undefined with the if condition on the hidden field. I have the same condition in element which triggers the function. It works when i tried it without *ngIf='fileLoadedFlag' in input element. I don`t understand what may be the problem ? {{pict...
rematnarab
2

votes
0

answer
51

views

Exception handling in angular using spring as backend

I am using a global error handler which simply uses console.log for now. When i get a exception from my spring controller like below i would like to log it on the console. but when i log the error i get the below message Chrome Console Failed to load resource: the server responded with a status of...
rematnarab
2

votes
0

answer
264

views

How to instantiate Http service in main.ts manually

I need to instantiate Http in main.ts manually. I found some answer using HTTP_PROVIDERS like below, but looks like HTTP_PROVIDERS is deprecated. Any idea how can i do this ? const injector = ReflectiveInjector.resolveAndCreate([HTTP_PROVIDERS]); const http = injector.get(Http); I will than use this...
rematnarab
3

votes
2

answer
544

views

Laravel layouts not working

I am trying something really simple and can not get it to work. I have 2 pages. admin.blade.php and left.blade.php I am trying to use admin page as the master page. and include date from left.blade.php The admin pages print only 'test' as the result and includes nothing from left.admin.php. I can`...
rematnarab
6

votes
2

answer
107

views

When we create an object using new operator, does it use the actual .class file to create an object in java

I am confused about a subject and can not find it on the web. As I understand it, when the program starts the class loader loads the .class files and store them in the memory as objects with the type Class. My question is when we use: Test test = new Test(); Is the new object created using .class f...
rematnarab
2

votes
1

answer
54

views

Can i return String or List depending on the class parameter of a method in java generics

and i would like to return a String or List depending on the parameters. BTW i am new to generics and i am trying to learn. Thanks in advance.. I want to call my class like this. getVehicleInfos('test',1,String.class); // This will return a String List vehicleList = null; getVehicleInfos('test',1,v...
rematnarab
2

votes
4

answer
149

views

Too many decimals after addition

I would like to add 0.01 to 36.01 and get 36.02 as the result But below code returns 36.019999999999994. Double d = 36.01; d = d + 0.01; Could anyone tell me how to get 36.02 as the result ? Thanks in advance
rematnarab
8

votes
5

answer
13k

views

How to make first column of a row black and second column red

I would like to give a css class to a row and i would like to make the first column black and the second column red. I dont want to use colgroup because this is a row specific action not whole table should be effected.
rematnarab
5

votes
2

answer
764

views

Using try-finally block inside while loop [duplicate]

This question already has an answer here: Does a finally block always get executed in Java? 46 answers I am trying to understand the mechanism when i use finally inside a while loop. In the below code. In finally line prints and than the while breaks. I was expecting the code not to reach the fina...
rematnarab
1

votes
4

answer
428

views

How much data does inputstream.read reads in java

I was looking at the definition of the read method of inputstream object, I am confused about how much data is read everytime since it says 'reads some bytes' public int read(byte[] b) throws IOException Reads some number of bytes from the input stream and stores them into the buffer array b. The nu...
rematnarab