w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
What is the proper way to change a Text View's default content on iOS 6?
Is there any extra work involved in replacing the text initially displayed in a view? The answer to this is no. All you have to do, is in Storyboard, double click on the text, and replace it with whatever you want it to be. When you do this, it will initially display the text "Hello, Australia" provided that the label is not hidden. If I didn't answer your question, just comment with more details and I'll try to help you further.

Categories : Iphone

Detail Text Label Not displaying proper content
cell.detailTextLabel.text = [NSString stringWithFormat:@"posted on %@ at (%f, %f)", post.timestamp, (post.location.coordinate.latitude, post.location.coordinate.longitude)]; Remove those extra parenthesis around the latitude and longitude: cell.detailTextLabel.text = [NSString stringWithFormat:@"posted on %@ at (%f, %f)", post.timestamp, post.location.coordinate.latitude, post.location.coordinate.longitude];

Categories : IOS

UIPickerView change content text size after loading content into picker
If I understood your question correctly, you may want to take a look at this answer. The strategy is basically to truncate (ellipsis) instead of font shrinking. Edit (based on comment) I would strongly advise against setting all text to the minimum font. Lets say you have elements as such: Pear Peach ok, so far these will fit your label perfectly, with a good font size. Now you add a longer item: Pear Peach Strawberry Pineapple and now all your items are a little bit smaller, but thats still readable, so it's acceptable. And then a huge item appears, such as: Pear Peach Strawberry Pineapple SomeKindOfExoticFruitThatHasAnIncredibleLongName which would make all items inside your picker become incredibly small, and difficult to read. But if you still want to go down that roa

Categories : IOS

Can I change the default view of tig?
As of Tig version 1.2, there is no way to configure what view is shown at startup. The best workaround at this point is to use a shell alias. For example, alias ti='tig status'. See tig -h for other options.

Categories : Misc

Use a different view for devise default change password method
Ok If you just need 1 view.. try to read this may help http://guides.rubyonrails.org/routing.html You can create just the view you need, you dont need to pull a lot of views that may also overwrite yours or generate errors. If your a noob in rails, this will be better friend.. Hope this helps, let me know! im glad to help

Categories : Ruby On Rails

Change content of view on swipe
You can use 'onFling' method. You can detect the swipe direction and with a listener for the right direction swipe, you can call your methods for the data source. here is an example : How to detect swipe direction between left/right and up/down

Categories : Android

How to change the default text font in Eclipse?
Software Salariman has posted a solution - "Change Default Text Font in Eclipse". The default font is set in: Window > Preferences > General/Appearance/Colors and fonts > Basic/Text Font

Categories : Eclipse

Devise: how to use another mail view when user requests email change ( instead of the default )
This is not trivial task, actualy you need to overwrite this devise method inside your model: def send_confirmation_instructions if reconfirmation_required? self.confirmation_token = nil if reconfirmation_required? @reconfirmation_required = false ensure_confirmation_token! opts = pending_reconfirmation? ? { :to => unconfirmed_email } : { } send_devise_notification(:reconfirmation_instructions, opts) else super end end Then you need to extend Devise::Mailer to add method reconfirmation_instructions And finally you need to create view app/views/devise/mailer/reconfirmation_instructions.html.erb

Categories : Ruby On Rails

IBM Worklight 6.0 - Unable to change the default WL.BusyIndicator text
Try the following code: function wlCommonInit(){ WL.ClientMessages.loading = "Hello world :)"; var busyInd = new WL.BusyIndicator('content'); busyInd.show(); setTimeout(function () { busyInd.hide(); }, 3000); } Notice that I'm using WL.ClientMessages.loading to set the message, instead of passing an object with the text key to the constructor. I had to look at the Busy Indicator code to figure out what was wrong, I'll open a defect. Thanks for reporting this.

Categories : Android

Change content of a view depending on iframe size
You'll probably want to take a look at media queries. The basic idea is something like this: @media (max-width: 768px) { .hide_on_small_screens { display: none; } } You can then add this or similar classes to the objects you want to hide/show. Alternatively you can just write the code for say a class like .iframe_wrapper

Categories : Ruby On Rails

Sublime Text 2 How To Change Default Runtime Shell Command For C++?
{ "cmd": ["g++", "${file}", "-o", "${file_path}/${file_base_name}"], "file_regex": "^(..[^:]*):([0-9]+):?([0-9]+)?:? (.*)$", "working_dir": "${file_path}", "selector": "source.c, source.c++", "variants": [ { "name": "Run", "cmd": ["${file_path}/${file_base_name}"] } ] } Just drop the compilation command and retain only the executable invocation part. But remember, you have to compile before running otherwise the executable would not have got generated.

