text stringlengths 0 30.5k | title stringclasses 1
value | embeddings listlengths 768 768 |
|---|---|---|
the server's own classpath?
NOTE: The answer below is only valid for Java EE 5. As was brought to my attention in one of the other answers, Java EE 6 does support this. So if you're using Java EE 6, don't read this answer, but read the other relevant answer.
From my own research and from the responses to this question... | [
0.17066368460655212,
-0.09149623662233353,
0.44174954295158386,
-0.051940515637397766,
-0.07084838300943375,
-0.09151959419250488,
0.4742080569267273,
-0.03803672641515732,
-0.1609298139810562,
-0.7353188395500183,
-0.0007732724188826978,
0.22193630039691925,
-0.5096389055252075,
-0.076768... | |
own internal classes that implement LoginModule or Realm themselves. You can however not customize the whole login process because many methods of the LoginModule interface are marked final in Glassfish's superclass. The custom LoginModule and Realm classes must be placed in the AS classpath (not the application's), an... | [
0.15516027808189392,
-0.2215866595506668,
0.4655420184135437,
0.1448301523923874,
-0.06383219361305237,
-0.03437093645334244,
0.5128665566444397,
-0.06973406672477722,
-0.46353787183761597,
-0.6639711260795593,
-0.10849983245134354,
0.4657360315322876,
-0.24619004130363464,
0.3822531402111... | |
implementations of Realm and LoginModule). However, even tomcat doesn't allow deploying your custom realm from your .war.
Note that none of the Application Servers that showed up my results seem to be able to take full advantage of all the JAAS Callbacks. All of them seem to only support the basic username+password sc... | [
0.2276201695203781,
-0.13331878185272217,
0.35255706310272217,
0.035476475954055786,
-0.10150864720344543,
-0.032061319798231125,
0.6360349655151367,
-0.22979533672332764,
-0.282034695148468,
-0.7874356508255005,
0.18260478973388672,
0.35053494572639465,
-0.5075898170471191,
-0.02740930952... | |
all, here's the Realm implementation:
```
public class WebserviceRealm extends AppservRealm {
private static final Logger log = Logger.getLogger(WebserviceRealm.class.getName());
private String jaasCtxName;
private String hostName;
private int port;
private String uri;
@Override
protected void init(Properties props... | [
-0.06470977514982224,
-0.025694096460938454,
0.6997928023338318,
-0.15670831501483917,
0.38764888048171997,
0.04772988334298134,
0.5697380304336548,
-0.3870033621788025,
-0.08442974835634232,
-0.7642894983291626,
-0.515675961971283,
0.690131425857544,
-0.33197230100631714,
0.39283519983291... | |
!= null){
try{
this.port = Integer.parseInt(configPort);
}catch(NumberFormatException nfe){
log.warning("Illegal port number: " + configPort + ", using default port (8181) instead");
}
}
}
@Override
public String getJAASContext() {
return jaasCtxName;
}
public E... | [
-0.049104366451501846,
-0.12645606696605682,
0.3100939989089966,
-0.32587817311286926,
0.17913934588432312,
0.05384059622883797,
0.6539836525917053,
-0.3517051041126251,
-0.24954676628112793,
-0.45799440145492554,
-0.47693413496017456,
0.540871798992157,
-0.4501049816608429,
0.259101480245... | |
{
return "My Webservice Realm";
}
public String getHostName() {
return hostName;
}
public int getPort() {
return port;
}
public String getUri() {
return uri;
}
}
```
And then the LoginModule implementation:
```
public class WebserviceLoginModule extends AppservPasswordLoginModule {
// all variabl... | [
-0.07263340055942535,
-0.05147870257496834,
0.657107949256897,
-0.010252919979393482,
0.22515976428985596,
-0.16060252487659454,
0.5386664867401123,
-0.23285835981369019,
-0.14479419589042664,
-0.7176368236541748,
-0.5136347413063049,
0.4769509434700012,
-0.32170233130455017,
0.42088606953... | |
_password);
// must be called as last operation of the login method
this.commitUserAuthentication(groups);
}
@Override
public boolean commit() throws LoginException {
if (!_succeeded) {
return false;
}
// fetch some more information through the webservice...
return super.commit();
}
... | [
0.0712510198354721,
-0.19747570157051086,
0.611551821231842,
0.014328211545944214,
0.3107811212539673,
-0.20433920621871948,
0.46133744716644287,
-0.04396762698888779,
-0.21706165373325348,
-0.7468098402023315,
-0.1934095025062561,
0.6697022318840027,
-0.2125956267118454,
0.286096900701522... | |
that file:
```
myWebserviceRealm { // use whatever String is returned from you realm's getJAASContext() method
my.auth.login.WebserviceLoginModule required;
};
```
This is what got things working for me on glassfish. Again, this solution is not portable across application servers, but as far as I can tell, there... | [
0.2941308915615082,
0.14405611157417297,
0.5483524799346924,
0.05860533565282822,
0.1369202435016632,
-0.18204471468925476,
0.43728357553482056,
0.34952864050865173,
-0.1959850788116455,
-0.9075679183006287,
-0.003225727705284953,
0.4726001024246216,
-0.027326839044690132,
0.37535485625267... | |
I use the following expression to select all the links in this "path":
```
$J('#leftmenu li div a")
```
The problem is that inside i can have the following hierarchy:
```
<ul id="lefmenu">
<li><div><a href="#">foo</a>
<ul><li><div><a href="#">subfoo</a>
</li>/ul>
</li>
</ul>
```
Using this expression this selects... | [
-0.10065151005983353,
0.1692027896642685,
0.6976743340492249,
-0.10894519835710526,
0.06617145240306854,
0.39234161376953125,
0.2596423923969269,
-0.2256961613893509,
-0.012565883807837963,
-1.1163766384124756,
-0.15923985838890076,
0.510444164276123,
-0.3313625752925873,
0.039288554340600... | |
I am using SQL Server Reporting to display data using a chart. How do I create my dataset so that the graph displays one line for males & one line for females.
Thanks
Beth
Do you mean two lines as in
* one per x or y axis
* one per data series
* This stupid thing won't allow me to comment so I'm wasting space with a... | [
0.3815622925758362,
0.07668211311101913,
0.1450522243976593,
0.1465817242860794,
-0.32438722252845764,
0.26808875799179077,
0.17795568704605103,
0.1733715981245041,
-0.25056686997413635,
-0.6457686424255371,
0.5258204936981201,
-0.08013607561588287,
-0.15159988403320312,
0.4607283174991607... | |
If a user on my site said they were the Wikipedia user "example" what would be the best way of confirming they are indeed that Wikipedia user & not an imposter?
Ask them to put something on their user page, then check the history to see whether it was really them who put it there. | [
0.9906436204910278,
0.4526401460170746,
-0.18356801569461823,
-0.015381049364805222,
-0.032491713762283325,
-0.09181907773017883,
0.3942006528377533,
0.039823565632104874,
-0.25165650248527527,
-0.17195281386375427,
0.2966572940349579,
0.3119107484817505,
-0.10783124715089798,
0.1439333260... | |
I'm trying to understand how strategies some folks use to distinguish instance vars vs. properties. A common pattern is the following:
```
@interface MyClass : NSObject {
NSString *_myVar;
}
@property (nonatomic, retain) NSString *myVar;
@end
@implementation MyClass
@synthesize myVar = _myVar;
```
Now, I thoug... | [
-0.07197049260139465,
0.15354707837104797,
0.16530118882656097,
-0.1805228590965271,
-0.31022825837135315,
-0.05258190631866455,
0.23171491920948029,
-0.40152987837791443,
-0.10002590715885162,
-0.7381267547607422,
0.012490132823586464,
0.7969406247138977,
-0.13499008119106293,
0.510492682... | |
is I figured that writing code such as:
```
myVar = some_other_object; // doesn't work.
```
The compiler complains that myVar is undeclared. Why is that the case?
Thanks.
Properties are just setters and getters for `ivars` and should (almost) always be used instead of direct access.
```
@interface APerson : NSObj... | [
-0.10548479855060577,
0.11242704838514328,
0.4216561019420624,
-0.19985659420490265,
-0.16938136518001556,
0.005271616857498884,
0.2459004819393158,
-0.5016784071922302,
-0.19178026914596558,
-0.8539165258407593,
-0.07162518054246902,
0.53813636302948,
-0.38748419284820557,
0.1728944033384... | |
those two methods (not 100% accurate):
```
- (NSString *)name {
return [[_name copy] autorelease];
}
- (void)setName:(NSString *)value {
[value retain];
[_name release];
_name = value;
}
```
It's easy now to distinguish between `ivars` and getters/setters. The accessors have got the `self.` prefix. Y... | [
0.012498755939304829,
0.2065785676240921,
0.3844276964664459,
-0.15105529129505157,
-0.15138289332389832,
-0.10764069855213165,
0.28617826104164124,
-0.55983966588974,
-0.19468547403812408,
-0.2942076623439789,
0.0626133605837822,
0.7380926012992859,
-0.36108171939849854,
0.356141269207000... | |
This blog <http://blogs.msdn.com/sqlserverstorageengine/archive/2009/01/04/managing-tempdb-in-sql-server-tempdb-configuration.aspx> states that it is a good idea to "Spread TempDB across at least as many equal sized files as there are COREs or CPUs."
So my basic question is how do i actually configure my SQL server to... | [
0.6325393915176392,
0.1413336843252182,
0.2788093686103821,
0.21438580751419067,
-0.4583446681499481,
-0.6656893491744995,
0.033557675778865814,
0.15512070059776306,
-0.10773418098688126,
-0.666519284248352,
0.344442754983902,
0.37458541989326477,
-0.011223204433918,
0.25750645995140076,
... | |
Otherwise, the different threads which create different temp tables will be in contention for the same physical disk.
You can indeed do exactly what you say to do and the work will be automatically spread across the TempDB data files. This can also be scripted as such:
```
ALTER DATABASE tempdb
ADD FILE (NAME = tempd... | [
0.5273668766021729,
-0.19257405400276184,
0.5309978723526001,
0.08642987161874771,
-0.16514091193675995,
0.18226100504398346,
0.004615968558937311,
-0.7907803058624268,
-0.0916040912270546,
-0.8590459823608398,
-0.07661333680152893,
0.6220067739486694,
-0.23919683694839478,
-0.061480190604... | |
I'm creating a browser based game and at the moment I'm designing the script that updates the position of my character when he/she clicks on a different part of the map.
I am using a bit of ajax to do this which send a request to a php file called position\_update.php. But for it to work I need to send two values alon... | [
0.125585675239563,
-0.15554513037204742,
0.5513412952423096,
-0.006214543245732784,
-0.14794021844863892,
0.06589187681674957,
-0.020082691684365273,
0.07376614212989807,
-0.13090594112873077,
-1.0548737049102783,
0.2220756709575653,
0.41143593192100525,
-0.09358017146587372,
-0.0429452396... | |
global to retrieve the values when they're sent.
Thanks, Stanni
You need to hit the URL:
```
position_update.php?var1=val1&var2=val2
```
PHP will parse the get string into $\_GET | [
-0.17628972232341766,
-0.03938547894358635,
0.6055660843849182,
0.19968196749687195,
0.17667409777641296,
-0.009262900799512863,
0.20303669571876526,
0.6096546053886414,
-0.41785669326782227,
-0.4094226658344269,
0.048221345990896225,
0.7192142605781555,
-0.2685362994670868,
0.035863596946... | |
I would like to comment this with a line:
```
{% if something.property %}
<table>
<tr>...
{% # this is a comment %}
{% if something.property %}
<table>
<tr>...
```
As answer by Miles, `{% comment %}...{% endcomment %}` is used for multi-line comments, but you can also comment out text on the ... | [
0.1857304871082306,
0.30437013506889343,
0.30817049741744995,
0.07027021795511246,
-0.021324221044778824,
-0.0760587602853775,
-0.06457611173391342,
0.10664446651935577,
0.00019472870917525142,
-0.5982195734977722,
0.036463312804698944,
0.20108215510845184,
-0.2523358166217804,
0.456719785... | |
I am confused on how to modify the web.config appSettings values at runtime. For example, I have this appSettings section:
```
<appSettings>
<add key="productspagedesc" value="TODO: Edit this default message" />
<add key="servicespagedesc" value="TODO: Edit this default message" />
<add key="contactspagedesc" va... | [
0.13107812404632568,
0.36934953927993774,
0.47887471318244934,
-0.1250009834766388,
0.03796159103512764,
-0.19850189983844757,
0.29665449261665344,
-0.01790294423699379,
-0.1569390445947647,
-1.0844130516052246,
0.1706239879131317,
0.7610177397727966,
-0.26098448038101196,
0.16638830304145... | |
5 years later. I would like to point out that experience has told me, we should not put any configuration that intentionally is editable at runtime in the web.config file but instead we should put it in a separate XML file as what one of the users commented below. This will not require any of edit of web.config file to... | [
0.18165120482444763,
0.12866809964179993,
0.8884016871452332,
-0.04623132944107056,
0.3051106631755829,
-0.32074952125549316,
0.43816515803337097,
-0.018831539899110794,
-0.34698599576950073,
-0.7316969633102417,
-0.0013731063809245825,
0.573312520980835,
-0.2572120428085327,
0.41445738077... | |
that indicates whether individual pages can be configured using the element. If the "allowLocation" is false, it cannot be configured in individual elements.
Finally, it makes a difference if you run your application in IIS and run your test sample from Visual Studio. The ASP.NET process identity is the IIS account, ... | [
0.12657590210437775,
-0.23388807475566864,
0.4017004668712616,
0.19553321599960327,
0.16788725554943085,
0.036860961467027664,
0.07699965685606003,
-0.2329099476337433,
-0.45341435074806213,
-0.6467489004135132,
-0.17478680610656738,
-0.01756526343524456,
0.04324287176132202,
0.03311645239... | |
In a C function called from my Lua script, I'm using `luaL_ref` to store a reference to a function. However, if I then try to use the returned integer index to fetch that function from a different thread which isn't derived from the same state, all I get back is `nil`. Here's the simplest example that seems to demonstr... | [
0.07157757133245468,
0.0921609103679657,
0.3613611161708832,
-0.30490121245384216,
0.1736448109149933,
0.19073419272899628,
0.06922115385532379,
0.03719235584139824,
-0.014227486215531826,
-0.827083170413971,
-0.1390562504529953,
0.2509869635105133,
-0.30062785744667053,
0.4216754138469696... | |
was that the registry was globally shared between all C code, so can anyone explain why this doesn't work?
If the registry isn't globally shared in that way, how can I get access to my values like I need to from another script?
The registry is just a normal table in a Lua state, therefore two unrelated Lua states can'... | [
0.36084648966789246,
0.026028672233223915,
0.08344081044197083,
0.3623569905757904,
0.13725678622722626,
0.10823369771242142,
0.03440388664603233,
-0.031008116900920868,
-0.45590463280677795,
-0.2529822587966919,
0.17681804299354553,
0.23819760978221893,
-0.2614167332649231,
0.494118034839... | |
your C code. unfortunately, there's no available method to copy arbitrary values between two states, so you'll have to unroll any tables.
copying functions is especially hard, if you're using the registry for that, you might want to keep track of which state you used to store it, and execute it on the original state, ... | [
0.18824107944965363,
0.17937862873077393,
0.15438903868198395,
0.27769625186920166,
0.24871313571929932,
-0.053229257464408875,
0.07220692932605743,
0.1398175209760666,
-0.26473820209503174,
-0.5654692053794861,
-0.021901145577430725,
0.39096757769584656,
-0.4188450574874878,
0.33231413364... | |
Should be easy. I have an object. I want to modify it, but before i do I want to save a copy of it that I can go back to. I tried setting copy = original but when i modify the attributes of the original the copy also shows the changes. I am assuming this is because in actionscript any time you assign, it really just st... | [
-0.10701777786016464,
0.10463542491197586,
0.2885096073150635,
-0.03456924483180046,
0.2287452518939972,
-0.19612233340740204,
0.36315110325813293,
-0.1827162504196167,
-0.22348688542842865,
-0.7260885834693909,
-0.18111269176006317,
0.5490338206291199,
-0.5186854600906372,
-0.086023434996... | |
reference to the copy. The copy is made using a native serialization technique. This means that custom serialization will be respected during the copy.
This method is designed for copying data objects, such as elements of a collection. It is not intended for copying a UIComponent object, such as a TextInput control. I... | [
0.4981609880924225,
0.17229056358337402,
0.541535496711731,
0.3764863908290863,
0.166804701089859,
-0.09917011111974716,
-0.06916014105081558,
-0.17551469802856445,
-0.22439157962799072,
-0.6116465926170349,
-0.17850786447525024,
0.4864351153373718,
-0.32994893193244934,
0.1927542388439178... | |
In the Stack Overflow podcasts, Joel Spolsky constantly harps on Jeff Atwood about Jeff not knowing how to write code in C. His statement is that "knowing C helps you write better code." He also always uses some sort of story involving string manipulation and how knowing C would allow you to write more efficient string... | [
0.39794081449508667,
0.44947972893714905,
-0.29582303762435913,
0.3101843595504761,
0.08344216644763947,
-0.10335200279951096,
0.35444414615631104,
0.028813567012548447,
-0.5125133395195007,
-0.13192948698997498,
0.07400542497634888,
0.4864289462566376,
-0.1596565991640091,
-0.126133322715... | |
of real-world situations where knowing C would be useful while writing a project in a high-level/dynamic language like perl or python.
Edit: Reading some of the answers you guys have submitted have been great, but still doesn't make any sense to me in this regard:
Take the strcat example. There's a right way and a wr... | [
0.15571434795856476,
0.18392729759216309,
-0.551453173160553,
0.20511293411254883,
-0.23475854098796844,
-0.0725848600268364,
0.17818836867809296,
-0.29876095056533813,
-0.2861413061618805,
-0.1118030846118927,
-0.22908924520015717,
0.4878310263156891,
-0.42969462275505066,
-0.394576787948... | |
and strlen](http://www.joelonsoftware.com/articles/fog0000000319.html), and spotting "Shlemiel the painter" algorithms in general.
It's not that you need C to solve problems that higher-level languages can't solve, it's that knowing C well gives you a perspective on what's going on underneath all those levels of langu... | [
0.2751339375972748,
0.21937158703804016,
0.02314285933971405,
0.13962124288082123,
-0.2896603047847748,
-0.001810345333069563,
0.38441064953804016,
0.020415473729372025,
-0.3004017770290375,
-0.4966268241405487,
-0.0542508140206337,
0.5904053449630737,
0.28947845101356506,
-0.1333527714014... | |
may be proficient in C and yet still write horrible, grotty, kludgy code in every other language you touch.
C is a low-level language, yet it still has modern control structures and functions so you aren't always getting caught up in the fiddly details. It's very difficult to become proficient at C without gaining a m... | [
0.6260864734649658,
0.42261719703674316,
0.08547606319189072,
0.32567599415779114,
-0.09302441775798798,
-0.3538902997970581,
0.6204210519790649,
0.18257258832454681,
0.036337293684482574,
-0.4793570935726166,
-0.341259241104126,
0.5013993978500366,
0.3398283123970032,
-0.20654067397117615... | |
the best programmers the best, rather it is a greater mastery of the fundamentals. Experience has shown that knowledge of C tends to have a higher correlation to mastery of certain of those fundamentals, and that learning C tends to be one of the easier and more common routes to acquiring such knowledge. | [
0.24117887020111084,
0.23771372437477112,
-0.15945889055728912,
0.6361348628997803,
-0.17247284948825836,
-0.25283169746398926,
0.424544095993042,
0.1739574670791626,
-0.16826806962490082,
-0.5366488695144653,
-0.3693620562553406,
0.8951783180236816,
0.429512619972229,
-0.3108714520931244,... | |
I have an ASP.NET website that uses C# and I'd like to call functions from an unmanaged C/C++ DLL. How do I do it?
Check out P/Invoke.
[Calling Win32 DLLs in C# with P/Invoke](http://web.archive.org/web/20110616075559/https://msdn.microsoft.com/en-us/library/aa719104(v=vs.71).aspx)
If it's a COM dll, then you can use... | [
0.2294006049633026,
-0.048040132969617844,
0.2335471212863922,
0.02666238509118557,
-0.13361746072769165,
0.01573212631046772,
0.1227005124092102,
-0.005566229112446308,
-0.41015541553497314,
-0.6633890867233276,
-0.1899620145559311,
0.42460381984710693,
-0.205290749669075,
0.1457275003194... | |
I have a list of data like so:
```
ID AddressPurpose Address ...
1 L
1 P
2 L
2 P
3 P
3 L
4 P
4 L
5 P
6 L
```
I want to be able to filter the data so that for each unique number if there is a P row then it is returned else the L row is returned. So the data will look like this:
```
ID AddressPurpose Addres... | [
-0.11638863384723663,
-0.0034869497176259756,
0.31322142481803894,
-0.010463287122547626,
-0.19041834771633148,
0.043263230472803116,
-0.10119559615850449,
-0.3930095434188843,
-0.30265358090400696,
-0.83943772315979,
0.11034821718931198,
0.45308294892311096,
-0.41017645597457886,
0.143012... | |
orderby c.AddressPurpose descending
group c by c.ID
into g
select g;
var finalList = new List<Company>();
foreach (var list in query)
{
finalList.Add(list.First());
}
return finalList;
```
**Is there a better way to do this without using the extra foreach?**
Why don't you ... | [
-0.19225555658340454,
-0.1634291708469391,
0.6148133873939514,
-0.45458394289016724,
0.07245135307312012,
0.2020125389099121,
-0.09235796332359314,
-0.3488675057888031,
-0.35858288407325745,
-0.3984007239341736,
-0.4746111333370209,
0.6083248853683472,
-0.6679884195327759,
0.10931816697120... | |
I want to apply the ["ordering"](http://docs.djangoproject.com/en/dev/ref/models/options/#ordering) Meta option to the Django model User from django.contrib.auth.models. Normally I would just put the Meta class in the model's definition, but in this case I did not define the model. So where do I put the Meta class to m... | [
0.09765031188726425,
0.07782731205224991,
0.2745399475097656,
-0.12047906965017319,
0.04620877653360367,
0.09574556350708008,
-0.14330124855041504,
-0.06162252277135849,
-0.33570951223373413,
-0.3643207252025604,
0.24546551704406738,
0.5877044200897217,
-0.5789338946342468,
0.0365890450775... | |
to explicitly write your code to target it. (Of course, as mentioned, you'd also have to be on trunk.)
My sense is that you want *all* `User` queries to be ordered, including in third party apps that you don't control. In such a circumstance, monkeypatching the base class is relatively easy and very unlikely to cause ... | [
0.24161791801452637,
0.20697325468063354,
0.1933492124080658,
-0.1604463905096054,
-0.19742035865783691,
-0.19728334248065948,
0.314470112323761,
0.024452390149235725,
-0.32327893376350403,
-0.537800133228302,
-0.3627607822418213,
0.5570199489593506,
-0.6388784050941467,
-0.272016018629074... | |
How can I parse text and find all instances of hyperlinks with a string? The hyperlink will not be in the html format of `<a href="http://test.com">test</a>` but just `http://test.com`
Secondly, I would like to then convert the original string and replace all instances of hyperlinks into clickable html hyperlinks.
I ... | [
0.10974576324224472,
0.18445582687854767,
0.3605279326438904,
0.14892283082008362,
-0.3421943187713623,
-0.2136252075433731,
0.34921279549598694,
-0.1972898244857788,
-0.015464415773749352,
-0.446368932723999,
-0.24625560641288757,
0.29158779978752136,
-0.3628436028957367,
0.01448732614517... | |
http://tinyurl.com/blah"
r = re.compile(r"(http://[^ ]+)")
print r.sub(r'<a href="\1">\1</a>', myString)
```
Output:
```
This is my tweet check it out <a href="http://tinyurl.com/blah">http://tinyurl.com/blah</a>
``` | [
0.2222878783941269,
-0.1364155262708664,
0.6260369420051575,
-0.1265449821949005,
0.21017232537269592,
0.024313490837812424,
0.08921689540147781,
0.248787984251976,
-0.14433227479457855,
-0.39973393082618713,
-0.23165838420391083,
0.3084146976470947,
-0.41593900322914124,
-0.12288998812437... | |
I am trying to trigger a show/hide of one div at a time.
What is happening is that all the divs (.shareLink) are opening at the same time.
Below is my jQuery:
```
$(document).ready(function(){
$(".shareLink").hide();
$("a.trigger").click(function(){
$(".shareLink").toggle("400");
return false;
});
});
```
Below is... | [
0.4546394944190979,
-0.017168015241622925,
0.7593509554862976,
-0.5147742629051208,
-0.17478333413600922,
-0.08546195924282074,
0.40563270449638367,
-0.29718998074531555,
-0.07664000988006592,
-0.7027536630630493,
-0.19567471742630005,
0.5289258360862732,
-0.44728031754493713,
0.0851220786... | |
$(this).parents('dl.links').next('div.shareLink').toggle(400);
return false;
});
});
```
This walks up to the parent DL and then moves over to the next shareLink div and toggles it. | [
0.12121431529521942,
-0.04155128449201584,
0.7782845497131348,
-0.3192217946052551,
0.34767216444015503,
-0.18509075045585632,
0.1333581507205963,
-0.20121948421001434,
-0.01517145149409771,
-0.9200690984725952,
-0.28536340594291687,
0.4955207407474518,
-0.4427471458911896,
0.5430613756179... | |
I am currently in need of a high performance java storage mechanism.
This means:
**1)** I have 10,000+ objects with 1 - Many Relationship.
**2)** The objects are updated every 5 seconds, with the most recent updates persistent in the case of system failure.
**3)** The objects need to be queryable in a reasonable ti... | [
0.1836034059524536,
0.17546656727790833,
0.7117783427238464,
-0.08898545056581497,
-0.038798149675130844,
0.0513620488345623,
0.3695792853832245,
-0.08548688888549805,
-0.22507810592651367,
-1.0139065980911255,
-0.14124634861946106,
0.25200456380844116,
0.06643934547901154,
0.1616128981113... | |
the needed recoverablity.
I am not exactly happy with the performance. Especially the JMS part of this.
After doing some Stack Overflow research, I am wondering if this would be a better solution. Keep in mind that I have no experience with what Terracotta gives me.
I would use Terracotta to distribute objects arou... | [
0.0429103821516037,
-0.45421627163887024,
0.01873021572828293,
0.33906084299087524,
-0.08849940448999405,
0.29089197516441345,
-0.015783242881298065,
0.08866014331579208,
-0.25438570976257324,
-0.4832596182823181,
0.25972676277160645,
0.6131360530853271,
0.3441399037837982,
0.1540222913026... | |
Your problem seems not to be related to the processing logic. It's more around the Storage/Communication point.
1. Identify your bottleneck! Benchmark the Storage/Logic/JMS processing time and overhead!
2. Kill JMS issues with a good JMS framework (eg. ActiveMQ) and a good/tuned configuration.
3. Maybe a distributed k... | [
0.1155301034450531,
-0.20309902727603912,
0.3300647735595703,
0.2559282183647156,
0.044094763696193695,
-0.38668233156204224,
0.643169641494751,
-0.1863277405500412,
-0.18539828062057495,
-0.650397539138794,
-0.17751410603523254,
0.7985489964485168,
-0.23509955406188965,
-0.051882613450288... | |
Question can also be:
*What is your preferred way of invoking stored procedures to fill a DataGrid?*
I am currently developing an ASP.NET Page, and I would like to know if Linq is the right way to go for use with my SQL Server DB.
ADO seems nice too, so I would just like to have feedback on what is the most appropr... | [
0.32073208689689636,
0.17576320469379425,
0.2040831744670868,
0.2460743933916092,
-0.25549572706222534,
-0.10787596553564072,
0.016455264762043953,
-0.07438483834266663,
-0.16126880049705505,
-0.44446298480033875,
0.13881856203079224,
0.31376636028289795,
-0.048419039696455,
-0.09612162411... | |
think I want to do a foreach
> there..but all examples seem to point that way.. or I'm just confused
[I have read this blog post](http://blogs.interfacett.com/dan-wahlins-blog/2008/2/17/linq-and-lambdas-and-sprocsoh-my.html), and [this one](http://msdn.microsoft.com/en-us/library/bb546186.aspx), it seems the ways to ... | [
0.22101828455924988,
0.20072966814041138,
0.39968159794807434,
-0.01080517377704382,
0.08057858794927597,
-0.2250603288412094,
-0.007375834044069052,
-0.1435817927122116,
-0.2148924320936203,
-0.37695419788360596,
-0.03169740363955498,
0.44232288002967834,
-0.06323852390050888,
0.044599954... | |
to SQL. You are correct in thinking that you should not be using any foreach loops - all you need is databinding.
eg. In your code behind, you might have a DataBind event that does something like this:
```
protected void GridView1_DataBanding(object sender, EventArgs e)
{
// Get an instance of our generat... | [
0.33023133873939514,
-0.3050193190574646,
0.15531016886234283,
0.1594407856464386,
0.1702401489019394,
-0.4250473380088806,
-0.006586385425180197,
-0.09439285844564438,
-0.3616108298301697,
-0.39125820994377136,
-0.03997072950005531,
0.5480426549911499,
-0.4267239570617676,
-0.042501542717... | |
WebConfigurationManager.ConnectionStrings["AdventureWorksCS"].ConnectionString);
// Get a strongly typed List from the Stored Procedure output
List<DAL.MySPResult> myData = db.MySP().ToList();
GridView1.DataSource = myData;
}
```
You will need to have setup your Stored Procedure ... | [
0.0940403938293457,
-0.07891307026147842,
0.27584877610206604,
0.040553003549575806,
0.08424228429794312,
-0.14882463216781616,
0.27783283591270447,
-0.34133270382881165,
-0.3053913712501526,
-0.8827947974205017,
-0.1578848958015442,
0.17290180921554565,
-0.35809797048568726,
-0.0271033365... | |
I've got a .NET library in which I need to find all the classes which have a custom attribute I've defined on them, and I want to be able to find them on-the-fly when an application is using my library (ie - I don't want a config file somewhere which I state the assembly to look in and/ or the class names).
I was look... | [
0.25270259380340576,
-0.017394034191966057,
0.4199149012565613,
0.1068381816148758,
0.1768397092819214,
0.024390844628214836,
-0.011298881843686104,
0.0668242797255516,
-0.36763471364974976,
-0.538064181804657,
-0.06244652345776558,
0.2751843333244324,
-0.13606207072734833,
0.1728491336107... | |
possible*, but the lower the trust the happier I'd be). I also want to keep performance in mind (it's a .NET 3.5 library so LINQ is completely valid!).
So is `AppDomain.CurrentDomain` my best/ only option and then just looping through all the assemblies, and then types in those assemblies? Or is there another way
```
... | [
0.22112686932086945,
-0.1661367416381836,
0.16306762397289276,
-0.0008102204301394522,
0.27030500769615173,
-0.08759341388940811,
0.46989431977272034,
-0.47894221544265747,
0.013501319102942944,
-0.6384516358375549,
-0.027943935245275497,
0.5418782830238342,
-0.3142111897468567,
-0.0442666... | |
from t in a.GetTypes()
where t.IsDefined(typeof(TAttribute),inherit)
select t;
}
``` | [
0.12027261406183243,
-0.4594539701938629,
-0.22308111190795898,
-0.2811563014984131,
0.09588908404111862,
-0.1838863641023636,
0.3374611437320709,
-0.3502034544944763,
0.3953079879283905,
-0.42083775997161865,
-0.36803290247917175,
0.5280522704124451,
-0.6205681562423706,
0.328718364238739... | |
I have been playing around with a search control and i have noticed that when you try and press enter from within the textbox it submits the form but doesnt click the search button (like i want it to).
My markup is:
```
<div>
<span>Search</span>
<asp:TextBox ID="txtSearch" runat="server" Width="170"
o... | [
-0.00023364959633909166,
-0.008568909019231796,
0.8974097967147827,
-0.31593644618988037,
-0.3073931932449341,
-0.04076740890741348,
0.1672050803899765,
-0.37408962845802307,
-0.1895461231470108,
-0.6112309694290161,
-0.21081958711147308,
0.658087968826294,
-0.12742631137371063,
-0.1290471... | |
and it runs, but when i try to use JQuery to call the Click() function from the button it does nothing.
How can i make it so when enter is pressed in the textbox it "clicks" the button?
After playing around with a few different things i finally came up with the solution.
I wrapped the textbox and button in an asp:pan... | [
0.3676859736442566,
-0.30330920219421387,
0.7829174399375916,
-0.0487237423658371,
-0.038253724575042725,
-0.08014688640832901,
0.3215100169181824,
-0.10365752875804901,
-0.10349787026643753,
-0.599561870098114,
0.21428216993808746,
0.8487719893455505,
-0.22269678115844727,
-0.028139345347... | |
works perfectly.
```
<asp:Panel ID="pnlSearch" runat="server" DefaultButton="imbSearch">
...
</asp:Panel>
``` | [
-0.21919238567352295,
-0.1874362975358963,
0.69129878282547,
-0.15486198663711548,
0.2380044013261795,
-0.3001260757446289,
-0.040999360382556915,
-0.032668646425008774,
-0.22441212832927704,
-0.8067641258239746,
-0.2994764745235443,
0.734478771686554,
-0.038593217730522156,
-0.26829820871... | |
I have a few `TextField`s in my `Frame`. I want to know which `TextField` currently has focus. How can I find this information?
`JFrame.getFocusOwner()` (inherited from [`Window.getFocusOwner()`](http://java.sun.com/javase/6/docs/api/java/awt/Window.html#getFocusOwner())) ought to return a reference to the component wi... | [
0.3591774106025696,
-0.14247296750545502,
0.569470226764679,
-0.04734378308057785,
-0.03906283900141716,
-0.21384431421756744,
0.013869553804397583,
0.3662429451942444,
-0.13260789215564728,
-0.6765586733818054,
-0.36010172963142395,
0.7295076251029968,
-0.04844271391630173,
-0.07904309034... | |
Today I realized that I no longer have a ”Web Content Form” option (where you select a MasterPage) when I add new items to my ASP.NET web application. I know how to manually add a MasterPage to a web form, it’s just such a pain – and I really don’t understand why Web Content Forms suddenly are missing.
Visual Studio T... | [
0.32226094603538513,
0.004774362780153751,
0.4410407543182373,
0.1470680683851242,
-0.41406720876693726,
-0.011898652650415897,
0.18952445685863495,
-0.016263777390122414,
-0.511843740940094,
-0.630642831325531,
0.18272709846496582,
0.8706197738647461,
0.12651465833187103,
0.23944389820098... | |
Studio 9.0\Common7\IDE\ItemTemplates\
and the template for the content page is this:
C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\ItemTemplates\CSharp\Web\1033\ContentPage.zip
I am unsure about how you would get a new copy of that file if it is missing for you without reinstalling VS | [
0.3495045602321625,
0.19556832313537598,
0.5348138809204102,
-0.043165307492017746,
-0.0435028038918972,
-0.22597400844097137,
0.02966626174747944,
0.21546272933483124,
-0.03767753392457962,
-0.5748975276947021,
-0.19029514491558075,
0.3997234106063843,
-0.37948882579803467,
-0.00820816867... | |
I'm trying to read in a hardcoded bitmap image into a bitmap object. I keep getting the same error:
> System.ArgumentException: Parameter is
> not valid.
This is the code i have...
```
const string fakeByteData = "AAECAwQFBgcICQoLDA0ODxAREhMUFRYXGBkaGxwdHh8gISIjJCUmJygpKissLS4vMDEyMzQ1Njc4OTo7PD0+P0BBQkNERUZHSElKS... | [
0.18386462330818176,
0.36086785793304443,
0.21747945249080658,
0.20326393842697144,
0.07873731106519699,
-0.08672039955854416,
0.6994918584823608,
0.055544834583997726,
-0.2875901758670807,
-0.5787672400474548,
0.07845266908407211,
0.49723517894744873,
-0.17880135774612427,
0.2139359414577... | |
an image in it.
If you dump the data to disk after base64 decoding it, you'll find it's just bytes 0x00, 0x01, 0x02 etc right up to 0xff.
EDIT: To address your comment in the question: this is "bad" data in that it doesn't represent an image. You may want to have a unit test for such a case, but you can't write a uni... | [
0.22304704785346985,
0.023525428026914597,
0.36242789030075073,
0.3123715817928314,
0.017966346815228462,
0.12295810878276825,
0.21689319610595703,
-0.08273063600063324,
-0.18632768094539642,
-0.6150384545326233,
-0.08916768431663513,
0.2919207811355591,
-0.2419966459274292,
0.100182145833... | |
sample *valid* data for a red spot, taken from [the Wikipedia entry for the data URI scheme](http://en.wikipedia.org/wiki/Data_URI_scheme):
```
string fakeByteData =
"iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAABGdBTUEAALGP"
+ "C/xhBQAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9YGARc5KB0XV+IA"
+ "AAAddEVYd... | [
0.10406021773815155,
0.3226652145385742,
0.13484366238117218,
0.1828809380531311,
0.07121801376342773,
0.3509080708026886,
0.5006864070892334,
-0.44021615386009216,
0.02933894842863083,
-0.06720787286758423,
-0.1529151350259781,
0.2222474068403244,
-0.18534137308597565,
0.17319391667842865... | |
I have a ASP.Net application which implements a web service. Within the ASP.Net application there's a test script which consumes the web service and it all works etc.
I have built a .NET console application and want to 'Add a Web Reference' so that the console app can consume the web service provided by the ASP.NET ap... | [
0.8610494136810303,
0.33838239312171936,
0.07116187363862991,
0.20476138591766357,
0.0134204663336277,
-0.0044235484674572945,
0.05723242834210396,
0.03182920813560486,
-0.037827081978321075,
-0.6501346826553345,
0.06890244036912918,
0.4722524583339691,
-0.17963038384914398,
0.378454387187... | |
know what ?
**Update**
I just wanted to clarify something - I'm not desperate to use UDDI it just seems that's the only option in my circumstances which are :
* I'm actually doing this for another developer who is used to using Visual Studio to do this stuff
* The other developers system will need to run on another... | [
0.7564780116081238,
0.16740939021110535,
0.3772302567958832,
0.12408597022294998,
-0.16517335176467896,
-0.020990625023841858,
0.16683566570281982,
0.2412622720003128,
-0.3073858618736267,
-0.5416893362998962,
0.15776261687278748,
0.42974424362182617,
-0.1939697116613388,
0.348605275154113... | |
in the question: this is "bad" data in that it doesn't represent an image. You may want to have a unit test for such a case, but you can't write a unit test which expects a *real* image based on data which doesn't represent a valid image.
How will you be getting your image data in real life? Will it be as a base-64 en... | [
0.3229818046092987,
0.052927594631910324,
0.42231830954551697,
0.3590388894081116,
0.11416997015476227,
0.10592205077409744,
0.29814037680625916,
-0.2623955011367798,
-0.14676056802272797,
-0.37712687253952026,
-0.08339415490627289,
0.3497134745121002,
-0.26588174700737,
0.0233752466738224... | |
+ "AAAddEVYdENvbW1lbnQAQ3JlYXRlZCB3aXRoIFRoZSBHSU1Q72QlbgAAAF1J"
+ "REFUGNO9zL0NglAAxPEfdLTs4BZM4DIO4C7OwQg2JoQ9LE1exdlYvBBeZ7jq"
+ "ch9//q1uH4TLzw4d6+ErXMMcXuHWxId3KOETnnXXV6MJpcq2MLaI97CER3N0"
+ "vr4MkhoXe0rZigAAAABJRU5ErkJggg==";
``` | [
-0.1716214120388031,
0.44768860936164856,
0.6702800393104553,
-0.015218247659504414,
-0.14882391691207886,
0.09245190024375916,
0.45791977643966675,
-0.31696805357933044,
-0.13004904985427856,
-0.2908174395561218,
-0.2919812798500061,
0.754128098487854,
-0.05884569510817528,
0.453067570924... | |
I am trying to do something fairly simple but seems like a near impossible task with the SharePoint API.
My SharePoint Data Structure is like:
-Folder
--- Sub Folder
--------Item A
--------Item B
--------Item C
--------Item D
For some strange reason you cannot access the Folder and subfolders ... | [
0.19585634768009186,
0.0623616985976696,
0.25783658027648926,
0.20428413152694702,
-0.10112819075584412,
-0.10197512060403824,
0.22094908356666565,
0.008323687128722668,
-0.12667310237884521,
-0.7755098342895508,
0.25580039620399475,
0.3196968138217926,
-0.14617756009101868,
0.643860578536... | |
Folder or not in order to manage the structure in code.
Now I am writing Custom Objects to make the SharePoint object model a bit more meaningful and group data in the hierarchical that I expect. I'm planning for my SharePoint items to be mapped as follows:
```
public class Folder
{
public Folder Parent {get; set... | [
0.40133345127105713,
-0.1278398334980011,
0.09383882582187653,
0.21873946487903595,
-0.050552550703287125,
-0.0014791844878345728,
0.01786685734987259,
0.0068348306231200695,
-0.40632033348083496,
-1.0508993864059448,
-0.0997086763381958,
0.28954145312309265,
-0.39094334840774536,
0.292704... | |
my custom object model?
EDIT:
My final solution was too loop through the folder starting from list.RootFolder.SubFolders.
```
var query = from SPList list in Utils.GetList(webRelativeUrl, listName)
from SPFolder folder in list.RootFolder.SubFolders
where folder.Name.ToLower() != "... | [
0.05323591083288193,
-0.19861803948879242,
0.7942291498184204,
-0.00020436382328625768,
-0.12415977567434311,
0.2511041462421417,
0.5277991890907288,
-0.43961572647094727,
-0.4902978539466858,
-0.4244876801967621,
0.00953623652458191,
0.46471285820007324,
-0.415213018655777,
0.309397310018... | |
{
Name = folder.Name,
Children = (from SPFolder subFolder in folder.SubFolders //Further looping of sub folders | [
-0.09306115657091141,
-0.015230687335133553,
0.09799876064062119,
0.31520703434944153,
0.5257737636566162,
0.33867835998535156,
0.11636306345462799,
0.06553143262863159,
-0.6035107970237732,
-0.6940089464187622,
-0.40255245566368103,
-0.044918403029441833,
-0.21300536394119263,
0.310410708... | |
select new Folder
{
Name = subFolder.Name, | [
-0.059287916868925095,
-0.2888655364513397,
0.13327656686306,
0.04729829356074333,
0.37458547949790955,
0.0732605829834938,
-0.10491537302732468,
0.08297482132911682,
-0.3412007987499237,
-0.6746950149536133,
-0.560997724533081,
0.3594648241996765,
-0.5485444664955139,
0.5202702283859253,
... | |
Items = (from SPFile file in subFolder.Files
select new Item | [
0.03769249469041824,
-0.23285925388336182,
0.6977628469467163,
0.286063551902771,
-0.00973754096776247,
0.15160506963729858,
-0.09946628659963608,
-0.29646679759025574,
-0.7744930982589722,
-0.46165645122528076,
-0.3292677402496338,
0.15659131109714508,
-0.12041407078504562,
0.319532990455... | |
{
//Mapping code omitted | [
0.09776637703180313,
0.09345046430826187,
-0.12502744793891907,
-0.06831903755664825,
0.11160873621702194,
0.044851191341876984,
0.22367267310619354,
0.1553971916437149,
-0.07611280679702759,
-0.3225187361240387,
-0.22198347747325897,
0.2747540771961212,
-0.0722886398434639,
-0.26319530606... | |
} ).ToList() | [
0.04771151766180992,
-0.31081971526145935,
0.19437327980995178,
-0.2889403998851776,
0.6068010330200195,
-0.1074850782752037,
0.28023242950439453,
-0.32286712527275085,
-0.12975165247917175,
-0.40660375356674194,
-0.29818859696388245,
0.8230611681938171,
-0.7525278925895691,
0.052179925143... | |
}
{)
}
return query.ToList();
```
For your specific purpose, what is wrong(\*) with getting the SPList.RootFolder from the list and working from there, recursively traversing the subfolders and items in each folder?
(\*) | [
-0.05103972926735878,
-0.09054265916347504,
0.31234171986579895,
-0.0862947627902031,
0.3550342917442322,
-0.2299848347902298,
0.22620965540409088,
-0.12682659924030304,
-0.4353755712509155,
-0.5098336338996887,
-0.17911528050899506,
0.4146709144115448,
-0.5630037188529968,
0.1284006088972... | |
Ignoring the performance aspect here... | [
0.24631519615650177,
0.33582043647766113,
-0.45754754543304443,
-0.0193453561514616,
-0.47503215074539185,
-0.4714551568031311,
0.44629520177841187,
0.3387790620326996,
0.25530657172203064,
-0.6368923187255859,
0.10005682706832886,
0.40775424242019653,
-0.25275135040283203,
0.1058059111237... | |
I am working in a WPF application. And my problem is regarding the GridSplitter visiblity.
In my xaml code,I am maitaining a Grid. In the 3rd row of Grid, I am hosting a Winform DataGridView. In the same row, the GridSplitter is written.
When GridSplitter is dragged to adjust Grid Row sizes, for other controls like B... | [
0.10323644429445267,
0.25256597995758057,
0.6780433058738708,
-0.24260562658309937,
-0.16992908716201782,
-0.2469838261604309,
0.1473187506198883,
0.06809358298778534,
0.003702546237036586,
-0.9423363208770752,
0.13395725190639496,
0.4950525164604187,
-0.2532590329647064,
0.392554193735122... | |
GridSplitter. It did not make any difference.
Can anyone help me with this?
Following is my XAML sample code:-
```
<Grid>
<Grid.RowDefinitions>
<RowDefinition Name="rowForButton"/>
<RowDefinition Name="rowForGridSplitter" Height="Auto" MinHeight="81" />
</Grid.RowDefinitions>
<Button Gri... | [
-0.3161503076553345,
-0.1018529087305069,
0.7797203660011292,
0.05411694198846817,
-0.20015965402126312,
0.13821862637996674,
-0.07635719329118729,
-0.5569193959236145,
-0.22264927625656128,
-0.8308613300323486,
0.19530990719795227,
0.5032107830047607,
0.04374171793460846,
-0.1748759746551... | |
<GridSplitter BorderThickness="1" Panel.ZIndex="1" Grid.Row="1" HorizontalAlignment="Stretch" Height="5" ShowsPreview="True" VerticalAlignment="Top">
</GridSplitter>
</Grid>
```
Thanks.
Not automagically, no. The "mega dropdown list" is really just a DIV element positioned to look as if it was the "Guide Index" ... | [
0.0997551828622818,
-0.27543875575065613,
0.8211488127708435,
0.08556431531906128,
-0.03970108553767204,
-0.1480577141046524,
-0.07344477623701096,
-0.29116395115852356,
-0.27182912826538086,
-0.5654696822166443,
-0.016512762755155563,
0.5929866433143616,
-0.18399930000305176,
-0.074990801... | |
<!-- all the items in the guide index -->
</div>
</outerelement>
```
I can't remember off the the top of my head how to use the prototype helpers in Rails to generate this, but you just need some Javascript code to do this when the "Guide Index" link is clicked:
```
Element.toggle('index');
```
Probably somethi... | [
-0.14427673816680908,
0.44385233521461487,
0.8684282898902893,
0.17902785539627075,
-0.0739162489771843,
-0.1655612587928772,
0.2449616640806198,
-0.5294920206069946,
-0.005701320245862007,
-0.6633538603782654,
-0.2421954870223999,
0.6430034637451172,
-0.4328959882259369,
-0.01027259510010... | |
index -->
</div>
</outerelement>
``` | [
0.028060918673872948,
0.09223797172307968,
0.1561540812253952,
0.2087748944759369,
0.06059154495596886,
-0.12374894320964813,
-0.1659771353006363,
-0.11651849001646042,
-0.050990935415029526,
-0.6476895213127136,
-0.20055939257144928,
0.3629319369792938,
-0.33771762251853943,
0.29616221785... | |
How can I adjust the size of the window in XNA.
Default it starts in a 800x600 resolution.
I found out that you need to set the
```cs
GraphicDevice.PreferredBackBufferHeight = height;
GraphicDevice.PreferredBackBufferWidth = width;
```
When you do this in the constructor of the game class it works, but when you t... | [
-0.05332668498158455,
-0.19353087246418,
0.8463742733001709,
-0.24011047184467316,
-0.17000174522399902,
-0.012091604061424732,
0.25344032049179077,
-0.20714552700519562,
-0.217769593000412,
-1.0866999626159668,
0.14262694120407104,
0.7011301517486572,
-0.07533054053783417,
0.1130083128809... | |
It may be a beginner question but I want to know,
What is the basic difference between Remoting or WebServices?
Which one is better?
"Better" is quite circumstancial here.
Remoting's uses Binary Serialization so takes up less space over the wire and is generally faster, but will only work with .net on both ends. The... | [
0.48588043451309204,
-0.24590882658958435,
0.47392013669013977,
0.14020666480064392,
-0.49441665410995483,
-0.6938986778259277,
0.3154989182949066,
-0.09993647783994675,
-0.2655676603317261,
-0.8213976621627808,
-0.09531945735216141,
0.529780924320221,
-0.03654513880610466,
0.0870931893587... | |
things are heading in the .net world. It allows you to write the code once and then host it on various endpoints | [
0.6201538443565369,
-0.25521931052207947,
0.8676700592041016,
0.24421077966690063,
0.04632175341248512,
-0.2466205358505249,
0.25645333528518677,
0.5449081063270569,
-0.11396530270576477,
-0.7530325651168823,
0.32965025305747986,
0.15925954282283783,
-0.12019584327936172,
0.377327948808670... | |
I'd like to use Hibernate's criteria api to formulate a particular query that joins two entities. Let's say I have two entities, Pet and Owner with a owner having many pets, but crucially that association is not mapped in the Java annotations or xml.
With hql, I could select owners that have a pet called 'fido' by spe... | [
0.5352993607521057,
-0.24731402099132538,
0.44295981526374817,
0.11254023760557175,
0.020722877234220505,
0.01140392292290926,
-0.06772178411483765,
-0.44894737005233765,
0.22174955904483795,
-0.571603000164032,
0.2501453459262848,
0.41141021251678467,
-0.41409990191459656,
0.1418505162000... | |
filter, rather than an inner join. Criteria queries do not support doing this. | [
0.03480120003223419,
-0.521350085735321,
-0.18064188957214355,
-0.03246830031275749,
-0.12220136821269989,
-0.0294280257076025,
0.2470504194498062,
-0.353119432926178,
0.09093870222568512,
-0.5286189913749695,
-0.3836435377597809,
0.39444905519485474,
-0.5971136689186096,
-0.15185320377349... | |
My website doesn't seem to handle a high number of visitors, I believe it's because the server is too simple.
2 hours ago my website was getting a lot of hits and I noticed that 3 deadlock errors occurred, the error is:
> System.Data.SqlClient.SqlException
> :
> Transaction (Process ID 58) was deadlocked on lock r... | [
0.09727831184864044,
0.138840913772583,
0.38323673605918884,
0.031193630769848824,
0.04342522472143173,
0.13845576345920563,
0.3214353621006012,
0.0009419757407158613,
-0.6640030741691589,
-0.5332387089729309,
0.4405001401901245,
0.3616068959236145,
-0.1446961909532547,
0.6572402715682983,... | |
running Windows 2008 and Sql Server 2008.
Writes will block reads on SQL Server, unless you have row versioning enabled. You should use the `sp_who2` stored procedure and a SQL Profiler trace. `sp_who2` will tell you which processes are blocking which, and the profiler will tell you what the last statement was for the ... | [
0.010877852328121662,
0.3246394693851471,
0.3878125548362732,
-0.08205734193325043,
-0.21298228204250336,
-0.25754761695861816,
0.5002124905586243,
0.04934576153755188,
-0.02366742119193077,
-0.5171648859977722,
0.138434499502182,
0.42978277802467346,
-0.38510000705718994,
-0.0081054307520... | |
Given a byte array (byte[]) is there any quick (as in short and aesthetic) way of transforming this into a string och character array? Assume that the bytes in the array is text represented in ascii.
I'm working in c# right now, and can't find any obvious methods to use. But I'm also interested in a general solution ... | [
0.04044691473245621,
0.09059736877679825,
0.20329856872558594,
0.04939675331115723,
-0.18969106674194336,
0.1735413670539856,
-0.11831606924533844,
-0.037351094186306,
-0.21886830031871796,
-0.5270664691925049,
-0.26230400800704956,
0.3724413812160492,
-0.31817761063575745,
-0.081396505236... | |
I am doing an application like Form builder in Cakephp.
I've created the module for Designing the forms. Is it a good way to create a separate table for each forms in the case of form building?
[SQL Server CE](http://www.microsoft.com/Sqlserver/2008/en/us/compact.aspx) | [
0.32957279682159424,
0.04019561782479286,
0.443464070558548,
0.10618831217288971,
0.0071937511675059795,
-0.29206496477127075,
-0.1670113056898117,
-0.12733504176139832,
-0.09644591063261032,
-0.7896038293838501,
-0.007615169510245323,
0.15855282545089722,
0.1882854849100113,
0.08077856153... | |
How can i use **second** method instead of **first**?
first (web user control)
------------------------
```
public void Remove()
{
int count = this.ListBox1.Items.Count;
for (int i = count - 1; i > -1; i--)
{
if (ListBox1.Items[i].Selected) | [
-0.016590848565101624,
-0.23384198546409607,
0.32735997438430786,
-0.1595970243215561,
0.13780249655246735,
-0.15628980100154877,
0.22035418450832367,
-0.4580724835395813,
-0.3666476309299469,
-0.483047753572464,
-0.30004358291625977,
0.3353784680366516,
-0.5087515115737915,
0.359545230865... | |
{
ListBox1.Items.Remove(ListBox1.Items[i]);
}
}
}
```
---
Test.aspx(Test of first)
------------------------
```
protected void btnRemove_Click(object sender, EventArgs e)
{
ItemOrderer2.Remove();
}
```
second(web | [
-0.10945859551429749,
-0.22161976993083954,
0.35643038153648376,
-0.08505107462406158,
0.03703980892896652,
0.0637112706899643,
0.462226003408432,
-0.27826857566833496,
-0.4564409554004669,
-0.5698803067207336,
-0.3465724587440491,
0.4131675064563751,
-0.4110053479671478,
0.421581715345382... | |
user control)
------------------------
```
public void Remove(string value)
{
ListItem li = new ListItem();
li = ListBox1.Items.FindByValue(value);
if (li != null)
{
this.ListBox1.Items.Remove(li);
}
```
Test.aspx( Test | [
-0.3641374111175537,
-0.2579464316368103,
0.6305429935455322,
-0.28031930327415466,
0.25114092230796814,
0.016961265355348587,
0.41968122124671936,
-0.47489526867866516,
-0.0892343744635582,
-0.45894062519073486,
-0.37060409784317017,
0.6155797243118286,
-0.5856325030326843,
0.281920075416... | |
of Second)
--------------------------
```
protected void btnRemove_Click(object sender, EventArgs e)
{
// ItemOrderer2.Remove();
if (ItemOrderer2.Items.Count > 0)
foreach (ListItem li in ItemOrderer2.Items)
{
if | [
-0.3074144423007965,
-0.23086553812026978,
0.4602104723453522,
-0.34247779846191406,
0.1919718086719513,
0.08705063909292221,
0.5059705972671509,
-0.25875023007392883,
-0.2283419966697693,
-0.5681411623954773,
-0.501079261302948,
0.5243953466415405,
-0.40404507517814636,
0.4596997201442718... | |
(li.Selected)
{
ItemOrderer2.Remove(li.Value);
}
}
}
```
You can't use `foreach` if you are removing data inside the `foreach` | [
-0.21185936033725739,
-0.01897306740283966,
0.28430163860321045,
-0.30918386578559875,
0.19029144942760468,
0.11517225205898285,
0.3178066313266754,
-0.36547669768333435,
-0.0818416103720665,
-0.4964863657951355,
-0.4281729459762573,
0.3656446635723114,
-0.3763907849788666,
0.4335110485553... | |
- it (intentionally) breaks the iterator.
If `for` works, why change it? If you are *desperate* to use `foreach`, then build a *separate* list first - for example:
```
List<ListItem> remove = new List<ListItem>();
foreach(ListItem li in ItemOrdere2.Items) {
if(li.Selected) remove.Add(li);
}
foreach(ListItem li in... | [
0.05092994123697281,
-0.2800356447696686,
0.21005867421627045,
-0.13017098605632782,
0.10424130409955978,
-0.09232161194086075,
0.21537984907627106,
-0.27266550064086914,
-0.07537972927093506,
-0.43526968359947205,
-0.607042133808136,
0.40435442328453064,
-0.5649882555007935,
0.17683359980... | |
I have a class library that has a couple of namespaces containing only internal types.
However, when using the class library in an application project, the namespaces shows up in intellisense, but of course they are empty. Is there any way for me to hide the namespaces completely when using intellisense in other proje... | [
0.05777667835354805,
0.26213181018829346,
0.014288109727203846,
0.10956660658121109,
0.03598612919449806,
0.06647506356239319,
0.09562719613313675,
0.1771833300590515,
-0.10908374935388565,
-0.7595896124839783,
0.06826886534690857,
0.4151051938533783,
-0.08975975215435028,
0.07573969662189... | |
into a namespace that contains public types?
It depends on how you're referencing your class library:
* If you have the class library project contained within your solution and use a project reference, you'll always see that empty namespace via Intellisense.
* If you're referencing a compiled dll of your class library... | [
-0.12569117546081543,
-0.0949697345495224,
0.00670661311596632,
0.10766930878162384,
0.2371661514043808,
0.07142052054405212,
0.2339141070842743,
0.12906977534294128,
-0.06485976278781891,
-0.7316165566444397,
-0.18436172604560852,
0.38319945335388184,
-0.4296140968799591,
0.37680131196975... | |
public int internalStuff { get; set; }
}
}
namespace Public
{
public class PublicClass
{
public int publicStuff { get; set; }
}
}
}
```
If you reference this via a project reference, you'll see the empty namespace. If you reference a dll of it, you | [
0.015392567031085491,
-0.09057674556970596,
0.14818628132343292,
0.03562489524483681,
0.0835103765130043,
-0.12971679866313934,
0.22926010191440582,
-0.02882140502333641,
-0.2071649581193924,
-0.8058320879936218,
-0.39311832189559937,
0.4532754719257355,
-0.35300412774086,
0.31975898146629... | |
won't. | [
0.7023284435272217,
0.2765372097492218,
0.2746226191520691,
0.4501838684082031,
0.12098482996225357,
0.13846290111541748,
0.22328981757164001,
-0.12419064342975616,
0.3816535174846649,
-0.8481544852256775,
-0.3343372642993927,
0.22072076797485352,
-0.12797033786773682,
0.5581004619598389,
... | |
I have writen a small [applet](http://nesteruk.org/projects/textsvc/) in Silverlight and, while it works fine on Windows, it seems that on OSX the data binding part of the application (all those `NotifyPropertyChanged` calls) do not work. Does anyone know why this is? I've tried under both Firefox and Safari with the l... | [
0.18447192013263702,
0.5662803649902344,
0.464320570230484,
-0.2557525932788849,
-0.07760680466890335,
-0.15314754843711853,
0.582119882106781,
-0.12748728692531586,
-0.32034793496131897,
-0.6379279494285583,
-0.03115142695605755,
0.3763625919818878,
-0.5847327709197998,
0.1579791456460952... | |
clauses of SQLite](http://www.sqlite.org/lang_insert.html) and the [documentation of the INSERT statement](http://www.sqlite.org/lang_conflict.html).
---
As to if it's faster using exceptions or checking for the existance of values: Exceptions are expensive when raised and zero-cost when not raised. This means if you... | [
0.3284660279750824,
0.4132808446884155,
0.5609164834022522,
0.16630645096302032,
-0.199353888630867,
-0.22577203810214996,
0.31796151399612427,
-0.48066768050193787,
-0.1021369993686676,
-0.23311878740787506,
-0.20682403445243835,
0.39261820912361145,
-0.3770311772823334,
-0.08213809877634... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.