text stringlengths 0 30.5k | title stringclasses 1
value | embeddings listlengths 768 768 |
|---|---|---|
do.
```
What am I not understanding about this RegEx?
You appear to be using 'greedy' matching.
Greedy matching says "eat as much as possible to make this work"
try with
```
<in[^=]*=
```
for starters, that will stop it matching the "=" as part of ".\*"
but in future, you might want to read up on the
``... | [
0.5017226338386536,
0.2271275669336319,
0.021811403334140778,
-0.08649028092622757,
0.1508614867925644,
0.05976637825369835,
-0.038572750985622406,
-0.000055455493566114455,
-0.12288782000541687,
-0.5819798111915588,
-0.13503223657608032,
0.6219233274459839,
-0.5210725665092468,
-0.0906296... | |
whether or not there are '=' in between. | [
0.31945452094078064,
0.12332125753164291,
0.1821061670780182,
0.10631083697080612,
-0.06320305913686752,
-0.042644914239645004,
0.0564270056784153,
0.29650115966796875,
-0.2107858955860138,
-0.17446842789649963,
-0.27734825015068054,
0.41548794507980347,
0.06445001810789108,
-0.24840444326... | |
So I have a column with different numbers and wish to categorize them by range within 30 minute intervals. So 5 would be 0-30, 697 would be 690-720, and 169 would be 150-180. I was first thinking of doing a case statement, but it doesn't look like Access 2003 supports it. Is there perhaps some sort of algorithm that co... | [
0.058676332235336304,
0.07436183094978333,
0.48410117626190186,
-0.05810676887631416,
-0.1291947066783905,
0.5191133618354797,
-0.012827686965465546,
-0.33491840958595276,
-0.24521386623382568,
-0.41709667444229126,
0.109945148229599,
0.6542531847953796,
-0.10553820431232452,
-0.0740147158... | |
get your upper bound.
Examples
```
Int(5 / 30) = 0 * 30 = 0
Int(697 / 30) = 23 * 30 = 690
``` | [
0.07251562923192978,
0.07268970459699631,
0.37330934405326843,
-0.21128351986408234,
0.3424679934978485,
0.11349117755889893,
0.2468099147081375,
-0.6683727502822876,
-0.3793027400970459,
-0.5448858737945557,
-0.2508382201194763,
0.6726996302604675,
-0.04855884984135628,
-0.216129422187805... | |
I'm using an Informix (Version 7.32) DB. On one operation I create a temp table with the ID of a regular table and a serial column (so I would have all the IDs from the regular table numbered continuously). But I want to insert the info from the regular table ordered by ID something like:
```
CREATE TEMP TABLE tempTa... | [
0.2996578812599182,
0.16037826240062714,
0.3544946312904358,
0.2187327742576599,
-0.17375953495502472,
0.0005336968461051583,
0.15404564142227173,
-0.23296242952346802,
-0.10641579329967499,
-0.7165790796279907,
0.09314887225627899,
0.6294904947280884,
-0.6267281770706177,
0.20974457263946... | |
to do this is because the regular table has about 10,000 items and in a jsp file, it has to show every record, but it would take to long, so the real reason I want to do this is to *paginate* the output. This version of Informix doesn't have `Limit` nor `Skip`. I can't renumber the serial because is in a relationship, ... | [
0.24058490991592407,
-0.05813867226243019,
0.2845439016819,
0.3413430452346802,
-0.16339050233364105,
-0.2562817931175232,
0.0009151700069196522,
-0.1999085247516632,
-0.5636476278305054,
-0.6600895524024963,
0.20565439760684967,
0.27760040760040283,
-0.34391385316848755,
0.042165264487266... | |
i were to put
```
SELECT * FROM regularTable WHERE folio BETWEEN X AND Y
```
I would get maybe 300 in one page, then 500 in the next page
You might try it iterating a cursor over the SELECT ... ORDER BY and doing the INSERTs within the loop. | [
0.22648605704307556,
0.04424727335572243,
0.3782464563846588,
0.054521553218364716,
-0.2172718048095703,
0.4620598256587982,
-0.17812566459178925,
-0.2951635420322418,
-0.1545485556125641,
-0.6605976223945618,
0.2635408937931061,
0.35084524750709534,
-0.17523668706417084,
-0.12933072447776... | |
I am looking for a backend solution for an application written in Ruby on Rails or Merb to handle data with several billions of records. I have a feeling that I'm supposed to go with a distributed model and at the moment I looked at
[HBase](http://hadoop.apache.org/hbase/) with [Hadoop](http://hadoop.apache.org/core/... | [
0.4521946310997009,
0.21501131355762482,
0.22073686122894287,
-0.022806504741311073,
-0.23272742331027985,
-0.33755677938461304,
0.010500465519726276,
-0.15589599311351776,
-0.2495558261871338,
-0.762382984161377,
0.209433913230896,
0.37414035201072693,
-0.2331552654504776,
0.2590207457542... | |
chunks. So ~95% of the time data will be read only.
Depending on your actual data usage, MySQL or Postgres should be able to handle a couple of billion records on the right hardware. If you have a particular high volume of requests, both of these databases can be replicated across multiple servers (and read replication... | [
0.4212650954723358,
0.18837645649909973,
-0.07137191295623779,
0.32399725914001465,
-0.37881994247436523,
-0.2989561855792999,
0.1664043366909027,
0.042437002062797546,
-0.4128214418888092,
-0.5050778388977051,
-0.04950520023703575,
0.5204057693481445,
-0.021803192794322968,
0.154311999678... | |
a couple of these systems and take it from there. | [
0.34082385897636414,
0.28900331258773804,
0.08298565447330475,
0.2144521176815033,
-0.010125470347702503,
-0.1212194412946701,
0.07827294617891312,
0.2365664690732956,
0.13435663282871246,
-0.20482036471366882,
0.1016431674361229,
0.5219847559928894,
-0.013205394148826599,
-0.0119114564731... | |
In C#, I want to initialize a string value with an empty string.
How should I do this?
What is the right way, and why?
```
string willi = string.Empty;
```
or
```
string willi = String.Empty;
```
or
```
string willi = "";
```
or what?
**Use whatever you and your team find the most readable.**
Other answers ... | [
0.242939755320549,
0.08274318277835846,
0.20906512439250946,
-0.2270151823759079,
-0.11553209275007248,
-0.1871587634086609,
0.18463781476020813,
-0.11173459887504578,
-0.010937640443444252,
-0.631780207157135,
-0.2985270917415619,
0.5795156955718994,
-0.35271742939949036,
-0.1758939772844... | |
find more readable is a different matter, however. It's subjective and will vary from person to person - so I suggest you find out what most people on your team like, and all go with that for consistency. Personally I find `""` easier to read.
The argument that `""` and `" "` are easily mistaken for each other doesn't... | [
0.48115214705467224,
-0.03949236497282982,
0.05909110978245735,
0.4766712784767151,
-0.16544178128242493,
0.0016399710439145565,
-0.05688602104783058,
-0.024686135351657867,
-0.008196922950446606,
-0.6961731314659119,
-0.05419361591339111,
0.775857150554657,
0.029721606522798538,
-0.349044... | |
I have a Ruby script that generates a UTF8 CSV file remotely in a Linux machine and then transfers the file to a Windows machine thru SFTP.
I then need to open this file with Excel, but Excel doesn't get UTF8, so I always need to open the file in a text editor that has the capability to convert UTF8 to ANSI.
I would... | [
0.27250954508781433,
0.23402561247348785,
0.46479302644729614,
-0.08196750283241272,
-0.20507264137268066,
0.019879072904586792,
0.3324584662914276,
0.0283836517482996,
-0.10397022217512131,
-0.9425781965255737,
-0.03854247182607651,
0.4308072030544281,
-0.2054741531610489,
0.1146597117185... | |
the ascii character set. | [
-0.31745803356170654,
-0.10717121511697769,
-0.07988998293876648,
0.13150276243686676,
0.014588076621294022,
0.025795485824346542,
-0.40035921335220337,
-0.13462041318416595,
-0.2934180796146393,
-0.49074020981788635,
-0.5173077583312988,
0.13853119313716888,
-0.4831653833389282,
0.0371136... | |
I am currently trying to create a win32 service using pywin32. My main point of reference has been this tutorial:
<http://code.activestate.com/recipes/551780/>
What i don't understand is the initialization process, since the Daemon is never initialized directly by Daemon(), instead from my understanding its initializ... | [
0.04386601224541664,
0.209394171833992,
0.3079115152359009,
-0.3037414848804474,
-0.10072306543588638,
0.02258957549929619,
0.3057524561882019,
-0.16376708447933197,
0.03206248581409454,
-1.0078734159469604,
-0.19920164346694946,
0.4718087315559387,
-0.12069502472877502,
0.0869891121983528... | |
args):
win32serviceutil.ServiceFramework.__init__(self, args)
self.hWaitStop = win32event.CreateEvent(None, 0, 0, None)
def SvcDoRun(self):
self.run()
def SvcStop(self):
self.ReportServiceStatus(win32service.SERVICE_STOP_PENDING)
win32event.SetEvent(self.hWaitStop)
... | [
-0.13943485915660858,
0.10650555789470673,
0.6177417039871216,
-0.46403104066848755,
0.08096946775913239,
0.07718833535909653,
0.7651710510253906,
-0.37208473682403564,
-0.28155314922332764,
-0.6031072735786438,
-0.45544859766960144,
0.6241193413734436,
-0.28984275460243225,
0.135374516248... | |
win32api.SetConsoleCtrlHandler(lambda x: True, True)
try:
win32serviceutil.InstallService(
cls._svc_reg_class_,
cls._svc_name_,
cls._svc_display_name_,
startType = win32service.SERVICE_AUTO_START
)
print "Installed"
except Exception, er... | [
-0.2198254019021988,
-0.10541707277297974,
0.1654655486345291,
-0.2137768715620041,
0.1908106505870819,
-0.032867297530174255,
0.47094035148620605,
-0.055520396679639816,
0.064747154712677,
-0.5071771740913391,
-0.47918644547462463,
0.7040751576423645,
-0.3932318091392517,
-0.3295291662216... | |
print str(err)
def __svc_regClass__(cls, name, display_name, description):
#Bind the values to the service name
cls._svc_name_ = name
cls._svc_display_name_ = display_name
cls._svc_description_ = description
try:
module_path = sys.modules[cls.__module__].__file__
except AttributeError... | [
-0.14490506052970886,
0.24204273521900177,
0.7967365980148315,
-0.40389612317085266,
-0.010098435916006565,
0.25341883301734924,
0.31602782011032104,
-0.45516741275787354,
-0.40227046608924866,
-0.5245699286460876,
-0.2239753007888794,
0.8801152110099792,
-0.21412353217601776,
-0.142596289... | |
looks like the class passed in is used to register the name of the class in the registry, so you can't do any initialization of your own. But there's a method called GetServiceCustomOption that may help:
<http://mail.python.org/pipermail/python-win32/2006-April/004518.html> | [
0.24185000360012054,
-0.3792670667171478,
0.0816502645611763,
0.18031074106693268,
-0.20361490547657013,
-0.10741500556468964,
0.3001530170440674,
-0.022282211109995842,
-0.3707485795021057,
-0.06462232768535614,
0.007454256527125835,
0.2447567880153656,
0.04432398080825806,
0.250152289867... | |
What is the best way to add "copy to clipboard" functionality to a ListView control in WPF?
I tried adding an ApplicationCommands.Copy to either the ListView ContextMenu or the ListViewItem ContextMenu, but the command remains disabled.
Thanks,
Peter
Here is an xaml sample of one of my attempts...
```
<Window.Reso... | [
0.14090658724308014,
-0.0007523271488025784,
0.6744220852851868,
0.21639491617679596,
0.1756337434053421,
-0.015530522912740707,
0.0731651782989502,
-0.44635775685310364,
-0.4683595895767212,
-0.7068408131599426,
0.022554395720362663,
0.7653833031654358,
-0.42775651812553406,
0.12419467419... | |
<DataTemplate>
<TextBlock Text="{Binding Path=UpToSourceCategoryByCategoryId.Category}" ContextMenu="{DynamicResource ResourceKey=SharedInstanceContextMenu}"/>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
```
How should I set the CommandTarget in this case?
Thanks,Peter
It ... | [
0.008963125757873058,
0.006828919053077698,
0.5813244581222534,
0.006597891915589571,
-0.0818411335349083,
0.024426205083727837,
0.08915375173091888,
-0.7117889523506165,
-0.3340364098548889,
-0.579940915107727,
-0.07906496524810791,
0.8396961688995361,
-0.10139540582895279,
-0.16228467226... | |
<ContextMenu x:Key="SharedInstanceContextMenu">
<MenuItem Header="Copy" Command="ApplicationCommands.Copy"/>
</ContextMenu>
<Style x:Key="MyItemContainerStyle" TargetType="{x:Type ListBoxItem}">
<Setter Property="ContextMenu" Value="{StaticResource SharedInstanceContextMenu}" />
</Style>
</... | [
-0.19402842223644257,
0.21542546153068542,
0.6795576214790344,
-0.08225508779287338,
-0.04984847083687782,
0.06556704640388489,
0.18271709978580475,
-0.7553428411483765,
-0.22461774945259094,
-0.619432806968689,
-0.2561134696006775,
0.8148989081382751,
-0.14164802432060242,
0.1437518149614... | |
I'm documenting the procedure for a full redeploy on my development server. Small staff, using Basic authentication (over SSL, of course) with an htpasswd file backend.
Is it safe to transfer the .htpasswd file as-is?
The Operating Systems will potentially differ, but the software on top (ie. Apache) will be the same... | [
0.23530496656894684,
-0.12622669339179993,
0.41003507375717163,
0.08923722803592682,
-0.17051321268081665,
-0.2438073307275772,
0.47452062368392944,
-0.15118560194969177,
-0.12632086873054504,
-0.8631966710090637,
-0.19320069253444672,
0.46975818276405334,
-0.06756233423948288,
0.026424638... | |
I'm looking for a clean C++ way to parse a string containing expressions wrapped in ${} and build a result string from the programmatically evaluated expressions.
Example: "Hi ${user} from ${host}" will be evaluated to "Hi foo from bar" if I implement the program to let "user" evaluate to "foo", etc.
The current appr... | [
0.24968799948692322,
0.18322014808654785,
-0.03576457500457764,
-0.3062865138053894,
-0.11502853035926819,
0.26104840636253357,
0.30494019389152527,
-0.05867433920502663,
0.05970779061317444,
-0.6080272793769836,
-0.09411439299583435,
0.4196900725364685,
-0.4936608374118805,
0.139919474720... | |
I need to be able examine the contents within ${} so it's not a simple search and replace. Maybe it will say ${uppercase:foo} and then I have to use "foo" as a key in a hashmap and then convert it to uppercase, but I tried to avoid the inner details of ${} when writing the original question above... :-)
```
#include <i... | [
0.01592099852859974,
0.15339504182338715,
0.6186096668243408,
-0.23793357610702515,
0.29027193784713745,
0.22104106843471527,
0.17806929349899292,
-0.3018828332424164,
0.003378039225935936,
-0.6357720494270325,
-0.08964948356151581,
0.44428175687789917,
-0.31161248683929443,
-0.13861821591... | |
};
};
class ParseExp
{
private:
enum State
{
State_Begin,
State_Literal,
State_StartRep,
State_RepWord,
State_EndRep
};
string m_str;
int m_char;
unsigned int m_length; | [
-0.11986839026212692,
0.0742795541882515,
0.20140567421913147,
-0.4497695565223694,
0.3263501226902008,
0.17027580738067627,
0.5224232077598572,
-0.09947057068347931,
-0.05478300154209137,
-0.39151352643966675,
-0.6311840415000916,
0.4056781530380249,
-0.41335970163345337,
0.40567269921302... | |
string m_lexme;
Token::E m_token;
State m_state;
public:
void Parse(const string& str)
{
m_char = 0;
m_str = str;
m_length = str.size();
}
Token::E NextToken()
{
if | [
-0.5263426899909973,
-0.4298841655254364,
0.2241419404745102,
-0.3691064715385437,
0.25858914852142334,
0.2150210291147232,
0.5161920785903931,
-0.3393038809299469,
-0.22641919553279877,
-0.36061790585517883,
-0.5460714101791382,
0.4367870092391968,
-0.16500751674175262,
0.1516092419624328... | |
(m_char >= m_length)
m_token = Token::Eos;
m_lexme = "";
m_state = State_Begin;
bool stop = false;
while (m_char <= m_length && !stop)
{
char ch = m_str[m_char++];
switch (m_state) | [
-0.11709866672754288,
-0.23895922303199768,
0.3480193614959717,
-0.3546558916568756,
0.2550879418849945,
0.18972095847129822,
0.5917409658432007,
-0.4933849573135376,
-0.2754190266132355,
-0.1777006983757019,
-0.44582390785217285,
0.3455553650856018,
-0.054083481431007385,
0.32494020462036... | |
{
case State_Begin:
if (ch == '$')
{
m_state = State_StartRep;
m_token = | [
-0.2456224411725998,
-0.04719363525509834,
0.18069325387477875,
-0.48904237151145935,
0.5216754674911499,
0.03988602012395859,
0.36651140451431274,
-0.21041081845760345,
-0.22274629771709442,
-0.5240200161933899,
-0.5095005035400391,
0.29149162769317627,
-0.1663728952407837,
0.444620698690... | |
Token::Replace;
continue;
}
else
{
m_state = State_Literal; | [
-0.07646144926548004,
-0.3855515420436859,
0.010974379256367683,
-0.4973333179950714,
0.34983140230178833,
0.15237566828727722,
0.7205476760864258,
-0.24424618482589722,
-0.26724690198898315,
-0.43108314275741577,
-0.3129684627056122,
0.27110832929611206,
-0.23763896524906158,
0.4443361759... | |
m_token = Token::Literal;
}
break;
case State_StartRep:
if (ch == '{')
{ | [
-0.2871896028518677,
-0.13899481296539307,
-0.021530838683247566,
-0.45306792855262756,
0.2728123664855957,
-0.040621593594551086,
0.39351165294647217,
-0.28547754883766174,
-0.31364256143569946,
-0.4281480312347412,
-0.5718097686767578,
0.22300873696804047,
-0.1714453548192978,
0.45474034... | |
m_state = State_RepWord;
continue;
}
else
continue; | [
-0.14164669811725616,
-0.13767409324645996,
0.4975244104862213,
-0.8107187747955322,
0.5353420972824097,
0.3297966420650482,
1.2524290084838867,
-0.13528123497962952,
-0.4329387843608856,
-0.38213828206062317,
-0.801611065864563,
0.717221200466156,
-0.3558848798274994,
0.6958682537078857,
... | |
break;
case State_RepWord:
if (ch == '}')
{
stop = true;
continue; | [
-0.008342153392732143,
-0.20448437333106995,
0.18554235994815826,
-0.3684469163417816,
0.5754678845405579,
0.027022067457437515,
0.8216700553894043,
-0.11445720493793488,
-0.2884555459022522,
0.11981751769781113,
-0.8855516314506531,
0.5294852256774902,
-0.21869763731956482,
0.385429352521... | |
}
break;
case State_Literal:
if (ch == '$')
{
stop = true; | [
0.16829530894756317,
0.02926754206418991,
0.02130117267370224,
-0.33878087997436523,
0.6834388971328735,
-0.18912383913993835,
0.6087152361869812,
-0.009633432142436504,
0.0038269907236099243,
0.13274064660072327,
-0.6147606372833252,
0.6232653260231018,
-0.20189708471298218,
0.23036412894... | |
m_char--;
continue;
}
}
m_lexme += ch;
}
return m_token;
} | [
-0.34723255038261414,
-0.2646414041519165,
0.3159407079219818,
-0.3769185543060303,
0.16073477268218994,
0.26109007000923157,
0.45888492465019226,
-0.0564095675945282,
-0.10460692644119263,
-0.35656699538230896,
-0.4499128460884094,
0.5092172622680664,
-0.13803094625473022,
0.3809941112995... | |
const string& Lexme() const
{
return m_lexme;
}
Token::E Token() const
{
return m_token;
}
};
string DoReplace(const string& str, const map<string, string>& dict)
{
ParseExp exp;
exp.Parse(str);
string ret = "";
while (exp.NextToken() != Token::Eos)
{
if... | [
-0.6617593765258789,
-0.4203093945980072,
0.40545010566711426,
-0.296965092420578,
0.2905072569847107,
0.3064506947994232,
0.45929351449012756,
-0.4673435091972351,
-0.11430637538433075,
-0.4915730357170105,
-0.6249073147773743,
0.4451475143432617,
-0.17190179228782654,
0.07925780862569809... | |
ret += exp.Lexme();
else
{
map<string, string>::const_iterator iter = dict.find(exp.Lexme());
if (iter != dict.end())
ret += (*iter).second;
else
ret += "undefined(" | [
-0.3575815260410309,
-0.5468313097953796,
0.7764915227890015,
-0.46592721343040466,
0.08888203650712967,
0.26342669129371643,
0.3935070037841797,
-0.8918414115905762,
0.05207006260752678,
-0.5846881866455078,
-0.662064254283905,
0.679878830909729,
-0.45993441343307495,
-0.04579443112015724... | |
+ exp.Lexme() + ")";
}
}
return ret;
}
int main()
{
map<string, string> words;
words["hello"] = "hey";
words["test"] = "bla";
cout << DoReplace("${hello} world ${test} ${undef}", words);
_getch();
}
```
I will be happy to explain anything about this code :) | [
-0.030117997899651527,
0.01771026849746704,
0.5151609182357788,
-0.3048180639743805,
0.3297695815563202,
-0.048596594482660294,
0.6198244094848633,
0.0004032934666611254,
0.12497636675834656,
-0.7058896422386169,
-0.5753257870674133,
0.5130793452262878,
-0.41683316230773926,
0.301221698522... | |
In [The Guerilla Guide to Interviewing](http://www.joelonsoftware.com/articles/GuerrillaInterviewing3.html) Joel says that guys who want to get things done, but are not smart will do stupid things like using a visitor design pattern where a simple array would be sufficient.
I find it hard to detect, if the design patt... | [
0.40254202485084534,
-0.029270954430103302,
-0.09223142266273499,
0.08600860089063644,
-0.17919163405895233,
-0.07559351623058319,
0.2869196832180023,
-0.1628570407629013,
-0.22679519653320312,
-0.1533515751361847,
0.03371531888842583,
0.443690687417984,
-0.21690373122692108,
-0.1266018450... | |
be done in a sensible way?
I often find that using test driven development helps guide me when faced with these questions.
* *When is a simple approach
sufficient?* It is always sufficient
to use the simplest approach to get
the next test to pass. But knowing
when/how to refactor is the real art
form.
* *What is the m... | [
0.7267381548881531,
0.0501762330532074,
-0.12225684523582458,
-0.05940539389848709,
0.1199900358915329,
-0.31775498390197754,
0.5283458232879639,
-0.3471224009990692,
-0.28677159547805786,
-0.6441748738288879,
0.33354249596595764,
0.7309874892234802,
-0.14656968414783478,
-0.15800873935222... | |
it's time to
refactor to remove duplication and
simplify, and often that involves
moving to a design pattern.
* *When to
refactor from simple-minded to GoF?*
I like what @anopres said - it's
time when you feel the pain of not
having the design pattern in place.
The pain (or code "smell") may
manifest itself in severa... | [
0.6288325190544128,
0.376642107963562,
0.08135367184877396,
0.05751385912299156,
-0.019977834075689316,
-0.03760844096541405,
0.3249363303184509,
-0.45210567116737366,
-0.007396144326776266,
-0.8364241719245911,
0.10225261747837067,
0.5230909585952759,
-0.10780782252550125,
0.0053962115198... | |
fail.
Refactoring, by definition, does not
change the functionality of your
code. Therefore, if your tests
continue to pass, you can have a
pretty good feeling that you didn't
break anything. Although it can be difficult, I actually enjoy this part of TDD, it's almost like a game to make changes without breaking any t... | [
0.6122633814811707,
0.4036279320716858,
0.26136693358421326,
0.10674700886011124,
0.08904016017913818,
-0.18463285267353058,
0.8913354873657227,
0.033766765147447586,
-0.018701961264014244,
-0.35418790578842163,
0.18963278830051422,
0.675390362739563,
-0.13554717600345612,
0.14847597479820... | |
If its dead, is there a successor?
##### For those who didn't know:
The Network News Transfer Protocol or NNTP is an Internet application protocol used primarily for reading and posting Usenet articles (aka netnews), as well as transferring news among news servers.
NNTP isn't dead. It just smells funny.
Sadly, these... | [
0.6136400699615479,
-0.1793396919965744,
0.38978666067123413,
0.36659327149391174,
-0.08346990495920181,
-0.4747990369796753,
-0.1738010048866272,
0.7258136868476868,
-0.5037063360214233,
-0.6844272017478943,
0.014829233288764954,
0.25603634119033813,
-0.1654326468706131,
0.356488794088363... | |
afraid that the "new internet" just doesn't care about interoperability like the "old internet" did. | [
0.32960519194602966,
0.14116279780864716,
0.14899374544620514,
0.32716304063796997,
-0.1761079728603363,
-0.1478884071111679,
0.5268385410308838,
0.10644225776195526,
-0.23619410395622253,
-0.3726726472377777,
0.00828245934098959,
0.4332297444343567,
-0.25061479210853577,
0.157493561506271... | |
Portfolio A → Fund 1
Portfolio A → Fund 2
Portfolio A → Fund 3
I couldn't frame my sentence without not using is/has. But between 1 & 2,
1) has a:
```
class PortfolioA
{
List<Fund> obj;
}
```
2) is a:
```
class PortfolioA : List<Fund>
{
}
```
which one do you think is better from the point of extensibili... | [
-0.012948868796229362,
-0.3247053921222687,
0.1833060383796692,
-0.17172138392925262,
-0.2250000536441803,
0.013020426034927368,
-0.10703010112047195,
-0.41772332787513733,
-0.06277220696210861,
-0.5912772417068481,
-0.10409115254878998,
0.6289826035499573,
-0.43023326992988586,
-0.1005338... | |
attributes of its own like
> TotalPortfolio etc, does that
> fundamentally not become an "is-a"?
I don't think so. If you say `Portfolio` IS-A `List<Fund>`, what about other properties of the Portfolio? Of course you can add properties to this class, but is it accurate to model those properties as properties of the ... | [
0.41386446356773376,
-0.027278391644358635,
0.14634166657924652,
0.19088342785835266,
-0.0011569190537557006,
-0.1552862673997879,
-0.31893980503082275,
-0.270896852016449,
-0.2661103904247284,
-0.5730493068695068,
0.29899469017982483,
0.9034751653671265,
0.009619544260203838,
0.1493516415... | |
funds are discontinued, and a new set of funds is used to succeed them? Historical information is useful to track, as well as the current fund allocation.
The point is that all these properties are not correctly properties of a List, though they may be properties of the Portfolio. | [
0.3103518486022949,
-0.12612053751945496,
0.3071986138820648,
0.2506605088710785,
0.5004211664199829,
0.03156401589512825,
-0.14678125083446503,
-0.08137034624814987,
-0.5767468810081482,
-0.33320483565330505,
-0.17977893352508545,
0.2557193338871002,
0.05385866388678551,
0.348954617977142... | |
I'm writing some Javascript to resize the large image to fit into the user's browser window. (I don't control the size of the source images unfortunately.)
So something like this would be in the HTML:
```
<img id="photo"
src="a_really_big_file.jpg"
alt="this is some alt text"
title="this is some title ... | [
0.46274393796920776,
0.1761966198682785,
0.7035747170448303,
-0.13195498287677765,
0.05628553032875061,
-0.3839430809020996,
0.14050234854221344,
-0.30589935183525085,
-0.35342907905578613,
-0.6950189471244812,
-0.16451017558574677,
0.6337021589279175,
-0.07709876447916031,
0.0909571126103... | |
return the size of the placeholder (the alt text). In my case this is something like 134 x 20.
Right now I'm just checking if the photo's height is less than 150, and assuming that if so it is just alt text. But this is quite a hack, and it would break if a photo is less than 150 pixels tall (not likely in my particul... | [
0.25927236676216125,
-0.017463691532611847,
0.8585392832756042,
-0.17655692994594574,
0.10758615285158157,
0.036246407777071,
0.17445008456707,
-0.35146579146385193,
-0.1848541498184204,
-0.6739755272865295,
-0.019450712949037552,
0.8920276761054993,
0.08796288073062897,
-0.173349946737289... | |
= $("#photo").height();
$(window).resize(adjust_photo_size);
adjust_photo_size();
function adjust_photo_size()
{
if(REAL_HEIGHT < 150)
{
REAL_WIDTH = $("#photo").width();
REAL_HEIGHT = $("#photo").height();
if(REAL_HEIGHT < 150)
{
//image not loaded.. try again in a qua... | [
0.369732528924942,
-0.2809807062149048,
1.1213710308074951,
-0.3593253791332245,
0.340615838766098,
0.4100019335746765,
0.2284698635339737,
-0.5444342494010925,
-0.3376104533672333,
-0.6804394125938416,
-0.17690888047218323,
0.9013869762420654,
-0.12671500444412231,
0.13451112806797028,
... | |
. . ;
var new_height = . . . ;
$("#photo").width(Math.round(new_width));
$("#photo").height(Math.round(new_height));
}
});
```
---
**Update**: Thanks for the suggestions. There is a risk of the event not being fired if I set a callback for the `$("#photo").load` event, so I have defined an onLoad eve... | [
0.35517406463623047,
-0.0007549903239123523,
0.658545970916748,
-0.16270361840724945,
-0.04421781376004219,
-0.26208388805389404,
0.3226706087589264,
-0.41325119137763977,
-0.3108542859554291,
-0.34324339032173157,
-0.363361656665802,
0.8485493063926697,
-0.23007963597774506,
0.09753484278... | |
in Javascript:
```
//This must be outside $() because it may get called first
var isPhotoLoaded = false;
function photoLoaded()
{
isPhotoLoaded = true;
}
$(function()
{
//Hides scrollbars, so we can resize properly. Set with JS instead of
// CSS so that page doesn't break with JS disabled.
$("body").css("ov... | [
0.3399267792701721,
-0.16035783290863037,
0.9599009156227112,
-0.45480597019195557,
-0.07489726692438126,
0.1992712914943695,
0.41478481888771057,
-0.8261388540267944,
-0.10670515149831772,
-0.7309081554412842,
-0.18902899324893951,
0.7955262064933777,
-0.37209048867225647,
-0.284499824047... | |
return;
}
else if(REAL_WIDTH < 0)
{
//first time in this function since photo loaded
REAL_WIDTH = $("#photo").width();
REAL_HEIGHT = $("#photo").height();
}
var new_width = . . . ;
var new_height = . . . ;
$("#photo").width(Math.round(new_width));
$("#photo").height(M... | [
0.08104264736175537,
-0.18383371829986572,
0.7035441398620605,
-0.35414063930511475,
-0.19080805778503418,
-0.07619007676839828,
0.28614115715026855,
-0.34677237272262573,
-0.2374359667301178,
-0.5893128514289856,
-0.49014681577682495,
0.8653918504714966,
-0.2594108283519745,
0.11066143959... | |
onload='loaded(this.id)'
src="a_really_big_file.jpg"
alt="this is some alt text"
title="this is some title text" />
``` | [
0.39606693387031555,
0.06520191580057144,
0.31056079268455505,
-0.12250630557537079,
0.04902077466249466,
-0.42174920439720154,
0.33670324087142944,
0.2044074684381485,
-0.25865116715431213,
-0.3497373163700104,
-0.42270350456237793,
0.548677921295166,
-0.1337967813014984,
0.09035563468933... | |
I have a gridview like below:
```
<asp:GridView DataKeyNames="TransactionID"
AllowSorting="True" AllowPaging="True"ID="grvBrokerage"
runat="server" AutoGenerateColumns="False"
CssClass="datatable" Width="100%"
<Columns>
<asp:BoundField Da... | [
-0.0291289035230875,
-0.09342364221811295,
0.49753260612487793,
-0.10527610778808594,
0.02960263565182686,
-0.14279942214488983,
-0.02046152390539646,
-0.24919523298740387,
0.06204139441251755,
-1.0228238105773926,
0.12623336911201477,
0.3362281620502472,
-0.1568089723587036,
0.10726630687... | |
HeaderText="Account Name"/>
<asp:BoundField DataField="TransactionAmount"
HeaderText="Transaction Amount" | [
-0.23981261253356934,
-0.2131287306547165,
0.18913251161575317,
-0.17525099217891693,
0.018287379294633865,
-0.1151449978351593,
-0.2968657612800598,
-0.016944384202361107,
-0.2834950387477875,
-0.3975004553794861,
-0.23375752568244934,
0.44069087505340576,
-0.0283182542771101,
0.021687101... | |
SortExpression="TransactionAmount" />
<asp:BoundField DataField="TransType"
HeaderText="Transaction Type" | [
-0.5078168511390686,
-0.39410150051116943,
0.3077763319015503,
-0.19387583434581757,
0.13864003121852875,
0.01601467654109001,
-0.09882674366235733,
-0.14187702536582947,
-0.36196014285087585,
-0.8219560384750366,
-0.32376328110694885,
0.205039843916893,
-0.47718486189842224,
0.07213421911... | |
SortExpression="TransType"/>
<asp:BoundField DataField="AccountBalance"
HeaderText="Account Balance"/> | [
-0.2210129052400589,
-0.35409799218177795,
0.18362212181091309,
-0.20660656690597534,
0.045837026089429855,
0.16861532628536224,
0.009461363777518272,
-0.14798857271671295,
-0.24254989624023438,
-0.6562763452529907,
-0.21033425629138947,
0.06660615652799606,
-0.3733353018760681,
-0.0785361... | |
<asp:BoundField DataField="CreateDt"
HeaderText="Transaction Date" />
</Columns>
</asp:GridView>
```
I have a page with a gridview and a objectdatasource control. AllowPaging and AllowSorting is enabled. Here is the method I use that gets the data and binds the obje... | [
0.09723556786775589,
-0.1302032321691513,
0.46879640221595764,
-0.06666667014360428,
0.06563695520162582,
-0.03967796266078949,
-0.037074580788612366,
0.005914852488785982,
-0.1461254507303238,
-0.7332163453102112,
-0.22260737419128418,
0.4000541567802429,
-0.2586100697517395,
-0.013712284... | |
BindBrokerageDetails()
{
HomePage master = (HomePage)Page.Master;
BrokerageAccount brokerageAccount = new BrokerageAccount();
brokerageAccount.UserID = new Guid(Membership.GetUser().ProviderUserKey.ToString());
ddlBrokerageDetails.DataSource = brokerageAccount.... | [
-0.270579993724823,
-0.06725036352872849,
0.7265580296516418,
-0.040835849940776825,
-0.20171178877353668,
0.01954362913966179,
0.5830150842666626,
-0.5546164512634277,
-0.19495727121829987,
-0.7240158915519714,
-0.30535197257995605,
0.41292887926101685,
-0.17104658484458923,
0.43349826335... | |
ddlBrokerageDetails.DataBind();
if (ddlBrokerageDetails.Items.Count > 0)
{
BrokerageTransactions brokerageaccountdetails = new | [
0.0005470823380164802,
-0.2847561240196228,
0.6126986742019653,
-0.05186629667878151,
0.1303226798772812,
0.02177811600267887,
0.5361356139183044,
-0.4247719943523407,
-0.26446107029914856,
-0.6960040926933289,
-0.18839411437511444,
0.5312147736549377,
-0.03391201049089432,
0.5497576594352... | |
BrokerageTransactions();
DataSet ds = BrokerageAccount.GetBrkID2(
new Guid(Membership | [
-0.0019472244894132018,
-0.1705285608768463,
0.5757489800453186,
0.09693664312362671,
-0.1032901257276535,
-0.16739486157894135,
0.263053834438324,
-0.226383239030838,
-0.2103138566017151,
-0.7621158361434937,
-0.14641988277435303,
0.373878538608551,
-0.2559721767902374,
0.4544074237346649... | |
.GetUser()
.ProviderUserKey | [
0.01830720156431198,
-0.17603734135627747,
0.28879863023757935,
-0.1517423838376999,
-0.144856795668602,
0.23380200564861298,
0.2720925509929657,
0.3848353624343872,
-0.01007867231965065,
-0.9086059331893921,
-0.47130170464515686,
0.3450680077075958,
-0.5339074730873108,
0.4854764640331268... | |
.ToString()),
ddlBrokerageDetails
.SelectedItem | [
-0.28188592195510864,
0.17987962067127228,
0.045015305280685425,
0.019022824242711067,
-0.22179456055164337,
0.2587389349937439,
0.3237287700176239,
-0.33387652039527893,
-0.04679412022233009,
-0.28124287724494934,
-0.18344025313854218,
0.2147480696439743,
0.15678535401821136,
0.2578943073... | |
.Text
.ToString());
foreach (DataRow dr in ds.Tables[0].Rows) | [
-0.6947036385536194,
0.0246981680393219,
0.6457169651985168,
-0.04024715721607208,
0.170779749751091,
0.13597624003887177,
0.2576811909675598,
-0.11078542470932007,
-0.26139113306999207,
-0.6003216505050659,
-0.6749942302703857,
0.4571877717971802,
-0.27636176347732544,
0.18303635716438293... | |
{
brokerageaccountdetails.BrokerageId = new Guid(dr["BrkrgId"].ToString());
}
ddlBrokerageDetails.SelectedItem.Value = brokerageaccountdetails.BrokerageId.ToString();
grvBrokerage.DataSource = ObjectDataSource1;
grvBrokerage.DataBind(); | [
-0.26277387142181396,
-0.3333719074726105,
0.5479497909545898,
0.10845959931612015,
-0.0561034232378006,
0.1251939982175827,
0.24581626057624817,
-0.43071138858795166,
-0.18262968957424164,
-0.506040632724762,
-0.2305687963962555,
0.4744652509689331,
-0.13564060628414154,
0.446035236120224... | |
}
}
```
I have a sorting event, but when I check the grvBrokerage.DataSource, it is null. I am curious as to why? Here is the code for that?
```
protected void grvBrokerage_Sorting(object sender, GridViewSortEventArgs e)
{
DataTable dt = grvBrokerage.DataSource as D... | [
-0.3570805490016937,
-0.1049351915717125,
0.16961796581745148,
-0.33522912859916687,
0.1802925020456314,
-0.15968665480613708,
0.09170059114694595,
0.22958935797214508,
-0.27413496375083923,
-0.5336604118347168,
-0.351408988237381,
0.3802858889102936,
-0.49965277314186096,
0.34233808517456... | |
if (dt != null)
{
DataView dv = new DataView(dt);
dv.Sort = e.SortExpression + " " + e.SortDirection;
grvBrokerage.DataSource = dv; | [
-0.1237059012055397,
-0.5959721207618713,
0.6442843079566956,
-0.2517108619213104,
-0.11515004187822342,
0.17016997933387756,
0.25731196999549866,
-0.4255940318107605,
-0.0994228720664978,
-0.530590832233429,
-0.6930822730064392,
0.48597344756126404,
-0.15252910554409027,
0.032592888921499... | |
grvBrokerage.DataBind();
}
}
```
Here is the ObjectDataSource declaration:
```
<asp:ObjectDataSource ID="ObjectDataSource1"
runat="server"
SelectMethod="GetAllWithId" | [
-0.2899020314216614,
-0.32968518137931824,
0.5143370628356934,
-0.2111842781305313,
-0.043215349316596985,
-0.22614715993404388,
0.2359786480665207,
-0.15862080454826355,
-0.2631849944591522,
-0.37962475419044495,
-0.36209091544151306,
0.47489407658576965,
-0.32159721851348877,
-0.01792311... | |
TypeName="BrokerageTransactions">
<SelectParameters>
<asp:ControlParameter
ControlID="ddlBrokerageDetails" | [
-0.39847275614738464,
-0.33180081844329834,
0.177324578166008,
0.17872758209705353,
-0.07079028338193893,
0.13927991688251495,
0.13118425011634827,
-0.11086059361696243,
0.02934497594833374,
-0.7037630677223206,
-0.0002387674176134169,
0.3184514045715332,
-0.24418988823890686,
0.2993434369... | |
Name="brokid"
PropertyName="SelectedValue"
Type="Object" /> | [
-0.13816730678081512,
-0.09079866856336594,
-0.15818876028060913,
-0.06644269824028015,
-0.03505052626132965,
-0.36036330461502075,
0.21787504851818085,
-0.013609730638563633,
0.13144634664058685,
-0.41686367988586426,
-0.41398710012435913,
0.41392865777015686,
0.12024953961372375,
0.42456... | |
</SelectParameters>
</asp:ObjectDataSource>
```
Thanks,
X
When you are using an ObjectDataSource (or any other \*DataSource), you set the DataSourceID for your GridView, not the DataSource. The DataSourceID should be whatever the ID of your ObjectDataSource is. If you provide the declaration of your ObjectDataSource,... | [
-0.001535654766485095,
-0.17860108613967896,
0.3561774790287018,
0.17687155306339264,
-0.07980107516050339,
-0.07953820377588272,
0.04657457768917084,
0.190576434135437,
-0.3416942059993744,
-0.8503232002258301,
-0.006952207535505295,
0.3909216523170471,
-0.38385945558547974,
0.08220504224... | |
set. The old GridView instance (and the data table you bound to) have been thrown away. | [
0.4342343211174011,
-0.25209057331085205,
0.323783814907074,
0.23822389543056488,
0.14784665405750275,
-0.4013025164604187,
-0.235709547996521,
-0.29410213232040405,
-0.16221924126148224,
-0.81634521484375,
-0.03504358232021332,
0.5325421690940857,
-0.2623176872730255,
0.2846956253051758,
... | |
We just switched from TFS to SVN, and so far we're loving it.
However, it did introduce a few new issues.
One is the way project files (.vbproj specifically) are handled. The .vbproj file is of course always changing as files and references are changed, and if a few people are collaberating there will be conflicts. ... | [
0.5178980231285095,
-0.18659436702728271,
0.38285306096076965,
-0.009591365233063698,
-0.22678643465042114,
-0.3725808560848236,
-0.11892276257276535,
0.13633108139038086,
-0.3724861145019531,
-0.8492568731307983,
-0.10759706795215607,
0.4752652943134308,
-0.19937218725681305,
0.1178367510... | |
way, we're using VisualSVN.
In SVN the main problems with \*proj files is when people move files around to different folders, and/or when they add and remove similarly named files simultaneously, usually at the start of the project.
Once filenames and project structure become more stable this won't happen as much anym... | [
0.21855150163173676,
-0.11076617985963821,
0.2529941201210022,
0.0037395337130874395,
0.026507675647735596,
-0.24604107439517975,
0.48197048902511597,
0.42410802841186523,
-0.41286060214042664,
-0.8001843690872192,
-0.06523642688989639,
0.38890528678894043,
-0.3266027569770813,
0.191661074... | |
Currently I have an application that receives an uploaded file from my web application. I now need to transfer that file to a file server which happens to be located on the same network (however this might not always be the case).
I was attempting to use the webclient class in C# .NET.
```
string filePath = "C:\\... | [
-0.09281662851572037,
-0.16827994585037231,
0.7413010001182556,
0.07811494171619415,
0.28502508997917175,
-0.2918083667755127,
0.03558391332626343,
0.16354794800281525,
-0.405315637588501,
-0.9399088025093079,
-0.2251157909631729,
0.43365198373794556,
-0.17897872626781464,
0.60234838724136... | |
addy = new Uri("\\\\192.168.1.28\\Files\\test.flv");
client.Credentials = nc;
byte[] arrReturn = client.UploadFile(addy, filePath);
Console.WriteLine(arrReturn.ToString());
}
catch (Exception ex)
{
Console.WriteLine(ex.Message);
}
```
The machine located at 192.168.1.28... | [
-0.01989007368683815,
0.280416339635849,
0.8971050977706909,
-0.16631942987442017,
0.14137469232082367,
0.09786583483219147,
0.4232080578804016,
-0.1409931629896164,
-0.13083381950855255,
-0.8695727586746216,
-0.0632655993103981,
0.30181020498275757,
-0.46576857566833496,
0.581709682941436... | |
successfully. I can also login using remote desktop, so I know the user account works.
Any ideas on this error?
Is it possible to transfer a file directly like that? With the webclient class or maybe some other class?
Just use
```
File.Copy(filepath, "\\\\192.168.1.28\\Files");
```
A windows fileshare exposed via ... | [
0.4030451476573944,
0.20067676901817322,
0.29080983996391296,
0.10869363695383072,
0.32256850600242615,
-0.29037582874298096,
0.5172725319862366,
-0.13407796621322632,
-0.42514872550964355,
-0.6543828248977661,
-0.20009788870811462,
0.666736900806427,
-0.08082041889429092,
0.06423176825046... | |
IP address instead of the server name (windows trust settings prevent leaving the domain - by using IP you are hiding any domain details). **If at all possible, use the server name!**
If this is not on the same windows domain, and you are trying to use a different domain account, you will need to specify the username ... | [
0.388308048248291,
-0.0029801568016409874,
0.2901643216609955,
0.29112985730171204,
0.016644656658172607,
-0.1817135512828827,
0.17605407536029816,
0.1111091747879982,
-0.29489392042160034,
-0.9408987760543823,
-0.12077642232179642,
0.27390211820602417,
-0.3120034635066986,
0.3682794570922... | |
I'm working with a VB6 code base and I'm interested in beginning to generate documentation for future development efforts. I'm traditionally a Java developer and I've gotten quite used to the Javadoc system for generating such documentation. I found [VB.DOC](http://vb-doc.sourceforge.net/) but from what I can see it's ... | [
0.8004690408706665,
0.17137695848941803,
-0.05295389145612717,
-0.2757461369037628,
-0.17876894772052765,
-0.3299371302127838,
0.12804244458675385,
0.1092892438173294,
-0.21050961315631866,
-0.5167075991630554,
-0.07000551372766495,
0.5180085897445679,
-0.3025386929512024,
-0.0369154363870... | |
Does anyone know how to databind the .Source property of the WebBrowser in WPF ( 3.5SP1 )?
I have a listview that I want to have a small WebBrowser on the left, and content on the right, and to databind the source of each WebBrowser with the URI in each object bound to the list item.
This is what I have as a proof of ... | [
0.32634949684143066,
0.04091615974903107,
0.794769823551178,
0.08754651993513107,
0.08778734505176544,
-0.3345053791999817,
-0.048052772879600525,
-0.1707368642091751,
-0.21928654611110687,
-0.7094459533691406,
0.27403953671455383,
0.6493306159973145,
0.03489535301923752,
0.126947894692420... | |
<!--Web Control Here-->
<WebBrowser Source="{Binding Path=WebAddress}"
ScrollViewer.HorizontalScrollBarVisibility="Disabled"
ScrollViewer.VerticalScrollBarVisibility="Disabled"
Width="300"
Height="200"
/>
<StackPanel Orientation="Vertical"> | [
-0.12803927063941956,
-0.32210251688957214,
0.9455350041389465,
0.1329696625471115,
-0.142290860414505,
0.03206257149577141,
0.1872599869966507,
-0.46181896328926086,
-0.34075266122817993,
-0.4887033998966217,
0.036559782922267914,
0.5007312297821045,
0.03152427449822426,
0.009817035868763... | |
<StackPanel Orientation="Horizontal">
<Label Content="{Binding Path=CompanyName}" FontWeight="Bold" Foreground="Blue" />
<TextBox Text="{Binding Path=DisplayName}" FontWeight="Bold" />
</StackPanel>
<TextBox Text="{Binding Path=Street[0]}" />
<TextBox ... | [
-0.3784310519695282,
-0.030661290511488914,
0.5572485327720642,
-0.15960565209388733,
-0.04445714130997658,
0.3220973312854767,
-0.026448318734765053,
-0.5733604431152344,
-0.40751591324806213,
-0.3388027250766754,
-0.08377335965633392,
0.14640529453754425,
-0.005935564171522856,
-0.167455... | |
<TextBox Text="{Binding Path=FaxNumber}"/>
<TextBox Text="{Binding Path=Email}"/>
<TextBox Text="{Binding Path=WebAddress}"/>
</StackPanel>
</StackPanel>
</DataTemplate>
```
The problem is that [`WebBrowser.Source`](https://learn.microsoft.com/en-us/dotnet/api/system.windows.control... | [
-0.07214262336492538,
-0.27748817205429077,
0.8176005482673645,
-0.05491543933749199,
0.0836264118552208,
-0.2533566951751709,
0.25306957960128784,
-0.45937439799308777,
0.15398286283016205,
-0.6180410385131836,
-0.22915440797805786,
0.6156290173530579,
-0.41976967453956604,
0.168773606419... | |
public static string GetBindableSource(DependencyObject obj)
{
return (string) obj.GetValue(BindableSourceProperty);
}
public static void SetBindableSource(DependencyObject obj, string value)
{
obj.SetValue(BindableSourceProperty, value);
}
public static void BindableSourceProp... | [
0.013085445389151573,
-0.20673786103725433,
0.7045599222183228,
-0.17844745516777039,
0.1778833270072937,
0.1538364291191101,
0.46582674980163574,
0.054433953016996384,
-0.045866597443819046,
-0.7620394229888916,
-0.5814586877822876,
0.5290936827659607,
-0.6489925980567932,
0.2107273340225... | |
string uri = e.NewValue as string;
browser.Source = !String.IsNullOrEmpty(uri) ? new Uri(uri) : null;
}
}
}
```
Then in your xaml do:
```
<WebBrowser ns:WebBrowserUtility.BindableSource="{Binding WebAddress}"/>
``` | [
-0.16466622054576874,
0.0966210886836052,
0.8649091720581055,
-0.23003293573856354,
0.16306109726428986,
-0.2696918547153473,
0.3296164870262146,
-0.11318061500787735,
-0.13178841769695282,
-0.8120501041412354,
-0.29123467206954956,
0.5003218054771423,
-0.39844873547554016,
0.4429384171962... | |
I'm currently working on a project that hooks into various system calls and writes things to a log, depending on which one was called. So, for example, when I change the permissions of a file, I write a little entry to a log file that tracks the old permission and new permission. However, I'm having some trouble pinnin... | [
0.39993759989738464,
0.06520894914865494,
0.1142047569155693,
0.21423515677452087,
0.31688392162323,
-0.2633608281612396,
0.055225253105163574,
0.0037777062971144915,
-0.35502734780311584,
-0.5891270637512207,
-0.08949095755815506,
0.6062723994255066,
-0.2984221279621124,
-0.01302814204245... | |
what is the point of all these (seemingly) redundant system calls, and is there any rule on which ones are used for what? (i.e. are the "at" syscalls or ones prefixed with "f" meant to do something specific?)
Yes, there are some naming rules.
* chmod takes a filename, while fchmod takes a file descriptor. Same for sta... | [
0.10210049152374268,
-0.12177734822034836,
0.26763269305229187,
-0.04803412780165672,
-0.19757328927516937,
0.05441386625170708,
0.15937429666519165,
-0.37388285994529724,
-0.11330074071884155,
-0.5264374017715454,
-0.5179380774497986,
0.37257879972457886,
-0.4556671380996704,
0.2966704368... | |
In the following table structure:
```
Fruits
(
fruit_id,
fruitName
)
Vegetables
(
vegetable_id,
vegetableName
)
favoriteFoods
(
food_id,
foodName,
type_id (References either a fruit or a vegetable)
)
```
I realize that I could forgo using a foreign key constraint on the favoriteFoo... | [
0.015825262293219566,
0.40290260314941406,
0.05205601826310158,
-0.00503392331302166,
0.001782142324373126,
0.3187781572341919,
-0.4108048975467682,
0.32235124707221985,
-0.37542489171028137,
-0.8045361042022705,
-0.1762571632862091,
0.34532174468040466,
-0.1352546513080597,
0.044965039938... | |
Instead of having a separate Fruits and Vegetables table, why not have a table of Foods. Then have a foreign key constraint on fkfood\_id to food\_id. Then if for some reason you ever have to add meat, it would be much easier to maintain the application that uses this.
```
Food
(
food_id,
foodName,
foo... | [
0.16103065013885498,
0.3359947204589844,
0.10963591188192368,
0.09785598516464233,
0.03207050636410713,
0.3957024812698364,
-0.1754123717546463,
0.017953645437955856,
-0.6141030788421631,
-0.6030898094177246,
0.10358370095491409,
0.04786098375916481,
-0.34825313091278076,
0.217685088515281... | |
I'm writing an implementation of a virtual machine in C#, and I need to implement the VM's stack, which can contain two types of entry - return entries or backtrack entries. What is the best way of implementing this?
I'm currently using a base type, as follows:
```
class StackEntry { }
class Return : StackEntry { uin... | [
0.0679963082075119,
0.22459369897842407,
0.5101764798164368,
-0.08074844628572464,
0.09040097147226334,
0.03168235719203949,
0.04630010575056076,
-0.17155124247074127,
-0.10252384096384048,
-0.6609548926353455,
0.1142430379986763,
0.5119252800941467,
-0.11604833602905273,
0.235393106937408... | |
basic answer is that you use a single type with a default operation for post-pop processing
```
StackEntry { protected virtual void PostPop(); }
Return : StackEntry { protected override void PostPop(); }
Backtrack : StackEntry { protected override void PostPop(); }
```
Does that make sense? | [
-0.0830419734120369,
-0.11034472286701202,
0.39549490809440613,
0.11185935139656067,
0.2377578467130661,
0.03377680853009224,
0.09788292646408081,
-0.04277161508798599,
-0.15095630288124084,
-0.09691058099269867,
-0.5031662583351135,
0.31234991550445557,
-0.49462443590164185,
0.07148979604... | |
A Java version of this question was just answered, and, well, I don't know how to do this in .net.
So how do you calculate the display width of a string in C# / .net?
You've got the same problem in this question as was present in the Java question - not enough information! It will differ between WinForms and WPF.
Fo... | [
0.3351246416568756,
-0.16660118103027344,
0.40052923560142517,
0.04044557735323906,
-0.3607242703437805,
0.029451942071318626,
0.19935227930545807,
-0.21954403817653656,
-0.3871552050113678,
-0.8316177725791931,
0.22424545884132385,
0.37911292910575867,
-0.15165244042873383,
-0.23136387765... | |
Is there any Ruby equivalent for Python's builtin `zip` function? If not, what is a concise way of doing the same thing?
A bit of context: this came up when I was trying to find a clean way of doing a check involving two arrays. If I had `zip`, I could have written something like:
```
zip(a, b).all? {|pair| pair[0] =... | [
0.32558587193489075,
0.029747139662504196,
-0.21268248558044434,
-0.2534557580947876,
-0.3522995412349701,
-0.16033092141151428,
0.3840058743953705,
-0.3817581236362457,
-0.3206714987754822,
-0.2807733416557312,
-0.08179327100515366,
0.3230961561203003,
-0.8492099642753601,
-0.154247939586... | |
}
``` | [
0.3354566991329193,
0.5660994052886963,
-0.045124202966690063,
0.08949362486600876,
0.36271432042121887,
-0.03456072509288788,
0.2035233974456787,
0.4996976852416992,
0.20306141674518585,
-0.48415371775627136,
-0.1802433431148529,
0.4521971344947815,
-0.138974130153656,
0.3154967725276947,... | |
I've inherited a ASP/VB6 code base (not my forte... yet) and I'm trying tease it apart to figure out the cause on an error message I'm receiving when running the app.
I've traced it back through an event that is being raised in on of my classes. Is there away in windows I can search the bulk of the code base for where... | [
0.632415771484375,
0.39007052779197693,
0.024502836167812347,
0.14392441511154175,
0.04508250579237938,
-0.09855939447879791,
0.06376839429140091,
0.5127792954444885,
-0.21660619974136353,
-0.5015854835510254,
0.13190436363220215,
0.2534158527851105,
0.07064254581928253,
0.4451557099819183... | |
in the IDE to do it... right?
If you have any new version of VS (2003,5,8) installed, just use the "Find in Files" feature and point it at the VB6 folders.
Other than that, most "notepad" replacements (textpad, notepad+) offer a "Find in Files" as well. | [
0.27028071880340576,
-0.3093535602092743,
0.521438717842102,
0.17970538139343262,
0.18895559012889862,
-0.42118293046951294,
-0.00997991394251585,
-0.021429067477583885,
-0.3159003257751465,
-0.744399905204773,
-0.07052426040172577,
0.6538847088813782,
-0.06485021114349365,
-0.159398704767... | |
1. Is there a way to do this with SQL Server tools?
2. If not, is there a 3rd party tool that does this?
There doesn't seem to be a good way to edit longer text columns in the SQL Server Managers for SQL Server 2000 or 2005. While SQL Server Manager is really not for editing data in your db, what other tool does Micro... | [
0.10531914234161377,
0.027512846514582634,
0.051739148795604706,
0.3041437566280365,
-0.1834319531917572,
-0.2048615664243698,
0.01306952629238367,
-0.0012457453412935138,
-0.3960774838924408,
-0.23125778138637543,
0.5146100521087646,
0.6216338872909546,
-0.5596770644187927,
-0.10036592185... | |
edit your text in.
[alt text http://techinterview.org/edit.png](http://techinterview.org/edit.png)
Generally, SQL Management Studio is an administrative tool for your database and not meant for data entry other than a quick edit here or there. Generally you would script the data or it would be entered by an applicatio... | [
0.6012631058692932,
0.03743375837802887,
0.020067911595106125,
0.2976495027542114,
-0.06705646216869354,
-0.41056421399116516,
0.15398307144641876,
0.2328105866909027,
-0.28668466210365295,
-0.7151439189910889,
-0.022973304614424706,
0.6560039520263672,
-0.08230216056108475,
0.140847891569... | |
On my Mac OS X 10.5 (Leopard) machine, I have installed Git 1.6.0.2 using the [git-OSX-Installer](http://code.google.com/p/git-osx-installer/) from Google Code. The installer installs Git to /usr/local/Git.
I would now like to keep up with the latest stable Git release (Master branch), currently 1.6.0.3.
Can I run "g... | [
0.3913184106349945,
0.3122776448726654,
0.6158146262168884,
-0.13553620874881744,
0.11053428798913956,
-0.057711679488420486,
0.34901049733161926,
0.12723234295845032,
-0.06837672740221024,
-0.9103173017501831,
-0.28006690740585327,
0.8224925398826599,
-0.39875420928001404,
-0.010576141066... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.