text stringlengths 0 30.5k | title stringclasses 1
value | embeddings listlengths 768 768 |
|---|---|---|
What I tried to say in the title is:
Given a bit of XML in which I know a particular element appears only once, is it possible using a *single* XPath query to select a node-set that contains that element twice?
I understand there's a "union" operator (|) but that's basically a logical-OR, right? In SQL terms I'm look... | [
0.07251261919736862,
-0.007624827791005373,
0.031976427882909775,
0.13458970189094543,
-0.28834739327430725,
-0.1454056352376938,
-0.020982323214411736,
-0.2520889639854431,
-0.15296030044555664,
-0.5310779213905334,
-0.20619764924049377,
0.11926960945129395,
-0.22729332745075226,
0.173696... | |
...identical content...
</ElementIWant>
```
I haven't found anything that makes me think it can be done - but that's why I'm asking...
XPath gives you node-**sets**, so by definition nodes appear only once.
Now, you can have named template and call it twice with same XPath.
```
<xsl:template match="/ElementIWant"> ... | [
0.2618893086910248,
-0.1649002581834793,
0.38430091738700867,
-0.08964803814888,
-0.04264497384428978,
-0.2509705722332001,
0.2564135789871216,
-0.48019012808799744,
-0.4216027557849884,
-0.7707904577255249,
0.10361117869615555,
0.4558504819869995,
-0.567834734916687,
0.23562157154083252,
... | |
I am looking for how to implement a toolbar similar to the one used here when you add a new question, this toolbar should format the text entered in my text box and allow me to make it Bold, Italic, choose size and fond and highlights, colors as well...
One important thing, I want one that is both supported on firefox ... | [
0.36443638801574707,
0.13620643317699432,
0.3780271112918854,
0.09050595760345459,
-0.2657199800014496,
-0.12016843259334564,
0.2557723820209503,
-0.1273977905511856,
0.03877749666571617,
-0.7996773719787598,
0.17141574621200562,
0.4016411602497101,
-0.22977808117866516,
-0.265417158603668... | |
a programming guru, I just make things work, so keep it simple folks ;)
thanks in advance.
XPath gives you node-**sets**, so by definition nodes appear only once.
Now, you can have named template and call it twice with same XPath.
```
<xsl:template match="/ElementIWant">
<xsl:call-template name="repeat"/>
<xsl:... | [
0.25293490290641785,
-0.2786843180656433,
0.18829713761806488,
0.14954671263694763,
-0.17715810239315033,
-0.2907230854034424,
0.41165125370025635,
-0.10167301446199417,
-0.28127482533454895,
-0.6811186671257019,
0.16169749200344086,
0.6901146769523621,
-0.4269251823425293,
0.0175465457141... | |
is it possible for a VB.net function with a return type of integer to return null ?
You'll need a return type of Nullable(Of Integer). | [
0.2619212567806244,
-0.16593408584594727,
0.022072745487093925,
0.06135576590895653,
-0.13897715508937836,
-0.09528689086437225,
0.26196974515914917,
-0.008026719093322754,
-0.17100565135478973,
-0.14397673308849335,
0.060562122613191605,
0.32007941603660583,
-0.4682307243347168,
0.1270895... | |
I am very confused about WPF and Windows Forms. What is the usage of WPF over Windows Forms?
What is the usage of WPF?
WPF is a new platform for developing applications for Windows (and for browsers). WPF is not necessarily there to *replace* Windows Forms. With WPF, it is easier to add 3D, video, and animations to you... | [
0.5135818123817444,
0.012225713580846786,
0.7636081576347351,
0.1961883157491684,
-0.3189018666744232,
-0.40750157833099365,
-0.061857402324676514,
-0.46015098690986633,
-0.398971825838089,
-0.8751989603042603,
-0.07211699336767197,
0.22643819451332092,
-0.28676602244377136,
-0.05251579359... | |
to have an advanced WPF designer build your UI with a tool like [Expression Blend](http://en.wikipedia.org/wiki/Microsoft_Expression_Blend), and yourself as a programmer, focus more on the back-end. In that way, it is more like having an HTML and CSS frontender creating a slick design for your site, while you work on t... | [
0.4258735477924347,
-0.2435818612575531,
0.4374953508377075,
0.06292715668678284,
-0.19198818504810333,
-0.3873409926891327,
0.07426363229751587,
-0.394878089427948,
0.07376733422279358,
-0.843929648399353,
-0.09799793362617493,
0.6440261602401733,
-0.22128081321716309,
-0.3104842603206634... | |
I am trying out jqueryUI, but firebug catches the following error on this script:
```
$(function(){$("#date").datepicker()});
```
The firebug error reads:
```
$("#date").datepicker is not a function
```
On my html, the "date" id looks like this:
```
<input type="text" name="date" id="date" >
```
NB: I have use... | [
0.43165305256843567,
-0.1331639587879181,
0.4353931248188019,
-0.29442667961120605,
0.392396479845047,
-0.24283427000045776,
0.2359522134065628,
-0.16164083778858185,
0.16006360948085785,
-0.47913044691085815,
-0.010112921707332134,
0.6135477423667908,
-0.30305421352386475,
-0.056115962564... | |
and it works, try it yourself:
```
<html>
<head>
<link type="text/css" href="http://jqueryui.com/latest/themes/base/ui.all.css" rel="stylesheet" />
<script type="text/javascript" src="http://jqueryui.com/latest/jquery-1.3.2.js"></script>
<script type="text/javascript" src="http://jqueryui.com/latest/ui/ui.core.j... | [
0.2637311816215515,
-0.3131433129310608,
0.34262654185295105,
0.08559437096118927,
0.31865647435188293,
-0.26956260204315186,
0.250923752784729,
-0.3556835353374481,
-0.015702662989497185,
-0.5634517669677734,
0.18441124260425568,
0.39504510164260864,
0.21607574820518494,
-0.30536481738090... | |
```
CodeVariableDeclarationStatement cvds = new CodeVariableDeclarationStatement(p.ParameterType, p.Name,
new CodePrimitiveExpression(INTARR()));
```
Consider the above code.
and when i run my project in debug mode,these are the values that get stored in p.ParameterType and p.Name.
```
p.Para... | [
-0.22202932834625244,
0.3697580099105835,
0.2568267583847046,
-0.2650388479232788,
-0.03344287350773811,
0.15605707466602325,
0.2988971173763275,
-0.6168830990791321,
-0.1753447949886322,
-0.4224364459514618,
-0.08562711626291275,
0.5773532390594482,
-0.47236359119415283,
0.054043680429458... | |
not primitive. You need to use CodeArrayCreateExpression:
```
Int32[] ints = INTARR();
CodeExpression[] intExps = new CodePrimitiveExpression[ints.Length];
for (int i = 0; i < ints.Length; i++)
intExps[i] = new CodePrimitiveExpression(ints[i]);
CodeVariableDeclarationStatement cvds = new CodeVariableDeclarationStat... | [
-0.047964200377464294,
0.0442393496632576,
0.27146103978157043,
-0.25300759077072144,
0.17076165974140167,
0.06100527569651604,
0.4895354211330414,
-0.6413376927375793,
0.14067786931991577,
-0.6533182263374329,
-0.37225210666656494,
0.8329737186431885,
-0.4844912886619568,
-0.1464145928621... | |
Akismet does an amazing job at detecting spam comments. But comments are not the only form of spam these days. What if I wanted something like akismet to automatically detect porn images on a social networking site which allows users to upload their pics, avatars, etc?
There are already a few image based search engine... | [
0.5668536424636841,
0.36319035291671753,
-0.18438006937503815,
0.27419158816337585,
-0.45674294233322144,
-0.2520942986011505,
0.3169917166233063,
0.37478572130203247,
-0.043432824313640594,
-0.3964269161224365,
0.27794620394706726,
0.254740446805954,
-0.15143057703971863,
0.05403675511479... | |
should I get started?
Is there any open source project for this going on?
This was written in 2000, not sure if the state of the art in porn detection has advanced at all, but I doubt it.
<http://www.dansdata.com/pornsweeper.htm>
> PORNsweeper seems to have some ability to distinguish pictures of people from picture... | [
0.43165507912635803,
-0.11004942655563354,
0.28548383712768555,
-0.0229959636926651,
-0.3289434015750885,
-0.2810889184474945,
0.23531050980091095,
-0.01862315647304058,
-0.47618600726127625,
-0.4241185486316681,
0.45618176460266113,
0.3102826774120331,
0.18639971315860748,
-0.312274158000... | |
chance of getting it. If your sister sends you a picture of her six-month-old, it's similarly likely to be detained.
>
>
> It's only fair to point out amusing errors, like calling the Mona Lisa porn, if they're representative of the behaviour of the software. If the makers admit that their algorithmic image recognise... | [
0.3010523319244385,
-0.05439934879541397,
0.3885282874107361,
0.30117279291152954,
-0.10348182916641235,
0.008105498738586903,
0.27398860454559326,
0.17469029128551483,
-0.24414493143558502,
-0.09089495986700058,
0.23951110243797302,
0.37286683917045593,
0.1524943858385086,
-0.131312265992... | |
porn, but it's bad at detecting clean pictures. And I wouldn't be surprised if no major leaps were made in this area in the near future.** | [
0.6493439078330994,
-0.04430602118372917,
0.3828388750553131,
0.385968953371048,
0.2524805963039398,
-0.3302350342273712,
0.2896529734134674,
0.3651505410671234,
-0.3252704441547394,
-0.2368524670600891,
0.0715261846780777,
0.6547362804412842,
0.5372161865234375,
-0.21421965956687927,
0.... | |
I try to construct a big Int64 with nibble information stored in bytes.
The following lines of code work as expected:
```
Console.WriteLine("{0:X12}", (Int64)(0x0d * 0x100000000));
Console.WriteLine("{0:X12}", (Int64)(0x0d * 0x1000000));
Console.WriteLine("{0:X12}", (Int64)(0x0d * 0x100000));
```
Why does the follo... | [
-0.211122065782547,
0.23337247967720032,
0.38561248779296875,
-0.16282300651073456,
0.03483525663614273,
0.13467778265476227,
0.38858890533447266,
-0.2170991748571396,
-0.039500802755355835,
-0.4889547824859619,
0.03189372271299362,
0.6650088429450989,
-0.19582779705524445,
0.1906770616769... | |
ulongs (UInt64s), otherwise by default they will be interpreter as ints (i.e. Int32s), clearly causing overflows. Casting after the multiplication operation won't do you any good in this case.
Haven't tested, but this code should work:
```
Console.WriteLine("{0:X12}", 0x0dL * 0x100000000L);
Console.WriteLine("{0:X12}... | [
-0.532593846321106,
-0.018400341272354126,
0.7994601726531982,
-0.3009016811847687,
0.057705607265233994,
0.34916913509368896,
0.13825136423110962,
0.0025337855331599712,
-0.1094590350985527,
-0.786851167678833,
-0.20921707153320312,
0.6001618504524231,
-0.3784935176372528,
0.0956819131970... | |
This is less of a programming question and more of a suggestions for tools one :-)
I'm looking for a way to prevent scripts being accidentally run on the wrong sql server instance, ie so you don't run that script for clearing down customers in your development environment on the live/production environment.
What I'm ... | [
0.43186914920806885,
0.126506507396698,
0.024041416123509407,
0.1607717126607895,
0.05054418742656708,
-0.31344282627105713,
0.01624304987490177,
0.029942531138658524,
-0.23063772916793823,
-0.8449689745903015,
0.0651816725730896,
0.5483039021492004,
-0.3534065783023834,
0.0310527831315994... | |
quite clear, either by coloring the tab red, or by poping up a message box saying "This is connected to XXXX instance. Are you sure"
Asside form being really careful, does anyone have any ideas for tools/plugins that will do this or anything remotely simular?
Thanks for any help
here you go:
<http://www.ssmstoolspack... | [
0.3518388867378235,
-0.1631045937538147,
0.27377915382385254,
0.046996112912893295,
0.08776116371154785,
-0.3529900312423706,
0.13708746433258057,
0.6623239517211914,
-0.3624522089958191,
-0.8940030336380005,
-0.09027931094169617,
0.2754746377468109,
-0.42176416516304016,
-0.17335270345211... | |
I'm calling a method via interop that returns an `out IntPtr` parameter. How can I get a `byte*` for this `IntPtr` so I can operate on it? I tried the following:
```
fixed(byte* ptr = (byte)myIntPtr)
```
but it didn't work. Any help would be appreciated!
You can simply write:
```
byte* ptr = (byte*)int_ptr;
```
Y... | [
0.05157238990068436,
0.1573779582977295,
0.1492045819759369,
0.12563182413578033,
-0.00266471179202199,
0.14082670211791992,
-0.04044749215245247,
0.18717160820960999,
-0.37645450234413147,
-0.2156011015176773,
0.10244285315275192,
0.6216205358505249,
-0.6104627847671509,
0.256282836198806... | |
I am using a standart .net 2.0 Gridview which uses an XMLDatasource to populate the Grid. The Data property of the XMLDatasource is set dynamically which allows the gridview to change based on input.
All this works fine however I am having problems with paging...
I have set the AllowPaging Property to "true" and set ... | [
0.3858240246772766,
-0.11279003322124481,
0.5941048264503479,
-0.07612383365631104,
-0.31566503643989563,
-0.05636927857995033,
0.3645976483821869,
-0.12973016500473022,
-0.0070694079622626305,
-0.9502999782562256,
0.3206976354122162,
0.48313218355178833,
-0.12928396463394165,
0.1349013745... | |
up saying "Object reference not set to an instance of an object"
any ideas what I'm doing wrong?? or is there anything i need to do which i have missed out on??
Code currently being used;
Gridview...
```
<asp:GridView ID="GridView1"
Runat="server"
DataSourceID="XmlDataSource1"
AutoGenerateColum... | [
0.40167608857154846,
0.039134446531534195,
0.9398540258407593,
-0.030492570251226425,
-0.016942979767918587,
-0.07100263237953186,
0.25323423743247986,
-0.4787502586841583,
-0.2792927026748657,
-0.5434675812721252,
-0.17409835755825043,
0.4250950217247009,
-0.3295055031776428,
0.1501656174... | |
sets the Data property of the XMLDatasource...
```
Private Sub btnTest_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnTest.Click
XmlDataSource1.Data = _testLib.GetGridXML(_Num)
GridView1.DataBind()
End Sub
```
where \_testLib.GetGridXML is a function that returns an XML string based on th... | [
0.2849307954311371,
-0.07786475867033005,
0.28603917360305786,
0.04031901806592941,
-0.10639647394418716,
-0.02675013244152069,
0.09977774322032928,
-0.3417866826057434,
-0.06532982736825943,
-0.5811693668365479,
-0.1847379207611084,
0.13750791549682617,
-0.22548876702785492,
0.05503546446... | |
on Page\_Load. Since you are not providing it here, I presume you do. If you don't, you'd get the null reference exception on each load.
With that in mind, you assign data on some button click, but not on PageIndexChanging.
You click the button, the page loads, you assign the data, the grid shows it. Then you click t... | [
0.1234390065073967,
-0.026982100680470467,
0.428755521774292,
0.20235498249530792,
0.04671178013086319,
-0.10739098489284515,
-0.10763207823038101,
-0.20599517226219177,
-0.27539873123168945,
-0.8462312817573547,
-0.20120267570018768,
0.5218961238861084,
-0.5662075877189636,
0.090747065842... | |
etc.
Btw, you don't have to call DataBind when assigning XmlDataSource declaratively. | [
0.2616611421108246,
-0.25262436270713806,
0.04119780287146568,
0.17675071954727173,
-0.3400729298591614,
-0.32316330075263977,
-0.15824833512306213,
0.042522914707660675,
-0.26897719502449036,
-0.33036965131759644,
-0.4622500538825989,
0.350432813167572,
-0.23990915715694427,
0.06374625116... | |
Is it possible to use the default ComboBox control under VB6 to make it a smart ComboBox?
We suppose that the values are already populated in the ComboBox. For example:
```
New Delhi
New World
New York
```
We need the ComboBox to respond to one of the default events, so when for example the user writes 'N' the value... | [
-0.0018523952458053827,
-0.5443090200424194,
0.4705585539340973,
0.2503959834575653,
0.1862795054912567,
0.22456499934196472,
-0.01511832233518362,
0.1608138084411621,
-0.08445782959461212,
-0.827465295791626,
-0.1830783635377884,
0.09596318751573563,
-0.4204297363758087,
-0.08134287595748... | |
you put the first word you will get a droped down list containing the suggestions).
But how to do that in VB6 :-(
In case its not possible, how can we keep the ComboBox droped down, the values changes when the text in the comboBox change and the first element in the ComboBox correspond to the first word starting by th... | [
0.5531156659126282,
-0.09307048469781876,
0.2768436670303345,
0.0801657885313034,
0.021721461787819862,
-0.052041515707969666,
0.3126072585582733,
-0.4026159346103668,
-0.3182695209980011,
-0.5739747881889343,
-0.1347290277481079,
0.5234469175338745,
-0.29890453815460205,
0.001742395688779... | |
third-party control. | [
-0.6803486347198486,
-0.14782217144966125,
0.18193794786930084,
0.23141412436962128,
-0.3777906596660614,
-0.06015096232295036,
-0.4269050657749176,
-0.008718959055840969,
-0.25075820088386536,
-0.40523964166641235,
-0.8025780916213989,
0.2491634488105774,
-0.4359970688819885,
-0.244501113... | |
I'd thought i do a regex replace
```
Regex r = new Regex("[0-9]");
return r.Replace(sz, "#");
```
on a file named aa514a3a.4s5 . It works exactly as i expect. It replaces all the numbers including the numbers in the ext. How do i make it NOT replace the numbers in the ext. I tried numerous regex strings but i am b... | [
0.0594489648938179,
0.022818967700004578,
0.10981808602809906,
-0.20197638869285583,
-0.07069817185401917,
0.02412136271595955,
0.5151504278182983,
-0.1356167048215866,
-0.172842338681221,
-0.42376092076301575,
-0.08653123676776886,
0.7257612347602844,
-0.5057713389396667,
0.03951643407344... | |
occur before the matched string) on a period, followed by zero or more alphanumeric characters. This ensures only numbers are matched that are not in your extension.
Obviously, the [0-9a-z] must be replaced by which characters you expect in your extension. | [
-0.007459559477865696,
-0.18242520093917847,
0.38872581720352173,
-0.20282809436321259,
0.19763824343681335,
0.03005470521748066,
0.21067176759243011,
0.013831404969096184,
-0.08461891859769821,
-0.38560980558395386,
-0.6152206659317017,
0.1544443964958191,
-0.0790853202342987,
0.109043098... | |
Duplicate of [What is the "< >" syntax within C#](https://stackoverflow.com/questions/155260/what-is-the-functionality-within-c)
---
Actually i want to know 'why and when should i use generics?'.
What is the need for it?
Generics are a way of ensuring Type Safety at Compile time in C#.
Example- Pre-Generics:
```
c... | [
-0.001907297526486218,
-0.12588155269622803,
-0.044371817260980606,
-0.03230976685881615,
0.045590851455926895,
0.1064470186829567,
0.21587692201137543,
-0.019104517996311188,
-0.564643383026123,
-0.45262250304222107,
-0.08419538289308548,
0.45214152336120605,
-0.7091866135597229,
0.402989... | |
p1 = new Person("John");
Person p2 = new Person("Ram");
personList.Add(p1);
personList.Add(p2);
// BUT, someone can do something like:
// ArrayList does not stop adding another type of object into it
object q = new object();
personList.Add(q); | [
-0.3586554527282715,
-0.39158695936203003,
0.19099988043308258,
-0.363699346780777,
-0.009762278757989407,
0.5333170294761658,
0.304770827293396,
-0.3924590051174164,
-0.4993007779121399,
-0.3863771855831146,
-0.43835657835006714,
0.3026437759399414,
-0.3412703275680542,
-0.079033881425857... | |
// while accessing personlist
foreach(object obj in personlist)
{
Person p = obj as Person;
// do something, for person
// But it will fail for last item in list 'q' since its is not person.
}
}
}
```
Example- Post-Generics:
```
class ClientCode
{ | [
-0.46110862493515015,
-0.16351652145385742,
0.10424219816923141,
-0.1574675589799881,
0.05721242353320122,
0.2085052728652954,
0.39012473821640015,
-0.014476321637630463,
-0.1570231318473816,
-0.48659810423851013,
-0.42311757802963257,
0.43307018280029297,
-0.2529118061065674,
0.1043111979... | |
public static void Main()
{
//create a list of person
List<Person> personList = new List<Person>();
Person p1 = new Person("John");
Person p2 = new Person("Ram");
personList.Add(p1);
personList.Add(p2);
// Someone can not add any other object then Person... | [
-0.3162207007408142,
-0.3761228322982788,
0.10903666913509369,
-0.2139950841665268,
0.165336012840271,
0.5161101222038269,
0.34002503752708435,
-0.24163508415222168,
-0.49546000361442566,
-0.2921469509601593,
-0.47599369287490845,
0.3285888135433197,
-0.567294180393219,
0.1290852427482605,... | |
object q = new object();
personList.Add(q); // Compile Error.
// while accessing personlist, No NEED for TYPE Casting
foreach(Person obj in personlist)
{
// do something, for person
}
}
}
``` | [
-0.22610512375831604,
-0.08354261517524719,
0.1754273623228073,
-0.3455815315246582,
-0.06080349162220955,
0.3015008866786957,
0.46535247564315796,
-0.2512959837913513,
0.040912725031375885,
-0.6120542287826538,
-0.2906501293182373,
0.45581185817718506,
-0.35779228806495667,
0.116740204393... | |
Good morning
I have been running a few tests over the past couple of weeks and I have come up against a bit of a wall.
I am testing in IE 7 and 8 and firefox.
Basically my problem is that IE 8 does not yet support a plug in and firefox does not support a referer in a frameset, so basically I want to do is detect whi... | [
0.5959011912345886,
0.5576996207237244,
0.6449817419052124,
-0.03514763340353966,
-0.08784948289394379,
-0.5304915904998779,
0.5237959027290344,
0.13811568915843964,
-0.1520109325647354,
-0.5189102292060852,
0.1552281379699707,
0.47676321864128113,
0.1327822357416153,
0.13422487676143646,
... | |
you're trying to do is target tests to IE then would conditional comments work?
```
<!--[if ie 7]>
The tests go here.
<![endif]-->
``` | [
0.6729069948196411,
0.10854996740818024,
-0.08530066907405853,
-0.17133326828479767,
-0.14714719355106354,
-0.18194416165351868,
0.41722372174263,
-0.09774251282215118,
0.17224235832691193,
-0.6862532496452332,
-0.26553770899772644,
0.747266948223114,
-0.4454137980937958,
-0.29116883873939... | |
I have been bashing away at Away3D for AS3, and have made a little terrain generator, using Perlin Noise to create a heightmap, and then for texturing, to splice together 5 images (very generic noise based water, beach, grass, rock & snow) depending on the height.
Where to next? I doubt my ability to contribute direct... | [
0.25150662660598755,
0.09698218107223511,
0.33308660984039307,
0.15921662747859955,
-0.21783669292926788,
0.10720672458410263,
0.13870908319950104,
-0.04774780943989754,
-0.17698702216148376,
-0.4772168695926666,
0.07938633114099503,
0.19591869413852692,
0.000004382655788504053,
-0.0034638... | |
one side of the mountain range will be more lush than the other side.
I'm wondering if anyone has any reading material they could suggest.
Thanks lots
edit:Unwind thought I should add a picture. There's photos of me on the internet drunk and disorderly, a sad under-developed terrainer thing shouldn't be much more em... | [
0.33214887976646423,
0.054619237780570984,
0.15759339928627014,
0.11753836274147034,
0.15223589539527893,
-0.05781285837292671,
0.5889849662780762,
0.24026480317115784,
-0.5038346648216248,
-0.46256160736083984,
0.13359278440475464,
0.3753504157066345,
0.23528438806533813,
-0.0251187141984... | |
thing that come to mind concerning texture rendering. First I have to say I'm not a 100% sure what you are looking for. I'll just post everything i can think of and you can pick ;)
* Improve the general texture mapping. Does the slope of the terrain modify what kind of texture you would put at the given vertex? Are th... | [
0.3540906012058258,
-0.20916245877742767,
0.5954655408859253,
0.15769869089126587,
-0.3278910517692566,
0.10769547522068024,
0.20258226990699768,
0.09888025373220444,
-0.24794167280197144,
-1.086523175239563,
0.20653505623340607,
0.6696755290031433,
0.2656485140323639,
-0.3348481059074402,... | |
either.
* Add procedurally generated vegetation.
* If you add vegetation, make it cast a shadow on the terrain.
* Think about improved water rendering (reflections, waves, transparency)
* I assume you use some sort of texture blending to blend the transition from one texture to the next?
* Are you using one big texture... | [
0.3273925483226776,
-0.24468453228473663,
0.2498401403427124,
0.42839479446411133,
-0.20171493291854858,
0.2672504186630249,
0.10499291121959686,
0.068326435983181,
-0.4875832498073578,
-1.1309285163879395,
0.20187366008758545,
0.6016851663589478,
0.1747605800628662,
-0.2073691189289093,
... | |
kind of problem.
Those points are in no particular order.
edit:
[gamedev.net](http://www.gamedev.net/reference/list.asp?categoryid=40)
[gamasutra.com](http://www.gamasutra.com/visualcomputing/) | [
-0.26784831285476685,
-0.08475270867347717,
0.059098124504089355,
0.1480342149734497,
-0.27357980608940125,
-0.01432818453758955,
0.2313900738954544,
0.0034364545717835426,
-0.5898175835609436,
-0.2779519259929657,
-0.44972312450408936,
0.3561728596687317,
-0.14928926527500153,
0.010024775... | |
So I have a spring application divided into several modules, each in a separate project.
Each module has its own JPA entities and I'm using Spring ORM for configuration:
```
<beans ...>
<context:component-scan
base-package="org.myapp.module1.persistence" />
<context:component-scan
base-package="org.myapp.mo... | [
-0.01974593661725521,
0.09196802228689194,
0.27457624673843384,
-0.2623296082019806,
-0.2178814709186554,
0.26794859766960144,
-0.07143406569957733,
-0.3477172553539276,
-0.5300946235656738,
-0.4166809022426605,
0.15758807957172394,
0.3386329412460327,
-0.14147044718265533,
0.0827945619821... | |
once Spring finds the first persistence.xml it stops loading and will not find any @Entity classes on other paths.
How can I make Spring look at everything?
In case you want to build a single persistence unit from multiple `persistence.xml` files you could use the [MergingPersistenceUnitManager](https://github.com/Spr... | [
0.0355062298476696,
-0.09063471853733063,
0.2851996123790741,
0.05409054830670357,
-0.31645825505256653,
0.10396958887577057,
0.04741961136460304,
-0.1724027693271637,
-0.511520266532898,
-0.4760994613170624,
0.09222210943698883,
0.2887445092201233,
-0.1164219006896019,
0.03971713036298752... | |
Are you using Scala to develop your enterprise grade applications?
EDIT:
agree, the word enterprise is not well defined. By asking this question I meant to ask whether you use Scala for real projects which are meant to be used not just for playing. Using Scala for a personal project which is meant to be used by more ... | [
0.5381215810775757,
0.01939372904598713,
0.14573219418525696,
0.12490439414978027,
0.2681000232696533,
0.08122643828392029,
-0.24536646902561188,
-0.2154051959514618,
-0.692180871963501,
-0.19967485964298248,
-0.06532080471515656,
0.33127447962760925,
-0.3347872495651245,
-0.15831142663955... | |
day, you have access to all the 'enterprise' stuffs that the Java platform has to offer.
Sorry, to come off as bit of a jerk, but these sort of questions are pretty poor, and have no definite answer. More to the point someone could have written a number of apps that you might deem 'enterprise' but they do not, and hen... | [
0.30146080255508423,
-0.20346999168395996,
0.369556188583374,
0.04270515590906143,
-0.0916500836610794,
0.011652698740363121,
0.4375596046447754,
0.18522672355175018,
-0.509564995765686,
-0.5763778686523438,
-0.07542085647583008,
0.43608033657073975,
-0.1619146317243576,
-0.388171464204788... | |
I have a sequence of functions that look very similar but for a single line, like the following two (but I have many more of them):
```
private static int HowManyHoursInTheFirstYear(IList<T> samples)
{
DateTime firstDate = samples[0].Date;
int count = 0;
while (count < samples.Count &&
samples[... | [
0.37348029017448425,
-0.2750636637210846,
0.4018777012825012,
-0.21769367158412933,
-0.05241619050502777,
0.019959555938839912,
0.03089330531656742,
-0.393254816532135,
0.02530633471906185,
-0.40811100602149963,
-0.14155825972557068,
0.2853148281574249,
-0.20801086723804474,
0.434251576662... | |
int count = 0;
while (count < samples.Count &&
samples[count].Date.Month == firstDate.Month) // <--- only change!
count++;
}
return count;
}
```
I was thinking about using delegates to remove this repetition in code in some elegant way, that would have allowed me to invoke something ... | [
0.25637397170066833,
-0.03892006352543831,
0.2749754786491394,
0.01929207146167755,
0.08782009035348892,
-0.0192505344748497,
0.15518981218338013,
-0.47980794310569763,
-0.4659428000450134,
-0.27431973814964294,
-0.07966712862253189,
0.23033352196216583,
-0.2785370945930481,
0.585243165493... | |
HowManyDaysInTheFirstPeriod whould be something like the following:
```
private static int HowManySamplesInFirstPeriod
IList<T> samples,
DateComparer comparer)
{
DateTime firstDate = samples[0].Date;
int count = 0;
while (count < samples.Count && comparer())
{
count++;
}
}
```
Un... | [
0.14135758578777313,
-0.11657223105430603,
0.6297768950462341,
-0.0821148157119751,
0.09357848763465881,
-0.24821239709854126,
0.21490737795829773,
-0.3775062561035156,
-0.0902106910943985,
-0.5946050882339478,
0.1733078956604004,
0.21651548147201538,
0.07352308928966522,
0.380870431661605... | |
the appropriate arguments to invoke it.** In your case, that's going to mean this change:
```
while (count < samples.Count && comparer(samples[count].Date, firstDate))
{
count++;
}
```
**(Also, note that `samples` should probably be `samples.Count`, as I have written above.)** | [
0.20398350059986115,
-0.26788783073425293,
0.3990214467048645,
-0.3793809413909912,
0.11538513004779816,
-0.038124024868011475,
-0.007442232221364975,
-0.24786554276943207,
-0.05561162903904915,
-0.44579634070396423,
-0.15294687449932098,
0.46736860275268555,
-0.20531755685806274,
0.159252... | |
If you have for instance a datetime datatype set on a column in MSSQLServer2008 that gives you the datecreated, is it better to have the .NET layer pass the current date or set the Default Value or Binding of the column to (getdate())?
I think it's better to have SQL server handle the date for items like that. If the c... | [
0.1735086292028427,
-0.18611089885234833,
0.5023945569992065,
0.09239958971738815,
0.10643965750932693,
-0.20274771749973297,
0.02508431300520897,
0.06327186524868011,
-0.46442919969558716,
-0.6001443266868591,
0.05093800649046898,
0.10910099744796753,
-0.13110104203224182,
0.2322158664464... | |
command. | [
-0.30755695700645447,
0.30496957898139954,
0.30902260541915894,
0.19616372883319855,
-0.212915301322937,
-0.2174077183008194,
0.03664317727088928,
-0.38536933064460754,
-0.29369962215423584,
-0.6405131220817566,
-0.7063988447189331,
0.4436400234699249,
-0.019157858565449715,
0.183476656675... | |
I want to have a `List` or `Array` of some sort, storing this information about each country:
* 2 letter code
* Country name such as Brazil
* Continent/region of the world such as Eastern Europe, North America, etc.
I will classify each country into the region/continent manually (but if there exists a way to do this ... | [
0.3522196412086487,
0.15822063386440277,
0.2397237867116928,
0.31517675518989563,
0.34444260597229004,
-0.04248982295393944,
0.28143972158432007,
0.378501832485199,
-0.5263526439666748,
-0.5784645676612854,
-0.02000102587044239,
-0.3507155776023865,
-0.0931166335940361,
0.17456117272377014... | |
javascript using Google Web Toolkit. But storing in an Enum or another resource file of some sort, keeping it separate from the rest of the code, is what I'm really after.
There is 246 countries in ISO 3166, you might get a relay big enum on back of this. I prefer to use XML file with list of countries, you can downloa... | [
0.3106657862663269,
0.2802717685699463,
-0.0019913543947041035,
0.10939706861972809,
0.020225385203957558,
-0.0315050408244133,
0.1757468581199646,
0.22936031222343445,
-0.7037585377693176,
-0.9193019866943359,
-0.45512890815734863,
-0.13130061328411102,
-0.7619099020957947,
-0.04873546585... | |
loading them each time.
I think this would be anyway better than holding them in code, as you will finish with loading full list each time module is accessed, even if user will not need to use this list.
So you need something which will hold country:
```
public class Country
{
private final String name;
priva... | [
0.2681952714920044,
-0.16944001615047455,
0.4892951548099518,
0.05869956687092781,
0.20672409236431122,
-0.03297121077775955,
0.13090470433235168,
-0.06743063032627106,
-0.7352573275566101,
-0.4449513256549835,
-0.3136959671974182,
0.28841423988342285,
-0.21262528002262115,
0.1859351247549... | |
public String getName()
{
return name;
}
public String getCode()
{
return code;
}
public boolean equals(Object obj)
{
if (this == obj)
{
return true;
} | [
-0.13375937938690186,
-0.13443849980831146,
0.3100930154323578,
-0.2276611179113388,
-0.032536089420318604,
0.16068828105926514,
0.4197687804698944,
-0.06560514867305756,
0.022474756464362144,
-0.4881752133369446,
-0.34191012382507324,
0.5658296346664429,
-0.5189250707626343,
-0.0745747312... | |
if (obj == null || getClass() != obj.getClass())
{
return false;
}
Country country = (Country) obj;
return code.equals(country.code);
}
public int hashCode()
{
return code.hashCode();
}
}
```
For GWT this class would need to implement IsSerializab... | [
-0.16579777002334595,
-0.17812122404575348,
0.37381526827812195,
-0.06981123238801956,
0.19032277166843414,
0.04048167169094086,
0.4224509298801422,
0.0028317836113274097,
-0.4232948124408722,
-0.7088795900344849,
-0.24647244811058044,
0.30491989850997925,
-0.4358653724193573,
0.3179142773... | |
side using:
```
import java.util.ArrayList;
import java.util.List;
import java.io.InputStream;
import org.dom4j.Attribute;
import org.dom4j.Document;
import org.dom4j.DocumentException;
import org.dom4j.Element;
import org.dom4j.io.SAXReader;
public class CountriesService
{
private static final String EL_COUNTRY... | [
-0.1308586448431015,
0.09784558415412903,
0.6880680918693542,
0.10891997069120407,
-0.04949285835027695,
0.35100412368774414,
0.04141054302453995,
-0.3298110365867615,
-0.2592870891094208,
-0.2280934602022171,
-0.319684773683548,
0.31759199500083923,
-0.010331228375434875,
0.13704212009906... | |
void parseCountriesList(InputStream countriesList)
{
countries.clear();
try
{
Document document = parse(countriesList);
Element root = document.getRootElement();
//noinspection unchecked
Iterator<Element> i = root.elementIterator(EL_COUNTRY); | [
-0.03576994687318802,
-0.10719136148691177,
0.3851933777332306,
-0.039334069937467575,
0.5866694450378418,
-0.09308914095163345,
0.1589769870042801,
-0.1263332962989807,
-0.2529986798763275,
-0.2925472855567932,
-0.5280724763870239,
0.09848155826330185,
-0.3691617548465729,
0.2940985262393... | |
while (i.hasNext())
{
Element countryElement = i.next();
Element countryName = countryElement.element(EL_COUNTRY_NAME);
Element countryCode = countryElement.element(EL_COUNTRY_CODE);
String countryname = countryName.getText(); | [
-0.1544315069913864,
-0.29668956995010376,
0.47638294100761414,
-0.2418927699327469,
0.47625237703323364,
0.09283959865570068,
0.31081610918045044,
-0.14555786550045013,
-0.35073742270469666,
-0.5620900392532349,
-0.5202829837799072,
-0.01132556889206171,
-0.25958678126335144,
0.1327556967... | |
countries.add(new Country(countryname, countryCode.getText()));
}
}
catch (DocumentException e)
{
log.error(e, "Cannot read countries list");
}
catch (IOException e)
{
log.error(e, | [
0.17290395498275757,
0.014297924935817719,
0.22332413494586945,
0.24053889513015747,
0.4757363498210907,
-0.04352005943655968,
-0.08208620548248291,
0.019794436171650887,
-0.5392223000526428,
-0.3198731243610382,
-0.3425734341144562,
0.21796497702598572,
-0.3431253433227539,
0.158303633332... | |
"Cannot read countries list");
}
}
public static Document parse(InputStream inputStream) throws DocumentException
{
SAXReader reader = new SAXReader();
return reader.read(inputStream);
}
}
```
Of course, if you need to find country by ISO 2 letter code you might wont to change... | [
0.023526040837168694,
-0.07226961851119995,
0.525137186050415,
0.18593037128448486,
0.2181420922279358,
-0.3923935890197754,
0.26285356283187866,
0.08449241518974304,
-0.6267027854919434,
-0.5453404784202576,
-0.6531761884689331,
0.18482409417629242,
-0.38130760192871094,
0.316488295793533... | |
(ISO website) license. | [
0.4111446738243103,
0.2756170630455017,
0.2714070677757263,
0.09111899882555008,
0.14886048436164856,
-0.6514391899108887,
0.3185233771800995,
0.06913688033819199,
-0.3474154770374298,
-0.06925787031650543,
-0.7082539200782776,
-0.04076668992638588,
-0.009975208900868893,
0.409141689538955... | |
Im very interested in text analysis, where can I start leaning about the subject?
Algorithms and stuff for beginners?
Please see my answer to [this question](https://stackoverflow.com/questions/608743/strategies-for-recognizing-proper-nouns-in-nlp/609951) for a list of textbooks regarding natural language processing. A... | [
0.1381252557039261,
-0.47678670287132263,
-0.04399785399436951,
0.3536090552806854,
-0.31994614005088806,
0.16314955055713654,
0.02616650052368641,
-0.030401315540075302,
-0.21029040217399597,
-0.5166124105453491,
-0.05158763378858566,
0.4723038375377655,
0.3789518177509308,
-0.08261934667... | |
Can a model have multiple tables in CakePHP?
Guessing from this sentence in the manual:
> A model is generally an access point to the database, and more specifically, to a certain table in the database. By default, each model uses the table who's name is plural of its own, i.e. a 'User' model uses the 'users' table.
... | [
-0.021543407812714577,
-0.09688026458024979,
0.18198202550411224,
0.2969849705696106,
0.02952686883509159,
0.17844314873218536,
0.08289864659309387,
-0.14325332641601562,
-0.37873512506484985,
-0.6876968145370483,
-0.03284237161278725,
0.27045851945877075,
-0.18682701885700226,
-0.05793226... | |
Allright, doing some project with few friends, and I need some standard for naming things in c++. Does anyone have any good naming scheme for c++ that is well thought-out and not made in like 10min.
Example, int\* house should be named int\* house\_p, so that when someone reads the code, he doesn't need to scroll all ... | [
0.4957936704158783,
0.12428801506757736,
0.09118524193763733,
0.23931322991847992,
-0.14291739463806152,
-0.13478529453277588,
0.04932026565074921,
-0.21897856891155243,
-0.41670936346054077,
-0.37992551922798157,
0.08073695003986359,
0.2992391586303711,
-0.011732964776456356,
0.1732983142... | |
scroll all the time wondering if a
> thing is a pointer, array, matrix, or
> whatever...
But what if its type changes - are you going to go through all your code and change the names of all the variables. And what if the variable is an instance of a complex type:
```
ComplicatedDerivativeFinancialInstrument x;
```... | [
0.2553985118865967,
0.19364969432353973,
0.3851405382156372,
0.15842744708061218,
-0.06360817700624466,
-0.09172224998474121,
0.1033681184053421,
-0.014726751483976841,
-0.17512576282024384,
-0.5308553576469421,
-0.2611871659755707,
0.21310113370418549,
-0.40015172958374023,
0.144121333956... | |
Note : In WinForm
I facing problem in TableLayoutPanel. I adding and removing the control dynamicall using TableLauoutPanel. My problem is, if i remove the control in the middle (ie i added TextBox1, TextBox2 and TextBox3 and now i removed TextBox2) at this time other controls are not resized properlly. When the last ... | [
-0.3406549394130707,
-0.30170631408691406,
0.5639352798461914,
-0.17100068926811218,
0.058037009090185165,
-0.017936373129487038,
0.2682039439678192,
-0.1822754144668579,
0.05969024822115898,
-0.5051434636116028,
-0.10808289796113968,
0.7286852598190308,
-0.38576212525367737,
0.28566321730... | |
txt.Multiline = true;
txt.Dock = DockStyle.Fill; NEWADD(txt);
}
private void NEWADD(Control ctrl)
{
tbl.RowCount += 1;
tbl.RowStyles.Add(new RowStyle(SizeType.Percent, 100F / tbl.RowStyles.Count));
tbl.Controls.Add(ctrl, 0, tbl.RowStyles.Count - 1);
foreach (RowStyle row in tbl.RowStyles)
{
... | [
0.1613435596227646,
-0.21277745068073273,
0.819338858127594,
-0.25633350014686584,
0.35628741979599,
0.38875529170036316,
0.3549865484237671,
-0.6026332378387451,
-0.19868901371955872,
-0.3354017734527588,
-0.2804916203022003,
0.7592365145683289,
-0.42116764187812805,
0.179159477353096,
... | |
i = 0; i < tbl.Controls.Count; i++)
{
tbl.RowStyles.Add(new RowStyle(SizeType.Percent, 100F /( tbl.RowStyles.Count +1)));
}
foreach (RowStyle row in tbl.RowStyles)
{
row.SizeType = SizeType.Percent;
row.Height = 100F / (tbl.RowStyles.Count);
}
tbl.Refresh();
}
void tx... | [
-0.037000853568315506,
-0.07968133687973022,
0.6177343726158142,
-0.31265929341316223,
0.3476545214653015,
0.19820982217788696,
0.490573525428772,
-0.5511088371276855,
-0.06467516720294952,
-0.5325738191604614,
-0.20116719603538513,
0.6501327157020569,
-0.35738760232925415,
0.2964997887611... | |
the control is in.
```
tbl.RowCount -= 1
```
is always going to remove the last row. You need to move through each control that is in a row after the the you want to remove and shift your controls up one row. Maybe something like this...
```
foreach(Control control in tbl.Controls)
{
if(control.Row > controlToR... | [
-0.46899041533470154,
-0.1388600468635559,
0.448338121175766,
0.1082262173295021,
0.5389859676361084,
0.04831419885158539,
-0.12252103537321091,
-0.07913817465305328,
-0.03352184221148491,
-0.5592965483665466,
-0.26904454827308655,
0.3996773958206177,
-0.44819411635398865,
0.22200420498847... | |
I have a legacy app that can display crystal reports to the user, using the crystal component current at the time it was developed. Sadly, the version at that time was 8.5.
If I try to open an XI report in the old app, then I get an exception about not being able to open the report.
I'd like to show a Crystal XI repo... | [
0.2227015495300293,
0.14939431846141815,
0.37491369247436523,
0.023539619520306587,
-0.19020947813987732,
-0.28252026438713074,
0.23795299232006073,
0.1898375004529953,
-0.35646602511405945,
-0.5173763632774353,
0.2507539391517639,
0.3580072522163391,
-0.1257067620754242,
0.358693420886993... | |
that easy...
You can display 8.5 reports in the XI viewer. But, not the other way. Maybe upgrade the legacy app to XI? | [
0.5178707242012024,
-0.2921254336833954,
0.43068891763687134,
0.6262144446372986,
-0.10067468881607056,
-0.38742688298225403,
-0.12570533156394958,
0.09987982362508774,
-0.1151568666100502,
-0.8987359404563904,
0.2440132200717926,
0.7485876083374023,
-0.15888795256614685,
0.023927640169858... | |
Is there a list somewhere of recommendations of different Python-based REST frameworks for use on the serverside to write your own RESTful APIs? Preferably with pros and cons.
Please feel free to add recommendations here. :)
Something to be careful about when designing a RESTful API is the conflation of GET and POST, ... | [
-0.05691951885819435,
-0.19286814332008362,
0.23128053545951843,
0.05778492987155914,
-0.24306213855743408,
-0.23911646008491516,
0.24698030948638916,
0.13081716001033783,
-0.28348690271377563,
-0.4362594783306122,
-0.26329168677330017,
0.5558796525001526,
-0.2976275682449341,
-0.189361065... | |
end up falling into a [REST anti-pattern](http://www.infoq.com/articles/rest-anti-patterns).
Some frameworks that get it right are [web.py](http://webpy.org/), [Flask](http://flask.pocoo.org) and [Bottle](http://bottlepy.org). When combined with the [mimerender](https://github.com/martinblech/mimerender) library (full... | [
0.06794452667236328,
0.05678921565413475,
0.716647207736969,
-0.05877981334924698,
0.12868648767471313,
-0.10416869074106216,
0.3456404507160187,
-0.4243057072162628,
0.004140601493418217,
-0.6250914931297302,
-0.13268718123435974,
0.356378972530365,
-0.01013132557272911,
-0.08975087106227... | |
= render_xml,
json = render_json,
txt = render_txt
)
def GET(self, name):
if not name:
name = 'world'
return {'message': 'Hello, ' + name + '!'}
if __name__ == "__main__":
app.run()
```
The service's logic is implemented only once, and the correct representat... | [
-0.21558214724063873,
-0.05151398479938507,
0.5909430384635925,
-0.39802005887031555,
0.04780134931206703,
0.39683297276496887,
0.541108250617981,
-0.10626491159200668,
0.10295996814966202,
-0.8906567692756653,
-0.6744665503501892,
0.6972137689590454,
-0.21224801242351532,
-0.1862204074859... | |
function (or template) is done in a tidy, transparent way.
```
$ curl localhost:8080/x
<html><body>Hello, x!</body></html>
$ curl -H "Accept: application/html" localhost:8080/x
<html><body>Hello, x!</body></html>
$ curl -H "Accept: application/xml" localhost:8080/x
<message>Hello, x!</message>
$ curl -H "Accept: ap... | [
-0.28515714406967163,
0.23482157289981842,
0.6563708782196045,
-0.246744766831398,
-0.573204517364502,
-0.041908688843250275,
0.0452994741499424,
-0.430196076631546,
-0.1088867112994194,
-0.33689233660697937,
-0.06534069031476974,
0.2840487062931061,
-0.38548654317855835,
-0.08994413912296... | |
in my app i need to send an javascript Array object to php script via ajax post. Something like this:
```
var saveData = Array();
saveData["a"] = 2;
saveData["c"] = 1;
alert(saveData);
$.ajax({
type: "POST",
url: "salvaPreventivo.php",
data:saveData,
async:true
});
```
Array's indexes are strings... | [
0.09657508134841919,
-0.00784769281744957,
0.33284223079681396,
-0.19538196921348572,
-0.14515163004398346,
0.31035804748535156,
0.38393518328666687,
-0.22047211229801178,
-0.14749282598495483,
-0.5870221257209778,
-0.08919405192136765,
0.45964258909225464,
-0.5864370465278625,
-0.12026371... | |
= 2;
saveData['c'] = 1;
```
Doing it the way you are doing it with Arrays is just taking advantage of Javascript's treatment of Arrays and not really the right way of doing it. | [
0.4394811987876892,
0.03357205539941788,
-0.0814916118979454,
-0.3656943440437317,
-0.11560776084661484,
-0.22424045205116272,
0.2348800152540207,
-0.20873412489891052,
-0.10871811956167221,
-0.10821046680212021,
-0.18226078152656555,
0.5236784219741821,
-0.5428469181060791,
-0.41675108671... | |
In PHP I can do this:
```
$new = str_replace(array('/', ':', '.'), '', $new);
```
...to replace all instances of the characters / : . with a blank string (to remove them)
Can I do this easily in Objective-C? Or do I have to roll my own?
Currently I am doing multiple calls to `stringByReplacingOccurrencesOfString`:... | [
0.004102627281099558,
0.28605350852012634,
0.7642027139663696,
-0.14096425473690033,
-0.3876161575317383,
-0.04164962098002434,
0.39378634095191956,
-0.2388407289981842,
-0.06551361829042435,
-0.5137162208557129,
0.16296207904815674,
0.5529427528381348,
-0.18438003957271576,
-0.15617708861... | |
more efficiently. | [
0.3625132441520691,
-0.07809729874134064,
-0.050175316631793976,
0.33584967255592346,
-0.23197300732135773,
-0.14143173396587372,
0.20082221925258636,
0.02171759493649006,
-0.09577396512031555,
-0.870537519454956,
-0.17851027846336365,
0.40249738097190857,
-0.10977964103221893,
0.090811572... | |
I need a server-side script (PHP, Python) to capture a webpage to a PNG, JPG, Tiff, GIF image and resize them to a thumbnail.
What is the best way to accomplish this?
### See also:
> * [Web Page Screenshots with PHP?](https://stackoverflow.com/questions/686858/web-page-screenshots-with-php)
> * [How can I take a scr... | [
0.2106841653585434,
-0.05472631752490997,
0.3233710825443268,
0.17419864237308502,
-0.04913560673594475,
-0.2768579125404358,
0.3685985505580902,
-0.08711155503988266,
-0.29569366574287415,
-0.6952506303787231,
0.04605225473642349,
0.4630368649959564,
0.04928397014737129,
-0.07902970910072... | |
using Python and QtWebKit](http://www.blogs.uni-osnabrueck.de/rotapken/2008/12/03/create-screenshots-of-a-web-page-using-python-and-qtwebkit/)
* [Taking automated webpage screenshots with embedded Mozilla](http://www.hackdiary.com/2004/06/13/taking-automated-webpage-screenshots-with-embedded-mozilla/) | [
-0.007368371356278658,
-0.1133451983332634,
-0.055138297379016876,
-0.09134312719106674,
-0.2028055489063263,
-0.11767209321260452,
0.17900551855564117,
-0.043578799813985825,
-0.2507706582546234,
-0.2459287941455841,
-0.13988777995109558,
0.7015548348426819,
-0.3701288104057312,
-0.658131... | |
We are designing a fairly large brownfield application, and run into a bit of a issue.
We have a fairly large amount of information in a DB2 database from a legacy application that is still loading data. We also have information in an Oracle database that we control.
We have to do a 'JOIN' type of operation on the ... | [
0.4355294704437256,
0.3292052447795868,
0.024178918451070786,
-0.040163543075323105,
0.25475162267684937,
-0.2371882200241089,
-0.07787294685840607,
-0.17403341829776764,
-0.21570010483264923,
-0.4025404453277588,
-0.0654568001627922,
0.48002171516418457,
-0.2666100859642029,
0.06506168842... | |
easier way to interact between the databases, or at least, what is the best practice for this sort of action?
I've done this two ways.
With two Sybase databases on different boxes, I set up store procedures, and called then like functions, to send data back and forth. This additionally allowed the sprocs to audit/log,... | [
0.1444157212972641,
-0.0941634401679039,
-0.00037856341805309057,
0.13499073684215546,
-0.03501278534531593,
-0.05012809485197067,
-0.23423384130001068,
-0.30875450372695923,
-0.20108507573604584,
-0.3897717595100403,
0.0693838819861412,
0.762126088142395,
-0.31761300563812256,
-0.34902006... | |
DB2 setup, where like your situation, the Db2 was "legacy but live", I employed a setup similar to what you're describing: pulling the data out into a (Java) client program.
If the join is always one-to-one, and each box's resultset has the same key, you can pull them both with the same ordering and trivially connect... | [
0.19116680324077606,
-0.35087940096855164,
-0.1060623750090599,
-0.18952561914920807,
-0.25663337111473083,
-0.1256067156791687,
-0.08557365834712982,
-0.5646790266036987,
-0.315846711397171,
-0.618157148361206,
-0.1262746900320053,
0.3867829144001007,
-0.7317171692848206,
-0.3233406841754... | |
though, your choices are sprocs (for which you'd need to and a client layer), or just doing it in the client. | [
0.6093416213989258,
-0.22784389555454254,
0.2386787235736847,
0.16868934035301208,
0.09454202651977539,
-0.19710320234298706,
-0.10621471703052521,
0.09640514850616455,
-0.3673746883869171,
-0.5243656635284424,
-0.0742182731628418,
0.562760591506958,
0.25308164954185486,
-0.268927395343780... | |
I found the ICommandExecutor interface in .net but cant find the classes where it is implemented. I know there is some xaml related stuff where it's used. But is there something for the winforms, too?
It's implemented in MenuItemData which is an inner class of System.Windows.Forms.MenuItem.
In general if you're lookin... | [
0.41647642850875854,
-0.10105074942111969,
0.41312238574028015,
0.09795011579990387,
-0.21719403564929962,
-0.050972092896699905,
0.021546563133597374,
-0.12953129410743713,
-0.06404406577348709,
-0.8022311329841614,
0.31428655982017517,
0.48337504267692566,
-0.17302651703357697,
0.2460988... | |
I'm developing a web application using a cookie to store session information. I've manually deleted the session cookies because I'm working on another part of the code where I don't want a login session. However, after a couple reloads of the page, the session cookie mysteriously reappears, including an earlier cookie ... | [
0.4896478056907654,
0.3749615550041199,
-0.02944367006421089,
0.12882840633392334,
0.17996704578399658,
-0.10994701832532883,
0.5390725135803223,
0.12067175656557083,
-0.2701466679573059,
-0.554671049118042,
0.17328031361103058,
0.47501349449157715,
-0.2876608967781067,
0.41236087679862976... | |
anywhere. My code is all in one file at the moment, and I'm not including anything, so there's no possibility that I'm overlooking something.
My code is in PHP and used the setcookie() call when I initially created those cookies.
I've not set an expiry date on the cookies.
Using Safari 4 Beta and the GlimmerBlocker p... | [
0.31011974811553955,
0.14594106376171112,
0.32683438062667847,
0.027747254818677902,
0.06416758894920349,
-0.2979484498500824,
0.5925242900848389,
0.173436239361763,
-0.47912630438804626,
-0.7327146530151367,
-0.16743679344654083,
0.161196768283844,
-0.10266375541687012,
0.2622307240962982... | |
What is the best way to write unit test for code which gets current time? For example some object might be created only at business days, other objects take into account current time when checking permissions to execute some actions, etc.
I guess that I should mock up the Date.today and and Time.now. Is this right app... | [
0.28535202145576477,
-0.06220721825957298,
0.49279218912124634,
0.08507034927606583,
0.2603949308395386,
-0.061852194368839264,
0.40678995847702026,
-0.26516658067703247,
0.023799818009138107,
-0.6976421475410461,
0.03838154673576355,
0.46706342697143555,
0.06007348373532295,
0.32360371947... | |
and therefore better than extracting code which gets current date / time.
BTW I recommend to use [Chronic](http://chronic.rubyforge.org/) to get required time, e.g.
```
require 'Chronic'
mon = Chronic.parse("next week monday")
Time.stubs(:now).returns(mon)
```
Mocking Time.now or Date.today seems straightforwa... | [
0.13859429955482483,
0.08262447267770767,
0.5367656350135803,
-0.20062284171581268,
0.2548293471336365,
-0.09201733767986298,
0.6551128625869751,
-0.08365605771541595,
0.005790841765701771,
-0.7004111409187317,
-0.21196435391902924,
0.814609706401825,
0.04063687473535538,
0.250110208988189... | |
Is there an accepted way to "move" a control.
My client wants to place a certain chunk of markup (representing some visual element) in one of several different places on the page. The locations are different to the point that I can't effect the change on CSS along (by floating it or something).
I considered just putt... | [
0.3342030644416809,
-0.03496956825256348,
0.14801040291786194,
0.44462212920188904,
0.036829374730587006,
0.07492300868034363,
-0.36140283942222595,
0.056902457028627396,
-0.44403624534606934,
-0.4590536057949066,
0.20826271176338196,
0.0028904471546411514,
-0.3125605881214142,
-0.03458444... | |
places would get unwieldy. Also, I don't want to have to work with this control strictly from the code-behind for the same reason.
So, I'd like to put it in one place on the Web form, the move it around based on where I want it. Could I put Placeholders in different spots, have the control in one spot, then remove and... | [
0.5732214450836182,
0.005353245884180069,
0.31879276037216187,
0.37333762645721436,
0.4436967968940735,
0.05374343320727348,
-0.3018122911453247,
-0.1797599196434021,
-0.05664632469415665,
-0.6479656100273132,
0.18569383025169373,
0.16613571345806122,
-0.21094228327274323,
0.03815187513828... | |
at runtime and adding it to the relevant placeholder.
Eg.
```
// Load a user control
MyControl userCtrl = (MyControl) LoadControl("~/Controls/MyControl.ascx");
// Or create an instance of your control
SubclassedControl subclassedCtrl = new SubclassedControl();
// Do stuff with controls here
userCtrl.LoadData();
sub... | [
-0.2938288450241089,
0.08285629004240036,
0.8811601400375366,
-0.049556996673345566,
0.2313079535961151,
0.03596032038331032,
0.3711790442466736,
-0.07755637168884277,
0.025334466248750687,
-0.9762357473373413,
-0.6178597211837769,
0.29114678502082825,
-0.5131158828735352,
0.18168422579765... | |
part of the page. | [
-0.078157439827919,
-0.03131376579403877,
0.021333618089556694,
0.14128084480762482,
-0.1514265239238739,
0.080652616918087,
-0.04610713571310043,
0.2468537837266922,
-0.25101402401924133,
-0.42109763622283936,
-0.04154275357723236,
-0.2565959393978119,
-0.08980526030063629,
0.259757697582... | |
I am using an Odbc driver with Paradox. I have a table with a date in it. I am trying to query by the date in that column. I can't seem to get the where clause to work. I can get the record searching by ints, but I don't know how to use the date time.
```
OdbcCommand comm= new OdbcCommand("SELECT * FROM [Journal] WH... | [
-0.1323520839214325,
0.24740912020206451,
0.4266623854637146,
-0.1296493411064148,
0.335377961397171,
-0.11989545822143555,
0.018392963334918022,
0.1359051614999771,
-0.3360310196876526,
-0.5087307691574097,
-0.010288390330970287,
0.3197701573371887,
-0.23534642159938812,
0.633210539817810... | |
"[Date] = 04/02/2009 ",
new OdbcConnection(@"Driver={Microsoft Paradox Driver (*.db )};DriverID=538;Fil=Paradox 5.X;DefaultDir=d:\\ics\\tables\\HISTORY;Dbq=d:\\ics\\tables\\HISTORY;CollatingSequence=ASCII"));
OdbcDataAdapter adapt = new OdbcDataAdapter(comm);
DataTable table = new Dat... | [
-0.6480113863945007,
-0.2530916929244995,
0.9534797668457031,
-0.0686093419790268,
-0.0732729434967041,
0.04137655720114708,
0.16505368053913116,
0.062088802456855774,
-0.26052775979042053,
-0.448261022567749,
-0.3978298604488373,
0.19250212609767914,
-0.051886238157749176,
0.5402207970619... | |
With Linq To Sql - what is the best way to update the value of one table in a database when a value changes in a different table?
For example in TableA, there is a column called DateModified. TableA has an association to TableB. Now I want to set the value of the DateModified field to the current date every time the r... | [
0.16304363310337067,
0.13290521502494812,
0.5775243639945984,
0.3307993412017822,
0.2095765471458435,
-0.005498407408595085,
-0.5285671949386597,
-0.20488880574703217,
-0.1785060167312622,
-0.2586194574832916,
0.37374424934387207,
0.3426341116428375,
0.027890415862202644,
0.090758241713047... | |
the data-context, call `GetChangeSet`, and apply the changes just before they are updated. The latter (data-context) approach is useful for catching a broad spectrum of changes, where-as the `On*Changed` approach is useful for logic specific to individual properties.
However, in the case presented (non-homogeneous upd... | [
0.10568221658468246,
-0.3124099373817444,
0.38203153014183044,
0.3810902237892151,
-0.06987674534320831,
-0.09993673115968704,
-0.018910860642790794,
-0.2514132261276245,
-0.14409814774990082,
-0.3789375424385071,
-0.3919731378555298,
0.8079999089241028,
-0.25293463468551636,
-0.0972100794... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.