text stringlengths 0 30.5k | title stringclasses 1
value | embeddings listlengths 768 768 |
|---|---|---|
We have an ASP.NET application that manages it's own User, Roles and Permission database and we have recently added a field to the User table to hold the Windows domain account.
I would like to make it so that the user doesn't have to **physically** log in to our application, but rather would be automatically logged in based on the currently logged in Windows domain account DOMAIN\username. We want to authenticate the Windows domain account against our own User table.
This is a piece of cake to do in Windows Forms, is it possible to do this in Web Forms?
I | [
0.5367158055305481,
0.04542618617415428,
0.4407660961151123,
0.0878317803144455,
-0.01849469356238842,
-0.0932304784655571,
0.17835219204425812,
-0.07787792384624481,
-0.22162552177906036,
-0.4890832006931305,
0.23238471150398254,
0.23999103903770447,
0.1629662960767746,
0.0633350685238838... | |
don't want the user to be prompted with a Windows challenge screen, I want our system to handle the log in.
**Clarification**: We are using our own custom Principal object.
**Clarification**: Not sure if it makes a difference or not, but we are using IIS7.
I did pretty much exactly what you want to do a few years ago. Im trying to find some code for it, though it was at a previous job so that code is at home.
I do remember though i used [this article](http://msdn.microsoft.com/en-us/library/ms998360.aspx) as my starting point. You set up the LDAP provider so you can actually run a | [
0.18761232495307922,
-0.1889893263578415,
0.16118741035461426,
0.14780546724796295,
-0.2157907336950302,
-0.3301655948162079,
0.21528661251068115,
0.08596368879079819,
-0.22502264380455017,
-0.6086174845695496,
0.10059940069913864,
0.37442609667778015,
-0.3488312363624573,
-0.1079427897930... | |
check of the user vs the LDAP. One thing to make sure of if you try the LDAP approach. In the setting file where you set up the LDAP make sure LDAP is all caps, if it is not it will not resolve. | [
0.11254416406154633,
-0.1576971858739853,
0.23575355112552643,
0.05379587039351463,
-0.2180054783821106,
-0.6120393872261047,
0.0652737021446228,
0.014193840324878693,
-0.09970788657665253,
-0.7059168815612793,
-0.023877616971731186,
0.776665210723877,
-0.4881133735179901,
-0.1081971824169... | |
I need to send MMS thought a C# application. I have already found 2 interesting components:
<http://www.winwap.com>
<http://www.nowsms.com>
Does anyone have experience with other third party components?
Could someone explain what kind of server I need to send those MMS? Is it a classic SMTP Server?
Typically I have always done this using a 3rd party aggregator. The messages are compiled into SMIL, which is the description language for the MMS messages. These are then sent on to the aggregator who will then send them through the MMS gateway of the Network Operator. They are typically charged on a per message | [
0.4801362156867981,
-0.015312839299440384,
0.5889777541160583,
0.06631357967853546,
-0.11428427696228027,
0.1659597009420395,
0.16604849696159363,
0.10584846884012222,
-0.015829896554350853,
-0.6363414525985718,
0.005326857324689627,
0.4747011065483093,
-0.2559816241264343,
0.1887978166341... | |
basis and the aggregators will buy the messages in a block from the operators.
If you are trying to send an MMS message without getting charged then I am not sure how to do this, or if it is possible. | [
0.9685541987419128,
-0.23087362945079803,
0.3508414924144745,
0.19026422500610352,
0.02856232225894928,
-0.17405058443546295,
-0.16968996822834015,
-0.19250331819057465,
0.018320443108677864,
-0.41487106680870056,
0.45988091826438904,
0.7849796414375305,
-0.17593421041965485,
-0.1393683105... | |
How does the comma operator work in C++?
For instance, if I do:
```
a = b, c;
```
Does a end up equaling b or c?
(Yes, I know this is easy to test - just documenting on here for someone to find the answer quickly.)
**Update:** This question has exposed a nuance when using the comma operator. Just to document this:
```
a = b, c; // a is set to the value of b!
a = (b, c); // a is set to the value of c!
```
This question was actually inspired by a typo in code. What was intended to | [
-0.09188210964202881,
0.03252522647380829,
0.24613921344280243,
-0.21935775876045227,
-0.1235346645116806,
-0.08457875996828079,
-0.0768996924161911,
-0.26204052567481995,
-0.3446713984012604,
-0.4519059956073761,
-0.2270430475473404,
0.7081990242004395,
-0.3629724979400635,
-0.22001008689... | |
be
```
a = b;
c = d;
```
Turned into
```
a = b, // <- Note comma typo!
c = d;
```
It would be equal to `b`.
The comma operator has a lower precedence than assignment. | [
-0.5021305084228516,
0.06991296261548996,
0.1771697998046875,
-0.39006921648979187,
-0.08821403980255127,
-0.07956089824438095,
-0.13676215708255768,
-0.2928231954574585,
0.04348696023225784,
-0.20863157510757446,
-0.8805303573608398,
0.5751225352287292,
-0.21018585562705994,
0.02554661966... | |
I've read the book [Programming Collective Intelligence](http://oreilly.com/catalog/9780596529321/ "Programming Collective Intelligence") and found it fascinating. I'd recently heard about a challenge amazon had posted to the world to come up with a better recommendation engine for their system.
The winner apparently produced the best algorithm by limiting the amount of information that was being fed to it.
As a first rule of thumb I guess... "**More information is not necessarily better when it comes to fuzzy algorithms."**
I know's it's subjective, but ultimately it's a measurable thing (clicks in response to recommendations).
Since most of us are dealing with the web these days and search | [
0.6243879795074463,
-0.05772852525115013,
0.028981942683458328,
0.34556257724761963,
-0.3229717016220093,
0.07263166457414627,
0.12839119136333466,
0.10145511478185654,
-0.15733258426189423,
-0.46303990483283997,
0.16106651723384857,
0.47975829243659973,
0.1256442815065384,
0.2390246242284... | |
can be considered a form of recommendation... I suspect I'm not the only one who'd appreciate other peoples ideas on this.
In a nutshell, **"What is the best way to build a recommendation ?"**
You don't want to use "overall popularity" unless you have no information about the user. Instead, you want to align this user with similar users and weight accordingly.
This is exactly what [Bayesian Inference](http://en.wikipedia.org/wiki/Bayesian_inference) does. In English, it means adjusting the overall probability you'll like something (the average rating) with ratings from other people *who generally vote your way as well*.
Another piece of advice, but this time ad | [
0.3918304741382599,
0.0711812973022461,
0.493740439414978,
0.22311976552009583,
-0.3337366282939911,
-0.2313222885131836,
0.15695315599441528,
0.14304327964782715,
-0.058652497828006744,
-0.4476807415485382,
0.12322431057691574,
0.36679360270500183,
0.24061991274356842,
0.13282246887683868... | |
hoc: I find that there are people where if they like something I will almost assuredly *not* like it. I don't know if this effect is real or imagined, but it might be fun to build in a kind of "negative effect" instead of just clumping people by similarity.
Finally there's a company specializing in exactly this called [SenseArray](http://sensearray.com/). The owner ([Ian Clarke](http://en.wikipedia.org/wiki/Ian_Clarke_(computer_scientist)) of [freenet fame](http://freenetproject.org/)) is very approachable. You can use my name if you call him up. | [
0.7604585886001587,
0.837100088596344,
0.020484603941440582,
-0.21359305083751678,
0.09782186895608902,
-0.11066535860300064,
-0.03692955896258354,
-0.03616213798522949,
-0.16647469997406006,
0.07400130480527878,
-0.07869929820299149,
0.40662726759910583,
0.17907777428627014,
0.34172129631... | |
I have two threads, one updating an int and one reading it. This is a statistic value where the order of the reads and writes is irrelevant.
My question is, do I need to synchronize access to this multi-byte value anyway? Or, put another way, can part of the write be complete and get interrupted, and then the read happen.
For example, think of a value = 0x0000FFFF that gets incremented value of 0x00010000.
Is there a time where the value looks like 0x0001FFFF that I should be worried about? Certainly the larger the type, the more possible something like this to happen.
I've | [
0.2812988758087158,
0.03281019628047943,
0.2793431282043457,
-0.015616405755281448,
0.04495181888341904,
0.024424485862255096,
0.20557400584220886,
0.14941582083702087,
-0.3948523998260498,
-0.610964834690094,
0.4048839211463928,
0.4206368029117584,
-0.14965146780014038,
0.4828167557716369... | |
always synchronized these types of accesses, but was curious what the community thinks.
At first one might think that reads and writes of the native machine size are atomic but there are a number of issues to deal with including cache coherency between processors/cores. Use atomic operations like Interlocked\* on Windows and the equivalent on Linux. C++0x will have an "atomic" template to wrap these in a nice and cross-platform interface. For now if you are using a platform abstraction layer it may provide these functions. [ACE](http://www.cse.wustl.edu/~schmidt/ACE.html) does, see the class template [ACE\_Atomic\_Op](http://www.dre.vanderbilt.edu/~schmidt/DOC_ROOT/ACE/ace/Atomic_Op.inl). | [
0.2356148660182953,
-0.023697644472122192,
0.2221168428659439,
0.36104702949523926,
0.1457730382680893,
-0.45353826880455017,
0.0961303636431694,
0.0399736687541008,
-0.5300416350364685,
-0.5939362645149231,
-0.038995981216430664,
0.28310728073120117,
-0.6793581247329712,
0.331950724124908... | |
How to implement Repository pattern withe LinqToEntities
how to implement the interface
At first one might think that reads and writes of the native machine size are atomic but there are a number of issues to deal with including cache coherency between processors/cores. Use atomic operations like Interlocked\* on Windows and the equivalent on Linux. C++0x will have an "atomic" template to wrap these in a nice and cross-platform interface. For now if you are using a platform abstraction layer it may provide these functions. [ACE](http://www.cse.wustl.edu/~schmidt/ACE.html) does, see the class template [ACE\_Atomic\_Op](http://www.dre.vanderbilt.edu/~schmidt/DOC_ROOT/ACE/ace/Atomic_Op.inl). | [
0.20580120384693146,
0.032711151987314224,
0.18060290813446045,
0.344521164894104,
0.04862746223807335,
-0.4434832036495209,
0.2101639211177826,
-0.2798222303390503,
-0.3259878158569336,
-0.7686319947242737,
0.0572340153157711,
0.1630292534828186,
-0.5193499326705933,
0.1748998761177063,
... | |
Is there a security limit to the number of Ajax [XMLHttpRequest](http://en.wikipedia.org/wiki/XMLHttpRequest) objects you can create on a single page? If so, does this vary from one browser to another?
I don't think so, but there's a limit of two simultaneous HTTP connections per domain per client (you can override this in Firefox, but practically no one does so). | [
0.19548603892326355,
-0.020532267168164253,
0.1349388211965561,
0.2375766932964325,
-0.3791079521179199,
-0.3459903597831726,
0.15800079703330994,
0.07390903681516647,
-0.5185524821281433,
-0.604091465473175,
0.11563809961080551,
0.5041627287864685,
-0.20578967034816742,
-0.153750389814376... | |
I'm working on an editor for files that are used by an important internal testing tool we use. The tool itself is large, complicated, and refactoring or rewriting would take more resources than we are able to devote to it for the forseeable future, so my hands are tied when it comes to large modifications. I must use a .NET language.
The files are XML serialized versions of four classes that are used by the tool (let's call them A, B, C, and D). The classes form a tree structure when all is well. Our editor works by loading a set | [
0.44922617077827454,
0.07909506559371948,
0.11496679484844208,
0.24382106959819794,
0.18699954450130463,
-0.01187500823289156,
0.0680156871676445,
-0.16543048620224,
0.060991834849119186,
-0.6354535222053528,
-0.04853346198797226,
0.5112708210945129,
-0.1884516030550003,
-0.009757743217051... | |
of files, deserializing them, working out the relationships between them, and keeping track of any bad states it can find. The idea is for us to move away from hand-editing these files, which introduces tons of errors.
For a particular type of error, I'd like to maintain a collection of all files that have the problem. All four classes can have the problem, and I'd like to reduce duplication of code as much as possible. An important requirement is the user needs to be able to get the items in sets; for example, they need to get all A objects with | [
0.34970512986183167,
0.2848948836326599,
0.057137541472911835,
0.44339579343795776,
0.14280018210411072,
-0.1566631942987442,
0.45214036107063293,
0.03919065743684769,
-0.414605975151062,
-0.5718453526496887,
-0.26017066836357117,
0.48090383410453796,
-0.3921552002429962,
0.281266719102859... | |
an error, and telling them to iterate over the whole collection and pick out what they want is unacceptable compared to a `GetAs()` method. So, my first thought was to make a generic item that related the deserialized object and some metadata to indicate the error:
```
public class ErrorItem<T>
{
public T Item { get; set; }
public Metadata Metadata { get; set; }
}
```
Then, I'd have a collection class that could hold all of the error items, with helper methods to extract the items of a specific class when the user needs them. This is where | [
0.08571553975343704,
-0.05561310425400734,
-0.27813640236854553,
0.27135711908340454,
-0.15285977721214294,
0.04626268520951271,
0.3742280602455139,
-0.23404167592525482,
-0.12392625957727432,
-0.3672502636909485,
-0.0689743161201477,
0.5708634853363037,
-0.6164159178733826,
0.294537723064... | |
the trouble starts.
None of the classes inherit from a common ancestor (other than `Object`). This was probably a mistake of the initial design, but I've spent a few days thinking about it and the classes really don't have much in common other than a GUID property that uniquely identifies each item so I can see why the original designer did not relate them through inheritance. This means that the unified error collection would need to store `ErrorItem<Object>` objects, since I don't have a base class or interface to restrict what comes in. However, this makes the idea of this unified | [
-0.14316262304782867,
0.3433036506175995,
0.1389254629611969,
0.22379674017429352,
0.12309574335813522,
-0.20581212639808655,
0.31115180253982544,
-0.09174427390098572,
-0.26560458540916443,
-0.5547094941139221,
0.11280874162912369,
0.6044031381607056,
-0.18895359337329865,
0.5504254102706... | |
collection a little sketchy to me:
```
Public Class ErrorCollection
{
public ErrorItem<Object> AllItems { get; set; }
}
```
However, this has consequences on the public interface. What I really want is to return the appropriate `ErrorItem` generic type like this:
```
public ErrorItem<A>[] GetA()
```
This is impossible because I can only store `ErrorItem<Object>`! I've gone over some workarounds in my head; mostly they include creating a new `ErrorItem` of the appropriate type on-the-fly, but it just feels kind of ugly. Another thought has been using a `Dictionary` to keep items organized by type, but it still doesn't seem right.
Is there some kind of pattern | [
0.09799788147211075,
0.12233922630548477,
0.08563252538442612,
0.15558461844921112,
-0.1512414515018463,
-0.052096303552389145,
0.42555859684944153,
-0.11032631248235703,
-0.4008125066757202,
-0.5277588963508606,
-0.008946985937654972,
0.5284208655357361,
-0.5351813435554504,
0.25893354415... | |
that might help me here? I know the easiest way to solve this is to add a base class that A, B, C, and D derive from, but I'm trying to have as small an impact on the original tool as possible. Is the cost of any workaround great enough that I should push to change the initial tool?
If A, B, C and D have nothing in common then adding a base class won't really get you anything. It will just be an empty class and in effect will be the same as object.
I'd just create an ErrorItem class without | [
0.3591717779636383,
0.13119304180145264,
-0.19833922386169434,
0.3978029787540436,
0.043788060545921326,
0.2381378710269928,
0.19800902903079987,
-0.11256635934114456,
-0.0878472551703453,
-0.4340966045856476,
0.33461400866508484,
0.717785656452179,
-0.0837327167391777,
0.1783255636692047,... | |
the generics, make Item an object and do some casting when you want to use the objects referenced. If you want to use any of the properties or methods of the A, B, C or D class other than the Guid you would have had to cast them anyway. | [
0.26859843730926514,
-0.23673290014266968,
0.3644714653491974,
0.4478107690811157,
-0.5503902435302734,
-0.1222301572561264,
0.044778864830732346,
-0.10934247821569443,
-0.1817513108253479,
-0.3968324661254883,
0.1547331064939499,
0.7224083542823792,
-0.32477763295173645,
0.462951421737670... | |
Let's say you work someplace where every change to source code must be associated with a bug-report or feature-request, and there is no way to get that policy reformed. In such an environment, what is the best way to deal with code refactorings (that is, changes that improve the code but do not fix a bug or add a feature)?
* Write up a bug-report and associate the refactoring with it.
* Write up a feature-request and associate the refactoring with it.
* Sneak in the refactorings while working on code that is associated with a bug-report/feature-request.
* Just don't do any refactoring.
* Other
Note | [
0.5494067072868347,
0.05171188712120056,
-0.13149471580982208,
0.042638149112463,
0.10248490422964096,
-0.2537667751312256,
0.39848044514656067,
0.05998874828219414,
-0.3596266806125641,
-0.6276483535766602,
0.04363793507218361,
0.6279136538505554,
-0.201332226395607,
-0.14920483529567719,... | |
that all bug reports and feature descriptions will be visible to managers and customers.
I vote for the "sneak in refactorings" approach, which is, I believe, the way refactoring is meant to be done in the first place. It's probably a bad idea to refactor just for the sake of "cleaning up the code." This means that you're making changes for no real reason. Refactoring is, by definition, modifying the without the intent of fixing bugs or adding features. If you're following the KISS principle, any new feature is going to need at least some refactoring because you're not really thinking | [
0.8614878058433533,
0.2895168960094452,
0.41349759697914124,
0.042942702770233154,
0.20846521854400635,
-0.15863248705863953,
0.38458868861198425,
0.11706791073083878,
-0.05374150723218918,
-0.38096529245376587,
-0.04545868933200836,
0.7018565535545349,
-0.3000973165035248,
0.1717454642057... | |
about how to make the most extensible system possible the first time around. | [
0.49873828887939453,
0.5347831845283508,
-0.3418191075325012,
0.5532869100570679,
0.06645438820123672,
-0.22756366431713104,
-0.07539615035057068,
-0.06706152111291885,
0.2203538864850998,
-0.20618295669555664,
-0.08578197658061981,
0.5216988921165466,
0.15631239116191864,
0.05183188989758... | |
I'd like to store a properties file as XML. Is there a way to sort the keys when doing this so that the generated XML file will be in alphabetical order?
```
String propFile = "/path/to/file";
Properties props = new Properties();
/*set some properties here*/
try {
FileOutputStream xmlStream = new FileOutputStream(propFile);
/*this comes out unsorted*/
props.storeToXML(xmlStream,"");
} catch (IOException e) {
e.printStackTrace();
}
```
Here's a quick and dirty way to do it:
```
String propFile = "/path/to/file";
Properties props = new Properties();
/* Set some properties here */
Properties tmp = new Properties() {
@Override
public Set<Object> | [
0.4170351028442383,
-0.2819323241710663,
0.7555582523345947,
0.09664709866046906,
0.12015416473150253,
-0.11684078723192215,
0.17844820022583008,
-0.5565503239631653,
0.01592341437935829,
-0.9166699051856995,
0.10569706559181213,
0.5415290594100952,
-0.049317941069602966,
0.096235960721969... | |
keySet() {
return Collections.unmodifiableSet(new TreeSet<Object>(super.keySet()));
}
};
tmp.putAll(props);
try {
FileOutputStream xmlStream = new FileOutputStream(propFile);
/* This comes out SORTED! */
tmp.storeToXML(xmlStream,"");
} catch (IOException e) {
e.printStackTrace();
}
```
Here are the caveats:
* The tmp Properties (an anonymous
subclass) doesn't fulfill the
contract of Properties.
For example, if you got its `keySet` and tried to remove an element from it, an exception would be raised. So, don't allow instances of this subclass to escape! In the snippet above, you are never passing it to another object or returning it to a caller who | [
0.02227482944726944,
-0.45079487562179565,
0.5796812772750854,
-0.02585565112531185,
0.05082099884748459,
-0.1496763974428177,
0.3809918165206909,
-0.4022734463214874,
-0.3824400007724762,
-0.5634874701499939,
-0.27650463581085205,
0.5353817939758301,
-0.4023304283618927,
-0.03473606333136... | |
has a legitimate expectation that it fulfills the contract of Properties, so it is safe.
* The implementation of
Properties.storeToXML could change,
causing it to ignore the keySet
method.
For example, a future release, or OpenJDK, could use the `keys()` method of `Hashtable` instead of `keySet`. This is one of the reasons why classes should always document their "self-use" (Effective Java Item 15). However, in this case, the worst that would happen is that your output would revert to unsorted.
* Remember that the Properties storage
methods ignore any "default"
entries. | [
0.026936901733279228,
-0.17892546951770782,
0.18390901386737823,
0.05022154375910759,
-0.016563499346375465,
-0.3770263195037842,
0.5429323315620422,
-0.030421411618590355,
-0.19883841276168823,
-0.6763134598731995,
-0.35347220301628113,
0.3793380558490753,
-0.29480698704719543,
0.30707368... | |
My question is simple; is it possible to over object-orient your code?
How much is too much? At what point are you giving up readability and maintainability for the sake of OO?
I am a huge OO person but sometimes I wonder if I am over-complicating my code....
Thoughts?
> is it possible to over object-orient your code
Yes | [
0.1144653782248497,
0.23834176361560822,
0.23663918673992157,
0.13245898485183716,
-0.16469024121761322,
0.025913340970873833,
0.2520706355571747,
-0.06461379677057266,
-0.051712766289711,
-0.42719319462776184,
0.11325760185718536,
0.4073980450630188,
-0.04886375367641449,
0.36720737814903... | |
I have a quandary. My web application (C#, .Net 3.0, etc) has Themes, CSS sheets and, of course, inline style definitions. Now that's alot of chefs adding stuff to the soup. All of this results, not surprisingly, in my pages having bizarre styling on occasion.
I am sure that all these styles are applied in a hierarchical method (although I am not sure of that order). The issue is that each style is applied as a "transparent" layer which just masks what it is applying. This is, I feel, a good idea as you can specifiy styles for the whole and | [
1.0322808027267456,
0.5056949257850647,
0.09068190306425095,
-0.17854271829128265,
-0.3155182898044586,
-0.08628091961145401,
0.2689029276371002,
0.17761999368667603,
-0.257395476102829,
-0.754492998123169,
0.09552391618490219,
0.19763702154159546,
0.011719240806996822,
0.3729206621646881,... | |
then one-off them as needed. Unfortunately I can't tell from which layer the style actually came from.
I could solve this issue by explicitly expressing the style at all layers but that gets bulky and hard to manage and the page(s) works 80% of the time. I just need to figure out where that squirrelly 20% came from.
IMHO, Firebug is going to be your best bet. It will tell you which file the style came from and you can click on the filename to be transported instantly to the relevant line in the file.
Note: You can hit `ctrl`+`shift`+`C` on any | [
0.5064947009086609,
0.0931621789932251,
0.4534623324871063,
0.1979631632566452,
-0.17343756556510925,
-0.1401010900735855,
0.2992650866508484,
0.13818596303462982,
-0.26761409640312195,
-0.6348237991333008,
-0.10581819713115692,
0.519099771976471,
-0.19470763206481934,
-0.09003230929374695... | |
page to select and inspect an element with the mouse. | [
-0.1210019588470459,
-0.008211683481931686,
0.4260488450527191,
0.17883585393428802,
0.054998740553855896,
-0.08203882724046707,
0.11172527074813843,
-0.23195891082286835,
-0.0904410183429718,
-0.6798304319381714,
-0.20198585093021393,
0.08562269061803818,
-0.2514575123786926,
0.0249808952... | |
I have a WCF application that has two Services that I am trying to host in a single Windows Service using net.tcp. I can run either of the services just fine, but as soon as I try to put them both in the Windows Service only the first one loads up. I have determined that the second services ctor is being called but the OnStart never fires. This tells me that WCF is finding something wrong with loading up that second service.
Using net.tcp I know I need to turn on port sharing and start the port sharing service on the | [
0.27997708320617676,
0.021138127893209457,
0.42939573526382446,
-0.05136915668845177,
-0.3111269772052765,
-0.23756298422813416,
0.07247582077980042,
-0.011167213320732117,
-0.2889151871204376,
-1.049359679222107,
0.2803216874599457,
0.7479459047317505,
-0.41556474566459656,
0.567968666553... | |
server. This all seems to be working properly. I have tried putting the services on different tcp ports and still no success.
My service installer class looks like this:
```
[RunInstaller(true)]
public class ProjectInstaller : Installer
{
private ServiceProcessInstaller _process;
private ServiceInstaller _serviceAdmin;
private ServiceInstaller _servicePrint;
public ProjectInstaller()
{
_process = new | [
0.3690107464790344,
-0.10182096809148788,
0.6037930250167847,
-0.33620485663414,
0.09696394205093384,
-0.1573365330696106,
0.7122524380683899,
-0.1280389279127121,
-0.11286012828350067,
-0.997665524482727,
-0.4110985994338989,
0.6805288195610046,
-0.2974197268486023,
0.3452931046485901,
... | |
ServiceProcessInstaller();
_process.Account = ServiceAccount.LocalSystem;
_servicePrint = new ServiceInstaller();
_servicePrint.ServiceName = "PrintingService";
_servicePrint.StartType = ServiceStartMode.Automatic;
_serviceAdmin = new ServiceInstaller();
_serviceAdmin.ServiceName = "PrintingAdminService";
_serviceAdmin.StartType = | [
0.040717512369155884,
0.04622287675738335,
0.6077767014503479,
-0.5552029013633728,
0.01512922067195177,
0.41766467690467834,
0.6908689737319946,
-0.11284094303846359,
-0.47169870138168335,
-0.7446043491363525,
-0.5853962302207947,
0.20980161428451538,
-0.22139620780944824,
0.2798222601413... | |
ServiceStartMode.Automatic;
Installers.AddRange(new Installer[] { _process, _servicePrint, _serviceAdmin });
}
}
```
and both services looking very similar
```
class PrintService : ServiceBase
{
public ServiceHost _host = null;
public PrintService()
{
ServiceName = "PCTSPrintingService";
CanStop = true; | [
0.1961418092250824,
0.010565847158432007,
0.5082907676696777,
-0.3320527970790863,
0.037598613649606705,
0.08027619123458862,
0.5786923170089722,
0.04218238964676857,
-0.20670318603515625,
-0.9370709657669067,
-0.4328841269016266,
0.5745687484741211,
-0.2649657130241394,
0.2395880222320556... | |
AutoLog = true;
}
protected override void OnStart(string[] args)
{
if (_host != null) _host.Close();
_host = new ServiceHost(typeof(Printing.ServiceImplementation.PrintingService));
_host.Faulted += host_Faulted;
_host.Open();
}
}
```
Base your service on this [MSDN article](http://msdn.microsoft.com/en-us/library/ms733069.aspx) and create two service hosts.
But | [
0.14986152946949005,
0.060344550758600235,
0.5085192918777466,
-0.3126014173030853,
0.2674528956413269,
0.19197511672973633,
0.6238480806350708,
-0.16211484372615814,
-0.311105340719223,
-0.6607980132102966,
-0.3562750220298767,
0.5405027270317078,
-0.509732723236084,
0.28198811411857605,
... | |
instead of actually calling each service host directly, you can break it out to as many classes as you want which defines each service you want to run:
```
internal class MyWCFService1
{
internal static System.ServiceModel.ServiceHost serviceHost = null;
internal static void StartService()
{
if (serviceHost != null)
{
serviceHost.Close();
}
// Instantiate new ServiceHost. | [
0.049457013607025146,
-0.0981273204088211,
0.4703885018825531,
-0.3915386497974396,
0.10921897739171982,
0.03385875001549721,
0.5290049314498901,
-0.03562767058610916,
-0.22163605690002441,
-0.8491020202636719,
-0.5829654335975647,
0.3903847932815552,
-0.47877442836761475,
0.48523512482643... | |
serviceHost = new System.ServiceModel.ServiceHost(typeof(MyService1));
// Open myServiceHost.
serviceHost.Open();
}
internal static void StopService()
{
if (serviceHost != null)
{
serviceHost.Close();
serviceHost = null;
} | [
-0.20544280111789703,
0.04383566975593567,
0.7107676863670349,
-0.5115920901298523,
0.1957385092973709,
0.2544250190258026,
0.7580553293228149,
-0.10976938158273697,
-0.13057677447795868,
-0.7586845755577087,
-0.5982614755630493,
0.513340950012207,
-0.3536361753940582,
0.45555993914604187,... | |
}
};
```
In the body of the windows service host, call the different classes:
```
// Start the Windows service.
protected override void OnStart( string[] args )
{
// Call all the set up WCF services...
MyWCFService1.StartService();
//MyWCFService2.StartService();
//MyWCFService3.StartService();
}
```
Then you can add as many WCF services as you like to one windows service host.
REMEBER to call the stop methods as well.... | [
0.22865985333919525,
-0.02398190274834633,
0.6540199518203735,
-0.19218522310256958,
0.10801228135824203,
-0.05398339405655861,
0.22275525331497192,
-0.10835131257772446,
-0.105420783162117,
-0.7552037835121155,
-0.5067414045333862,
0.5605601072311401,
-0.35511937737464905,
0.5285472869873... | |
How can I format Floats in Java so that the float component is displayed only if it's not zero? For example:
```
123.45 -> 123.45
99.0 -> 99
23.2 -> 23.2
45.0 -> 45
```
Edit: I forgot to mention - I'm still on Java 1.4 - sorry!
If you use [DecimalFormat](http://java.sun.com/j2se/1.4.2/docs/api/java/text/DecimalFormat.html) and specify # in the pattern it only displays the value if it is not zero.
See my question [How do I format a number in java?](https://stackoverflow.com/questions/50532/how-do-i-format-a-number-in-java)
Sample Code
```
DecimalFormat format = new DecimalFormat("###.##");
double[] doubles = {123.45, 99.0, 23.2, 45.0};
for(int i=0;i<doubles.length;i++){ | [
0.25244462490081787,
0.2388121485710144,
0.33082452416419983,
-0.09512746334075928,
-0.23510116338729858,
-0.09106136113405228,
0.04668618366122246,
-0.5435428619384766,
-0.27739039063453674,
-0.43240225315093994,
0.15489792823791504,
0.198734313249588,
-0.025547746568918228,
-0.0976450443... | |
System.out.println(format.format(doubles[i]));
}
``` | [
0.02187211439013481,
-0.009857913479208946,
0.30066418647766113,
-0.40062615275382996,
0.3188922703266144,
-0.07413673400878906,
0.2143760323524475,
-0.0749792829155922,
-0.30412131547927856,
-0.40027672052383423,
-0.4504812955856323,
0.6487987041473389,
-0.4163897931575775,
0.265816539525... | |
varchar(255), varchar(256), nvarchar(255), nvarchar(256), nvarchar(max), etc?
256 seems like a nice, round, space-efficient number. But I've seen 255 used a lot. Why?
What's the difference between varchar and nvarchar?
VARCHAR(255). It won't use all 255 characters of storage, just the storage you need. It's 255 and not 256 because then you have space for 255 plus the null-terminator (or size byte).
The "N" is for Unicode. Use if you expect non-ASCII characters. | [
-0.1871558129787445,
0.12507832050323486,
0.30929502844810486,
-0.09706644713878632,
-0.44942694902420044,
0.4383663833141327,
0.036180831491947174,
-0.20436103641986847,
-0.4325503408908844,
-0.22813932597637177,
-0.051951974630355835,
0.2948648929595947,
-0.3297275900840759,
0.0750060230... | |
I need to print out data into a pre-printed A6 form (1/4 the size of a landsacpe A4). I do not need to print paragraphs of text, just short lines scattered about on the page.
All the stuff on MSDN is about priting paragraphs of text.
Thanks for any help you can give,
Roberto
VARCHAR(255). It won't use all 255 characters of storage, just the storage you need. It's 255 and not 256 because then you have space for 255 plus the null-terminator (or size byte).
The "N" is for Unicode. Use if you expect non-ASCII characters. | [
0.08778192847967148,
0.15447507798671722,
0.1602127104997635,
0.30740129947662354,
0.10044915229082108,
0.15106256306171417,
0.1571214199066162,
0.20651274919509888,
-0.26290836930274963,
-0.7070105075836182,
-0.11772610992193222,
0.3464244604110718,
-0.12190251052379608,
-0.07921440154314... | |
So I'm refactoring my code to implement more OOP. I set up a class to hold page attributes.
```
class PageAtrributes
{
private $db_connection;
private $page_title;
public function __construct($db_connection)
{
$this->db_connection = $db_connection;
$this->page_title = '';
}
public function get_page_title()
{
return $this->page_title;
}
public function set_page_title($page_title)
{ | [
0.08247274160385132,
0.35593679547309875,
0.7815454006195068,
-0.1533515602350235,
-0.1306549310684204,
-0.02241460233926773,
0.2926293909549713,
-0.23848828673362732,
-0.13175706565380096,
-0.8845425844192505,
-0.30977684259414673,
0.42972496151924133,
-0.4966188967227936,
0.4348858892917... | |
$this->page_title = $page_title;
}
}
```
Later on I call the set\_page\_title() function like so
```
function page_properties($objPortal) {
$objPage->set_page_title($myrow['title']);
}
```
When I do I receive the error message:
> Call to a member function set\_page\_title() on a non-object
So what am I missing?
It means that `$objPage` is not an instance of an object. Can we see the code you used to initialize the variable?
As you expect a specific object type, you can also make use of [PHPs type-hinting feature*Docs*](http://php.net/manual/en/functions.arguments.php#functions.arguments.type-declaration) to get the error when your logic is violated:
```
function page_properties(PageAtrributes $objPortal) { | [
0.02673335373401642,
0.36428648233413696,
0.54290372133255,
-0.030822983011603355,
0.010141544975340366,
-0.4017176330089569,
0.36796045303344727,
-0.27210354804992676,
-0.17101873457431793,
-0.4089111387729645,
-0.30892637372016907,
0.6001898646354675,
-0.40045011043548584,
0.148566246032... | |
...
$objPage->set_page_title($myrow['title']);
}
```
This function will only accept `PageAtrributes` for the first parameter. | [
-0.005927677266299725,
0.1965135782957077,
0.7980740070343018,
-0.1915895640850067,
-0.0579744353890419,
-0.16761621832847595,
0.18492087721824646,
-0.006775825750082731,
0.0836796760559082,
-0.6712319254875183,
-0.4985817074775696,
0.6277151703834534,
-0.44228336215019226,
0.3292588889598... | |
I've got an `JComboBox` with a custom `inputVerifyer` set to limit MaxLength when it's set to editable.
The verify method never seems to get called.
The same verifyer gets invoked on a `JTextField` fine.
What might I be doing wrong?
I found a workaround. I thought I'd let the next person with this problem know about.
Basically. Instead of setting the inputVerifier on the ComboBox you set it to it's "Editor Component".
```
JComboBox combo = new JComboBox();
JTextField tf = (JTextField)(combo.getEditor().getEditorComponent());
tf.setInputVerifier(verifyer);
``` | [
0.2552988529205322,
-0.192728653550148,
0.4671473801136017,
-0.1260415017604828,
0.25508737564086914,
-0.10531578958034515,
0.3532406985759735,
-0.30456438660621643,
-0.09822751581668854,
-0.7516089677810669,
-0.22001734375953674,
0.8963193893432617,
-0.5112903118133545,
-0.288568764925003... | |
Does anyone know of a good example of how to expose a WCF service programatically without the use of a configuration file? I know the service object model is much richer now with WCF, so I know it's possible. I just have not seen an example of how to do so. Conversely, I would like to see how consuming without a configuration file is done as well.
Before anyone asks, I have a very specific need to do this without configuration files. I would normally not recommend such a practice, but as I said, there is a very specific need in | [
0.7332850098609924,
0.28753286600112915,
0.04160052910447121,
0.010385437868535519,
-0.016228629276156425,
-0.38767561316490173,
0.3721122145652771,
0.03518962487578392,
-0.2530759274959564,
-0.8055291175842285,
0.14648884534835815,
0.7510796189308167,
0.09064143151044846,
0.29133668541908... | |
this case.
Consuming a web service without a config file is very simple, as I've discovered. You simply need to create a binding object and address object and pass them either to the constructor of the client proxy or to a generic ChannelFactory instance. You can look at the default app.config to see what settings to use, then create a static helper method somewhere that instantiates your proxy:
```
internal static MyServiceSoapClient CreateWebServiceInstance() {
BasicHttpBinding binding = new BasicHttpBinding();
// I think most (or all) of these are defaults--I just copied them from app.config: | [
0.2562999725341797,
0.06345862150192261,
0.5484749674797058,
-0.004775422625243664,
0.020509764552116394,
-0.13481011986732483,
0.302507609128952,
-0.11782871931791306,
-0.11763881891965866,
-0.7262589931488037,
-0.22438989579677582,
0.6295197606086731,
-0.6032106280326843,
0.1842479109764... | |
binding.SendTimeout = TimeSpan.FromMinutes( 1 );
binding.OpenTimeout = TimeSpan.FromMinutes( 1 );
binding.CloseTimeout = TimeSpan.FromMinutes( 1 );
binding.ReceiveTimeout = TimeSpan.FromMinutes( 10 );
binding.AllowCookies = false;
binding.BypassProxyOnLocal = false;
binding.HostNameComparisonMode = HostNameComparisonMode.StrongWildcard;
binding.MessageEncoding = WSMessageEncoding.Text;
binding.TextEncoding = System.Text.Encoding.UTF8;
binding.TransferMode = TransferMode.Buffered;
binding.UseDefaultWebProxy = true;
return new MyServiceSoapClient( binding, new EndpointAddress( "http://www.mysite.com/MyService.asmx" ) );
}
``` | [
0.014131654985249043,
-0.08956392854452133,
1.0740504264831543,
-0.222560316324234,
0.007816960103809834,
0.07179179042577744,
0.8239651918411255,
-0.4554453194141388,
-0.3263199031352997,
-0.7329878807067871,
-0.5631539225578308,
0.10943911224603653,
-0.5191808342933655,
0.558549165725708... | |
The [ClientScriptManager.RegisterClientScriptInclude](http://msdn.microsoft.com/en-us/library/kx145dw2.aspx) method allows you to register a JavaScript reference with the Page object (checking for duplicates).
Is there an equivalent of this method for CSS references?
Similar questions apply for [ClientScriptManager.RegisterClientScriptBlock](http://msdn.microsoft.com/en-us/library/system.web.ui.clientscriptmanager.registerclientscriptblock.aspx) and [ClientScriptManager.RegisterClientScriptResource](http://msdn.microsoft.com/en-us/library/system.web.ui.clientscriptmanager.registerclientscriptresource.aspx)
Short answer: no. You could certainly roll your own functions (as CMPalmer suggests) to take CSS embedded resources (as Gulzar suggests) and embed them on the page.
As a best-practice matter, though, I'm not sure why you would want to do this. If you're making a reusable control that has a lot of CSS styling, my advice would be to just hard-code the class names into the standards-compliant output of | [
0.14441055059432983,
0.17074480652809143,
0.2983642816543579,
0.23292408883571625,
-0.176803857088089,
-0.07976216077804565,
-0.029757361859083176,
-0.36275890469551086,
-0.3553774654865265,
-0.35562074184417725,
-0.1573294997215271,
0.21371421217918396,
-0.25072047114372253,
-0.0185535270... | |
your control, and ship the control accompanied by a suggested stylesheet. This gives your users/customers the option of overriding your suggested styles to fit their needs, and in general allows them to manage their CSS setup as they see fit.
Separating style from markup is a Good Thing - you're already headed down the right path in avoiding the various built-in ASP.NET style attributes, but you should take it all the way and keep the CSS out of your .dll. | [
0.6077420711517334,
-0.21915562450885773,
0.20054197311401367,
0.344475120306015,
-0.21559520065784454,
-0.20420688390731812,
0.14335106313228607,
0.23175232112407684,
-0.08656470477581024,
-0.666283905506134,
-0.14019247889518738,
0.5256534218788147,
-0.11881311982870102,
-0.2508334815502... | |
The job at hand:
I want to make sure that my website's users view a page before they start a download. If they have not looked at the page but try to hotlink to the files directly they should go to the webpage before the download is allowed.
Any suggestions that are better than my idea to send out a cookie and - before the download starts - check if the cookie exists (via .htaccess)?
The webpage and the download files will be located on different servers.
Environment:
* Apache 2 on all machines
* PHP 5 on all machines
* MySQL 5 available on the "webpage" | [
0.4434739351272583,
0.18255694210529327,
0.291668564081192,
0.10085924714803696,
-0.2245088368654251,
-0.6282334327697754,
0.2676589787006378,
-0.019571654498577118,
-0.21096324920654297,
-0.5791917443275452,
-0.17278288304805756,
0.8113998770713806,
0.1720920354127884,
-0.0326130539178848... | |
server (no access from the download servers)
Nathan asked what the problem is that I try to solve, and in fact it is that I want to prevent hotlinks from - for example - forums. If people download from our server, using our bandwidth, I want to show them an page with an ad before the download starts. It doesn't need to be totally secure, but we need to make some money to finance the servers, right? :)
I'm going to use [mod\_auth\_token](http://www.synd.info/downloads/releases/) to make sure that the user has a "recent link".
With mod\_auth\_token you can create expiring links, i.e. if someone | [
0.3906252682209015,
0.23506848514080048,
0.47792288661003113,
0.06521613895893097,
-0.054520267993211746,
-0.16585449874401093,
0.14295999705791473,
0.12841665744781494,
-0.2810991406440735,
-0.579035758972168,
0.13857679069042206,
0.3797090947628021,
-0.2450195550918579,
0.280730634927749... | |
decides to take an existing link and post it on another website, this link will expire after a specified time. That will result in a 403 FORBIDDEN which I can catch and redirect the user to the HTML page I want him on. | [
0.35960495471954346,
0.13471361994743347,
0.6358159184455872,
0.2530744671821594,
0.2859029173851013,
-0.4911254644393921,
0.4965463876724243,
0.34352830052375793,
-0.11363179981708527,
-0.45281609892845154,
-0.3453512191772461,
-0.21325969696044922,
-0.316775381565094,
0.4455875754356384,... | |
I'm a Java programmer, and I like my compiler, static analysis tools and unit testing frameworks as tools that help me quickly deliver robust and efficient code. The JRE is pretty much everywhere I would work, too.
Given that situation, I can't see a reason why I would ever choose to use shell scripting, vb scripting etc, no matter how small the task is if I wear one of my other hats like my cool black sysadmin fedora.
I don't wear the other hats too often, **under what circumstances should I choose scripting over writing compiled code?**
Whatever you think will be most | [
0.6776936054229736,
0.35986092686653137,
0.007653979584574699,
0.06359407305717468,
0.01856408827006817,
-0.10516466945409775,
0.37762537598609924,
0.3066955804824829,
-0.2519993782043457,
-0.6815094947814941,
-0.20658482611179352,
0.636894941329956,
0.12692248821258545,
-0.103691905736923... | |
efficient for you!
I had a co-worker who seemed to use a different language for every task; Perl for quick text processing, PHP for small internal web applications, .NET for our main product, cygwin for filesystem stuff. He preferred to use the technology which was most specific to the task at hand.
Personally, I find that context switching between technologies is painful. My day-to-day work is in .NET, so that's pretty much the terms I think in. For most tasks I find it more efficient to knock something up in C# using SnippetCompiler than I would to hack around in PowerShell or | [
0.11678635329008102,
-0.003457409329712391,
0.11951266974210739,
0.2648555040359497,
-0.0771116241812706,
0.19644315540790558,
-0.04345514625310898,
0.19084402918815613,
-0.35118797421455383,
-0.7502660751342773,
-0.04517526552081108,
0.745904266834259,
-0.19625526666641235,
-0.36774364113... | |
a scripting environment. | [
-0.15079551935195923,
0.11597943305969238,
-0.3390409052371979,
0.19621212780475616,
-0.030465666204690933,
-0.28515005111694336,
-0.10543902963399887,
0.15363340079784393,
0.19113221764564514,
-0.7934677004814148,
-0.5204436779022217,
0.5369231104850769,
-0.2875765860080719,
-0.0284881386... | |
Sending a message from the Unix command line using `mail TO_ADDR` results in an email from `$USER@$HOSTNAME`. Is there a way to change the "From:" address inserted by `mail`?
For the record, I'm using GNU Mailutils 1.1/1.2 on Ubuntu (but I've seen the same behavior with Fedora and RHEL).
[EDIT]
```
$ mail -s Testing chris@example.org | [
0.44542810320854187,
0.13948287069797516,
0.08973203599452972,
-0.14578069746494293,
-0.11644010990858078,
-0.1084558293223381,
0.16743753850460052,
0.13533943891525269,
-0.27214401960372925,
-0.7711843252182007,
-0.17398054897785187,
0.33868494629859924,
-0.4617941379547119,
0.34138348698... | |
Cc:
From: foo@bar.org
Testing
.
```
yields
```
Subject: Testing
To: <chris@example.org>
X-Mailer: mail (GNU Mailutils 1.1)
Message-Id: <E1KdTJj-00025z-RK@localhost>
From: <chris@localhost>
Date: Wed, 10 Sep 2008 13:17:23 -0400
From: foo@bar.org
Testing
```
The "From: foo@bar.org" line is part of the message body, not part of the header.
In my version of mail ( Debian linux 4.0 ) the following options work for controlling the source / reply addresses
* the **-a** switch, for additional headers to apply, supplying a From: header on the command line that will be appended to the outgoing mail header
* the **$REPLYTO** environment variable specifies a | [
0.679304301738739,
0.4692123532295227,
0.5096812844276428,
0.087165467441082,
-0.1083817407488823,
-0.2944621443748474,
-0.2768959403038025,
-0.06004168465733528,
-0.427778422832489,
-0.17526815831661224,
0.1332872211933136,
0.4259762763977051,
-0.36462879180908203,
0.261290580034256,
0.... | |
Reply-To: header
so the following sequence
```
export REPLYTO=cms-replies@example.com
mail -aFrom:cms-sends@example.com -s 'Testing'
```
The result, in my mail clients, is a mail from cms-sends@example.com, which any replies to will default to cms-replies@example.com
*NB:* Mac OS users: you don't have -a , but you do have **$REPLYTO**
*NB(2):* CentOS users, many commenters have added that you need to use `-r` not `-a`
*NB(3):* This answer is at least ten years old(1), please bear that in mind when you're coming in from Google. | [
-0.12025030702352524,
0.2650861144065857,
0.6493685841560364,
-0.08846597373485565,
-0.07922327518463135,
0.457887202501297,
0.1230797991156578,
0.12311337888240814,
-0.4220753312110901,
-0.7935025095939636,
-0.07131727784872055,
0.285307914018631,
-0.12513144314289093,
0.1799279898405075,... | |
In C# WinForms, what's the proper way to get the backward/forward history stacks for the System.Windows.Forms.WebBrowser?
Check out <http://www.bsalsa.com/downloads.html>. This is a series of Delphi components (free source code, you can see an example of this here: <http://staruml.cvs.sourceforge.net/staruml/staruml/staruml/components/plastic-components/src/embeddedwb.pas?revision=1.1&view=markup> - it's the starUML projects code) and they have, among other things, a way to get at the history, favorites, etc using the IE MSHTML interfaces. It's written in Object Pascal but it shouldn't be too hard to figure out what's going on. If you download the "Embedded Web Browser Components Package" take a look at the stuff in EmbeddedWB\_D2005\Source - there's all | [
0.4170144498348236,
0.1474970281124115,
0.46225446462631226,
-0.03978140279650688,
0.06314351409673691,
-0.24949295818805695,
-0.048395395278930664,
-0.21969275176525116,
0.06815913319587708,
-0.4873081147670746,
-0.035693153738975525,
0.6258242130279541,
-0.014016135595738888,
-0.03123411... | |
sorts of goodies there. | [
0.19707854092121124,
0.29214897751808167,
-0.24673862755298615,
0.5015995502471924,
0.002169934567064047,
-0.023365557193756104,
-0.07316667586565018,
0.7681313753128052,
-0.3869439959526062,
-0.05074933543801308,
0.32841020822525024,
0.5031233429908752,
0.25919225811958313,
0.076682657003... | |
I'm working on some code that uses the System.Diagnostics.Trace class and I'm wondering how to monitor what is written via calls to Trace.WriteLine() both when running in debug mode in Visual Studio and when running outside the debugger.
Try [Debug View](http://technet.microsoft.com/en-us/sysinternals/bb896647.aspx). It works quite nicely. | [
0.5792706608772278,
-0.041546180844306946,
0.04880422353744507,
0.033421263098716736,
0.22511665523052216,
-0.23001885414123535,
0.3336181044578552,
0.20090895891189575,
-0.003905312158167362,
-0.8269566893577576,
0.2234375923871994,
0.6591349244117737,
-0.018472496420145035,
-0.1499090641... | |
I've been using the following code to open Office Documents, PDF, etc. on my windows machines using Java and it's working fine, except for some reason when a filename has embedded it within it multiple contiguous spaces like "File[SPACE][SPACE]Test.doc".
How can I make this work? I'm not averse to canning the whole piece of code... but I'd rather not replace it with a third party library that calls JNI.
```
public static void openDocument(String path) throws IOException {
// Make forward slashes backslashes (for windows)
// Double quote any path segments with spaces in them | [
0.4615405201911926,
0.26165571808815,
0.22371941804885864,
0.11701139807701111,
-0.0722377747297287,
-0.0713873952627182,
0.24357259273529053,
-0.010818122886121273,
-0.1973399668931961,
-0.9203100204467773,
0.005363654810935259,
0.5349334478378296,
-0.29467764496803284,
0.1654977500438690... | |
path = path.replace("/", "\\").replaceAll(
"\\\\([^\\\\\\\\\"]* [^\\\\\\\\\"]*)", "\\\\\\\"$1\"");
String command = "C:\\Windows\\System32\\cmd.exe /c start " + path + "";
Runtime.getRuntime().exec(command);
}
```
**EDIT:** When I run it with the errant file windows complains about finding the file. But... when I run the command line directly from the command line it runs just fine.
If you are using Java 6 you can just use the [open method of java.awt.Desktop](http://java.sun.com/javase/6/docs/api/java/awt/Desktop.html#open(java.io.File)) to launch the file using the default | [
0.042582906782627106,
-0.36059480905532837,
0.6594383120536804,
-0.11237030476331711,
0.2845505475997925,
-0.3433535695075989,
0.40664851665496826,
-0.4034200608730316,
0.08700539916753769,
-0.8303921818733215,
-0.3474598228931427,
0.8939966559410095,
-0.39641669392585754,
0.05932134017348... | |
application for the current platform. | [
0.11664476245641708,
-0.13680261373519897,
0.37684184312820435,
0.10057671368122101,
0.18350742757320404,
-0.008049181662499905,
-0.08297773450613022,
-0.11768656969070435,
-0.09882234036922455,
-0.6133792400360107,
-0.323201447725296,
0.17797178030014038,
-0.06929375976324081,
0.006279543... | |
What is the difference between old style and new style classes in Python? When should I use one or the other?
From *[New-style and classic classes](http://docs.python.org/2/reference/datamodel.html#new-style-and-classic-classes)*:
> **Up to Python 2.1, old-style classes were the only flavour available to the user.**
>
>
> The concept of (old-style) class is unrelated to the concept of type:
> if `x` is an instance of an old-style class, then `x.__class__`
> designates the class of `x`, but `type(x)` is always `<type
> 'instance'>`.
>
>
> This reflects the fact that all old-style instances, independently of
> their class, are implemented with a single built-in | [
0.17569752037525177,
0.15392941236495972,
0.25201651453971863,
-0.2932916581630707,
-0.273022323846817,
-0.05337177589535713,
0.1547265499830246,
-0.10743992775678635,
-0.2175748646259308,
-0.4500606060028076,
-0.31525492668151855,
0.5935291647911072,
-0.2770203649997711,
0.189812749624252... | |
type, called
> instance.
>
>
> **New-style classes were introduced in Python 2.2 to unify the concepts of class and type**.
> A new-style class is simply a user-defined type, no more, no less.
>
>
> If x is an instance of a new-style class, then `type(x)` is typically
> the same as `x.__class__` (although this is not guaranteed – a
> new-style class instance is permitted to override the value returned
> for `x.__class__`).
>
>
> **The major motivation for introducing new-style classes is to provide a unified object model with a full meta-model**.
>
>
> It | [
0.2356511950492859,
0.05170774832367897,
0.21832804381847382,
-0.008638267405331135,
-0.4201493263244629,
-0.2053113728761673,
0.21655283868312836,
-0.17192448675632477,
-0.09840591996908188,
-0.7469289898872375,
-0.15743176639080048,
0.47261035442352295,
-0.5618237257003784,
0.07653306424... | |
also has a number of immediate benefits, like the ability to
> subclass most built-in types, or the introduction of "descriptors",
> which enable computed properties.
>
>
> **For compatibility reasons, classes are still old-style by default**.
>
>
> New-style classes are created by specifying another new-style class
> (i.e. a type) as a parent class, or the "top-level type" object if no
> other parent is needed.
>
>
> The behaviour of new-style classes differs from that of old-style
> classes in a number of important details in addition to what type
> returns.
>
>
> | [
0.05684712529182434,
-0.12383154779672623,
0.08778046816587448,
0.04617536813020706,
-0.0331990048289299,
-0.24916552007198334,
0.2170886993408203,
-0.09879220277070999,
-0.34574541449546814,
-0.7885790467262268,
-0.5991517305374146,
0.33376646041870117,
-0.17196574807167053,
0.12955300509... | |
Some of these changes are fundamental to the new object model, like
> the way special methods are invoked. Others are "fixes" that could not
> be implemented before for compatibility concerns, like the method
> resolution order in case of multiple inheritance.
>
>
> **Python 3 only has new-style classes**.
>
>
> No matter if you subclass from `object` or not, classes are new-style
> in Python 3. | [
0.06568092107772827,
-0.09827987849712372,
0.12390108406543732,
0.025781437754631042,
-0.29611659049987793,
-0.23832954466342926,
0.372168630361557,
-0.251743346452713,
-0.27734753489494324,
-0.6176519393920898,
-0.45070764422416687,
0.5189433097839355,
-0.5045610070228577,
-0.056368373334... | |
What's the easiest way to print a stacktrace from a debugging printout? Often during testing you would like to know the callstack leading up to the situation provoking a debug message.
[Thread.dumpStack();](http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Thread.html#dumpStack()) | [
0.01803429052233696,
-0.018646907061338425,
0.22961606085300446,
-0.06817165017127991,
0.1274423748254776,
-0.2644426226615906,
0.18888618052005768,
-0.4138050377368927,
-0.3274727761745453,
-0.22464267909526825,
-0.1357114017009735,
0.5289267897605896,
-0.48662641644477844,
-0.30071556568... | |
There are lots of PHP articles about the subject so is this a PHP only problem.
I am sending emails using System.Net.Mail after some regular expression checks of course.
Similar to <http://weblogs.asp.net/scottgu/archive/2005/12/10/432854.aspx>
the PHP email injection attack works because of a weakness in the PHP Mail() function. As a .net developer you need not worry. | [
0.17382070422172546,
0.05878501012921333,
0.0358026921749115,
-0.15361838042736053,
-0.3863448202610016,
-0.02282865159213543,
0.5930792093276978,
0.22163623571395874,
-0.11526542901992798,
-0.7453095316886902,
0.32311543822288513,
0.6342936158180237,
-0.46807220578193665,
-0.1509609818458... | |
I have an `ArrayList<String>` that I'd like to return a copy of. `ArrayList` has a clone method which has the following signature:
```
public Object clone()
```
After I call this method, how do I cast the returned Object back to `ArrayList<String>`?
```
ArrayList newArrayList = (ArrayList) oldArrayList.clone();
``` | [
0.19432823359966278,
0.2143365740776062,
0.5028405785560608,
-0.2352294772863388,
0.29821905493736267,
-0.11961092054843903,
0.1321154534816742,
-0.3074885606765747,
-0.16148781776428223,
-0.5641928315162659,
0.021560009568929672,
0.4529357850551605,
-0.16048194468021393,
0.427763283252716... | |
We have an error that we can't seem to find and don't have the need/resources to try and track it down. What we do need to do is just keep the freaking "Please tell Microsoft about this problem" dialog boxes from cluttering up the server.
It is from an MS-Access error (we think) but I can't find where Access is installed (I don't think it is); there is no MS Office directory on any of the drives.
If we could just stop the dialog boxes from appearing that would be great.
Thanks.
Spec: Window Server 2003 sp2
From <http://www.codeproject.com/KB/exception/UnhandledExceptionClass.aspx>:
> If you also want to disable | [
0.11743071675300598,
0.18543143570423126,
0.22420243918895721,
0.4500405788421631,
-0.05849069356918335,
-0.6078026294708252,
0.4482661783695221,
0.24955116212368011,
-0.43501389026641846,
-0.5956206321716309,
-0.18762195110321045,
0.8014516234397888,
-0.4712948203086853,
-0.00369731639511... | |
the Windows “Send Error Report” dialog on your computer, right-click on the “My Computer” icon, select “Properties”, switch to the “Advanced” tab, and click on the “Error Reporting” button. In the Options dialog, select the “Disable error reporting” radio button:
>
> 
Compare also <http://www.codeproject.com/KB/exception/ExceptionHandling.aspx> for general .NET Exception Handling sanity. | [
-0.1446664184331894,
0.05674448981881142,
0.28368234634399414,
0.2434033900499344,
0.2042171210050583,
-0.26045310497283936,
0.6932240724563599,
0.06441914290189743,
-0.10229963809251785,
-0.7311103343963623,
-0.3538098633289337,
1.1026939153671265,
-0.20445586740970612,
0.0296503137797117... | |
When a user on our site loses his password and heads off to the Lost Password page we need to give him a new temporary password. I don't really mind how random this is, or if it matches all the "needed" strong password rules, all I want to do is give them a password that they can change later.
The application is a Web application written in C#. so I was thinking of being mean and going for the easy route of using part of a Guid. i.e.
```
Guid.NewGuid().ToString("d").Substring(1,8)
```
Suggesstions? thoughts?
There's always [`System.Web.Security.Membership.GeneratePassword(int length, int numberOfNonAlphanumericCharacters`)](http://msdn.microsoft.com/en-us/library/system.web.security.membership.generatepassword.aspx). | [
0.16026197373867035,
0.15364186465740204,
0.5361679196357727,
0.0070868488401174545,
0.07278726249933243,
-0.2991392910480499,
0.3285219371318817,
0.1261925846338272,
-0.025055497884750366,
-0.8211370706558228,
-0.22280369699001312,
0.3968573808670044,
-0.21102872490882874,
0.1864503622055... | |
What’s the best way to capitalize the first letter of each word in a string in SQL Server.
From <http://www.sql-server-helper.com/functions/initcap.aspx>
```
CREATE FUNCTION [dbo].[InitCap] ( @InputString varchar(4000) )
RETURNS VARCHAR(4000)
AS
BEGIN
DECLARE @Index INT
DECLARE @Char CHAR(1)
DECLARE @PrevChar CHAR(1)
DECLARE @OutputString VARCHAR(255)
SET @OutputString = LOWER(@InputString)
SET @Index = 1
WHILE @Index <= LEN(@InputString)
BEGIN
SET @Char = SUBSTRING(@InputString, @Index, 1)
SET @PrevChar = CASE WHEN @Index = 1 THEN ' ' | [
-0.12069283425807953,
0.012764316983520985,
0.4417543113231659,
-0.2744435966014862,
-0.09927582740783691,
0.3681372106075287,
0.022178133949637413,
-0.4939418137073517,
-0.058266766369342804,
-0.2927643656730652,
-0.03044111654162407,
0.3378089368343353,
-0.25376638770103455,
0.0330147184... | |
ELSE SUBSTRING(@InputString, @Index - 1, 1)
END
IF @PrevChar IN (' ', ';', ':', '!', '?', ',', '.', '_', '-', '/', '&', '''', '(')
BEGIN
IF @PrevChar != '''' OR UPPER(@Char) != 'S'
SET @OutputString | [
-0.27903398871421814,
-0.20773284137248993,
0.44452258944511414,
-0.12380755692720413,
0.16781224310398102,
-0.1056167259812355,
0.31826743483543396,
-0.439906507730484,
0.010050402022898197,
-0.2587509751319885,
-0.4770106375217438,
0.3068229556083679,
-0.2618374228477478,
-0.113406337797... | |
= STUFF(@OutputString, @Index, 1, UPPER(@Char))
END
SET @Index = @Index + 1
END
RETURN @OutputString
END
GO
```
There is a simpler/smaller one here (but doesn't work if any row doesn't have spaces, "Invalid length parameter passed to the RIGHT function."):
<http://www.devx.com/tips/Tip/17608> | [
0.29309383034706116,
-0.24094806611537933,
0.7489562630653381,
0.03142986446619034,
0.2278187870979309,
-0.3349180817604065,
0.10829097032546997,
-0.4970385730266571,
-0.17812404036521912,
-0.298223614692688,
-0.06309007108211517,
0.2864286005496979,
-0.274271696805954,
0.16005480289459229... | |
I have a class to parse a matrix that keeps the result in an array member:
```
class Parser
{
...
double matrix_[4][4];
};
```
The user of this class needs to call an API function (as in, a function I have no control over, so I can't just change its interface to make things work more easily) that looks like this:
```
void api_func(const double matrix[4][4]);
```
The only way I have come up with for the caller to pass the array result to the function is by making the member public:
```
void myfunc()
{
Parser parser;
...
api_func(parser.matrix_);
}
```
Is this the only way to do things? | [
0.17676971852779388,
0.1868428736925125,
0.2451523393392563,
-0.13971906900405884,
-0.0598272979259491,
-0.01074546854943037,
0.25726720690727234,
-0.291677325963974,
0.026524268090724945,
-0.34709271788597107,
-0.1432807594537735,
0.4509294629096985,
-0.6309405565261841,
0.012542246840894... | |
I'm astounded by how inflexible multidimensional arrays declared like this are. I thought `matrix_` would essentially be the same as a `double**` and I could cast (safely) between the two. As it turns out, I can't even find an *unsafe* way to cast between the things. Say I add an accessor to the `Parser` class:
```
void* Parser::getMatrix()
{
return (void*)matrix_;
}
```
This will compile, but I can't use it, because there doesn't seem to be a way to cast back to the weirdo array type:
```
// A smorgasbord of syntax errors...
api_func((double[][])parser.getMatrix());
api_func((double[4][4])parser.getMatrix());
api_func((double**)parser.getMatrix()); // cast works but it's | [
0.29917970299720764,
0.18644359707832336,
0.06994495540857315,
-0.07578422874212265,
0.05803564563393593,
-0.09832260757684708,
0.5294410586357117,
-0.3434889614582062,
-0.03012232854962349,
-0.5194568037986755,
0.10991531610488892,
0.6547343730926514,
-0.3637760877609253,
0.04315181076526... | |
to the wrong type
```
The error is:
> error C2440: 'type cast' : cannot convert from 'void \*' to 'const double [4][4]'
...with an intriguing addendum:
> There are no conversions to array types, although there are conversions to references or pointers to arrays
I can't determine how to cast to a reference or pointer to array either, albeit that it probably won't help me here.
To be sure, at this point the matter is purely academic, as the `void*` casts are hardly cleaner than a single class member left public!
Here's a nice, clean way:
```
class Parser
{
public:
typedef double matrix[4][4];
// ... | [
0.33972564339637756,
0.3610042929649353,
-0.003915728069841862,
-0.13411778211593628,
-0.07344557344913483,
0.074257031083107,
0.6098574995994568,
-0.08883717656135559,
0.00128103734459728,
-0.6731789112091064,
0.10806446522474289,
0.6534422636032104,
-0.4103536605834961,
0.230669245123863... | |
const matrix& getMatrix() const
{
return matrix_;
}
// ...
private:
matrix matrix_;
};
```
Now you're working with a descriptive type name rather than an array, but since it's a `typedef` the compiler will still allow passing it to the unchangeable API function that takes the base type. | [
0.08685571700334549,
0.0582142174243927,
0.467110276222229,
-0.1984698623418808,
-0.11364268511533737,
-0.0388789176940918,
0.10835044831037521,
-0.3468589186668396,
-0.022821912541985512,
-0.33775845170021057,
-0.20164111256599426,
0.5419780015945435,
-0.6541449427604675,
0.03718278184533... | |
What are the different database options on Windows Mobile available?
I have used CEDB and EDB for linear dataset needs.
I have heard of SQL server 2005 Mobile edition. But what are the advantages over others (if there is any)
I've found both sqllite and codebase to be easy to implement and install. Easier (and more stable) than the Microsoft options, which seem to be in serious flux. | [
-0.033136218786239624,
0.2654030919075012,
0.49877607822418213,
0.10218196362257004,
0.020064815878868103,
-0.120386503636837,
-0.00673305569216609,
-0.05143331363797188,
-0.09484831988811493,
-0.6660556793212891,
0.12239109724760056,
0.7624214291572571,
-0.14956922829151154,
-0.1515250205... | |
I've inherited a desktop application which has a custom .NET file chooser that is embedded in a control, but it has some issues.
I'd like to replace it with a non-custom File Chooser (like the `OpenFileDialog`).
However, for a variety of reasons it needs to be embedded in the parent control not a popup dialog.
Is there a control I'm missing, or does MS only provide the popup dialog out of the box?
The .Net control is a thin wrapper for the common dialog built into windows, and that *is* a dialog. So there is no way to embed | [
0.23504135012626648,
-0.19454888999462128,
0.20542851090431213,
0.3412046730518341,
0.12493016570806503,
-0.1954919844865799,
0.07579343020915985,
0.23347505927085876,
-0.15046574175357819,
-0.5293728709220886,
-0.04165663570165634,
0.4323817193508148,
-0.4159661829471588,
0.35091096162796... | |
it as though it were a control. | [
-0.16137805581092834,
-0.027200017124414444,
0.16048955917358398,
0.2090832144021988,
-0.1566217839717865,
-0.18844552338123322,
-0.08987108618021011,
-0.09465834498405457,
-0.03523341566324234,
0.01824983023107052,
0.09734022617340088,
0.15530921518802643,
-0.18989694118499756,
0.28438645... | |
I have an asp.net web page written in C#.
Using some javascript I popup another .aspx page which has a few controls that are filled in and from which I create a small snippet of text.
When the user clicks OK on that dialog box I want to insert that piece of text into a textbox on the page that initial "popped up" the dialog/popup page.
I'm guessing that this will involve javascript which is not a strong point of mine.
How do I do this?
You will have to do something like:
```
parent.opener.document.getElemenyById('ParentTextBox').value = "New Text";
``` | [
0.49649977684020996,
0.1906270831823349,
0.267744779586792,
-0.0016222272533923388,
-0.0973544642329216,
0.01772223971784115,
0.10010946542024612,
-0.04915495216846466,
-0.15274347364902496,
-0.9519332647323608,
-0.03266456350684166,
0.3709643483161926,
-0.18504437804222107,
0.180853515863... | |
I looking for a way, specifically in PHP that I will be guaranteed to always get a unique key.
I have done the following:
```
strtolower(substr(crypt(time()), 0, 7));
```
But I have found that once in a while I end up with a duplicate key (rarely, but often enough).
I have also thought of doing:
```
strtolower(substr(crypt(uniqid(rand(), true)), 0, 7));
```
But according to the PHP website, uniqid() could, if uniqid() is called twice in the same microsecond, it could generate the same key. I'm thinking that the addition of rand() that it rarely would, but still possible.
After the lines mentioned above I am also remove characters such as L | [
0.14892986416816711,
0.15460458397865295,
0.3572957515716553,
0.008991132490336895,
-0.009005129337310791,
-0.012756893411278725,
0.27790719270706177,
-0.05967298150062561,
-0.27450940012931824,
-0.7380533218383789,
0.16010519862174988,
0.4512977600097656,
-0.1729150414466858,
0.1282464414... | |
and O so it's less confusing for the user. This maybe part of the cause for the duplicates, but still necessary.
One option I have a thought of is creating a website that will generate the key, storing it in a database, ensuring it's completely unique.
Any other thoughts? Are there any websites out there that already do this that have some kind of API or just return the key. I found <http://userident.com> but I'm not sure if the keys will be completely unique.
This needs to run in the background without any user input.
There are only 3 ways to generate unique values, | [
0.564113438129425,
0.1851576715707779,
0.3257470428943634,
0.41183236241340637,
0.23474828898906708,
-0.07453224062919617,
0.06314743310213089,
0.1459566354751587,
-0.2690916061401367,
-0.38184118270874023,
0.3306369185447693,
0.5365286469459534,
0.04921188950538635,
0.1508263200521469,
... | |
rather they be passwords, user IDs, etc.:
1. Use an effective GUID generator - these are long and cannot be shrunk. If you only use part **you FAIL**.
2. At least part of the number is sequentially generated off of a single sequence. You can add fluff or encoding to make it look less sequential. Advantage is they start short - disadvantage is they require a single source. The work around for the single source limitation is to have numbered sources, so you include the [source #] + [seq #] and then each source can generate its own sequence.
3. Generate them via | [
0.5121510028839111,
-0.020664766430854797,
0.03794107213616371,
0.4579019248485565,
0.08608907461166382,
0.013448760844767094,
-0.04714169725775719,
-0.27576082944869995,
-0.3262326121330261,
-0.522262454032898,
-0.24226905405521393,
0.2855953872203827,
-0.1906137764453888,
-0.007486920803... | |
some other means and then check them against the single history of previously generated values.
Any other method is not guaranteed. Keep in mind, fundamentally you are generating a binary number (it is a computer), but then you can encode it in Hexadecimal, Decimal, Base64, or a word list. Pick an encoding that fits your usage. Usually for user entered data you want some variation of Base32 (which you hinted at).
**Note about GUIDS**: They gain their strength of uniqueness from their length and the method used to generate them. *Anything less than 128-bits is not secure.* Beyond random number generation there | [
0.3829413950443268,
0.08718491345643997,
-0.12691093981266022,
0.4988706409931183,
-0.018104255199432373,
-0.10972389578819275,
0.09728410840034485,
-0.23641705513000488,
-0.2781539857387543,
-0.6127405166625977,
-0.12458513677120209,
0.3403466045856476,
-0.15861983597278595,
0.10477536171... | |
are characteristics that go into a GUID to make it more unique. Keep in mind they are only practically unique, not completely unique. It is possible, although practically impossible to have a duplicate.
**Updated Note about GUIDS**: Since writing this I learned that many GUID generators use a cryptographically secure random number generator (difficult or impossible to predict the next number generated, and a not likely to repeat). There are actually 5 different [UUID algorithms](http://en.wikipedia.org/wiki/Universally_Unique_Identifier#Definition). Algorithm 4 is what Microsoft currently uses for the Windows GUID generation API. A [GUID](http://en.wikipedia.org/wiki/Globally_unique_identifier) is Microsoft's implementation of the UUID standard.
**Update**: If you want | [
0.11256428062915802,
-0.013655419461429119,
0.41313910484313965,
0.07616812735795975,
-0.28279221057891846,
-0.11374739557504654,
-0.024868689477443695,
-0.009615791961550713,
-0.28157204389572144,
-0.6491273045539856,
-0.01991780288517475,
0.27994728088378906,
-0.23523291945457458,
0.2250... | |
7 to 16 characters then you need to use either method 2 or 3.
**Bottom line**: Frankly there is no such thing as completely unique. Even if you went with a sequential generator you would eventually run out of storage using all the atoms in the universe, thus looping back on yourself and repeating. Your only hope would be the heat death of the universe before reaching that point.
Even the best random number generator has a possibility of repeating equal to the total size of the random number you are generating. Take a quarter for example. It is a completely random | [
0.16112235188484192,
0.09795767813920975,
0.062140557914972305,
0.17830190062522888,
-0.3363909125328064,
0.13505563139915466,
0.21121330559253693,
0.08171027898788452,
-0.4643639624118805,
-0.25149041414260864,
-0.053338829427957535,
-0.004639670252799988,
0.024866029620170593,
0.42953321... | |
bit generator, and its odds of repeating are 1 in 2.
So it all comes down to your threshold of uniqueness. You can have 100% uniqueness in 8 digits for 1,099,511,627,776 numbers by using a sequence and then base32 encoding it. Any other method that does not involve checking against a list of past numbers only has odds equal to n/1,099,511,627,776 (where n=number of previous numbers generated) of not being unique. | [
0.03412260115146637,
0.019825253635644913,
-0.05116819217801094,
0.18806079030036926,
-0.13383179903030396,
0.23561638593673706,
0.34668171405792236,
-0.44474315643310547,
-0.26201361417770386,
-0.19096797704696655,
0.18844477832317352,
0.3220573365688324,
-0.07547186315059662,
0.300121456... | |
What is the best way of implementing a cache for a PHP site? Obviously, there are some things that shouldn't be cached (for example search queries), but I want to find a good solution that will make sure that I avoid the 'digg effect'.
I know there is WP-Cache for WordPress, but I'm writing a custom solution that isn't built on WP. I'm interested in either writing my own cache (if it's simple enough), or you could point me to a nice, light framework. I don't know much Apache though, so if it was a PHP framework then it would be | [
0.4737674593925476,
0.21633994579315186,
-0.014447692781686783,
0.3219212591648102,
-0.10714606195688248,
-0.0879412591457367,
0.35923850536346436,
0.06472760438919067,
0.0077940248884260654,
-0.702274739742279,
0.4540046453475952,
0.35167196393013,
-0.3369603157043457,
0.12312251329421997... | |
a better fit.
Thanks.
If a proxy cache is out of the question, and you're serving complete HTML files, you'll get the best performance by bypassing PHP altogether. Study how [WP Super Cache](http://ocaoimh.ie/wp-super-cache/) works.
Uncached pages are copied to a cache folder with similar URL structure as your site. On later requests, mod\_rewrite notes the existence of the cached file and serves it instead. other RewriteCond directives are used to make sure commenters/logged in users see live PHP requests, but the majority of visitors will be served by Apache directly. | [
0.24220095574855804,
-0.17747549712657928,
0.4386155605316162,
0.13031400740146637,
-0.14189501106739044,
-0.2292974442243576,
0.46857038140296936,
-0.18491321802139282,
-0.21579155325889587,
-1.1720174551010132,
-0.3232434391975403,
0.3832310140132904,
-0.06966672092676163,
0.115810200572... | |
What are the JVM implementations available on Windows Mobile?
[Esmertec JBed](http://www.esmertec.com/40.html) is the one on my WinMo phone.
Wondering how many other JVM vendors are in this zone. Are there any comparison or benchmarking data available?
JVM Choices for Windows CE in general (including Pocket PC and Windows Mobile):
* CrE-ME
* [Mysaifu](http://www2s.biglobe.ne.jp/~dat/java/project/jvm/index_en.html)
* [Skelmir CEEJ](http://www.skelmir.com/solutions/handheld.html)
If you're looking to have a common code base between WinMo and Symbina, you might also look at [Red Five Labs](http://www.redfivelabs.com/). They have a Symbian runtime that allows you to run COmpact Framework apps, so you could have a CF codebase that works on both. I evaluated the early betas of | [
0.4500029683113098,
0.2261025607585907,
0.38406631350517273,
0.05403773486614227,
0.06327243894338608,
0.11256515979766846,
-0.11206173896789551,
-0.05901346728205681,
-0.03135232254862785,
-0.6344155073165894,
0.0290568545460701,
0.5833779573440552,
0.10136373341083527,
-0.009314469993114... | |
Red Five's offering, but haven't used it since, so I can't attest to the quality or coverage. | [
0.3624882698059082,
0.017659828066825867,
-0.010257069021463394,
-0.02363796904683113,
-0.06479989737272263,
0.3023562729358673,
-0.171047180891037,
0.6102203726768494,
-0.2747882306575775,
-0.3564368188381195,
0.5295080542564392,
0.730208158493042,
0.28891003131866455,
0.00890179723501205... | |
When I build my [ASP.NET](http://en.wikipedia.org/wiki/ASP.NET) web application I get a .dll file with the code for the website in it (which is great) but the website also needs all the .aspx files and friends, and these need to be placed in the correct directory structure. How can I get this all in one directory as the result of each build? Trying to pick the right files out of the source directory is a pain.
The end result should be xcopy deployable.
**Update:** I don't want to have to manually use the Publish command which I'm aware of. I want the full set | [
0.5321944952011108,
0.2541273236274719,
0.6948718428611755,
0.13798914849758148,
-0.10700912028551102,
-0.2413741499185562,
0.18092192709445953,
-0.01877445913851261,
-0.37109461426734924,
-0.9518499970436096,
-0.16319119930267334,
0.3630630075931549,
0.012580808252096176,
-0.1681432425975... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.