w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Body background image not respecting size of body
if it is a background image, it will respect the size of the div. Make sure it isn't being repeated background-repeat:no-repeat; . I'm still not sure what you are asking unless you want the background image to fit inside the smaller box in the middle of the page. Is that what you are trying to do?

Categories : CSS

body selector doesn't work on firefox
You should use var div = $(window); You can $(window).scrollTop(); because the scrollbar on a page is a part of the window, not the body, or the HTML. However, if an element has an overflow, than it is a part of an HTML element. This gets taken differently in different browsers. However, if you are scrolling the document window, you can use $(window).scrollTop(); that is crossbrowser compatible.

Categories : Jquery

Linux/Unix - Setting default file/folder permissions using ACL, executable permission not setting?
It's not setting the execute bit because files are only created with execute permission if the application explicitly requests it. Since it makes no sense to make an .html file executable, whatever program created it did not request execute permission to be added, so it has no execute permission. Consequently, execute permission from the default ACL effectively only applies to directories, not to files. As for why the default group is not set to ftp, this is more subtle. The default ACL is just that -- an ACL. It's not a default group ownership. As such it shows up not in ls but in getfacl: # mkdir public # setfacl -R -m u::rwx,g:ftp:rwx,d:g:ftp:rwx,o::rx public/ # getfacl public # file: public # owner: root # group: root user::rwx group::r-x group:ftp:rwx mask::rwx other::r-x defa

Categories : Linux

By default which selector is set to Checkbox
Following is default selector for Checkbox <?xml version="1.0" encoding="utf-8"?> <!-- Copyright (C) 2008 The Android Open Source Project Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --> <selector xmlns:android="http://schemas.android.com/apk/res/android"&g

Categories : Android

dynamically setting variables in html5 body?
You will have to use JavaScript to "print" the contents of a variable, to the HTML-source. Here's an example: <div id="test"></div> document.getElementById('test').innerHTML = 'This goes into the element!'; But since you're using jQuery, you could do this as well: $('#test').text('This goes into the element!');

Categories : Javascript

R: disjoint complex number when setting function body
Why not: funCplx <- function () {} formals(funCplx) <- alist() body( funCplx) <- as.call(c(as.name("{"), eval(parse(text = "2+3i"))) ) funCplx funCplx() Returns: funCplx #----console displays--- function () { 2+3i } With the added request to include extra arguments in what appears when the function is print-ed, you could make it look more "finished" by assigning the fixed value to a name and then using that name in the expression: funCplx <- function () {} formals(funCplx) <- alist(t=) environment(funCplx) <- new.env() environment(funCplx)$cplx <- (2+3i) body(funCplx) <- quote(t*cplx) funCplx # function (t) # t * cplx funCplx(3) # [1] 6+9i And testing to see if the earlier flimsy construction error was fixed: > cplx=42 > funCplx(7) [1] 14+21i

Categories : R

Storing and Retrieving Image Path From android application folder On Pre Created SQLite Database & Setting the image to Image View
I would only save the image name in the db and then get the resource identifier with context.getResources().getIdentifier(). Check out this similar question.

Categories : Android

wcf all message body in .svclog file always be "... stream ..." , how to show the real content through configuration?
Yes, WCF tracing does not log entire messages by default (only soap header) There are many options to configure WCF tracing. logEntireMessage : specifies whether the entire message (message header and body) is logged. The default value is false, meaning that only the header is logged. maxMessagesToLog : specifies the maximum number of messages to log. When the quota is reached, a trace is emitted and no additional message is logged. The default value is 10000. maxSizeOfMessageToLog : specifies the maximum size of messages to log in bytes. Messages that exceed the size limit are not logged. The default value for service level and transport level messages is 256K, while the default value for malformed messages is 4K. A very basic configuration is <system.diagnostics> <so

Categories : Wcf

Javascript image selector: prevent selecting same image again and again
I guess the indicator whether an image is selected is whether it has $("#check"). If that is the case, In your code, I don't see where you deselect an image (remove the $("#check")). It always adds more and more. Update your code like this (remember to assign a class check to your #check as we will use this class to look for the clones) function checked(id) { $('#'+id).css("opacity","0.3"); if ($('#'+id).find(".check").length == 0){ $("#check").clone().appendTo('#'+id); $("#check").css('display','block'); $("#check").css('margin','-125px 0 0 75px'); } else { $('#'+id).find(".check").remove(); } $('#'+id).css('margin','0 0 0 -1px'); } When you click, it will switch back and forth between selected and unselected states

Categories : Javascript

