FAQ Database Discussion Community


Why is a field with no modifier visible in a subclass? [duplicate]

java,subclass,visibility,access-modifiers
This question already has an answer here: In Java, what's the difference between public, default, protected, and private? 16 answers Why is a field with no modifier visible in a subclass? My super class: public class SuperClass { String s = "superString"; public void method(){ System.out.println("Super"); } } My...

Weird behavior of template and google maps

html,google-maps,debugging,hover,visibility
I downloaded this template from themeforest: http://themeforest.net/item/-medic-medical-health-and-hospital-html5-theme/full_screen_preview/8331329 Move your mouse over navigation item "Contact" and you will see a google map. Remember position of the map. Then close contact item and move your mouse over position, where map was placed. Contact window should appear again, without opening it by clicking...

How to animate “visibility: hidden”?

jquery,html,css,jquery-animate,visibility
here is my problem... Can you help me please? $(".button").hover(function(){ $('.class').css({opacity: 1.0, visibility: "hidden"}).animate({opacity: 0}, 1200); },function(){ $('.class').css({opacity: 0.0, visibility: "visible"}).animate({opacity: 1}, 1200); }); It only animates when it is appearing. :-(...

visibility in pipes as a multithreaded messaging mechanism

c,multithreading,pipe,visibility
Let's say I have a few threads that can write to a pipe in equal sized chunks which are smaller than PIPE_BUF, this is atomic. However I wonder if I read the pipe is it guaranteed that I either get nothing (pipe is empty) or I get a full sized...

does array elements need to be volatile? if so, how can I make it?

java,concurrency,visibility,atomic
Suppose I have little code like this: public class Test { final Data[] dataArray; final int maxSize; volatile long nextWriteNo; volatile long nextReadNo; public Test(int maxSize){ this.dataArray = new Data[maxSize]; this.maxSize = maxSize; this.nextWriteNo = 0L; this.nextReadNo = 0L; } public void write(Data data){ synchronized (this) { dataArray[(int)(nextWriteNo & (maxSize...

Angularjs make invisible accordion if subelement are filtered

angularjs,filter,accordion,visibility,ng-repeat
i have created an accordion dynamically with angular. Code: <input type="text" class="form-control pull-left" ng-model="searchSingoloCampo.title"> <accordion-group ng-repeat="category in categories"> <li ng-repeat="resource in category.resources | filter:searchSingoloCampo"> </li> </accordion-group> The accordions is generated by a list , and inside each accordion there is a sublist of elements. I can filter the element inside...

How can I make a title not show up on a template?

php,wordpress,templates,visibility,title
I am working out of wordpress, and I would like to add a php code to a template file. I only want the title to NOT display on this template. Is there a certain code that I can place on a template file to make only THIS TEMPLATE NOT DISPLAY...

Qt childs are visible but parent not

qt,parent-child,visibility
I have some widgets, QToolButtons to be exactly, and I initialize them like this: QFrame *frmBackground = new QFrame(ui->centralWidget); QToolButton *btnMenueExit = new QToolButton(frmBackground); But now my problem. When I call frmBackground->setVisible(false), the child should disappear too, but thats not the case. The children are still visible and I would...

Java, compilation error, Constructors

java,constructor,visibility,scjp
I have been trying a mock ocjp 6 test. I went though a question asking if the constructor is correct : 1- public Test8(){} 2- private void Test8(){} 3- protected Test8(int k){} 4- Test8(){} The correct answer was 1 and 3. I didn't understand why the 4 was incorrect. When...

How to set visibility of a group of views in iOS

ios,xcode,visibility
I need to show one view or another in a single function. Is there any way to do this without doing: [label1 setHidden:YES]; [label2 setHidden:YES]; [label3 setHidden:YES]; e.g. in one function? In android I would create two absolute layouts and show one or the other, I am searching something similar...

Background Color Not Filling in Entire Row Based off Expression in SSRS

ssrs-2008,expression,visibility
I was hoping I could get some help on this issue. Got a report that displays data for events; of which we have two types: fixed and mobile. To fill in the row based off what type the event is, I used this expression: =IIF(Fields!OwnerType.Value = "Fixed", "LightSteelBlue", "#FFFFFF") But...

Collapsed Grid in StackPanel change position of other controls in StackPanel

c#,xaml,windows-store-apps,windows-8.1,visibility
I have this Xaml Page: <StackPanel Orientation="Horizontal"> <Grid x:Name="inkGrid0" Margin="0,0,0,0" HorizontalAlignment="Left" > <Canvas x:Name="inkCanvas0" Width="570"> <Canvas.Background> <ImageBrush x:Name="DImage0" ImageSource="{Binding}"/> </Canvas.Background> </Canvas> </Grid> <Grid x:Name="inkGrid1" Margin="0,0,0,0" HorizontalAlignment="Right" > <Canvas x:Name="inkCanvas1" Width="570"> <Canvas.Background> <ImageBrush x:Name="DImage1"...

JFrame error actionperformed

java,swing,jframe,actionlistener,visibility
I want to set the visibility of frame 2 to false, but whenever I do that, I get an error. I read something about this and it said that I needed to make my method I private method, but I can't do that since my method is actionPerformed. Somebody got...

Cocos2d Node not accepting Touches

ios,cocos2d-iphone,touch,visibility,ccnode
Cocos2d v3: I have a very strange problem. I have a dozen or so CCNodes that are acting like menus for my game. They take up just a small section of the center of the screen. To present one node I hide (node.visible = NO) all the other nodes. Two...

How do I toggle an object and make it permanently visible after scrolling?

javascript,jquery,toggle,visibility
I've made a site where the first page of my site is a youtube video, I want the navigationbar to be hidden until you hover over it. Once you go to another site I want the navigation bar to be visible at all times. As for now the navigationbar dissapears...

Why is package visibility given priority over subclass visibility?

java,visibility
This answer shows Java's visibility modifiers and their meaning: Modifier | Class | Package | Subclass | World ————————————+———————+—————————+——————————+——————— public | y | y | y | y ————————————+———————+—————————+——————————+——————— protected | y | y | y | n...

Source trait is inaccessible

rust,visibility,traits
The situation is (severely simplified) this (playpen): mod tokentree { pub struct TokenTree; mod serialize { use std::collections::BTreeMap; use super::TokenTree; #[derive(Debug)] pub struct InternStr; pub trait InternStrsExt { fn intern_strs(&self) -> BTreeMap<&str, InternStr>; } impl InternStrsExt for [TokenTree] { fn intern_strs(&self) -> BTreeMap<&str, InternStr> { BTreeMap::new() } } } pub...

C#: How can I expose a class property to one class but not to another?

c#,properties,hide,visibility
I have a data contract "StudentInformation" in my class library, something like this: public class StudentInformation { public int StudentId { get; set; } public bool CanChangeBus { get; set; } public List<int> AvailableBuses { get; set; } } public class BusChangeRequestModel { public StudentInformation StudentInfo { get; set; }...

D3 visibility - if statement

if-statement,d3.js,visibility
I have a function, which changes the visibility of an element, by clicking a button. $<button class="pure-button pure-button-primary" title="convex-button" onclick= "convexHullvisibility()"><i>Convex Hull</i></button>$ Unfortunately, this function does not work and I think the problem is in if statement. function convexHullvisibility(){ if (hull.attr("visibility", "visible")){ alert("1"); hull.attr("visibility", "hidden"); } else{ alert("2"); hull.attr("visibility", "visible");...

Handle Onclick event with a view visibility gone/visible

android,view,visibility
I explain my problem. I have a view in which there is two button and two editText. If I touch the button1, I want to display the edidText1. If I touch the button2, I want to display the edidText2. In my layout, edidText1 has the visibility visible, edidText2 has the...

How to “css3 blink effect” with visibility property

css3,visibility,css-animations,keyframe
I'm trying to get an old blink effect on some DIVs. The should start FROM invisible and then turn visible for a while, then over and over in an infinite blink. CSS specs says Visible is animatable as Visible (I understood this as there can not be transition ie fade...

Java: Accessing private field via reflection (behaviour)

java,reflection,visibility
Junior in Java; using reflection is possible to access private fields (not asking how, Question 1 and Question 2) Ok. My questions are related with the nature of this behaviour. Is there any limitation? Can I access any field of any .class I come across? During my code, once you...

Detecting if an element is within the viewport by using jquery.visible.js and an offset

javascript,jquery,visibility,jquery.visible
I am using a very small jQuery plugin, jquery.visible.js (https://github.com/customd/jquery-visible) to detect if an element is partially visible within the current viewport. Although, I have fixed navigation on the top of the page that causes issues when an element is underneath the navigation. Instead, if an element is under the...

How do you override self?

php,oop,visibility
I want to build class that implement a lot of methods based on it's id, so I want to have one class parent that implement the methods! and when i want to use this class I will extend it and just override the id variable : class parent { $id...

Android EditText Visibility based on radioGroup selection

android,visibility
I need to hide editText1 and show editText2 if radioButton1 is selected and I need to hide editText2 and show editText1 if radioButton2 is selected. both buttons are in a radioGroup. I am not sure if there is a radioGroup onChange event which returns which radioButton is checked? if so,...

How to hide content one and show content two?

javascript,jquery,html,css,visibility
I have a problem here. I'd like to hide one content on my website and show next content with jQuery. I've got just 2 content divs. So basically what I'd like to do is... 1) When I open the website <div id="content2"></div> hides as well as <div id="content2_bottom"></div>. 2) When...

How can I apply jquery selector to only visible checkboxes?

jquery,jquery-selectors,visibility
I have the following code that checks all checkboxes in a html table column $('.selectAll').on('click', function (e) { if ($(this).is(':checked')) { $('input[type=checkbox][value=' + $(this).attr("id") + ']').prop('checked', true); } else { $('input[type=checkbox][value=' + $(this).attr("id") + ']').prop('checked', false); } }); which works great except in certain cases some of the rows of...

How to disable or enable the chart visibility in BIRT

java,visibility,birt
I have a problem, I need to dynamically show the chart according to the user's selection with BIRT. Could anyone tell me how to do that with script? I have created the parameter for the selection.

Check if Expandable List first item is displaying

android,expandablelistview,visibility,listitem
I am writing an code, where I need to check if first item for Expandable List is visible. For this I checked with AbsListView.OnScrollListener.onScroll(..firstItem, visibleItemCount..) but it's not working exactly if list get expand. Also is there any way to identify if first item completely visible. Any suggestion here!...

LIKE operator in SSRS row visibility expression

reporting-services,textbox,ssrs-2008,visibility,like-operator
I have a text box within an rdl report which I want to suppress based on certain terms in my dataset (i.e. if the query returns a term which ends with the letter "L" then hide the text box). Within the textbox properties I have set visibility expression for Hidden...

Setting Textblock/Button Visibility on WP8 App using MVVM

c#,windows-phone-8,mvvm,visibility,ivalueconverter
I'm new to MVVM and I'm working on a WP8 app and I'd like to be able to set the visibility of buttons and a textblock based on when one of those buttons were tapped. Here's my View to try and explain my problem a bit better; (http://i.imgur.com/JvrxBkh.png - can't...

Any ideas of how make internal a base class implementation having a child class of that class public in C#?

c#,inheritance,visibility,public,internal
Any ideas of how make internal a base class having a child class of that class public in c#? In code: internal class Base { } public class Child : Base {} I have a layered architecture and need to expose to other layers (others assemblies) the Child class but...

Summing Only Visible Rows in SSRS

ssrs-2008,aggregate,visibility,ssrs-tablix
I'm trying to sum only the visible rows for a report and I know the format is: =Sum( iif( <use the condition of the Visibility.Hidden expression>, 0, Fields!A.Value)) In my report, I've set row visbility to: =IIF(CInt(Fields!EM_ET.Value)=1 Or CInt(Fields!EM_ET.Value)= 2,True,False) Not exactly sure what I'm missing, but when I use...

Setting EditText visibility [duplicate]

java,android,android-edittext,visibility
This question already has an answer here: How to make Views with an Invisible attribute 'Visible' after clicking a button 4 answers I have four EditText that I set to invisible in the XML and when the button is clicked, I want them to be visible in pairs. For...

How to change background while changing visiblity?

javascript,html,css,background,visibility
I set a section named "show" in my html file to invisible using div id="show" style="display:none, and tried to to change the visibility using document.getElementById("show").style.display = "block" in a JavaScript function. Now my problem is, how can I change its background color while I change the section to visible? I...

What is visibility in XML? dimen, string, etc (Android)

android,xml,visibility,attr
I want to have different visibility for each version (JB, KK and L). Then, I have some attr.xml files for each version, before I was using dimen value to set its height to 0 or X dpi, but now I need to remove the view. What is visibility? is not...

When a specific form option is selected a new input appears, using JavaScript [duplicate]

javascript,php,html,visibility
This question already has an answer here: PHP - Select yes or no, yes causes a new input to appear 1 answer I'm trying to get the following concept working (bare in mind my JavaScript knowledge is minimal). A select option is provided, with fields like: email address marriage...

I have two horizontal scroll views. How can I show one at a time and switch between them on button click?

java,android,visibility,horizontal-scrolling
On my android app I have two horizontal scroll views that act as docks. How can I make it so that if button 1 is clicked dock 1 displays and if button 2 is clicked dock 2 displays? Since they're docks I want them to both display in the same...

Using textbox background color and content as program status indicator

android,android-layout,visibility
I would like to create an indicator that would clearly show the user whether a certain feature of my application is "ON" or "OFF". Ideally a textbox with white font and black background saying "OFF", that would change to having a green background and black font saying "ON". What is...

How does visibility work for Java nested classes?

java,visibility
I'm trying to learn what visibility to assign to nested classes, besides what my IDE yells at me that I have to do. This can get arbitrarily complicated, so I need to understand the general rules. public class A { private static class B { public int foo; // accessible...

Adobe LiveCycle - checked check box not hiding subforms

checkbox,adobe,visibility,livecycle,subform
I am creating a PDF form in Adobe LiveCycle that has sections that can be check boxed "None" and the section (subform(s)) will "disappear" (become hidden). This is done in the Action Builder with the condition when check box is checked, set the visibility of the subform to hidden. There...

setVisibility not working [duplicate]

android,button,visibility
This question already has an answer here: How do I compare strings in Java? 23 answers I am trying to hide a button if a logged in user is a Donor. I have my code like this. String typ = user.get("type").toString(); Log.d("before checking type", typ); if (typ == "Donor"){...

Yii2 per content visibility depending on role

permissions,visibility,yii2
We have used RBAC to implement simple role based permissions for CRUD, but now we need to also add a 'visibility' functionality which makes it possible to limit content visibility (R) to only registered users or only the content owners. So, how can we limit content visibility on different levels,...

Method nonvisibility of same instanceof but differing class

java,class,methods,visibility
I have something like the below: Item var; Depending on user input, it will be initialized as a different class: if (/*user input*/ == 1) { var = new Item(); } else { var = new Truck(); } The classes are defined as: public class Truck extends Item { public...

UserControl hidden, Zindex misused?

c#,xaml,user-controls,visibility
In my main page I try to show a list of stuff, and on this stuff a userControl as an overlay. In fact I never see it. (In the design view, my userControl is oaky) XAML MainPage <Grid> <Grid x:name="MyPage"> <!-- All this part is visible --> //Button //Button //nice...

Changing visibility of
  • elements on hover
  • jquery,css,visibility,show-hide
    I have a navbar ul with icons and another ul aligned in a fixed position to appear next to it with a label for each icon. When the user hovers over a li in the navbar, I want the corresponding li in the second ul to become visible, then become...

    What is the difference between the keyword 'Private' and 'Final'?

    php,oop,methods,visibility,final
    Having a confusion between Private and Final in PHP. For example I have 3 classes: Class A (parent class) Class B (child class) Class C (other class) What I understand: A: Public variables and methods are accessible to the class A, class B and class C B: Private variables and...

    Button Visibility in WPF at startup

    c#,button,wpf-controls,visibility
    I have some button that I want them to be hidden when the wpf loads up. I use this: public MainWindow() { mySendButton.Visibility = Visibility.Hidden; myReceiveButton.Visibility = Visibility.Hidden; InitializeComponent(); } But the above generating an error. i think I wrote them not at the right place. Can I get a...