w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML Categories
Calling a python function in the background
My suggestion would be to have two threads, a speaking thread and a console thread. Make a queue shared between the two and when new data needs to be spoken, shove it on the queue. The speaking thread idles it the queue is empty, if not, it pops a value and speaks.

Categories : Python

using C# background worker calling a "toaster" popup not working
You can't rely on this working since it is using a different thread. You need to dispatch the creation of the popup onto the main UI Thread Sorry misread the Question and postet Winforms solution. Updated! Use Control.Invoke public Form1() { InitializeComponent(); } private void backgroundWorker1_DoWork(object sender, DoWorkEventArgs e) { /* this.Invoke((Action)(() => { var form2 = new Form2(); form2.Show(); })); Winforms Method*/ Dispatcher.Invoke((Action)(() => { var form2 = new Form2(); form2.Show(); })); } private vo

Categories : C#

How to make calling a Method as a background process in java
Sure, just use Java Threads, and join it to get the results (or other proper sync method, depends on your requirements)

Categories : Java

calling the ibaction methode programatically is not changing the background of the button?
In your button action btn.selected=YES; in last line makes the button in selected state always also get the correct instance as btn=(UIButton *)sender;

Categories : Iphone

Calling a http Request in background failing inside dispatch serial queue
You cannot use connectionWithRequest from a background queue (without scheduling the connection in some runloop). Either use sendSynchronousRequest (which is fine to do if you're using it from a background queue like this), or schedule the connection in a run loop. If you dig through the AFNetworking code, you'll see they create a run loop on a dedicated thread, which strikes me as the most elegant solution if you really need the NSURLConnectionDataDelegate methods. You can also use the main run loop (though I'm less crazy about that solution), e.g., something like: connect = [[NSURLConnection alloc] initWithRequest:request delegate:self startImmediately:NO]; [connect scheduleInRunLoop:[NSRunLoop mainRunLoop] forMode:NSRunLoopCommonModes]; [connect start]; Also note, I'm not using co

Categories : Objective C

Wordpress: Calling featured image as background image with custom size
I don't know what your HTML is and I'm assuming you know how to run a CSS media query. I would suggest trying something like the following #featured img{ width: 80%; (or pixels if you prefer) } This will scale the image down to 80% width (and height) of any image within the featured div Please provide further code such as HTML or possibly your website. I can probably assist you a lot better.

Categories : CSS

I am calling custom category adapter.How to set background for full screen in android when using custom adapter
Actually i have extended ListActivity class and i was setting background image of adapter.I figured out the issue.I have to add following code in onCreate Method getListView().setBackgroundResource(R.drawable.back);

Categories : Android

Calling my REST API from my action method instead of calling it directly from my view
I need to know if it is possible to make this call from an action method instead of directly from my view Yep, you just need to fire up a HttpWebRequest and send it from inside your action or use WebClient if it's just a simple request.

Categories : Asp Net Mvc

Using Manufacturer's unmanaged code without calling it, but calling it your way
The PixelFormat enum is a part of the System.Drawing.Imaging namespace, so you should add this using directive at the top of your file: using System.Drawing.Imaging;

Categories : C#

Re-calling JNI_CreateJavaVM returns -1 after calling DestroyJavaVM
Last time I looked at JNI_DestroyJVM(), it said "The JDK/JRE still does not support VM unloading, however." Just don't call it, and don't re-initialize it either.

Categories : Java

Calling base constructor without directly calling
In C++11, you can use inheriting constructors: class B : public A { using A::A; B(); } This allows you to do the following: B b(42, 42); In C++03, you have to do it by hand: class B : public A { B(int i, int j) : A(i,j) {} B(); }

Categories : C++

No EndPoint configured for CLI C++ calling C# dll calling WCF Web Service
The service reference configuration needs to be copied to the configuration file of the executable. An application config file for another assembly cannot be (easily) loaded into an executing assembly.

Categories : C#

Benefits of calling hasOwnProperty as a direct static reference with the call method, as opposed to calling it as an object instance method
Because you can make an object that looks like this: var obj = { hasOwnProperty: function () { throw new Error("you are ugly"); } }; ie. you can accidentally, or intentionally redefine the function. Source on MDN: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/hasOwnProperty#hasOwnProperty_as_a_property

Categories : Javascript

Background process in android is killed after a phone call or after long time in the background
You can't... this is how the Android OS works. It can kill background processes at any time when memory is low. See Processes and Threads and Activities for more info.

Categories : Android

how can i play an audio file in background using "App registers for location updates" background mode
Have you explicitly set the Audio Session category? The Audio Session Programming Guide has a useful section "Choosing the Best Category" which describes the different options: Audio Session Programming Guide I'm not in front of a Mac right now, so I can't test this. But I suspect adding the following to your viewDidLoad method might help you out when you multitask away from your app. NSError *sessionError = nil; [[AVAudioSession sharedInstance] setCategory:AVAudioSessionCategoryPlayback error:&sessionError];

Categories : IOS

How to make AVAudioPlayer stop playing background music after 30 minutes even when in background?
You could take a look at these: http://developer.apple.com/library/ios/DOCUMENTATION/iPhone/Conceptual/iPhoneOSProgrammingGuide/ManagingYourApplicationsFlow/ManagingYourApplicationsFlow.html#//apple_ref/doc/uid/TP40007072-CH4-SW3 How to run the timer in background of the application?

Categories : Iphone

Can we Relaunch the application in the background on location change? after force quit it from background
Right now your app's location behavior relies on your viewController being available. You've combined the "V" and "C" part of MVC. I would consider pulling the CLLocationManager out of your view controller and setting it as a property on your AppDelegate. That way you don't have to instantiate a view controller to react to location changes, and it establishes a pattern to access location elsewhere in your app. Configure your locationMananger first, then pass it into your viewController.

Categories : Iphone

How to rotate programmatically the background image of a div that uses background-size:cover with Jquery?
Remove "cover" from this line of code: $('.fondo_intro').css({'background':'url("'+cargar_fondos[fondo_num++ %cargar_fondos.length].src+'") no-repeat 50% 100% cover'},'slow');

Categories : Jquery

Body background is having image 1374x1074 but on zooming --, white background is coming
These days, I would just add background-size to the CSS, as that's pretty well supported now: body { background: url("images/background.png") no-repeat scroll 0 0 #FFF; background-color: #E6E6E6; background-size: cover; }

Categories : HTML

Size of the background image not updating on background-attachment: fixed elements
If you are interested in the javascript version, you can try: $(document).ready(function(){ $('#smaller').click(function(){ var oldHeight = $('.fixed').height(); $('.fixed, .notfixed').css('height', oldHeight/1.25 +'px'); $('.fixed').css("background-size", "auto " + $('.fixed').height() + "px") }); }); When you click it resizes the background. Maybe you will need to add about 10px more to the height to perfectly match the box.

Categories : HTML

background-attachment:fixed and background-size: cover makes images dissapear in Chrome
This is your current code in the jsfiddle: HTML: <section class="main_section" id="sec1" data-stellar-background-ratio="0.2"> <article class="section_details"> <h1>Start</h1> </article> </section> <section class="main_section" id="sec2" data-stellar-background-ratio="0.2"> <article class="section_details"> <h1>Überschrift</h1> <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec ut ante eu massa consectetur consequat. Nullam interdum justo vitae mi tristique interdum. Mauris arcu metus, gravida sed malesuada in, euismod in libero. Nulla euismod ultrices pulvinar. In at gravida nulla. Suspendisse at neque ut neque convallis hendrerit. Maecenas mollis

Categories : Google Chrome

Centre link with background, without making background take up full width?
Give the parent div text-align:center and the green button - display:inline-block UPDATED FIDDLE

Categories : HTML

W3 Validation error - table background image - says no attribute for background
The background attribute (for the table element) was an unofficial extension to HTML that never made it into the specification. Use the CSS background-image property instead.

Categories : HTML

Positioning content relative to background with background-position:cover
body { background: #EEE url('../img/test.png') no-repeat center center fixed; -webkit-background-size: cover; -moz-background-size: cover; -o-background-size: cover; background-size: cover; } Referece : http://css-tricks.com/perfect-full-page-background-image/ Demo : http://css-tricks.com/examples/FullPageBackgroundImage/progressive.php

Categories : HTML

Difference between rgba background and gif pixel repeated background
This is due to the resize algorithm being used, you need to change it in order to get rid of the outline. You can use the following CSS: #null img { image-rendering: optimize-contrast; image-rendering: -webkit-optimize-contrast; } More information can be found in this article: http://www.danolsavsky.com/article-images-interpolation-browser-rendering-and-css-resizing.html

Categories : Google Chrome

If Background Worker is a background thread how come I can executed this code?
The Form1_Load method is not the "main procedure", so the message box that you're displaying at the end of it is actually a lie. That's just an event handler method for the Form.Load event, raised when your form is being displayed for the first time. The "main procedure" is named Main and is defined in a separate file (actually, in VB.NET, it's automatically generated by the compiler and not even visible to you by default). You can find more information on the Main method in Microsoft's VB Programming Guide. The Main method is still running as long as your program is still running. After the Form1_Load event handler method finishes, Form1 is still on the screen, so clearly your program hasn't closed yet. And since your program's main thread is still running, the BackgroundWorker object's

Categories : Vb.Net

Overlay a background-image with an rgba background-color
Yes, there is a way to do this. You could use a pseudo-element after to position a block on top of your background image. Something like this: http://jsfiddle.net/Pevara/N2U6B/ The css for the :after looks like this: #the-div:hover:after { content: ' '; position: absolute; left: 0; right: 0; top: 0; bottom: 0; background-color: rgba(0,0,0,.5); } edit: When you want to apply this to a non-empty element, and just get the overlay on the background, you can do so by applying a positive z-index to the element, and a negative one to the :after. Something like this: #the-div { ... z-index: 1; } #the-div:hover:after { ... z-index: -1; } And the updated fiddle: http://jsfiddle.net/N2U6B/255/

Categories : CSS

Alternative for Background Transfer Service to run uploads in background
Once you exit your app, you are pretty much shut down. You can masquerade as a location tracking background agent to remain in the background when you get deactivated, though you'll suck battery and I believe there can only be one of these active at a time. Generally, highly not recommended (and you'll probably fail certification). A better way to do this if BTS is not to your liking is to use a ResourceIntensiveTask. This will only be triggered when the user is plugged in and has WiFi but will allow you to run whatever you want for as long as the conditions are met (for example, at night) which should be plenty of time to upload a 3-4 MB file.

Categories : Windows Phone 8

Cover background-image with transparent background-color
check this fiddle, i hope it helps. i added a div inside your body <div class = "overlay"> <div id = "name"> .... </div> <div> and set it's background color to background: rgba(0,0,255,0.5); where the last number is the opacity of the color new css .overlay{ background: rgba(0,0,255,0.5); margin: 0px; width: 100%; height: 100%; } you should remove the margins from the div.overlay and it will work I also updated the link P.S. you shouldn't set properties such as width and height and display to a div as it will affect all divs on the page and use classes instead of tag names to set those properties

Categories : HTML

Background image showing through picture with transparent background
Diagnosis: From what I understand based on your CSS, the opacity on #background-image is affecting the opacity of #logo. Solution 1: If it's possible, instead of a photo, consider using a background color for parent element with background-color: rgba(x,y,z,a) where the number a is responsible for opacity. Solution 2: If you want to use two images on top eachother with only parent element having an opacity, position absolute will help you to display them in seperate divs without any opacity problem.

Categories : CSS

Scroll background until the entire background image has been shown
you need to use an extra fixed layer with the bottom of the picture setted to transparent, and then listen to the scroll event to detect when you reach the bottom of the original background, set the fixed layer visible and voila, you have it! If you need help in any of these, please provide a snippet of your code so I can implement in it for you.

Categories : HTML

Dialogbox background not showing image in whole background in android
Add this to your res/values/styles.xml <style name="Theme.Custom" parent="android:Theme" > <item name="android:backgroundDimEnabled">false</item> <item name="android:windowIsTranslucent">true</item> <item name="android:windowBackground">@android:color/transparent</item> <item name="android:windowFrame">@null</item> <item name="android:windowNoTitle">true</item> <item name="android:windowIsFloating">true</item> <item name="android:windowContentOverlay">@null</item> <item name="android:windowAnimationStyle">@android:style/Animation.Dialog</item> <item name="android:windowSoftInputMode">stateUnspecified|adju

Categories : Android

How to include the background-cover value in the shorthand background property?
According to the W3 and MDN, there needs to be a slash separating the backgound-size from the background-position: W3C example: p { background: url("chess.png") 40% / 10em gray round fixed border-box; } MDN: This property must be specified after background-position, separated with the '/' character. Opera also has some information on the background shorthand: http://dev.opera.com/static/dstorey/backgrounds/background-shorthand.html

Categories : CSS

Go basics: What is the diference between calling a method on struct and calling it on a pointer to that struct?
The first version is the equivalent of var v1 Vertex v1.X = 3 v1.y = 4 fmt.Println((&v1).Abs) The second version is the equivalent of var v2 *Vertex v2 = new(Vertex) v2.X = 3 v2.y = 4 fmt.Println(v2.Abs) So the only substantial difference is that v1 is a value and v2 is a pointer to a value of type Vertex.

Categories : Go

Difference between calling a private method of class with calling as 'this.methodName' or only with 'methodName'
It is a particular coding style. In this particular case this is redundant as it is implied . I use it as I find it to improve readability. generally you would use this to resolve the ambiguity caused by an instance variable and local variable with same name, where the local variable shadows the instance variable : public class C1{ private int x ; private void M1(int x){ this.x = x; } }

Categories : Java

How to get dimensions for a background image when background-size is set to contain?
Try like var wdth = $('.logo-container img').width(); var hght = $('.logo-container img').height(); Or you can get the div height and width also like var wdth = $('.logo-container').width(); Because the image is the background image of that div.

Categories : Jquery

CSS background-position and background-repeat within a CSS sprite
If you use sprites, you need a fixed size. You can't crop a background. You can, however, use background-size: cover to stretch it across the width and keep it in proportions. But that wouldn't help you if your background size is small, because stretching up will lose its quality. If your sprite is large, this might be a decent solution, but you'll need to experiment to see how your specific sprite size works with it.

Categories : HTML

Background image with a background color on hover
swap margin with padding and reposition the background image #navi .logo a { float: left; padding: 2px 10px; width: 36px; height: 26px; background: url(/imgs/navi/caul_white_nav.png) no-repeat; text-indent: -9999px; background-position: 50% } edit: just make sure to have the same background positioning on :hover as well

Categories : HTML

jquery background positioning of background sprite
I believe the correct syntax in jQuery is: $("#a").css("backgroundPosition", "0px -444px"); backgroundPosition instead of background-position

Categories : Jquery

background-image not displayed if used also background-color
Try This code... element{ background-image:url(background.png.png); background-repeat:no-repeat; background-color:#242424; background-position: top center; } Use background-color property after background-image

Categories : CSS



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