w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML Categories
Creating a dataset variable from a macro variable containing both quotes, double quotes and mismatched quotes
The short answer is that you can use SYMGET here: data _null_; x=symget("problem"); put x=; run; If that is not an option for some reason, provide some more information as to the context. I'll also see if I can point Toby (the SAS-L macro quoting guru) or some of the other folks there here, to see if they have any suggestions for handling this without SYMGET. From SAS-L, FriedEgg (Matt) posted the following additional solution: resolve=resolve('%superq(problem)'); He also notes that you can mask it on the way in, if you have control over that: data _null_; input x $ 1-50 ; call symput('problem',quote(x)); cards4; 'this' "is '' my "string"" from 'hell! ;;;; run; data _null_; x=&problem; put x=; run;

Categories : Sas

Batch converting straight quotes to smart quotes from MySQL database
I don't know how to enter the smart quotes in Sublime Text 2, but I tested the following regex (in Sublime Text 2 itself) for the single quote case using [] as the replacement characters: Find what: ((?:[^<'>]*|<.*?>)*)'(.*?)' Replace with: $1[$2] Hopefully this will help. Here is rubular for it, showing matches.

Categories : Regex

SQL Server Management Studio replacing single quotes with double quotes when modifying stored procedure
I believe you are getting dynamic SQL from the scripting options because you have this option selected: Tools > Options > SQL Server Object Explorer > Scripting > Check for object existence When this setting is enabled, the script is generated like this: IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = ...) BEGIN EXEC dbo.sp_executesql @statement = N'ALTER PROCEDURE...' END Disable this option, and it should be correct when you use right-click > Modify or right-click > Script stored procedure as > ALTER to >.

Categories : Sql Server

