w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Changing url with RewriteRule does not replace the url and redirects my page
Try this code: Options +FollowSymLinks -MultiViews # Turn mod_rewrite on RewriteEngine On RewriteBase / RewriteCond %{THE_REQUEST} ^[A-Z]{3,}s/+(store)/index.php?categ=([^s]+) [NC] RewriteRule ^ /%1/%2? [R=302,L] RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^store/(.+?)/?$ /store/index.php?categ=$1 [L,QSA,NC] Once you verify it is working fine, replace R=302 to R=301. Avoid using R=301 (Permanent Redirect) while testing your mod_rewrite rules.

Categories : PHP

data not posting after changing the .htaccess
This rule: RewriteCond %{THE_REQUEST} ^[A-Z]{3,}s([^.]+).php [NC] RewriteRule ^ %1 [R,L] Is causing your POST request for view_images.php to be redirected to view_images, and thus you lose the request body (all of your POSTed data). You don't want to cause this redirect, so don't POST to the view_images.php URL. Remove the .php part so that it won't redirect: <form method="post" id="form" action="view_images"> <input type="text" name="img" value="images/1.jpg" id="img_name" /> <input type="submit" id="submit" value="submit" /> </form>

Categories : PHP

Dynamically changing background color of specific text without changing other attributes
Give your selected span a specific namespaced classname like <span class="gs-text-selected"> or whatever, then write CSS that targets that. You might have to add !important to your styles if you get cascade issues, but be careful with !important.

Categories : Javascript

Changing absolute positioned text div through jQuery, without changing it's position
I would start with this: #block_contact { position: relative; } Any absolutely positioned child elements will start from the top-left corner of #block_contact, instead of the top-left corner of the window. Try it and see if it fixes anything, I don't have any other ideas.

Categories : Jquery

backbone js raw text posting
var clientslist = new ClientsList(); clientslist.fetch({ data: JSON.stringify({ uid: 19, pn: 0 }), type: 'POST', dataType: 'json', contentType: 'application/json', processData: false });

Categories : Javascript

Warning after posting text on twitter wall
You don't show enough code, but probably the response of your request is returned on a background thread and you're directly trying to update the UI. You can't do that. You need to switch back to the main thread once you have received the response and before you update the UI.

Categories : Iphone

Posting images & text to Timeline using Facebook SDK
Try this, FBRequestConnection *connection = [[FBRequestConnection alloc] init]; NSMutableDictionary *dictionary = [NSMutableDictionary dictionary]; [dictionary setObject:UIImagePNGRepresentation(_image) forKey:@"picture"]; if (message) { [dictionary setObject:message forKey:@"message"]; } FBRequest *request = [FBRequest requestWithGraphPath:@"me/photos" parameters:dictionary HTTPMethod:@"POST"]; [connection addRequest:request completionHandler:^(FBRequestConnection *connection, id result, NSError *error) { }]; [connection start];

Categories : IOS

POSTing text contents as if it were coming from a "file" input
Simple enough: As soon as a file get's posted, you will get a POST_DATA field as actual post data. This is how POST_DATA looks: -----------------------------278642518110014 Content-Disposition: form-data; name="usrname"; filename="SuperEngine.ncp" Content-Type: application/octet-stream CONTENT Where: 278642518110014 = Timestamp in milliseconds name="usrname" = name of html form field (the textbox in your case) filename="SuperEngine.ncp" = name of the file (can be made up!) CONTENT = raw data of file (content of textbox in your case) Construct this post data with jQuery and your server will think that you posted this data with an input type=file field.

Categories : Jquery

how to set text uneditable when posting on facebook using SLComposeViewController in iphone
If you are using SLComposeViewController, there is no API to disable the text from being editable by the user. You can set initial text but ultimately user can still edit the text as he wants to. The SLComposeViewController class presents a view to the user to compose a post for supported social networking services. ... Set the initial content before presenting the view controller to the user. All the methods that set the content of a post return a Boolean value. They return NO if the content doesn’t fit in the post or if the view controller has already been presented to the user. You must set all of the content in the post before presenting the view controller to the user. After presenting the view controller, only the user can edit the post. Please take a

