w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML Categories
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

Options for migration Microsoft Access forms
Since you didn't specify what hosting platform you have or are contemplating (if any), there are several options, both hosted and host-it-yourself, including: Hosted services: Zoho Creator and Springbase that require that the provider hosts your converted database/application, and Converters that will create the hostable code and database for you to host yourself: Wavemaker, DBConvert

Categories : Ms Access

Simple plain ASP.NET application example (without Web Forms and MVC)
I would like to refer you, as an example, to ASP.NET MVC. ASP.NET MVC is a framework on top of ASP.NET but is definitely not Web Forms (in fact, it replaces it completely, and to my opinion - for the best). ASP.NET provides services common to web in general, things such as: Handling requests and responses Security, Authentication, Impersonation etc. Maintaining an 'Application' (the notion of Global.asax for example as a framework around instansiating apps, shutting them down, handling central things such as Routes, handling uncaught exceptions etc.) Taking care of hosting permissions Physical & virtual apps Interfacing with IIS (or other web servers) in general Running Modules (in addition to HTTP Handlers) Web Forms adds a presentation layer on top of ASP.NET's infrastructure. I

Categories : Asp Net

Running One Massive Migration in Rails. Deleted Migration File by Mistake
You don't need to drop all your tables in prod. Instead, create the big migration file you described, but then manually record it as applied in prod. After all, the point of a migration is to apply changes to the DB. In your case that's only needed outside of your production environment. Manually recording the migration is as simple as inserting the migration timestamp into the schema_migrations table: mysql> select * from schema_migrations; +----------------+ | version | +----------------+ | 20120504193548 | | 20120508160150 | | 20120518135330 | | 20120523163509 | ... So just execute the appropriate INSERT and rails will ignore the migration. PS - In the future, use source control so you can just simply restore the file from a prior version!

Categories : Ruby On Rails

Update-Database fails due to Pending Changes, but Add-Migration Creates a Duplicate Migration
I see this all the time also. I don't know why, wish i did, but my solution is to do a add-migration which will make a duplicate. Now this duplicate opens in the editor and then i edit it, so that the Up and Down methods are empty. So the result is a migration file that does nothing! VS is happy and you can do the update-database without errors (until next time). I hope this helps :)

Categories : C#

Generating a rails migration, how can I get the migration filename into my clipboard automatically?
I figured out a way to do this in each, (Windows requires you are using rails command line from cygwin for this) For OSX to clipboard rails g migration add_something_to_table | grep -oP 'db/.*.rb' | pbcopy For any linux + X rails g migration add_something_to_table | grep -oP 'db/.*.rb' | xclip For Windows (with cygwin) rails g migration add_something_to_table | grep -oP 'db/.*.rb' > /dev/clipboard

Categories : Ruby On Rails

remove a migration from south migration history
delete from south_migrationhistory where app_name='robots'; south_migrationhistory table just keeps track of what migrations have been applied and what are yet to be applied. Since 0.8 of robots doesn't have any migration files any entries for it from table south_migrationhistory can be removed and it won't affect anything else.

Categories : Django

Possible EF6 beta 1 Migration bug. Codefirst migration deadlock
Try explicitly specifying the migrations with Update-Database one at a time. If that doesn't work, try applying the InitialCreate by itself, then re-creating/Adding the ChangePegawaiToTPT. Be sure to have a backup copy first... There are some cases where many-to-many relationships are being named differently in rc1 than in the beta, which causes some headaches.

Categories : C#

Database Migration Error: Sqlite3 to Postgres Migration error
Basically - a dump from a DBMS is not supposed to work to another DBMS. Sometimes, it might work, but that's an exception. Generally, DBMSs have standard SQL for manipulating data, but they don't share the same language for creating and organizing data. There is no PRAGMA instruction in PostgreSQL. Check the following link: http://www.postgresql.org/docs/7.1/static/plpgsql-porting.html#CO.PLPGSQL-PORTING-PRAGMA

Categories : Ruby On Rails

How to create multiple forms for Single Model and all forms must be submitted by one submit button?
If you want only a submit button, then it's only one form (this is how HTML forms work). If I understood right your request, here is a suggestion: use javascript on a button on the page, to create more and more tasks, with an incrementing parameter the submit button should point to a controller's method which creates them all, identifying them by that incrementing parameter Also, you could create the tasks using AJAX, but this means they will go to the database right away.

Categories : Ruby On Rails

How to downgrade Form(FMB) created/modified in Forms 10g to Oracle Forms 9
I don't have a copy of Forms developer 10g or 9i so this answer has not been tested. Have you tried converting the Forms created in Forms 10g into XML using the supplied Oracle tools? Once you have the XML incarnation of your Form you may be able to convert it back into an Oracle Form 9i .fmb file. However I am sure that even if this works, Oracle only support "forward", i.e. 9 to 10 upgrades so if yo start getting strange errors you will be on your own! Myself, I would do the changes from the begining in the lower version.

Categories : Oracle