Single quotes, double quotes and passwords containing $ in Windows and Unix
You can dump from within a pdo PHP script : <?php $dumpSettings = array( 'include-tables' => array('table1', 'table2'), 'exclude-tables' => array('table3', 'table4'), 'compress' => CompressMethod::GZIP, /* CompressMethod::[GZIP, BZIP2, NONE] */ 'no-data' => false, /* http://dev.mysql.com/doc/refman/5.1/en/mysqldump.html#option_mysqldump_no-data */ 'add-drop-table' => false, /* http://dev.mysql.com/doc/refman/5.1/en/mysqldump.html#option_mysqldump_add-drop-table */ 'single-transaction' => true, /* http://dev.mysql.com/doc/refman/5.1/en/mysqldump.html#option_mysqldump_single-transaction */ 'lock-tables' => false, /* http://dev.mysql.com/doc/refman/5.1/en/mysqldump.html#option_mysqldump_lock-tables */ 'add-l

Categories : Windows

Why do I have to escape double quotes in my string surrounded by single quotes?
Looks like you are missing semicolon ; at the end of your variable assignment. It should be: $weapon_secondary = '<select name="weapon" class="dropdown"> <option>Option 1</option> <option>Option 2</option> </select>'; As an alternative you can use heredoc to declare a variable and avoid this quoting exercise: $weapon_secondary <<< EOF <select name="weapon" class="dropdown"> <option>Option 1</option> <option>Option 2</option> </select> EOF;

Categories : PHP

Vim: Put newlines around '{' and '}' but not around those inside strings with single quotes or double quotes
One suggestion perhaps, without posting vimscript (though I cannot think of a regex that will do this in one pass) is to decide upon some marker scheme (I prefer 3 hashes) and do it in stages. I will be back later with the correct regex (the commands I'm familiar with are not working so well on my windows gvim install) Step 1: With a regex that searches for anything of the form .*["||'].*{.*}.*["||'] (i.e. braces inside quotes) prepend matching lines with your marker Step 2: Now with a regex search for any lines that match something like: ^[^###]+.*{.*} (i.e. anything with braces and the line not beginning with markers) and put in your returns Step 3: remove the markers

Categories : PHP

Double quotes inside single quotes in oracle statement
I don't think the problem comes from your column name, as shown in this working example: SQL> CREATE TABLE trytable (ID VARCHAR2(10), "DEFAULT" NUMBER); Table created SQL> BEGIN 2 EXECUTE IMMEDIATE 3 'INSERT INTO trytable (ID, "DEFAULT") VALUES (''monkey1'', 0)'; 4 END; 5 / PL/SQL procedure successfully completed Technically, you can have a table column name named DEFAULT, even if it's generally a bad idea that will lead to confusion. You will only be able to interact with it through the double-quote " syntax because DEFAULT is a reserved word. If you specify double quotes around identifiers, Oracle will treat them as case-sensitive, so you have to make sure that they match the table specs. In your case, it would help to have the specific error message.

Categories : Oracle

Replacing dumb quotes for smart quotes with preg_replace
$singlequotesPattern = "/'(.*?)'/"; Add a ? to make the * quantifier non-greedy. A greedy quantifier finds the longest match possible. A non-greedy one finds the shortest. Greedy: Jane said 'How do we do this?' 'I don’t know' replied Sam. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Non-greedy: Jane said 'How do we do this?' 'I don’t know' replied Sam. ^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^

Categories : PHP

Best Way to escaping single quotes and double quotes in a string
you should use fn:escapeXml() because It escapes quotes and also other characters that could be interpreted as XML markup. . It also helps in prevention of XSS attack in JSP.

Categories : String

PHP Replace attribute single quotes with double quotes
I realized that PHP's DOMDocument class does this automatically... libxml_use_internal_errors(true); //use this to prevent warning messages from displaying because of the bad HTML $html = new DOMDocument();//'1.0','UTF-8' $html->xmlStandalone = false; $html->loadHTML($b); $b = $html->saveXML();

Categories : PHP

php - the single quotes mixture with the double quotes use
Possibly just an error in the question, but this line has 2 semicolons: $query .= "WHERE id='" . $subject_id ."' ";; And if you skip the concatenation, this should work $query .= "WHERE id='$subject_id' "; In PHP, inside double quotes, single quotes are literal and variables are expanded. The other way you wrote it should work too, but it's more code than needed.

Categories : PHP

PHP MySql double quotes than single quotes
double quotes signify that it's a string and the single quotes are part of a string. inside double quotes variables are evaluated so the string will contain the value of the variable 'vValue' not '$v'

Categories : PHP

DataGrid edition 'EditItem' is not allowed for this view` when bound to a WPF DataGrid
I tried this and the problem is that you have initialized your Level2 collection as Hashset<>. IEditableCollectionView.EditItem() throws this error while trying to update item in Hashset<>. I initialized the collection as List<> and it was working fine. I am not sure why it is not able to update item in hashset, need to look deeper into it. But changing the Hashset<> to List<> will fix this error. Hope it helps Thanks

Categories : C#

Silverlight Datagrid scrolling, DataGrid fires RowLoading event
The RowLoading event is fired because rows are virtualized. With virtualization, rows are created (and loaded) only when they are visible on screen. So every time you scroll down or up a new row is created, loaded and the RowLoading event fired. To disable the virtualization you can try to set this property: VirtualizingStackPanel.VirtualizationMode="Standard" Be aware that this can slow down the performance of your grid if you have a lot of rows.

Categories : Database

Binding ComboBoxColumn to collection from DataGrid's ItemsSource in WPF DataGrid
MSDN: DataGridComboboxColumns says: To populate the drop-down list, first set the ItemsSource property for the ComboBox by using one of the following options: A static resource. For more information, see StaticResource Markup Extension. An x:Static code entity. For more information, see x:Static Markup Extension. An inline collection of ComboBoxItem types. So basically to just bind to data object`s collection property it`s better to use DataGridTemplateColumn: <DataGridTemplateColumn Header="Log"> <DataGridTemplateColumn.CellTemplate> <DataTemplate> <ComboBox ItemsSource="{Binding log}" /> </DataTemplate> </DataGridTemplateColumn.CellTemplate> </DataGridTemplateColumn> This type of c

Categories : Wpf

Escaping quotes and double quotes
Escaping parameters like that is usually source of frustration and feels a lot like a time wasted. I see you're on v2 so I would suggest using a technique that Joel "Jaykul" Bennet blogged about a while ago Long story short: you just wrap you string with @' ... '@ : Start-Process \server oto.exe @' -batch=B -param="sort1;parmtxt='Security ID=1234'" '@ (mind that I assumed which quotes are needed, and which things you were attempting to escape) If you want to work with the output, you may want to add -NoNewWindow switch. BTW: this was so important issue that since v3 you can use --% to stop PowerShell parser from doing anything with your parameters: \server oto.exe --% -batch=b -param="sort1;paramtxt='Security ID=1234'" ... should work fine there (with the same assumption).

Categories : Powershell

Double Quotes in Single Quotes
Escape the quotes in html using &quot; <video id="video1" class="video-js vjs-default-skin" width="640" height="480" data-setup='{ &quot;controls&quot;:true,&quot;autoplay&quot;:false,&quot;preload&quot;: &quot;auto&quot;}'>

Categories : HTML

Using regexes, how to efficiently match strings between double quotes with embedded double quotes?
A very efficient solution to match such inputs is to use the normal* (special normal*)* pattern; this name is quoted from the excellent book by Jeffrey Friedl, Mastering Regular Expressions. It is a pattern useful in general to match inputs consisting of regular entries (the normal part) with separators inbetween (the special part). Note that like all things regex, it should be used when there is no better choice; while one could use this pattern for parsing CSV data, for instance, if you use Java, you're better off using OpenCSV instead. Also note that while the quantifiers in the pattern name are stars (ie, zero or more), you can vary them to suit your needs. Strings with embedded double quotes Let us take the above example again; and please consider that this text sample may be any

Categories : Regex

Validating A WPF Datagrid Against Data From Another Datagrid
From Microsoft official WPF course materials: ValidationRules are only to be used as simple validations (For instance Required fields, numeric formats, etc). If you need advanced / complex Business Rules validation, you should either implement IDataErrorInfo or create your own validation mechanism (that's what I did and it works like a charm)

Categories : C#

Copy selected row from datagrid at the end of datagrid
For Datagridview Databound you have to commit additional record to datasource (table) So, you have to do "INSERT INTO mytable ( fields here ... ) VALUES ( values here ..)" then to refresh your datagridview .. dt2.datasource = mytable ADDED : For your code ... try change like this insert_cmd.Parameters.AddWithValue("@Name", .item("Name")) insert_cmd.Parameters.AddWithValue("@Age", .item("Age"))

Categories : Sql Server

Mysql query - couldn't add single quotes within the another single quotes
SET @pid = $memberID = getLoggedId(); $iPid = $GLOBALS['MySQL']->getOne("SELECT `Pid` FROM `Profiles` WHERE `ID` = '$memberID' LIMIT 1"); if($iPid==1){ echo '<div id="id" style="margin:10px 10px 0;" overflow: "hidden;"> <button class="bx-btn bx-btn-img" onclick = "window.open(inviteteacher.php,_self)"> Study with Private Teacher </button> </div>'; }

Categories : PHP

Master-Detail: On row click in master (DataGrid), display details (DataGrid)
If you searched online, you would have found a number of answers. For example, please take a look at the following articles: WPF Master Details MVVM Application Implementing a simple Master-Detail scenario for WPF in MVVM MVVM - Master Detail

Categories : Wpf

Copying data from a datagrid view to a new form with a new datagrid view VB
"Error 1 Reference to a non-shared member requires an object reference." As this message says: You need a instance of form2 - object of type form2created with New sub, which you created inside of BTN_Next_Click. But local variable frm_PI_01 can be used only inside of that function. With name of class form2 you can used only Shared member or functions/subs MSDN Shared members in VB My opinion if you need transfer some information/variables from form to another then in your case(when you transfer data only once when creating form) use a parameters in form constructors. Add another parameter to you form3 constructor. For example reference of your datagridview(this is may be not good practice referenced controls to another form, better create some variable with needed data and reference th

Categories : Vb.Net

How to add a new row in sql from datagrid and update sql row from same datagrid?
This article on codeproject does a nice (thorough) job of demonstrating what you are asking. It also comes with some demo code. http://www.codeproject.com/Articles/37430/Datagrid-Editing-Updating-Cancel-Selecting-Rows

Categories : SQL

How can embed datagrid in datagrid
I don't think it's possible. You can indeed manually replace a cell with the HTML of another grid (your "child" grid), but Dojo maintains its data in a store. Your store won't be "aware" of any changes you make in the DOM nodes of your grid, and inserting a DataGrid in a store isn't possible either since the DataGrid maps its columns to properties of the data objects.

Categories : Database

Binding datagrid in datagrid
You have problem with DataContext here. In RowDetailsTemplate you trying to binding to a property in main view model, but DataContext of RowDetailsTemplate is the row item. If you want to binding to property in your main view model you should use RelativeSource binding. Try this: <DataGrid ItemsSource="{Binding Path=Files}" SelectedItem="{Binding Path=DataContext.CurentFile, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=Window}}" AutoGenerateColumns="False" > ...

Categories : Wpf

How do I put single quotes inside of other single quotes?
You can surround them with different quotes in HTML (some of your HTML quotes were unbalanced). In PHP you'll have to escape the inner quotes: echo "<a href="#" onclick="popup('popUpDiv')"><img src='$pic'></a>";

Categories : PHP

Escape double quotes within double quotes
The problem A finite automaton - the theoretical equivalent of a regex - can't parse recursive structures. Since you can have inner quotes, and possible inner-inner quotes, your problem can't be solved using a regex. Although modern regex engines can overcome this problem with several extensions, don't waste your time on hunting quotes-within-quotes. You'll soon find out that you're actually building a full blown JSON parser. As @johnchen902 stated, even a turing-machine powered parser can not handle ambiguities - so you better not try to suggest a fix to the broken JSON. Solutions Create the JSON using a dedicated utility The given string is not a valid JSON. It's probably created using string concatenation, which is generally a bad idea because it does not escape correctly. You sh

Categories : Java

Can't get the double quotes right
You don't need to add an explicit closing " when concatenating strings: header("Location: /" . $_SESSION['initiating_url'], true, 300); For clarity: $path = 'home'; echo "Location: /" . $path; // Location: /home echo "Location: /home"; // Location: /home echo "Location: /" . $path . """; // Location: /home" echo ""Location: /" . $path . """; // "Location: /home"

Categories : PHP

In C# how to get value from text box using quotes
Use a parameterized query like this SqlCommand sqlcmd = sqlcon.CreateCommand(); sqlcmd.CommandText = "Select distinct transactionName from dbo.tbl " + "where terminalId = @id"; sqlCmd.Parameters.AddWithValue("@id", textBox_cardNumber.Text); .... In this way you defer the job to recognize your data (the textbox text) as a string to the Framework code that knows how to correctly quote your value. Also you remove the possibilities of Sql Injection attacks

Categories : C#

Copy to without quotes
When exporting to TYPE DELIMITED You have some control on the VFP side as to how the export formats the output file. To change the field separator from quotes to say a pipe character you can do: copy to myfile.csv type delimited with "|" so that will produce something like: |A001|,|Company 1 Ltd.|,|"Moorfields"| You can also change the separator from a comma to another character: copy to myfile.csv type delimited with "|" with character "@" giving |A001|@|Company 1 Ltd.|@|"Moorfields"| That may help in parsing on the R side. There are three ways to delimit a string in VFP - using the normal single and double quote characters. So to strip quotes out of character fields myfield1 and myfield2 in your DBF file you could do this in the Command Window: close all use myfile copy

Categories : R

how to remove quotes from csv in php
There really is nothing wrong with the quotes. They avoid any confusion that might occur when some CSV's use whitespace as delimiter: data "some more" another thing //is not the same as: data some more another thing However, if you want to remove them, apply this regex to each line: $line = preg_replace('/(^|;)"([^"]+)";/','$1$2;',$line); And you should be all right. How does it work: (^|;) matches (and captures) either the beginning of a line, or a semi-colon " matches a literal " (doesn't capture) ([^" ]+): matches and captures at least one char that is not " ";: matches (no capture) a literal " and ; $1$2;: the $1 is a back-reference to the first matched group ((^|;)) The $2 references ([^";]+), the ; is just a literal Suppose $line is '19.08.2013;47657;"12459 Abdu

Categories : PHP

Quotes in VBA with R1C1
Use chr(34) to represent quotation marks when you are already working inside quotation marks. For example, change your forumula above to the following: Range(Cells(1, 1), Cells(1 + 500, 1)).FormulaR1C1 = "=FDSC(" & chr(34) & "-" & chr(34) & ",$C$1," & chr(34) & "FG_PRICE(D1)" & chr(34) & ")" To put it in a loop, just do the following: Sub writeFormulas() Dim i as Integer For i = 0 to 2 Range(Cells(1, 1), Cells(1 + 500, 1)).FormulaR1C1 = "=FDSC(" & chr(34) & "-" & chr(34) & ",$C$1," & chr(34) & "FG_PRICE(D" & i+1 & ")" & chr(34) & ")" next i End Sub

Categories : Excel

How to use quotes on jsp page in tag
The proper way is using the empty keyword. This covers both nullness and emptiness. <c:when test="${empty findAttributes && empty param.value1}"> Your condition would otherwise still fail if the parameter name value1 is not supplied at all (which then evaluates to null not to empty string). A request parameter only evaluates to empty string when the parameter name is supplied without a value like so value0=foo&value1=&value2=bar. However, if the request parameter is totally absent like so value0=foo&value2=bar then it evaluates to null which isn't the same as an empty string.

Categories : Jsp

Referencing columns in R without quotes
Something like this? myfunction <- function(DF,col) { DF[,as.character(substitute(col))] } dat <- data.frame(a=1:5,b=6:10) myfunction(dat,b) #[1] 6 7 8 9 10 See the comment by @Justin concerning the dangers.

Categories : R

how to put the value from a datatable in double quotes
Your code is outputting exactly what you want it to output. You've said in the comments to the question that you're seeing this when you're debugging; this is simply a function of the Watch window, escaping the quote characters for you. Incidentally, your code could be more efficiently written in a number of ways; one example, that is still reasonable readable: colname = ""; foreach (DataColumn co in DT.Columns) { colname += """ + co.ColumnName + "","; } colname = colname.TrimEnd(',');

Categories : C#

Delimited string between quotes?
You can use this regex: "\"(.*?)\"" Pattern pattern = Pattern.compile("\"(.*?)\""); Matcher matcher = pattern.matcher(""000ABCD",000,HU,4614.850N,02005."); if (matcher.find()) { System.out.println(matcher.group(1)); } It'll print: 000ABCD.

Categories : Java

php pdo double quotes also getting escaped
giving me 'hi "this" is a test' as output. that's correct output. There is absolutely nothing wrong with it. You shouldn't worry of these slashes at all. I dont want to escape the double quotes! You do. At least as long as you are using this function. Anyway, you should use prepared statements instead.

Categories : PHP

Getting rid of cookie value with double quotes
I'm not entirely sure what your question is. Are you referring to the “%” codes in your tokens? which would be due to this: http://www.w3schools.com/tags/ref_urlencode.asp#encodingresult

Categories : PHP

When can quotes be omitted in JSON?
Dropping the quotes in JSON object keys is a feature of the Javascript language, and possibly others. Python, for instance, has a dictionary syntax that is pretty similar to Javascript except that key names cannot be unquoted (though they can be single-quted, and they don't need to be strings). May be a duplicate of this question: JSON Spec - does the key have to be surrounded with quotes? And this one: What is the difference between object keys with quotes and without quotes? Neither of which addresses the question of whether this is in the Javascript specification, or if it is just allowed by most browsers. I found this in the official ECMAScript specification: http://www.ecma-international.org/ecma-262/5.1/#sec-11.1.5 http://www.ecma-international.org/ecma-262/5.1/#sec-7.6 The f

Categories : Json



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