text stringlengths 0 30.5k | title stringclasses 1
value | embeddings listlengths 768 768 |
|---|---|---|
Without arguing the relative merits of storing a datetime this way...
If you had a column where you stored AM or PM what would you call that column?
**EDIT:**
I should have figured that there'd be a group of you who couldn't resist being snarky about the idea... Nowhere do you see that I'm about to do this, that I w... | [
0.7505584955215454,
0.0110830282792449,
0.1780940592288971,
0.14456768333911896,
0.10211961716413498,
-0.03437661752104759,
-0.08679687231779099,
0.10164257138967514,
-0.21280817687511444,
-0.31342753767967224,
0.02166263572871685,
0.41809073090553284,
-0.038930345326662064,
-0.20529516041... | |
worth and offer something useful.
I'm also very pleased that so many aren't deserving of this slur and brought forth some great ideas. Thanks for the thoughts.
Most groups of values have names, the values from 1-24 are known as hours, from 1-12 Months, etc. But for AM/PM what's the name for group, for the collection,... | [
0.6697670221328735,
0.09207939356565475,
0.2209414690732956,
0.288828045129776,
-0.12804724276065826,
0.34365060925483704,
0.007718268781900406,
-0.05583848059177399,
-0.2770659327507019,
-0.42775148153305054,
0.19296766817569733,
0.20154881477355957,
0.6352463364601135,
0.3870527744293213... | |
meridiemoffset and store 0 or 12 in it. Easy to convert to AM or PM as necessary, but the main feature is that you can easily calculate the real hour by addition, even inside the SQL statement (which makes sorting easier and more obvious).
-Adam | [
0.2475414127111435,
-0.00006860774738015607,
0.3367021977901459,
0.014406897127628326,
0.14649508893489838,
0.1747109442949295,
0.1887136697769165,
-0.26667022705078125,
0.0017191044753417373,
-0.6397640109062195,
0.05368558689951897,
0.4580669105052948,
0.17021068930625916,
-0.07357931882... | |
My PHPEd suddenly stopped showing arguments and arg order in the hints, and now just shows a basic description of the function.
Before I go digging around in the config files, has anyone else had this problem?
Thanks!
**Edit:**
Sorry, I may not have been entirely clear on this. There is no problem with my own class... | [
0.2543804943561554,
0.1648198664188385,
0.1548561304807663,
-0.18121816217899323,
-0.46457356214523315,
0.0021551004610955715,
0.2974420487880707,
0.2695985734462738,
-0.2615492343902588,
-0.46354031562805176,
0.20630016922950745,
0.1684274971485138,
-0.34217414259910583,
0.121943876147270... | |
$needle [, int $offset=0 ] )
```
with the first argument bold. If I type it, and then a comma, it bolds the second arg, and so on. This is really nice, since PHP functions are a bit scrambled as far as argument order, and I don't have to look them up every time.
How it works now:
I type a php function, say strpos... | [
0.1924477219581604,
0.1597667783498764,
0.6695648431777954,
-0.244203120470047,
-0.26241376996040344,
0.2933619022369385,
0.13857685029506683,
-0.05162020027637482,
-0.23764340579509735,
-0.33376508951187134,
0.3492857813835144,
0.35978975892066956,
-0.2532431483268738,
-0.0025004225317388... | |
string."
There are no arguments shown, which makes the little box basically worthless - I know what strpos does, I just want a reminder of the argument order.
I think this may be a problem with the included PHPDoc, which I never use, but may be the source of the data for the hint box.
I did recently upgrade to 5.6, ... | [
0.10789283365011215,
-0.052748844027519226,
0.5147584676742554,
-0.07464456558227539,
-0.06392952054738998,
-0.28872910141944885,
0.426031231880188,
0.11185086518526077,
-0.2019893229007721,
-0.26741838455200195,
-0.049418773502111435,
0.6009352803230286,
-0.5458894968032837,
0.13005073368... | |
the schema or the database itself, which do grant permissions against the tables as well. This will give you those situations, too. You can use a WHERE clause against permission\_name to restrict to just DELETE.
```
SELECT
class_desc
, CASE WHEN class = 0 THEN DB_NAME()
WHEN class = 1 THEN OBJECT_NAME... | [
-0.06598710268735886,
-0.008430279791355133,
0.29833415150642395,
0.14874719083309174,
0.03707335144281387,
-0.3979451060295105,
0.24753829836845398,
-0.3033873438835144,
-0.24369795620441437,
-0.5555707812309265,
-0.44971102476119995,
0.43310368061065674,
-0.29064854979515076,
0.513851344... | |
it gives implicit INSERT, UPDATE, and DELETE rights, meaning you won't see it show up in the permission DMVs or their derivatives. | [
0.02008065953850746,
-0.02214181236922741,
0.4387942850589752,
0.15664146840572357,
0.41214659810066223,
-0.4232313334941864,
0.05637126788496971,
0.04238632693886757,
-0.04326409101486206,
-0.1709907501935959,
-0.39795568585395813,
0.32257312536239624,
-0.10594886541366577,
-0.02032760344... | |
What I'm trying to do is create a PowerShell script which gets a list of folders in a directory which is filtered by a regular expression screening out folder names with nnnnnnx31 or nnnnnnddd where n = alpha chars for the first 6 characters and the last 3 is either numbers of the static string x31. Next it screens if ... | [
0.011450217105448246,
0.05737423151731491,
0.4125666916370392,
-0.1287541538476944,
0.30569538474082947,
0.2806982696056366,
0.24162203073501587,
0.038649290800094604,
-0.04629859700798988,
-0.6757740378379822,
0.020960886031389236,
0.41034889221191406,
-0.22557665407657623,
0.264973104000... | |
side of the -lt operator
At line: 1 char: 96
+ get-childitem | where {$_.name -match "^\d{6}([a-zA-Z]{3}|x31)$"} | where {$_.lastwritetime -lt <<<< get-date.adddays(-90)}
```
I also tried the following and it didn't work:
```
get-childitem | where {$_.name -match "^\d{6}([a-zA-Z]{3}|x31)$"} | where {$_.lastwritetim... | [
-0.25209471583366394,
-0.03624463453888893,
0.781160295009613,
-0.44035956263542175,
0.4512632489204407,
0.18242935836315155,
0.1408587247133255,
-0.1927923709154129,
0.18421640992164612,
-0.4918232262134552,
-0.07706527411937714,
0.7213904857635498,
-0.19159425795078278,
-0.00104274053592... | |
Does anyone have a process or approach to use for determining how to resove a many-to-many relationship in a relational database? Here is my scenario. I have a group of contacts and a group of phone numbers. Each contact can be associated with multiple phone numbers and each phone number can be associated with multiple... | [
0.22369076311588287,
0.15281237661838531,
0.42161425948143005,
0.28950297832489014,
0.17377205193042755,
0.15462984144687653,
-0.18491201102733612,
-0.09815789014101028,
-0.3364531099796295,
-0.3865644037723541,
-0.012667302042245865,
0.5157565474510193,
-0.10934597253799438,
-0.0119586260... | |
by calling the main line, v2, and asking for the CEO. e2 is just an employee and can only be reached by calling v2.
So, e1 should be related to v1 & v2. e2 should be related to v2. Conversly, v1 should be related to e1 and v2 should be related to e1 & e2.
The goal here is to ge able to run queries like "what numbers ... | [
-0.10744146257638931,
-0.2451629489660263,
0.8265032768249512,
0.2357698231935501,
0.05971427261829376,
0.016253633424639702,
-0.07824672758579254,
-0.06265318393707275,
-0.1495564579963684,
-0.5397353768348694,
-0.16872291266918182,
0.635039746761322,
-0.17648102343082428,
0.0937541499733... | |
exact architecture.
Employees:
```
eID, eName
1, e1
2, e2
```
PhoneNumbers:
```
pID, pNumber
1, v1
2, v2
```
EmployeePhones:
```
eID, pID
1, 1
1, 2
2, 2
```
then you inner join. if you need to find out what number(s) e1 can be reached at (t-sql):
```
SELECT E.eName, P.pNumber
FROM dbo.Employees E
INNER JO... | [
-0.08029332011938095,
-0.00842614471912384,
0.509854793548584,
0.1463450938463211,
0.17139333486557007,
0.2774883210659027,
0.21225084364414215,
-0.3977881669998169,
0.17821680009365082,
-0.9444668889045715,
-0.2949185371398926,
0.6998189687728882,
-0.026581566780805588,
-0.072832591831684... | |
Can anyone explain why this code gives the error:
```
error C2039: 'RT' : is not a member of 'ConcreteTable'
```
(at least when compiled with VS2008 SP1)
```
class Record
{
};
template <class T>
class Table
{
public:
typedef typename T::RT Zot; // << error occurs here
};
class ConcreteTable : public Table<Co... | [
0.11943478882312775,
0.17284736037254333,
0.0388956181704998,
-0.08836186677217484,
-0.023530686274170876,
0.05602485314011574,
0.4741213917732239,
-0.36157727241516113,
-0.1702369749546051,
-0.3626392185688019,
0.11812130361795425,
0.7868343591690063,
-0.405120849609375,
0.084509439766407... | |
add new extensions using this mechanism.
A separate 'type traits' style class actually fits into the solution best. Especially as I could even wrap it in a C style macro if the style police aren't looking!
That's because the class ConcreteTable is not yet instantiated when instantiating Table, so the compiler doesn't ... | [
0.10703349113464355,
-0.03589585795998573,
0.394909530878067,
0.07177609205245972,
-0.12517499923706055,
0.024136094376444817,
0.3384658098220825,
-0.2674236297607422,
-0.31600695848464966,
-0.5593878626823425,
0.03597564995288849,
0.7652730345726013,
-0.2660868465900421,
-0.10403034090995... | |
a const bool which is false iff it is true).
Fixing
------
With typedefs, I think you cannot hope for more than passing RT as additional template parameter, like this
```
template <class T, class RT>
class Table
{
public:
typedef typename RT Zot;
};
class ConcreteTable : public Table<ConcreteTable, Record>
{
pu... | [
-0.024581294506788254,
0.20956800878047943,
0.27029865980148315,
-0.12123898416757584,
-0.024513108655810356,
0.22836287319660187,
0.3339994549751282,
-0.5674938559532166,
-0.006940483581274748,
-0.7086492776870728,
-0.0990658849477768,
0.7983040809631348,
-0.4338626563549042,
0.0740098878... | |
<class T>
struct TableTraits<Table<T> > {
typedef typename T::RT Zot;
};
```
If you only want the type be argument/return type of a method, you can do it by templatizing this method, eg.
```
void f(typename T::RT*); // this won't work
template <class U>
void f(U*); // this will
```
The point of all these manipu... | [
0.01162863988429308,
0.05550764501094818,
0.6243236064910889,
-0.04374009370803833,
0.18677255511283875,
0.3158363699913025,
0.33089032769203186,
-0.08576181530952454,
-0.04636835679411888,
-0.8123130798339844,
0.0006682869861833751,
0.6523663997650146,
-0.19727067649364471,
0.012386009097... | |
I have decided that I really need to get some flowcharts for reverse engineering some code I have inherited. I do not have the Team edition of VS so I cannot use Team's built-in capabilities with Visio. So I thought I would parse the .ncb (Parser Information) files and make charts with dot (from graphviz.org). How hard... | [
0.3268935978412628,
0.06470233201980591,
0.450196772813797,
0.13692551851272583,
-0.0650051087141037,
-0.2664740979671478,
0.5248583555221558,
0.1289181113243103,
-0.20013093948364258,
-0.8365989923477173,
0.23587948083877563,
0.4736000895500183,
-0.37398913502693176,
-0.16685086488723755,... | |
I am using C and C++.
I did try the Microsoft "Visual Studio Learning Pack" which has the "Visual Programming Flow Chart" tool. But it doesn't appear to work with C++. So close!
So, does anybody have pointers to the file format or other suggestions (keep it polite!)?
I don't think you have much chance to be able to p... | [
0.6001721620559692,
0.11327263712882996,
0.18253763020038605,
-0.01757212169468403,
-0.1874041110277176,
-0.558960497379303,
0.06575311720371246,
0.11904813349246979,
-0.38553786277770996,
-0.6560812592506409,
0.0995168462395668,
0.5842825174331665,
-0.10356532782316208,
0.0840879604220390... | |
intellisense information is going to be kept in normal database using SQL Server Express.
Another option you might consider is using some other tool that analyzes your code and builds diagrams and UML charts. Doxygen does this to some extent and there is a plethora of commercial tools that do as well. I have some pers... | [
0.02167380042374134,
-0.29720959067344666,
0.2953021824359894,
0.4297284781932831,
-0.03775629773736,
-0.16520686447620392,
0.03369621932506561,
0.24597957730293274,
0.19746530055999756,
-0.6641829609870911,
0.27671685814857483,
0.5337798595428467,
0.06970716267824173,
0.06978970021009445,... | |
I have a MS Project file which I am using the Primary Interop Assemblies to parse. How can I determine the lineage of a task? I was relying on the WBS code, however the client has started to fiddle with this field and it no longer represents the hierarchy of the data.
Edit: By lineage I mean a way to identify where i... | [
0.33523762226104736,
-0.008289243094623089,
-0.1906689554452896,
-0.06803693622350693,
-0.012251698412001133,
0.19292697310447693,
0.11566942185163498,
-0.04019913449883461,
-0.3850153386592865,
-0.6557460427284241,
0.26438280940055847,
0.04303457587957382,
-0.11218900233507156,
0.52888327... | |
2.3 (If we counted by 1, like project)
Try the Task object's OutlineNumber property and the PredecessorTasks collection.
HTM
Colby Africa | [
0.19878335297107697,
-0.0886322632431984,
0.34395506978034973,
0.011888718232512474,
-0.1730756312608719,
0.21683409810066223,
0.3539690375328064,
-0.4645266830921173,
-0.005832712631672621,
-0.2054274082183838,
0.34459978342056274,
0.2581293284893036,
0.18556129932403564,
0.31150671839714... | |
I have a "Yes" linkbutton that trigger a popup (ModalPopUpExtender)
The popup contain a web user control that allow the user to do some data entry if they click on "Yes" linkbutton.
The Yes linkbutton is inside a asp panel with another linkbutton called "No" that is hidden and will become visible when the user click ... | [
0.040766358375549316,
-0.15862008929252625,
0.9382769465446472,
0.22707420587539673,
0.008052309975028038,
-0.10988034307956696,
0.127594992518425,
0.06869392096996307,
0.06336954236030579,
-0.6543983221054077,
-0.3379799723625183,
0.600069522857666,
-0.2129235714673996,
0.0956600457429885... | |
No linkbutton, it will trigger the code behind event and update the text box value but not with Yes linkbutton. It will not trigger its event (OnClick) (code behind). It will only trigger the modal popup extender therefore i can't update the text box value to Y with Yes linkbutton.
I can change the text box value via ... | [
0.14096596837043762,
-0.33674997091293335,
0.6568872928619385,
0.16895097494125366,
-0.13991166651248932,
-0.2394435703754425,
0.5326892733573914,
-0.1508280634880066,
0.06891752779483795,
-0.4483966827392578,
0.03481846675276756,
0.7554834485054016,
-0.731503963470459,
0.05530241504311561... | |
event (run code behind code) if it is being use as targetcontrol in ajax framework control? Am i missing something?
2. How do you change the value of a control via javascript? Not just on the surface (html) but also in the viewstate so when a update occurred the actual value of control such as textbox's .text value is ... | [
0.05963144078850746,
-0.41716495156288147,
0.1261819750070572,
0.20936740934848785,
-0.33881428837776184,
-0.2033650130033493,
-0.0647892877459526,
-0.1173451840877533,
-0.19608131051063538,
-0.7306279540061951,
0.2550472617149353,
0.43484124541282654,
-0.1527860462665558,
-0.2474856227636... | |
I have a base class with a virtual function and I want to override that function in a derived class. Is there some way to make the compiler check if the function I declared in the derived class actually overrides a function in the base class? I would like to add some macro or something that ensures that I didn't accide... | [
0.30814921855926514,
-0.1656164824962616,
-0.11057879775762558,
0.06726758927106857,
0.27971741557121277,
0.028694963082671165,
0.05746489018201828,
0.1804870069026947,
-0.22522492706775665,
-0.6027270555496216,
0.01708965003490448,
0.45902708172798157,
-0.0904286727309227,
0.4073086082935... | |
something) {
// new exciting code
}
};
int main() {
parent *p = new child();
p->handle_event(1);
}
```
Here `parent::handle_event()` is called instead of `child::handle_event()`, because the child's method misses the `const` declaration and therefore declares a new method. This could also be a typo in the ... | [
0.05075714737176895,
-0.27139177918434143,
0.257528156042099,
-0.14712698757648468,
0.3490739166736603,
-0.02012300305068493,
0.21830891072750092,
-0.019427459686994553,
-0.3008212745189667,
-0.5580025315284729,
-0.2551724314689636,
0.28517061471939087,
0.022669315338134766,
0.639969944953... | |
to check this for me? Any helpful compiler flags (preferably for g++)? How do you avoid these problems?
Since g++ 4.7 it does understand the new C++11 `override` keyword:
```
class child : public parent {
public:
// force handle_event to override a existing function in parent
// error out if the functi... | [
0.09508293867111206,
0.1416705697774887,
0.014150457456707954,
-0.04319067299365997,
0.17779232561588287,
-0.09096647053956985,
0.20070898532867432,
-0.2035123109817505,
-0.012216469272971153,
-0.6058863997459412,
-0.07996045798063278,
0.4351799488067627,
-0.07911895215511322,
0.2690795063... | |
I have a list of numeric values. I may normalize the values if needed.
I need to transform this list to a list of colors (in HSL, RGB or any other color model — I can always do conversion later).
For any given value the color must be the same every time.
The more different two given numeric values are, the more cont... | [
0.46774822473526,
0.015126325190067291,
0.3827768564224243,
-0.039359837770462036,
-0.052375953644514084,
0.1060476005077362,
0.10856668651103973,
-0.23096664249897003,
-0.16927745938301086,
-0.9005413055419922,
0.1798437088727951,
0.4471948742866516,
-0.14527341723442078,
0.23383775353431... | |
single color channel would produce too dense results.
You could consider using a 3D [space-filling curve](http://en.wikipedia.org/wiki/Space-filling_curve) through your chosen colour space. I'll second Mark's [CIELAB](http://en.wikipedia.org/wiki/CIELAB) suggestion, wish I'd known about that last time I had to solve a ... | [
0.5422678589820862,
-0.23616616427898407,
0.4626089334487915,
0.18247948586940765,
-0.21144576370716095,
0.07434634119272232,
-0.1953316181898117,
0.08532144129276276,
-0.2826092541217804,
-0.7034372091293335,
-0.24819137156009674,
0.3173210620880127,
-0.2973693013191223,
0.292142003774642... | |
I have a project for a client that will consist of managing jobs on a MS Compute Cluster. I will be developing the application outside of their network, and would like a way to develop/debug my app without the need to be on their network.
I am developing the app in C#, and all I have so far is the Microsoft Compute Cl... | [
0.44653797149658203,
0.3665081560611725,
0.5293611884117126,
-0.2223467230796814,
0.4217061996459961,
-0.13730217516422272,
-0.02086232788860798,
-0.3910990357398987,
-0.20299124717712402,
-0.5906582474708557,
0.05146344006061554,
0.6857519149780273,
-0.22754840552806854,
-0.18877927958965... | |
I have been creating Unit tests like crazy and find that I'm often having to set up something in one test that I just tore down in a previous test. Is it ever reasonable to create something (e.g. a database record) in one test (e.g. an Insertion test) and then use it for a later test (e.g. a Deletion test)? Or should e... | [
0.5259058475494385,
-0.06253800541162491,
-0.5390494465827942,
0.25506076216697693,
-0.27213814854621887,
-0.11822754144668579,
0.2997867465019226,
-0.1266389787197113,
-0.31699472665786743,
-0.5675164461135864,
0.05804375559091568,
-0.1070336103439331,
0.0006602678331546485,
0.32211783528... | |
*Not* across test files or in any way more globally.
**Update:** Thanks to everyone that answered - there were a *lot* of good answers and the sense of the group is pretty unanimous. I've chosen John Nolan's answer as he provided the most complete explanation and lots of links. As you may have guessed, I've been sorel... | [
1.0462852716445923,
0.2781131863594055,
-0.07769876718521118,
0.13136565685272217,
-0.18123340606689453,
0.04021662101149559,
0.4791897237300873,
-0.2535199820995331,
0.14876067638397217,
-0.6623250842094421,
-0.23733088374137878,
0.2982024848461151,
-0.012271041050553322,
0.05956432595849... | |
cleaner way of testing is where you only depend on the single piece of functionality you want to check the behaviour of. Commonly you [mock](http://en.wikipedia.org/wiki/Mock_object) the other objects you need to get your method under test to function.
A good way to think about approaching unit tests is the [Arrange, ... | [
0.5320363640785217,
0.1416575014591217,
-0.05143711715936661,
0.13392911851406097,
-0.1549130082130432,
-0.06967853009700775,
0.36291053891181946,
-0.5671373605728149,
-0.020317278802394867,
-0.7189838290214539,
0.2472769170999527,
0.5472435355186462,
-0.35090354084968567,
0.16805286705493... | |
MockRepository mocks = new MockRepository();
IDataAccess dataAccess = mocks.CreateMock<IDataAccess>();
ObjectFactory.InjectStub(typeof(IDataAccess), dataAccess);
//Act
Car car = new Car();
Expect.Call(dataAccess.Save(car)).Return(389);
mocks.ReplayAll();
... | [
-0.17362983524799347,
0.13573087751865387,
0.4497624635696411,
-0.08337613940238953,
-0.17153918743133545,
1.0215024948120117,
0.5967225432395935,
-0.4011812210083008,
-0.07945219427347183,
-0.48522430658340454,
0.04631788656115532,
0.5818545818328857,
-0.2423870712518692,
0.29088529944419... | |
// Assert
Assert.AreEqual(389, car.Id);
ObjectFactory.ResetDefaults();
}
}
``` | [
-0.03253701329231262,
0.1081324890255928,
0.07051848620176315,
-0.09380759298801422,
-0.035026852041482925,
0.244634211063385,
0.7092182040214539,
-0.3446173667907715,
0.043907951563596725,
-0.524909496307373,
-0.14851103723049164,
0.9716336727142334,
-0.10978377610445023,
0.26267248392105... | |
I can't seem to get the `wsgiref` module to work at all under Python 3.0. It works fine under 2.5 for me, however. Even when I try the [example in the docs](http://docs.python.org/3.0/library/wsgiref.html?highlight=wsgiref#examples), it fails. It fails so hard that even if I have a print function above where I do: "`fr... | [
0.4438997507095337,
0.10864529013633728,
0.26033371686935425,
-0.3255763351917267,
-0.17038239538669586,
-0.3139869272708893,
0.7704983949661255,
0.15114153921604156,
-0.31736645102500916,
-0.5986810326576233,
-0.1364639699459076,
0.6093834042549133,
-0.6083047389984131,
0.1308359205722808... | |
Recently I have purchased a notebook that came with Windows Home Basic (that don't have with ASP.Net/IIS. I thought in upgrade the Windows version to one with ASP.Net/IIS, but I thought in another possibility:
I have an Hard Disk Case with a 360Gb HD. I thought in create a virtual machine with Windows Ultimate (instal... | [
0.18393254280090332,
0.0722423791885376,
-0.03703561797738075,
0.27947741746902466,
0.11498548090457916,
0.04150468856096268,
0.06656118482351303,
0.0006907469360157847,
-0.11435658484697342,
-0.9578773379325867,
0.20392607152462006,
0.7201614379882812,
0.18962277472019196,
0.3674552142620... | |
(I use it just to quick compatibility tests).
Are you using virtual machine as your primary development environment? What your finds?
---
**Edit**
Thanks for your answers! It really did help me!
I would like to know too about portability i.e., *will the virtual machine that I created in my laptop work in the desk... | [
0.41602715849876404,
0.025733942165970802,
0.026896631345152855,
0.3989683985710144,
0.07603763043880463,
-0.01891149953007698,
0.31731945276260376,
0.2900029122829437,
-0.3580585718154907,
-0.9207375645637512,
0.18732284009456635,
0.8768616318702698,
0.15345485508441925,
0.004684219136834... | |
you are developing does not depend on a feature that is not available on your virtual machine. | [
0.5231457352638245,
0.13640624284744263,
-0.14958010613918304,
0.2552528977394104,
0.358741819858551,
-0.22785399854183197,
0.029715146869421005,
0.336001455783844,
0.13633869588375092,
-1.0287257432937622,
-0.1354464739561081,
0.3651387095451355,
0.126473531126976,
0.20389029383659363,
... | |
I have custom errors configured in my web.config, but IIS 6.0 is returning the custom error specified in the Custom Errors tab of the website configuration.
```
<system.web>
<customErrors>
<error statusCode="404" redirect="UrlRedirect.aspx" />
</customErrors>
</system.web>
```
What ... | [
0.2900184392929077,
0.3757478594779968,
0.24766041338443756,
0.03291868418455124,
0.06669673323631287,
-0.08856482803821564,
0.5155635476112366,
0.13282717764377594,
-0.3658990263938904,
-0.6112697124481201,
-0.013050710782408714,
0.7098761796951294,
-0.3150064945220947,
0.1956275701522827... | |
specified in your hosts IIS settings.
If you want these file types to be handled by your custom error, you'll need to set IIS to direct 404's to UrlRedirect.aspx. | [
0.11562551558017731,
-0.011382181197404861,
0.30503788590431213,
0.21963702142238617,
-0.023105308413505554,
-0.3203493356704712,
0.4343118667602539,
0.15586473047733307,
-0.42657285928726196,
-0.8051092624664307,
-0.10822387784719467,
0.27357324957847595,
-0.3196510076522827,
0.4616571664... | |
In Python, I can do:
```
>>> list = ['a', 'b', 'c']
>>> ', '.join(list)
'a, b, c'
```
Is there any easy way to do the same when I have a list of objects?
```
>>> class Obj:
... def __str__(self):
... return 'name'
...
>>> list = [Obj(), Obj(), Obj()]
>>> ', '.join(list)
Traceback (most recent call last)... | [
-0.07603254914283752,
-0.027239473536610603,
0.14836671948432922,
-0.2979947030544281,
-0.13124866783618927,
0.07198148965835571,
0.30245107412338257,
-0.19183394312858582,
-0.2817266583442688,
-0.4803381562232971,
-0.1631680727005005,
0.5743119120597839,
-0.48052382469177246,
-0.109026007... | |
'.join(str(x) for x in list) # generator expression
``` | [
0.08201035112142563,
0.13062377274036407,
0.4192647635936737,
-0.29366329312324524,
-0.137778177857399,
-0.2739723026752472,
0.2856467068195343,
-0.31431230902671814,
-0.20157569646835327,
-0.2887003719806671,
-0.357782244682312,
0.28048479557037354,
-0.6817538738250732,
0.1506008058786392... | |
What is the most efficient to fill a ComboBox with all the registered file types in Windows?
I want the full file type, not just the extension. I'm using VB 9 (VS2008).
All the file types are stored in the registry under the HKEY\_CLASS\_ROOT, which you could obtain using the Framework's [Registry class](http://msdn.m... | [
0.03677360713481903,
-0.03839625045657158,
0.5399380922317505,
-0.11645742505788803,
0.09697845578193665,
0.1689407229423523,
0.04778572916984558,
-0.15123003721237183,
-0.18117494881153107,
-0.8710295557975769,
-0.2859923839569092,
0.6132211089134216,
-0.3989301025867462,
0.05058439075946... | |
Filetype = name;
}
}
public static class EnumRegFiles
{
public static List<FileAssoc> GetFileAssociations()
{
List<FileAssoc> result = new List<FileAssoc>();
RegistryKey rk = Registry.ClassesRoot;
String[] names = rk.GetSubKeyNames();
foreach (string file in names)
... | [
-0.13768872618675232,
-0.23019376397132874,
0.5545794367790222,
-0.1999199390411377,
0.40282535552978516,
0.2258710116147995,
0.28182733058929443,
-0.38689321279525757,
-0.26355722546577454,
-0.7049686312675476,
-0.6373250484466553,
0.5545430183410645,
-0.3047589957714081,
0.38196960091590... | |
{
RegistryKey rkey = rk.OpenSubKey(file);
object descKey = rkey.GetValue("");
if (descKey != null)
{
string desc = descKey.ToString(); | [
-0.015685485675930977,
-0.2008940428495407,
0.3957977592945099,
-0.23541009426116943,
0.17778536677360535,
0.1439831256866455,
0.3634985387325287,
-0.3454778790473938,
-0.026587415486574173,
-0.3641040027141571,
-0.5132453441619873,
0.7220603823661804,
-0.17005211114883423,
0.5112887620925... | |
if (!string.IsNullOrEmpty(desc))
{
result.Add(new FileAssoc(file, desc));
}
} | [
-0.2297486811876297,
-0.5085453987121582,
0.45740142464637756,
-0.2821541726589203,
0.5526137948036194,
0.000034511722333263606,
0.1565544456243515,
-0.2804877460002899,
-0.07147444039583206,
-0.5169389247894287,
-0.31406688690185547,
0.6376360654830933,
-0.21937060356140137,
0.12587423622... | |
}
}
return result;
}
}
``` | [
-0.26502424478530884,
0.28466978669166565,
0.11637426167726517,
-0.26611629128456116,
0.27616217732429504,
-0.24256473779678345,
0.1727280169725418,
0.15766489505767822,
0.19804084300994873,
-0.27788299322128296,
-0.48123985528945923,
0.918357789516449,
-0.2584559917449951,
0.2011641263961... | |
I have a string object
"with multiple characters and even special characters"
I am trying to use
```
UTF8Encoding utf8 = new UTF8Encoding();
ASCIIEncoding ascii = new ASCIIEncoding();
```
objects in order to convert that string to ascii. May I ask someone to bring some light to this simple task, that is hunting ... | [
0.08229424804449081,
0.12759874761104584,
0.36715173721313477,
-0.08025609701871872,
-0.1967904269695282,
-0.011201404966413975,
0.49311044812202454,
0.10123436152935028,
-0.46343958377838135,
-0.7069231271743774,
-0.38092565536499023,
0.08981602638959885,
-0.19658826291561127,
0.194642394... | |
response to your other question, that looks like it's been deleted....the point still stands.
Looks like a [classic Unicode to ASCII issue](http://www.joelonsoftware.com/articles/Unicode.html). The trick would be to find *where* it's happening.
.NET works fine with Unicode, assuming [it's told it's Unicode](http://ms... | [
0.08469821512699127,
-0.1815798580646515,
0.5442879796028137,
0.10561435669660568,
-0.056210555136203766,
0.1024755984544754,
0.3931578993797302,
-0.03149276599287987,
-0.30495429039001465,
-0.639347493648529,
-0.4837242364883423,
0.3475789427757263,
-0.1661636382341385,
0.0941274389624595... | |
cleanString = ASCIIEncoding.GetString(bAsciiString);
// since the offending bytes have been removed, can use default encoding as well
Assert.AreEqual(cleanString, Default.GetString(bAsciiString));
```
Of course, in the old days, we'd just loop though and remove any chars [greater than 127](http://asciitable.com/)...... | [
0.04556065425276756,
0.09779984503984451,
0.22590439021587372,
-0.020237494260072708,
0.11455758661031723,
0.07367882877588272,
0.37958455085754395,
-0.058302368968725204,
-0.43361231684684753,
-0.47688549757003784,
-0.4452231228351593,
0.32717323303222656,
-0.2651824951171875,
0.111644931... | |
I have this label control in my web page
```
<asp:Label ID="Label1" runat="server" Text="test"></asp:Label>
```
And when the page rendered the id of the control changes to something like this
```
<span id="ctl00_ContentPlaceHolder1_Label3">test</span>
```
How can I stop asp.net from changing IDs in order to per... | [
-0.07683125883340836,
-0.1349305808544159,
0.5302102565765381,
0.1239064410328865,
-0.21929654479026794,
-0.16039979457855225,
-0.10340385138988495,
-0.04180314764380455,
-0.2398047149181366,
-0.6545904278755188,
0.006828942336142063,
0.26302897930145264,
-0.5221053957939148,
0.13176785409... | |
of your client ids and then reference that obj within your external files (not ideal but it is a solution)
```
var MyClientIDs = {
Label1 = '<%= Label1.ClientID %>',
Label2 = '<%= Label2.ClientID %>',
Textbox1 = '<%= Textbox1.ClientID %>',
Textbox2 = '<%= Textbox2.ClientID %>'
};
```
and then in your... | [
-0.16841334104537964,
-0.02891012281179428,
0.7527035474777222,
-0.05253541097044945,
0.06935414671897888,
0.030669504776597023,
0.12352193146944046,
-0.07135696709156036,
-0.23217804729938507,
-0.7931793928146362,
-0.2668878734111786,
0.4717259407043457,
-0.3131614029407501,
0.20202872157... | |
Is there anyway to get tuple operations in Python to work like this:
```
>>> a = (1,2,3)
>>> b = (3,2,1)
>>> a + b
(4,4,4)
```
instead of:
```
>>> a = (1,2,3)
>>> b = (3,2,1)
>>> a + b
(1,2,3,3,2,1)
```
I know it works like that because the `__add__` and `__mul__` methods are defined to work like that. So the onl... | [
-0.08927138149738312,
-0.0057642655447125435,
0.1854703575372696,
-0.2002476304769516,
-0.277308851480484,
0.08426054567098618,
0.1280013471841812,
-0.1574801355600357,
-0.3449426293373108,
-0.3278416097164154,
-0.21304285526275635,
0.4937497079372406,
-0.4956553280353546,
-0.2615371346473... | |
What is the best way to convert from a generic `IEnumerable<T>` implementation to an array of T? The current solution I have looks like the following:
```
IEnumerable<string> foo = getFoo();
string[] bar = new List<string>(foo).ToArray();
```
The transfer through a `List<T>` seems unneccesary, but I haven't been abl... | [
0.03413613513112068,
-0.14821290969848633,
0.5852118730545044,
-0.21693678200244904,
-0.04211778566241264,
-0.056961774826049805,
0.14606057107448578,
-0.3104088604450226,
0.022751033306121826,
-0.8800410628318787,
-0.1668681800365448,
0.6251552700996399,
-0.14314807951450348,
0.2361125946... | |
probably the easiest way to do this.
The [constructor for `List<T>`](http://msdn.microsoft.com/en-us/library/fkbw11z0.aspx) will check the `IEnumerable<T>` to see if it implements [`ICollection<T>`](http://msdn.microsoft.com/en-us/library/92t2ye13.aspx) to get the count of items to properly initialize the capacity of ... | [
0.056836292147636414,
-0.01490497961640358,
0.3439488708972931,
0.2889113426208496,
0.175978422164917,
-0.01440633274614811,
0.04978460073471069,
-0.17065852880477905,
-0.47849684953689575,
-0.9063785076141357,
-0.08091845363378525,
0.3950694799423218,
-0.038955893367528915,
0.199645847082... | |
I came across [this post](http://msmobiles.com/news.php/7973.html) on the MSMobiles.com blog that says the following, among other things:
> .Net is great in so many ways but for
> commercial apps? No way! Anybody can
> just look at your source code. A high
> end obfuscator will help a lot but any
> determined hack... | [
0.46840333938598633,
0.23718367516994476,
0.33309417963027954,
0.1718345284461975,
-0.05798836797475815,
-0.22627189755439758,
0.40328240394592285,
0.4778849184513092,
-0.35393908619880676,
-0.8466238379478455,
-0.08520404994487762,
0.21447278559207916,
-0.16357597708702087,
0.112641699612... | |
competitors will copy your
> functionality and place their own apps
> with the same functionality in the
> Skymarket
For those familiar with .NET: is this truth or nonsense? Is this issue somehow specific to Windows Mobile, or does it apply to .NET on Windows as well? This just seemed surprising to me because I kno... | [
0.5436610579490662,
0.22967086732387543,
0.13399022817611694,
0.35780245065689087,
-0.07586620002985,
-0.44391340017318726,
0.11896388232707977,
0.09395121783018112,
-0.28295162320137024,
-0.25347408652305603,
0.24547463655471802,
0.6388012766838074,
-0.0671921819448471,
0.1457429528236389... | |
largely non-sense for the simple reason that if your competitive advantage and business success is dependent on some algorithm in your code then you are screwed already. Successful apps are about so much more than just the code, it is one of many pieces.
If this is something you really fear then I would invest in obfu... | [
0.7451431751251221,
0.5848615169525146,
0.22089844942092896,
0.16064365208148956,
0.2851293385028839,
-0.03416196629405022,
0.2782013416290283,
0.31271764636039734,
-0.326695054769516,
0.09351266175508499,
0.13021309673786163,
0.6570809483528137,
-0.268595814704895,
-0.08917578309774399,
... | |
just about your most effective tool. | [
0.021401993930339813,
0.25955864787101746,
-0.30878642201423645,
0.45363926887512207,
0.03984089940786362,
-0.02123189903795719,
0.1947540044784546,
-0.01847449690103531,
0.11509054899215698,
-0.4768527150154114,
-0.027515411376953125,
0.592670202255249,
0.3505416512489319,
-0.086585655808... | |
I was reading [this question](https://stackoverflow.com/questions/453610/javas-virtual-machine-and-clr) to find out the differences between the Java Virtual Machine and the .NET CLR and Benji's answer got me wondering why Virtual Machines are necessary in the first place.
From my understanding of Benji's explanation, ... | [
-0.010966457426548004,
0.141400545835495,
-0.32306981086730957,
0.13610616326332092,
0.023133032023906708,
0.21759191155433655,
0.09090269356966019,
-0.0007439950713887811,
0.05160900577902794,
-0.5319705009460449,
-0.04526090621948242,
0.1944095641374588,
-0.3017284572124481,
-0.014520678... | |
a need for an intermediary interpreter like the Virtual Machine so that the same code can be run on any CPU.
But, if that's the case, then what I don't understand is why C or C++ code compiled into machine code is able to run on any computer as long as it is the correct OS. Why then would a C program I compiled on my ... | [
0.24955174326896667,
0.24569879472255707,
-0.19960974156856537,
0.3317866027355194,
0.1432027369737625,
0.1174396276473999,
0.1006133183836937,
0.18028675019741058,
-0.19311833381652832,
-0.5354713797569275,
-0.15896698832511902,
0.7254247069358826,
-0.2619963586330414,
0.21529251337051392... | |
so that the same code can be run on any OS? I know Java has VM versions on pretty much any OS but is there a CLR for other OS's besides Windows?
Or is there something else I'm missing? Does the OS do some other interpretation of assembly code it runs to adapt it to the particular CPU or something?
I'm quite curious a... | [
0.48176485300064087,
0.21774715185165405,
0.008898617699742317,
0.25714579224586487,
-0.19730721414089203,
-0.2080393135547638,
0.026743624359369278,
0.2021235078573227,
-0.4516611695289612,
-0.25381234288215637,
0.20881794393062592,
0.5274279713630676,
-0.2722855806350708,
0.1195369288325... | |
yet =b.
Edit: Thanks for all the great answers! So it seems what I was missing was that although all processors have differences there is a common standardization, primarily the X86 architecture, which provides a large enough set of common features so that the C code compiled on one X86 processor will work for the mos... | [
0.628730297088623,
0.5446277856826782,
0.020276116207242012,
0.18448209762573242,
-0.20601361989974976,
0.08999365568161011,
0.019390521571040154,
-0.23995138704776764,
-0.17264658212661743,
-0.2982783913612366,
0.23065891861915588,
0.37501096725463867,
-0.21596528589725494,
0.241572543978... | |
compilers compile to machine code, with headers appropriate to the OS they are targeted at. Once compiled they cease to associate in any way, shape, or form with the language they were compiled in and are merely binary executables. (there are artifacts taht may show what language it was compiled from, but that isn't th... | [
0.6147975325584412,
0.3856658339500427,
-0.10820721834897995,
0.038658447563648224,
-0.13974100351333618,
0.018475152552127838,
0.2039973884820938,
0.2983338534832001,
0.10496030747890472,
-0.6016178131103516,
-0.44977879524230957,
0.3685522973537445,
-0.4804410934448242,
0.098035633563995... | |
on an OSX machine, even if it's running on an intel processor - the binary isn't compatible unless you run additional emulation software (such as parallels, or a VM with windows).
Beyond that, if you want to run them on an ARM processor, or MIPS, or PowerPC, then you have to run a full machine instruction set emulator... | [
0.02395244874060154,
0.03558364138007164,
0.36491718888282776,
0.311972439289093,
0.1734475940465927,
0.15017622709274292,
-0.1438921093940735,
0.40453237295150757,
-0.05450828745961189,
-0.9020044207572937,
-0.2663755714893341,
0.4847294092178345,
-0.35323476791381836,
0.2553841471672058,... | |
collection, and other high level constructs. It's a very complex machine and can't be built directly in silicon now (with good performance) but an emulator can be written that will allow it to run on any existing processor.
Suddenly you can write one machine specific emulator for any processor you want to run .NET on,... | [
0.3007766306400299,
-0.09021195024251938,
0.3073311448097229,
0.4602337181568146,
0.09066256880760193,
0.011859037913382053,
-0.00737170223146677,
-0.0058040861040353775,
-0.4939441680908203,
-0.3421883285045624,
-0.0001847370294854045,
0.5008983016014099,
-0.3408926725387573,
0.1002751067... | |
make compilers that convert any other written language into it?
So now you can have a C, C#, C++, Java, javascript, Basic, python, lua, or any other language compiler that converts written code so it'll run on this virtual machine.
You've disassociated the machine from the language by 2 degrees, and with not too much... | [
0.6054220795631409,
0.2845461368560791,
-0.1180308386683464,
0.2579647898674011,
-0.11077967286109924,
-0.05017498508095741,
0.12680137157440186,
0.22534023225307465,
-0.226255863904953,
-0.6322153806686401,
0.04342169314622879,
0.5786139369010925,
-0.29018399119377136,
0.2503323554992676,... | |
*real* contribution to the world was:
Autocad had to write drivers for each printer they could print to. So did lotus 1-2-3. In fact, if you wanted your software to print, you had to write your own drivers. If there were 10 printers, and 10 programs, then 100 different pieces of essentially the same code had to be wri... | [
0.22449243068695068,
0.20379656553268433,
0.026396168395876884,
0.2932807505130768,
-0.5364283919334412,
0.5812560319900513,
-0.2315983921289444,
0.015987804159522057,
-0.1516176164150238,
-0.38883134722709656,
0.40685197710990906,
0.5785067677497864,
-0.31425240635871887,
-0.0809065178036... | |
Now with 10 programs and 10 printers, only 20 pieces of code have to be written, and since the microsoft side of the code was the same for everyone, then examples from MS meant that you had very little work to do.
Now a program wasn't restricted to just the 10 printers they chose to support, but all the printers whose... | [
0.2396121621131897,
0.3236418068408966,
0.3621072471141815,
0.2560831904411316,
0.18926775455474854,
0.22310395538806915,
0.17395396530628204,
0.027892036363482475,
-0.4743358790874481,
-0.814805269241333,
-0.012864835560321808,
0.35782378911972046,
-0.10244236886501312,
0.1755179762840271... | |
we really need?).
Java was meant to fix this, but it had many limitations, some of which aren't really solved.
.NET is closer, but no one is developing world-class VMs for platforms other than Windows (mono is so close... and yet not quite there).
So... That's why we need VMs. Because I don't want to limit myself to... | [
0.7746461033821106,
0.12063739448785782,
0.0322565883398056,
0.2845524549484253,
0.15449129045009613,
-0.027569057419896126,
0.18320010602474213,
0.026436377316713333,
-0.32019245624542236,
-0.41981983184814453,
-0.09647270292043686,
0.5870726108551025,
-0.19934523105621338,
0.166185215115... | |
My understanding is that there are 3 types of stylesheet:
* Defined by the page author
* Defined by the user (i.e. a set of default styles defined by the user and installed into their browser)
* Default stylesheet defined by the browser
According to [this book](http://www.amazon.co.uk/Head-First-HTML-CSS-XHTML/dp/059... | [
0.21058371663093567,
-0.06822015345096588,
0.7266952395439148,
0.05920622870326042,
0.057689446955919266,
-0.021330134943127632,
0.07431647181510925,
-0.19976706802845,
-0.05930229648947716,
-0.46118971705436707,
-0.27747055888175964,
0.22719480097293854,
-0.1211497113108635,
-0.1368823498... | |
and this style has a higher precendence than inheritance, then inherited property values should never be observed. Clearly this is not the case, so what exactly are the correct precedence rules for properties defined in a browser's default stylesheet and those defined for parent elements? (I'm aware that not all CSS pr... | [
0.10255073010921478,
-0.1268320381641388,
0.2273162603378296,
0.026411062106490135,
0.0758284255862236,
-0.13641922175884247,
0.02583310380578041,
0.004763710778206587,
-0.3550041615962982,
-0.729729950428009,
-0.30247488617897034,
0.16394704580307007,
-0.3438969552516937,
0.08056057244539... | |
{ margin-bottom: 1em; }
blockquote { margin: 0 5em 1em 5em; }
```
Take the following snippet of HTML as an example:
```
<ul>
<li>
<span>Blah blah blah.</span>
</li>
<li>
<a href="about:">Foo</a>
</li>
</ul>
```
When the browser goes to render the `<span>` element, it looks looks through all the sty... | [
0.09031626582145691,
-0.03461654111742973,
0.8682861328125,
0.080126091837883,
-0.1762515753507614,
0.05461437255144119,
-0.14916235208511353,
-0.603715717792511,
-0.34738749265670776,
-0.7581412196159363,
-0.20233798027038574,
0.12426182627677917,
-0.23520790040493011,
-0.1306170672178268... | |
tree until it finds something that *does* have a `color` rule defined, in this case `ul`.
On the other hand, when the browser renders the `<a>` element, it doesn't find anything in the user or author stylesheets specifying a `color`, so it uses the rule found in the browser stylesheet.
The end result: Green text, blu... | [
-0.17090319097042084,
-0.1781286895275116,
0.38514968752861023,
-0.02438496984541416,
0.17085446417331696,
-0.07305724173784256,
0.3628859519958496,
-0.051913563162088394,
-0.5749689936637878,
-0.483463317155838,
-0.6041877269744873,
0.2810758352279663,
-0.1648319959640503,
0.1217369064688... | |
Using the following rsync command will let you copy numerous remote files to your local machine, when the remote machine is using rsyncd:
rsync -R hostname::'module/path1/file1 module/path2/file2 module/path3/file3 module/path4/file4' /local/path
If the number of files is too great, however, rsync hangs, not creating... | [
0.547712504863739,
-0.11801180243492126,
0.894879937171936,
0.22418943047523499,
0.13672971725463867,
-0.2511902153491974,
0.11554060876369476,
-0.25104498863220215,
-0.8306349515914917,
-0.46422600746154785,
-0.20335666835308075,
0.28860270977020264,
-0.2045082151889801,
0.406949549913406... | |
can be transferred, as long as I don't do more than 22 at a time. (In other words, it's not something special about the specific files at position 23 and above.)
* There are no permissions issues; I have the ability to read all files on the remote machine, and can write to the target destination. (Also, as I noted in t... | [
0.35212668776512146,
-0.06820832192897797,
0.47514015436172485,
0.2068863958120346,
0.1176692470908165,
-0.01821419782936573,
0.37165263295173645,
0.19868922233581543,
-0.7338388562202454,
-0.7993064522743225,
-0.1317502111196518,
0.29851922392845154,
0.21758101880550385,
0.299187779426574... | |
why you're specifying individual files. The simplest approach is to rsync an entire directory recursively, and use either the `--include` or `--exclude` flags with the appropriate patterns you want to match on if you need more control.
If your usage really does require explicitly specifying every single file to be bac... | [
0.8132382035255432,
-0.07058118283748627,
0.0053578829392790794,
0.059862762689590454,
0.2166658341884613,
-0.3370942175388336,
-0.20187988877296448,
-0.006333011668175459,
-0.348500519990921,
-0.3520810008049011,
-0.12460779398679733,
0.6037026047706604,
-0.7207086086273193,
0.06238352134... | |
the metadata files from backup not only for CVS but also for SVN. Extremely useful, but definitely not easily discoverable.
All of these options are detailed in the rsync documentation [here](http://samba.anu.edu.au/ftp/rsync/rsync.html). | [
0.3699664771556854,
-0.07031417638063431,
0.46205759048461914,
0.44703352451324463,
0.2792333960533142,
-0.2995303273200989,
0.009731195867061615,
-0.17174014449119568,
-0.73435378074646,
-0.09452218562364578,
-0.16558516025543213,
0.6883813142776489,
-0.13569749891757965,
-0.0240763798356... | |
How do you override the enter key in a datagridview so that it will set focus to the next column instead to the next row?
All you need to do is handle the KeyDown event of the DataGridView and in the handler, check if the current key pressed is an Enter key. If so, just set the CurrentCell of the DataGridView to the ne... | [
0.13938400149345398,
-0.28669989109039307,
0.5632091164588928,
0.11189579963684082,
0.010161035694181919,
-0.18037137389183044,
0.13422419130802155,
-0.2297322303056717,
-0.12993580102920532,
-0.8066651225090027,
-0.30773019790649414,
0.590914785861969,
-0.2963348627090454,
0.1308270245790... | |
e.KeyCode = Keys.Enter Then
Dim numCols As Integer = DataGridView1.ColumnCount
Dim numRows As Integer = DataGridView1.RowCount
Dim currCell As DataGridViewCell = DataGridView1.CurrentCell
If currCell.ColumnIndex = numCols - 1 Then
If currCell.RowIndex < numRows - 1 Then
DataGridView1.Curre... | [
-0.2448800802230835,
-0.3739171624183655,
0.9982021450996399,
-0.03815062344074249,
-0.2860046625137329,
0.23044125735759735,
0.13567687571048737,
-0.4693995714187622,
-0.2507806420326233,
-0.38235265016555786,
-0.3717319369316101,
0.6176149845123291,
-0.1099359467625618,
0.434141337871551... | |
End If
End Sub
``` | [
-0.4447985887527466,
0.15598012506961823,
0.2619900405406952,
-0.15588214993476868,
-0.35663706064224243,
-0.5538625717163086,
0.5333803296089172,
0.020958255976438522,
-0.008569943718612194,
-0.27533861994743347,
-0.7436071038246155,
-0.030464226379990578,
-0.3144347667694092,
0.459538221... | |
I want to build a django site where a certain group of trusted users can edit their profile information. Does it make sense to have each trusted user go through the django admin interface? I'd only want them to be able to see and edit their own information (obviously). It doesn't seem like this fits the way the django ... | [
0.633364200592041,
0.5717933177947998,
0.22892120480537415,
-0.1353963166475296,
-0.38266053795814514,
-0.4558514654636383,
0.19926662743091583,
-0.3303314447402954,
0.3415798544883728,
-0.455831915140152,
0.22375835478305817,
0.6881425976753235,
-0.3558625876903534,
-0.1863391250371933,
... | |
that Django assumes that your content
> editors can be trusted to do the right
> thing.
>
>
> This means that there’s no “approval”
> process for editing content — if you
> trust your users, nobody needs to
> approve of their edits. It also means
> that the permission system, while
> powerful, has no support f... | [
0.3437792658805847,
0.36309072375297546,
0.13530020415782928,
0.14417676627635956,
-0.1638767272233963,
-0.661557674407959,
0.30352213978767395,
0.03990239277482033,
-0.10993519425392151,
-0.2186383455991745,
-0.1549815982580185,
0.6359145045280457,
-0.3957216739654541,
-0.1753814369440078... | |
module, or is it just a specialized view for a non-trusted user?
No, the Django admin is not suited for individual user profiles, each user would be able to see, and edit, all other user profiles. This is suited more to an administrator who has to manage all the users at once.
What you need to build is a user profile ... | [
0.5869014263153076,
-0.04291779547929764,
0.3693335950374603,
-0.004290259908884764,
-0.19013243913650513,
-0.5125374794006348,
0.14384832978248596,
-0.28202831745147705,
-0.23485207557678223,
-0.5964426398277283,
0.08995766192674637,
0.5731985569000244,
-0.4146929085254669,
-0.03164985775... | |
that specific user's profile information based on their User model. This should be relatively painless as it will only require one view and one template, and the template can take advantage of ModelForms. | [
0.13494908809661865,
0.001794776995666325,
0.2663135528564453,
0.2550969123840332,
0.08852409571409225,
-0.002854913007467985,
0.16363590955734253,
-0.29677578806877136,
-0.03070765919983387,
-0.7512297630310059,
0.04702148213982582,
0.6238648295402527,
-0.18407054245471954,
-0.04754115641... | |
If I have a class that has a sharedInstance of itself (singleton pattern) or a shared instance of another class, how do I make sure that shared instance is released properly when my program exits? Better yet, can you point me to some documentation about this?
sample class (with all other methods removed for clarity):
... | [
0.05766904726624489,
-0.07704263925552368,
0.17762860655784607,
-0.10191453993320465,
-0.07005594670772552,
-0.21202199161052704,
0.22174102067947388,
-0.3034977912902832,
-0.269994854927063,
-0.7659921050071716,
-0.08113767951726913,
0.5097004175186157,
-0.3905430734157562,
0.278776824474... | |
is no need to clean up anything on exit as Barry pointed out, but what you can do is setting an NSApplication delegate that implements
```
- (void)applicationWillTerminate:(NSNotification *)aNotification
```
This method is then called right before your application is going to quit. In this method you can call some s... | [
0.03540126234292984,
-0.0867922455072403,
0.10323678702116013,
0.1594173014163971,
0.1099228486418724,
-0.29675501585006714,
0.5763919353485107,
0.012573320418596268,
-0.29489293694496155,
-0.5423109531402588,
-0.25149911642074585,
0.3405321538448334,
-0.38412782549858093,
0.36750701069831... | |
application was going to crash, the memory it used before the crash would be ultimately lost to the system and that is not acceptable. On a multi-tasking OS, an application that crashes must not have any negative effects on the rest of the system! | [
-0.12720482051372528,
0.22348958253860474,
0.11768097430467606,
0.4088909924030304,
0.12253114581108093,
-0.19246743619441986,
0.3809780776500702,
0.11967890709638596,
-0.26160165667533875,
-0.3470759987831116,
0.003289048094302416,
0.47559037804603577,
-0.3633571267127991,
0.1014010831713... | |
I realize I could whip up a little C or Ruby program to do this, but I want my script to have as few dependencies as possible.
Given that *caveat*, how does one do date math in a bash script on OS X? I've seen a post (on another site) where someone did the following:
```
date -d "-1 day"
```
But this does not seem t... | [
0.5295765399932861,
0.2977375388145447,
0.01634555123746395,
-0.04618285223841667,
-0.14478962123394012,
-0.12893541157245636,
0.14475762844085693,
0.08871232718229294,
-0.3526608347892761,
-0.3003292679786682,
0.1501203179359436,
0.8516981601715088,
-0.058447808027267456,
-0.3006854653358... | |
I want. As a matter of fact, I already have such a script, written in Ruby.
So perhaps I should clarify what I mean by 'external dependency'. What I mean is, I don't want my bash script to have to call any other script external to it. In other words, I want it to use some utility available in a vanilla installation of... | [
0.42214536666870117,
0.22128835320472717,
0.3004603981971741,
-0.32094576954841614,
0.06337931007146835,
0.07441342622041702,
0.26172542572021484,
-0.149974524974823,
-0.13361822068691254,
-0.8818263411521912,
0.05119318142533302,
0.698870837688446,
0.04354395344853401,
0.3947001099586487,... | |
for more info. | [
0.5901334881782532,
-0.08149717003107071,
-0.007298430893570185,
0.3883240520954132,
-0.054674167186021805,
-0.6021434664726257,
0.17581631243228912,
0.7486844062805176,
-0.3327111005783081,
-0.2609788775444031,
-0.011743725277483463,
0.13483893871307373,
0.22674560546875,
0.27350181341171... | |
I was registering to an event in my class, and as per usual I was lazy and just use the autocomplete feature built into Visual Studio 2008 Pro which auto creates the delegate creation and it's associated method.
```
public abstract class FooBase
{
protected event EventHandler<MyValueChangedArgs> MyValueChanged;
... | [
0.05146719142794609,
0.14625121653079987,
0.2878913879394531,
-0.15837375819683075,
0.02922929637134075,
-0.05908360332250595,
0.3658575117588043,
-0.35535699129104614,
-0.07349756360054016,
-0.384745717048645,
-0.041821327060461044,
0.7278206944465637,
-0.303556352853775,
0.13989789783954... | |
// Some handling logic
}
}
```
Usually I dont think twice when Visual Studio gens the event handler for me, but then I received a recommendation from Refactor! Pro to "Remove Redundant Delegate Creation". The recommendation results in:
```
public abstract class FooBase
{
protected event EventHandler<MyValueC... | [
-0.1657850593328476,
-0.1001197099685669,
0.11633645743131638,
-0.1320137232542038,
-0.010917449370026588,
-0.07836757600307465,
0.12873059511184692,
-0.14465510845184326,
-0.19139833748340607,
-0.39870455861091614,
-0.04241562634706497,
0.7979273796081543,
-0.19450928270816803,
-0.0760349... | |
}
}
```
Under what circumstances is delegate creation redundant and when is delegate creation appropriate?
Thanks.
General MS guidelines
1. no
2. no
3. no
GAC is really a repository for Microsoft common .NET libraries. Yes, they let developers use it too, but as a rule of thumb, if you don't need GAC, don't use it... | [
0.4044565260410309,
0.21141472458839417,
-0.13699530065059662,
-0.020395420491695404,
-0.21703629195690155,
-0.49751195311546326,
0.3179849088191986,
-0.015915609896183014,
-0.2105971723794937,
-0.6158468127250671,
-0.14520800113677979,
0.6522635221481323,
-0.1984390914440155,
0.1341973692... | |
(now you know why that installation takes so long). Paint.NET does it as well (to improve startup time of their app). However most of us don't work on huge frameworks or photoshop competitors, so most of the time, performance gains from having assembly in GAC are minimal. Not worth giving up simple x-copy deployment.
*... | [
0.8057135939598083,
0.06629777699708939,
0.010671221651136875,
-0.05065076798200607,
-0.36284399032592773,
-0.2706497311592102,
0.6046778559684753,
0.110771544277668,
-0.43108776211738586,
-0.6824106574058533,
0.16223359107971191,
0.5618135929107666,
-0.3847624659538269,
-0.139711275696754... | |
here why](http://www.sellsbrothers.com/Posts/Details/12503).
And don't forget that once you want to deploy into GAC, your installer will need administrator privileges, you can pretty much forget click-once deployment, etc... | [
0.5745291113853455,
-0.016470428556203842,
0.3771689832210541,
-0.01598605141043663,
0.32567647099494934,
-0.5279765725135803,
0.001971631310880184,
-0.03430866822600365,
-0.31077712774276733,
-0.3271682858467102,
0.037929631769657135,
0.7075819373130798,
-0.080132395029068,
0.177644014358... | |
Consider:
```
namespace WindowsApplication1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
//int[] val = { 0, 0}; | [
-0.22579888999462128,
-0.4122989773750305,
0.3567253351211548,
-0.23962432146072388,
0.25400060415267944,
0.008433244191110134,
0.25410258769989014,
-0.1877995878458023,
0.041142527014017105,
-0.6831772327423096,
-0.6117109656333923,
0.6508057117462158,
-0.4866350293159485,
-0.026040878146... | |
int val;
if (textBox1.Text == "")
{
MessageBox.Show("Input any no");
}
else
{
val | [
-0.1837058812379837,
-0.5255101919174194,
0.1871400624513626,
-0.4460545480251312,
0.14363282918930054,
0.1078854352235794,
0.4798784554004669,
-0.07174289971590042,
0.016552377492189407,
-0.4670766294002533,
-0.5284767746925354,
0.928385853767395,
-0.34712448716163635,
0.0343763567507267,... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.