text stringlengths 0 30.5k | title stringclasses 1
value | embeddings listlengths 768 768 |
|---|---|---|
{
Console.WriteLine( "Row {0} has {1} values.", reader.RowIndex, values.Length );
}
}
Console.ReadLine();
}
}
```
Here are the classes. Note that you can use the `Csv.Escape` function to write valid CSV as well.
```cs
using System.IO;
using System.Text.RegularExpressio... | [
-0.2711644172668457,
0.11498218029737473,
0.642460286617279,
0.11835794895887375,
0.26813843846321106,
-0.01920362003147602,
0.24434462189674377,
-0.27259284257888794,
-0.2523272931575775,
-0.7656288743019104,
-0.4147995412349701,
0.39859065413475037,
-0.25325849652290344,
0.24208565056324... | |
FileMode.Open, FileAccess.Read ) )
{
}
public CsvReader( Stream stream )
{
__reader = new StreamReader( stream );
}
public System.Collections.IEnumerable RowEnumerator
{
get {
if ( null == __reader )
throw new System.ApplicationException( "I can'... | [
0.08586031198501587,
-0.18275082111358643,
0.6270800828933716,
0.030720539391040802,
0.2606932818889618,
-0.051232412457466125,
0.4458218812942505,
-0.09872911870479584,
-0.11753476411104202,
-0.7844131588935852,
-0.36249369382858276,
0.6012933850288391,
-0.26904577016830444,
0.47093433141... | |
CSV input." );
__rowno = 0;
string sLine;
string sNextLine;
while ( null != ( sLine = __reader.ReadLine() ) )
{
while ( rexRunOnLine.IsMatch( sLine ) && null != ( | [
-0.24399353563785553,
-0.5010760426521301,
0.707757830619812,
-0.19356504082679749,
0.3706303834915161,
-0.14144903421401978,
0.3116874694824219,
-0.286271333694458,
-0.2975940704345703,
-0.4695208668708801,
-0.333490252494812,
0.20998094975948334,
-0.5387728214263916,
0.3107324540615082,
... | |
sNextLine = __reader.ReadLine() ) )
sLine += "\n" + sNextLine;
__rowno++;
string[] values = rexCsvSplitter.Split( sLine );
for ( int i = 0; i < values.Length; i++ ) | [
-0.058293867856264114,
-0.6113764047622681,
0.6559910178184509,
-0.34972822666168213,
0.2913702726364136,
0.2003670036792755,
0.4627857506275177,
-0.45468783378601074,
-0.2740427553653717,
-0.4845708906650543,
-0.2988954186439514,
0.331101655960083,
-0.4131363332271576,
0.22749364376068115... | |
values[i] = Csv.Unescape( values[i] );
yield return values;
}
__reader.Close();
}
}
public long RowIndex { get { return __rowno; } }
public void Dispose()
{ | [
-0.12547041475772858,
-0.05125746130943298,
0.5143223404884338,
-0.19654065370559692,
0.32647642493247986,
-0.041119545698165894,
0.10083876550197601,
-0.34081318974494934,
-0.0903194397687912,
-0.5126631259918213,
-0.33533617854118347,
0.6172131299972534,
-0.31427258253097534,
0.387805044... | |
if ( null != __reader ) __reader.Dispose();
}
//============================================
private long __rowno = 0;
private TextReader __reader;
private static Regex rexCsvSplitter = new Regex( @",(?=(?:[^""]*""[^""]*"")*(?![^""]*""))" );
private static Regex rexRunOnLine = new Regex( @"^[^... | [
-0.3700324594974518,
-0.3827618360519409,
0.8556846380233765,
-0.07157503068447113,
0.2607790231704712,
0.015874527394771576,
0.27525413036346436,
-0.32243314385414124,
-0.11981236189603806,
-0.2724500596523285,
-0.7273898124694824,
0.7360150814056396,
-0.5269261002540588,
0.35811516642570... | |
if ( s.IndexOfAny( CHARACTERS_THAT_MUST_BE_QUOTED ) > -1 )
s = QUOTE + s + QUOTE;
return s;
}
public static string Unescape( string s )
{
if ( s.StartsWith( QUOTE ) && s.EndsWith( QUOTE ) )
{
s = s.Substring( 1, | [
0.12372233718633652,
-0.37587299942970276,
0.8875239491462708,
-0.10577581077814102,
0.1468505710363388,
0.10913117974996567,
0.14990279078483582,
-0.3710569143295288,
-0.14113235473632812,
-0.5901985168457031,
-0.5221219658851624,
0.40409815311431885,
-0.25511637330055237,
0.2102212458848... | |
s.Length - 2 );
if ( s.Contains( ESCAPED_QUOTE ) )
s = s.Replace( ESCAPED_QUOTE, QUOTE );
}
return s;
}
private const string QUOTE = "\"";
private const string ESCAPED_QUOTE = "\"\"";
private static char[] CHARACTERS_THAT_MUST_BE_QUOTED = { ',', '"', '\n' }... | [
0.007391992025077343,
-0.13890618085861206,
0.567823052406311,
-0.3449462056159973,
0.20468036830425262,
0.24524696171283722,
0.37961459159851074,
-0.6457787752151489,
-0.10722974687814713,
-0.4829786717891693,
-0.518659770488739,
0.4727395176887512,
-0.4164789021015167,
0.2564507424831390... | |
I would like a Win32 process to launch an external script and be able to retrieve the ERRORLEVEL that it returns.
The other way around is quite easy. Just use **exit(errorcode)** or **return errorcode;** in your Win32 app and the calling script gets its ERRORLEVEL value set properly.
But, from a Win32 calling applic... | [
-0.0163048654794693,
0.1516129970550537,
0.13441379368305206,
-0.01844661310315132,
-0.17769837379455566,
-0.09217379987239838,
0.31593382358551025,
0.0664190873503685,
0.017253199592232704,
-0.7814701795578003,
-0.09385410696268082,
0.7555837035179138,
-0.08697712421417236,
-0.00364338443... | |
per-say. Most probably CMD.EXE is running instead and most likely always ending with a ExitCode of 0. I know that ERRORLEVEL is not the same as the process ExitCode value, I would have hoped that CMD.EXE would have mirrored it.
EDIT:
Sorry I asked! I just found **MY** problem. I was using **exit /b errorcode** instea... | [
0.21915259957313538,
0.37836235761642456,
0.6222130060195923,
-0.24668066203594208,
0.005091153085231781,
0.34759721159935,
0.47816088795661926,
0.2859439551830292,
-0.2639053463935852,
-0.31849244236946106,
0.1581217646598816,
0.44617584347724915,
-0.23162874579429626,
0.5634030103683472,... | |
am doing is:
```
int LaunchScript(TCHAR *pCmdLineParam)
{
bool bResult;
PROCESS_INFORMATION pi;
STARTUPINFO si;
memset(&si, 0, sizeof(si));
si.cb = sizeof(si);
TCHAR cmdLine[256];
_tcscpy(cmdLine,L"Test.cmd");
_tcscat(cmdLine,L" ");
_tcscat(cmdLine,pCmdLineParam);
_tprintf(... | [
0.05268070474267006,
0.22531701624393463,
0.6450837254524231,
-0.38518446683883667,
0.5198894739151001,
0.05747804418206215,
0.18981420993804932,
-0.6072055101394653,
0.008401802740991116,
-0.3933110237121582,
-0.37543001770973206,
0.5417032837867737,
-0.13669082522392273,
0.14207121729850... | |
}
DWORD result = WaitForSingleObject(pi.hProcess,15000);
if( result == WAIT_TIMEOUT ) {
return -2;
}
DWORD exitCode=0;
if( !GetExitCodeProcess(pi.hProcess,&exitCode) ) {
_tprintf(L"GetExitCodeProcess() error - %d", GetLastError());
return -1;
}
_tprintf(L"Process e... | [
-0.21957753598690033,
0.1056850403547287,
0.8005172610282898,
-0.32855308055877686,
0.3125644624233246,
0.43345290422439575,
0.2598143219947815,
-0.24239234626293182,
0.1885545402765274,
-0.5817402601242065,
-0.2724752128124237,
0.25334879755973816,
-0.22008298337459564,
0.3349315226078033... | |
entry point script. The other "sub-scripts" files can either call exit /b or exit, because everything is covered.
This works for me:
```
int DoDOS(string parms)
{
Process p=new Process();
ProcessStartInfo ProcInfo=new ProcessStartInfo();
ProcInfo.Arguments="/C "+parms;
ProcInfo.CreateNoWindow=true;
ProcInfo.ErrorDia... | [
-0.35812437534332275,
-0.08011780679225922,
0.7984288930892944,
-0.3194319009780884,
0.4277873635292053,
0.2120218575000763,
0.3976513743400574,
-0.31148761510849,
-0.016333220526576042,
-0.7220690846443176,
-0.48615437746047974,
0.35081687569618225,
-0.1211685985326767,
0.2021824568510055... | |
I am working on an application that requires me to produce a COBOL copybook to define a data file.
Does anyone have a good reference on how to write out a copybook?
A "copybook" is basically COBOL speak for an include file. You need to write a description of your data in COBOL format. Here's a [tutorial](http://www.c... | [
0.5798012018203735,
0.3584090769290924,
0.12085281312465668,
-0.036387067288160324,
-0.024750210344791412,
-0.651536226272583,
0.014275021851062775,
0.28397417068481445,
-0.11589975655078888,
-0.46556589007377625,
0.04934391379356384,
0.5501711368560791,
-0.21408124268054962,
-0.1001312881... | |
I'm sure there's a good reason, but could someone please explain why the `java.util.Set` interface lacks `get(int Index)`, or any similar `get()` method?
It seems that sets are great for putting things into, but I can't find an elegant way of retrieving a single item from it.
If I know I want the first item, I can us... | [
0.2782432436943054,
-0.022661879658699036,
0.02440425381064415,
0.17072990536689758,
-0.12535572052001953,
-0.16368083655834198,
0.19519871473312378,
-0.36977654695510864,
-0.25860360264778137,
-0.48228341341018677,
-0.030238980427384377,
0.4058801531791687,
-0.34334760904312134,
0.1458991... | |
means there's a good reason for not doing this -- could someone please enlighten me?
**EDIT:**
Some extremely great answers here, and a few saying "more context". The specific scenario was a dbUnit test, where I could reasonably assert that the returned set from a query had only 1 item, and I was trying to access that... | [
0.2812238931655884,
-0.22295737266540527,
-0.013872254639863968,
0.3314806818962097,
-0.4371640384197235,
-0.1329611837863922,
0.24830803275108337,
-0.3324752748012543,
-0.2499282956123352,
-0.5680176615715027,
-0.04005015641450882,
0.2029542177915573,
-0.37111321091651917,
-0.080653764307... | |
general property of sets.
If you're trying to use sets this way, you should consider using a list instead. | [
0.35548076033592224,
-0.06489226967096329,
-0.33412066102027893,
0.06394631415605545,
-0.4008984863758087,
-0.383422315120697,
0.13928240537643433,
0.0513351708650589,
-0.2799699306488037,
-0.7426401376724243,
-0.3717467784881592,
0.22621901333332062,
-0.3503910005092621,
0.314629614353179... | |
I have a bit of a left join issue.. I have the following models
```
class CommandInfo(models.Model):
server = models.ForeignKey(Server)
count = models.IntegerField(default=1)
ts = models.DateTimeField(auto_now=True)
class Server(models.Model):
name = models.CharField(max_length=100)
group = models... | [
-0.3404434621334076,
0.12685813009738922,
0.9046995639801025,
-0.35566964745521545,
0.18119965493679047,
0.2567446827888489,
0.13880206644535065,
-0.2148532122373581,
-0.19402216374874115,
-0.6840003728866577,
0.015641184523701668,
0.4462255537509918,
-0.2527600824832916,
0.204978302121162... | |
to grab all the server instances and left join the CommandInfo to it if there is one.
Right now I'm doing it in raw sql
```
from django.db import connection
cursor = connection.cursor()
cursor.execute("SELECT host,ts,count as host FROM servers_server LEFT JOIN cmds_commandinfo ON server_id=servers_server.id")
server... | [
-0.20944595336914062,
0.0008292311686091125,
0.40980130434036255,
-0.10114473104476929,
-0.31124284863471985,
-0.2468983232975006,
-0.11077708005905151,
-0.17330758273601532,
-0.45116621255874634,
-0.7059751749038696,
-0.06783472746610641,
0.5044949650764465,
-0.29191505908966064,
0.342182... | |
I've got a table and I have a text field with a URL again, I don't want any rows with duplicate URL's but I'd rather not do a check before inserting, is there no way to make a text field unique or could you suggest another field type to use?
If your text field in the database is set to unique or a primary key or howeve... | [
0.4697169363498688,
0.43569159507751465,
0.02779313176870346,
0.22556465864181519,
0.07594536989927292,
0.02688104286789894,
-0.0775928646326065,
-0.12951253354549408,
-0.39130929112434387,
-0.5945874452590942,
0.4955011308193207,
0.3040836751461029,
-0.14945262670516968,
0.471763432025909... | |
have it.
As pointed out elsewhere, you can't have an actual TEXT field be unique, but if you are using a varchar field it is doable. This may not be important at all (may just be a miscommunication), because if you are storing URL's in a TEXT field, you have other problems to worry about as well. | [
0.4299650192260742,
0.10719933360815048,
0.06263307482004166,
0.14226582646369934,
-0.14153175055980682,
-0.5018736124038696,
0.1877221167087555,
-0.07021584361791611,
-0.13035352528095245,
-0.42388197779655457,
-0.1035529300570488,
0.36935046315193176,
-0.04550252854824066,
0.351565897464... | |
Using Zenity is possible to add buttons,change fonts ,anything besides default options?
If not,there's another dialog for sh that allows more customizing?
Zenity supports a few HTML-like tags for text markup: `<b>`, `<i>`, `<u>`, `<s>`, `<tt>`, `<big>`, `<small>`, and [more](http://www.gtk.org/api/2.6/pango/PangoMarkup... | [
0.19936338067054749,
-0.09287795424461365,
0.12407316267490387,
-0.0812879428267479,
-0.300743967294693,
-0.1370335817337036,
0.29985901713371277,
-0.2379983812570572,
0.06427324563264847,
-0.554760217666626,
0.04636769741773605,
0.5029910206794739,
-0.4636514484882355,
-0.3561805486679077... | |
Is it possible to add a column to a table at a specific ordinal position in Microsoft SQL Server?
For instance, our tables always have CreatedOn, CreatedBy, LastModifiedOn, LastModifiedBy columns at the "end" of each table definition? I'd like the new column to show up in SSMS above these columns.
If I am scripting ... | [
0.4564405083656311,
0.008543764241039753,
0.24015957117080688,
0.2554243803024292,
0.06050211191177368,
-0.22486068308353424,
-0.012525658123195171,
0.18772010505199432,
-0.4454503357410431,
-0.5861184000968933,
0.14384865760803223,
0.006876449100673199,
-0.24175110459327698,
0.33850669860... | |
here's a good one:
<http://www.developersdex.com/sql/message.asp?p=581&r=5014513>
You have to create a temp table that mirrors the original table's schema but with the column order that you want, then copy the contents of the original to temp. Delete the original and rename the temp.
This is what SQL Management Studi... | [
0.45180583000183105,
0.048840686678886414,
0.0326230488717556,
0.15016652643680573,
0.11394200474023819,
-0.21121729910373688,
0.03175082430243492,
0.07270550727844238,
-0.13071013987064362,
-0.625013530254364,
-0.05816029757261276,
0.5432831645011902,
-0.4805251359939575,
0.07776837795972... | |
In a game I'm making, I've got two points, pt1 and pt2, and I want to work out the angle between them. I've already worked out the distance, in an earlier calculation. The obvious way would be to arctan the horizontal distance over the vertical distance (tan(theta) = opp/adj).
I'm wondering though, as I've already cal... | [
0.15848802030086517,
-0.1558704972267151,
0.3871912360191345,
-0.2518540918827057,
-0.19048888981342316,
0.2977980077266693,
-0.21576248109340668,
-0.3634836971759796,
-0.22725413739681244,
-0.8464580178260803,
0.4049132466316223,
0.5235903859138489,
0.27918174862861633,
-0.303968638181686... | |
Is it possible to introduce dependent tasks in emacs org mode?
Suppose I have three tasks Development, Test, Deploy which should be done one after another. I scheduled the first one with SCHEDULED: and DEADLINE: and want that the second is scheduled automatically after the first one is finished (e.g. I can specify off... | [
0.2539225220680237,
-0.3554515540599823,
0.45980456471443176,
0.1573915183544159,
0.04130656272172928,
0.05403052642941475,
0.10510511696338654,
-0.2274690717458725,
-0.37395697832107544,
-0.5661277770996094,
0.20027458667755127,
0.7728642225265503,
-0.4680851399898529,
-0.2604027688503265... | |
the org-mode distribution. | [
-0.3943192958831787,
-0.37934616208076477,
0.19232231378555298,
0.07304662466049194,
0.05893922597169876,
-0.13181465864181519,
-0.14545422792434692,
-0.057142116129398346,
-0.15823660790920258,
-0.5419206023216248,
-0.36819401383399963,
0.5227017998695374,
-0.5903720855712891,
0.145514979... | |
How do I create an "AND" filter to retrieve objects in Django? e.g I would like to retrieve a row which has a combination of two words in a single field.
For example the following SQL query does exactly that when I run it on mysql database:
```
select * from myapp_question
where ((question like '%software%') and (que... | [
0.05238756909966469,
0.2974213659763336,
0.31282317638397217,
-0.23957234621047974,
-0.5466399192810059,
-0.00472811795771122,
-0.07924807816743851,
-0.1806742399930954,
-0.06714767217636108,
-0.7403278350830078,
0.20417144894599915,
0.47078466415405273,
-0.35920822620391846,
-0.2438241541... | |
is to use the Q object method like David Berger shows here: [How do I use AND in a Django filter?](http://stackoverflow.com/a/770078/63097) | [
0.1955147534608841,
0.03469283506274223,
-0.1908976286649704,
-0.23997606337070465,
0.03743303567171097,
-0.39817100763320923,
0.11617123335599899,
-0.3527098298072815,
-0.05436394736170769,
-0.33827468752861023,
0.07016430795192719,
0.5190739631652832,
-0.3966231644153595,
-0.136171221733... | |
I have code that looks essentially like this:
```
std::map<int, int> map1, map2;
BOOST_FOREACH(int i, map1)
{
// do steps 1-5 here...
}
BOOST_FOREACH(int i, map2)
{
// do steps 1-5 (identical to above) here...
}
```
Is there any way to concatenate the maps to eliminate the duplicate code in the second loop? ... | [
0.0806751698255539,
0.3247314989566803,
0.31241747736930847,
-0.24179238080978394,
0.13897959887981415,
-0.10371118783950806,
0.12441244721412659,
-0.14592137932777405,
-0.34868550300598145,
-0.8961670994758606,
0.09982682764530182,
0.39149025082588196,
-0.31671181321144104,
0.099581427872... | |
rudimentary here.
You could define a function:
```
typedef std::map<int, int> IntMap;
void doStuffWithInt(IntMap::value_type &i)
{
// steps 1 to 5
}
BOOST_FOREACH(IntMap::value_type &i, map1)
doStuffWithInt(i);
BOOST_FOREACH(IntMap::value_type &i, map2)
doStuffWithInt(i);
```
Although in that case it might b... | [
-0.35309067368507385,
-0.0961986631155014,
0.7364221215248108,
-0.34890487790107727,
0.19457124173641205,
0.10258053988218307,
0.39648279547691345,
-0.4927268922328949,
-0.06545517593622208,
-0.5034094452857971,
-0.2984539270401001,
0.7768858075141907,
-0.22461019456386566,
-0.251198828220... | |
I am working on a module that takes a user-uploaded CSV file. Code looks like this:
```
function foo_form_submit($form_id, &$form_state) {
$validators = array();
$dest = 'sites/phoenix.dev/files';
$uploaded_file = file_save_upload('upload', $validators, $dest);
//some other stuff
}
```
As you can see, I don't ... | [
0.5158722400665283,
0.30769282579421997,
0.38487741351127625,
-0.20913070440292358,
-0.0635947585105896,
-0.23018868267536163,
0.23016491532325745,
-0.12937912344932556,
-0.28509166836738586,
-0.6061865091323853,
-0.08905280381441116,
0.27971208095550537,
-0.33647429943084717,
0.1569958925... | |
turn up anything too helpful.
[Drupal documentation on file\_validate\_extensions](http://api.drupal.org/api/function/file_validate_extensions/6) suggests you want to change this:
```
$validators = array();
```
To this:
```
$validators = array( 'file_validate_extensions' => array( 'csv' ) );
``` | [
0.37553808093070984,
0.17503808438777924,
0.7703177332878113,
0.042224932461977005,
0.3208167850971222,
-0.08942857384681702,
-0.059122346341609955,
-0.01665894314646721,
-0.4784669578075409,
-0.5521518588066101,
-0.2947607636451721,
0.38715824484825134,
-0.22565236687660217,
-0.0304361321... | |
I'm using a 3rd party DLL which uses OpenGL. Right now that 3rd party does not work correctly as the display does not refresh correctly. I came to suspect that the OpenGL library isn't correctly installed or may be outdated.
Is there a way to update the OpenGL library on windows? Is there like an official site which w... | [
0.6045179963111877,
0.24934473633766174,
0.2146483212709427,
0.20548993349075317,
-0.19988490641117096,
-0.23364606499671936,
0.1541481614112854,
0.3380174934864044,
-0.21059761941432953,
-0.7387098670005798,
0.2911587655544281,
0.7994440197944641,
-0.1763734072446823,
0.4846867620944977,
... | |
I am developing a website for a friend which was earlier developed by some other guy, basically, I am a PHP pro and don't ve much experience in HTML (or until now) ...
now, I am trying to validate my webpage, earlier it was showing 162 errors, I 've brought it down to 1 error (thank you) ... haha
earlier with 162 err... | [
0.2373293936252594,
0.3897852897644043,
0.16570524871349335,
-0.09337318688631058,
-0.4123999774456024,
-0.2905578017234802,
0.5358742475509644,
0.22418907284736633,
-0.2020132839679718,
-0.8399369716644287,
0.19715574383735657,
0.6481828689575195,
-0.36857128143310547,
0.06098980084061622... | |
ie7 as well but not rendering properly in ie's .... page layout is a bit garbled.
the only error which remains now is .... Attribute "height" exists, but can not be used for this element. .....
now when I take care of all these mistakes ... i.e removing height="100%" in tables .... even firefox refuses to show it pro... | [
0.15145817399024963,
0.2772403657436371,
0.6883264183998108,
-0.30162671208381653,
-0.1135006919503212,
-0.18918167054653168,
0.6009372472763062,
0.12917807698249817,
-0.052678536623716354,
-0.7180392146110535,
-0.08928424119949341,
0.7019400596618652,
-0.07279344648122787,
0.0733153894543... | |
talking about ...... I hope I am making sense ...
<http://www.shivgangaresorts.com/dev/aboutus.html>
please view this page in ff3 and ie6 or ie7 to see what I am saying .... any help would be greatly appreciated ....
thanks a million in advance
I believe the OpenGL libraries are just part of the drivers that ship wi... | [
0.6641276478767395,
0.3709299862384796,
0.24976278841495514,
0.06837290525436401,
-0.492794930934906,
-0.4345605671405792,
-0.009907939471304417,
0.44009676575660706,
-0.2583450376987457,
-0.707797646522522,
0.027029521763324738,
0.7125553488731384,
0.2213539034128189,
0.5963051915168762,
... | |
In Python, I'm trying to read the values on <http://utahcritseries.com/RawResults.aspx>. How can I read years other than the default of 2002?
So far, using mechanize, I've been able to reference the SELECT and list all of its available options/values but am unsure how to change its value and resubmit the form.
I'm su... | [
0.09069498628377914,
0.3609686493873596,
0.06952832639217377,
-0.3498991131782532,
-0.24630318582057953,
-0.1243925541639328,
0.34044376015663147,
-0.1871328055858612,
-0.37141382694244385,
-0.4616660475730896,
0.020731549710035324,
0.3115636706352234,
0.03504904359579086,
0.14252269268035... | |
I am running a J2EE web application in Tomcat, and recently I have been tasked with adding metrics to the application. I am using a SessionListener to detect when the session is destroyed, and then uploading the metrics to a database. My Session timeout is set in my web.xml to 30 minutes, and I am not invalidating the ... | [
0.30371206998825073,
0.2123037874698639,
0.24399599432945251,
0.1808471530675888,
-0.18618424236774445,
-0.34148865938186646,
0.7498177289962769,
-0.13739746809005737,
-0.14793121814727783,
-0.5972869396209717,
0.20937475562095642,
0.5396311283111572,
0.08533504605293274,
0.003069198923185... | |
in Tomcat to be destroyed? Exceptions? Will Tomcat ever randomly invalidate sessions?
Possibly your webbrowser has decided to not sent the session cookie on a request to the webapplication, where your application would have expected one.
I have seen this happen with an apache rewrite rule; an URL outside the session-co... | [
0.32830363512039185,
0.1513824611902237,
0.2902233600616455,
0.2744380235671997,
-0.09407331794500351,
-0.21908412873744965,
0.6206865310668945,
-0.13575543463230133,
-0.5789159536361694,
-0.2533053755760193,
-0.09619234502315521,
0.5649883151054382,
-0.48672956228256226,
0.229929670691490... | |
request for this image (path did not match)
* the server redirected the request (internally) to /app/createImage?magic
* the web application did not receive a session cookie, so it created a new session
You should be able to see if this causes your problem if you log the initial URL for new sessions. | [
0.22531528770923615,
-0.20693665742874146,
0.48485222458839417,
0.241586372256279,
-0.27654966711997986,
0.14040382206439972,
0.5332659482955933,
-0.08139670640230179,
-0.3456100821495056,
-0.6736308932304382,
-0.02404010482132435,
0.4089502692222595,
-0.4358420968055725,
0.099944457411766... | |
I am having problem with writing PDF files to browser. Other mime types work fine.
PDF files become corrupted.
```
FileInfo file = new FileInfo(Path.Combine(_module.FileDir, _file.FilePath));
Response.ClearContent();
Response.ClearHeaders();
Response.ContentType = _file.ContentType;
Response.AppendHeader("Content-Disp... | [
0.029454346746206284,
0.12679773569107056,
0.917892336845398,
-0.34015747904777527,
-0.15292005240917206,
0.19792719185352325,
0.6393232941627502,
-0.6370881795883179,
-0.16107037663459778,
-0.7388577461242676,
-0.5190507769584656,
0.484027624130249,
-0.4887600839138031,
0.0307632163166999... | |
I'm looking at the generated code by ASP.NET MVC 1.0, and was wondering; what do the double question marks mean?
```
// This constructor is not used by the MVC framework but is instead provided for ease
// of unit testing this type. See the comments at the end of this file for more
// information.
public AccountContro... | [
-0.09212686121463776,
0.09642275422811508,
0.6991466283798218,
-0.19800621271133423,
-0.15642228722572327,
-0.04098130017518997,
0.2176697850227356,
-0.09475132822990417,
-0.44108960032463074,
-0.474629282951355,
-0.07408840954303741,
0.34316903352737427,
-0.06004814803600311,
0.2300195395... | |
not null, else the value on the right (even if it is null). They are often chained together ending in a default value.
[Check out this article for more](http://weblogs.asp.net/scottgu/archive/2007/09/20/the-new-c-null-coalescing-operator-and-using-it-with-linq.aspx) | [
0.2573935389518738,
0.004034263081848621,
0.20170965790748596,
-0.12271416187286377,
-0.044995103031396866,
-0.4119631350040436,
0.02868935838341713,
0.03424549102783203,
-0.3619425892829895,
-0.0228083785623312,
-0.43269526958465576,
0.23253773152828217,
-0.3613048195838928,
-0.0360702574... | |
I want to start experimenting with all these different web frameworks that are available. I was wondering if they could all run in one machine at the same time?
I know that all my database services can all run at the same time, along with the Javascript frameworks, but what about something like Rails and Java applica... | [
0.5726546049118042,
0.11465608328580856,
-0.2271639108657837,
0.3476336896419525,
-0.061952896416187286,
-0.19640043377876282,
0.24589495360851288,
0.10056446492671967,
-0.370661199092865,
-0.6504140496253967,
0.2956598699092865,
0.6069303154945374,
-0.38169097900390625,
0.1889157444238662... | |
same or other languages. You can certainly run Rails and a Java framework on the same machine - you could even run Rails on JRuby and a Java application server
It sounds like you're just getting started programming. I would recommend learning some of the basics first. For instance, if you want to learn Ruby, try the [... | [
0.45004457235336304,
0.03714575245976448,
-0.1239720955491066,
0.09012190252542496,
0.09775540232658386,
0.12796975672245026,
0.16874122619628906,
0.15328334271907806,
-0.3138263523578644,
-0.5807925462722778,
0.2836069166660309,
0.6862629055976868,
-0.07493703067302704,
-0.173317328095436... | |
Is there a way to upload database contents to Google App Engine for Java, like the bulk uploader script in the Python version? If not, how would you get existing data into your GAE/J app?
You can use the Python uploaders to upload data for your Java app. First, create an app.yaml in an empty directory that contains the... | [
0.14436577260494232,
0.061671581119298935,
0.4637466073036194,
0.047877710312604904,
-0.1033264622092247,
0.32001444697380066,
-0.12064479291439056,
-0.1410861313343048,
-0.3710865378379822,
-0.7207441329956055,
-0.14691883325576782,
0.47802361845970154,
-0.42805013060569763,
-0.0316755622... | |
it at upload.latest.yourappid.appspot.com. Since multiple major versions can run simultaneously, and all versions of an app share the same datastore, you can use the Python bulk uploader while still running your app in Java. | [
0.15728305280208588,
-0.0485510379076004,
0.20003964006900787,
-0.09123663604259491,
-0.09313815087080002,
0.2409517616033554,
0.0839073434472084,
-0.026966774836182594,
-0.7464951872825623,
-0.604967474937439,
-0.3100970983505249,
0.4880351424217224,
-0.3655509352684021,
-0.17368586361408... | |
My question basically says it all. I am getting this:
```
C:\DOCUME~1\frew\MYDOCU~1\Code\AIRCRA~1\lib\ACD\VALIDA~1.PM
```
and I want this:
```
C:\Documents and Settings\frew\My Documents\Code\aircraft_ducting\lib\ACD\Validators.pm
```
I looked at File::Spec::Win32 but that didn't seem to have anything that would... | [
0.49150925874710083,
0.3318888247013092,
0.7299820184707642,
0.4243292510509491,
0.33385661244392395,
-0.021657992154359818,
-0.0864613801240921,
-0.05673396587371826,
-0.22035712003707886,
-0.39299601316452026,
0.07740617543458939,
0.2712334394454956,
-0.18102382123470306,
0.0248660612851... | |
I'm tempted to lie and say that English is my second language, but the truth is that I just have no idea what 'Coalescing' means. I know what `??` 'does' in C#, but the name doesn't make sense to me.
I looked up the word and I understand it to be a synonym for 'join'. 'Null Join Operator' still doesn't make sense.
Ca... | [
0.43174999952316284,
0.1191762313246727,
-0.20643337070941925,
-0.12493868917226791,
-0.31833890080451965,
-0.11414674669504166,
0.5278393030166626,
0.49567633867263794,
-0.11046622693538666,
-0.5789107084274292,
-0.05457916110754013,
0.16397207975387573,
-0.18562476336956024,
0.3981502056... | |
sense to me.
>
>
> I looked up the word and I understand it to be a synonym for 'join'.
I'd say a more accurate description of "coalesce" would be "to form one thing from different elements". The "coalescing" of the `??` operator happens because a single value is always resolved from one of the two values. The first... | [
-0.006188464350998402,
0.022758392617106438,
-0.06985245645046234,
-0.039456672966480255,
-0.0902181938290596,
0.007913953624665737,
0.17793285846710205,
-0.33416885137557983,
0.07190226018428802,
-0.397512823343277,
0.008228718303143978,
0.2347518354654312,
-0.22893472015857697,
0.5623506... | |
I need to create an application "dll, script or exe" which when the user upload on a folder on his server using his ftp, it will automatically run on the current folder and do some image manipulations in the folder images,
My Question is how to make something like this, which the user will not need to configure any... | [
0.497677743434906,
-0.017677176743745804,
0.4396570026874542,
0.15645816922187805,
-0.09952447563409805,
-0.22352220118045807,
0.028566205874085426,
0.17922884225845337,
-0.019359895959496498,
-0.8263469934463501,
-0.21309764683246613,
0.5651862621307373,
-0.22674180567264557,
0.2373556047... | |
the user have no way to configure his server OS, about the OS, lets start saying its just windows.
I know that "Not possible" may be the right answer, and also "its a virus" may be another answer, i just want to know if its possible or should i think in another new way.
Everything I have read in this question screams ... | [
0.6067531704902649,
0.2761538326740265,
0.04236695542931557,
0.31619104743003845,
0.045120418071746826,
-0.27249646186828613,
0.4530249834060669,
0.6649215817451477,
-0.2751496434211731,
-0.6830195188522339,
0.09046526998281479,
0.4887241721153259,
-0.27215638756752014,
0.2247043251991272,... | |
enabled, you could leverage that by uploading a CGI or PHP script in a place it can be run, and then calling it through a browser, thus doing whatever file manipulations you need... Things like safe mode, reserved or virtual directories could get in the way, but I think there is a better chance of that working. | [
0.3170592486858368,
-0.23985819518566132,
0.2724546492099762,
0.27229124307632446,
0.02939537540078163,
-0.22134466469287872,
0.03435350954532623,
0.3600734770298004,
-0.2517106235027313,
-0.841214120388031,
-0.14684095978736877,
0.43310531973838806,
-0.21080639958381653,
-0.20473811030387... | |
In code I have developed some years ago I have been using this a lot to close the current form on pressing the Escape key at any moment:
```
procedure TSomeForm.FormKeyPress(Sender: TObject; var Key: Char);
begin
if key = #27 then close;
end;
```
This behaviour is defined for the TForm. The form's `KeyPreview` p... | [
0.29906830191612244,
-0.022979671135544777,
0.5907391905784607,
-0.4988756775856018,
-0.12122048437595367,
-0.3162596821784973,
0.7482894062995911,
-0.3521849513053894,
0.1933991014957428,
-0.601844072341919,
-0.4414946734905243,
0.8654571771621704,
-0.18594151735305786,
0.0015687067061662... | |
by Windows to signify invalid operation) is issued. It still works fine but I have never quite managed to get rid of the sound.
What's the problem with this?
---
Steps to recreate:
* new VCL Forms application, set the form's KeyPreview to true
* on the Events tab double-click the onKeyPress event and enter dummy c... | [
0.4290657043457031,
-0.07942664623260498,
1.0019806623458862,
-0.062463872134685516,
0.17848293483257294,
-0.19983400404453278,
0.34959813952445984,
-0.5352233052253723,
-0.020505208522081375,
-0.495943158864975,
-0.14987823367118835,
1.076751470565796,
-0.09879010170698166,
0.317480325698... | |
you left the ESC in the input. See how Key is a **var**? Set it to #0 and you eliminate the ding. That removes it from further processing.
```
procedure TSomeForm.FormKeyPress(Sender: TObject; var Key: Char);
begin
if key = #27 then
begin
key := #0;
close;
end;
end;
```
KeyPreview is just t... | [
0.11837808042764664,
-0.2416200190782547,
0.6758680939674377,
-0.35633158683776855,
0.17321528494358063,
-0.1731151044368744,
0.28010931611061096,
-0.10797524452209473,
0.06058469042181969,
-0.8723499774932861,
-0.2295168936252594,
0.6949739456176758,
-0.2676065266132355,
0.241022184491157... | |
Whenever we recompile an exe or a DLL, its binary image is different even if the source code is the same, due to various timestamps and checksums in the image.
But, our quality system implies that each time a new DLL is published, related validation tests must be performed again (often manually, and it takes a signifi... | [
0.2855260372161865,
-0.012121637351810932,
0.21576163172721863,
0.3931270241737366,
0.015759475529193878,
-0.36801770329475403,
0.28498366475105286,
-0.10275093466043472,
-0.3173615038394928,
-0.6268412470817566,
-0.3529907763004303,
0.5453940629959106,
-0.17923197150230408,
-0.01934740692... | |
way to achieve this ?
Use coalesce!
```
COALESCE(filter, '%')
```
Edit: This is probably the wrong way to do it but I guess it's an option. | [
0.3675783574581146,
-0.23631227016448975,
0.10436606407165527,
0.15439632534980774,
0.21696192026138306,
-0.011543591506779194,
0.04731045663356781,
0.01213922817260027,
0.10116380453109741,
-0.7795089483261108,
0.004714318551123142,
0.3687829375267029,
-0.11376377940177917,
-0.24058450758... | |
What is the Windows Task Manager "Handles" column a measure of? File Handles? Or Page File Pointers? Also is it bad for one program to have 8000 handles?
It's a measure of kernel handles. Kernel handles types and the functions that create them include:
* File handles (CreateFile)
* Memory mapped files (CreateFileMappi... | [
0.12381727993488312,
0.17655563354492188,
0.31254714727401733,
0.18735674023628235,
-0.08652126789093018,
0.19423948228359222,
0.005372228100895882,
0.008312448859214783,
-0.4575112760066986,
-0.8763967752456665,
0.07243368774652481,
0.4555074870586395,
-0.03439794108271599,
0.258086442947... | |
I have a SQL Server database that has a huge proliferation of stored procedures. Large numbers of stored procedures are not a problem in my Oracle databases because of the Oracle "package" feature.
What do programmers do to get around the lack of a "package" feature like that of Oracle?
While SQL Server has nothing to... | [
0.3581039309501648,
0.19996871054172516,
-0.2242937833070755,
-0.024445394054055214,
0.04868998005986214,
-0.18359144032001495,
0.2180841714143753,
-0.1874944418668747,
-0.5054214596748352,
-0.6969380378723145,
0.02159757725894451,
0.4663136601448059,
-0.3517662286758423,
-0.09002935886383... | |
I too miss the organization and cool features of Oracle packages. However, all platforms have their strengths.
NOTE: Writing stored procedures in the .NET language DOES give you encapsulation and state. It still does not however separate them in the EM treeview in any special way. | [
0.22690145671367645,
0.2562418580055237,
-0.12752404808998108,
0.314736008644104,
-0.1500324308872223,
-0.374782532453537,
0.3813081383705139,
0.13984598219394684,
-0.08657217770814896,
-0.35914719104766846,
0.04679464176297188,
0.6128218770027161,
0.105450339615345,
-0.25196096301078796,
... | |
I'm just wondering if anyone knows of a class that exists for handling user comments already. I can always write my own, but I figure I wouldn't re-invent the wheel if there is one out there.
Id like to be able to display a comment form, manipulate/validate/sanitize user input, and possibly more functions such as inse... | [
0.6052384972572327,
0.18400393426418304,
-0.18398937582969666,
0.31739377975463867,
-0.1914384365081787,
-0.0104350121691823,
-0.012059993110597134,
0.36650630831718445,
-0.311109334230423,
-0.6307150721549988,
0.4963460862636566,
0.47396382689476013,
0.14908798038959503,
0.147111922502517... | |
to support comments in the ORM (such as [Commentable Behavior Plugin](http://www.symfony-project.org/plugins/sfPropelActAsCommentableBehaviorPlugin) for Propel within symfony) but that doesn't give you anything in the way of forms, sanitization, display, user validation, etc.
And then there's the question of features:... | [
0.49416384100914,
-0.01509373914450407,
0.37761256098747253,
0.0965161919593811,
-0.31499525904655457,
-0.21602891385555267,
-0.08912001550197601,
0.19262012839317322,
-0.3629033863544464,
-0.4449789226055145,
0.019376270473003387,
0.6934918761253357,
-0.22033828496932983,
-0.1063442677259... | |
I am developing a desktop app using Java and Swing Application Framework. I have an application about box and I'd like to have that box contain some indication of what version is being tested. My preference is for that value to be changed in an automated fashion. I'm using CruiseControl to build the application trigger... | [
0.49698108434677124,
-0.13638640940189362,
0.36045846343040466,
0.013485175557434559,
0.2329200804233551,
0.1462155133485794,
-0.07047870010137558,
0.005269750487059355,
-0.3573058247566223,
-0.6936858296394348,
0.37625524401664734,
0.43221569061279297,
-0.15604451298713684,
0.020410960540... | |
anyway to automatically check for updates or anything like that. I just want to be able to ask a tester what version is in the about box and get a reliable answer.
I will start this post off by stating that I use [Apache Maven](http://maven.apache.org/) to build. You could also do a similar sort of thing with Ant or an... | [
0.7211589217185974,
0.0460885614156723,
0.033537134528160095,
-0.01066124252974987,
-0.3000345826148987,
-0.36680173873901367,
0.39939257502555847,
0.43475601077079773,
-0.17012766003608704,
-0.4940394461154938,
0.28996542096138,
0.44806843996047974,
0.05049019306898117,
0.0931402891874313... | |
This will give you the subversion revision number as ${scm.revision}.
```
<build>
<plugins>
<plugin>
<artifactId>maven-scm-plugin</artifactId>
<executions>
<execution>
<id>getting-scm.revision</id>
<phase>validate</phase>
<goals>
<go... | [
-0.28976285457611084,
-0.5589260458946228,
0.8238279819488525,
0.07447697967290878,
0.06893909722566605,
-0.05750347673892975,
-0.15958404541015625,
-0.16471590101718903,
-0.6129046678543091,
-0.5098302364349365,
-0.1613013744354248,
-0.03418686240911484,
-0.05406026542186737,
0.2805806398... | |
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
```
After you have then, I then use this as part of the jar file manifest as the Implementation Version.
```
<plugin>
<artifactId>maven-jar-plugin</artifactId>
<version>2.1</version>
<configuration>
<a... | [
-0.07715975493192673,
0.024722477421164513,
0.4790087342262268,
-0.19356811046600342,
-0.0636211484670639,
-0.10260459780693054,
0.11263247579336166,
-0.12926289439201355,
-0.1705639809370041,
-0.7989222407341003,
-0.17122115194797516,
0.2313305288553238,
0.0010331259109079838,
0.309699714... | |
</manifestEntries>
</archive>
</configuration>
</plugin>
```
The nice thing about this is that you can access this from code by using the following:
```
Package p = getClass().getPackage();
String version = p.getImplementationVersion();
```
That gives you the full build number like "1.0.13525" where th... | [
0.46693432331085205,
-0.0512840710580349,
0.5636535286903381,
-0.22367925941944122,
-0.23546001315116882,
-0.08345887064933777,
0.35621702671051025,
-0.12344370782375336,
-0.3636702597141266,
-0.7656226754188538,
0.11632057279348373,
0.4765295386314392,
0.021226324141025543,
0.108099177479... | |
I am trying to use the getJSON function in jQuery to import some data and trigger a callback function. The callback function doesn't run. However, if I try the same thing with the get function, it works fine. Strangely, it works with the get function even when I pass "json" as the type. Why is this happening? I tested ... | [
0.2645307779312134,
0.05254875496029854,
0.30773839354515076,
-0.2920231819152832,
-0.08034979552030563,
-0.2674766182899475,
0.4625743329524994,
-0.5336427688598633,
0.19972814619541168,
-0.6973011493682861,
-0.10830476135015488,
0.5106683969497681,
-0.2609429657459259,
-0.316744863986969... | |
function(response) {
alert('hi');
//works
}
)
});
$("#test2").click(function() {
$.getJSON("index.html",
function(response) {
alert('hi');
//doesn't work
}
)
});
$("#test3").click(function() {
$.get("index.html", | [
0.032739974558353424,
-0.2845279276371002,
0.5884896516799927,
-0.24025489389896393,
0.13582152128219604,
0.017374984920024872,
0.5708104968070984,
-0.5843023061752319,
0.09438648074865341,
-0.47142294049263,
-0.590094804763794,
0.6943948268890381,
-0.5852093696594238,
-0.1772613227367401,... | |
function(response) {
alert('hi');
//works
},
"json"
)
});
</script>
</body></html>
```
This seems to happen no matter what URL I access, as long as it's on the same domain. I tried passing some data and that doesn't make a difference.
Of course I can work around the proble... | [
-0.007877841591835022,
-0.3978763818740845,
0.6012915372848511,
0.02250996045768261,
-0.22324238717556,
-0.2086114138364792,
0.7092717885971069,
-0.272172749042511,
-0.015595033764839172,
-0.4467940330505371,
-0.5116072297096252,
0.5308250188827515,
-0.3050539195537567,
-0.0445536263287067... | |
function, but I am still curious as to why this is happening.
I know there is a [similar question](https://stackoverflow.com/questions/572991/jquery-getjson-doesnt-trigger-callback) asked here but it didn't answer my question.
The json needs to be valid, otherwise the callback will not fire. | [
-0.1131160780787468,
-0.2534952461719513,
0.4488317668437958,
0.017582235857844353,
0.009388983249664307,
-0.30406707525253296,
0.5050957202911377,
-0.07309111207723618,
-0.2638688385486603,
-0.05877186357975006,
-0.3302493989467621,
0.8423488140106201,
-0.38917291164398193,
-0.07990710437... | |
I know eql? is used by Hashes to see if an object matches a key`*`, and you do
```
def ==(rb)
```
if you want to support the == operator, but there must be a good reason that Hashes don't use == instead. Why is that? When are you going to have definitions for == and eql? that are *not* equivalent (e.g. one is an ali... | [
0.03629574179649353,
0.14882774651050568,
0.21652787923812866,
-0.010830164887011051,
-0.13880234956741333,
-0.32256704568862915,
0.29789769649505615,
-0.18448834121227264,
0.10765281319618225,
-0.37757617235183716,
0.15779002010822296,
0.3287063539028168,
-0.21704930067062378,
0.298143357... | |
codes are equal.
Also, is it basically a terribly idea to override equal? ?
I don't know the reasoning for this particular choice in ruby, but I'll just point out that equality is a difficult concept.
Common Lisp, for example has eq, eql, equal, equalp, and for that matter =
It can be very useful to be able to tel... | [
0.2126787006855011,
0.1465783268213272,
-0.0628817155957222,
0.38650447130203247,
-0.5038284063339233,
0.06125715747475624,
0.4181511104106903,
-0.16309140622615814,
-0.043963830918073654,
-0.7194526791572571,
0.17172786593437195,
0.30387961864471436,
-0.5142821073532104,
-0.18941524624824... | |
the language.
If I recall it correctly (I don't use ruby), rubys predicates are implementing three of these cases
== is equality of value
eql? is equality of value and type
equal? is true only for the same object | [
-0.10273262113332748,
0.17807234823703766,
0.058144066482782364,
0.005039791576564312,
-0.4989786446094513,
0.10729696601629257,
0.5437543988227844,
-0.1511639654636383,
0.03410160541534424,
-0.3747168779373169,
0.006428389344364405,
0.43733343482017517,
-0.5047988295555115,
-0.21287256479... | |
The goal is to create menus which can be utilized with certain controls on an MS Access form and to be able to right click on a that control, for example on a listbox and a relevant context specific menu popup with options, which if clicked, would trigger a predefined subroutine or function.
What is the best method to... | [
-0.05965486913919449,
-0.12201371788978577,
0.5496047735214233,
0.03329412266612053,
-0.19351473450660706,
0.054580070078372955,
-0.040673986077308655,
0.16129407286643982,
-0.2533508539199829,
-0.478607714176178,
-0.022457309067249298,
0.6611618995666504,
-0.4291923940181732,
0.0128485104... | |
method.
Of course this assumes the
```
Private Sub MyListControlName_MouseUp(ByVal Button As Integer, _
ByVal Shift As Integer, _
ByVal X As Long, ByVal Y As Long) | [
-0.36157312989234924,
-0.037511859089136124,
0.46638917922973633,
-0.3124418556690216,
0.4049079120159149,
0.0327862985432148,
0.3743160665035248,
0.011180153116583824,
-0.10665642470121384,
-0.3672635555267334,
0.0765686184167862,
0.5638047456741333,
-0.2215816229581833,
0.263540387153625... | |
' Call the SetUpContextMenu function to ensure it is setup with most current context
' Note: This really only needs to be setup once for this example since nothing is
' changed contextually here, but it could be further expanded to accomplish this
SetUpContextMenu
' See if the right mouse button was clicked
... | [
0.2670133709907532,
-0.39123162627220154,
0.6778566241264343,
0.003529552137479186,
0.10108038038015366,
-0.2117992788553238,
0.12399878352880478,
-0.25902897119522095,
-0.26444685459136963,
-0.6465939879417419,
-0.27436578273773193,
0.8146011829376221,
-0.2821327745914459,
0.0088802212849... | |
a reference to Microsoft Office Object Library
Dim combo As CommandBarComboBox
' Since it may have been defined in the past, it should be deleted,
' or if it has not been defined in the past, the error should be ignored
On Error Resume Next
CommandBars("MyListControlContextMenu").Delete
On E... | [
-0.16781878471374512,
-0.2217359095811844,
0.668964147567749,
0.011855821125209332,
-0.04138113185763359,
0.186331108212471,
0.30285775661468506,
0.05532238632440567,
-0.0844244435429573,
-0.5822883248329163,
-0.4472171664237976,
0.6455945372581482,
-0.30675458908081055,
-0.091653943061828... | |
the msoControlEdit type
Set combo = .Controls.Add(Type:=msoControlEdit)
combo.Caption = "Lookup Text:" ' Add a label the user will see
combo.OnAction = "getText" ' Add the name of a function to call
' Provide the user the ability to click a menu option to execute a funct... | [
-0.24050770699977875,
-0.4443744122982025,
0.5929210782051086,
0.1719799041748047,
0.2965293824672699,
0.14803631603717804,
0.28583550453186035,
-0.25461533665657043,
-0.06722137331962585,
-0.6270037293434143,
-0.6462739109992981,
0.7317009568214417,
-0.5395010113716125,
-0.302974015474319... | |
.Controls.Add(Type:=msoControlButton)
combo.BeginGroup = True ' Add a line to separate above group
combo.Caption = "Lookup Details" ' Add label the user will see
combo.OnAction = "LookupDetailsFunction" ' Add the name of a function to call
' Provide the user the abi... | [
0.06374002248048782,
-0.5169731378555298,
0.574114978313446,
-0.03053135983645916,
0.13965368270874023,
0.1449529081583023,
0.2338053584098816,
-0.4336344301700592,
0.03677758947014809,
-0.6410991549491882,
-0.4249281585216522,
0.672475278377533,
-0.42778557538986206,
-0.17218619585037231,... | |
Set combo = .Controls.Add(Type:=msoControlButton)
combo.Caption = "Delete Record" ' Add a label the user will see
combo.OnAction = "DeleteRecordFunction" ' Add the name of the function to call
End With
End Sub
```
Since three function have been referenced, we can move on to define these... | [
0.4013894498348236,
-0.4115161895751953,
0.7309862971305847,
-0.12668484449386597,
0.11519850045442581,
-0.027534769847989082,
0.20913614332675934,
-0.5823158025741577,
-0.08502758294343948,
-0.489928275346756,
-0.3454546332359314,
0.871595561504364,
-0.3765743374824524,
-0.128440812230110... | |
the name of the **control caption**.
```
Public Function getText() As String
getText = CommandBars("MyListControlContextMenu").Controls("Lookup Text:").Text
' You could optionally do something with this text here,
' such as pass it into another function ...
MsgBox "You typed the following text into the ... | [
-0.22776713967323303,
-0.037983473390340805,
0.5156918168067932,
0.0034054943826049566,
-0.012226458638906479,
-0.04946264997124672,
0.1501733660697937,
-0.03203217312693596,
0.09467203170061111,
-0.3138298988342285,
-0.41290923953056335,
0.673679530620575,
-0.48862728476524353,
0.25238135... | |
it against null, and if still valid, will execute a query to remove the record from a table.
```
Public Function DeleteRecordFunction() As String
If Not IsNull(Forms!MyFormName.Controls("MyListControlName").Column(0)) Then
Currentdb.Execute _
"DELETE * FROM [MyTableName] " & _
"WHERE MyKey = " & F... | [
-0.2538520395755768,
-0.24780501425266266,
0.5662794709205627,
-0.3583226203918457,
0.3287879228591919,
-0.056774597615003586,
0.33844438195228577,
-0.2666090428829193,
-0.09013219177722931,
-0.420957088470459,
-0.22361746430397034,
0.742939829826355,
-0.20904655754566193,
0.14985005557537... | |
open the form, right click on the list control and select one of the options from the popup menu.
Optionally `button.FaceID` can be utilized to indicate a known office icon to associate with each instance of the menu popup control.
I found [Pillai Shyam's work](http://skp.mvps.org/fidcode.htm) on creating a FaceID B... | [
-0.11249192804098129,
0.2597138285636902,
0.49220502376556396,
-0.04601329192519188,
0.10655178874731064,
0.2925828695297241,
0.12691663205623627,
0.07019639015197754,
-0.05346543341875076,
-0.8339604735374451,
-0.15212737023830414,
0.34378325939178467,
-0.25437599420547485,
0.182974427938... | |
I'm working on a CRUD site with a lot of very similar forms for adding new data. In other words:
AddMovie.aspx, AddGame.aspx, AddBeer.aspx, AddAdd.aspx
I keep thinking to myself, "Self, it would be really nice to have a single Add.aspx instead of re-writing so many similar pages - *plus all those OOP nerds would thin... | [
0.6143641471862793,
0.2515527009963989,
0.05706726014614105,
0.14592602849006653,
-0.3825899064540863,
0.3057207763195038,
-0.0777636170387268,
0.16505974531173706,
-0.5561731457710266,
-0.6714234948158264,
0.27975672483444214,
0.3678753674030304,
-0.010661899112164974,
-0.100339375436306,... | |
hide/show, but not sure I really like that solution. Is there a better way to do it or should I just give up and go back to the multiple bad ol' Add*Object*.aspx pages?
Also, this is a plain ol' (3.5) web forms app. No ASP.NET MVC goodness for this one, sadly. It seems like there should be such a trivial solution and ... | [
0.30909264087677,
-0.17451289296150208,
0.3098445236682892,
0.38825786113739014,
-0.3055015206336975,
-0.23297061026096344,
0.33417320251464844,
0.16008099913597107,
-0.2941288948059082,
-0.4539530873298645,
0.3361411690711975,
0.46201828122138977,
-0.3302442729473114,
-0.0866648256778717,... | |
because they support "scaffolding" (the edit pages are generated automatically based on your database model). | [
0.27452757954597473,
-0.1048814058303833,
0.1931540071964264,
0.242832750082016,
0.05216103419661522,
-0.1702168583869934,
0.0061596594750881195,
-0.10360318422317505,
-0.4438773989677429,
-0.6512112617492676,
-0.25455552339553833,
0.1943204402923584,
0.0316033698618412,
0.0522373355925083... | |
I have used this [summary reference](http://www.fortran-2000.com/ArnaudRecipes/sharedlib.html) for years but it is beginning to show its age. If you have any you might suggest as more current I would greatly appreciate it.
Some resources that leap to mind:
* [GCC manuals](http://gcc.gnu.org/onlinedocs/): Manuals for G... | [
0.5927402973175049,
0.011324172839522362,
0.21291746199131012,
-0.03239632770419121,
-0.24043485522270203,
-0.5938648581504822,
-0.2376132309436798,
-0.03531183302402496,
-0.11657264828681946,
-0.8872051239013672,
-0.03952009975910187,
0.5105118155479431,
-0.19590745866298676,
0.0393860079... | |
I've soaked up a lot of it over the years, but haven't tried to codify that knowledge in any useful form.
I would imagine that any of the cross-platform build tools have to include a fair amount of that kind of knowledge, even if it is tied up in their sources or in their developer/internals documentation. You could t... | [
0.7968993782997131,
0.1478695422410965,
-0.35276734828948975,
0.0713411420583725,
-0.011541301384568214,
-0.2642989158630371,
0.0034566952381283045,
0.3489641845226288,
-0.2546371519565582,
-0.45273080468177795,
0.03686951845884323,
0.609132707118988,
0.2543736696243286,
-0.037730060517787... | |
I know that in terms of several distributed techniques (such as RPC), the term "Marshaling" is used but don't understand how it differs from Serialization. Aren't they both transforming objects into series of bits?
### Related:
[What is Serialization?](https://stackoverflow.com/questions/633402/what-is-serialization)... | [
0.28285524249076843,
0.03634257614612579,
-0.18023471534252167,
0.4494915008544922,
0.3584415018558502,
-0.2433544099330902,
-0.033725395798683167,
-0.5352809429168701,
-0.4912196099758148,
-0.2635120451450348,
0.06950931251049042,
0.2862733006477356,
-0.06477605551481247,
0.38422763347625... | |
pass-by-value semantics.
It is also possible for an object to be marshaled by reference, in which case the data "on the wire" is simply location information for the original object. However, such an object may still be amenable to value serialization.
As @Bill mentions, there may be additional metadata such as code b... | [
0.7429008483886719,
-0.07897080481052399,
0.17984512448310852,
0.35832372307777405,
0.11314477026462555,
-0.19772469997406006,
0.24158738553524017,
-0.4510280191898346,
-0.2236187756061554,
-0.015550853684544563,
-0.10500229150056839,
0.5324747562408447,
-0.27615320682525635,
0.29569569230... | |
Can the TFS proxy be installed on Windows XP? I have an environment that I am not allowed to run a Windows Server; however, it is offsite, so a proxy would be very helpful.
It turns out that Microsoft changed both their deployment and pricing models from v1.0 of TFS. The proxy requires Windows Server and costs the same... | [
0.4455241858959198,
0.035450320690870285,
0.5199347734451294,
0.15764088928699493,
-0.0018691533477976918,
-0.29410645365715027,
0.3350391089916229,
0.07664736360311508,
0.12502743303775787,
-0.8029589056968689,
0.020369989797472954,
0.5913302898406982,
-0.2057836949825287,
0.2572853565216... | |
I want to comment out all calls to an API (java.util.Logging, in my case) in my codebase. Is there a good library to accomplish this easily?
I tried Eclipse ASTParser, but that is tied to Eclipse. I am now struggling with PMD's parser. I haven't yet looked at it, but can Jackpot do this? Any other suggestions?
If you w... | [
0.2828173339366913,
0.03937329724431038,
0.17497630417346954,
0.11532754451036453,
0.08148699253797531,
-0.13244469463825226,
-0.021982531994581223,
-0.06421145051717758,
-0.11588697135448456,
-0.659507155418396,
0.11272760480642319,
0.7274463772773743,
-0.3707316815853119,
-0.176040336489... | |
code to some extend to know where to put the comments. I.e. you want to be able to do this:
```
// Log.doLog("Here is a" /* With a block comment to make it hard */
// + " multiline log statement"
// ); // Line break inserted here
doSomethingEssential();
```
It's much more trivial to do this instead:
```
if ... | [
0.09472823143005371,
0.015975015237927437,
0.08761513233184814,
0.03206750378012657,
-0.03023679554462433,
-0.3814575970172882,
0.3598071336746216,
-0.31531721353530884,
0.05701952427625656,
-0.4341666102409363,
-0.3983536660671234,
0.7215450406074524,
-0.31312692165374756,
-0.356896817684... | |
won't make it to the final .class file.
That way all you need is a search/replace step in your build script that replaces all occurences of
```
"Log.doLog("
```
with either
```
"if (false) Log.doLog(" or
"if (true) Log.doLog("
```
without resorting to tricky parsing of the code. | [
-0.12732061743736267,
0.13312950730323792,
0.4343723654747009,
-0.006069795694202185,
0.5439045429229736,
-0.19289104640483856,
0.48914140462875366,
0.19467507302761078,
0.1291903704404831,
-0.7096049189567566,
-0.3527410924434662,
0.5386209487915039,
-0.11713691055774689,
0.30736076831817... | |
I have a SQL Server table that contains users & their grades. For simplicity's sake, lets just say there are 2 columns - `name` & `grade`. So a typical row would be Name: "John Doe", Grade:"A".
I'm looking for one SQL statement that will find the percentages of all possible answers. (A, B, C, etc...) Also, is there a ... | [
0.2736666202545166,
0.514233410358429,
0.26564186811447144,
0.09453516453504562,
-0.26334846019744873,
0.23889854550361633,
0.15487688779830933,
-0.18105225265026093,
0.0743018388748169,
-0.5464498996734619,
0.2618010640144348,
0.22053255140781403,
0.1001206561923027,
0.24498260021209717,
... | |
by gordyii was close but had the multiplication of 100 in the wrong place and had some missing parenthesis.
```
Select Grade, (Count(Grade)* 100 / (Select Count(*) From MyTable)) as Score
From MyTable
Group By Grade
``` | [
-0.35161092877388,
0.36793243885040283,
0.3864021301269531,
0.09335590898990631,
-0.24871152639389038,
0.32680386304855347,
0.18069066107273102,
-0.5116634368896484,
0.05502697825431824,
-0.2991263270378113,
-0.0676683560013771,
-0.22509722411632538,
-0.017086004838347435,
0.30770841240882... | |
I'm looking for a package to typeset SQL statements in LaTeX. So far I have heard of [listings](http://www.ctan.org/tex-archive/macros/latex/contrib/listings/) and [lgrind](http://www.ctan.org/tex-archive/nonfree/support/lgrind/), are there any other suggestions?
[edit] Added requirement: I'd like the package to be ab... | [
0.49538591504096985,
0.15432928502559662,
-0.00796730536967516,
0.10123597830533981,
0.01756003126502037,
-0.12388214468955994,
0.11400306969881058,
-0.08105795085430145,
-0.21609613299369812,
-0.3001907169818878,
-0.1255687177181244,
0.5476004481315613,
-0.3385869264602661,
-0.30377188324... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.