Menu
  • HOME
  • TAGS

CSS : Setting font-family in select options doesn't work for chrome and IE browsers?

css,options,fontfamily

The options tags are created by the browsers UI styles and are hard and inconsistent to style. You would either want to use some javascript, build it as something other than a select (such as a list) or my preference, leave it as the browser default.

In JQuery, how do I copy a subset of select options from one select menu to another?

javascript,jquery,options,copying,select-menu

var option, count = -1; while ((option = $('#select1 option')[++count]).value != "") { $(option).clone().appendTo('#select2'); } $($('#select1 option')[count]).clone().appendTo('#select2'); //for the '=====' one <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> <select id="select1"> <option value="A">option A</option> <option value="B">option B</option> <option value="">=============</option> <option value="AA">option...

wordpress option title won't appear on site when checkbox ticked

php,wordpress,checkbox,options

You are using php tags in your string, so it won't be parsed. Use it like this: function display_option_title() { if (get_option('option_title') == 1 || get_option('option_title') <> '') { ?> <a href="<?php the_permalink(); ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"> <h2><?php the_title(); ?></h2> </a> <?php } } ...

Ruby 2.1.3 options hash cannot be assigned with fetch

ruby,hash,fetch,options

You actually have the correct structure down, however the final puts in your method is causing the return value to be nil. Ruby utilizes an implicit return, so unless specified, it will return the last value of a method. remove the puts aspect_ratio from the method, or ensure the last...

Apiary: Is there a way to define options for parameters?

parameters,options,apiblueprint,apiary.io,apiary

You can enumerate the possible values of an URI query parameter and discuss it in the parameter discussion like so: + Parameters + measurement = `m` (optional, string) ... measurement units Any discussion here... e.g. explanation of **values** listed bellow are. + Values + `m` + `mi` + `yd` Also...

How to sum values of options per loop in JavaScript

javascript,for-loop,add,options

You could try doing something like this: var total = 0; for ( var i = 1; i <= 30; i++ ){ total += parseFloat( document.character[ "input" + i ].value ); } document.getElementById( "output" ).innerHTML = total; All I am doing here is using the variable i to assemble the...

Scala Illegal Start of Simple Expression: Option Type and Ellipsis

scala,pattern-matching,option,options,ellipsis

... is not a valid Scala expression. If you want a function with an "unknown" implementation you can use ???: def option[A, X](o: Option[A])(none: => X, some: => A => X): X = ??? The goal of this function is apparently to take a function as parameter and to apply...

C++ and finance, trouble understanding syntax in these files [closed]

c++,options,finance

I originally wasn't going to answer as there is a lot here for beginning c++ but I thought it might be beneficial to give you a highlevel overview and make you aware of the learning curve involved. I think you should slow things down and take a look at a...

display number of elements depending on option selected

javascript,jquery,select,options

Here is working demo just a basic filter to apply filter9 on how many li elements to show https://jsfiddle.net/xd2482f6/6/ Instead of pasting all your code which you can get from the JS fiddler i will just add in changes made. <select id="filter9" > <option value="-1" > all</option> <option value="1"> 1</option>...

extend default, options override everything

javascript,jquery,plugins,jquery-plugins,options

Removing the first extend and getting rid of the pCSS inner object helps: $.fn.myPlugin = function (options) { var defaults = { color: 'red', margin: '1em' }; var settings = $.extend(true, defaults, options); return this.click(function () { $(this).css(settings.pCSS); }); } $(document).ready(function () { $('.plugin').myPlugin({ color: 'blue' }); }); DEMO...

Visual Studio 2013 code snippets / code templates

visual-studio,preferences,options

In Visual Studio these are called "Code Snippets". This feature is not related to IntelliSense. There are a number of them built in, for example in C# if you type "ctor" it will create a simple constructor for the class you are in. For other C# snippets see here. You...

How to make jqGrid dynamically populate options list based on row data

dynamic,jqgrid,options

You don't wrote which version of jqGrid you use currently, but dataUrl can be defined as callback function with (rowid, value, name) parameters, which have to return the URL which you can build dynamically based on the information. The feature exist starting with v4.5.3 (see the line). You can use...

how to apply stringtoword vector filter

filter,weka,options

The attribute indices takes index, respectively indices of attributes whose values you wish convert to word vector. So you have two attributes class with index 1 and text with index 2. Setting first-last takes both and very likely did nothing with class since it is usually single value, and make...

PHP Multiple Hidden Values Select Option

php,html,select,options

