text stringlengths 0 30.5k | title stringclasses 1
value | embeddings listlengths 768 768 |
|---|---|---|
(the Revision). It's easy enough with put $Rev$ into a variable to keep track of changes on a file. However, I would like to keep track of the repository's version, and I understand (and it seems based on my tests) that $Rev$ only updates when the file changes.
My initial thoughts turn to using the svn/libsvn module b... | [
0.27512308955192566,
0.08619251847267151,
0.8243162035942078,
0.06935615092515945,
-0.07131173461675644,
-0.026393337175250053,
0.31955409049987793,
0.013055716641247272,
-0.5446042418479919,
-0.6215952038764954,
-0.17775385081768036,
1.1689444780349731,
0.07046083360910416,
0.217533364892... | |
`svnversion` which comes with subversion and is meant to solve exactly that kind of problem. | [
0.3541436493396759,
-0.09767216444015503,
0.3557979166507721,
0.10755075514316559,
-0.31678760051727295,
-0.14443019032478333,
0.37940531969070435,
0.36784300208091736,
-0.11944804340600967,
-0.10940119624137878,
-0.08176425099372864,
0.11255866289138794,
-0.5128645896911621,
0.25410541892... | |
I've written some software for a customer, and I'd like to release it to them under a license that permits them to make modifications for their own in-house use, but still prohibits them from selling or otherwise redistributing the software after I've given it to them. Can someone point me to a license that either has ... | [
0.8696047067642212,
0.31027892231941223,
0.1083950325846672,
0.09200605750083923,
0.19697701930999756,
-0.14640292525291443,
-0.06214199960231781,
0.03295355290174484,
-0.3083595931529999,
-0.25683310627937317,
0.08526239544153214,
0.5428780317306519,
-0.06991802901029587,
0.17598792910575... | |
is a close match to what you want to achieve. | [
0.00020943513663951308,
-0.12514203786849976,
0.11999733746051788,
0.18664148449897766,
0.1755010485649109,
-0.15706850588321686,
0.32157617807388306,
0.06240111589431763,
0.10049198567867279,
-0.6247274875640869,
-0.0563926175236702,
0.4356175661087036,
0.27127301692962646,
-0.14667172729... | |
I have the following classes
```
public interface InterfaceBase
{
}
public class ImplementA:InterfaceBase
{
}
public class ImplementB:InterfaceBase
{
}
public void TestImplementType<T>(T obj) where T: InterfaceBase
{
}
```
How to infer what the T is whether ImplementA or ImplementB? I tried to use
```
typeof(T)... | [
0.3659958243370056,
0.1093946173787117,
0.025059988722205162,
-0.21940362453460693,
-0.26439541578292847,
0.2735495865345001,
0.2502864897251129,
-0.47387781739234924,
0.0332699716091156,
-0.6315906047821045,
0.05786040052771568,
0.4952119290828705,
-0.4857330322265625,
-0.0077248415909707... | |
I have two lists that are of the same length, is it possible to loop through these two lists at once?
I am looking for the correct syntax to do the below
```
foreach itemA, itemB in ListA, ListB
{
Console.WriteLine(itemA.ToString()+","+itemB.ToString());
}
```
do you think this is possible in C#? And if it is, wh... | [
0.16958943009376526,
-0.09197985380887985,
0.45816510915756226,
-0.23467591404914856,
-0.11186594516038895,
0.011971789412200451,
0.37095263600349426,
-0.308931827545166,
-0.3205459713935852,
-0.46630385518074036,
-0.1884470283985138,
0.17317773401737213,
-0.6057149767875671,
-0.0225056987... | |
It lets us produce some very terse code that's close to the original request:
```
int[] numbers = { 1, 2, 3, 4 };
string[] words = { "one", "two", "three" };
foreach (var (number, word) in numbers.Zip(words))
Console.WriteLine($"{number}, {word}");
// 1, one
// 2, two
// 3, three
```
Or, the same thing but wit... | [
-0.19866099953651428,
-0.17800648510456085,
0.34553587436676025,
-0.08400938659906387,
0.035881176590919495,
0.0863974466919899,
0.20129047334194183,
-0.4695546329021454,
-0.0716925710439682,
-0.6635567545890808,
-0.2558790445327759,
0.2769691050052643,
-0.3265222907066345,
-0.017496503889... | |
= numbers.Zip(words, (number, word) => $"{number}, {word}");
foreach (string item in numbersAndWords)
Console.WriteLine(item);
```
If you are using LINQ on regular objects (as opposed to using it to generate SQL), you can also check out [MoreLINQ](https://github.com/morelinq/MoreLINQ), which provides several zip... | [
0.3047754764556885,
-0.1424466222524643,
0.5561562180519104,
-0.006947245914489031,
0.25172844529151917,
0.19771303236484528,
0.004134760703891516,
-0.5053419470787048,
-0.4260879158973694,
-0.3231353759765625,
-0.46457040309906006,
0.18399138748645782,
-0.3794052302837372,
-0.170618772506... | |
`ZipShortest` - The resulting sequence is as short as the shortest input sequence.
See their [examples](https://github.com/morelinq/examples) and/or [tests](https://github.com/morelinq/MoreLINQ/tree/master/MoreLinq.Test) for usage. It seems MoreLINQ's zipping came before regular LINQ's, so if you're stuck with an old ... | [
0.3190249800682068,
-0.515680730342865,
0.20455710589885712,
0.1767951399087906,
-0.027466725558042526,
-0.3540828227996826,
0.006829217541962862,
-0.07475396245718002,
-0.6550496220588684,
-0.21824288368225098,
-0.41389191150665283,
-0.08774232864379883,
-0.6311113834381104,
-0.1352775245... | |
Basically I need to run the script with paths related to the shell script file location, how can I change the current directory to the same directory as where the script file resides?
In Bash, you should get what you need like this:
```
#!/usr/bin/env bash
BASEDIR=$(dirname "$0")
echo "$BASEDIR"
``` | [
0.3790684938430786,
0.017452554777264595,
0.06786283850669861,
-0.27659547328948975,
-0.08602867275476456,
-0.22293393313884735,
0.236045703291893,
-0.2978862524032593,
0.08716755360364914,
-0.5385290384292603,
0.19388191401958466,
0.9749959111213684,
-0.043656859546899796,
-0.028993565589... | |
I've tried reading a JPG file using the `StreamReader` class' `ReadToEnd()` method which returns a string.
For some reason though, when I write this string out to a file, it doesn't open.
Is something lost when reading data into a string?
Strings are for *text* data. They're not for binary data - if you use them this... | [
0.4256932735443115,
-0.037146132439374924,
-0.242010697722435,
0.23953425884246826,
-0.1636725664138794,
-0.08601047843694687,
0.27830126881599426,
0.2839873731136322,
-0.1944141685962677,
-0.6328068375587463,
0.051328837871551514,
0.4541533589363098,
-0.037314943969249725,
0.3236621320247... | |
to call [File.ReadAllBytes](http://msdn.microsoft.com/en-us/library/system.io.file.readallbytes.aspx). If you have to deal with an arbitrary stream, have a look at ["Creating a byte array from a stream"](https://stackoverflow.com/questions/221925/creating-a-byte-array-from-a-stream). | [
0.26491475105285645,
-0.16811151802539825,
0.25120046734809875,
0.020520009100437164,
-0.06229352578520775,
-0.21430158615112305,
0.19067421555519104,
0.08108541369438171,
-0.5255753397941589,
-0.4860149919986725,
-0.24391107261180878,
0.47674354910850525,
-0.14812548458576202,
-0.02316546... | |
Is it possible to make a POST request from Ruby with open-uri?
Unfortunately `open-uri` only supports the `GET` verb.
You can either drop down a level and use `net/http`, or use `rest-open-uri`, which was designed to support `POST` and other verbs. You can do `gem install rest-open-uri` to install it. | [
0.3053640127182007,
-0.0024271404836326838,
0.15965843200683594,
0.011106767691671848,
-0.31911030411720276,
-0.12071990221738815,
0.5162567496299744,
0.09045963734388351,
0.10930650681257248,
-0.49844273924827576,
-0.38512304425239563,
0.3845767676830292,
-0.28191664814949036,
0.243148624... | |
I'm having trouble running a complex query against our company LDAP server. I'm using the following Perl script:
```
use Data::Dumper;
use Net::LDAP;
die "Can't connect to LDAP-Server: $@\n"
unless $ldap = Net::LDAP->new( 'xLDAPx' );
foreach my $filter ( 'ou=Personal', 'ou=BAR', 'ou=Personal,ou=BAR', 'ou=Person... | [
-0.18486562371253967,
0.1365840584039688,
0.4898662567138672,
-0.27504822611808777,
-0.08523688465356827,
0.15501521527767181,
0.16016937792301178,
-0.17150115966796875,
0.03784644976258278,
-0.7793904542922974,
-0.14948338270187378,
0.6672908663749695,
-0.7892695665359497,
-0.019141301512... | |
it with a tool like the Softerra LDAP Browser.
I have also tried the same query using PHP's `ldap_search` & co, no avail.
Can somebody shed some light on this?
Thanks for reading
holli
Edit:
This is the structure of the server:
```
Server
ou=FOO
ou=...
ou=Personal
uid=something
`... | [
0.13990138471126556,
-0.21475385129451752,
0.375709593296051,
-0.05631783977150917,
-0.4035218358039856,
-0.22985979914665222,
0.039059434086084366,
0.02856507897377014,
-0.19212274253368378,
-0.8733469247817993,
0.06430525332689285,
0.6600762605667114,
-0.4142163097858429,
-0.125823304057... | |
for you.
Edited to add: I'm guessing this is what you want to do: `(|(ou=Personal)(ou=FOO))` | [
0.4521821439266205,
0.45373785495758057,
0.07585291564464569,
-0.42113834619522095,
0.18876416981220245,
-0.25064072012901306,
0.3339148461818695,
0.155612975358963,
0.023702647536993027,
-0.24411480128765106,
-0.2590603232383728,
0.7963898181915283,
-0.3561672568321228,
-0.319056689739227... | |
Whilst investigating a memory leak I discovered that it was caused by calling NewRow() on a Table inside a loop many times. However the DataRow created was never added to the Table Rows collection and the Table Rows Count never got above zero.
My question is why does this use up more memory every time NewRow is called... | [
0.41035717725753784,
-0.04705367982387543,
-0.004189410712569952,
0.2525087893009186,
-0.16951166093349457,
-0.07163237035274506,
0.38028767704963684,
0.05296560376882553,
-0.37269920110702515,
-0.38055551052093506,
0.2628138065338135,
0.23975034058094025,
-0.5036571621894836,
0.6938403844... | |
DataRows that don't get added to the table!
DataRow inherits schema from the DataTable, so there are references from DataRow to the table schema that generated the row. The new row is in Detached state in the table.
this is why GC left the new unused rows alone. | [
-0.20700618624687195,
-0.043258652091026306,
0.5565642714500427,
0.08955959230661392,
-0.09667854756116867,
-0.13673780858516693,
-0.2811458110809326,
-0.16454440355300903,
-0.297637939453125,
-0.35200467705726624,
0.009035627357661724,
0.08260995894670486,
-0.13730433583259583,
0.65363711... | |
I have one aspx page with some controls.
Also i have one DIV which is dynamically populated from AJAX call.
This AJAX call return couple of controls, for example HtmlInputText1 and HtmlInputText2.
When page is submitted, I can get values from this controls through Request.Form.
If possible access to the attributes of... | [
0.029953578487038612,
-0.20252300798892975,
0.5086178779602051,
0.3152400553226471,
-0.5313177108764648,
0.24595202505588531,
0.0582226999104023,
-0.37267017364501953,
-0.18101631104946136,
-0.8342417478561401,
0.25593119859695435,
0.4129049479961395,
-0.1801854372024536,
-0.08253666013479... | |
the target values manually.
You can write some javascript which modify the value of the server control within browser.
```
<script language="javascript" type="text/javascript">
function changeValue() {
var txtControlClient = document.getElementById('<%= txtControl.ClientID %>');
txtControlClient.value = "modi... | [
0.058262817561626434,
-0.2709828019142151,
0.9239329099655151,
-0.16951410472393036,
0.061998121440410614,
0.06169451028108597,
0.08856157958507538,
-0.26149341464042664,
0.034835439175367355,
-0.6842634081840515,
-0.298904150724411,
0.5940554738044739,
-0.36019888520240784,
0.169092759490... | |
I need to implement a SSO between a SharePoint site and a custom PHP-based site which resides on a different domain. I need to use the SharePoint user accounts to log in the PHP site. (I'll have a full control over the PHP source)
Is this possible? Any tips and tricks?
My assumption is you have full control over your ... | [
0.4491887092590332,
0.2449091076850891,
0.2139897644519806,
0.33246320486068726,
0.1131899431347847,
-0.2654721140861511,
0.25126275420188904,
0.011432301253080368,
-0.16177153587341309,
-0.593497633934021,
-0.00319461221806705,
0.31179577112197876,
-0.20885799825191498,
-0.098649501800537... | |
which has a link to your site on it. When the user clicks the link, the request is made back to the sharepoint server, the sharepoint server takes the user's logon name, encrypts it using your public key, and adds it to a url on your php site then sends this as a redirect back to the browser. So the location looks like... | [
0.2519969642162323,
0.015600338578224182,
0.6780428290367126,
-0.05044108256697655,
0.08709383010864258,
-0.10412463545799255,
0.024635473266243935,
-0.09509111195802689,
-0.2798921465873718,
-0.6083808541297913,
-0.07368465512990952,
-0.007838061079382896,
-0.48932403326034546,
0.36229771... | |
on the sharepoint site to confirm the logon request is legitimate within some time window, or bake that into the encrypted logon name, but this is a barebones way to do it, assuming you trust requests coming from the sharepoint partner.
The sharepoint .net developers will probably be able to do any encryption you want... | [
0.5814185738563538,
0.00008848563447827473,
0.39708805084228516,
0.047649137675762177,
0.22247488796710968,
-0.5351753234863281,
0.1608753502368927,
-0.01692935638129711,
-0.15890906751155853,
-0.6867912411689758,
-0.1674654185771942,
0.3899994194507599,
-0.09927237778902054,
0.05578581988... | |
deny the logon. | [
0.2594620883464813,
0.43683919310569763,
0.029539471492171288,
0.22172489762306213,
-0.45696794986724854,
-0.08779814094305038,
0.09866748005151749,
0.07488054037094116,
0.15886719524860382,
-0.11489222943782806,
-0.08842361718416214,
0.35165369510650635,
-0.15119333565235138,
0.3258258700... | |
For a load test of my application (under Linux), I'm looking for a tool that outputs data on stdout at a specific rate (like 100 bytes/s), so that I can pipe the output to netcat which sends it to my application. Some option for dd would be ideal, but I didn't find anything so far. It doesn't really matter what kind of... | [
0.5100209712982178,
-0.1765906661748886,
0.30861130356788635,
-0.015487913973629475,
-0.4334769546985626,
0.1550145298242569,
0.15097643435001373,
-0.2843468487262726,
-0.08954645693302155,
-0.7198804020881653,
0.10648149996995926,
0.7142991423606873,
-0.1371241807937622,
0.291774421930313... | |
My account is in the securityadmin role and I cannot grant myself sysadmin permission. I wish to gain access to a database so I can add my account to a particular role within it.
As I don't yet have access to the database I can't use the UI.
Does anyone know if this is possible and what SQL commands will achieve t... | [
0.07525293529033661,
0.17402726411819458,
0.48021724820137024,
0.020445527508854866,
-0.03048989735543728,
-0.22228485345840454,
0.41245636343955994,
-0.03315296024084091,
-0.09373623132705688,
-0.4055445194244385,
0.0970022901892662,
0.5797035098075867,
-0.12196110188961029,
0.15033034980... | |
roles (not the built-in db\_\* roles)
Books Online is a bit misleading on this.
securityadmin (server role) will allow you to do things like reset passwords but you will prolly need sysadmin to grant your user account into a database.
The other thing is if you are able to log into the machine running SQL Server with... | [
-0.032679080963134766,
-0.1333305537700653,
0.22495068609714508,
0.27690085768699646,
0.08522224426269531,
-0.309553861618042,
0.3908557891845703,
-0.1767454892396927,
-0.3333934247493744,
-0.5817292332649231,
0.009037964046001434,
0.37239164113998413,
-0.10092009603977203,
-0.068018734455... | |
How can I create an Oracle stored procedure which accepts a variable number of parameter values used to feed a IN clause?
This is what I am trying to achieve. I do not know how to declare in PLSQL for passing a variable list of primary keys of the rows I want to update.
```
FUNCTION EXECUTE_UPDATE
( <parameter_list... | [
-0.08071836084127426,
0.2712779641151428,
0.39750850200653076,
-0.09118309617042542,
-0.045602601021528244,
0.028166653588414192,
0.02459881268441677,
-0.26361897587776184,
-0.13902534544467926,
-0.4057466685771942,
0.0031173403840512037,
0.6540413498878479,
-0.5279902815818787,
0.03205116... | |
this procedure from C#, so it must be compatible with .NET capabilities.
Thanks,
Robert
Using CSV is probably the simplest way, assuming you can be 100% certain that your elements won't themselves contain strings.
An alternative, and probably more robust, way of doing this is to create a custom type as a table of st... | [
0.22830815613269806,
-0.009816394187510014,
0.30915382504463196,
-0.11513303220272064,
-0.1221374049782753,
-0.11730236560106277,
0.28957584500312805,
-0.36410894989967346,
-0.1982051581144333,
-0.4570840895175934,
0.07525684684515,
0.4353618025779724,
-0.4555465877056122,
-0.0402255393564... | |
value int)
RETURN int
IS
BEGIN
[...other stuff...]
update table1 set col1 = col1 - value
where id in (select column_value from table(identifierList));
RETURN SQL%ROWCOUNT;
END
```
The `table()` function turns your custom type into a table with a single column "COLUMN\_VALUE", which you can then t... | [
-0.0065459287725389,
0.1427512913942337,
0.5641563534736633,
-0.3875536024570465,
-0.03615949675440788,
0.17713846266269684,
0.13257594406604767,
-0.35383740067481995,
-0.2018139511346817,
-0.37729817628860474,
-0.10296373814344406,
0.6302051544189453,
-0.5826689004898071,
0.05708071216940... | |
programatically from C#.
As an aside, at my company we have a number of these custom types defined as standard for lists of strings, doubles, ints and so on. We also make use of [Oracle JPublisher](http://www.oracle.com/technology/oramag/oracle/04-jan/o14dev_jpublisher.html) to be able to map directly from these types... | [
0.5388744473457336,
-0.00979897566139698,
-0.12722082436084747,
-0.09894460439682007,
-0.272982656955719,
0.2147485613822937,
0.035229235887527466,
0.1102159321308136,
-0.35100868344306946,
-0.32968834042549133,
-0.09619133919477463,
0.40658876299858093,
-0.4478079080581665,
-0.08917959034... | |
Is it possible to change the destination port of a UDP packet using iptables?
I'm trying to get an SNMP agent to send out traps on 1620 instead of 162. Unfortunately so far I've only managed to change the source port:
> iptables -t nat -A POSTROUTING -p udp
> --dport 162 -j SNAT --to :1620
This usage is apparently n... | [
0.016279377043247223,
-0.20817062258720398,
0.35162654519081116,
-0.18785035610198975,
0.04837222397327423,
0.005128477234393358,
0.3769361972808838,
-0.13321331143379211,
-0.5983496308326721,
-0.9924958944320679,
0.17149648070335388,
0.19712068140506744,
-0.5796740651130676,
0.03865160793... | |
be, but it requires a new
>
> configuration option, some testing,
> and a fair bit of coding, so unless
> someone contracts Rusty to write it, I
> wouldn't expect it soon).
>
>
> The current limitation is that you
> can only change the destination to
>
> the local machine (e.g. `j DNAT --to
> 127.0.0.1')... | [
0.2419683337211609,
-0.362531453371048,
0.21796460449695587,
-0.17043843865394592,
0.29750457406044006,
-0.19953712821006775,
0.6529988646507263,
-0.03808251768350601,
0.36023852229118347,
-0.9008740186691284,
-0.2949408292770386,
0.6639940738677979,
-0.5041496157646179,
0.2539678812026977... | |
I need to write a regular expression that finds javascript files that match
```
<anypath><slash>js<slash><anything>.js
```
For example, it should work for both :
* c:\mysite\js\common.js (Windows)
* /var/www/mysite/js/common.js (UNIX)
The problem is that the file separator in Windows is not being properly escaped... | [
0.18754667043685913,
-0.00497887097299099,
0.3255369961261749,
0.03770005330443382,
0.1961904764175415,
-0.29860132932662964,
0.38453322649002075,
-0.3511606752872467,
-0.2533242404460907,
-0.5322371125221252,
-0.0833490714430809,
0.41144660115242004,
-0.5589762926101685,
-0.14948605000972... | |
available as of Java 1.5 or later. For 1.4, you need to simply escape the file separator char:
```
"\\" + File.separator
```
Escaping punctuation characters will not break anything, but escaping letters or numbers unconditionally will either change them to their special meaning or lead to a [PatternSyntaxException](... | [
-0.15561726689338684,
-0.18532289564609528,
0.38101497292518616,
-0.10586336255073547,
0.048107996582984924,
0.038539960980415344,
0.5276843309402466,
0.1418749988079071,
-0.31432515382766724,
-0.5150465965270996,
-0.32068341970443726,
0.16946934163570404,
-0.4060952067375183,
-0.231648996... | |
Why would someone use `WHERE 1=1 AND <conditions>` in a SQL clause (Either SQL obtained through concatenated strings, either view definition)
I've seen somewhere that this would be used to protect against SQL Injection, but it seems very weird.
If there is injection `WHERE 1 = 1 AND injected OR 1=1` would have the sa... | [
0.23216025531291962,
-0.01992580108344555,
0.016347423195838928,
0.17671145498752594,
-0.3085026144981384,
0.1210588663816452,
0.021429533138871193,
-0.04946720600128174,
-0.23785240948200226,
-0.48805251717567444,
0.12528423964977264,
0.4704473912715912,
-0.29123544692993164,
0.5018399357... | |
AND table.Field=Value
```
If the list of conditions is not known at compile time and is instead built at run time, you don't have to worry about whether you have one or more than one condition. You can generate them all like:
```
and <condition>
```
and concatenate them all together. With the `1=1` at the start, th... | [
0.2196263074874878,
0.19153974950313568,
0.003478621831163764,
-0.10395222157239914,
0.20280495285987854,
-0.043754804879426956,
-0.0774477943778038,
-0.43544521927833557,
-0.028779856860637665,
-0.4307626783847809,
0.045539312064647675,
0.4842853546142578,
-0.47955867648124695,
0.08136148... | |
it should have no performance impact. | [
0.12045180797576904,
0.24355652928352356,
0.131954625248909,
0.10441610962152481,
0.03869432210922241,
-0.07983372360467911,
0.12137911468744278,
0.03606536239385605,
0.23102393746376038,
-0.335334450006485,
-0.15246322751045227,
0.583410382270813,
0.11257416754961014,
-0.01544402446597814... | |
Do you think there is a big difference in for...in and for loops? What kind of "for" do you prefer to use and why?
Let's say we have an array of associative arrays:
```
var myArray = [{'key': 'value'}, {'key': 'value1'}];
```
So we can iterate:
```
for (var i = 0; i < myArray.length; i++)
```
And:
```
for (var ... | [
0.2992103397846222,
0.017052318900823593,
-0.10172512382268906,
-0.08981995284557343,
-0.18047954142093658,
0.16783402860164642,
0.26527222990989685,
-0.3368016481399536,
0.02196328714489937,
-0.2852056622505188,
-0.09764242172241211,
0.49883657693862915,
-0.5092194676399231,
-0.1331458985... | |
iterated using:
```
for (var key in o)
//do stuff with o[key]
```
Unless you have earth shattering reasons, stick to the established pattern of usage. | [
0.34315651655197144,
0.17267723381519318,
0.06446246802806854,
-0.30278345942497253,
0.0904899537563324,
-0.18316584825515747,
0.38268744945526123,
0.0891609936952591,
0.06964217126369476,
-0.10772867500782013,
-0.5415210723876953,
0.4826679229736328,
-0.27134066820144653,
-0.2309157550334... | |
When writing CUDA applications, you can either work at the driver level or at the runtime level as illustrated on this image (The libraries are CUFFT and CUBLAS for advanced math):
[](https://i.stack.imgur.com/TD51p.jpg)
(source: [tomshw.it](https://www.tomshw... | [
0.1252393126487732,
0.12524978816509247,
0.23922167718410492,
0.02901959791779518,
-0.34911105036735535,
-0.1734660565853119,
-0.02872098609805107,
0.006965447682887316,
-0.18543502688407898,
-0.6783451437950134,
-0.0659036636352539,
0.7506265640258789,
-0.42343583703041077,
-0.08609697222... | |
lot of rather complex code in C# while the C++ equivalent would be more simple using the runtime API. Is there anything to win by doing it this way? The one benefit I can see is that it is easier to integrate intelligent error handling with the rest of the C# code.
The CUDA runtime makes it possible to compile and link... | [
0.10803505033254623,
0.07788819074630737,
-0.2951301038265228,
0.3470563590526581,
-0.3927574157714844,
-0.25354132056236267,
-0.06277942657470703,
0.19532303512096405,
-0.23558847606182098,
-0.5530507564544678,
0.20454157888889313,
0.9285163879394531,
-0.41352078318595886,
-0.077908441424... | |
the driver API is harder to program but provided more control over how CUDA is used. The programmer has to directly deal with initialization, module loading, etc.
Apparently more detailed device information can be queried through the driver API than through the runtime API. For instance, the free memory available on ... | [
-0.11924352496862411,
0.18419313430786133,
0.19215115904808044,
0.09078279882669449,
-0.12567144632339478,
0.16435076296329498,
-0.2129104882478714,
-0.16381075978279114,
0.12725108861923218,
-0.5539178848266602,
0.011041803285479546,
0.8145896792411804,
-0.32438957691192627,
0.32861766219... | |
CUDA driver API.
>
>
> These APIs are mutually exclusive: An application should use either one or the
> other.
>
>
> The CUDA runtime eases device code management by providing implicit
> initialization, context management, and module management. The C host code
> generated by nvcc is based on the CUDA runtime (s... | [
-0.15264959633350372,
0.16215313971042633,
0.3453311622142792,
-0.016936786472797394,
-0.20350727438926697,
-0.1935514658689499,
-0.18984302878379822,
0.01692574843764305,
0.040671806782484055,
-0.6447879672050476,
-0.17924819886684418,
0.6358959674835205,
-0.6681814193725586,
0.4270503818... | |
only
> deals with cubin objects (see Section 4.2.5). In particular, it is more difficult to
> configure and launch kernels using the CUDA driver API, since the execution
> configuration and kernel parameters must be specified with explicit function calls
> instead of the execution configuration syntax described in ... | [
0.08129362761974335,
-0.09212543070316315,
0.233087956905365,
0.10930774360895157,
-0.4151732921600342,
-0.0773022323846817,
0.18905411660671234,
-0.09881169348955154,
0.08686188608407974,
-0.9089581370353699,
-0.38015949726104736,
0.6082556843757629,
-0.636760413646698,
0.0383549705147743... | |
We can see in a directory files ordered by Name in Windows Explorer.
If I try the same thing in the Windows command prompt it orders by name differently - *correctly*:
```
dir *.jpg /ON /B
cubierta.jpg
pag00.jpg
pag06.jpg
pag08.jpg
pag09.jpg
pag100.jpg
pag101.jpg
pag102.jpg
pag103.jpg
pag104.jpg
pag105.jpg
pag106.jp... | [
-0.13965167105197906,
-0.11165489256381989,
-0.04382556676864624,
-0.127546489238739,
-0.31800577044487,
0.29387202858924866,
0.14167237281799316,
-0.194838285446167,
-0.21804305911064148,
-0.6732889413833618,
-0.19103656709194183,
0.3451440930366516,
-0.28376784920692444,
-0.0809804573655... | |
We use a base entity with properties such as version (datetime needed for NHibernate) and guid (as key).
It also has an Id (int) field with two functions. Firstly to relate to legacy application key if there is one. Secondly as a shorthand code: for instance files are sometimes created based on these which would look ... | [
0.10141279548406601,
0.016734322533011436,
0.2572488784790039,
0.12194602191448212,
-0.11989793926477432,
-0.0004027374379802495,
-0.12473076581954956,
-0.12758661806583405,
-0.056116171181201935,
-0.45206111669540405,
0.15271197259426117,
0.42645955085754395,
-0.21723680198192596,
0.40146... | |
our cache and memory?. Is this really that much of a worry?
I am interested to hear other downsides besides performance. Consider also these values will probably be exposed through web services to third parties in time too.
The alternative is to deal with the exceptions of larger integers as they arise and implement ... | [
0.3867373466491699,
0.4996491074562073,
0.026051828637719154,
0.40460601449012756,
0.1847795695066452,
-0.013049334287643433,
0.2798999845981598,
-0.1975964605808258,
-0.29511919617652893,
-0.43274709582328796,
0.16367553174495697,
0.505658745765686,
0.07737284898757935,
-0.070818677544593... | |
data.
Well, int64 uses 8 byte of memory storage, while int uses 4 byte... however, you pointed out most of the disadvantages already. Of course calculations performed will also be slower on many systems (a 64 bit system running in 64 bit mode can perform operations on 64 bit as fast as on 32 bit, but a 32 bit system ne... | [
-0.06684991717338562,
-0.0958859995007515,
0.23842330276966095,
0.5939974784851074,
0.07345148921012878,
0.12745977938175201,
0.1411028355360031,
-0.2621455192565918,
-0.37656116485595703,
-0.4965582489967346,
0.2661435008049011,
0.3579142093658447,
-0.0207680631428957,
-0.0447582118213176... | |
of these numbers and perform tons of operations with them, I doubt you will see any performance difference, though, neither in CPU time nor in memory. | [
0.33520999550819397,
0.3481549918651581,
-0.0602332204580307,
0.30789652466773987,
0.1240084245800972,
0.05493052303791046,
0.00905644241720438,
0.22199344635009766,
-0.6017788648605347,
-0.7030126452445984,
0.14343656599521637,
0.5178992748260498,
0.11072482913732529,
0.13022109866142273,... | |
I have a problem, and was hoping I could rely on some of the experience here for advice and a push in the right direction. I have an MS Access file made by propietary software. I only want to take half the columns from this table, and import into new(not yet setup)mysql database.
I have no idea how to do this or what ... | [
0.39922016859054565,
0.18968883156776428,
0.4734313189983368,
0.3696383833885193,
0.25765204429626465,
0.06835180521011353,
-0.03327105566859245,
0.24040573835372925,
-0.43638160824775696,
-0.5745521783828735,
-0.07611577957868576,
0.2848397195339203,
-0.2973001301288605,
0.280951321125030... | |
and import into the database as a BLOB type automatically.
Is there a way to do this automatically? This will be on a windows machine, so perhaps it could be scripted with WSH?
This is a bash script ***linux*** example using [mdbtools](http://mdbtools.sourceforge.net/) for automatic extraction and import from a mdb fi... | [
-0.10368026793003082,
-0.02864052541553974,
0.4462439715862274,
-0.3249354064464569,
-0.11672597378492355,
0.2404026985168457,
0.057296860963106155,
-0.3558088541030884,
-0.4275382459163666,
-0.5808683037757874,
-0.20803986489772797,
0.6226412653923035,
-0.3831082582473755,
-0.144168749451... | |
others mysqlimport options:
--delete: to delete previous Data from the target mysql table.
--ignore: ignore duplicates
--replace: replace if a duplicate is found
It's not a windows solution but i Hope it helps. | [
0.1254296451807022,
-0.00906775239855051,
0.2160802185535431,
0.4017203152179718,
0.21203897893428802,
-0.12216006219387054,
0.5354926586151123,
0.18489129841327667,
-0.32909849286079407,
-0.6596680283546448,
0.09734303504228592,
0.619330108165741,
-0.22092141211032867,
0.09776041656732559... | |
In the middle of some refactoring and I've moved a resources file from one project to another. I think I clicked a warning telling me to Strongly type the resource file at one point and now I'm getting:
> Could not find any resources
> appropriate for the specified culture
> or the neutral culture. Make sure
> "MyP... | [
0.3613411486148834,
0.37305235862731934,
-0.0036754931788891554,
0.03569652512669563,
0.18514281511306763,
-0.1787165254354477,
0.33364829421043396,
0.09139558672904968,
-0.49782511591911316,
-0.5892274975776672,
-0.14178892970085144,
0.22302748262882233,
-0.10728977620601654,
0.3949439227... | |
<http://jameswho.blogspot.com/2004/06/missingmanifestresourceexception.html>
* <http://support.microsoft.com/kb/318603>
But none of them seem relevant to my situation.
Any ideas? This has been bugging me for a few days now.
Am I doing something stupid?
Are you sure these resource files are embedded into the assembly... | [
0.42008960247039795,
0.20943138003349304,
-0.21081535518169403,
0.06624791026115417,
0.35056522488594055,
0.07317256182432175,
0.3612383008003235,
0.120718814432621,
-0.6411897540092468,
-0.46543440222740173,
0.1059718206524849,
0.33941665291786194,
0.006366698537021875,
0.3840117752552032... | |
What does Java do with long variables while performing addition?
Wrong version 1:
```
Vector speeds = ... //whatever, speeds.size() returns 2
long estimated = 1l;
long time = speeds.size() + estimated; // time = 21; string concatenation??
```
Wrong version 2:
```
Vector speeds = ... //whatever, speeds.size() retur... | [
-0.2591126561164856,
-0.1943269520998001,
0.32780539989471436,
-0.04805160313844681,
0.050049278885126114,
0.10625388473272324,
0.15300847589969635,
-0.12238671630620956,
-0.26897937059402466,
-0.5777555108070374,
-0.11207924783229828,
0.6425338387489319,
-0.2807132601737976,
-0.0090133976... | |
seeing what you think you're seeing. Java doesn't do this.
Please try to provide a [short but complete program](http://pobox.com/~skeet/csharp/complete.html) which demonstrates this. Here's a short but complete program which demonstrates correct behaviour, but with your "wrong" code (i.e. a counterexample).
```
impor... | [
0.38191840052604675,
-0.27913859486579895,
0.38009336590766907,
0.06739378720521927,
-0.19765755534172058,
0.1412995457649231,
0.41613367199897766,
-0.05886932462453842,
-0.2553589642047882,
-0.7979876399040222,
0.07849278301000595,
0.34600889682769775,
-0.6234185099601746,
0.2113091647624... | |
long time = speeds.size() + estimated;
System.out.println(time); // Prints out 3
}
}
``` | [
0.23976264894008636,
-0.14512886106967926,
0.41050511598587036,
-0.20584231615066528,
0.572821319103241,
0.07343096286058426,
0.1119055300951004,
-0.36949941515922546,
-0.3715212643146515,
-0.5708621740341187,
-0.22382789850234985,
0.7463833093643188,
-0.17817552387714386,
0.40966144204139... | |
Emacs does not recognize my correct Python path. I think it is a general problem with Emacs not recognizing my environment variables. I have GNU Emacs 22.1.1 (i386-apple-darwin8.9.1, Carbon Version 1.6.0) of 2007-06-17 installed.
I have set `PYTHONPATH` in my `~/.bashrc`. Maybe I should set it somewhere else?
`.bashrc... | [
-0.02840285748243332,
0.3857775628566742,
0.49248969554901123,
-0.11582544445991516,
0.11989308893680573,
-0.16446082293987274,
0.4411192238330841,
-0.1319233775138855,
-0.16767118871212006,
-0.6181576251983643,
-0.013962863013148308,
0.904633104801178,
-0.5838742852210999,
-0.308107167482... | |
Procrastiblog](http://procrastiblog.com/2007/07/09/changing-your-path-in-emacs-compilation-mode/)) | [
0.04553057253360748,
-0.18818871676921844,
0.3604685366153717,
-0.04508838802576065,
0.20773589611053467,
-0.08966761082410812,
0.41244539618492126,
-0.16612011194229126,
-0.5473533272743225,
-0.3466949462890625,
-0.2539237141609192,
0.6754863262176514,
-0.5361509323120117,
-0.241677805781... | |
Any links/Turorials avalable? I want to write a simple ISAPI plugin for IIS6.0.
Prefered language c++
Below is a quick (and simple) ISAPI Filter example. I found it very useful when trying to write my first ISAPI plugin.
<http://blogs.msdn.com/rakkimk/archive/2007/03/01/writing-a-simple-isapi-filter.aspx>
Best of luc... | [
0.1291564255952835,
-0.1421833336353302,
0.302604615688324,
0.0101648373529315,
-0.2696720361709595,
-0.1218663677573204,
0.4524769186973572,
0.10132502764463425,
-0.34217917919158936,
-0.5749780535697937,
-0.04797399789094925,
0.45959970355033875,
-0.36224696040153503,
-0.3004104495048523... | |
I'm trying to integrate against a SOAP web service, running on Apache Axis. The WSDL specifies a namespace with a URI, that looks like:
```
<xsd:schema
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:stns="java:dk.tdc.serviceproviderweb.datatypes"
elementFormDefault="qualified"
attributeFormDefault="qualifi... | [
0.36935460567474365,
0.11400717496871948,
0.22136996686458588,
-0.12018685042858124,
-0.2507801651954651,
0.020177675411105156,
0.3702300190925598,
-0.07451086491346359,
-0.09104356169700623,
-0.7929170727729797,
0.06805150955915451,
0.2923315763473511,
-0.23492282629013062,
0.200205847620... | |
or PHP on the client side,
as long as the rest of this schema is valid. | [
0.195313960313797,
-0.05494042485952377,
0.21245889365673065,
0.14981773495674133,
-0.17287512123584747,
-0.06716924160718918,
0.03493429347872734,
0.08776069432497025,
-0.2909925580024719,
0.013307458721101284,
-0.39267608523368835,
0.6724632382392883,
0.0023112469352781773,
-0.4484245777... | |
Core Animation allows for custom animations by implementing the actionForKey method in your CALayer based class:
```
- (id<CAAction>)actionForKey:(NSString *)key {
// Custom animations
return [super actionForKey:key];
}
```
I can then create an animation and return it for the `onOrderIn` action (i.e. when th... | [
0.21132339537143707,
-0.04893078655004501,
0.4260784089565277,
0.04003268852829933,
0.1642349362373352,
0.42059066891670227,
-0.049761414527893066,
-0.15589535236358643,
-0.17253558337688446,
-0.8338140249252319,
-0.0840895026922226,
0.4453257620334625,
-0.18365462124347687,
0.016235431656... | |
if ([key isEqualToString:@"onOrderIn"] || [key isEqualToString:@"onOrderOut"]) {
CABasicAnimation *a = [CABasicAnimation animationWithKeyPath:@"transform.scale"];
a.duration = 0.25;
a.removedOnCompletion = NO;
a.fillMode = kCAFillModeBoth;
if ([key isEqualToString:@"onOrderIn"])... | [
-0.11019080132246017,
-0.49935561418533325,
0.6339625120162964,
-0.34612131118774414,
0.04393073171377182,
0.28339821100234985,
0.4186532199382782,
-0.3766672909259796,
-0.05372079461812973,
-0.32511332631111145,
-0.4320549964904785,
0.6257269382476807,
0.0755121111869812,
0.23674272000789... | |
a.fromValue = [NSNumber numberWithFloat:1.0];
a.toValue = [NSNumber numberWithFloat:0.0];
}
return a;
}
return [super actionForKey:key];
}
```
Zooming in works, zooming out does not. Instead the default fade out animation is used.
The code might contain some typos, as I'm typin... | [
0.22427168488502502,
-0.09713562577962875,
0.23462757468223572,
-0.04312663897871971,
0.15374606847763062,
0.13344036042690277,
0.42691752314567566,
-0.14560773968696594,
-0.18036583065986633,
-0.49669212102890015,
-0.2602200210094452,
0.6868763566017151,
-0.3720887005329132,
-0.1666169017... | |
for the
> onOrderOut key—by the time the
> animation should be running, the layer
> is no longer in the tree, so it has no
> effect. So onOrderOut is not useful
> for triggering animations; it may be
> useful for running other code when
> layers are removed from the tree.
>
>
> The best solution I've found for this
>... | [
0.17490319907665253,
-0.08336137235164642,
0.39475464820861816,
-0.18853701651096344,
-0.06929102540016174,
0.0697774812579155,
0.15943337976932526,
-0.2127288579940796,
-0.06703599542379379,
-0.9467899799346924,
-0.16754502058029175,
0.3368466794490814,
-0.333080917596817,
0.1356209069490... | |
a single group of animations
> with the delegate property set, and
> fillMode=forwards,
> removedOnCompletion=NO so that you can
> remove the layer at the end of the
> animation with no possibility of the
> layer still being visible in its
> normal state.
If you do many case of this, it is easy to write a common super... | [
0.0011211112141609192,
-0.20133596658706665,
0.06938588619232178,
0.3304669260978699,
-0.044694606214761734,
0.04249459505081177,
0.18783289194107056,
-0.3914225101470947,
-0.26996952295303345,
-0.7868130207061768,
-0.3250219225883484,
0.20288465917110443,
-0.32066580653190613,
0.126920849... | |
My SQL is rusty -- I have a simple requirement to calculate the sum of the greater of two column values:
```
CREATE TABLE [dbo].[Test]
(
column1 int NOT NULL,
column2 int NOT NULL
);
insert into Test (column1, column2) values (2,3)
insert into Test (column1, column2) values (6,3)
insert into Test (column1, c... | [
-0.13221877813339233,
0.2700909376144409,
0.13040128350257874,
-0.10820825397968292,
-0.19234870374202728,
-0.05506834387779236,
0.30015066266059875,
-0.26443004608154297,
0.219906285405159,
-0.3171442151069641,
0.4157182574272156,
0.6161453127861023,
-0.11461739987134933,
0.03985517099499... | |
from (select column1 as c
union all
select column2) as cs) Greatest | [
-0.4487001299858093,
-0.12687402963638306,
0.38189631700515747,
-0.1804930567741394,
0.06383200734853745,
0.08045165985822678,
0.06363441050052643,
-0.5042436122894287,
-0.3116350471973419,
-0.537998616695404,
-0.3978499472141266,
-0.011017689481377602,
0.07480032742023468,
0.4212481975555... | |
from test
```
And I was hoping that I could simply sum them thus:
```
select sum((select max(c)
from (select column1 as c
union all
select column2) as cs))
from test
```
But no dice:
```
Msg 130, Level 15, State 1, Line 7
Cannot perform an aggregate func... | [
-0.05622434616088867,
0.23562955856323242,
-0.11472472548484802,
0.04124131053686142,
0.015654509887099266,
0.3486987352371216,
0.18883652985095978,
-0.5791084170341492,
-0.1293860375881195,
-0.19539235532283783,
-0.02938583493232727,
0.3487951457500458,
-0.3247458338737488,
-0.17456223070... | |
an aggregate or a subquery.
```
Is this possible in T-SQL without resorting to a procedure/temp table?
UPDATE: Eran, thanks - I used this approach. My final expression is a little more complicated, however, and I'm wondering about performance in this case:
```
SUM(CASE WHEN ABS(column1 * column2) > ABS(column3 * co... | [
0.1429748237133026,
-0.020577073097229004,
0.2703149616718292,
-0.14958730340003967,
-0.28000617027282715,
0.1835154891014099,
0.15981751680374146,
-0.3959603011608124,
-0.03210506960749626,
-0.5918933749198914,
0.1297551691532135,
0.5570963025093079,
-0.281422883272171,
-0.212632894515991... | |
THEN column1
ELSE column2 END)
FROM test
``` | [
0.005699051544070244,
0.47279855608940125,
0.33353468775749207,
-0.2967260181903839,
0.07056012749671936,
-0.28127580881118774,
0.5313363671302795,
-0.31021085381507874,
-0.0700170025229454,
-0.19809062778949738,
-0.4551033079624176,
0.376615434885025,
-0.28655558824539185,
0.2271060198545... | |
I'm launching a Weblogic application inside Eclipse via the BEA Weblogic Server v9.2 runtime environment. If this were running straight from the command-line, I'd do a ctrl-BREAK to force a thread dump. Is there a way to do it in Eclipse?
Indeed (thanks VonC to point to the SO thread), Dustin, in a comment to his messa... | [
0.6652571558952332,
-0.0734424740076065,
0.4201148748397827,
-0.08329389989376068,
0.053771812468767166,
-0.2383071631193161,
0.211416557431221,
0.07321906834840775,
-0.20370548963546753,
-0.5574730038642883,
0.20924778282642365,
0.2869455814361572,
-0.11021401733160019,
0.0309253148734569... | |
prompt `jstack 7088`, I have the wanted stack dump per thread.
Cool.
Would be better if we could do that directly from Eclipse, but that's already useful as is. | [
0.2384447306394577,
-0.23024693131446838,
0.18492355942726135,
0.13766150176525116,
0.07813983410596848,
-0.2182367593050003,
0.1927192658185959,
0.7455359697341919,
-0.07019630819559097,
-0.5384612083435059,
0.0340181365609169,
0.5081895589828491,
-0.2978658974170685,
-0.09864077717065811... | |
Does everyone just use XML in the message? Are there any good alternatives to XML? If you do use XML, do you define an XML Schema so clients know how to send messages to your service?
We use XML, but I think the important thing is to tailor the solution to the problem. The reason we use XML is that we are basically sen... | [
0.6368972659111023,
0.08042102307081223,
0.21706506609916687,
0.26101335883140564,
-0.31023359298706055,
-0.22001655399799347,
0.20944567024707794,
0.3948686718940735,
-0.41945087909698486,
-0.5719365477561951,
-0.09154481440782547,
0.39937397837638855,
-0.2988770604133606,
-0.027215331792... | |
our XML messages, but we do have a formal document describing their composition so that other teams can use our feeds without bugging us. | [
0.7640331387519836,
-0.1535348892211914,
0.14728879928588867,
0.3781176209449768,
0.0635438859462738,
-0.41116979718208313,
0.1424994170665741,
0.3891294598579407,
-0.034899886697530746,
-0.3693772256374359,
-0.2633078098297119,
0.08370223641395569,
-0.11195030808448792,
-0.475763946771621... | |
State should include at least the following:
* All settings set via
SetStreamResource()
* Indices
I have a class whose Draw() function will call SetStreamResource, set Indices and eventually call DrawIndexedPrimitive(). I would like to restore the device state before Draw() returns.
I am looking for something along ... | [
0.3256114423274994,
0.047672878950834274,
0.6954728364944458,
-0.14441779255867004,
-0.10781492292881012,
0.008402842096984386,
0.16356799006462097,
-0.05446474626660347,
0.09262926131486893,
-1.0110541582107544,
-0.07918702811002731,
0.5799710750579834,
-0.10336992889642715,
0.28240910172... | |
I was just reading this [thread](https://stackoverflow.com/questions/243082/c-casting-programmatically-can-it-be-done) and it occurred to me that there is one seemingly-valid use of that pattern the OP is asking about. I know I've used it before to implement dynamic creation of objects. As far as I know, there is no be... | [
0.7403409481048584,
0.04219372943043709,
0.02783951908349991,
-0.07947361469268799,
-0.0763775110244751,
-0.026273213326931,
-0.08381741493940353,
-0.0988471508026123,
-0.5324196815490723,
-0.24003827571868896,
0.3701382577419281,
0.1732948124408722,
-0.3802991807460785,
0.1071755215525627... | |
once it is created.
There's another related situation when you're using a message-passing scheme (usually over TCP/IP) where each message is an object. I like to implement that pattern as letting each message serialize itself into some serialization stream interface, which works well and is fairly clean on the sending... | [
0.5250487327575684,
0.0929463803768158,
0.09594903886318207,
0.019680634140968323,
-0.040677838027477264,
-0.29624512791633606,
0.050370655953884125,
0.10107067227363586,
-0.22702038288116455,
-1.0108168125152588,
-0.06666715443134308,
0.054452840238809586,
-0.23448717594146729,
0.65516090... | |
at the same time as part of the constructor, which seems more RAII, but that's small consolation for the mess of if/else statements figuring out the type.
Any better solutions out there? If you're going to suggest a 3rd party library, it should be free (and ideally open source) and I'd appreciate it if you could expla... | [
0.646192193031311,
0.17554190754890442,
-0.22702400386333466,
0.32161837816238403,
-0.11862479150295258,
-0.19174157083034515,
0.300665020942688,
0.04262309893965721,
-0.242107555270195,
-0.5967737436294556,
-0.040036048740148544,
0.6784344911575317,
-0.06490069627761841,
-0.05673075839877... | |
I make a class that has a map of key to factory functions, and a registration function that takes a key and factory function and adds it to the map. There is also a create function that takes a key, looks it up in the map, calls the factory function, and returns the created object. As an example, take a int key, and a ... | [
0.5667239427566528,
-0.04533935710787773,
-0.12589602172374725,
-0.189629927277565,
0.13844752311706543,
0.1681697964668274,
0.04413852468132973,
-0.2840099632740021,
-0.11515936255455017,
-0.5912070870399475,
0.11582814902067184,
0.48347654938697815,
-0.4157527983188629,
0.368211925029754... | |
Object*(*Func)(istream& is);
static void register(int key, Func f) {m[key] = f;}
Object* create(key, istream& is) {return m[key](is);}
private:
std::map<key, func> m;
}
```
Then in each class derived from subobject, the register() method is called with the appropriate key and factory method.
To crea... | [
-0.19664499163627625,
-0.24510781466960907,
0.24801628291606903,
-0.11742077767848969,
0.09479363262653351,
0.24220967292785645,
0.07719449698925018,
-0.17790336906909943,
-0.2122594714164734,
-0.649868905544281,
-0.5092843770980835,
0.36138564348220825,
-0.5924879312515259,
0.113317646086... | |
I have written a CGI script that creates an image dynamically using GET data. To include this image in my webpage, I am using the following code:
```
<img src="image.py?text=xxxxxxxxxxxxxx">
```
The problem is that I expect in the future the "text" field will get very long and the URL will become too large. From Goo... | [
0.6194530725479126,
0.26719048619270325,
0.3679583668708801,
-0.02173212170600891,
-0.202979177236557,
-0.06572538614273071,
0.29100170731544495,
0.10475577414035797,
-0.4564414322376251,
-0.4908393323421478,
-0.23231534659862518,
0.3205973505973816,
-0.03088144212961197,
0.058849286288022... | |
text somewhere (e.g. a database) and then pass through the primary key. | [
0.20262902975082397,
0.31951308250427246,
0.2683441638946533,
0.056294091045856476,
0.2744208574295044,
-0.27940455079078674,
0.2707148790359497,
0.30177032947540283,
0.25345373153686523,
-0.5968925356864929,
-0.7168320417404175,
0.3502025008201599,
0.008586153388023376,
0.0835091993212699... | |
I'm pretty new to the Spring Framework, I've been playing around with it and putting a few samples apps together for the purposes of evaluating Spring MVC for use in an upcoming company project. So far I really like what I see in Spring MVC, seems very easy to use and encourages you to write classes that are very unit ... | [
0.3936973512172699,
0.11650384217500687,
0.2654595971107483,
-0.04302370548248291,
-0.07199571281671524,
-0.15284807980060577,
0.17073556780815125,
0.15896935760974884,
-0.0674089714884758,
-0.6175335049629211,
0.2391756772994995,
0.48138028383255005,
-0.16504822671413422,
0.00618728064000... | |
extends `BeanFactory`, but if I'm just writing a simple main method, do I need the extra functionality that `ApplicationContext` provides? And just exactly what kind of extra functionality does `ApplicationContext` provide?
In addition to answering "which should I use in a main() method", are there any standards or gu... | [
0.043428078293800354,
0.13498049974441528,
0.35102078318595886,
-0.026066673919558525,
0.18889109790325165,
-0.23798704147338867,
0.16022352874279022,
-0.12233338505029678,
-0.10515903681516647,
-0.4970039129257202,
-0.11175945401191711,
0.44741424918174744,
-0.593273937702179,
-0.14577326... | |
- if any of my classes needed to be aware of Spring, are they more likely to need `ApplicationContext`?
Thanks for any help. I know a lot of these questions are probably answered in the reference manual, but I'm having a hard time finding a clear breakdown of these two interfaces and the pros/cons of each without read... | [
0.15156540274620056,
0.2063039094209671,
0.2449488788843155,
-0.10536156594753265,
-0.20124125480651855,
-0.022880692034959793,
0.1833295375108719,
0.15816503763198853,
-0.33432766795158386,
-0.7781537771224976,
-0.10397835075855255,
0.3615410327911377,
-0.3515351414680481,
-0.007567664608... | |
i18n)
* ApplicationEvent publication
So if you need any of the points presented on the Application Context side, you should use ApplicationContext. | [
0.07795743644237518,
0.06615443527698517,
0.4995431900024414,
0.13455304503440857,
-0.177886962890625,
-0.45455336570739746,
0.1899964064359665,
0.011063422076404095,
-0.020230552181601524,
-0.6146326065063477,
-0.3254360556602478,
0.4373391270637512,
-0.18497198820114136,
0.11239016056060... | |
I need to set the fetch mode on my hibernate mappings to be eager in some cases, and lazy in others. I have my default (set through the hbm file) as lazy="true". How do I override this setting in code? MyClass has a set defined of type MyClass2 for which I want to set the FetchMode to EAGER.
Currently, I have somethin... | [
0.16857032477855682,
-0.318615198135376,
0.8921950459480286,
-0.14630286395549774,
0.11461049318313599,
-0.0373401902616024,
0.20860902965068817,
-0.29840224981307983,
-0.1562833935022354,
-0.8832327723503113,
-0.10642882436513901,
0.9694632887840271,
-0.02019510790705681,
-0.1709043830633... | |
though. | [
0.15222668647766113,
0.18374358117580414,
0.16491205990314484,
0.15662463009357452,
0.1170257031917572,
-0.116843082010746,
0.013766837306320667,
0.07925733923912048,
0.018293000757694244,
-0.1869489848613739,
0.09705705940723419,
0.1628899872303009,
0.028368176892399788,
0.045601882040500... | |
How can I find out which row in a JTable the user just clicked?
Try this:
`aJTable.rowAtPoint(evt.getPoint());` | [
0.11530507355928421,
0.16478823125362396,
0.6001033782958984,
-0.122405506670475,
-0.009836601093411446,
-0.0644722580909729,
0.12118048220872879,
-0.010933942161500454,
0.07207201421260834,
-0.4337010085582733,
-0.034847963601350784,
0.4853670299053192,
-0.3077124059200287,
0.164981171488... | |
The database type is PostGres 8.3.
If I wrote:
```
SELECT field1, field2, field3, count(*)
FROM table1
GROUP BY field1, field2, field3 having count(*) > 1;
```
I have some rows that have a count over 1. How can I take out the duplicate (I do still want 1 row for each of them instead of +1 row... I do not want to ... | [
-0.17297889292240143,
0.3429746627807617,
0.2996530830860138,
0.047173868864774704,
0.029332973062992096,
-0.04290120303630829,
0.17969746887683868,
0.0250881128013134,
-0.1491186022758484,
-0.3488571345806122,
0.09542926400899887,
0.08767976611852646,
-0.3801805078983307,
0.40662190318107... | |
is the 3 fields.
This is one of many reasons that all tables should have a primary key (not necessarily an ID number or IDENTITY, but a combination of one or more columns that uniquely identifies a row and which has its uniqueness enforced in the database).
Your best bet is something like this:
```
SELECT field1, fie... | [
-0.3062519431114197,
0.0032268101349473,
0.5661168694496155,
-0.32215994596481323,
0.05349796637892723,
-0.005670947954058647,
-0.09227044135332108,
-0.6069656610488892,
-0.3455674350261688,
-0.47488701343536377,
-0.12989260256290436,
0.42228013277053833,
-0.5225379467010498,
-0.2822324931... | |
SQ.field1 = T1.field1 AND
SQ.field2 = T1.field2 AND
SQ.field3 = T1.field3
INSERT INTO table1 (field1, field2, field3)
SELECT field1, field2, field3
FROM temp_table1
DROP TABLE temp_table1
``` | [
-0.22602206468582153,
0.0037110596895217896,
0.45385634899139404,
-0.1855212152004242,
0.2983868420124054,
0.303456574678421,
-0.286710262298584,
-0.43089479207992554,
-0.11977700144052505,
-0.360672265291214,
-0.42592886090278625,
0.3405333459377289,
-0.17115932703018188,
-0.5557345151901... | |
I need to copy an entire database from a SQL Server 2005 on my server over to my local SQL Express in order to run my application for a presentation. What is the fastest/easiest way to get this done?
EDIT: I have very limited access to my server so I don't think I can access the backup file that I could create so that... | [
0.3566977381706238,
0.19812677800655365,
0.1952306628227234,
0.12503497302532196,
-0.20138245820999146,
-0.22790847718715668,
0.32562682032585144,
0.18780572712421417,
-0.16755454242229462,
-0.6906633377075195,
0.2865563929080963,
0.4521549940109253,
-0.16714733839035034,
0.212112680077552... | |
stuff, but all data as well).
You can install the tool on your machine, connect to a remote server and let the tool create the script directly on your machine.
You can download the Database Publishing Wizard [here](http://www.microsoft.com/downloads/details.aspx?familyid=56E5B1C5-BF17-42E0-A410-371A838E570A&displayla... | [
0.33404844999313354,
0.03917225822806358,
0.49691104888916016,
0.33699068427085876,
0.16902196407318115,
-0.7868490815162659,
0.2753596603870392,
0.16083906590938568,
-0.21845196187496185,
-0.6323055624961853,
-0.05068530887365341,
0.5627276301383972,
-0.037826914340257645,
0.2476093024015... | |
I have currently more than 100 connections in Sleep state.
Some connection must stay in Sleep state (and don't close) because it's permanent connection but some others (with a different user name) are from some php script and I want them to timeout very fast.
Is it possible to setup a wait\_timeout per user? and if y... | [
0.4919496476650238,
0.04520471766591072,
0.46024230122566223,
-0.05135023221373558,
0.22911308705806732,
0.1272706836462021,
0.38294029235839844,
-0.10418570786714554,
-0.46071717143058777,
-0.6619851589202881,
0.06218348443508148,
0.4172898828983307,
0.0019860679749399424,
0.4308686554431... | |
the following experiment in the mysql command-line client:
```
mysql> SHOW VARIABLES LIKE 'wait_timeout';
```
...shows 28800 (i.e. 8 hours), which is the default `wait_timout`.
```
mysql> SET SESSION wait_timeout = 60;
mysql> SHOW VARIABLES LIKE 'wait_timeout';
```
...shows 60.
Then you can quit the session, rec... | [
0.2237168550491333,
-0.40016430616378784,
0.4253239929676056,
-0.13973748683929443,
0.12472601234912872,
0.07632553577423096,
0.36257997155189514,
-0.16492781043052673,
-0.5391061305999756,
-0.45450255274772644,
-0.16745688021183014,
0.7995389699935913,
-0.30948930978775024,
-0.05386854335... | |
I've got an `RSA` private key in `PEM` format, is there a straight forward way to read that from .NET and instantiate an `RSACryptoServiceProvider` to decrypt data encrypted with the corresponding public key?
### Update 03/03/2021
.NET 5 now supports this out of the box.
To try the code snippet below, generate a keyp... | [
0.3052498698234558,
0.2021254599094391,
0.678767740726471,
-0.012721197679638863,
0.46032676100730896,
0.0166142750531435,
0.2929058372974396,
-0.27452465891838074,
-0.07203991711139679,
-0.47419872879981995,
-0.27291160821914673,
0.23791766166687012,
-0.051394928246736526,
0.4061038196086... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.