Whats the best package for finding a string in multiple files in EMACS. I know about grep and such but I would like something that is a little smoother to operate.
I'm passing query string parameter to .aspx page with 'Ñ' character in value.
But Request.QueryString returns some other box '[]' character in return.
I think this request encoding issue. and I do not want to use that HttpUtility.UrlDecode and HttpUtility.UrlEncode methods.
Does anyone know how to solve this?
I wonder if syntax as follows would be helpful in your opinion as a code readability improvent and self-commenting of code:
std::map<std::string name, std::vector<int> scores> myMap;
In this example it clearly says and no other comment is needed, what for we are using myMap variable.
Looking forward to your opinions.
Hello,
I have a string input of the format 1,3-7,10,11-15
I want to identify all the integers entered in the range. How do I achieve this using C++?
TIA
Guppy
Is there any way showing the detailed exception for String or binary data would be truncated.
I use LINQ to SQL and i cant figure out which column is that!?
Tried numerous things but i get the same meaningless error i got from within Visual Studio.
Also I use .NET 3.5 SP1, but errors are still returned useless.
Hi All,
I am using the following code to show confirmation dialog box after finishing some update process in database. but it is not working for me.
code:
string javaScript = "<script language=JavaScript>\n " + "if(confirm('Do you want to update
the files?'))window.location.href = \"Upload.aspx?ID=" + ID +
"&pt=Gm&page=Gms\"; else return false;\n" + "</script>";
RegisterStartupScript("imbtnUpdate_Click", javaScript);
I have datatable and there two column which is type of string and I want to make addition of that two columns data for another column how can I do that ?
Hello!
How do i get the actual max length of a specified column in php?
For instance, this table:
id - int(11)
name - string(20)
I want in php to select the maximum number of characters that a field can have, like
SELECT length(name) from table1
and it should then return 20 (since its the maximum number of characters for that field).
I'm cocking this up and it should be really simple but the value of sortdate is none (note im only doing this because converting a string to a date in Python is a bugger).
DateToPass = str(self.request.get('startdate'))
mybreak.startdate = DateToPass
faf = DateToPass.split('-')
sortdate = str(faf[2] + faf[1] + faf[0])
That should work? but its just being stored as null though the datetopass is being stored fine.
I'm using +[NSUserDefaults standardUserDefaults] to store application settings. This consists of roughly a dozen string values. Is it possible to delete these values permanently instead of just setting them to a default value?
I've seen these questions but both involve methods that aren't available in the CellStyle Format value. I only want to show the hours and minutes portion (16:05); not the seconds as well (16:05:13). I tried forcing the seconds value to zero but still got something like 16:05:00. Short of using a kludge like providing a string or a DateTime (and only showing the hour/minutes part) is there any way I can get the formatting to do what I want.
There's a dearth of info in the supporting PDFs and on the web. I happened to come across a post in a blog that mentioned that $.write() or $.writeln() will write a string to the javascript console. Quite useful. Does anyone know if this $ object has any additional properties or methods?
In php how to check if one date (given as string) differs to another date at least tree month (unable to find any examples):
$date1 = "2013-11-05";
$date2 = "2013-11-19";
//both dates is in form yyyy.mm.dd
differsTreeMonths($date1,$date2) { ???? return $differs; }
differsTreeMonths("2013-11-05","2014-05-02");//true
differsTreeMonths("2014-01-01","2014-04-01");//true
differsTreeMonths("2014-01-01","2014-03-31");//false
differsTreeMonths("2013-12-01","2014-01-15");//false
etc
Thank you
This is a totally newbie question. I'm running Eclipse on Ubuntu. I created a test project that I want to compile to an executable (whataver the linux equivalent is of a Windows .exe file). Here's the contents of my program:
public class MyTest {
public static void main(String[] args) {
System.out.println("You passed in: " + args[0]);
}
}
I want to know how to compile it and then how to execute it from the command line.
Thanks!
I am new to regular expressions. I want to use java's replaceAll() function to replace any CSS comments in a string.
Basically I want to use regex to search for anything that is surrounded by "/*" and "*/" and replace it with "".
I have the following file example
more somefile
param=a b c d e f g z x w
# param=a b c d e f g z x w
I need to create with sed the following (should be one line if possible):
Ignore # char in the beginning of line
Match first the param string
Second match the "a b c d e f g z x w" (like grep -w) and give exit status if success
Something like ....
sed "/^ *#/b; /\<param\>/" ....
I am working on a (WPF + C#) application. I have to implement search functionality. It will search all the occurrences of a particular string on the specific part of Window. What can be the best way to do this?
So I have a List collection that I fetch via a API call (which I don't have any control over).
The list is ordered.
public class Article
{
articleID,
string Url
}
So I have a Url value, using that I want to figure out the next and previous Url's if any.
What's the most elegant way of doing this?
Hello,
Recently I needed to generate a huge HTML page containing a report with several thousand row table. And, obviously, I did not want to build the whole HTML (or the underlying tree) in memory. As result, I built the page with the old good string interpolation, but I do not like the solution.
Thus, I wonder whether there are Python templating engines that can yield resulting page content by parts.
I have user submitted tags that can be any type of (valid) UTF-8 string. I want to know if it is safe to include them in the URL merly by running them through urlencode().
In other words, is urlencode() safe to use for valid UTF-8 strings?
(by valid I mean id have already force-encoded them to UTF-8)
I have a byte[] which is a file, and I would like to send it as an attachment using System.Net.Mail.
I noticed the attachment class has 1 overload which accepts a stream.
Attachment att = new Attachment(Stream contentStream,string name);
Is it possible to pass the byte[] through this overload?
Is it possible to have a bunch of <select> dropdowns in html that only display a small (say 10 pixels wide) icon, but when you click it the drop down has a list with the icons beside a descriptive string. (Let's see if ASCII art works on SO):
[X]
| X - Disable |
| v/ - Enable |
| O - Ignore |
+-------------+
[O]
[v]
[X]
Can that be done in CSS? Or in jQuery?
hi,
how to get the button value from jsp to servlet
in jsp:
<input type=button name=bt value=gi onclick="document.frm.submit();"></input>
and in servlet like that:
String gi =request.getParameter("bt");
System.out.print("button value" +gi);
result=null
thanks
I have a code like this:
Dim strResponses As String
strResponses = Forms!frmResponses.QstnID.OpenArgs
If Len(strResponses) 0 Then
Me![QstnID].DefaultValue = Me.OpenArgs
End If
When I run it, its gives error 438. Can someone help me to know where the error is?
I have some technical questions. In this function:
string report() const {
if(list.begin() == list.end()){
throw "not good";
}
//do something
}
If I throw the exception what is going on with the program? Will my function terminate or will it run further? If it terminates, what value will it return?