Categories : C++

iOS - change a view's content on push notification received event
I want to display the message in the app even if the user has dismissed the notification in the notification center This can't be done. iOS passes the notification data to your app only if the user opens the app from the notification center. If the user dismisses the notification and later launches the app, the only way for the app to get this data is to retrieve in from your server. As for getting the notification data if the app is launched from the notification center, see this question.

Categories : IOS

Event for change in text file content
You can accomplish this with the new Java 7 WatchService. This enables you to watch a directory and be notified of create, modified and delete events.

Categories : Java

How to change the content of a text box in excel from javascript
TextFrame.Characters is a method with optional parameters. VBScript/VBA can hide this from the programmer, but JScript can't: excel = new ActiveXObject('Excel.Application'); excel.Workbooks.Add(); excel.Application.Visible = true; var vFirma1 = excel.ActiveSheet.Shapes.AddTextbox(1, 200, 200, 200, 200); WScript.Echo("vFirma1 ", typeof vFirma1); WScript.Echo("TextFrame ", typeof vFirma1.TextFrame); WScript.Echo("Characters ", typeof vFirma1.TextFrame.Characters); WScript.Echo("Characters() ", typeof vFirma1.TextFrame.Characters()); WScript.Echo("Characters().Text ", typeof vFirma1.TextFrame.Characters().Text); vFirma1.TextFrame.Characters().Text = "Test Box"; //No Error here!!! output: cscript 18390537.js vFirma1 object TextFrame object Characters unknown Characters()

Categories : Excel

Trying to change the text of a label that is inside the default login.aspx page in asp.net
The FindControl method will only find server side controls (as in this case) that are direct descendants of the container you are searching. From MSDN (I have added emphasis)- Use FindControl to access a control from a function in a code-behind page, to access a control that is inside another container, or in other circumstances where the target control is not directly accessible to the caller. This method will find a control only if the control is directly contained by the specified container; that is, the method does not search throughout a hierarchy of controls within controls. For information about how to find a control when you do not know its immediate container, see How to: Access Server Controls by ID. http://msdn.microsoft.com/en-us/library/486wc64h.aspx Gen

Categories : C#

make default value in textbox not change till text is entered using jQuery
Reduce your no.of lines of code,By using placeholder attribute. Ex <input type="text" name="first_name" placeholder="Your first name..."> Demo Fiddle

Categories : Javascript

How to improve performance of content view loading on orientation change in Android?
you can do one thing create a single layout file which is contains design for both orientation landscape and portrait . and override OnConfigurationChange(); mnifest.xml <activity android:name="YourActivity" android:configChanges="keyboardHidden|orientation|screenSize" // this will not refresh your activity /> @Override public void onConfigurationChanged(Configuration newConfig) { super.onConfigurationChanged(newConfig); if(newConfig.orientation == Configuration.ORIENTATION_LANDSCAPE){ //visible landscape layout //hide portrait layout }else if(newConfig.orientation == Configuration.ORIENTATION_PORTRAIT){ //visible portrait layout //hide landscape layout }

Categories : Android

How to change the text color of the typing content in radeditor?
The tools that color text are designed to work on a selection. This is why you get this behavior. If you select text and change its color things will be fine. If you want to set defaults for the content area, take a look at this article: http://www.telerik.com/help/aspnet-ajax/editor-setting-content-area-defaults.html.

Categories : C#

How to change the mobile safari's default text "0 items" when using the "multiple" attribute of the "select" tag?
Yes. I had to play around with this to see what you were referring to, but here's what you need: for your first option, simply add <option disabled selected class="hidden">Select option(s)</option> where class hidden is simply: .hidden { display:none; } then on focus, remove the "selected" attribute / property of the first option using jquery: $('select').on('focus', function() { $(this).children(':first-child').removeProp('selected'); }

Categories : HTML

How can I change the color of a specific word(or phrase) in the Text content of a RichTextBox
Did you see this link Answer here Check it: Change color and font for some part of text in WPF C#

Categories : C#

