_id
stringlengths
2
6
text
stringlengths
4
46k
title
stringclasses
1 value
d11101
As per the documentation: Warning: Do not mix implicit and explicit waits. Doing so can cause unpredictable wait times. For example, setting an implicit wait of 10 seconds and an explicit wait of 15 seconds could cause a timeout to occur after 20 seconds.
d11102
you can use stop() method: Stop the currently-running animation on the matched elements. $("#out").mouseover(function () { $("#in").stop(true, true).animate({"height":"toggle"},200); }); A: First of all, you should take the advice given by me and by Raminson. The stop() function will halt all currently runnin...
d11103
I use a slightly different Content-Type (which shouldn't matter): [request addValue:@"text/json; charset=utf-8" forHTTPHeaderField:@"Content-Type"]; And I use a slightly different PHP, too: <?php $handle = fopen("php://input", "rb"); $http_raw_post_data = ''; while (!feof($handle)) { $http_raw_post_data .= fread(...
d11104
Try using this [DisplayFormat(DataFormatString = "{0:dd/MM/yyyy}")] public DateTimeOffset StartDate { get; set; }
d11105
I think the issue here is that you are not specifying which user you want to impersonate in the domain (and you haven't configured the security settings in your domain to authorize the service account to impersonate users in the domain). The doubleclick API auth documentation has good examples on how to do this. You ca...
d11106
The top 100 variable should be a list, then append a dictionary top100 = [] for product in product_list: title = product.xpath('a[@class="someClass"]/text()') # LIST of 100 price = product.xpath('div[@class="someClass"]/text()') # LIST of 100 top100.append({'title':title,'price':price}) print( top1...
d11107
I am not sure but you can get the list of services for sharepoint by constructing a url like below. http://yoursharepointhostname/_vti_bin/lists.asmx
d11108
if (stringArr.sort(frontToBack)==stringArr.sort(backToFront)) { is your problem. In JavaScript, the sort method updates the value of the variable you are sorting. So in your comparison, once both sort's have run, both end up with the same value (since the second sort, effectively overrides the first). For example. var ...
d11109
It is, but the problem is that protobuf-net assumes (due to the concatenatable nature of the protobuf format) that it should extend (append to) lists/arrays, and your field-initializer is starting it at length 2. There are at least 3 fixes here: * *you can add SkipConstructor=true to the ProtoContract, which will me...
d11110
No need for an if statement; just use grep: echo $line | grep "\b$word\b" A: You can use if [[ "$line" == *"$word"* ]] Also you need to use the following to assign variables line="1234 abc xyz 5678" word="1234" Working example -- http://ideone.com/drLidd A: Watch the white spaces! When you set a variable to a valu...
d11111
So you looked at your process/calcs and it seems correct but you look at your result and it's funny. One thing you notice when you print the counts... print predatorI, preyI is that there are fractions of predators and prey which, in the real world, doesn't make sense. You are trying to simulate the real world. All ...
d11112
The solution depends on where you are acquiring the event parameters from. Are they coming from text that is being clicked, or are they coming from the page path, etc. One possible solution would require that you push your dynamic category, action, label values with your dataLayer push: dataLayer.push({ 'event': 'ev...
d11113
I found an alternative solution this may not automatically allow drag objects to snap to every snap zone but it does allow you to control it with less code. I created a function to get the object(code) and the zone(outline): function snapTo(code, outlineSnap) { var outline = outlines[outlineSnap + '_black...
d11114
As per my knowledge if your woocommerce by default currency is dollar then currency always comes in same the currency.Can you please share your site Url then I can check what is the problem?
d11115
I think you would be better off using InvokeRepeating(string methodName, float time, float repeatRate). You only need to call it once and it will repeat. Example: void Start() { InvokeRepeating("myTask", 1.5f, 1.5f); } void myTask() { // Execute repetitive task. } If you want to stop it at any point you simpl...
d11116
Declare currentDate as an @property in your class. And try this. @property(nonatomic, retain) NSDate *currentDate; Initially set self.currentDate = [NSDate date]; before calling this method. - (void)weekCalculation { NSCalendar* calendar = [NSCalendar currentCalendar]; NSDateComponents* comps = [calendar compo...
d11117
I recently found a nice way of logging the value of an expression: trait Logging { protected val loggerName = getClass.getName protected lazy val logger = LoggerFactory.getLogger(loggerName) implicit class RichExpressionForLogging[T](expr: T){ def infoE (msg: T ⇒ String):T = {if (logger.isInfoEnab...
d11118
You can do this by using the GroundOverlay object of Google Maps JavaScript API. But you need to get the current map object used in your google-maps-react code and you will use this to setMap the overlay into this map ref. See the sample code and code snippet below: import React, { Component } from 'react'; import { Ma...
d11119
It might be worth taking a step back and seeing if what you want to achieve is really valid. Generally, a serializable class is used for data transport between two layers. It is more likely to be a simple class that only holds data. It seems a little out of place for it to hold the ability to persist to a database. It ...
d11120
On http://www.scala-sbt.org/release/docs/Community/Community-Plugins.html is a list of SBT plugins. A plugin for your purpose can be https://github.com/steppenwells/sbt-sh .
d11121
I assume you have already checked the log4j2 documentation so you know how to create a basic log4j2.xml file. I also assume you want to keep some logging but only want to switch off some very verbose logging by org.quartz.scheduler.* loggers. Then, a basic config with quartz loggers switched to ERROR-only could look li...
d11122
You can try to use @Bucket bigint = NULL for @Bucket default value. because NULL mean unknow or you can set a value which should not in bucket column be the default value. declare @Bucket bigint = NULL select * from @t where (@Bucket is Null or bucket = @Bucket) NOTE but If @Bucket bigint is bigint it should not ...
d11123
you can <button mat-button (click)="clickCard('PC_Job005')">..</button> clickCard(value:any) { console.log(value) } //or <button mat-button value="PC_Job005" (click)="clickCard($event)">..</button> clickCard(event:any) { //see that you need use currentTarget console.log(event.currentTarget.getAttribute('value...
d11124
You need to add the trailing quote like this (if using the @ syntax you must use "" to match a one quote): str = Regex.Replace(str, @"xmlns=.*?\.be/""", "", RegexOptions.IgnoreCase); Add a space at the beginning if you want <sender> instead of <sender >: str = Regex.Replace(str, @" xmlns=.*?\.be/""", "", RegexOptions....
d11125
My issue turned out to be that the DB had been created with a firewall rule for 1 IP named Azure. This was somehow set to the IP address the function app was sometimes using. No idea how this got setup. The DB firewall rules have a switch to allow Azure resources to connect. No need for v-net and premium plans, unless ...
d11126
No, you don't need a conversational Action for what you're doing. Depending on the specifics of how you're providing the content, you may wish to look at either Podcast Actions or News Actions. These methods document what Google is looking for to make structured content available to the Google Assistant.
d11127
Take a look at the SetTimer function, I think it does exactly what you need. Before event loop you should call this function with desired interval and you have to pass to it a callback function. Alternatively you can use another function CreateTimerQueueTimer VOID CALLBACK TimerProc(HWND hWnd, UINT nMsg, UINT nIDEvent,...
d11128
No, you can do that. CodedUi tests are executed through command line through MSTest which does not support it. Check here to see the available command-line options of MSTest. However, you can create another Project (e.g. console application) to achieve that. The second project has a reference to your CodedUI Project. T...
d11129
Since you are using Material-UI, you can use their autocomplete component with a TextField as input, have a look at the "Combo box" here: https://material-ui.com/components/autocomplete/#combo-box
d11130
I found the issue. It turns out that I was setting my flags and service improperly. First, according to this, INTERNET_OPEN_TYPE_DIRECT and INTERNET_OPEN_TYPE_PRECONFIG conflict with each other. So, I removed INTERNET_OPEN_TYPE_DIRECT to tell Windows that I would like to use the network settings stored in the registry....
d11131
If you want to declare that ONLY these people form the commitee, you should use Collection, not rdf:Bag. The RDF tutorial at w3schools.com gives an example: https://www.w3.org/TR/rdf-schema/#ch_collectionvocab In the RDF schema you need to declate a property "hasMember" or "member". Its domain is a commitee, and its ra...
d11132
You can overcome the problem with checking whether there is anything to stash first. You can use one of the ways to check whether an index is dirty that are suggested in Checking for a dirty index or untracked files with Git For instance this command will not output anything if there are no changes to stash: git status...
d11133
if you want to pack the bs into the frame data field, you can - unpack(packing.low, bs, current_frame.data);
d11134
It gets desugared to this: println("Unisex names: ".+(boys).intersect(girls)) then according to the -Xprint:typer compiler option it gets rewritten like this: println(augmentString("Unisex names: ".+(boys.toString)).intersect[Any](girls)) where augmentString is an implicit conversion from type String to StringOps, wh...
d11135
not provided by Solr itself. But nothing prevents you from doing this: * *set your DIH sql for the delta like this: WHERE (last_pk_id > '${dataimporter.request.LAST_PK_ID}') *when you run some indexing, store, outside Solr, the last_pk_id value you indexed, say 333. *next time you need to delta index, add to ...
d11136
Short Answer using System; using System.Text.RegularExpressions; Console.WriteLine(Regex.IsMatch("1313123", @"^\d+$")); // true That assumes we want to validate a simple integer. Conversation If we also want to include thousands grouping structures for one or more cultures or other numeric conventions, that will be ...
d11137
The place where I think you've mistaken is where you're writing code for update The way I do it is def update(self): # Update sprite position self.rect.x = self.rect.x + self.movex self.rect.y = self.rect.y + self.movey # moving left if self.movex < 0: ...
d11138
That constructor will be called on the server when you make your request from the client. Creating a "reference" to a web service (and then using the client classes) is very different to referencing a regular .DLL. All of your service code will run on the server-side, but not until the service is invoked... A: The on...
d11139
The immediate problem, causing the fan shape you observe, is caused by startx and starty remaining the same for each object entry in canvas_data.pencil array. This is because, startx and starty are assigned the values held in prevX and prevY, but these were set in the mousedown event listener and are not updated in th...
d11140
The expression x % a is only valid for integral types x and a. Since x is a float type, compilation fails. If you want the floating point modulus for a float type, then use std::fmodf instead. (Note that a will be implicitly converted to a float.) Reference: https://en.cppreference.com/w/cpp/numeric/math/fmod
d11141
Postgres version does not matter here. The tables are not identical. Most likely in your 9.4.5 table the column id is a primary key, while in 9.4.4 is not.
d11142
The code is valid, assuming that the variable $imgD is defined (var_dump is one way of checking this, but print or echo may also work). Check to ensure that cookies are enable in your browser. Also, be sure that session_start() comes near the top of your script, it should be the first thing sent to the client each time...
d11143
It's not quite clear where in the app hierarchy that component is so I've attempted a bit of guess work. You're almost there by the looks of things. You just need to iterate over the buttons and create them. function Button(props) { const { disabled, text } = props; return <button disabled={disabled}>{text}</bu...
d11144
you can try this select distinct on (eccev.extra_data , c.id) eccev.extra_data , c.id, case when ... but your query seems not optimized as you cross join 6 tables all together ...
d11145
You could have something like: @RestController @RequestMapping("/api/v1/messages") public class MessageController { @RequestMapping(value = "{messageId}", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_UTF8_VALUE) public ResponseEntity<Message> getMe...
d11146
It doesn't work that way because you cannot transmit the file via a URL and Pages cannot access a file that is stored in your app's sandbox. If you want to give the user the option to open a file in Pages in your UI, UIDocumentInteractionController is the way to do that. It presents a UI where the user can preview the ...
d11147
In your imports you are mixing imports between the keras and tf.keras packages, that is actually not supported, you should choose one and make all imports from the selected package.
d11148
Like @daliusd mentioned in his answer, the accepted answer here should be: npm i @types/multer --save-dev req.files is now typed and recognized by the Typescript compiler. A: Probably we can just extend Request interface MulterRequest extends Request { file: any; } public document = async (req: Request, res: Re...
d11149
* *Click on the link, show "Loading.." *Load CSS file by ajax, in callback function, create <style> tag, and then insert CSS code to <style> tag, and then start load content by ajax. *you can optimize the flow by load CSS and content individually, but content only take place in a hidden container, once CSS file fin...
d11150
This is how I'd do it in haml: .col-xs-2 .text-center = product.input :auth_quantity, type: "number", max: "<%= producto.req_quantity %>" label: false, required: "required" Where producto.req_quantity is the numerical value of the quantity of a certain product a client requested. A: So I basically solved it l...
d11151
I would create a class that will hold gather all "store entities" and their sales, i think that using a collection of this class (StoreEntity in my example) it will be much easier to perform a variety of data manipulation (for this task and in future tasks). here is my suggestion: public class StoreEntity { Person ...
d11152
The misconception: To quote the docs: Widgets should not be confused with the form fields. Form fields deal with the logic of input validation and are used directly in templates. Widgets deal with rendering of HTML form input elements on the web page and extraction of raw submitted data. Widgets have no influence on ...
d11153
You can define to_param on your model. It's return value is going to be used in generated URLs as the id. class Thing def to_param name end end The you can adapt your routes to scope your resource like so scope "/something" do resources :things end Alternatively, you could also use sub-resources is applicab...
d11154
I am attempting to use pthreads with Apache FPM. You can't. Find a way to work without them. The pthreads extension cannot be used in a web server environment. Threading in PHP is therefore restricted to CLI-based applications only. -- http://php.net/manual/en/intro.pthreads.php
d11155
It does not work because you have paused the CCDirector. Remove the following line: [[CCDirector sharedDirector] pause]; Alternatively if you really need that, resume the director before you attempt to replace the scene. [[CCDirector sharedDirector] resume]; [[CCDirector sharedDirector] replaceScene:[GamePlayScene sce...
d11156
You can generate a ClickOnce certificate with any expiration date (and any Issued To/Issued By values): makecert -sv ClickOnceTestApp.pvk -n CN=Sample ClickOnceTestApp.cer -b 01/01/2012 -e 12/31/2100 -r It will be a self-signed certificate, same as generated by Visual Studio for click once deployments. from ...
d11157
After pm <- ggpairs(tips, 1:3, columnLabels = c("Total Bill", "Tip", "Sex")) do this levels(pm$data$sex)[levels(pm$data$sex) == "Male"] = "M" levels(pm$data$sex)[levels(pm$data$sex) == "Female"] = "F" You'll get this plot: It won't change anything in tips dataset: head(tips) total_bill tip sex smoker day t...
d11158
The size of the map value &S, a pointer, is the same irrespective of the capacity of slice b. package main import ( "fmt" "unsafe" ) type S struct { a uint32 b []uint32 } func main() { size := unsafe.Sizeof(&S{}) fmt.Println(size) size = unsafe.Sizeof(&S{b: make([]uint32, 10)}) fmt.P...
d11159
The problem is that you created a placeholder in add_final_training_ops that you don't feed. You might think that the placeholder ground_truth_tensor that you create in add_final_training_ops is the same, but it is not, it is a new one, even if it is initialized by the former. The easiest fix would be perhaps to return...
d11160
Maybe you can do this: public function store(Request $request) { //Approved Request $approvedRequest= DB::table('request') ->where('users_MemId',Auth::user()->MemId) ->where('requestStatus','Approved') ->join('requestdetails','request.requestId...
d11161
I had the same problem until I specified the key and cert in my .bash_profile file: export EC2_HOME=~/.ec2 export PATH=$PATH:$EC2_HOME/bin export EC2_PRIVATE_KEY='ls $EC2_HOME/key.pem' export EC2_CERT='ls $EC2_HOME/cert.pem'
d11162
It's really a shared value, so every time a constructor runs, the value is incremented by 1 regardless of when the variable is accessed thereafter. You could verify this yourself: private static void showObjectCounter() { Counter val1 = new Counter(); Console.WriteLine("Total objects created = {0}", Counter.obj...
d11163
You can use a delegate: from PyQt5 import QtCore, QtGui, QtWidgets class CheckBoxDelegate(QtWidgets.QStyledItemDelegate): def initStyleOption(self, option, index): super().initStyleOption(option, index) option.palette.setBrush(QtGui.QPalette.Button, QtGui.QColor("red")) class MainWindow(QtWidget...
d11164
GatewayScript doesn't support any XML Dom in the ECMA (Node.js) implemented. I have however used the modules XPATH and DOM with great success. Download XMLDom (https://github.com/jindw/xmldom) and Xpath (https://github.com/goto100/xpath) Node.js modules and add the following scripts to your DP directory: * *dom-pars...
d11165
The height increases because you set the height in the first run. After that the height remains the "max hight" + 25 and adds additional 25 to it. To prevent that just reset the height of the element to auto. function listHeight() { $("ul.container").each(function () { var listHeight = 0; var newHei...
d11166
try to add some constraints in the layout of edittext instead defining style <EditText android:id="@+id/editText1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:ems="5" android:maxHeight="40dp" android:scrollb...
d11167
Instead of creating a gradient in drawRect:, have you considered using CAGradientLayer as the layer class of your custom view, e.g.: + (Class)layerClass { return [CAGradientLayer class]; } Then you can perform any setup of your gradient in your initializer, via self.layer.
d11168
The accepted answer is most likely written towards an older version of the SDK I just couldn't get it to work. This is what works for me as of now. As an example, the following allow us to access files in Google Drive which is part of googleapis. Dependencies pubspec.yaml: dependencies: google_sign_in: any googleap...
d11169
Ok it turns out you spelt it getElementByTagName, whereas the method is actually getElementsByTagName.
d11170
As stated here, you can extend the build script as ember-cli. You can also look at the ember-cli user guide for built in configurations that you can use without making any extension first
d11171
You can also do like we do in hawtio (http://hawt.io/) where we use REST calls to remote manage Camel applications, so we can control routes, see statistic, view routes, and much more. All this is made easier by using an excellent library called jolokia (http://jolokia.org/) that makes JMX exposed as REST services. Eac...
d11172
What you are looking for is often refered to as AC (access control). One of the most popular is an RBAC (role based access control) because it allows you to group your users/accounts into groups and give those groups certain privileges. Let's go through the design steps of a minimal setup: Basically what you are saying...
d11173
If the phone is off and you turn it on you will then get the GCM message, its the same as you would an email that you got if you had your phone off. When it says there is no guarantee you will receive the message that means there is no guarantee the server will send it out. I remember reading there is a time to live on...
d11174
I think that the aggregate you have is not correct. A Course entity can exists on its own, it is not a child entity of a Student entity. A course has its own lifecyle: e.g. if a student leaves the school, the course keep on existing. The course id doesn't depend on the student id. The student can hold the course id, bu...
d11175
Just export the slides to html using the no input option: jupyter nbconvert YOURNOTEBOOKSNAME.ipynb --to slides --no-input serve For more check out nbconvert's documention
d11176
The recommended way is to use AsyncTasks for long running tasks. So, not everything needs to be run with AsyncTasks, as you can get a performance hit due to the context switching. As for how AsyncTasks work, read the documentation. A: Use an AsyncTask and make sure to implement these as needed. You mention the idea of...
d11177
Assuming you want to store generic Objects you will need to use remove() instead of pop(). Your problem after that is returning True, which is not a valid return type for a view. Flask view raises TypeError: 'bool' object is not callable from flask import session as sesh @app.route('/todo/<profile_id>') def todo(profi...
d11178
As your console tab shows, the problem is with a HTML document or Javascript (jquery), not with the image itself. Moreover, why isn't your varnishlog showing the second request? What server is returning the "304 Not Modified"? There's something in between Chrome and Varnish. A Chrome plugin?
d11179
The topic you're interested in is called "url rewriting". You will also see similar looking url's on sites using MVC as well. It has very little to do with preventing security exploits. I think you are referring to sql injection when you say most websites are attacked from their URL. This is possible when using GET...
d11180
This answers nothing, just report that I cannot repeat it, the code is compiled with gcc x.c -W -Wall -fopenmp -ggdb and gdb session as the following, everything seems fine, I guess it may be related with compile flag, try add -O0 in addition to -g or -ggdb Reading symbols from ./a.out...done. (gdb) break 9 Breakpoin...
d11181
I solved an issue with this same message caused by a proxy-blocker of the client. I had to set --proxy-server flag in my customLauncher in karma.conf.js, so the karma server could get the ChromeHeadless and execute the tests perfectly. karma.conf.js browsers: ['MyChromeHeadless'], customLaunchers: { MyChromeH...
d11182
You can use the ARN in the --function-name parameter when executing AWS CLI calls for the AWS lambda API. Here's an example for the get-function api: --function-name (string) The name of the Lambda function, version, or alias. Name formats Function name - my-function (name-only), my-function:v1 (with alias). Funct...
d11183
Node.js processes the request one after the other. There is only one thread. However, if you for example query the database for some information and pass a callback, while the query is executed, node.js can process new requests. Once the database query is completed, node.js calls the callback and finishes processing th...
d11184
What version of Transcrypt are you using? Wasn't able to replicate the error using Python 3.9.0 and Transcrypt 3.9.0. You can check like this (Win): > transcrypt -h | find "Version" # and may as well double check that the right version of python was used: > python --version The Python and Transcrypt versions should ma...
d11185
The why behind your pattern escapes me but one solution could be to define a null collection, (docs) copy the records you need to that, do your work, and then copy back the results into the original collection for automatic sync back to the server. myLocalCollection = new Mongo.Collection(null);
d11186
Why don't you use something like this to generate your $dados object? There is no need to build your data as a html ajax GET Parameter string. var $dados = {}; $("#form").find('textarea').each(function(){ $dados[$(this).attr('name')] = tinyMCE.get($(this).attr('id')).getContent(); });
d11187
The most likely thing here is that you don't actually have a signed -0.0, but your formatting is presenting it to you that way. You'll get a signed negative zero in floating point if one of your calculations yields a negative subnormal number that's rounded to zero. If you do indeed have a pure signed zero, then one wo...
d11188
It can happen for a number of reasons, see here more details. You should try firs @bayanAbuawad suggestion that works most of the times: * *Add the platforms with cordova platform add ios android *Remove them with cordova platform remove ios android *Add them again. It is super weird, but it’s related to a faulty ...
d11189
Assigning structs does a member-wise assignment, and for arrays this means assigning each item. (And this is done recursively for "multiple dimension" arrays, which are really just arrays of arrays.) You are correct that it does a shallow copy, even on arrays. (I'm assuming that you have not overloaded op= with respe...
d11190
In an more abstract way a map-structure is nothing more than a function mapping inputs of a certain type to an array. A map can thus be replaced by a array and a function. (The difference being you will have to define the function yourself) Before I get started with the rest I would like to point out that if your model...
d11191
When using the extension method Find() you must be sure that in your model you have the attribute [Key] in the property representing your Id (primary key in your table). And you can try like this: Character character = db.Characters.Find(User.Identity.GetUserId()); The line above will work but not this one character= ...
d11192
You can compute the mean, and analyze it the same way as you did for k-means. For maybe better results, you can weigh each document by the responsibility factor, if these are exposed by the sklearn API.
d11193
Simply use: UpdateValue(event:any,myStock: stock) { // ... console.log(event.checked); } Here's a working stackblitz for the same. A: Just use ngModel <mat-cell *matCellDef="let row"> <mat-checkbox [checked]="row.isDisabled" [(ngmModel)]="checkValue" (change)="UpdateValue($event,row)"></mat-checkbox>...
d11194
In a nutshell, the first ELEMENT declaration is saying the child elements have to be in a specific order. The second ELEMENT declaration is saying the child elements can be in any order. The following means: a bank element containing zero or more account elements, followed by zero or more customer elements, followed by...
d11195
Simplest Approach might be to Drop the constraint, Perform Update Queries Again, Introduce the Foreign Key Constraint. A: drop the constraint and re-create the constraint with ON UPDATE CASCADE then execute the update stament on the parent table no child table would get modified. ALTER TTABLE b ADD CONSTARINT fk_...
d11196
You are manually checking commonName against individual cases, and TypeScript really doesn't have good support for type checking the body of makeSound() if it is generic. Even though commonName is of the generic type C, checking commonName only narrows the type of commonName itself, it does not further constrain C. S...
d11197
Is this a real query? I'm asking because the query is invalid - having clause is equal to writing 1 > 1, so always False... And if you replace '>' with '=' the query is always true unless the result from sum() is NULL...
d11198
You cannot use the name you've given to the dimension via the interface. You'd have to use the "dimension" keyword plus the numeric index (order of creation), so the dimension that is referred to as "productSize" in the reports would in your example be addressed as "dimension1" in the code: ... 'list': 'Search Results'...
d11199
In jQuery we use the selector for select any elements, and we have to put . for the class and # to the id selector so please put # or . before your element. In your case, $('#Hid_BasicSalary'); or $('.Hid_BasicSalary'); is your answer. A: i was missing # with $. var BasicSalary = $('Hid_BasicSalary'); i write this in...
d11200
You could simply pass two, comma-separated, selectors to the find() method: $('#select-service').find('optgroup, option').remove(); You could also just remove all children elements for the same result: $('#select-service').children().remove(); // or: $('#select-service > *').remove(); The most concise approach would ...