Hey you cannot have multiple values like that because post or get will return just first value which in this case is 5 <option value="5","abc">GH20</option> but you can make your value looks like this <option value="5,abc">GH20</option> and then in php script you can separate values by using explode function explode(',',...

Dynamic option selection in bash?

osx,bash,selection,options

To split $loremipsums on newlines, and select one of them: oldIFS=$IFS IFS=$'\n' choices=( $loremipsums ) IFS=$oldIFS PS3="Please enter your choice: " select answer in "${choices[@]}"; do for item in "${choices[@]}"; do if [[ $item == $answer ]]; then break 2 fi done done echo "$answer" ...

Trying to get value out of a select option in the same form

java,sql,database,jsp,options

1.) You can not select all the items in a select with selected ! Without multiple="multiple" <c:forEach var="row" items="${STOCKS1.rowsByIndex}"> <option selected><c:out value="${row[0]}"/></option> </c:forEach> E.g. topFr[] <select name = "topFr[]" multiple="multiple"> <option selected="selected">Apple</option> <option>Pear</option> <option selected="selected">Peach</option> </select> if you can have multiple selected the name must be an array here stockid[]...

Apache Commons CLI(Options)

java,command-line-interface,options

Options.addOption(...) provides some parameter combinations, like String opt, String longOpt, boolean hasArg, String description. Using Options.addOption(...) is obviously more convenient than using an OptionBuilder. However, OptionBuilder provides additional parameters like hasArgs(int num), isRequired, withType, withValueSeparator and so on, which are not available using Options.addOption(...). If you need them, you have...

Accessing option data

python,command-line-arguments,options

It is pretty well documented, but an easy question to answer. optionParse.add_argument('-n', result='store', required=True, dest='num_locs', type=int, help='Number of locations') results = optionParse.parse_args() num_locs = results.num_locs I still think you will need a space between the -n and the number, like -n 13 or whatever. That should do the trick if...

Changing 2nd dropdown options based on first dropdown choice(JavaScript Only)

javascript,html,options

A javascript only demo to change option of a select tested in chrome 31 and IE11. This html attaches the function setOption to the onchange-event. According to quirksmode the change event is buggy. So you might have to fix / expand to improve cross browser compatibility. <select id="s1" onchange="setOptions()"> <option>Pizza</option>...

Creating Win32 console program in Visual Studio 2013

winapi,console,options

Actually, from the first result that googe gives for your question's title: You need to install "Visual Studio Express 2013 for Windows Desktop", instead of "Visual Studio Express 2013 for Windows"....

Java program - implementing various settings(options)

java,options

Your idea is correct. Setting static variables is a great way to do this. Depending on if you want the settings to be persistent (saved and loaded if the program is stopped), its also common to just save the settings to a file. This can be done easily as a...

A hierarchical options assignment inheritance

java,inheritance,options

