w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Server.MapPath returning a path with a folder that doesn’t exists
I don't believe MapPath guarantees that a path exists, it just tacks your virtual path to the context path. I think your problem is that you're using HttpContext.Current.Server.MapPath try using HttpContext.Current.Request.MapPath

Categories : Dotnet

How do I fix error TS1015: Parameter cannot have question mark and initializer?
If you look in the TypeScript Language Specification document you can find a wealth of detail about the language syntax. Section 3.7.2 describes call signatures i.e. the syntax used to call functions and constructors etc. Section 3.7.2.2 is specifically about the parameters associated with a call. It defines optional parameters as: PublicOrPrivateopt Identifier ? TypeAnnotationopt PublicOrPrivateopt Identifier TypeAnnotationopt Initialiser We can see see that either using '?' OR providing a default value will mark the parameter as being optional. So to fix the compiler error you can simply remove the '?' and leave the default value and it will remain as an optional parameter as you intend.

Categories : Typescript

Akka in Scala, exclamation mark and question mark
Shamelessly copied [awesome] official doc (look Send messages section for more): Messages are sent to an Actor through one of the following methods. ! means “fire-and-forget”, e.g. send a message asynchronously and return immediately. Also known as tell. ? sends a message asynchronously and returns a Future representing a possible reply. Also known as ask.

Categories : Scala

500 internal server error on asp.net page caused probably by server.MapPath
The problem is you're trying to save to the App_Data folder - this folder is only available to actual code. You cannot write to it by default, you also cannot output its contents to your website. The App_Data is specifically meant for Data only - such as XML & Database files - see here for more info: MSDN App_Data folder So, even if you managed to save a file into app_data you would not be able to display it - you would receive an unauthorized access error message. To fix, change this: HttpContext.Current.Server.MapPath("~/App_Data/setP") to something like this HttpContext.Current.Server.MapPath("~/uploadImages/setP") Essentially give yourself a different folder to upload to. Update Following from the comments it seems you are getting the A Generic error occurred in GDI+...

Categories : Asp Net

Flowplayer question mark
A question mark URL encodes as %3F. But you should use a proper encoder for the whole thing rather than manually encoding a specific character. Depending on the server-side technology you're using to build the Urls, tyhere should be a function like UrlEncode() which should handle all this for you. Failing that, Javascript has encodeUriComponent()

Categories : Misc

How to match a question mark?
Use quotemeta for the regex pattern. use warnings; use strict; my $search = quotemeta 'http://shorturl.com/detail.cfm?color=blue'; my $replace = 'http://shorturl.com/detaila.aspx?color=red'; my $file = '<a href="http://shorturl.com/detail.cfm?color=blue" class="news">HI</a>'; $file =~ s/$search/$replace/gis; print $file; __END__ <a href="http://shorturl.com/detaila.aspx?color=red" class="news">HI</a>

Categories : Regex

C++ spanish question mark
this character is simply not included in basic ascii. Try using wstring http://www.cplusplus.com/reference/string/wstring/

Categories : C++

Can't read a file that contains a question mark in name
As long as the file exists, there is no problem opening a file like this: folder_file = './temp directory/file-?.txt' File.open(folder_file, 'r').close This works fine. See Tin Man's suggestion about how to actually open the .tif file. As you can see, I created the following file myster-file_char?.txt $: ls get_listing.rb myster-file_char?.txt You can get this stored in a variable, though I only use Dir.glob here to view it. puts Dir.glob("**.*").inspect Everything is now revealed in what character it is. Though I should be able to use it directly as is to open and edit the file in Ruby. Though like The Tin Man stated, you are asking about a binary file. $: ruby get_listing.rb ["myster-file_charu0016.txt", "get_listing.rb"] The character that is actually there is a CTRL

Categories : Ruby

hr content shows question mark
The probable explanation is that although the HTML document is declared to be UTF-8 encoded, it actually isn’t. It might be windows-1252 encoded, and when the windows-1252 encoded representation of “§” is encountered when processing presumed UTF-8 data, it constitutes a character data error. A common, and recommended, way in which browsers indicate the error is “�” REPLACEMENT CHARACTER. To fix this, make sure the declared and actual character encoding match. It is less relevant which encoding you use, but other things being equal, it is best to use UTF-8. So you would need an editor or other authoring tool that can actually save the data as UTF-8 encoded. If you absolutely cannot fix the encoding issue, replace "§" in CSS by the escape notation "A7". Much less readable, bu

