w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Converting byte array of 16 grey degrees into 256-grey-degree format
You could transform the nibbles into bytes and then use the transformed data, like so: public byte[] NibblesToBytes(byte[] data) { byte[] result = new byte[data.Length*2]; int i = 0; foreach (var bits in data) { // You may need to reverse these two lines, depending on data format: result[i++] = (byte)((bits & 0x0F) << 4); result[i++] = (byte)(bits & 0xF0); } return result; } Those bytes will be greyscale values. To convert each value to an RGB value, you would need to set each of the R, G and B values to the greyscale value (I expect that you already know that, but I mention it just in case). But you will need to do more than just this. You will need header information and so on. These threads might help with that: Creat

Categories : C#

Why my cv::Mat become grey color?
The problem happens because of NULL passed as 3rd parameter. It should be CV_8UC4 for 4-channel image: cv::Mat my_mat = cv::Mat(videoRect.size.height, videoRect.size.width, CV_8UC4, baseaddress);

Categories : IOS

VBA Grey Checkboxes
A slight hack - but the following does work. I created a simple userform with two controls - a regular checkbox (CheckBox1), and a button I called "DisableButton" with the following code: Private Sub DisableButton_Click() CheckBox1.Enabled = Not (CheckBox1.Enabled) If CheckBox1.Enabled Then CheckBox1.ForeColor = RGB(0, 0, 0) Else CheckBox1.ForeColor = RGB(128, 128, 128) End If End Sub When I clicked the button, the checkbox was grayed out and unavailable. Clicking it again "brought it back to life". I think this is the effect you were looking for. If it's not - that's what comments are for. Here is what it looks like:

Categories : Excel

Grey out a div using a checkbx
I combined your two functions into one and gave your checkbox a higher z-index than your overlay so that it remains clickable. function dim(cb) { document.getElementById("darkLayer").style.display = (cb.checked) ? '' : 'none'; } jsFiddle example CSS #checkbox { position:relative; z-index:21; } HTML <div id="wrap" style="width:500px">     <div id="content">         <p>This box will be disabled! <a href="#">Link</a></p>     </div>     <div id="darkLayer" class="darkClass" style="display:none"></div>     <div id="checkbox">         <form>             <input type="checkbox" id="myCheckBox" onchange="dim(this)" />         </form>     </div> </div>

Categories : Javascript

UIAlertView grey out button
I hear of lots of people subclassing UIAlertView, but then I read this comment on Apple's UIAlertView Class Reference page: Subclassing Notes The UIAlertView class is intended to be used as-is and does not support subclassing. The view hierarchy for this class is private and must not be modified. i.e. people should not be attempting to modify the elements or behavior of UIAlertView. It's likely that behavior can change in later versions of iOS (e.g. iOS 8 or iOS 7.1 or whatever), breaking their various modifications to UIAlertView. Anyways, to answer your question: why not try creating your own UIView that you can add as UIAlertView-like subview on top of any of your views? That way, you'd have easy control over both the buttons and their behavior.

Categories : IOS

Grey screen in Netbeans
JFrame or any of its super classes do not implement the paintComponent method so is never invoked. Check this yourself by adding the @Override annotation. Move this method to a new class that extends JComponent and invoke super.paintComponent(g) as the first statement. Don't call repaint from within paintComponent, this create an infinite loop and degrades performance. Swing Timers were designed to interact more easily with swing components. Use these over than raw Threads for periodic updates. Aside: JFrame is not focusable by default so KeyEvents which require focus will not be triggered without making the window focusable. Use Key Bindings instead.

Categories : Java

jQuery every other background grey
You have an extra ; in the color #ccc; which is not valid. If you change it to #ccc it will work as shown in the demo. $(function() { $(".cartCheckout:even").css("background", "#ccc"); }); See fiddle demo

Categories : Jquery

How to grey out item in a Checked List Box
You have to create your own CheckedListBox like this: public class CustomCheckedList : CheckedListBox { public CustomCheckedList() { DisabledIndices = new List<int>(); DoubleBuffered = true; } public List<int> DisabledIndices { get; set; } protected override void OnDrawItem(DrawItemEventArgs e) { base.OnDrawItem(e); Size checkSize = CheckBoxRenderer.GetGlyphSize(e.Graphics, System.Windows.Forms.VisualStyles.CheckBoxState.MixedNormal); int d = (e.Bounds.Height - checkSize.Height) / 2; if(DisabledIndices.Contains(e.Index)) CheckBoxRenderer.DrawCheckBox(e.Graphics, new Point(d,e.Bounds.Top + d), GetItemChecked(e.Index) ? System.Windows.Forms.VisualStyles.CheckBoxState.CheckedDisabled :

Categories : C#

Street View panorama is grey?
Best guess: I ran into a similar issue with streetview when I tried toggling between standard map view and street view. I did 2 things to fix the issue: 1. When I switched to street view, I re-ran setPosition on streetview. So I ran: g_map.getStreetView().setPosition(g_position); I used to cache the streetview object g_streetView = g_map.getStreetView(); g_streetView.setPosition(place); I stopped doing that, and now I always call the long version g_map.getStreetView().setPosition(place); Hope this helps!

Categories : Javascript

OpenCV Grey Box - Not Loading Image?
I beleve that you run your program from IDE, and not set working directory to your .exe file location. Try to run exe not from the IDE (make sure image in exe location), or use full path to file.

Categories : C++

Twitter Bootstrap Carousel Grey Bars
You can do it with CSS .carousel-control.left, .carousel-control.right { background-image: none } jsFiddle How to do it yourself: Go to a site that has the bootstrap carousel. I went to the documentation page In Chrome (or whatever browser you like) use Inspect Element to see a list of all the matched CSS rules. Something is giving it that styling, and it's going to have to live here. Find one that looks like the culrprit and uncheck the box to see if removing that style makes a difference Note: You shouldn't change bootstrap.css, but you can override it by placing your changed css later. If it doesn't work, try !important Best of luck!

Categories : Javascript

Wordpress revolution slider grey box errors
You initialize the slider with the following code: jQuery('#slider').s3Slider({ timeOut: 3000 }); But there is no element with the id of "slider" found in your markup. This most likely is causing your first error. The second error is because $.browser was removed in jQuery 1.9, and the site is running 1.9.1. Code below from custom.js line 16. if (!jQuery.browser.opera) {

Categories : Wordpress

Remove grey border around tab button (using FragmentTabHost)
got the work around myself and it worked as required. Thanks. just used below code : mTabHost.addTab(mTabHost.newTabSpec(HOMETAB_TAG).setIndicator(""), HomeContainerFragment.class, null); mTabHost.addTab(mTabHost.newTabSpec(QRTAB_TAG).setIndicator(""), QrContainerFragment.class, null); mTabHost.addTab(mTabHost.newTabSpec(AROUNDTAB_TAG).setIndicator(""), AroundContainerFragment.class, null); mTabHost.addTab(mTabHost.newTabSpec(SHARETAB_TAG).setIndicator(""), ShareContainerFragment.class, null); mTabHost.addTab(mTabHost.newTabSpec(MORETAB_TAG).setIndicator(""), MoreContainerFragment.class, null); mTabHost.getTabWidget().getChildAt(0).setBackgroundResource(R.drawable.home_selector); mTabHost.getTabWidget().getChildAt(1).setBackgroundResource(R.drawable.qr_select

Categories : Android

Why is the dynamically generated ListView text grey?
I commented out some parts of your code, that seemed a bit unnecessary. I am not sure about the code related to the Comment class though. In this context at least it seemed redundant. previousCommentsList = (ListView) findViewById(R.id.previous_comments_list); commentsArrayList = new ArrayList<String>(); for (Comment comment : DrawView.comments) { commentsArrayList.add(comment.text); } ArrayAdapter<String> adapter = new ArrayAdapter<String>(this, android.R.layout.simple_list_item_1, commentsArrayList); previousCommentsList.setAdapter(adapter); saveCommentButton = (Button) findViewById(R.id.save_comment_button); saveCommentButton.setOnClickListener(new OnClickListener() { @Override public void onClick(View view) { EditText commentEditText

Categories : Android

Google Map View only shows grey tiles
I can see a bunch of stuff mising (like api key on manifest) Check http://www.vogella.com/articles/AndroidGoogleMaps/article.html. It may help. Imo this one is better http://www.youtube.com/watch?v=awX5T-EwLPc

Categories : Android

Google maps shows grey tiles only not map
Use below Permissions: <uses-permission android:name="android.permission.INTERNET"/ <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/> <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/> check your api key is right or not.

Categories : Android

Videojs seeing grey boxes in android mobile
The icons in the latest version of VideoJS are now contained within an icon font, which is loaded in using an @font-face rule - this used to be an image sprite. The reason the font isn't loading is all to do with the syntax they [VideoJS] are using: @font-face{ font-family: 'VideoJS'; src: url('font/vjs.eot'); src: url('font/vjs.eot?#iefix') format('embedded-opentype'), url('font/vjs.woff') format('woff'), url('font/vjs.ttf') format('truetype'); font-weight: normal; font-style: normal; } Change the above in your videoJS css to: @font-face{ font-family: 'VideoJS'; src: url('font/vjs.eot?#iefix') format('embedded-opentype'), url('font/vjs.woff') format('woff'), url('font/vjs.ttf') format('truetype'); font-weight: normal; font-style: normal; } This different s

Categories : HTML

OSMDroid map not showing- small grey tiles only
what version of osmdroid? what is your target api? If you're using API 23 and up as the target, you have explicitly ask for permission from the user for internet access and file system storage. The latest osmdroid sample app has an example of what's needed. The android docs have a good example too.

Categories : Android

Java JApplet just displays grey on webpage
As shown in stacktrace it looks like your applet does not have permision for something that it wants to do. Remove following line from your code at line 51: setStub(null);

Categories : Java

grey line on top of my visual studio website
(This is based on Blender's answer, I will delete this if Blender will post his answer) In order to be formal and to have an answer to this question, as what Blender suggested change margin: 20px auto 0px auto; to margin: 0px auto 0px auto; This solved the issue according to the one who asked the question.

Categories : CSS

OpenCV 2.4.3 displays video as grey window
Solved the problem by copying opencv_ffmpeg243.dll to the directory where the executable was running and it worked. My desktop running Win7 has no issues running the same exec without the dll in the directory.

Categories : Opencv

how to get rid of grey background when using limits function geom_tile in ggplot2
Add the argument na.value="transparent" to scale_fill_gradient: p + theme_bw() + geom_tile(aes(fill=z)) + scale_fill_gradient(low="green", high="red", limits=c(-0.1, 0.1), na.value="transparent")

Categories : R

Printing Matlab plot: how to reduce grey borders?
You can use the set subplot position. I wrote down some numbers, but they are not optimized. I encourage you to play with the numbers to fill the figure as you want. h = figure; subplot(1,2,1); plot(rand(5,1)); legend('1st legend'); set(subplot(1, 2, 1), 'Position', [0.07, 0.07, 0.40, 0.90]) subplot(1,2,2); plot(rand(5,1)); legend('2nd legend'); set(subplot(1, 2, 2), 'Position', [0.50, 0.07, 0.40, 0.90]) drawnow;

Categories : Matlab

Google API Key for Android Xamarin / C#. Map shows only a grey grid
After changing from MapActivity to FragmentActivity I got past this error. Then I encountered another error, claiming that my project does not have/can't find Google Play Services. At this moment I started wondering, if the emulator was the reason, so I tried deploying the new version to a dev phone we have at the office and BOOM it works. Therefore I'd recommend everyone to try the Fragment way of creating the map if you are getting this error with no way to fix it.

Categories : C#

Android Google Maps v2 - Grey tiles after zooming
I'd suggest clearing the cache for the Google Play Services app. Its possible some of the map data got corrupted in your cache. On the Samsung Galaxy S4 it should be under: Menu->Settings->Application Manager->Google Play Services Then, tap Clear cache.

Categories : Android

Turn text grey on "Edit button" click
Lakesh was mostly right, I needed to reloadData. I changed the text color by adding a boolean (editClicked) to my setEditing function: - (void)setEditing:(BOOL)flag animated:(BOOL)animated { NSLog(@"setEditing called"); [super setEditing:flag animated:animated]; if (flag == YES){ editClicked = true; [tableView reloadData]; } else { editClicked = false; } } In my table's cellForRowAtIndexPath function, I then added the following if statement: //If editClicked is true, change text to grey if (editClicked == true){ [countTotalFieldUniversal setValue:[UIColor darkGrayColor] forKeyPath:@"_placeholderLabel.textColor"]; } else { // Save the

Categories : IOS

How do I create the semi-transparent grey tutorial overlay in Android?
You don't need to use Photoshop. You can Use for example a LinearLayout with android:background="#50134BE8". This will make it transparent blue. You can place the layout on top of everything and hide it when the user is done. You can use any background color, but to make it transparent, place a number from 01 to FE, after the "#" symbol to change its transparency. Set the width and the height to fill_parent to occupy the whole area. Place this view directly in the main layout. Hope this helps.

Categories : Android

Why are items for other users on the TFS current iteration task board grey?
There is a "Person" drop-down in the upper-right corner. If "All" is selected then all rows will be expanded and all items will have color. If a specific person is selected only their row will be expanded and all items assigned to others will be grey.

Categories : Misc

How to resize grey area at top of Python IDLE editor window
The feature you are referring to, is 'Code Context'. You can select 'Options', and un-tick 'Code Context' option to remove this. As far as I am aware, there is no user-selectable option that allows you to resize it, but I hope I am wrong or that they include that feature.

Categories : Python

Tracking tooltip causes grey "trail" of excruciatingly slow repaint
Adding the WS_CLIPCHILDREN style bit to the parent window made this issue go away. For whatever reason, when a window is partly obscured and then revealed, the OS is very generous with the WM_ERASEBKGND messages and very stingy with the WM_PAINT messages. What was happening is that the parent's WM_ERASEBKGND handler was erasing over top of my control. Adding WS_CLIPCHILDREN causes the parent window to clip its erasing. Funnily enough, this solution worked for my control, which simply ignores the WM_ERASEBKGND message, but didn't work for standard BUTTON controls with style BS_GROUPBOX style. I expect this is because of the same generous WM_ERASEBKGND policy. The standard button control probably dutifully erases its background in handling that message and then vainly waits around for a WM

Categories : C

Half grey google map while dynamically creating it for more then once with javascript live function
I too had the same problem, I solved it by triggering the resize of Google maps. Here is the below code: google.maps.event.trigger(rootMap , 'resize'); //For v3 Add this after initializing the Google maps. You can take a look at this SO Question.

Categories : Javascript

Grey ribbon on Account form in IE "SCRIPT5: Access is denied." in PageLoader.js
It turns out that the problem is an address lookup plugin on the Account form. This is trying to access http://crm:1999, which is a 404, and http://crm:5555, which isn't allowed. Solutions are to fix the server on http://crm:1999 and set up proper managed internal and external URLs so it'll know whether http://crm:5555 or http://crm.ourcompany.co.uk:5555 or remove the plugin.

Categories : Javascript

Fotorama thumbnail images not displaying -grey block & no image on click
Your layout is just wrong. Replace this: <img src="1.jpg"><img src="1_thumb.jpg" /></a> <img src="2.jpg"><img src="2_thumb.jpg" /></a> <img src="3.jpg"><img src="3_thumb.jpg" /></a> With this: <a href="1.jpg"><img src="1_thumb.jpg" /></a> <a href="2.jpg"><img src="2_thumb.jpg" /></a> <a href="3.jpg"><img src="3_thumb.jpg" /></a>

Categories : HTML

JPopupMenu.show shows popupmenu with strange behaviour (sometimes appears as grey box)
Change your dropdown method as below. That should work as expected. private void dropdown(MouseEvent e) { activeDropdown = new JPopupMenu(); JMenuItem item = new JMenuItem("Eintrag 0"); activeDropdown.add(item); this.add(activeDropdown); activeDropdown.show(this, e.getX(), e.getY()); } However, I don't understand why you are removing the existing JPopMenu and adding a new one on every right-mouse click.

Categories : Java

Resizing the container, the two grey squares should grow as much as possible, constrained by the diagonal.. easy way to do it?
If you take the line that goes through the diagonal of the square and search for the intersection with the diagonal of the rectangle, you'll find the point that the square will have to reach. You can use the distance between this point and the origin to compute the length of the diagonal of the squares and trivially get the side. $("#container").resizable({ resize: function (event, ui) { var w = ui.size.width; var h = ui.size.height; var m = h/w; var c = -h; var x = c/(-1-m); var y = -1*(c/(-1-m)); var diag = Math.sqrt(Math.pow(x,2) + Math.pow(y,2)); var l = diag/Math.sqrt(2); $("#left").width(l).height(l); $("#right").width(l).height(l); } })

Categories : Javascript

Powerpoint VBA/Macro: Deactivate (Grey out) Button on Ribbon, if no shape is selected
Assuming you are using a 2007+ version of PowerPoint, the only way to manipulate the ribbon controls, buttons, etc., is through ribbon extensibility. It is possible to do this at run-time, with a vba hook, but it is much more difficult than in previous versions of PowerPoint where you could just use VBA to manipulate the controls' .Enabled or .Visible properties. Here is an example of using ribbon extensibility to customize the ribbon at run-time. As you can see, it is not easy. I will show this in Option 2, below. In this case, you have an error condition that you can easily identify using the .Type property of the Selection.ShapeRange. I think that attempting to conditionally disable this button at run-time (Option 2, below) is probably more trouble than it is worth. Update Is

Categories : Vba

when app is run on phone (installed from bin folder's .apk file), grey tiled screen is displayed
What certificate was used to sign the APK? Make sure you've added the fingerprint for your debug certificate as well as your release certificate when generating your API key. See more instructions here: https://developers.google.com/maps/documentation/android/start

Categories : Android

Why does my status bar (despite being set to "black opaque") turn grey when I change the navigationController's background color?
You should disable status bar tinting. From iOS 6.0 release notes: It is now possible to set status bar tint parameters in your app’s Info.plist file. You might do this to ensure that the status bar color matches your app’s navigation bar color during startup. To set the status bar tint, add the UIStatusBarTintParameters key to your Info.plist file. The value of this key is a dictionary with the appropriate values describing the navigation bar your app has at startup. Inside the dictionary should be the UINavigationBar key, which has a value that is also a dictionary. That dictionary contains the initial navigation bar’s style (with the Style key) and indicates whether it is translucent (with the Translucent key). You can also specify your navigation bar’s tint color (with the

Categories : IOS

Android dynamic views generated with grey color. Can't change radiobutton color
I found the solution. Just not using the Context and create all the views like this one: RadioButton tv2 = new RadioButton(this); Just replacing tContext for this

Categories : Android

How to add a 'colorbar' and set 'clim' to a colour image overlaid on a grey level image?
A reference for single figure/multiple colormaps can be found here http://www.mathworks.fr/support/solutions/en/data/1-GNRWEH/index.html Using images in particular, one can use 'subimage' function. I also use 'FreezeColor' and 'cbfreeze' functions from 'matlabcentral' when a home-made solution is too tricky. http://www.mathworks.com/matlabcentral/fileexchange/7943-freezecolors-unfreezecolors http://www.mathworks.com/matlabcentral/fileexchange/24371 A straightforward - and lazy - solution for keeping a colorbar across multiple plots within the same axes: first plot the colour image and its colorbar, freeze the colorbar, then plot over the grey level image (no transparency), and finally plot the colour image again (transparency). Here is a piece of code. figure; %first step: RGB image

Categories : Matlab



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