text stringlengths 0 30.5k | title stringclasses 1
value | embeddings listlengths 768 768 |
|---|---|---|
at org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:338)
at org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:106)
at org.springframework.orm.hibernate3.HibernateTransactionManager.doCommit(HibernateTransactionManager.java:655)
at org.springframework.transaction.support.Abstr... | [
0.00985465757548809,
0.23041492700576782,
0.5728536248207092,
-0.3170158267021179,
-0.2177697867155075,
0.08242498338222504,
0.7482867240905762,
-0.3249574899673462,
-0.351711243391037,
-0.5441756844520569,
-0.2109905630350113,
0.5272226333618164,
-0.3080575466156006,
-0.05474955216050148,... | |
not sure how you get hold of spring bean using the console, normally for controllers or services you just declare them as members. Then you can get the current session with `sessionFactory.getCurrentSession()`. In order to clear it just call `session.clear()`, or if you what to be selective use `session.evict(Object)` ... | [
0.08487006276845932,
-0.13991966843605042,
0.3953481912612915,
-0.23665845394134521,
0.061351217329502106,
-0.016056403517723083,
0.2619592845439911,
-0.0010117765050381422,
-0.2905958592891693,
-0.4262280762195587,
-0.05875856801867485,
0.4973592162132263,
-0.37644505500793457,
0.18437917... | |
// Construct new Grails domain class from legacy phone book person
Person person = new Person(...)
batch.add(person)
if (batch.size() > 500) {
Person.withTransaction {
for | [
-0.19545823335647583,
-0.30531904101371765,
0.16476194560527802,
-0.11214815825223923,
0.2586193382740021,
0.39115580916404724,
0.5032814145088196,
-0.2918400168418884,
-0.22105425596237183,
-0.3802226483821869,
-0.271700918674469,
0.5274448990821838,
0.03068990260362625,
0.191834598779678... | |
(Person p: batch)
p.save()
batch.clear()
}
// clear session here.
sessionFactory.getCurrentSession().clear(); | [
-0.3617916703224182,
-0.15826234221458435,
0.18400999903678894,
-0.4217827320098877,
0.40507081151008606,
0.35804271697998047,
0.5142107605934143,
0.029030965641140938,
-0.18692395091056824,
-0.45613524317741394,
-0.377510130405426,
0.42220574617385864,
-0.27020952105522156,
0.202498838305... | |
}
}
// Save any remaining
for (Person p: batch)
p.save()
}
}
}
```
Hope this helps. | [
0.0651518702507019,
0.11262621730566025,
0.14405372738838196,
-0.20202113687992096,
0.44804897904396057,
0.202845498919487,
0.20346009731292725,
0.2657012939453125,
-0.06521935015916824,
-0.6972150206565857,
-0.08465447276830673,
0.42156705260276794,
-0.13325615227222443,
0.104209728538990... | |
Would anyone know what the Win32 equivalent of opendir is (or if it even exists) ?
Obviously I could use FindFirstFile(Ex) with FindNextFile, but appending \* to the path seems like such a hackish way to do it.
`FindFirstFile` and `FindNextFile` are the appropriate Win32 APIs. Assuming you're writing C++ code, as a por... | [
0.15716169774532318,
0.003346132580190897,
0.19146303832530975,
-0.05057970806956291,
-0.041207198053598404,
-0.39311930537223816,
0.16217517852783203,
0.04657915234565735,
-0.01752047799527645,
-0.5629639029502869,
-0.10769369453191757,
0.9250279664993286,
-0.31223616003990173,
-0.1130971... | |
I'm doing a project in seam that requires restful URLs. I have a view that is mapped to /group/{group}/{locale}. On that page I have a list of so called messages. Each message has a button to save changes to the message. This is linked to an action bean like this:
```
<h:commandButton type="submit" value="Save Changes... | [
-0.08947259187698364,
-0.06692194938659668,
0.6830698251724243,
-0.28160855174064636,
-0.2136417180299759,
0.3553098142147064,
0.2059619426727295,
-0.24945081770420074,
-0.48158153891563416,
-0.7635910511016846,
-0.10722129046916962,
0.13108523190021515,
-0.3678577244281769,
-0.01920069567... | |
<redirect view-id="/group.xhtml?group=#{group}&locale=#{locale}##{id}"/>
</navigation>
</page>
```
Also I have the following redirect rule (UrlRewriteFilter) to get to the proper RESTful URL:
```
<outbound-rule>
<from>^/group.xhtml\?group=([\.\w]+)&locale=([\.\w]+)\#([\.\w]+)\?cid=(\d*)$</from>
<to type="tempo... | [
-0.5010923147201538,
-0.1526203751564026,
0.8297855257987976,
-0.17202448844909668,
-0.17155861854553223,
-0.1881372630596161,
0.2810097634792328,
0.27587103843688965,
-0.14687173068523407,
-0.9301867485046387,
-0.38880014419555664,
0.5481712818145752,
-0.33277326822280884,
0.2183550447225... | |
that specifies the Seam conversation identifier. The redirect filter will process all requests by default, but this behavior can also be adjusted in components.xml:
```
<web:redirect-filter url-pattern="*.seam"/>
```
I don't need the redirect-filter and I tried putting something invalid in the url-pattern to "disabl... | [
-0.31063640117645264,
0.07891187071800232,
0.6719062328338623,
-0.1841612309217453,
-0.21490241587162018,
0.10430126637220383,
0.23782791197299957,
0.2086358368396759,
-0.12509869039058685,
-0.9516923427581787,
-0.37446412444114685,
0.5829872488975525,
-0.4522525668144226,
0.22433997690677... | |
viewId, Map<String, Object> parameters,
boolean includeConversationId)`
This is called from the following code in `org.jboss.seam.faces.Navigator` which sets `includeConversationId` to true:
```
FacesManager.instance().redirect(viewId, parameters, true);
```
I cannot see any way to avoid this, so the fix/workar... | [
-0.09586707502603531,
-0.031462885439395905,
0.7235828042030334,
-0.4627896547317505,
-0.047844335436820984,
0.07354450970888138,
0.3731086254119873,
-0.5431575179100037,
-0.27763110399246216,
-0.4479769766330719,
-0.2831955850124359,
0.9059141278266907,
-0.4675217270851135,
-0.24426840245... | |
Has anyone already tried this, anything particulair that I need to be aware of?
Yep, been running it for a while and I haven't hit any problems yet. Can't say I've use it all day every day, but I've built WPF, WinForms, Web and Console apps with it for testing various things and haven't had any hitches.
I have it on m... | [
0.14820893108844757,
0.10893549770116806,
0.45879510045051575,
0.25443458557128906,
0.1072733923792839,
-0.22162191569805145,
0.06203621253371239,
0.44755080342292786,
0.2127222716808319,
-0.6320963501930237,
0.3839779198169708,
0.7848177552223206,
0.09346048533916473,
-0.16949792206287384... | |
and it was easily worked around. | [
0.09243093430995941,
0.10375034064054489,
0.022794734686613083,
0.2298751175403595,
-0.12062350660562515,
0.05983692407608032,
-0.05393562465906143,
0.060911353677511215,
-0.13840411603450775,
-0.13790716230869293,
0.233653724193573,
0.2142205387353897,
0.20977161824703217,
0.0094883302226... | |
Occasionally working in Windows Vista the O.S. will desaturate the screen, rendering all colors as grayscale. **Is there a way to do this programatically?** Failing that, is there a way to do it by tweaking Vista settings?
Thanks.
Umm, if I had to guess, I'd say that Vista (and XP, by the way) are simply applying some... | [
0.8205328583717346,
0.09081583470106125,
0.11443773657083511,
-0.03884926810860634,
0.31328511238098145,
-0.32969415187835693,
0.3388974070549011,
0.4025057256221771,
-0.3007119297981262,
-0.9056527018547058,
-0.06066522374749184,
0.6117814779281616,
-0.11280284821987152,
0.066759690642356... | |
what are the benefits of using [HTTP authentication with PHP](http://www.php.net/features.http-auth) (HTTP 401 headers)
instead of using a normal form submit authentication??
From security perspective, both the **form based** and **[HTTP Basic Access Authentication](http://en.wikipedia.org/wiki/Basic_access_authenti... | [
0.2553495466709137,
0.00009909612708725035,
0.4243956506252289,
0.16250039637088776,
-0.3910665512084961,
-0.21612077951431274,
0.42577245831489563,
-0.4423164427280426,
0.04818059504032135,
-0.5564636588096619,
-0.2702986001968384,
0.6368025541305542,
-0.13125084340572357,
-0.200211390852... | |
of these, be sure to encrypt your connection using HTTPS to prevent sniffing and [man-in-the-middle attacks](http://en.wikipedia.org/wiki/Session_hijacking). And when you choose the form and session based variant, be sure to secure your session handling too to prevent or at least detect session frauds like [Session Hij... | [
-0.024920834228396416,
-0.36753931641578674,
0.2417110651731491,
0.22738265991210938,
-0.4291045367717743,
-0.420302152633667,
0.21327492594718933,
-0.024072421714663506,
-0.3588266372680664,
-0.8512211441993713,
-0.2244066298007965,
0.6085054278373718,
-0.19456051290035248,
0.077071346342... | |
I am working on an django application that will return what historically was a table of information:
```
ISSUE DESCRIPTION INITIATOR INITIATEDDATE ASSIGNEE FORECASTDATE STATUS REMARKS
```
That will be the entrance point for users to sort / filter, etc the list of issues.
The columns like ISSUE, DATES, NAME... | [
0.24828942120075226,
0.23329342901706696,
0.4700941741466522,
0.02700856886804104,
-0.23155352473258972,
-0.30763399600982666,
-0.29922667145729065,
-0.051182277500629425,
-0.4245227873325348,
-0.638235867023468,
-0.03999284282326698,
0.0674874484539032,
-0.15471777319908142,
-0.0297068785... | |
well.
The whole argument made by the CSS purists is that you need to keep your code semantically relevant to the information it contains. What you need to show is tabular data and you use the `<table>` tag to do that. The only "problem" with tables is when they are used to control the layout, like making your two colum... | [
0.13396988809108734,
0.33701038360595703,
-0.13359420001506805,
0.2515380382537842,
-0.20682872831821442,
-0.12518146634101868,
0.12457868456840515,
0.17362405359745026,
-0.19413501024246216,
-0.6141712069511414,
-0.13072684407234192,
0.3543132245540619,
-0.3039992153644562,
-0.02929787337... | |
I'd like to know if there is any .Net class that allows me to know the SSID of the wireless network I'm connected to.
So far I only found the library linked below. Is the best I can get or should I use something else?
[Managed WiFi](http://www.codeplex.com/managedwifi) (<http://www.codeplex.com/managedwifi>)
The metho... | [
0.5328909158706665,
-0.09893329441547394,
0.1105935350060463,
0.16227981448173523,
0.08544931560754776,
-0.3578331470489502,
0.43348678946495056,
-0.08025606721639633,
-0.17576587200164795,
-0.9720557332038879,
0.09081664681434631,
0.7037785649299622,
-0.25905853509902954,
0.25351819396018... | |
is connected to with this code:
```
Collection<String> connectedSsids = new Collection<string>();
foreach (WlanClient.WlanInterface wlanInterface in wlan.Interfaces)
{
Wlan.Dot11Ssid ssid = wlanInterface.CurrentConnection.wlanAssociationAttributes.dot11Ssid;
connectedSsids.Add(new String(Encoding.ASCII.GetChars... | [
-0.007444165181368589,
-0.4142613708972931,
0.6790907979011536,
-0.16357216238975525,
0.4474673271179199,
0.1960521936416626,
0.1170864850282669,
-0.29527708888053894,
-0.3487461507320404,
-0.8492501378059387,
-0.22727254033088684,
0.25785157084465027,
-0.46001386642456055,
0.3328784406185... | |
I'm following along with [this useful looking answer to my question](https://stackoverflow.com/questions/319463/can-i-make-post-or-get-requests-from-an-iphone-application#322573).
It seems to be working, but here are two questions I have:
1. How do I detect an HTTP error? The didFailWithError method doesn't seem to b... | [
0.011592049151659012,
-0.020279137417674065,
0.6433110237121582,
-0.10885662585496902,
-0.07238399237394333,
-0.27666375041007996,
0.2731287181377411,
-0.36391788721084595,
0.029943862929940224,
-0.24655982851982117,
0.09317852556705475,
0.5272704362869263,
-0.19186930358409882,
-0.0978911... | |
Where, how, when?
You will get the status code returned in the didReceiveResponse
```
-(void)connection:(NSURLConnection *)connection didReceiveResponse:(NSURLResponse *)response{
NSHTTPURLResponse *httpResponse;
httpResponse = (NSHTTPURLResponse *)response;
int statusCode = [httpResponse statusCode];
... | [
-0.040356460958719254,
-0.24110691249370575,
0.7105041742324829,
0.03334341570734978,
-0.023390863090753555,
-0.055174537003040314,
0.5082094669342041,
-0.17099399864673615,
-0.42333680391311646,
-0.5438187122344971,
-0.3736327588558197,
0.5270146131515503,
-0.1875365525484085,
0.368744939... | |
and stop the connection.
Here's a good wrapper class example
<http://kosmaczewski.net/projects/objective-c-rest-client/> | [
0.26306629180908203,
0.007079789415001869,
0.3123578727245331,
-0.02854624204337597,
-0.017489513382315636,
-0.25290873646736145,
0.18302014470100403,
0.28455108404159546,
-0.2552967071533203,
-0.27364522218704224,
-0.2784292995929718,
0.642107367515564,
-0.3778957426548004,
0.238920331001... | |
Say I have a Python function that returns multiple values in a tuple:
```
def func():
return 1, 2
```
Is there a nice way to ignore one of the results rather than just assigning to a temporary variable? Say if I was only interested in the first value, is there a better way than this:
```
x, temp = func()
```
O... | [
0.0924718901515007,
0.24355044960975647,
0.24403885006904602,
-0.13640236854553223,
-0.26609909534454346,
0.09691885858774185,
0.07839179039001465,
-0.025226984173059464,
-0.35017773509025574,
-0.092312753200531,
-0.3647943437099457,
0.5206382870674133,
-0.6769672632217407,
-0.005506790708... | |
I'm working on a project for the .net platform and would like to support multiple database types. I would like to keep the DDL under source control in a generic format then convert it to database specific DDL for deployment.
So I'm looking for utilities that will convert generic DDL into database specific DDL. Ideally... | [
0.2895316779613495,
-0.10778696835041046,
0.24293194711208344,
-0.04390634596347809,
-0.5174012780189514,
-0.15863192081451416,
0.2867073118686676,
0.044061459600925446,
-0.17992176115512848,
-0.802544891834259,
-0.20194752514362335,
0.5245668292045593,
-0.4497876763343811,
0.2482233047485... | |
No support for foreign keys
* Not sure how to integrate with .net project.
Does anyone have experience with those I've mentioned or know of others?
The only one that I know of that has support for SQL Server is [SQLFairy](http://sqlfairy.sourceforge.net/). It's written in Perl and is pretty feature rich. XML2DDL is p... | [
0.1514732539653778,
0.09805727750062943,
0.2383643090724945,
0.0012089210795238614,
-0.06286608427762985,
-0.2617817521095276,
0.2674819827079773,
0.6657978296279907,
-0.15445829927921295,
-0.4037710726261139,
0.08062135428190231,
0.3408288061618805,
-0.15856078267097473,
0.144951656460762... | |
In python it is easy to build a dictionary or array and pass it unpacked to a function with variable parameters
I have this:
```
- (BOOL) executeUpdate:(NSString*)sql, ... {
```
And the manual way is this:
```
[db executeUpdate:@"insert into test (a, b, c, d, e) values (?, ?, ?, ?, ?)" ,
@"hi'", // look! I put ... | [
-0.014620562084019184,
0.037800997495651245,
0.18358391523361206,
-0.3751148581504822,
-0.19917726516723633,
-0.02744457870721817,
0.5560505390167236,
-0.37168461084365845,
-0.058016229420900345,
-0.4137375056743622,
-0.1806168407201767,
0.7470169067382812,
-0.3349911868572235,
-0.12342224... | |
addObject : value]
}
[db executeUpdate:@"insert into test (a, b, c, d, e) values (?, ?, ?, ?, ?)" ,??values];
```
Unfortunately, no. Objective-C doesn't have argument unpacking like you get in a lot of modern languages. There isn't even a good way to work around it that I've ever found.
Part of the problem is that Ob... | [
-0.11466388404369354,
0.1293668895959854,
-0.015425346791744232,
-0.1477668583393097,
-0.25878483057022095,
-0.08759652078151703,
0.24810901284217834,
-0.1471223682165146,
-0.22172318398952484,
-0.12645743787288666,
-0.12686853110790253,
0.7820490598678589,
-0.6363983154296875,
-0.07601341... | |
Is there a way to get all alphabetic chars (A-Z) in an array in PHP so I can loop through them and display them?
```
$alphas = range('A', 'Z');
```
Documentation: <https://www.php.net/manual/en/function.range.php> | [
0.4571663439273834,
0.19201338291168213,
0.1346190720796585,
-0.18192872405052185,
0.09999561309814453,
0.32161781191825867,
0.3715929388999939,
-0.31455692648887634,
-0.0060659293085336685,
-0.10914317518472672,
-0.0390978679060936,
0.3606550395488739,
-0.32069969177246094,
-0.24070782959... | |
I have a capistrano deployment recipe I've been using for some time to deploy my web app and then restart apache/nginx using the sudo command. Recently cap deploy is hanging when I try to execute these sudo commands. I see the output:
"[sudo] password for "
With my server name and the remote login, but this is not a s... | [
0.22672778367996216,
0.08967255055904388,
0.4960273802280426,
-0.041378747671842575,
0.05258123576641083,
-0.3613652288913727,
0.3054260313510895,
-0.10160988569259644,
-0.39954105019569397,
-0.6987589001655579,
0.12357110530138016,
0.5733925104141235,
-0.3318226933479309,
0.25779405236244... | |
not want to remove the sudo password prompt of my remote user for web restart commands.
This seems to happen when connecting to CentOS machines as well. Add the following line in your capistrano deploy file:
```
default_run_options[:pty] = true
```
Also make sure to use the `sudo` helper instead of executing `sudo` ... | [
-0.09163418412208557,
-0.270332932472229,
0.7047438025474548,
0.16797147691249847,
0.43327566981315613,
-0.22349490225315094,
0.2681962251663208,
0.2579134702682495,
-0.2665013074874878,
-0.781671941280365,
-0.25346237421035767,
0.8728393316268921,
-0.35468682646751404,
-0.0272014178335666... | |
**(resolved: see bottom)**
I have the following code snippet:
```
Protected Sub SqlDataSource1_Inserted(ByVal sender As Object,
ByVal e As System.Web.UI.WebControls.SqlDataSourceStatusEventArgs)
Handles SqlDataSource1.Inserted
affected = CInt(DirectCast(e.Command.Parameters("@affected"), IDbDataParameter).Value)... | [
0.0894087553024292,
-0.21100616455078125,
0.5266602039337158,
-0.02402317337691784,
0.06369523704051971,
0.043990034610033035,
0.12786300480365753,
-0.35609641671180725,
-0.18873761594295502,
-0.6079752445220947,
0.04276256263256073,
0.4870843291282654,
-0.23949755728244781,
0.385107636451... | |
be causing this value to be null? I don't have any triggers set on the table, and the only thing my query is doing is running a plain insert into 1 table.
**Edit**: Based on the suggestions here, I added an `affected` parameter. I set a breakpoint, and affected = 1 but I still got the exception. However, I then figure... | [
0.003797485027462244,
0.007130000740289688,
0.16543443500995636,
-0.03561871126294136,
-0.1480007767677307,
-0.026102794334292412,
0.3312515914440155,
-0.2212793529033661,
-0.2609958350658417,
-0.816206693649292,
0.11761363595724106,
0.41938525438308716,
-0.5103102922439575,
0.157099410891... | |
INTO, or bulk
> copy statement is completed,
> @@IDENTITY contains the last identity
> value that is generated by the
> statement. If the statement did not
> affect any tables with identity
> columns, @@IDENTITY returns NULL.
Do you have a check to see if the insert has succeeded? It may be possible that the rec... | [
0.43558111786842346,
-0.2559710741043091,
0.45405590534210205,
-0.022852856665849686,
0.16813713312149048,
-0.18392474949359894,
0.20055870711803436,
-0.2390557825565338,
-0.1934417486190796,
-0.5958155989646912,
-0.16637660562992096,
0.5641288757324219,
-0.1857462078332901,
-0.01229281723... | |
an [output parameter](http://msdn.microsoft.com/en-us/library/ms378108(SQL.90).aspx) to get the id | [
0.17043685913085938,
-0.12539006769657135,
0.3277072310447693,
0.21126478910446167,
0.12798243761062622,
-0.12669815123081207,
-0.16651782393455505,
-0.17889755964279175,
-0.05125486105680466,
-0.20183560252189636,
-0.1290903240442276,
0.18043000996112823,
0.028440387919545174,
0.046673066... | |
I am reading a tutorial that uses the following example (that I'll generalize somewhat):
```
f :: Foo -> (Int, Foo)
...
fList :: Foo -> [Int]
fList foo = x : fList bar
where
(x, bar) = f foo
```
My question lies in the fact that it seems you can refer to `x` and `bar`, by name, outside of the tuple where they ... | [
0.06256270408630371,
0.4865509867668152,
0.4089454412460327,
-0.28435981273651123,
-0.28667935729026794,
0.058732423931360245,
0.13591811060905457,
0.015075492672622204,
-0.10345181077718735,
-0.4496908187866211,
-0.25258153676986694,
0.5275125503540039,
-0.35585442185401917,
-0.0745854526... | |
where
tuple = f foo
```
Am I right about this behavior? I've never seen it mentioned yet in the tutorials/books I've been reading. Can someone point me to more info on the subject?
**Edit**: Can anything (lists, arrays, etc.) be destructured in a similar way, or can you only do this with tuples?
Seeing your ... | [
0.28821155428886414,
0.16747361421585083,
0.16778892278671265,
-0.1794203221797943,
-0.2920638918876648,
-0.06463398039340973,
0.4463804364204407,
0.18565420806407928,
-0.2687426209449768,
-0.6404924988746643,
-0.45622923970222473,
0.4642500877380371,
-0.5950859189033508,
-0.03621104732155... | |
:: [a] -> a
head (x:xs) = x
head [] = error "Can't take head of empty list"
```
However, there are more places where you can use pattern matching, other valid notations are:
```
head xs = case xs of
(y:ys) -> y
[] -> error "Can't take head of empty list"
head xs = let (y:ys) = xs... | [
-0.15088410675525665,
-0.15394353866577148,
0.09421783685684204,
-0.07626388967037201,
-0.1810859739780426,
-0.28803664445877075,
0.4648333191871643,
-0.15652689337730408,
-0.1573142558336258,
-0.41803687810897827,
-0.28801724314689636,
0.22437280416488647,
-0.3296981453895569,
0.035776779... | |
y
where
(y:ys) = xs
```
Note that the last two examples are a bit different from the first to because they give different error messages when you call them with an empty list.
---
Although these examples are specific to lists, you can do the same with other data types, like so:
```
first :: (a, b) -> a
first... | [
0.011836811900138855,
-0.26546192169189453,
0.34811070561408997,
-0.07420448958873749,
-0.5542178153991699,
0.03910686820745468,
0.316934734582901,
-0.10581827908754349,
-0.23638774454593658,
-0.7853690981864929,
-0.4400709867477417,
0.27515915036201477,
-0.2500093877315521,
0.089019291102... | |
a -> a
fromJust ma = x
where
(Just x) = ma
```
Again, the last function will also crash if you call it with `Nothing`.
To sum up; if you can create something using constructors (like `(:)` and `[]` for lists, or `(,)` for tuples, or `Nothing` and `Just` for Maybe), you can use those same constructors to do pat... | [
-0.0053578889928758144,
-0.20104950666427612,
-0.04892772436141968,
-0.1896180361509323,
-0.43681585788726807,
0.0062923794612288475,
0.36225852370262146,
-0.1306806355714798,
-0.036326874047517776,
-0.7003358602523804,
-0.22655808925628662,
0.3292619287967682,
-0.415531188249588,
-0.06978... | |
Setting up ASP.net MVC with Linq2SQL or Entity Framework's context to have scaffolding work out of the box is extremely easy. What tweaks would you make to make it work with ADO.net Data Services?
On <http://www.codeplex.com/aspnet> there's a project for using ASP.NET Dynamic Data with ASP.NET MVC. | [
0.5591502785682678,
-0.43851256370544434,
0.24003973603248596,
0.28370407223701477,
-0.2625056505203247,
-0.1608586311340332,
-0.18117617070674896,
-0.24972856044769287,
-0.44625338912010193,
-0.38604575395584106,
0.048935193568468094,
0.2598016858100891,
-0.34743350744247437,
-0.234960466... | |
How do I center the text horizontally and vertically in a `TextView`, so that it appears exactly in the middle of the `TextView` in `Android`?
I'm assuming you're using XML layout.
```
<TextView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
androi... | [
-0.0639592632651329,
-0.006737980991601944,
0.8981713056564331,
-0.053333964198827744,
-0.1322574019432068,
0.034184686839580536,
-0.16397210955619812,
-0.10161564499139786,
0.041273556649684906,
-0.8523827791213989,
-0.261931836605072,
0.23236554861068726,
0.03443417698144913,
-0.11084959... | |
I know the number of lines of code is completely arbitrary and a horrible metric. Even so, after a long day I like to click a little button and see that my **pet project** grew by 10%. (Or if I spent the day refactoring yet again it slimmed down by 10%, woohoo!)
I've used two [line](http://www.codeproject.com/KB/dotne... | [
0.24470064043998718,
-0.3954705595970154,
0.6491872072219849,
0.015447571873664856,
-0.26566123962402344,
0.27419623732566833,
0.11910120397806168,
-0.027854513376951218,
-0.3381544351577759,
-0.5852136611938477,
0.04524055868387222,
0.138553187251091,
-0.15247666835784912,
0.0542056336998... | |
site?
Update
------
**CMS recommended CLOC**, which was indeed exactly what I was looking for. Here's my output for the curious. It even counted my MSBuild script!
```
C:\Web>cloc-1.06.exe --exclude-dir=.svn,bin,images AST
474 text files.
474 unique files.
28254 files ignored.
http://cloc.sourceforge.... | [
0.05799470841884613,
0.04090932011604309,
0.49157512187957764,
0.03379626199603081,
-0.10608981549739838,
-0.18443001806735992,
0.5072229504585266,
0.06635110080242157,
-0.4468536376953125,
-0.7132772207260132,
-0.07761696726083755,
0.5641887784004211,
-0.21370650827884674,
-0.022900946438... | |
332 4670 9666 21255 x 1.36 = 28906.80
ASP.Net 91 58 0 4053 x 1.29 = 5228.37
Javascript 9 | [
-0.1331244856119156,
0.07882314175367355,
-0.013126738369464874,
-0.09125085175037384,
-0.10993929207324982,
0.34160295128822327,
0.45360761880874634,
-0.20066575706005096,
-0.20007428526878357,
-0.30674076080322266,
-0.3273043930530548,
0.2761220335960388,
-0.39844295382499695,
-0.2209526... | |
1262 2112 4011 x 1.48 = 5936.28
CSS 5 193 42 1665 x 1.00 = 1665.00
MSBuild scripts 1 0 | [
-0.12645381689071655,
0.17142406105995178,
0.3018295466899872,
-0.023611875250935555,
-0.26871925592422485,
0.40166786313056946,
0.47797757387161255,
-0.3442234396934509,
-0.2581641674041748,
-0.5324963927268982,
-0.18318435549736023,
-0.00404005590826273,
-0.11663904786109924,
0.343704998... | |
7 1413 x 1.90 = 2684.70
HTML 2 126 5 429 x 1.90 = 815.10
XML 1 | [
0.10669466108083725,
0.07558543980121613,
0.35639482736587524,
-0.007796565070748329,
-0.4827133119106293,
0.021087583154439926,
0.14019092917442322,
-0.25054845213890076,
-0.128622904419899,
-0.4008922874927521,
-0.3771924078464508,
0.15099087357521057,
-0.32206740975379944,
0.07025662809... | |
0 0 392 x 1.90 = 744.80
PHP 1 21 13 249 x 3.50 = 871.50
-------------------------------------------------------------------------------
SUM: | [
-0.5288398861885071,
0.1382988691329956,
0.71282958984375,
0.26304206252098083,
-0.4340181052684784,
0.21585489809513092,
0.22277624905109406,
-0.402823269367218,
0.033094506710767746,
0.23492425680160522,
0.15151555836200714,
0.19347210228443146,
-0.012575574219226837,
0.01559665147215128... | |
442 6330 11845 33467 x 1.40 = 46852.55
-------------------------------------------------------------------------------
```
Give a look to [CLOC](http://cloc.sourceforge.net/)
Check the output:
```
-------------------------------------------------------------------------------
Language f... | [
-0.3835808336734772,
0.3160303235054016,
0.4973827600479126,
0.28218311071395874,
-0.03504892438650131,
0.0753050372004509,
0.09420423209667206,
-0.11966168135404587,
-0.4124542772769928,
-0.5547510981559753,
-0.3139997720718384,
0.4436129927635193,
-0.19135911762714386,
0.0057737966999411... | |
0 3424 x 1.29 = 4416.96
XML 1 0 0 26 x 1.90 = 49.40
DOS Batch 1 | [
-0.01626257598400116,
0.008715554140508175,
0.37135469913482666,
0.045265208929777145,
-0.47696661949157715,
0.13363264501094818,
0.16688033938407898,
-0.391181617975235,
0.23914028704166412,
-0.17176136374473572,
-0.2400953471660614,
0.08483987301588058,
-0.2484804391860962,
0.23091924190... | |
1 0 8 x 0.63 = 5.04
C# 1 0 0 4 x 1.36 = | [
-0.12592586874961853,
0.36719462275505066,
0.20469726622104645,
0.009168911725282669,
-0.37398505210876465,
0.14303064346313477,
0.15962116420269012,
-0.2762555778026581,
0.03788377344608307,
-0.17846904695034027,
0.016307590529322624,
-0.042782217264175415,
-0.441421777009964,
0.418644607... | |
5.44
-------------------------------------------------------------------------------
SUM: 24 291 0 3462 x 1.29 = 4476.84
-------------------------------------------------------------------------------
```
You can check also other code counters:
* [SLOCCount](http://www.dwh... | [
0.056663889437913895,
-0.15112346410751343,
0.8982492685317993,
0.4473334550857544,
0.3622360825538635,
-0.09396029263734818,
-0.005765542387962341,
-0.13772529363632202,
-0.4618314802646637,
-0.4193883538246155,
-0.1388426423072815,
0.2735144793987274,
0.5060207843780518,
0.10823795944452... | |
I have set the FlushMode property on an NHibernate session to FlushMode.Never, but when I call session.Save(User), a call gets made to the database anyway. Is this how this is supposed to work? I would think that it shouldn't do an insert until I call Flush().
Edit:
I found the issue, I changed the primary key to guid... | [
0.15238624811172485,
-0.26023030281066895,
0.11651138216257095,
-0.1419367641210556,
-0.24443967640399933,
-0.20688292384147644,
0.2487180382013321,
-0.15757666528224945,
0.016070567071437836,
-0.5999139547348022,
0.2592024505138397,
0.9449036717414856,
-0.5516972541809082,
0.2426368296146... | |
that generates the ID, NHibernate needs a round trip to fetch it. As an example, for Server's identity fields the actual INSERT statement must be executed before SCOPE\_IDENTITY() returns a valid key. And the only way to perform this operation safely is by flushing the session.
As an alternative to guids and identity ... | [
-0.01819268800318241,
-0.1487428843975067,
0.6058459281921387,
0.04134092852473259,
-0.13062684237957,
-0.16367681324481964,
0.06866201013326645,
-0.5523293018341064,
-0.13233733177185059,
-0.6259198188781738,
-0.06503402441740036,
0.6150630116462708,
-0.3521445393562317,
-0.01858741976320... | |
Consider the following code:
```
private static void WriteProcesses(StreamWriter sw, DateTime d) {
sw.WriteLine("List of processes @ " + d.ToString());
Process[] localAll = Process.GetProcesses().Where(o => o.ProcessName.ToLower() != "svchost");
if(localAll.Length... | [
0.03452809154987335,
-0.23970521986484528,
0.7255514860153198,
-0.4466921389102936,
0.4699041545391083,
0.2778110206127167,
0.4237864017486572,
-0.22674378752708435,
-0.1435772031545639,
-0.6077918410301208,
-0.2631497085094452,
0.5567820072174072,
-0.18927180767059326,
0.5037266612052917,... | |
0; i < localAll.Length; i++) {
sw.WriteLine(" " + localAll[i].ProcessName);
}
}
}
```
But i get a red squiggly line saying:
Cannot implicitly convert type | [
0.055779989808797836,
0.009349136613309383,
0.7546716332435608,
-0.5616225600242615,
0.09102343022823334,
0.10489211976528168,
0.6233144402503967,
-0.2711496353149414,
0.07778336852788925,
-0.4310322701931,
-0.11041272431612015,
0.3619421720504761,
-0.19436858594417572,
0.5204156637191772,... | |
System.Collections.Generic.IEnumerable' to 'System.Diagnostics.Process[]'. An explicit conversion exists (are you missing a cast?)
I tried changing the array to a List but didnt work.
Change
```
Process[] localAll = Process.GetProcesses().Where(o => o.ProcessName.ToLower() != "svchost");
```
to
```
Process[] loca... | [
-0.1500135064125061,
-0.11462246626615524,
0.4935515522956848,
-0.29596930742263794,
0.2511265277862549,
0.3086641728878021,
0.3201489746570587,
-0.33726784586906433,
-0.4587451219558716,
-0.6094062924385071,
-0.3274011015892029,
0.5155664086341858,
-0.2357320785522461,
0.4304816424846649,... | |
In a C++ physics simulation, I have a class called Circle, and Square. These are Shapes, and have a method called push(), which applies force to it. There is then a special case of Circle, call it SpecialCircle, in which push() should exhibit slightly different properties. But in fact, there is also SpecialSquare() whi... | [
0.09084195643663406,
-0.10089430958032608,
0.11621460318565369,
-0.043079525232315063,
-0.367403119802475,
0.21101421117782593,
-0.231886625289917,
-0.5708668231964111,
-0.19872674345970154,
-0.482176274061203,
-0.13167494535446167,
0.3181704878807068,
-0.10158029943704605,
-0.164131402969... | |
this class structure?
So far, I've got:
```
class Shape {
virtual void push();
};
class Circle : public Shape {};
class Square : public Shape {};
class Special {
virtual void push();
};
class SpecialCircle : public Circle, Special {};
class SpecialSquare : public Square, Special {};
```
Of course, the ... | [
0.06616929173469543,
-0.10192446410655975,
0.27348512411117554,
-0.10753266513347626,
-0.12808988988399506,
0.22826378047466278,
0.1745726615190506,
-0.35873648524284363,
-0.2814454734325409,
-0.5610480904579163,
-0.22519701719284058,
0.4058772027492523,
-0.1797657459974289,
0.186046734452... | |
this the diamond inheritance problem?
Another solution (it may or may not fit your needs, it depends on the details of your implementation):
* Have the class Behavior, and let NormalBehavior and SpecialBehavior inherit from it.
* Have the class Shape, and let Square and Circle inherit from it. Let Shape be an aggregat... | [
0.284772127866745,
-0.2988729178905487,
-0.16928941011428833,
0.02567351795732975,
-0.27561914920806885,
0.1809500902891159,
0.18163952231407166,
-0.4430561363697052,
0.0152767738327384,
-0.8001663088798523,
-0.15828408300876617,
0.5659083724021912,
-0.3967474699020386,
0.07118763774633408... | |
and SpecialObject inherit from it;
* Have the class Shape, and let Square and Circle inherit from it;
* Let a PhysicalObject have a Shape.
Prefer aggregation over inheritance. This is an application of the [Bridge pattern](http://en.wikipedia.org/wiki/Bridge_pattern). The advantage of this strategy with respect to hav... | [
0.18058179318904877,
-0.04081329330801964,
-0.044118985533714294,
0.0950351357460022,
-0.4151346981525421,
0.0404503159224987,
-0.025642596185207367,
-0.5121023058891296,
-0.24705348908901215,
-0.9602754712104797,
-0.2048541158437729,
0.2771889865398407,
-0.09279432892799377,
-0.0361090824... | |
I'm looking for an AJAX function to dynamically request an HTML page. I already found the following:
```
function ajaxinclude(url)
{
var page_request = false
if (window.XMLHttpRequest) // if Mozilla, Safari etc
page_request = new XMLHttpRequest()
else if (window.ActiveXObject) // if IE
{
try... | [
0.22004590928554535,
-0.13769353926181793,
0.49071118235588074,
-0.13968583941459656,
-0.2846740186214447,
-0.08589375019073486,
0.3111107051372528,
-0.12308914959430695,
-0.20666886866092682,
-0.8062448501586914,
-0.09681719541549683,
0.5209534764289856,
-0.5219753980636597,
0.10227537155... | |
new ActiveXObject("Microsoft.XMLHTTP")
}
catch (e){}
}
}
else
return false
page_request.open('GET', url, false) //get page synchronously
page_request.send(null)
return page_request.responseText;
}
```
It works fine in Firefox and Chrome, but it fails in IE on the following li... | [
-0.09966787695884705,
-0.04659644514322281,
0.7116851806640625,
-0.22524121403694153,
-0.20189493894577026,
-0.24338632822036743,
0.6493186950683594,
-0.20180517435073853,
0.1187174916267395,
-1.0172027349472046,
-0.17715491354465485,
0.859776496887207,
-0.7158389687538147,
0.0657713115215... | |
one of the things I forgot to mention was that I also need it to update at an interval... though I had already figure that out so I didn't think it made a difference. But then I found the great Ajax.PeriodicUpdater() Method in prototype and vastly changed my mind. I just went from a 50 LOC solution to about 4 lines :)
... | [
0.14413638412952423,
-0.08122777938842773,
0.357876718044281,
0.10107146948575974,
-0.32735952734947205,
-0.03647036477923393,
0.03767109662294388,
0.09351157397031784,
-0.23813633620738983,
-0.4839922785758972,
0.3522501289844513,
0.7929320931434631,
0.048629842698574066,
-0.0964796990156... | |
fell into JQuery first so I'm biased towards it, and from what I've seen the library is a little smaller (read: faster in the browser), but Prototype I believe has been around longer and has TONS of plugins and examples out there. Ruby on Rails also by default uses Prototype. Funny enough, the code in both looks very s... | [
0.2951785624027252,
-0.03530426695942879,
-0.18249335885047913,
-0.06196602061390877,
-0.48593848943710327,
-0.17098695039749146,
0.4080991744995117,
0.4101727306842804,
-0.1539815217256546,
-0.6183849573135376,
0.3806353509426117,
0.35763317346572876,
0.025001196190714836,
-0.150530502200... | |
I updated an application on Facebook and was trying to provide a new image to show up as a box on a user's profile when they add it. I added FBML to the default FBML box on the User Profile tab for the application, but it's still showing the old FBML from the previous application. Googling tells me that this is probabl... | [
0.6995729207992554,
0.038726557046175,
0.4934876561164856,
0.02578149177134037,
-0.24179700016975403,
-0.1386871188879013,
0.07208782434463501,
0.26830366253852844,
-0.33616191148757935,
-0.7134919762611389,
0.20735998451709747,
0.3929416537284851,
-0.2991235852241516,
0.11170056462287903,... | |
longer allows default FBML to be set, and profile boxes are not added to profiles by default.
The updated documentation is here: <https://developers.facebook.com/docs/reference/rest/profile.setFBML/> | [
0.6263521313667297,
-0.46603479981422424,
0.6502885222434998,
-0.11816033720970154,
0.012950647622346878,
-0.34155571460723877,
0.18440841138362885,
-0.1655961275100708,
-0.4587538242340088,
-0.4207262098789215,
-0.40615400671958923,
0.30145102739334106,
-0.2472590059041977,
-0.36071196198... | |
When you create an instance of the cachefactory and then don’t use it anymore the memory that was used during the creation of the object is not released. This will have a substantial effect on all web apps or scenarios where a cachfactory might be created multiple times. The symptoms of this will be unusually high memo... | [
-0.015243671834468842,
0.40342748165130615,
0.4928482472896576,
0.08359356969594955,
-0.1109505444765091,
0.2321142703294754,
0.4507448971271515,
-0.055028125643730164,
-0.16334855556488037,
-0.9230887293815613,
0.18708807229995728,
0.15879979729652405,
-0.4476912021636963,
0.2945881187915... | |
memory usage!
To duplicate put the following code into your app:
```
Dim CacheFactory1 As CacheFactory = New CacheFactory()
For i As Int32 = 1 To 1 * (10 ^ 4)
CacheFactory1 = New CacheFactory()
CacheFactory1 = Nothing
Next
```
There are only two workarounds for this.
1. Velocity team fixes the bug (and I’m... | [
0.06370728462934494,
0.22389718890190125,
0.2914201021194458,
0.2608969807624817,
0.05556927248835564,
0.1584971398115158,
0.464529812335968,
0.09367945790290833,
-0.4793122708797455,
-1.0890289545059204,
0.1331697404384613,
0.7193758487701416,
-0.4842497706413269,
0.07744475454092026,
0... | |
your caching methods and will post this on codeplex soon. You can wrap it around your caching methods just like a transaction scope and it will manage the locking and connection for you.
Well, I can't say it would hurt, but I think that it's better to remember how to quickly reference the API documentation instead of a... | [
0.35362187027931213,
0.2415369302034378,
0.13796782493591309,
0.2765228748321533,
-0.07550953328609467,
0.004985948093235493,
-0.0005754674784839153,
-0.060612332075834274,
-0.03751484677195549,
-0.5972782373428345,
0.42189911007881165,
0.7288646697998047,
-0.032531097531318665,
-0.1145450... | |
I want to create some up and down buttons using the standard button
background but with black arrows.
What is the best way to accomplish this with WPF??
Malcolm
I find Marlett (a font built into Windows) handy for that sort of thing.
```
<Button FontFamily="Marlett" FontSize="20" Content="5"/>
<Button FontFamily="Ma... | [
-0.04154185950756073,
-0.02436036802828312,
0.719067394733429,
-0.23692217469215393,
0.048338327556848526,
0.32180795073509216,
0.20194841921329498,
-0.18659794330596924,
-0.5758709907531738,
-0.7099218368530273,
0.01964501105248928,
0.3683973550796509,
-0.23739099502563477,
-0.09964565932... | |
I just switched two projects over to fogbugz and so far I like it a lot. FB has a few features that just blow trac out of the water. However, I am having trouble getting FB to point back to the revisions from within the FB issues.
I have set up the bugid in tortoisesvn and that all works - I can click on a bugid in t... | [
0.11560056358575821,
0.1338900476694107,
0.8247923851013184,
-0.26325365900993347,
-0.16181017458438873,
-0.2329753190279007,
0.3437937796115875,
0.21941624581813812,
-0.3330399692058563,
-0.695487916469574,
-0.07273257523775101,
0.6924611330032349,
-0.2573198974132538,
0.2699579894542694,... | |
figured out how to do it correctly. I set the websvn guest account to have read access to the repo.
The integrateion between trac and svn worked fine. I was able (from trac ticket) to see the source that changed in a revision that was linked to a comment in a SVN commit.
Has anyone had success with FB integration w... | [
0.09385625272989273,
-0.05501663684844971,
0.7964277863502502,
0.07607369124889374,
-0.19830675423145294,
-0.0969449132680893,
0.11011171340942383,
0.024977190420031548,
-0.22124357521533966,
-0.321788489818573,
-0.019526902586221695,
0.7438790202140808,
0.012999274767935276,
-0.2080574631... | |
a commit.
EDIT:
In response to one poster:
The bugid is shown correctly in the svnUI - that is, I can click on a link in the history of the tortoisesvn and it brings up the url in fogbugz.
What is not working is:
* auto updating/insertion of checkin comment into a FB issue
* in FB, no link back to the repo/changes... | [
0.154353067278862,
-0.10753167420625687,
0.5118681788444519,
-0.08803515136241913,
-0.12785115838050842,
-0.04374060407280922,
0.4078225791454315,
-0.11058414727449417,
-0.42119139432907104,
-0.3117375671863556,
-0.12904199957847595,
0.6498568058013916,
-0.4912727177143097,
-0.036423277109... | |
this answer.
I finally got it working. There was a little tweak in the standard url I had to change and I had to send the post commit script to my provider.
[Here is the url that finally got it all together for me](http://www.fogcreek.com/FogBugz/docs/60/topics/sourcecontrol/setup/Subversion.html)
This one helps too... | [
0.23174194991588593,
-0.06637640297412872,
0.6560230851173401,
0.16261884570121765,
-0.2439340204000473,
-0.12400117516517639,
0.3499695956707001,
-0.08002180606126785,
-0.25032350420951843,
-0.45634496212005615,
-0.06232822313904762,
0.4298754632472992,
-0.08321169018745422,
-0.0726006105... | |
I'm currently trying to build an application that inherently needs good time synchronization across the server and every client. There are alternative designs for my application that can do away with this need for synchronization, but my application quickly begins to suck when it's not present.
In case I am missing so... | [
0.19608074426651,
0.18242213129997253,
-0.05295085534453392,
0.12128129601478577,
0.13485640287399292,
-0.14788593351840973,
0.43480628728866577,
0.09171348065137863,
-0.35612550377845764,
-0.28965485095977783,
0.16543808579444885,
0.4124401807785034,
-0.5178689360618591,
-0.01879593729972... | |
to either a) a sucky app, or b) requiring time synchronization.
Let's assume I Really Really Do Need synchronized time.
My application is built on Google AppEngine. While AppEngine makes no guarantees about the state of time synchronization across its servers, usually it is quite good, on the order of a few seconds (... | [
0.2643034756183624,
0.12132578343153,
0.4318302869796753,
0.2657831907272339,
0.06131695210933685,
0.1979232281446457,
0.6303133368492126,
0.24322113394737244,
-0.07162629067897797,
-0.6583408117294312,
0.12641818821430206,
0.3497934937477112,
-0.2217123806476593,
-0.0605674609541893,
0.... | |
provide a very reliable concept of time.
The client part of my application is written in JavaScript. Again we have a situation where the client has no reliable concept of time either. I have done no measurements, but I fully expect some of my eventual users to have computer clocks that are set to 1901, 1970, 2024, and... | [
0.4271409511566162,
0.09418003261089325,
0.18420368432998657,
0.09506966173648834,
-0.019034644588828087,
-0.0447690449655056,
0.41500547528266907,
0.26301559805870056,
-0.17215467989444733,
-0.9871920943260193,
0.30073073506355286,
0.29757678508758545,
-0.2664354145526886,
0.2717954218387... | |
(this is not as crazy as it may sound). This would work by commissioning 2 or 3 servers in different parts of the Internet, and using traditional means (PTP, NTP) to try to ensure their sync is at least on the order of hundreds of milliseconds.
I'd then create a JavaScript class that implemented the NTP intersection a... | [
0.24829092621803284,
-0.0006392530631273985,
0.48910561203956604,
0.33160582184791565,
0.1945084184408188,
-0.20980879664421082,
0.4020965099334717,
0.13332460820674896,
-0.12964676320552826,
-0.7048245668411255,
0.11864219605922699,
0.2704377770423889,
-0.3207574784755707,
-0.073228791356... | |
notion of the current time. I then have to compromise on the server, either by allowing the clients to tell the server the current time according to them when they make a request (big security no-no, but I can mitigate some of the more obvious abuses of this), or having the server make a single request to one of my mag... | [
0.3047754168510437,
-0.002086130203679204,
0.5325536131858826,
0.38134559988975525,
0.04737923666834831,
-0.15813326835632324,
0.4056573808193207,
0.17729124426841736,
-0.3176805078983307,
-0.44756221771240234,
0.0869128480553627,
0.4073648154735565,
-0.08026944845914841,
0.269384235143661... | |
same time.
It seems to me like you're needing to listen to a broadcast event from a server in many different places. Since you can accept 2-3 seconds variation you could just put all your clients into long-lived comet-style requests and just get the response from the server? Sounds to me like the clients wouldn't need ... | [
0.3988344967365265,
-0.3526841998100281,
0.003500365884974599,
0.44012126326560974,
-0.2779920995235443,
-0.25870460271835327,
0.18279370665550232,
0.2578050494194031,
-0.4523307681083679,
-0.7243776321411133,
0.36641231179237366,
0.5434510111808777,
-0.18813583254814148,
-0.01278701890259... | |
Anyway of invoking the **Edit > Advanced > Format Document"** VS command automatically when switching away from a document / routinely with a timer / on entering a document?
Its really irritating **Ctrl+E+D**'ing everytime you want to prettify your code.
ReSharper does this every time you close a brace, press semicolo... | [
0.5206214785575867,
0.11186540871858597,
0.5234076380729675,
0.04429767653346062,
-0.15035313367843628,
0.06060748174786568,
0.2582477927207947,
-0.1715461015701294,
-0.19804035127162933,
-0.20312826335430145,
0.31029805541038513,
0.5273637175559998,
0.13193945586681366,
0.0382178910076618... | |
Since Actionscript is a proper superset of javascript, it should I suppose be possible.
Do you use/have you used any of the the javascript extension libraries with Actionscript/Flex/Air?
I ported some stuff from prototype.js to AS:
<http://wiki.alcidesfonseca.com/hacks/prototypeas> | [
0.5016958713531494,
-0.0483553521335125,
-0.18272316455841064,
-0.0988469123840332,
-0.10953819751739502,
0.1898147612810135,
0.1271415799856186,
0.04906035587191582,
-0.2730180323123932,
-0.5644169449806213,
0.33087193965911865,
0.2453371286392212,
-0.44542640447616577,
-0.323564141988754... | |
**Problem:** I relied heavily on NTFS Junction points in Windows XP, even though they apparently were not an "official" feature of the operating system. Now MSFT has generously made NTFS Junction points an official part of Vista, but apparently they also intentionally *broke* them. Now my WinXP-created junction points ... | [
0.5068816542625427,
0.36622563004493713,
0.36360248923301697,
0.12776996195316315,
0.23742538690567017,
-0.33486124873161316,
0.45614489912986755,
0.08933557569980621,
-0.40915554761886597,
-0.7386186718940735,
-0.08502290397882462,
0.6118721961975098,
-0.2882019877433777,
0.26257830858230... | |
Thanks, Ulrich and Scott, for your follow-up questions. The tool I used to create the junctions was [Systinternals Junction v1.05](http://technet.microsoft.com/en-us/sysinternals/bb896768.aspx) although I can't say for sure that all of them were created with that specific version of the now-MSFT-hosted app.
As far as... | [
0.40928253531455994,
0.10583006590604782,
0.33950477838516235,
0.16390204429626465,
0.029651183634996414,
-0.00130069546867162,
-0.06463098526000977,
0.48382240533828735,
-0.34553322196006775,
-0.6262404918670654,
-0.07501806318759918,
0.08041976392269135,
-0.3175402283668518,
0.2474432885... | |
shortcut would not work)
* 2) Some items are junctions that point from the C Drive directly to locations on the Q Drive. These items obviously do not work when the Q Drive is not actually connected box (XP or Vista), but when connected on Vista, the junctions do not work as on XP.
Junctions and symbolic links are two d... | [
0.24470745027065277,
-0.17205210030078888,
0.35415124893188477,
0.3407449424266815,
0.14028236269950867,
-0.25427842140197754,
0.178654283285141,
-0.10500596463680267,
-0.2135024219751358,
-0.8197198510169983,
0.06179813668131828,
0.02220793440937996,
-0.5549415349960327,
0.363147348165512... | |
soft links (the default), hard links (/h), or junctions (/j). The biggest improvement of sym links over junctions is sym links can reference files OR directories (junctions are directory only) and the can reference network shares as well (junctions cannot).
But the bottom line is they are different. Can't tell you why... | [
0.15364588797092438,
-0.2755976617336273,
0.8264729976654053,
0.23713453114032745,
0.1811334788799286,
-0.26191985607147217,
0.2416679561138153,
0.25505340099334717,
-0.6054590940475464,
-0.9187755584716797,
-0.06561008840799332,
0.4131039083003998,
-0.2786274254322052,
0.18882545828819275... | |
I'm trying to figure out the best way to save a simple one-to-many relationship in Linq2Sql.
Lets assume we have the following POCO model (pseduo code btw):
*Person has zero to many Vechicles.*
```
class Person
{
IList<Vehicle> Vehicle;
}
class Vehicle
{
string Name;
string Colour;
}
```
Now, when i s... | [
-0.18073797225952148,
-0.057508356869220734,
0.21423275768756866,
0.014168951660394669,
0.054661549627780914,
0.44529855251312256,
-0.06644709408283234,
-0.24799953401088715,
-0.008916179649531841,
-0.5954324007034302,
-0.06284458935260773,
0.7174151539802551,
-0.033587902784347534,
0.0869... | |
// Left to right stuff.
newPerson.Name = person.Name;
newPerson.Age = person.Age;
if (newPerson.Id <= 0)
db.People.InsertOnSubmit(newPerson);
db.SubmitChanges();
}
```
i'm not sure where and how i should handle the list of vehicles the person might have? any suggestions?
```
using (Db db = ne... | [
0.022603098303079605,
0.1651260107755661,
0.39983150362968445,
-0.1035674437880516,
0.16760696470737457,
0.49263322353363037,
0.16664792597293854,
-0.3872533440589905,
-0.2282354086637497,
-0.6242440342903137,
-0.11966642737388611,
0.37596622109413147,
0.13038595020771027,
0.44589066505432... | |
Vehicle firstV = new Vehicle();
firstV.Name = "some name";
firstV.Person = newPerson; // need to do this to set the person Id on the vehicle.
newPerson.Vehicle.Add(firstV);
// now when you save the Person it should save the Vehicle list
// if you set Cascade save update on the list. (not sure how t... | [
0.20988796651363373,
0.014046474359929562,
0.34844768047332764,
-0.09795763343572617,
0.022247709333896637,
0.5276169180870056,
0.20905640721321106,
-0.363564670085907,
-0.16512398421764374,
-0.6897062063217163,
0.013680137693881989,
0.5562431216239929,
0.08961780369281769,
0.1000006720423... | |
list of vehicles at another level , with the data that's coming from the interface.
But you need to remember that it's not enough to add the Vehicle to the list on the Person object , you also need to set the vehicles Person property to the person that has the vehicles.
**Observation** I'm not sure about this but wh... | [
0.3748653829097748,
0.023866115137934685,
0.1316712349653244,
0.18349145352840424,
-0.20013929903507233,
0.1791679710149765,
0.03955165669322014,
-0.12126157432794571,
-0.42733606696128845,
-0.5401185750961304,
0.1631237417459488,
0.6593667268753052,
0.2066940814256668,
-0.1092365458607673... | |
I was involved in couple of cloud computing platform recently.
First of all please note that I am not trying to criticize any platform.
Cloud computing is large area but to make my point simple and understandable. Let me come up with very simple scenario and that is data storage services hosted on the cloud.
If you t... | [
0.5559811592102051,
0.05328458175063133,
-0.11990638822317123,
0.3189745247364044,
0.1724081039428711,
0.1342392861843109,
-0.2854437232017517,
0.21704426407814026,
-0.28443628549575806,
-0.551459014415741,
0.23163862526416779,
0.4855978786945343,
0.09517237544059753,
0.3714742362499237,
... | |
where it stored and who is maintaining it etc... (all cloud goodies)
Now my area of concern is the way ANSI-SQL regulated platform venders to make sure they follow similar language across all the product can’t they regulate similar concept across
service providers?
Why no such initiatives??
Any thoughts appreciated
... | [
0.6280261874198914,
0.3049643039703369,
-0.1224387139081955,
0.39119091629981995,
0.22305332124233246,
-0.13395662605762482,
0.016046620905399323,
0.2379326969385147,
-0.2747119069099426,
-0.3531227111816406,
0.12982216477394104,
0.49313417077064514,
0.08616115897893906,
0.3917391300201416... | |
make this as realistic as possible.
With the fairly rapid speed of development I really think standardization committees would struggle to keep up. ANSI-SQL has had 20 + years of history. It seems to me like you're requesting for standardization long before we even know what the cloud is up to.... | [
0.6450670957565308,
0.15194174647331238,
0.2252257764339447,
0.17639212310314178,
-0.02462797425687313,
-0.3784894347190857,
-0.035464461892843246,
0.10156428813934326,
-0.15374450385570526,
-0.22744102776050568,
0.3968362808227539,
0.4510084092617035,
-0.20158903300762177,
0.0073918877169... | |
I am in the beginning stages of creating software for a mISV-to-be. The program is a desktop application and in the long run I want to have a native version for both Windows and OS X (I have a looked at various cross-platform APIs, and none of them meet my needs). Initially though, I don't think it makes sense to devel... | [
0.4670054018497467,
0.06114618480205536,
0.21406742930412292,
-0.08832139521837234,
0.04946686327457428,
-0.012854276224970818,
0.13262690603733063,
0.29055342078208923,
0.00585777685046196,
-0.7779746055603027,
0.01651889458298683,
0.6033518314361572,
-0.14822836220264435,
0.2835647761821... | |
follow that will make porting easier? Ignoring business considerations, would you recommend developing on one of them first?
I'm currently [working](http://www.appmakerx.com) on porting tools in this space and have many years of oft-painful experience in either using or writing cross-platform frameworks on Mac and Wind... | [
0.18530113995075226,
0.45932629704475403,
0.07420837879180908,
-0.02249247580766678,
-0.21062937378883362,
-0.015132585540413857,
0.03932763263583183,
-0.03985895588994026,
-0.23357613384723663,
-0.8676282167434692,
0.030367910861968994,
0.42112869024276733,
-0.4010826647281647,
0.06881978... | |
automate porting from one XML format to another. I regard WPF (XAML) as cleaner and so I'm using that as my base format and migrating to Cocoa.
When it comes to the code behind, whilst you can use C# under Mono, the [CocoaSharp](http://www.cocoa-sharp.com/) project seems either stalled or very slow and I wouldn't reco... | [
0.345804363489151,
0.14777852594852448,
0.14839333295822144,
-0.24166998267173767,
-0.43401750922203064,
-0.08052324503660202,
0.02564782276749611,
0.03667837753891945,
-0.4357166290283203,
-0.45864138007164,
-0.08575855940580368,
0.9648219347000122,
-0.47312507033348083,
-0.29374292492866... | |
[IronPython](http://www.codeplex.com/IronPython) and [IronRuby](http://www.ironruby.net/) but both are now supported by Microsoft people. On the Cocoa side, I think the flexibility of Ruby syntax will triumph and [RubyCocoa](http://rubycocoa.sourceforge.net/HomePage) is probably overtaking [PyObjC](http://pyobjc.source... | [
0.2556508481502533,
0.39682361483573914,
0.17459774017333984,
-0.18614642322063446,
-0.5177309513092041,
0.08387962728738785,
0.336615651845932,
0.1446622759103775,
-0.31940194964408875,
-0.33787739276885986,
-0.22847431898117065,
0.46192666888237,
-0.2456231266260147,
-0.02553902566432953... | |
I want to try out SICP with Python.
Can any one point to materials (video.article...) that teaches Structure and Interpretation of Computer Programs in **python**.
Currently learning from SICP videos of Abelson, Sussman, and Sussman.
Don't think there is a complete set of materials, [this](http://www.codepoetics.com/... | [
0.6602480411529541,
0.17994970083236694,
-0.24538306891918182,
0.022391336038708687,
-0.15319234132766724,
-0.19173792004585266,
0.29536059498786926,
0.21351923048496246,
-0.30898410081863403,
-0.5880076885223389,
0.05790005996823311,
0.5296231508255005,
-0.1000538244843483,
-0.42124629020... | |
I'm looking for a pc app that runs in the background and collates simple information about applications im running. Hopefully including the opened project (whereby visual studio includes the title of the project in the window title).
Also if it could include periods of inactivity that would be useful.
It's intended... | [
0.3796628415584564,
-0.06505579501390457,
0.4329545795917511,
0.11321879923343658,
0.19115759432315826,
-0.013180894777178764,
-0.021948395296931267,
0.3487219214439392,
-0.334637850522995,
-0.6906389594078064,
0.03747601434588432,
0.19829779863357544,
-0.2741934359073639,
0.04900170117616... | |
few seconds all week
> long.
Note: I'm not connected to these guys, not even as a customer. Well, I do read the blog. :-) | [
0.4011339843273163,
-0.1400412768125534,
0.20031172037124634,
0.15067146718502045,
-0.030256252735853195,
-0.06369132548570633,
0.3274795711040497,
0.6916011571884155,
-0.003498838050290942,
-0.45238012075424194,
0.228688046336174,
0.2564224898815155,
0.15839572250843048,
-0.07421606034040... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.