Android Overlay Image On Top Of Background Image Using XML Selector
// xml <ImageView android:id="@+id/img" android:layout_width="60dp" android:layout_height="60dp" android:layout_gravity="center" android:adjustViewBounds="true" android:background="@drawable/ijoomer_btn_hover" android:padding="5dp" android:scaleType="fitXY" /> // Activity @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView("xml"); img = (ImageView) findViewById(R.id.img); img.setImageDrawable(null); } img.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { if(img.getDrawable()!=null){ img.setImageDrawable(null); }else{ img.setImageDrawable(getResources().ge

Categories : Android

jQuery Selector for all items in body excluding items in specific parent
I'm not sure why you'd want to do this, but the following would work (though I imagine it doesn't perform very well as it's filtering everything in the body): var items = $('body').find('*').filter(function() { return !$(this).is('.tooltip') && !$(this).closest('.tooltip').length; }).get(); This will exclude all elements which have the class .tooltip, and all elements which have an ancestor with the class .tooltip, so you'd end up with the following: h1, div.container, h2, p

Categories : Jquery

Neo4j/Cypher: Setting a map and property yields "expected valid query body"
A slight modification of your statement using 2 SET clauses works: MATCH n:User WHERE n.email = "test" SET n = {data} SET n.created = timestamp() RETURN n

Categories : Neo4j

Browser scroll-bars shows up when setting body and html tags height to 100%
Just add this CSS rule: h1 { margin: 0; } Check this DEMO The problems occured because the UA stylesheet add a margin to some elements (like the h1 element) by default.

Categories : HTML

Default x-www-form-urlencoded content type for http request body in web services
As per the HTTP spec, you can send any content type you like in an HTTP response as long as you provide the appropriate Content-type header. The main benefit of JSON and XML over a plain query string is that they support hierarchies and complex data structures, e.g.: {"cars":[{"manufacturer":"Ford"}, {"manufacturer":"GM"}]} or <cars> <car> <manufacturer>Ford</manufacturer> </car> <car> <manufacturer>GM</manufacturer> </car> </cars> These kinds of structures are usually very useful for webservices, and can't really be achieved with a plain query string.

Categories : Xml