Categories : Iphone

Changing text of UIButton titleLabel during alpha is 0.0f and avoid animation of text
Try like this : [UIView animateWithDuration:1.0 animations:^{ button.titleLabel.alpha:0.0f; } completion:^(BOOL finished){ button.titleLabel.text = @"Changed text"; } ]; [UIView animateWithDuration:1.0 animations:^{ button.titleLabel.alpha:1.0f; } ];

Categories : IOS

Tooltip text changing depending on which words are moused over in text box?
Override getToolTipText(...). Simple example: import java.awt.*; import java.awt.event.*; import javax.swing.*; import javax.swing.*; import javax.swing.plaf.*; import javax.swing.UIManager.*; public class ToolTipPanel extends JPanel { public ToolTipPanel() { setPreferredSize( new Dimension(200, 200) ); setToolTipText(""); } public void paintComponent(Graphics g) { g.setColor( Color.red ); g.fillRect(0, 0, 100, 200); g.setColor( Color.blue ); g.fillRect(100, 0, 100, 200); } public String getToolTipText(MouseEvent e) { if (e.getX() < 100) return "red"; else return "blue"; } public Point getToolTipLocation(MouseEvent e) { Point p = e.getPoint();

Categories : Java

Changing the text size of text in strings.xml
You can make use of Html.fromHtml("your html string"), to do any style you want in HTML and then show it in the textview as shown below: Spanned htmlText = Html.fromHtml(getString(R.string.yourStringResource)); yourTextView.setText(htmlText, TextView.BufferType.SPANNABLE); And the XML string.xml, must have the string declared as shown below: <string name="yourStringResource"><![CDATA[BLA BLA BLA BLA <br/> BLABA <font color="blue">COLORED HTML</font>]]></string> Regards!

Categories : Android

Changing text in a .txt file using c#
If I understand your problem correctly you need to move the File.WriteAllText(Server.MapPath("~") + "/App_Data/tuitterUsers.txt", newPasswordArray); outside the loop, otherwise you rewrite the file at each loop, but this is not enough, you need also to rebuild the Whole text file string fileToWrite = string.Join(Environment.NewLine, newPasswordArray); File.WriteAllText(Server.MapPath("~") + "/App_Data/tuitterUsers.txt", fileToWrite); EDIT: After the code update and the comment below The looping is totally wrong as well the rebuilding of the array string userDataFile = Server.MapPath("~") + "/App_Data/tuitterUsers.txt"; string[] userDataArray = File.ReadAllLines(userDataFile); for(int x = 0; x < userDataArray.Length; x++) { string[] info = userData[x].Split(' '); if(Se

Categories : C#

Changing text in splashscreen
If it needs to change every X seconds, then use a Timer. Change the .Text property of the label: Dim iLoadText As Integer = 0 Private Sub Timer1_Tick(sender As Object, e As EventArgs) Handles Timer1.Tick Timer1.Enabled = False Label1.Text = LoadingTexts(iLoadText) Label1.Refresh() iLoadText += 1 If iLoadText < LoadingTexts.Length Then Timer1.Enabled = True End Sub

Categories : Vb.Net

JButton text not changing
The reason is that no paint event is processed before your job is completed, so the effect of the setText won't show when you think it will. repaint() only promises to repaint "as soon as possible" (per the docs), but since paint events are processed on the same thread as button click events (the "Event Dispatch Thread"), your processing effectively causes the setText call and panel hiding/showing to occur at the same time (so to speak), after the job is done. The effect of blocking the EDT with data crunching jobs is obvious if your job takes a noticeable amount of time - the UI will become completely unresponsive since the EDT doesn't have any opportunity to repaint, process resize/mouse click events, etc. Heavy processing should be done in background threads, preferrably by the aid

Categories : Java

NavigationBar text colour not changing?
Use this to do related Navigationbar title changes: - (void)viewDidLoad { [super viewDidLoad]; // Here you can set View width and height as per your requirement for displaying titleImageView position in navigationbar UIView *backView =[[UIView alloc] initWithFrame:CGRectMake(0, 0, 200, 40)]; [backView setBackgroundColor:[UIColor clearColor]]; UILabel *titleLbl = [[UILabel alloc]initWithFrame:CGRectMake(45, 5, 180,30)]; [titleLbl setFont:[UIFont fontWithName:@"Arial-BoldMT" size:18.0f]]; [titleLbl setText:@"Review Her"]; titleLbl.backgroundColor=[UIColor clearColor]; [titleLbl setTextColor:[UIColor colorWithRed:0/255.0f green:136/255.0f blue:230/255.0f alpha:1.0f]]; [backView addSubview:titleLbl]; self.navigationItem.titleView = backView; }

Categories : IOS

Changing text on each page load
If you don't care about the order, try: var textToShow = ['text1', 'text2', 'text3', 'text4'] $(document).ready(function() { $("h4").html(textToShow[Math.floor(Math.random()*textToShow.length)]); }); Here is a fiddle: http://jsfiddle.net/JZDnv/ Keep clicking 'run' to get different things.

Categories : Jquery

CATextLayer changing text fast
Bitmap Fonts are probably the best way to solve this problem, as they're far and away more performant than anything else in terms of font drawing for something of this nature. But you need to pre-render them to the scale you desire to get the best out of them both visually and in terms of performance. And you might be best off using Sprite Kit, as it has native handling of them. Here's a github repo with a useful thing to make it easier to use rendered bitmaps from a common tool for creating them: https://github.com/tapouillo/BMGlyphLabel

Categories : IOS

seek bar changing text size
replace setTextSize(float size) with setTextSize(int unit,float size) and use TypedValue.COMPLEX_UNIT_PX for the unit float fs = prefs.getFloat("fontsize", 12); seekbar.setProgress((int)fs); //edittext.setTextSize(seekbar.getProgress()); edittext.setTextSize(TypedValue.COMPLEX_UNIT_PX,seekbar.getProgress()); and don't forget onProgressChanged: //edittext.setTextSize(progress); edittext.setTextSize(TypedValue.COMPLEX_UNIT_PX,progress);

Categories : Android

Changing element text isn't working
It's because you're searching the document of the window which shows the index.html, not the document of the newly opened window. try following: ... var editorWindow = window.open('PostEditor.html', 'newwindow', 'width=350,' + 'height=350'); editorWindow.document.getElementById("para1").innerHTML = "11111111111"; ... EDIT: NOW i see the problem: in the function you're trying to access a property of the parameter element, but you don't pass a value for it. So this will end in an error because the accessed object is undefinded! So you have three options to get it working: test the parameter (always a good idea): var ID = null; if(element) ID = element.id; pass a value: <a onclick="postEditing(this)"> Edit</a> remove the line var ID = element.id; SOLUTI

Categories : Javascript

changing text color of an xamdatagrid
You can define a property in the ViewModel which based on the conditions decides whether to set the foreground color for a row. <DataTrigger Binding="{Binding IsRowValid}" Value="True"> <Setter Property="TextElement.Foreground" Value="Red"/> </DataTrigger>

Categories : C#

Changing the text color in MPMoviePlayerController
You can use the appearance delegate to change various attributes of various classes, including the text color.

Categories : IOS

pynotify linux changing the text
Use Notification.update pynotify.init("app_name") n = pynotify.Notification("", "message A", icon='some_icon') n.set_urgency(pynotify.URGENCY_CRITICAL) n.set_timeout(1000) n.show() n.update("","message B") n.show()

Categories : Python

Bookmarklet not changing text in textbox
Wrap the code to execute into a function-call: <a href="javascript:void(function(){var boxes= $(':text, :password');var selectionBox = $(':password');selectionBox.val('password');for(var i = 0; i < boxes.length;i++){if(boxes[i] == selectionBox[0]){boxes.eq(i-1).val('login');}}}())">Password box highlighter</a> Explanation: void expects an expression(only 1 expression). An expression is any valid unit of code that resolves to a value Your code already breaks with the first var-keyword, because declaring a variable is not an expression. When you wrap the code into a function-call, the expression is the function-call itself, no matter which code will be executed inside the function.

Categories : Javascript

Span text not changing on hover
At first, your CSS selectors are incorrect. The x > y selector only selects direct children. Both span.letter and div.links are no direct children of #celebrity-list so will not be selected by these selectors. The ">" may be removed in this situation. Next to that, an ID should always be unique. This is not working at all: #celebrity-list > div .links:hover #celebrity-list > div span.letter{ color: #b43838; } You are trying to select span.letter, as a child of a div, as a direct child of #celebrity-list, as a child of .links:hover, as child of a div, as direct child of #celebrity-list. If you want to change span.links text color you should put this element after the div#links and select it as follows: div.links:hover + span.letter { /* your CSS */ } Another option is to p

Categories : CSS

Changing button text and ID by clicking on it
I don't think you want to change the id of the Button. What it looks like you are doing is having a Button that starts play then turns to pause while playing. Simply have the two Buttons in the same space in your xml. Start with the visibility of the pause Button as gone then check the visibility in the function. Something like public void onClick(View v) { switch(v.getId()){ case R.id.btn_start_again: mPlayer.stop(); btnPause.setVisibility(View.VISIBLE); btnPlay.setVisibility(View.GONE); break; case R.id.pause: btnPause.setVisibility(View.GONE); btnPlay.setVisibility(View.VISIBLE); break; } Button Docs

Categories : Android

Changing content of DOM text node
Best method I can think of off the top of my head is to use the substring method for Strings. var s = obj.innerText // Then On backspace event listener s = s.substring(0, s.length - 1) // returns s without the last character in the original string. obj.innerTezt(s) // set the inner HTML back to s Edit: thanks Jonathan, Dennis for the correction on this answer!

Categories : Javascript

Changing the text of a hyperlink in asp.net on click?
<asp:hyperlink ... is not a valid type of control since .NET is case sensitive. Try changing it to: <asp:HyperLink ... I would also get rid of the code in your page load event.

Categories : C#

Changing Command Prompt Text Size C++
You can use the CONSOLE_FONT_INFOEX struct to specify the parameters of the text/formatting of your command prompt writes. For more information, click here. Extract from above link. here's a full example. I can't say if it works, because apparently functions Get/SetCurrentConsoleFontEx are only available in windows vista and later. #include <iostream> #include <windows.h> int main(){ HANDLE outcon = GetStdHandle(STD_OUTPUT_HANDLE);//you don't have to call this function every time CONSOLE_FONT_INFOEX font;//CONSOLE_FONT_INFOEX is defined in some windows header GetCurrentConsoleFontEx(outcon, false, &font);//PCONSOLE_FONT_INFOEX is the same as CONSOLE_FONT_INFOEX* font.dwFontSize.X = 7; font.dwFontSize.Y = 12; SetCurrentConsoleFontEx(outcon,

Categories : C++

read and write text and changing at only one column
package stackoverflow; import java.io.BufferedReader; import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStreamReader; import java.io.OutputStreamWriter; import java.io.PrintWriter; import java.io.Reader; import java.io.Writer; public class TipChange { private static String inputPath = "input.csv"; private static String outputPath = "output.csv"; private static BufferedReader bufferedReader; private static PrintWriter printWriter; public static void main(String[] args) { try { FileInputStream inputStream = new FileInputStream(inputPath); Reader reader = new InputStreamReader(inputStream, "UTF-8"); bufferedReader = new BufferedReader(reader); FileOutputStream outputStream = new FileOutputS

Categories : Java

changing text color globally with new style
I was close, just a typo but as I was unable to find an answer to this on the web and found lots of people asking I thought I would document exactly what ended up working. This did not work for the cases where I had hard coded a color but I would not expect that to happen. This did change all the default text colors. AndroidManifest was modified like this: <application android:icon="@drawable/ic_launcher" android:label="@string/app_name" android:theme="@style/CustomTheme" > And the file res/values/styles.xml looks like this: <?xml version="1.0" encoding="utf-8"?> <resources> <style name="CustomTheme" parent="android:Theme.Black"> <item name="android:textColor">#ffff00</item> </style> </res

Categories : Android

Changing label's text in another view controller
One of the most common ways to do this is to create a sharedInstance class where you can store the value no matter what controller you are in and then read from it when the controller you want is displayed. A good example: Question regarding SharedInstance A decent tutorial here: http://iphonedevsdk.com/forum/iphone-sdk-tutorials/24135-singleton-classes.html You can also use prepareForSegue:sender: And there are plenty of examples on Stackoverflow for this.

Categories : Objective C

Changing Text Value of JLabel In Real Time
Make the JLabel final (and declare before the button) or an instance member. It will then be accessible from within the inner class. eg final JLabel searchedstock = new JLabel(stockvalue); search.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e){ String stockvalue = Double.toString(getstocks(symbolsearch.getText())); searchedstock.setText(stockvalue); } });

Categories : Java

Changing KineticJS text color on mouseover
Assuming you've instantiated the menuTab and layerMenu objects correctly, the following code should enable you to manipulate the menuTab color on hover: <script src="path/to/kinetic.js"></script> <script defer="defer"> var menuTab = new Kinetic.Rect({...}); var layerMenu = new Kinetic.Layer(); menuTab.on('mouseover', function() { this.setFill('white'); layerMenu.draw(); }); menuTab.on('mouseout', function() { this.setFill('#BB9999'); layerMenu.draw(); }); </script>

Categories : Javascript

Flash - Text changing after chaning frame
Flash timelines are kind of like a static state machine; moving from frame-to-frame runs all of the document code at that frame (every time). It also resets the value of the content to the state it was in during design time (so, frame = design + code). Because of the headaches this model can cause, I highly recommend you do all of your design & code in a single frame. Changing the appearance programmatically is easy enough, though. Use TextFormat and apply it to your TextField with setTextFormat. // Create the textfield var txt:TextField = new TextField(); txt.text = "Sample Text"; addChild(txt); // Create the formatting var format:TextFormat = new TextFormat(); format.font = "Verdana"; format.color = 0xFF0000; format.size = 10; format.underline = true; // Apply the format to th

Categories : Actionscript

Changing TextView text in an Android Widget
You can't get the values of views from your widget. You can update TextView of the widget by using RemoteViews remoteViews.setTextViewText(R.id.text_view_id, "Your text");

Categories : Android

Text box value is not updated in ViewModel when changing in the view in WPF
Your bindings and setups seems ok with the code you have provided. You should note that the default UpdateSourceTrigger of the TextBox is LostFocus, so that your property is only updated when the TextBox lost focus. You can change the UpdateSourceTrigger to PropertyChanged, so that every time Text is written in the TextBox your property gets updated. You set up the UpdateSourceTrigger in the binding as follows <TextBox Text="{Binding Path=InstallPath, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"/>

Categories : Wpf

Changing a navigation text with .replaceWith and keep it persistent
JQuery is written in javascript, and javascript runs on the client computer -- not on the server. If you want something to persist after the page is reloaded or changed, you either need to store those values on the client side (with javascript cookies) or on the server. I would look into jstorage if you want something easy: http://www.jstorage.info/

Categories : Jquery

changing text of custom navigation bar item
UIImage *image = [UIImage imageNamed:@"myimg.png"]; UIButton *backButton = [UIButton buttonWithType:UIButtonTypeCustom]; [backButton setBackgroundImage:image forState:UIControlStateNormal]; [backButton setTitle:@"Edit" forState:UIControlStateNormal]; [backButton setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal] backButton.frame=CGRectMake(0, 0, 35.0f, 35.0f); UIBarButtonItem *barButton= [[[UIBarButtonItem alloc] initWithCustomView:backButton] autorelease]; self.toolbar.items = [NSArray arrayWithObject:barButton];

Categories : IOS

Can't resize DIV with jquery after changing text inside the DIV
The resizable function adds some markup on your div (you can inspect it using firebug). When you replace the text, that markup is lost, so your div loses the ability to get resized. You should call the resizable function again after you change the text.

Categories : Jquery



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