Categories : HTML

mod rewrite question mark and ampersands
I think the issue here is that in your RewriteRule you're trying to match a part of the query string, which isn't possible. If I understand your problem correctly, you want requests to http://example.com/category/general?type=pages&v=1 to be interpreted by the server as http://example.com/category.php?c=general&type=pages&query=1? To match a query string, you need to prefix your rule with a condition. The following should work: RewriteCond %{QUERY_STRING} type=([^&]+) RewriteCond %{QUERY_STRING} v=([^&]+) RewriteRule ^category/([^/]+) /category.php?c=$1&type=%1&query=%2 The first two lines are pre-conditions that state that the requested URL needs to have both type= and v= as part of the query string. The final line rewrites the request. This means that

Categories : PHP

.htaccess rewrite URL with a question mark "?"
RewriteRule ^component/users/?view=registration$ registration.html$ [R=301,L] You need a because ? is part of a regular expression. To Use it as a string u need to escape it with a Linktip: http://ole.michelsen.dk/tools/regex.html

Categories : Htaccess

Check if last character is a question mark
if (substr(rtrim($link), -1) != "?") { // Do stuff } Giving a negative start value to substr() makes it count from the end instead of the beginning.

Categories : PHP

R - how does the "question mark" function works?
You can make functions and variables with arbitrary names, via use of the backtick `. `~` <- `+` y <- 5 x <- 10 y ~ x # 15 I wouldn't mess with ~ though, unless you don't intend to do any statistical modelling....

Categories : R

URLRewrite rule for a URL that only contains one value after the question mark
Try this code. Options +FollowSymLinks -MultiViews # Turn mod_rewrite on RewriteEngine On RewriteBase / RewriteCond %{QUERY_STRING} ^([a-z0-9-]+)$ [NC] RewriteRule ^$ /#!/videos:%1? [L,R=301,NE]

Categories : Htaccess

How to remove question mark in a JOptionPane?
Use the PLAIN_MESSAGE message type JOptionPane.showConfirmDialog(null, "Help", "Please Enter X and Y Values", JOptionPane.OK_CANCEL_OPTION, JOptionPane.PLAIN_MESSAGE);

Categories : Java

How to POST question mark to a web service? Objective-c
I tried to do this again some time after I posted this question. Previously, I used a web service that was written by someone else. I suspect it has something to do with some custom escaping character function. This time, I wrote my own web service, and it works perfectly. I don't even need to use the "NSString_URLEncoding"

Categories : IOS

Have an irremovable question mark at the end of html input
You could do this : $('#a').keyup(function(){ var v = this.value.replace(/?/g, '') + '?'; if (this.value != v) this.value = v; }); Demonstration But users don't really like when the content of the input changes of its own. I'd avoid this if possible. This second version puts a space before the ? : $('#a').keyup(function(){ var v = this.value.replace(/ ??/g, '') + ' ?'; if (this.value != v) this.value = v; }); Demonstration

Categories : Javascript

Charset converting to question mark with diamond even though utf-8
These are two questions, so two answers: The only logical answer to your problem displaying �, is that somewhere along the line, you are not correctly storing this as UTF-8 and it did get converted to something else. The second problem, (fatal error in eval()'d code.) You should post the code that's triggering this error and preferably not even use eval for anything remotely important. Especially not dynamic eval() code, which you appear to be doing.

Categories : PHP

htaccess - regex - question mark in address
I have modified your regular expression. I hope that i have understood your challenge correctly. I have also provided a permalink to my test. Both of the URLs you provided in the comments passed. RewriteRule ^(.+)/article/(.+)/(.+).html(.*)$ index.php?content=article&id=$2&alias=$3 [L] Here is a link to my regular expression test.

Categories : Regex

Removing question mark ? from subfolder URL in htacces wp
How about something like this: RewriteEngine On RewriteCond %{THE_REQUEST} ^[A-Z]{3,9} /(.+)?( |$) RewriteRule ^(.*)$ /$1? [L,R=301] You'd put those rules in the htaccess file in your document root.

Categories : Htaccess

301 redirect with ? (question mark) not working in htacces
You can't match against the query string in a Redirect statement, use mod_rewrite and match against the %{QUERY_STRING} var: RewriteEngine On RewriteCond %{QUERY_STRING} ^AddID=1078&Rand=666171759380936096$ RewriteRule ^order/order.html$ http://www.domain.nl/? [L,R=301] But since you have like 8000 URLs that start with the query string ?AddID=, then you can just match against that: RewriteEngine On RewriteCond %{QUERY_STRING} ^AddID=[0-9] RewriteRule ^order/order.html$ http://www.domain.nl/? [L,R=301]

Categories : Htaccess

What does the ? (backslash question mark) escape sequence mean?
? in regex is a quantifier, it means 0 or 1 occurences. When appended to the + or * quantifiers, it makes it "lazy". For example, applying the regex o? to the string foo? would match o. However, the regex o? in foo? would match o?, because it is searching for a literal question mark in the string, instead of an arbitrary quantifier. Applying the regex o*? to foo? would match oo. More info on quantifiers here.

Categories : Objective C

I want to remove question mark & .php extension from the url using .htaccess
How about this? It requires mod_rewrite. RewriteEngine On RewriteRule ^test/([0-9]+)$ test.php?id=$1

Categories : PHP

mapping for question mark for backwards search
Due to the way that the keyboard input is handled internally, this unfortunately isn't generally possible today. Some key combinations, like Ctrl + non-alphabetic cannot be mapped, and Ctrl + letter vs. Ctrl + Shift + letter cannot be distinguished. (Unless your terminal sends a distinct termcap code for it, which most don't.) In insert or command-line mode, try typing the key combination. If nothing happens / is inserted, you cannot use that key combination. This also applies to <Tab> / <C-I>, <CR> / <C-M> / <Esc> / <C-[> etc. (Only exception is <BS> / <C-H>.) This is a known pain point, and the subject of various discussions on vim_dev and the #vim IRC channel. Some people (foremost Paul LeoNerd Evans) want to fix that (even for console Vi

Categories : Vim

How do I create URL's in ASP.NET Web Forms without the question mark for querystrings?
You do not have to convert entire application to MVC just for the sake of pretty URL. You can easily achieve it by using urlrewriter. Something like this in web.config - <rewriter> <rewrite url="~/Product/(d+)" to="~/default.aspx?productID=$1"/> </rewriter> Note: I did not test the above code. I hope you get the idea. If your application uses .Net 4.5, you might also want to look at URL Routing of ASP.Net.

Categories : Asp Net

what does a question mark in a file path mean, like ?/filename
Well, it depends on what matching syntax your shell is using, but glob syntax (see http://en.wikipedia.org/wiki/Glob_(programming)) is relatively standard. In glob syntax, a question mark matches any one character.

Categories : Unix

Rewrite Urls with question mark and ampersand
Ok, assuming the file handling the queries is index.php and foo and bar don't change to something else, you could start like this: RewriteEngine On RewriteBase / RewriteRule ^foo$ foo/ [NC,R] RewriteRule ^foo/$ index.php?foo [NC,L] RewriteRule ^foo/([A-Za-z0-9_-]+)$ foo/$1/ [NC,R] RewriteRule ^foo/([A-Za-z0-9_-]+)/$ index.php?foo&group=$1 [NC,L] Now you should be able to do the bar part on your own! Btw. if you really want your query string to only be ?foo (without a value, like so: ?foo=somevalue) you'll have to check for foo's existence differently than you would for e.g. the somegroup part.

Categories : Htaccess

PHP Regular expression: Get all urls with question mark
Don't try to make everything happen in one regex. Use your existing method, and then separately check the URL that you get back to see if it has a question mark in it. That said, don't use regular expressions to parse HTML. You cannot reliably parse HTML with regular expressions, and you will face sorrow and frustration down the road. As soon as the HTML changes from your expectations, your code will be broken. See http://htmlparsing.com/php for examples of how to properly parse HTML with PHP modules that have already been written, tested and debugged.

Categories : PHP

Regex/Php: Cannot match question mark in live site
try \? instead of ? ; if that doesn't work, you might run a regex engine version which doesnt support negative lookahead. In that case you could reform your preg_replace to preg_replace('/([?&]p=1)([^d])/', '$2', $url) . '<p>'; which would consume the non-digit, but put it back in again. There might be edge cases where this differs from your regex, but I don't think you'd be able to encounter those with urls (and I can't think of any from the top of my head) of course, there are other non-regex solutions to this, but as regex is a very powerful tool, it's always good to learn something about it ;)

Categories : PHP

Documentation of 'Property of class preceded by question mark'
You may check Using Nullable Types and Nullable Types

Categories : C#

MySQL storing double space " " as question mark "?"
Which unicode space character are you talking about? See http://www.cs.tut.fi/~jkorpela/chars/spaces.html Specifically: what character do you intend to upload what character is in your program befoer it uploads what character is in the database what character is displayed on your terminal when you look in the database?

Categories : PHP

Russian character render as question mark in Classic ASP
Firs part: recover from DB When you use aVarWChar, the W is for "Wide", which means that this parameter is an Unicode string. Unicode support all languages without problem, so it's the way to go. When you use aVarChar, the string is encoded in some other way, but not in Unicode (It could depend on the server configuration, or something else. I don't know if you can control it. ASP it's such old technology!!) SO your best bet is to recover Unicode from the DB and let ASP encode it for the browser. Second part: show in ASP page Look at this: Classic ASP: How to write unicode string data in classic ASP? This shows how to get ASP to encode the Unicode string in a way that the browser will show it correctly.

Categories : Sql Server

Escape an access table name containing a question mark with ODBC
As suggested in the comments to the question, apparently the only workaround is to either rename the column in the Access table to remove the question mark, or create a saved query in Access to return the column with a different name, and then run your JDBC operations against the query, not the table.

Categories : Java

Some chars readed as a question mark (?) from a file on java
So you should not use a text oriented API like BufferedReader/PrintWriter but some raw binary API like FileInputStream/FileOutputStream. Because you can't even play with encoding, a SWF file is not a document and contains raw binary data.

Categories : Java

.htaccess rewrite request url starting with question mark
You're doing 2 things wrong: The %{REQUEST_URI} always begins with a slash, so the RewriteCond needs ^/? instead of ^? Change the ^?Itemid=134$ in the RewriteRule to ^.*$. The RewriteRule takes the entire URL as the first argument, not just the Request URI. More information on Apache rewrites can be found here.

Categories : PHP

Regex for matching everything before trailing slash, or first question mark?
Please don't use Regex for this. Use the URI library: require 'uri' str_you_want = URI("http://nytimes.com/2013/07/31/a-new-health-care-approach-dont-hide-the-price").path Why? See everything about this famous question for a good discussion of why these kinds of things are a bad idea. Also, this XKCD really says why: In short, Regexes are an incredibly powerful tools, but when you're dealing with things that are made from hundred page convoluted standards when there is already a library for doing it faster, easier, and more correctly, why reinvent this wheel?

Categories : Ruby

C++ simulate pressing of equal sign (=) and question mark (?)
The = character is the non-capitalized character on the =/+ key, while + is the capitalized character. Thus, to output an equals sign, simply use the (badly named) VK_OEM_PLUS virtual key code.

Categories : C++

MySQL: DROP a column with a question mark sign?
Use backticks to escape column or tables names with special names or names of reserved keywords in MySQL. And use the column keyword: ALTER TABLE player DROP column `is_playing?`;

Categories : Mysql

Trim spaces before full stop or question mark in an NSString
I don't see an immediate way to do that. I would just search the range of any character that you want - like in your case question marks and dots - and check if there's a space before it, and in case remove the space. This is an example: NSString* str= @"How are you doing ?"; NSRange range= [str rangeOfCharacterFromSet: [NSCharacterSet characterSetWithCharactersInString: @".?"]]; if(range.location!= NSNotFound) { if(range.location>0 && [str characterAtIndex: range.location-1]==' ') { str= [str stringByReplacingCharactersInRange: NSMakeRange(range.location-1, 1) withString: @""]; } }

Categories : IOS

htaccess question mark redirect multiple different static URLs
Make sure there is no other source of redirection. I just pasted your .htaccess into my Apache and everything works like you wanted it to. Edit: according to your comment, you can just replace (.*) rule with the base of URL you want your redirect to work on: RewriteCond %{QUERY_STRING} id=11 RewriteRule /?tr/component/content/article(.*) http://www.example.com/services/terms/? [R=301,L] RewriteCond %{QUERY_STRING} id=45 RewriteRule /?tr/component/content/article(.*) http://www.example.com/services/cars/? [R=301,L]

Categories : Htaccess



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