w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Why is this iPhone app's "quote" button not replacing the Text View's lorem ipsum?
Ok checked your project and found the error: The problem is that quoteText is not referenced on the storyboard file so... Go to your .storyboard file and drag the + symbol from the Connections Inspector to the view controller as shown on the screenshot when you click up a context menu should appear with the following options quoteText view Of course you click on quoteText Hope this helps

Categories : Iphone

Emmet coding lorem ipsum, not starting with lorem
You can create a copy of Lorem Ipsum generator and put it into Extensions folder. In your copy of generator, update paragraph() function: simply set startWithCommon = false; somewhere at the top of function body.

Categories : Misc

While Sending Html Mails from my web application Recieved Mails contains Symbols like &ldquo,&rdquo, ‘
Check with another constructor for htmlView: ContentType mimeType = new System.Net.Mime.ContentType("text/html"); var htmlView = AlternateView.CreateAlternateViewFromString(bodyMessage, mimeType);

Categories : Asp Net Mvc

Getting error "String cannot be of zero length" when replacing a French quote character with normal single quote
It seems to me that, for some reason, your string at the point you attempt to replace is of 0 length. This indicates that the problem has to do with the contents of the column you retrieve from the DB. As such, I suggest that you check in your code if the string is null or empty before trying to replace.

Categories : C#

iOS - how to get lines under the text in text view like the notes app on the iPhone?
As I understand you, the actual text you write is not aligned with the stripes on the "notepaper" background? If so, you need to mess around with the image until you hit the right place.

Categories : IOS

SQL Injection prevention by replacing single-quote
I would like to know what's wrong in something like this (PHP) The idea. It has been proved to be flawed long time ago. First of all, this code does alter the data. It is good approach for the abstract musings but it will crash your application in the real life. As a matter of fact, it's unacceptable behavior. However, you could escape your quotes instead of replacing them. Second, you are (like most of PHP folks) under the delusion that replacing some characters makes your data safe. While it is not. Every PHP user who cares to reinvent a wheel in the field of injection protection always assume that only strings being added to the query. They never realize it explicitly though, nor imagine any other parts exists in SQL query. While such a replacement would be as harmless for any

Categories : PHP

Replacing char with single quote using tr in shell scripting
tr is not the right tool for this since tr does char by char translation instead of char to a string replacement. use awk: awk '{printf("'"'"'%s'"'"',", $0)} END{print ""}' 1.txt To avoid all weird double quote/single quote stuff use: awk '{printf("x27%sx27,", $0)} END{print ""}' 1.txt To avoid printing comma after last line: awk '{a[cnt++]=$0} END{ for (i=0; i<length(a)-1; i++) printf("x27%sx27,", a[i]); print a[i]}' 1.txt

Categories : Shell

View does not get pushed on button click - Iphone dev
you have to add one UIViewcontroller in to Your appDelegate method and make it RootViewcontroller of UInavigationController anlike bellow:- - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; // Override point for customization after application launch. self.viewController = [[yourViewcontroller alloc] initWithNibName:@"yourViewcontroller" bundle:nil]; self.navController=[[UINavigationController alloc]initWithRootViewController:self.viewController]; self.window.rootViewController = self.navController; [self.window makeKeyAndVisible]; return YES; } Then you no need to apply each class create new UInavigat

Categories : Iphone