php image uplaod show default image when image has not been uploaded
you could use file_exists(), like if( !empty($row['article_image']) AND file_exists(YOUR_PATH . $row['article_image']) ) { //show your image from db } else { //show your default image }

Categories : PHP

Setting a default string value
you mean something like: if ($caption.length > 0) { $title = $caption[0].innerHTML; } change to $title = ($caption.length) ? $caption[0].innerHTML : "There is no caption data";

Categories : Javascript

MVC DropDownList setting default value
Use the Selected property of SelectListItem to determine which should be selected by default: ViewData["dropDown_Color"] = correspondingDropDownValue.Select(j => new SelectListItem { Text = j.ListOfValue, Value = j.ListOfValue, Selected = j.ListOfValue == j.userColor.default }).ToList(); Not being able to see your schema, I'm guessing where userColor.default is, but you can update the logic as necessary.

Categories : Asp Net Mvc

Javascript - Issues with setting background image for the newly uploaded image
It's because your image is currently empty. It has no src attribute to display an image with. Therefore it doesn't show up. You have two options. Add a src to a valid image file on your web server, or set a height and width for the img. Example

Categories : Javascript

Setting the default value to a select list
I think you'd have to do this: public static readonly List<string> LIST_ITEM_STATE = new List<string> { string.Empty, "Brand new", "Never used", "Slightly used", "Used", "Heavily used", "Damaged", "Ruined", "Run for your life" }; And set the selected value in the SelectList: mItemStateList = new SelectList(ValueDomain.LIST_ITEM_STATE, "Brand new"); Or make sure the value of the the property is set to the initial value you want: _item.mItemState = "Brand new";

Categories : C#

Setting DEFAULT value in Access 2007 mdb
Maybe try with space ALTER TABLE parameter ALTER COLUMN lool1 SET DEFAULT ' ' ALTER TABLE parameter ALTER COLUMN lool1 SET DEFAULT NULL but if you want to null value you don't really need default clause ALTER TABLE parameter ALTER COLUMN lool1 NULL

Categories : Dotnet

setting a default command for bash
My bash (Fedora) has the following $ type command_not_found_handle command_not_found_handle is a function command_not_found_handle () { runcnf=1; retval=127; [ ! -S /var/run/dbus/system_bus_socket ] && runcnf=0; [ ! -x /usr/libexec/packagekitd ] && runcnf=0; if [ $runcnf -eq 1 ]; then /usr/libexec/pk-command-not-found $@; retval=$?; else echo "bash: $1: command not found"; fi; return $retval } You can start from here and add it to your .bashrc file. Change the else branch.

Categories : Linux

Setting default scroll point on
Assuming your content is like this : <div class="scroller"> <div id="1"> ... lots of content here ... </div> <div id="2"> ... lots of content here ... </div> </div> Use this to scroll to <div id="2"> : $("div.scroller").scrollTop($("#2").offset().top); Take a look an example here : Fiddle Demo.

Categories : CSS

Image overflow by body
CSS: body{ background-image: url('http://oboshto.ru/upme/shits/left%20%281%29.png'); background-position: top left; background-repeat: no-repeat; } HTML: <div id="wrapper"> SOME CONTENT <div id="cut"> < - -CUT CUT CUT </div> </div> JsFiddle: http://jsfiddle.net/AKsaS/3/ You could also place a position: relative on #wrapper, which would cut it off to the wrapper as well. JsFiddle for that: http://jsfiddle.net/AKsaS/4/

Categories : CSS

Setting values to EMPTY but not NULL by default in C#
You need to initialize your objects public personalinfo info = new personalinfo(); public addressinfo currentaddr = new addressinfo(); public telephone currenttel = new telephone();

Categories : C#

Setting Default selection on selectOneMenu via Bean
Instead of setting the staff member by searchFilter.setStaff(user.getSTaff()); I had to search through the list. long id = user.getStaff().getId(); for( Staff staff : staffList ) { if( staff.getId() == id ) { searchFilter.setStaff( staff ); break; } }

Categories : JSF

Setting a variable to a certain value or default to all values in a column
CREATE PROCEDURE dbo.Pro1 -- use schema prefix when creating objects! @a NVARCHAR(32) = NULL -- 32 should match data type of Parameter2 column AS BEGIN -- wrap your body and indent for readability SET NOCOUNT ON; -- should always turn off DONE_IN_PROC messages SELECT columns -- please name your columns instead of SELECT * FROM dbo.table1 -- use schema prefix when referencing objects WHERE (Parameter2 = @a OR @a IS NULL); -- semi-colons please! END GO In some cases you may find that if you have a lot of these optional parameters, SQL Server will compile a plan for one set of parameters and that plan will not be very beneficial for different parameters. So you may want something like this: CREATE PROCEDURE dbo.Pro1 @a NVARCHAR(32) = NULL AS BEGIN SET NOCOUNT ON; DECL

Categories : Sql Server

Setting Tkinter default widgets kwargs
There's nothing built-in to do this for you, but it takes just a few lines of code to implement. You can change any attribute at runtime with the config (or configure) method, so, for example, you can do something like this: def resetUI(self, bg=None, fg=None): for button in list_of_buttons: button.config(background=bg, foreground=fg)

Categories : Python

setting the default values if there are null in table
You use default defaultvalue on each column when creating the table. See here : http://www.techrepublic.com/article/oracle-tip-how-to-use-default-values-with-database-columns/ It would look like this: CREATE TABLE fdg_user ( id NUMBER(32,0) NOT NULL, updateddate TIMESTAMP(6) DEFAULT TO_TIMESTAMP('05.03.13 05:29:34','dd.mm.yy hh24:mi:ss') NULL , name VARCHAR2(30) DEFAULT 'bbb' NOT NULL ) see sqlfiddle.

Categories : SQL

Setting default for empty cell using jqxDropDownList
In case anybody stumbles over this the answer was given on the jqxgrid format here: http://www.jqwidgets.com/community/topic/drop-down-list-default-values/

Categories : Misc

Setting a default popup from the URL in a modestmaps/mapbox wax map
You can do something like this $(document.elementFromPoint(x, y)).click(); https://developer.mozilla.org/En/DOM:document.elementFromPoint

Categories : Javascript

Cannot change input value while setting default value in jquery
Use on("input", function () { ... }), instead: $('.input1').on('input', function(){ $('.input2').val($(this).val()); }); JSFIDDLE Also, see this thread about the difference between input and change.

Categories : Jquery

Setting default value on a datbound checkbox list in ASP
//Check particular checkbox foreach (ListItem item in CheckBoxList1.Items) { if (item.Text.Trim() == "C#")//text or value (item.Value.Trim()) { item.Selected = true; } } //check all checkbox foreach (ListItem li in CheckBoxList1.Items) { li.Selected = true; } //uncheck protected void Button1_Click(object sender, EventArgs e) { foreach(ListItem li in CheckBoxList1.Items) { li.Selected = false; } } Using jQuery clear all the inputs of form <script type="text/javascript"> $("#Button1").click(function() { $('#form1').find(':input').each(function() { switch (this.type) { case 'password': case 'select-multiple': case 'select-one':

Categories : Asp Net

Setting default value in select drop-down using Angularjs
When you use ng-options to populate a select list, it uses the entire object as the selected value, not just the single value you see in the select list. So in your case, you'd need to set $scope.object.setDefault = { id:600, name:"def" }; or $scope.object.setDefault = $scope.selectItems[1]; I also recommend just outputting the value of $scope.object.setDefault in your template to see what I'm talking about getting selected. <pre>{{object.setDefault}}</pre>

Categories : Angularjs

kendo multiselect setting default values
(Answered by the OP in a question edit. Converted to a community wiki answer. See Question with no answers, but issue solved in the comments ) The OP wrote: I solved problem by using "value()" function. $.get('Home/GetAppsJson/', function (data) { var values = new Array(); if (data[0] != null) { for (var i = 0; i < data.length; i++) { if (data[i] == null) break; values[i]=data[i]; } } var multiselect = $('#applications').data("kendoMultiSelect"); multiselect.value(values); });

Categories : Kendo Ui

Spring: Injecting Properties using @Value and setting a default
Before all: defaultDbProps location is the same of dbProps one. You are accessing properties value in the wrong way (with spEL); use ${} tag in this manner @Value('${my.property}'), but to have ${} available you need a PropertyPlaceholderConfigurer: <bean id="placeholderConfig" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"> <property name="propertiesArray"> <list> <ref bean="defaultDbProps"/> <ref bean="dbProps"/> </list> </property> </bean> with this bean defaultDbProps are loaded first, then dbProps overrides properties with the same name

Categories : Spring

Setting default for undefined hash values
Both methods are using foreach, for my $key (keys %hash) { $hash{$key} //= 0; } $_ //= 0 for values %hash; //= operator test if variable is undefined and assign new value when it is.

Categories : Perl

Setting the default value to the current user in Oracle
You need to use USER not CURRENT_USER: CREATE TABLE tracking ( pk NUMBER(19,0) PRIMARY KEY, description VARCHAR2(50), created_by VARCHAR2(128) DEFAULT USER ); SQL Fiddle The maximum length of a user is 30, so you could reduce this and I would increase the size of your DESCRIPTION column unless you're very sure that everything will come in at less than 51 characters.

Categories : SQL

Setting Ember.Select Default Selected Value
The selectionBinding is the right parameter to set on a Ember.Select but it should be an item contained in the array you pass to its contentBinding, so doing it like the following should work. Define a property on your App.OptionController to hold the selected item: App.OptionController = Em.Controller.extend({ selectedOption: Ember.computed.alias('content.firstObject'), init: function() { this._super(); this.set('model', this.get('store').find('option')) } }); And set this property as your selectionBinding: {{view Em.Select prompt="test" contentBinding="controllers.option.content" optionLabelPath="content.name" optionValuePath="content.id" selectionBinding="controllers.option.selectedOption" }} Working demo. Hope it helps.

Categories : Javascript

adding app setting in android default settings
This is not the way to do it on Android. To be honest I can't see why you would want this as the preferences for the application only need to available when the application is running. Changing the system preferences would require you to rebuild the ROM from source and I don't think you want your users to have to run a custom ROM just to use your app.

Categories : Android

setting default time zone is not successfull
Use NSCalendar, and the setTimeZone method. NSDate *newDate; NSDateComponents *dateComponents = [[NSCalendar currentCalendar] components:~ NSTimeZoneCalendarUnit fromDate:[NSDate date]]; newDate = [[NSCalendar currentCalendar] dateFromComponents:dateComponents]; NSLog(@"newDate: %@", newDate); NSLog(@"newDate: %.0f", [newDate timeIntervalSinceReferenceDate]); newDate: 2011-09-09 15:02:09 +0000 newDate: 337273330 [dateComponents setTimeZone:[NSTimeZone timeZoneWithName:@"Australia/Sydney"]]; newDate = [[NSCalendar currentCalendar] dateFromComponents:dateComponents]; NSLog(@"newDate: %@", newDate); NSLog(@"newDate: %.0f", [newDate timeIntervalSinceReferenceDate]); newDate: 2011-09-09 00:52:03 +0000 newTimeInterval: 337222930 [dateComponents setTimeZo

Categories : IOS

© Copyright 2017 w3hello.com Publishing Limited. All rights reserved.