Dynamic View not being created in proper place. Overlapping previous view. Android
I'm not sure, but you can try follow code to move any view. I recommend to use RelativeLayout like your main layout. RelativeLayout.LayoutParams bParams1 = new RelativeLayout.LayoutParams( LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT); bParams1.leftMargin = (int) leftMrgn; bParams1.topMargin = (int) topMgrn; bParams1.height = (int) bHeight; bParams1.width = (int) bWidth; anyView.setLayoutParams(bParams1);

Categories : Android

How to change the color of the text inside a View?
Consider that I do not have a reference to the TextViews themselves Since you "add at runtime several TextViews", you are certainly welcome to "have a reference to the TextViews themselves". Add them to some sort of collection (e.g., ArrayList<TextView>) at the time when you "add at runtime", then iterate over the collection to change their color.

Categories : Android

How to change edit text after view created
You can see below a working simple example of how you can change the text of an EditText in the method onActivityResult. Here is the code for the first activity: @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); final Intent i = new Intent(this, MyActivity2.class); startActivityForResult(i, 0); } @Override protected void onActivityResult(int requestCode, int resultCode, Intent data) { if (resultCode == RESULT_OK) { final Bundle result = data.getExtras(); if (!result.isEmpty() && result.containsKey("data")) { final EditText editText = (EditText) findViewById(R.id.edit); editText.setText(data.getStringExtra("data")); } } } Here is

Categories : Android

Change the text of 'View cart' button
Add the following to your functions.php file. /** * Change text strings * * @link http://codex.wordpress.org/Plugin_API/Filter_Reference/gettext */ function my_text_strings( $translated_text, $text, $domain ) { switch ( $translated_text ) { case 'View Cart' : $translated_text = __( 'View Shopping Cart', 'woocommerce' ); break; } return $translated_text; } add_filter( 'gettext', 'my_text_strings', 20, 3 ); This will change View Cart to View Shopping Cart

Categories : PHP

Is there a way using javascript not C# to change the text color of a list view?
If jQuery is an option for your JavaScript, you could use its .each selector to iterate over each TWA label item, evaluate the value and apply either an inline style or css class based on the value.

Categories : Javascript

Replace default text with custom text on spree default app 2.0.3
You can use the wonderful xray-rails gem in order to help figure out what content is coming from where. Here's a sample from the spree sandbox: As an example you can see that the cart link is provided in _main_nav_bar.html.erb which uses the link_to_cart helper which uses the cart translation in en.yml. Try poking around and you should be able to find all of the translations you want to change and override them using the Rails i18n API.

Categories : Misc

Android - Proper way to listen for variable change, and do something upon change?
You must set your variable via a setter method. Then, you can be reactive to that change. public void setMyVariable(int value) { this.myVariable = value; if (myVariable == 1) { doSomethingWhen1(); } else if (myVariable == 0) { doSomethingWhen0(); } } A more elegant way to do that will be an observer pattern, Here you can find more detailed documentation about it. You must certainly avoid while(true) loops on mobile device, it will drain your battery and you are also blocking the UI thread. That's the reason why your UI is unresponsive and your cellphone it's quite hot.

Categories : Android

How to change color of text box in razor view ,onFocus and onBlur using jQuery
You can use the element and "attribute equals" selector, such that: $("input[type='text']").blur(function(e) { $(this).css("background", someColour); }); will apply to all textboxes.

Categories : Asp Net Mvc

Proper way to create a RadioField with a dynamic default value?
It looks like you are using my_form() for both form creation and form validation. Do you need to call: form = my_form(create_items()) or can you simply use: form = MyForm() if form.validate_on_submit(): ... Then my_form() is only for form creation.

Categories : Python

I want to change default text on "no file chosen" when we use input="file"
I have used CSS to hide the default text and used a label to show the new text. Have a look- http://jsfiddle.net/ZDgRG/ Choose file input[type=file]{ width:90px; color:transparent; } window.pressed = function(){ var a = document.getElementById('aa'); if(a.value == "") { fileLabel.innerHTML = "Choose file"; } else { var theSplit = a.value.split('\'); fileLabel.innerHTML = theSplit[theSplit.length-1]; } };

Categories : Javascript

Proper way to create a radiobuttonlist without having any of the radiobuttons checked by default
Yes, you are using the best model to represent a radio list with no default value. This is exactly the right purpose for null. An advantage of this approach is that the [Required] attribute makes it easy to validate that an option has been selected.

Categories : C#