No. You will either have to use reflection or an interface and instances. If the tool instance isn't related to the options, why don't you separate the two? OptionModule.java: public interface OptionModule { void assignOptions(MyOptionsModule optionsModule); } MyOptionsModuleFactory.java: public class MyOptionsModuleFactory { public static void createOptionsModule(Consumer<MyOptionsModule>... modules) { MyOptionsModule optionsModule...

How do I define values in options_for_select?

ruby-on-rails,select,erb,options

There is actually a helper specifically for collections, options_from_collection_for_select which is to handle exactly this case. <%= f.select(:agents, options_from_collection_for_select(@agents, 'id', 'name'), {},{multiple: true, size: 10, :id => "agents"}) %> ...

Ruby On Rails - Can't pass an array to the options_to_select in select form tag

ruby-on-rails,forms,select,tags,options

How about this? module ImagesHelper def get_images image_array = Array.new() Dir.glob("app/assets/images/*.jpg") do |item| image_array << File.basename(item) end image_array end end This is tested with Rails 4, so you may have to fiddle more with the path, but I think this should do it. Also note the use of File.basename so...

What is the use of different OnBeforeRequestOptions and OnHeadersReceivedOptions?

google-chrome-extension,options,webrequest

You can have read-only access to request body if you wish. Same with request headers, and if you have blocking enabled as well you can modify them. Passing those to your listener is an expensive operation, and that's why it's not on by default. You should not add them unless...

Zsh redirection 2>>|

zsh,options,io-redirection

>>| is another example of how zsh chose to deviate from the POSIX standard: Note that the 2 in 2>> is incidental to the constructs discussed here; they work with the either the default output stream - stdout, whose file descriptor is 1 - or any explicitly specified file descriptor,...

Rails options_for_select return value only

ruby-on-rails,forms,options,view-helpers

options_for_select is used in conjunction with select_tag. You are probably using it with select (or f.select) which accepts just the array of options as the 2nd or 3rd argument. Examples: select_tag :foo, options_for_select([['Dollar', '$'], ['Kroner', 'DKK']]) select :foo, :bar, [['Dollar', '$'], ['Kroner', 'DKK']] form_for :foo do |f| f.select :bar, [['Dollar',...

Fragment-specific options and context menus in Android

android,menu,fragment,options,android-context

I understand you want to have different menus for each fragment? You can specify a menu for each fragment and it will only show when that fragment is attached to the Activity. The code below all belongs in a fragment. You must tell the fragment it has an options menu:...

Python handling options and args

python,arguments,command-line-arguments,options,getopt

sys.argv is a list so you'd have to test for membership: if '-u' in sys.argv and '-d' not in sys.argv: However, you'd be better of using the argparse library to handle command line interfaces for you. It won't handle interdependencies directly, but it is easy enough to extend the use...

Jquery, using $.each, doesn't get the value of variable

jquery,select,add,each,options

First of all: materia = $("#selMateria").val(); $("#" + id).append(new Option($("#selMateria").val(), 'val')); $.each(materia, function(val, text) { $("#selGrupo").append(new Option(text, val)); }); In this case materia contains single value of select. $.each in this case will iterate only on that single value. I assume that you wanted something like: materia = $("#selMateria").val(); $("#"...

Create options onClick attribute

javascript,select,onclick,options

You can not bind 'click events' on 'options' property of a 'select box'. You will need to bind a onchange event listner on the 'select element'. Inside the callback function of the change event listner put your code logic for updating word text. As the 'change' event listner is not...

How to stop intelisense from auto-completing UNLESS i press space or a specific character to activate it

c#,visual-studio-2012,intellisense,options

For Visual Studio 2013, I can go to Tools -> Options -> Text Editor -> C# -> Uncheck "Auto-list members", in order to disable proactive intellisense. I would imagine it is similar for Visual Studio 2012. You can still manually activate intellisense using Ctrl+Space....

PayPal button overflow

button,paypal,responsive-design,overflow,options

There are a few issues with the code, mainly dealing with the table itself: <td> <input type="hidden" name="on0" value="Style">Style</td> <td> <select name="os0"> <option value="Male">Male</option> <option value="Female">Female</option> </select> </td> Style shown here might overflow since it's own td. If you move the <input> into the same td as the <option> it...

jquery - html() of variable option with multiple elements?

javascript,jquery,arrays,variables,options

Depending on how much you can change the setup of your code it might work better to have a main object, eliminating the need to loop in the first place, similar to his: var regions = { europa: { content: $('#box1,#box5,#box6,#box7,#box8,#box9,#box10,#box13,#box18,#box19,#box20,#box21,#box23,#box25,#box27,#box28,#box32,#box33,#box37') }, usa1: { content: $('#box38') } }; The benefit...

How to use variables in option parameters for a plugin (like fullpage.js)?

jquery,variables,plugins,options,fullpage.js

fullpage expects an array of strings, not an array with one concatenated string. $(".slide").fullpage({ // //Navigation anchors: $('.elements').map(function() { return $(this).data('menuanchor'); }).get(), ..... }); ...

What is meaning of -vvv option in cURL request

curl,options

tl;dr: there is no difference between -v and -vvv. Specifying -v multiple times usually means to increase verbosity accordingly. This is true, e.g for a software like memcached: -v verbose (print errors/warnings while in event loop) -vv very verbose (also print client commands/reponses) -vvv extremely verbose (also print internal state...

Crm 2011/2015 set select to null

dynamics-crm-2011,updates,options

SOLVED: It must be set to -1; not to null...

Invalidate screen after selecting an option from menu (onOptionsItemSelected)

android,menu,options,invalidate

I solved this by saving the view as an object so it can be invalidated with view.invalidate()

change the content of a select option

jquery,forms,select,text,options

If you specifically know that you want to change the second option element within the select, you can target it with :eq(): $('.myclass option:eq(1)').text('TWO'); Note that eq() works on a zero-based index, so 0 is the first element, 1 is the second and so on....

jQuery Getting Values of Selected Selectboxes (Display in real-time)

jquery,html,forms,select,options

First, like the comments IDs should be unique! Try this: $(document).ready(function() { $("input[type='checkbox']").change(function() { var favorite = []; $.each($("input[type='checkbox']:checked"), function() { favorite.push($(this).val()); $("#values").val(favorite.join(", ")); }); if ($("input[type='checkbox']:checked").length == 0) { $("#values").val('') } }); }); <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script> <form id="formu"> <input type="text" id="values"...

Selecting and removing a html select option without selecting by index or ID, using vanilla JavaScript

javascript,function,select,options

Something like this? (function (){ var parent = document.getElementById("MediaCategory"); for(var i=0; i< parent.children.length; i++){ var child = parent.children[i]; if(child.text === "Archive") { parent.removeChild(child); } } })(); ...

Opencart add product options to opencart

javascript,php,opencart,options,cart

First Option($key=>value) where you have passed $key => 13 which should be valid key in array of Option($key=>$Value) where $key represents product_option_id and $value represents Product_option_value_id of product_option_value table so these should be valid which is assigned dynamically when you assign option to product rather than static id. **Second** Just...

removing null from angularjs select options

angularjs,select,null,options

Use the ternary operator: <select ng-options="… as (invigilator.firstName + ' ' + (invigilator.middleName !== null ? (invigilator.middleName + ' ') : '') + invigilator.lastName) for …"></select> Since the expression is becoming pretty complex, you can also (and you'd better to) move this code in a function: <select ng-options="… as getFullName(invigilator)...

Disable selected options based on the user's decision

jquery,html,select,options

First, you have a problem with multiple IDs, that's not allowed. You need to make them classes. And give your storylines a class as well (ex storyline). So on selecting something var $lies = $(".lies"); $lies.change(function(){ $("#firstLie").hide(); var $this = $(this); var contact = $this.val(); var $currentStoryline = $this.closest(".storyline"); var...

How to theme Options of select box

html,css,wordpress,options

You can style it. Here's the raw sketch I've exctracted: jsFiddle Example select has an ID of some-filter and htis field is customized using the some-filter ID in the CSS. You can, for example, set custom dropdown-arrows, or background, or box-shadow, or anythying you'd like. However, there are some hacks...

Add Scroll Bar and select image instead of radio buttons

wordpress,image,field,options

i solved my problem by using the overflow:scroll;width:300px;css property for adding scroll bar by 300px height

Angular ng-options for bounded select elements

angularjs,select,options,ng-options

You want something like this: <select id="carModel" ng-model="carMake.model" ng-options="carModel as carModel.name for carModel in carMake.models"> <option value="">All</option> </select> We're using carModel.name as the display and setting the value as the object itself. So in your controller, $scope.carMake.model will be equal to the model object. So if the user selects "Accord"...

Chrome extension options

javascript,google-chrome,google-chrome-extension,options

the new "chrome_style" options actually don't show anything logged to the console trough console.log, your script is probably fine, try adding something to the dom. Add this at the beginning of your script to see any errors happening in your chrome options page: var errorText = document.createElement("div"); document.body.appendChild(errorText) window.onerror =...

GCC equivalent to /INCLUDE Visual Studio option

c++,visual-studio,gcc,options,equivalent

While symbols visibility might work, it is not quite the answer to the question asked. It is not a linker option, and requires source modifications, which might be undesirable. More or less equivalent is export map, but it is only available for GCC with GNU linker. GCC command-line option would...

jquery ui datepicker set localization plus other options [duplicate]

javascript,jquery,jquery-ui,datepicker,options

Yes, you are doing everything absolutely right. The $.datepicker.regional[""] returns an object which contains a list of options for the selected language ("" indicates English): You can set the default language as well as other options for all datepickers like this: $.datepicker.setDefaults($.extend({ ... }, $datepicker.regional['es'])); Or to override a selected...

How to use options in QFileDialog.getOpenFileName?

python,pyqt,pyside,options,qfiledialog

You cannot do this if you are using the static functions with a native file-dialog. The native file-dialogs do not have the same API as the Qt file-dialog, so you can only set the properties that are available via the static function arguments - which means the caption, title, working-directory,...

How to Change output text with selective options in html tag

html,select,tags,options

You will need to make use of Javascript to achieve this functionality. Working Snippet: // comments inline var salesNumbers = { // store all phone numbers in an object here 'USA': '123 123', // you can easily add/remove/modify the country/numbers here 'UK': '456 456', 'France': '789 789', 'Japan': '111 222',...

option in c++ programs

c++,cygwin,options

You can pass mode_test value as program argument: #include <cstdlib> int main(int argc, char** argv) { int mode_test = atoi(argv[1]); } Here atoi function converts c-string value into integer. Then you can use it in following way: ./a.out 1 After that you'll have 1 assigned to mode_test inside program. Here...

Selectbox options will not populate div tag in jQuery

javascript,jquery,html,select,options

You should append your selectbox like this. $("[name='eventdates']") .append($("<option></option>") .attr("value",eventdate[i].meeton) .text(eventdate[i].meeton)); ...

Correct extend user option in jQuery plugin [closed]

javascript,jquery,plugins,jquery-plugins,options

As longest options variable is defined before methods variable you can use dot notation to get options. (e.g. options.opt1).

options of the function scipy.optimize.minimize

python,optimization,options,minimize

You should probably ask this on the scipy mailing list, or even the scipy developer mailing list, but looking at the source code for the Nelder-Mead algorithm, I notice the actual check on maxiter and maxfev are in the outer while loop. The function is called several times inside that...

Scala - Map with default value None?

scala,dictionary,return-value,options

None is an instance of Option[Nothing]. But Option is covariant in its type parameter, and Nothing is a subtype of everything. This means that None is a subtype of Option[A]. Just say so: None: Option[A] But type inference can usually do it for you. If you create the function in...