asp.net button text alignment in iphone safari
It probably has something to do with the table based layout forcing the button to the right. I would switch to a more modern approach to page layout (div's and external CSS). Take a look at this question and answer for an idea of how to do this. Align <div> elements side by side

Categories : Asp Net

customized list view with text view and button not support for multiple screen?
i m giving u a demo.this layout will work on all size layout,this will definitely help u @Yugesh. weight works percentage-wise on all screen. <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" > <LinearLayout android:layout_width="fill_parent" android:layout_height="wrap_content" android:gravity="center_vertical" > <RelativeLayout android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight=".30" android:gravity="center_horizontal" > <ImageView android:id="@+id/image1"

Categories : Android

how to view the database in listview without replacing the listview text
I understand your question in a way, that you want to add items to your listview, without removing the already containing items. You can do this by adding items to the adpater and call a notifiychanged to update the listview: lviewAdapter.setNotifyOnChange(false); lviewAdapter.addAll(model.getItems()); lviewAdapter.notifyDataSetChanged(); Use the following as member of your class ListAdapter lviewAdapter; In the onCreate method initialize it and set the adapter to the ListView: lviewAdapter = new ListViewAdapter(this,datas); lview.setAdapter(lviewAdapter); If you want to clear the ListView later before add new items, use the following: lviewAdapter.setNotifyOnChange(false); lviewAdapter.clear(); lviewAdapter.addAll(model.getItems()); lviewAdapter.notifyDataSetChanged(); Update

Categories : Android

How to position a container view so it's the same distance from top of screen on iPhone 4 & iPhone 5?
If you're using layout constraints, just give the container view a fixed constraint to the top and bottom of the main view, and no fixed height. This will cause the view to expand and contract depending on the screen size. Depending where your scroll view is, one of the constraints might have to be to it, rather than the top or bottom of the screen (So, if the scroll view were on top, it would have a constraint to the top, a fixed height, and a spacing constraint to the container view below it. The container view would then just need one to the bottom of the superview).

Categories : IOS

VB.NET Grid view with variable button text
I would use a TemplateField with a real Button control and RowDataBound for your logic: aspx: <asp:GridView ID="GV_DataByGroupAct" runat="server" AutoGenerateColumns="False"> <Columns> <asp:BoundField DataField="Name" HeaderText="Name" /> <asp:BoundField DataField="Age" HeaderText="Age" /> <asp:BoundField DataField="Hight" HeaderText="Hight" /> <asp:TemplateField> <ItemTemplate> <asp:Button ID="BtnYoungOld" runat="server" Text="Young/Old" /> </ItemTemplate> </asp:TemplateField> </Columns> </asp:GridView> codebehind: Private Sub GV_DataByGroupAct_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GV_DataByGroupAct.RowD

Categories : Vb.Net

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

R: quote any text or expression in R
I would suggest something like: foo <- function(){ readLines(n=1) } z <- foo() SELECT * FROM DATA LIMIT 100 z #[1] "SELECT * FROM DATA LIMIT 100" But, it's hard to say without context.

Categories : String

Cannot read single quote and double quote character and some of the characters around it in PDFBOX
Possibly there is a more standard approach for extracting font from pdf, as described in the answer to this post: How to extract font styles of text contents using pdfbox? And basic text extraction is described in the pdfbox wiki: http://pdfbox.apache.org/cookbook/textextraction.html

Categories : Java

Fixing column "columnname" does not exist pgsql in database. Double quote vs single quote error
No you can't. If you had used proper insert - with named columns: insert into review (column1, column2, column3) values (....) then it could be theoretically possible to do by adding column "exist" and a trigger. But this would be very far away from being sane solution.

Categories : Postgresql

Finding the text between first and last quote of a line
This should work for all cases where there are quotation marks in the input: var parsed = $('textarea').val().replace(/^[^"]*"(.*)"[^"]*$/, '$1'); Or without regex: var ta = $('textarea').val(); var parsed = ta.substring(ta.indexOf('"') + 1, ta.lastIndexOf('"')); To put this in context with your code above: $('#desqlize').on('click', function(){ var lines = $('textarea').val().split(' '); var total = "" $.each(lines, function(){ var enteredText = String(this); total = total + enteredText.replace(/^[^"]*"(.*)"[^"]*$/, '$1') + ' '; // or, alternatively: // total = total + enteredText.substring(enteredText.indexOf('"') + 1, enteredText.lastIndexOf('"')); }) $('textarea').val(total); });

Categories : Javascript

how to clear text view when i click on button in android programing
//try this @Override public void onClick(View arg0) { txt.setText(""); if(chkFirst.isChecked()){ txt.setText(txt.getText().toString()+" "+chkFirst.getText().toString()); } if(chkSecond.isChecked()){ txt.setText(txt.getText().toString()+" "+chkSecond.getText().toString()); } if(chkThird.isChecked()){ txt.setText(txt.getText().toString()+" "+chkThird.getText().toString()); } }

Categories : Android

Prevent Quote Detail editing but allow the revision of the Quote itself
Register on the Pre Create message (stage 20) of QuoteDetail and filter on the parent context not being for Quote. If it is, just return (effectively doing nothing). The same applies to the Update message of the QuoteDetail. Both messages run in the context of the ReviseQuote message for Quote. var parentContext = context.ParentContext; // While there is a parent context... while (parentContext != null) { // When parent context is for "quote", return; if (parentContext.PrimaryEntityName == "quote") { return; } // Assign parent's parent context to loop parent context. parentContext = parentContext.ParentContext; }

Categories : C#

Selecting Node with specific text that have a quote in them
The single quote is causing the problem, you need to escape it somehow in your xpath or use double quotes, this should work instead node = self.productDoc.xpath("/product[name/value[text() = "{0}"]]".format(self.Title))

Categories : Python

Remove text thats inside [quote] tags
If you don't need to support nested codes then you can use a regular expression. Look at preg_replace. If you do need to support nested codes then you can write a simple parser. I'd Dave Chen would recommend looking at bbcode_create as well.

Categories : PHP

Scrolling a table view with text fields when "Next" return button in keyboard
This isn't a safe way of getting the cell: id firstResponderCell = textField.superview.superview ; I.e. It might work now but it might not work in the (near) future. Once you know the index path you should check that it actually exists. Then you can use scrollToRowAtIndexPath:atScrollPosition:animated: to scroll the row (and make it the top row). Alternatively you can get the frame of the row and then set the contentOffset of the table view.

Categories : IOS

iphone table view two column custom view the second custome not show image
cell = [[UITableViewCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:secondIdentifier]; if (cell == nil) { cell.selectionStyle = UITableViewCellSelectionStyleNone; } FunBoxView * boxView = [[[FunBoxView alloc]initWithFrame:CGRectMake(0.f, 0.f, cell.frame.size.width * 2 / 3, height)]ah_autorelease]; boxView.tag = HOMETAGBASE ; [boxView addTarget:self action:@selector(buttonClickedAction:) forControlEvents:UIControlEventTouchUpInside]; [cell.contentView addSubview:boxView]; FunBoxView * second = [[FunBoxView alloc]initWithFrame:CGRectMake(cell.frame.size.width * 2 / 3, 0.f, cell.frame.size.width / 3, height)]; second.tag = HOMETAGBASE + 1; [second addTarget:self action:@selector(buttonClickedAction:) forControlEvents:UIControlEven

Categories : Iphone

Ormlite exception with single quote in text using LIKE query
Ok, I figured this out- I need to use the SelectArg method of querying the database. So it now looks like this: ... if (Strings.isValid(name)) { SelectArg arg = new SelectArg () ; // Added arg.setValue (name) ; / Added where.like("name", arg) ; // Changed } if (Strings.isValid(regNo)) { if (Strings.isValid(name)) where.or() ; SelectArg arg = new SelectArg () ; // Added arg.setValue (regNo) ; // Added where.eq("regNo", arg) ; // Changed List<Company> res = where.query() ; if (res != null && res.size() > 0) return true ; else return false ; ... What I've learned is this: you must use one Se

Categories : Misc

Compile pattern quote inside quote
Escape your quotes: Pattern myPattern = Pattern.compile("<div class="thumb"><a href=(.*?)-t1"); Also, regex against HTML is usually considered to be bad practice.

Categories : Java

php: how does single quote and double quote work together
PHP strings quoted with " characters interpolate variables and treat ' characters as literals. $name_bar is a string that contains ' characters. When it is interpolated, all the characters in it are placed where the variable was.

Categories : PHP

single quote or double quote in javascript
:contains("topic") this search for elements that contains "topic" string where as var topic = "community"; :contains(topic) topic here becomes "community"..so it searchs for element that contains "community"; well for this :contains("' + topic + '") i guess the code is incomplete.. $('div:contains("' + topic + '")')..; //div for example sake this becomes $('div:contains("community")')..; //<-- just to make sure the string is encoded with `""`

Categories : Javascript

How to pass image from one View to Previous view from Gallery in iPhone?
In your AddprileViewController.h file create UIimage object as UIImage *_gImage; and set property as @property (strong, nonatomic) UIImage *_gImage; in .m file synthesize this object @synthesize _gImage; set image in _gImage object - (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingImage:(UIImage *)image editingInfo:(NSDictionary *)editingInfo { self.imageView.image = image; //add image in globle object _gImage = image; [picker dismissViewControllerAnimated:YES completion:nil]; } in your MprofileViewController.m - (void)viewWillAppear:(BOOL)animated { if(!Avc) { Avc = [[AddProfileViewController alloc]initWithNibName:@"AddProfileViewController" bundle:nil]; } if (Avc._gImage != nil) { image2.image=Avc._gImage; } else { image2.image=[UII

Categories : Iphone

add a tabbed view as a main view to a navigation-based iphone app
So you actually need a UITabBarViewController in the Storyboard and you can point to the UINavigationController if you want the ability to push other controllers. You don't need other UINavigationControllers as I saw in your screenshot, as long as the rootviewcontroller is an UINavigationController. You can add the UINavigationController as first of the tabs and then you can go and fill the other tabs with the viewcontrollers that you need displayed. SO basically you need to create UITabBarController as rootviewcontroller. Let me know if I understood your question correctly. Here is an example of UITabBarController : - (void)applicationDidFinishLaunching:(UIApplication *)application { //Here you set your controller UIViewController* centerController = [[UIViewController alloc]init

Categories : IOS

Determine a view in a specific view in iphone
You could use the tag on the button. Or look at the superview of the button. Or associate another object with the button (objc_setAssociatedObject). There are many possibilities.

Categories : Iphone

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

Copying single iPhone view controller to iPad view controller gives lock icon/ doesn't work
@koregan's advice has worked for me. 1) Duplicate your iPhone-Storyboard and rename it MainStoryboard_iPad.storyboard 2) Open this file any text editor. 3) Search for targetRuntime="iOS.CocoaTouch"and change it to targetRuntime="iOS.CocoaTouch.iPad" 4) Now save everything and reopen Xcode -> the iPad-Storyboard contains the same as the iPhone-file but everyting could be disarranged

Categories : IOS

Backbone appends to list view instead of replacing it
You need to clear out your collectionView's $el! :) addAll: function(){ this.$el.empty(); this.collection.forEach(this.addOne, this); } This should do the trick.

Categories : Backbone Js

Replacing View with SurfaceView to draw on other than the UI Thread
There you go public class MySurfaceView extends SurfaceView implements SurfaceHolder.Callback { ... class MyThread extends Thread { boolean update = false; @Override public void run() { SurfaceHolder surfaceHolder = holder; while (!done) { if(update) { Canvas canvas = surfaceHolder.lockCanvas(); canvas.drawARGB(255, 0, 0, 128); canvas.drawCircle(x, y, 5.0f, paint); surfaceHolder.unlockCanvasAndPost(canvas); update = false; } } } } public void requestUpdate() { update = true; } } and whenever something is changed, just call requestUpdate();

Categories : Android

Replacing text in tag which contains an
Well, that's because you replace the whole content of the a tag. Try somehting like this: $(function(){ var selectCount = 0; $("#bin").click(function(){ selectCount++; $(this).html('<i class="icon-trash"></i> Remove Selected ('+selectCount+')'); }); }); Fiddle: http://jsfiddle.net/FZWyj/18/

Categories : Javascript

Replacing a radio button with a image with CSS that works in Firefox?
I hope this works for you. Note that the :checked pseudo class only works in modern browsers. If you want to support older browsers, you'll need a little bit of JavaScript for example to toggle a class. .custom-radio > input { /* hide the real <input> element */ position: absolute; left: -9999px; } .custom-radio > .real-label { /* and use a background image on a <span> instead */ display: inline-block; height: 402px; width: 275px; background: url("hobbit.jpg") left center no-repeat; /* just as an example as I did not have your image */ border: 2px solid red; /* hide the label if you want */ text-indent: -9999px; } .custom-radio > input:checked + .real-label { background-image: url("select.jpg"); /* again, just

Categories : CSS

Replacing [+] View list of options I selected using Jquery
yes try something to the effect of $("a").click(function(){ $(this).html(this.id); }); it's simplest if you just add id's, otherwise you would replace the this.id, with something a lot more complicating.

Categories : Jquery

Replacing UIViews when screen rotates in the same View Controller
The usual way to do this is to have a different view controller for horizontal and present that view controller from your vertical VC with a cross-fade. There's more info about this in the View Controller Programming Guide under "Creating an Alternate Landscape Interface".

Categories : IOS

AngularJS: append partial instead of replacing current view
To give you a rough idea: Given your app is in angularjs, you should be having all your questions inside a model in a controller: $scope.questions = [ { "question":"foo?", "options":["bar1","bar2","bar3","bar4"] "answer":2 }, { }, { } ]; // initially show the 1st question $scope.currentQuestIndex = 0; $scope.currentQuestion = $scope.questions[$scope.currentQuestIndex]; And use the currentQuestion inside your view as: <div>Question: {{currentQuestion.question}}</div> When the user selects a correct answer, you could simply update the current question: $scope.submitAnswer = function(){ // check if the answer is correct if(isCorrect){ $scope.currentQuestion = $scope.questions[$scope.currentQuestIndex + 1];

Categories : Angularjs



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