Multiple forms in MVC view: ModelState applied to all forms
This is a bit tricky. Here's how it can be solved. Start by moving your _EditBankInfo.cshtml partial into an editor template ~/Views/Shared/EditorTemplates/BankInfo.cshtml that looks like this (notice that the name and location of the template is important. It should be placed inside ~/Views/Shared/EditorTemplates and named as the name of the typed used in your IEnumerable<T> collection property, which in your case is BankInfo.cshtml): @model BankInfo <div> @using (Html.BeginForm()) { <input type="hidden" name="model.prefix" value="@ViewData.TemplateInfo.HtmlFieldPrefix" /> @Html.HiddenFor(m => m.Id) @Html.TextBoxFor(m => m.BankAccount) <button type="submit">Update this stuff</button> } </div> and th

Categories : Asp Net Mvc

PHP - Generating several forms, but the forms only ever output the same thing for each form
you missed </form>. Try this. printf("<div class='NewsItem'><div class='title'>%s</div><form enctype='multipart/form-data' action='tutorial.php' method='post'><input type='hidden' name='tutorial' value='%s'/><input type='submit' name='submit' value='%s' id='hyperlink-style-button'/></form></div>", $row['Title'], $row['Title'], $row['Title']) I cannot see any other critical problems, try the following. I have removed enctype='multipart/form-data' also it is not valid to have more than 1 items with same id in a page so changed id="hyperlink-style-button" to class="hyperlink-style-button". you have to change the css accordingly. Also replaced single quotes to double quotes and added htmlspecialchars for values to not break html on quote

Categories : PHP

Two forms from one model both forms validate when one form is submittted
First, why are you doing this <?php $contactforms = $this->requestAction('Contactforms/contact') ?> in your element? I don't see the use of that requestAction except slowing down the processing... Ok, but your problem... Since you're calling an element, there's no easy way to avoid the validation of both forms. Usually, when there are two forms corresponding to the same model, the way to not validate both is to change the "name" of the form like this <!--in the first form--> <?php echo $this->Form->create('Contactform1'); ?> <!--in the second form--> <?php echo $this->Form->create('Contactform2'); ?> But, since you are creating that form with an element, there's no easy way of changing the name of the form in one place and not in the o

Categories : Cakephp

New forms - embedding a collection of forms - Symfony2
Assuming that your main class has addTag($tag) method, you can add different 'new' tags to it. In class Task public function addTag($tag){ $this->tags[]=$tag; return $this; } In your Controller (assuming 10 tags here) $task=new Task(); for($i=0;i<10;i++){ $task->addTag(new Tag()); } $form->setData($task); In your view {% for tag in form.tags %} <ul class="orders"> <li>{{ form_widget(tag.name) }}</li> </ul> {% endfor %} If you don't need the manually click, you can remove the JavaScript part.

Categories : Javascript

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

MySQL - question marks
Your database table column should be created with proper charset and collation. You can define theit while creating or altering a table: col_name {CHAR | VARCHAR | TEXT} (col_length) [CHARACTER SET charset_name] [COLLATE collation_name] Here is the mysql link to help you learn more about it: http://dev.mysql.com/doc/refman/5.0/en/charset-column.html

Categories : Java

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++

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

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

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

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

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

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

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

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

What to do with Question Marks in HTAccess Redirects
If it's a single link you want to change you don't need a htaccess rule for that you can just do a redirect. redirect 301 /wordpress/?p=250 http://www.othersite.com/blog If the URL parameter changes you can use this rule. RewriteEngine on RewriteRule ^wordpress/(.*) http://www.othersite.com/blog [R=301,QSA,NC,L] Note that when you use the QSA flag it will append the URL with the query parameter so if that's what you want the resulting URL will be. http://www.othersite.com/blog?p=250 Otherwise if you remove the QSA flag, then it will just redirect to this http://www.othersite.com/blog

Categories : String

What may cause question marks instead of non-ASCII symbols?
You need to change the character set of the database to UTF-8 or a character set for Cyrillic characters. Latin-1 can't encode Cyrillic characters and that's why they're appearing as question marks in the database. edit: I just saw you're declaring the table with UTF-8 character set, so I'm stumped.

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

Getting Arabic Query String in Question Marks
Your Apache server probably doesn't accept UTF-8 URL encoding. See this answer to solve your problem. Hope it will help :)

Categories : PHP

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

Arabic turn to strange Question marks
Looking at your screen shot it looks as though you already have some unicode data but as I rough top-down walk through. You should be using nvarchar to store your strings as it is unicode it will record Arabic or extended characters without issue. You also need to check that your character encoding is setup (UTF8 is usually a good bet) and passed through all various places correctly. If you are using SqlConnection and SqlCommand then it would be best to pass the value as a parameter to ensure that everything is being handled correctly and avoid injection attacks. If you are using Entity Framework there should be no additional steps to my knowledge.

Categories : C#

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

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

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

Can a Rails `where` query with question marks be done more elegantly?
Personally I will use a find by with a in condition such as: Klass.find_all_by_column([1, 2, 3]) Replace 'column' with column name you wish to search in. Replace 1,2,3 by your value, it's an array you can add or remove values from it. My example will generate a SQL query such as: SELECT * FROM Klass WHERE Klass.column IN (1,2,3) More on this on Active record documentation.

Categories : Ruby On Rails

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

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

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

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