What would be more efficient to load content on a detail view from a view controller with a table view?
It's not totally clear from your question where the data is coming from. I'm assuming because you mention a JSON call that when you select an item on your table view you need to make a web service call to fetch additional information about that item before displaying your detail view. If that's the case then you should make the web service call and load the data whilst in the detail view controller. Apple's interface guidelines recommend you do it this way to give the appearance of responsiveness. The detail view controller will be displayed immediately after the row in the table view has been tapped. You can use an activity indicator or loading graphic in your detail view to let the user know additional information is being downloaded. This is a considerably better experience than waiti

Categories : Iphone

android - can not setvisiblity view.invisible for view with default view.gone
This is probably because in your parent layout you have android:layout_width="wrap_content" either change this to android:layout_width="match_parent" or a fixed width, which I don't recommend. Or change the visibility of the View to invisible instead of gone in your xml. When the layout is first drawn, that space isn't available with the properties you have set. With my recommendations, the space will still be there to be used by another View. You could also change the width of the parent layout programmatically when you want to change the visibility of your ImageView but that would be more work and probably unnecessary in this situation.

Categories : Android

How to change the android default browser default Home URL
From Ben Williams I'm fairly (although admittedly not absolutely) certain this isn't possible, because apps are sandboxed, so you won't be able to access the browser's private sharedpreferences.

Categories : Android

How to place content in proper table format in repeater?
Ignoring the fact that this piece of HTML is totally invalid (ul -> li -> div -> a -> table), try to set the cell vertical alignment to top (<td valign="top">). A good advice. Try to use CSS and rewrite this using just divs and make it valid. <ul> <li> <div class="product"> <a href="#" class="info"> <table class="holder"> <asp:Repeater ID="repContent" runat="server"> <ItemTemplate> <%# (Container.ItemIndex + 4) % 4 == 0 ? "<tr>" : string.Empty %> <td valign="top"> <img src='<%#"/productimages/main/" + Eval("PhotoName").ToString().Trim

Categories : Asp Net

Proper authorization rules for protected content in firebase
You've done a good job of enumerating the options, and you're definitely on the right track. As you've discovered, there's no way to query based on security rules. This was done intentionally, since (depending on your security rules) this could be quite expensive (Firebase avoids complex queries in general for this reason). So your method 3 is the exact right way to do this. Duplicating data for these sorts of situations is actually a very common practice. See Denormalizing Your Data is Normal for a blog post that goes into more detail on this. You could also do method 1 with the duplicated document list. This is especially useful if you want to be able to "invite" somebody to a document just with a URL (that contains the secret ID). Or you could do a combination of the two (have s

Categories : Security

How to do a proper view?
I think that most elegant and scalable way is to do this: with cte(Name, Version, P_Name, Position) as ( select Name, Version, Position1, 1 from Table2 union all select Name, Version, Position2, 2 from Table2 ) select T2.Name, T2.P_Name, T1.PIN from Table1 as T1 left outer join cte as T2 on T2.Position = T1.Position and T2.Version = T1.Version order by Name, P_Name => sql fiddle demo You can easily add position = 3, 4 and then just add lines into cte

Categories : SQL

How to parse HTTP request with a missing content type in Express/ NodeJs, by assuming a default content type?
You have a bunch of options including manually invoking the express (connect, really) middleware functions yourself (really, go read the source code. They are just functions and there is no deep magic to confuse you). So: function defaultContentTypeMiddleware (req, res, next) { req.headers['content-type'] = req.headers['content-type'] || 'application/json'; next(); } app.use(defaultContentTypeMiddleware); app.use(express.bodyParser());

Categories : Javascript

Create custom UI bar button (to change view from list view, grid view)
It is UISegmentedControl not UIButton UISegmentedControl *segmentedControl = [[UISegmentedControl alloc] init]; [segmentedControl insertSegmentWithImage:[UIImage imageNamed:@"0.png"] atIndex:0 animated:NO]; [segmentedControl insertSegmentWithImage:[UIImage imageNamed:@"1.png"] atIndex:1 animated:NO]; UIBarButtonItem *barButtonItem = [[UIBarButtonItem alloc] initWithCustomView:segmentedControl]; [[[self navigationController] navigationItem] setRightBarButtonItem:barButtonItem];

Categories : IOS

iOS: Can (should) camera view be default view (that can launch other screens modally)?
Ok, if this app needs to be published in app store, there is a high potential that apple would reject a app which continuously uses camera because these operations are battery intensive and can drain up the battery and system resources very fast. So while, client suggested approach may save user's touch input to select camera, but it heavy in terms of system resources. This explanation may help put up your point to customer.

Categories : Iphone



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