Hello Friend,
I've decided to use ClickOnce technology to deploy my new WPF application. By and large, ClickOnce works as advertised but I've hit a minor glitch regarding Bootstrapping and framework detection.
Some background:
- I'm using the standard Visual Studio-generated publish.htm page as my launch page.
- The only prerequisite is the .NET Framework 4.0 Client Profile.
- All clients using IE 8.
- All clients already have the .NET 4.0 Client Profile installed.
ClickOnce works as advertised on the vast majority of machines. The VS-generated JScript correctly detects that the framework is installed and presents the user with a Run button. The app launches just fine.
I'm getting odd results on one of the machines, however. On the offending machine, the VS-generated JScript tells the user that the prereqs may not be installed -- or rather, it FAILS to detect that the framework is already installed. The "launch" link successfully launches the application but the Run link points to the bootstrapper setup.exe. Why is it failing to detect the framework on this one machine?
It occurred to me that framework detection is largely a matter of examining the useragent string that's submitted by the browser. So, what you see below are two UserAgent strings. The first is from a machine where things are working properly. The second is from the offending machine.
THIS ONE WORKS:
2011-01-11 15:14:14 W3SVC1 192.168.0.36 GET /publish.htm - 80 - 72.130.187.100 Mozilla/4.0+(compatible;+MSIE+8.0;+Windows+NT+6.0;+Trident/4.0;+SLCC1;+.NET+CLR+2.0.50727;+Media+Center+PC+5.0;+.NET+CLR+3.5.21022;+.NET+CLR+3.5.30729;+.NET+CLR+3.0.30729;+.NET4.0C) 304 0 0
THIS ONE DOESN'T:
2011-01-11 18:49:12 W3SVC1 192.168.0.36 GET /publish.htm - 80 - 76.212.204.169 Mozilla/4.0+(compatible;+MSIE+8.0;+Windows+NT+6.1;+WOW64;+Trident/4.0;+GTB6.6;+SLCC2;+.NET+CLR+2.0.50727;+.NET+CLR+3.5.30729;+.NET+CLR+3.0.30729;+Media+Center+PC+6.0;+.NET4.0C) 200 0 0
The useragent string of both machines clearly states, "hey the .NET 4.0 client profile is installed here" -- yet the second machine seems unable to detect it. I don't know enough about useragent strings to understand why the former works and the latter fails. The only difference as far as I can tell is that the offending machine is running 64bit. But that shouldn't make a difference. Should it? Any ideas?
Dexter Morgan
I will be setting the current thread's culture at the beginning of the request lifecycle.
Does it make sense if I create my own resource.xml to store things like strings/labels/messages that will be used in the web application?
or are their drawbacks and its better if I just use the Global resources .resx files that are 'built-in' ?
I have a binary files which needs to be sent as a string to a third-party web-service. Turns out it requires that it needs to be base64 encoded.
In ruby I use the following:
body = body << IO.read("#{@postalcard.postalimage.path}")
body is a strong which conists of a bunch of strings as parameters.
So...how do I base64 encode it into this string?
Thanks.
Hi,
In the Android application I am building, I want to be able to communicate with a local server developed in Django. (Basically a login page and a home page populated with posts and images from users) So do I need to use XML Parsers for the parsing the response from a Django server or is it possible for the server to respond with strings which can be directly used? Also what about images?
Regards,
Primal
Does anyone know how to return an ordered list of strings with null values last? I have something like this:
using(var context = new DomainEntities())
{
var result = context.Users.OrderBy(u = u.LastName).ThenBy(u = u.FirstName);
}
My problem though is that this query returns null values before non-null values.
Any thoughts?
We’ve got an interesting requirement that we’ll want to support multiple languages at runtime since we’re a service. If a user talks to us using Japanese or English, we’ll want to respond in the appropriate language. FxCop likes us to store our strings in resource files, but I was curious to know if there was an integrated way to select resource string at runtime without having to do it manually.
Bottom Line: We need to be able to support multiple languages in a single binary. :)
If I have a match operator, how do I save the parts of the strings captured in the parentheses in variables instead of using $1, $2, and so on?
... = m/stuff (.*) stuff/;
What goes on the left?
Hi,
I need to figure out the value of data strings with jquery, for example like this:
{ label: "Beginner", data: 2},
{ label: "Advanced", data: 12},
{ label: "Expert", data: 22},
to add them up.
Something like:
var sum = data1+data2+data3;
alert(sum);
So the result for this example would be 36.
Appreciate your help!
Nicole
Is there a "smart" UDP protocol analyzer that can help me reverse engineer a message based protocol?
I'm using Wireshark to do the sniffing, but if there's a tool that can detect regularities in the protocol (repeated strings, bits of the protocol that are CRC/Checksum or length, ...) and aid the process that would help.
I have strings of this type:
text (more text)
What I would like to do is to have a regular expression that extracts the "more text" segment of the string, so far I have been using this regular expression:
"^.*\\((.*)\\)$"
Which although it works on many cases, it seems to fail if I have something of the sort:
text (more text (even more text))
What I get is: even more text)
What I would like to get instead is:
more text (even more text) (basically the content of the outermost pair of brackets.)
Thanks
I want to sort a list of strings based on the string length. I tried to use sort as follows, but it doesn't seem to give me correct result.
xs = ['dddd','a','bb','ccc']
print xs
xs.sort(lambda x,y: len(x) < len(y))
print xs
['dddd', 'a', 'bb', 'ccc']
['dddd', 'a', 'bb', 'ccc']
What might be wrong?
I've read lots of tutorials on how to deserialize a JSON object to an object of a particular using DataContractJsonSerializer. However, I'd like to deserialize my object to a Dictionary consisting of either Strings, Arrays or Dictionaries, such as System.Json does with SilverLight when I say JsonObject.Parse(myJSONstring).
Is there an equivalent to System.Json that I can use in my WPF project?
(just a short background: I'm fetching JSON objects that have way to much info, and I just want to use a little bit to fill out a String array)
Cheers
Nik
How does objdump manage to display source code? Is there a reference to the source file in the binary? I tried running strings on the binary and couldn't find any reference to the source file listed...
Thanks.
strip_tags only catches tags that have a beginning and end tag. With the strings I'm working with it's causing issues and I need to removed all HTML tags.
I need to convert a number which gives decimals in factored format in to decimals,
i.e. 11.16 is 11.5 in decimal. This is because 16 is in base of 32 and 11.16 should be read as 11+16/32 = 11.5
I get 11.16 as a string and I need to change it to 11.5 as numeric in MS SQL(2005) database.
Any shorter way of doing this rather than splitting strings,converting to numerics,maths,convert to string, concatenate and then convert to numeric?
I have a variable $link_item, it's used with echo and gives the strings like
<span class="name">Google</span>http://google.com
How to remove "<span class="name">Google</span>" from string?
It should give just "http://google.com".
Heard it can be done with regex(), please help.
When a cell in a spreadsheet contains a simple date (mm/dd/yyyy) the poi API flags the cell-type as 'numeric'. This is probably because spreadsheets ( IMO ) historically recognize only strings and real numbers.
It is possible to hard-code the cell-index, and use it conditionally to call 'getDateCellValue'. But this feels like a hack.
What other ways are there in the poi API to determine whether the content in a cell is a Date rather than a real number?
I have recently come across an interesting question on strings. Suppose you are given following:
Input string1: "this is a test string"
Input string2: "tist"
Output string: "t stri"
So, given above, how can I approach towards finding smallest substring of string1 that contains all the characters from string 2?
Does psycopg2 have a function for escaping the value of a LIKE operand for Postgres?
For example I may want to match strings that start with the string "20% of all", so I want to write something like this:
sql = '... WHERE ... LIKE %(myvalue)s'
cursor.fetchall(sql, { 'myvalue': escape_sql_like('20% of all') + '%' }
Is there an existing escape_sql_like function that I could plug in here?
(Similar question to How to quote a string value explicitly (Python DB API/Psycopg2), but I couldn't find an answer there.)
I do have a whole bunch of files in a directory and from every file I want to remove the first line (including carriage return). I can read the whole file into an array of strings and write all but the first element to a new file, but that looks a bit cumbersome to me are there better ways? Oh the prefered language is Perl.
I want a regex to find the following types of strings:
http://anything.abc.tld
http://anything.abc.tld/
where
abc - abc always remains abc
anything - it could be any string
tld - it could be any tld (top-level-domain) like .com .net .co.in .co.uk etc.
Note: The url must not contain any other thing at the end, means http://anything.abc.tld/xyz is not acceptable.
I am trying to create a .vcf file programmatically in C#, and writing a bunch of strings in the correct format in that file. But when i try to open it manually, the following message appears. Could not start Microsoft Outlook.The file maynot exist, you may not have permission to open it, or it may be open in another program.
Any help!!!
What does the word "literal" mean when used in context such as literal strings and literal values? what is the difference between a literal value and value?
The question is pretty straight forward, I have tried using a span with rules set to clear:both; and display:block;, at the bottom of each list entry where the text is being inserted in with no luck. I am not really sure what to do on this. I don't expect to many entries with long consecutive letter strings but for example if someone does lolololololol or ahaahahahhhhhhhhhhhhaaaaaaaa for like 100 letters, it will overflow. If anyone can give me a pointer I would really appreciate it.