text stringlengths 0 30.5k | title stringclasses 1
value | embeddings listlengths 768 768 |
|---|---|---|
purpose of this class is to manage
* access to the application, making sure the
* users are logged in before they can access
* certain features
*/
class Auth extends Model
{
function isUserLoggedIn()
{
/*
* Check for | [
0.1353791058063507,
-0.20704975724220276,
0.5039184093475342,
-0.08390652388334274,
0.25510233640670776,
-0.17663322389125824,
0.4315757751464844,
-0.08361421525478363,
-0.14735274016857147,
-0.6277355551719666,
0.03693823516368866,
0.5756720900535583,
-0.49542587995529175,
0.2374943643808... | |
the user_id in $_SESSION
* and see if it's the database. Return
* true or false
*
*/
return isset($_SESSION['user']);
}
static function redirectToLogin() | [
-0.14603431522846222,
-0.11752907186746597,
0.41861793398857117,
-0.03754127398133278,
0.25036048889160156,
-0.020914198830723763,
0.0854211300611496,
-0.01763940043747425,
-0.17557300627231598,
-0.38224896788597107,
-0.3511694073677063,
0.6567726731300354,
-0.520952582359314,
0.0992281213... | |
{
header("location: http://". DOMAIN .APP_DIR . "index.php?action=login");
}
static function redirectToMain()
{
header("location: http://". DOMAIN . APP_DIR . "index.php?action=main");
}
static function login($user)
{ | [
-0.3222365081310272,
-0.2521286904811859,
0.6131146550178528,
-0.15419939160346985,
0.30573713779449463,
0.0837559923529625,
0.22095473110675812,
-0.007975040003657341,
-0.42830410599708557,
-0.37297943234443665,
-0.6975592374801636,
0.6712122559547424,
-0.7008443474769592,
0.4097881913185... | |
/*
* Authenticate the user passing to the function
* a instance of the User object
*/
$db = parent::getConnection();
$pass = $user->getPassword(); // replaced getPassword in the query with this variable, else there is no need to set | [
-0.032207977026700974,
-0.19935329258441925,
0.19544768333435059,
-0.03746405988931656,
-0.13923700153827667,
-0.04986118897795677,
0.5926371812820435,
-0.26828733086586,
0.3287370204925537,
-0.6579396724700928,
-0.393867164850235,
-0.0036237668246030807,
-0.3859198987483978,
0.23968809843... | |
it here.
$query = "select username, password from users where username = '".$user->getUsername()."' and password = '".$pass."'";
$results = $db->query($query);
if(empty($results)) {
throw new Exception('There was a problem logging you in', EX_LOGIN_ERROR... | [
-0.2862950265407562,
-0.04017376899719238,
0.31801530718803406,
-0.1943116933107376,
0.18827477097511292,
-0.24827492237091064,
0.5533630847930908,
-0.04946846887469292,
-0.14062008261680603,
-0.35367029905319214,
-0.36182281374931335,
0.36451953649520874,
-0.3582293391227722,
0.4350878298... | |
}
$row = $results->fetch_assoc();
$_SESSION['user'] = $row['username'];
// Why bother surrounding with try...catch just to throw the same exception
}
static function logout() | [
0.12140592187643051,
-0.2957969009876251,
0.4455125033855438,
-0.16932399570941925,
0.29601582884788513,
0.10675299167633057,
0.029552588239312172,
-0.17054212093353271,
-0.27547764778137207,
-0.5453704595565796,
-0.04544573277235031,
0.7961315512657166,
-0.8177828788757324,
0.075454838573... | |
{
// what is $old_user used for? I can't see it set as a global variable anywhere
$old_user = $_SESSION['user'];
unset($_SESSION['user']);
session_destroy();
}
}
?>
``` | [
0.08384416252374649,
0.3347792625427246,
0.3642822206020355,
-0.37817350029945374,
0.45036402344703674,
-0.21346835792064667,
0.3546656370162964,
0.04112940654158592,
-0.25863897800445557,
-0.4582888185977936,
-0.2226009964942932,
0.6287083625793457,
-0.5210694074630737,
0.5940303802490234... | |
I have a controller action which has a nullable DateTime as one of the parameters which comes from a textbox on my form. I noticed that if the user were to type in "blah" in that textbox then I will get a Null value back for the DateTime param and a model error is automatically added. In this case the ModelState error ... | [
0.14329418540000916,
0.09948617964982986,
0.44704487919807434,
-0.114784836769104,
-0.019613757729530334,
-0.029025858268141747,
0.628542959690094,
0.28313741087913513,
-0.2771937847137451,
-0.4658660888671875,
-0.15110071003437042,
0.32714951038360596,
-0.4740743041038513,
0.3632721602916... | |
this case I can't seem to get rid of it. If I add another ModelState error for the same textbox it does not show up.
I have to strongly disagree with all of the answers you have received so far. None of them actually answer the question you asked, which is how to localize the MVC error messages. You could spend a lot o... | [
0.0624903179705143,
0.0590536929666996,
0.28423964977264404,
-0.001204079482704401,
-0.06523190438747406,
-0.15126648545265198,
0.5132324695587158,
0.2960461378097534,
-0.35119956731796265,
-0.6615378260612488,
-0.15358410775661469,
0.5536555647850037,
-0.4535905718803406,
0.50227314233779... | |
is found in the Resources folder of the MVC source code (or just browse the assembly with Reflector). In particular, you are looking for the `Common_ValueNotValidForProperty` resource. You would localize these messages by providing a localized satellite assembly, in the same way that you localize any .NET application. ... | [
0.02247241511940956,
0.07072574645280838,
0.518252968788147,
-0.15096017718315125,
-0.14708763360977173,
-0.14736665785312653,
0.319173663854599,
0.26606765389442444,
-0.46352484822273254,
-0.6152496933937073,
-0.3259589672088623,
0.176550030708313,
-0.34982356429100037,
0.2144518494606018... | |
in beta, so it is, as far as I know, English-only, at the moment. Presumably, that will change after release. | [
0.4017016291618347,
0.15264099836349487,
0.046524595469236374,
-0.2988852262496948,
0.02869638241827488,
-0.3830503225326538,
0.2268558293581009,
0.6842589974403381,
0.00854750070720911,
-0.25829949975013733,
-0.5368066430091858,
0.5427834391593933,
0.02408403344452381,
-0.0388485006988048... | |
Do you think it's worth trading off some performance for code-quality and maintainability? I remember a post by Jeff Atwood that stated that hardware is cheap, developers are not. I think I'd like to change that to "Hardware is cheap, time is not."
I've noticed with an MVC project I've been working on lately that some... | [
0.387365460395813,
0.16106493771076202,
-0.44451263546943665,
0.46182259917259216,
-0.054016049951314926,
0.196072518825531,
-0.20278987288475037,
-0.02482926845550537,
-0.2702356278896332,
-0.632696270942688,
0.32709553837776184,
0.7526835203170776,
-0.14413347840309143,
0.005060125607997... | |
fact that it allows me to append to the query so I can get some fluent code for using it. But being able to do something like that seems to add more responsibility on the controller/BLL.
So what do you think? In the case of web applications would you be ok with trading off some performance for maintainable/cleaner cod... | [
0.5186538100242615,
-0.12981511652469635,
-0.021493639796972275,
0.3238942325115204,
0.08064857870340347,
-0.25524428486824036,
0.5376351475715637,
-0.15156814455986023,
-0.05736871436238289,
-0.6686776280403137,
0.15028081834316254,
0.9371055364608765,
-0.23469629883766174,
-0.47906282544... | |
???
6. Profit | [
0.043456483632326126,
0.07494954019784927,
0.1379193514585495,
0.21919788420200348,
-0.16514147818088531,
0.045959535986185074,
-0.2136538028717041,
-0.07860808819532394,
-0.22280728816986084,
-0.08288519084453583,
-0.042482320219278336,
1.1435812711715698,
0.08043510466814041,
0.479347079... | |
I am having trouble when removing an item from a list. The list is defined in a superclass, but the Hibernate annotations are applied to property accessors in a subclass. There are two methods in the superclass that manipulate the list. The "add" method works fine, but the "remove" does not persist changes. I have chec... | [
0.23409847915172577,
-0.22502946853637695,
0.09442666918039322,
0.00012688132119365036,
-0.12472209334373474,
0.04248231649398804,
0.4500897526741028,
-0.352589875459671,
-0.3661717474460602,
-0.5015754699707031,
0.13683836162090302,
0.47928479313850403,
-0.15632207691669464,
0.20119045674... | |
private Long id;
@Version
private Integer version = null;
@Transient
protected List<T> content = new ArrayList<T>();
public void remove(T value) {
// business logic ...
content.remove(value);
}
public void add(T value) {
// business logic ...
co... | [
0.3098834753036499,
-0.3762834370136261,
0.5259037017822266,
-0.4647258520126343,
0.055339377373456955,
0.1283460259437561,
0.22404959797859192,
-0.22381392121315002,
-0.19305065274238586,
-0.12693281471729279,
-0.43539679050445557,
0.6949134469032288,
-0.647343099117279,
0.402519077062606... | |
}
}
@Entity
@AccessType("property")
class TemporalAsset extends Temporal<Asset> {
@OneToMany(cascade = CascadeType.ALL, mappedBy = "temporal")
public List<Asset> getContent() {
return super.content;
}
protected void setContent(List<Asset> list) {
super.content = list;
} ... | [
0.4010496139526367,
-0.4596276879310608,
0.40721628069877625,
-0.024059778079390526,
0.2082725167274475,
-0.07024285942316055,
0.41966819763183594,
-0.32285162806510925,
-0.26724931597709656,
-0.5660632252693176,
-0.14952020347118378,
0.7688866853713989,
-0.23714356124401093,
0.34902372956... | |
even if I flush or close the session and open a new session):
```
temporalAsset.add(value1);
temporalAsset.getContent().size() == 1; // true
session.update(temporalAsset);
session.refresh(temporalAsset);
temporalAsset.getContent().size() == 1; // true
temporalAsset.remove(value1);
temporalAsset.getContent().... | [
0.0697057694196701,
-0.3014996647834778,
0.7918483018875122,
-0.1304956078529358,
0.27803942561149597,
0.20918993651866913,
0.5042243599891663,
-0.2148558348417282,
-0.4370183050632477,
-0.3027142286300659,
-0.2803482413291931,
0.24200156331062317,
-0.13035403192043304,
0.5688387155532837,... | |
to the Hibernate
> reference guide for the semantics of
> orphan delete) | [
-0.02365671470761299,
-0.21158088743686676,
0.3776843845844269,
0.034031156450510025,
-0.02788294106721878,
0.03270198032259941,
0.5256816148757935,
-0.3868294358253479,
0.14903683960437775,
-0.5490862131118774,
-0.4682908058166504,
0.17346471548080444,
-0.21148492395877838,
0.037017151713... | |
What conventions are people here following for naming of instance variables and method arguments - particularly when method arguments are used to set ivars (instance variables)?
In C++ I used to use the `m_` prefix for ivars a lot. In C# I followed the convention of disambiguating purely by use of `this.` for ivars. I... | [
0.13080525398254395,
0.3285582661628723,
0.1475570946931839,
-0.20647422969341278,
-0.5585097074508667,
-0.13381409645080566,
0.23043397068977356,
0.04937506839632988,
-0.29666727781295776,
-0.3096012771129608,
-0.08751169592142105,
0.6309123039245605,
-0.3684656322002411,
-0.0517612472176... | |
prefix for args!), so I'm interested to hear what the majority say - especially from those who have been using ObjC for a while.
I did some due diligence before posting this and a couple of good resources I found where:
* [This style guide](http://cocoadevcentral.com/articles/000083.php) (briefly mentions my subject)... | [
0.037022802978754044,
0.2937432527542114,
0.5588546991348267,
-0.16765709221363068,
-0.7304161787033081,
-0.033718325197696686,
0.39463376998901367,
-0.17025460302829742,
-0.6891486644744873,
-0.13737499713897705,
0.04095955565571785,
0.34813612699508667,
-0.17843055725097656,
-0.127500638... | |
and discussion points. I'm not closing this, but will just say that, as I indicated in my comments to the accepted answer, I've gone with the convention of prefixing init args with `the` (and setter args with `new`, which I was doing anyway). This seems to be the best balance of forces - even if I'm not keen on the aes... | [
-0.21337494254112244,
0.30822625756263733,
0.31906935572624207,
-0.04987981170415878,
-0.4705345928668976,
0.032555434852838516,
-0.17174774408340454,
-0.046988438814878464,
-0.3322020173072815,
-0.3599458932876587,
-0.237595796585083,
0.48542356491088867,
-0.09642428904771805,
-0.08649667... | |
The assumption is that you shouldn't (usually) be accessing instance variables directly. Mostly this is because doing so circumvents the Key-Value Observing machinery in Cocoa. Rather, the expectation is that you'll access and mutate properties via getter/setter methods. In Objective-C 2.0, it's easy to declare these p... | [
-0.025440894067287445,
0.2904270887374878,
0.11360833793878555,
0.17802798748016357,
0.04141419008374214,
-0.3339875340461731,
0.1846543848514557,
0.10323939472436905,
-0.2887878715991974,
-0.6205516457557678,
-0.2946958541870117,
0.7569740414619446,
-0.34348034858703613,
0.048438552767038... | |
`-init` and `-dealloc` methods:
```
@interface MyObject : NSObject
{
id ivar;
}
@property (retain,readwrite) id ivar; //or whatever retain/copy/assign and read/readwrite makes sense
@end
@implementation MyObject
@synthesize ivar;
- (id)initWithIvar:(id)theIvar {
if(self = [super init]) {
ivar = theIvar;
... | [
-0.3261251151561737,
0.05369511619210243,
0.5361851453781128,
-0.2894718647003174,
-0.2175906002521515,
0.0026797691825777292,
0.16812627017498016,
-0.7824697494506836,
-0.05529072880744934,
-0.4422317445278168,
-0.12659724056720734,
0.6387259364128113,
-0.5549278855323792,
0.0888115614652... | |
ivar]` and `[self setIvar:newValue]`).
It would seem that methods other than `-initWithXX` shouldn't have the naming conflict. If they do, shouldn't they be refactored to not have that parameter or for the Class to not have the instance variable?
This leaves just the `-initWithXX` methods where you would often find a... | [
-0.19769498705863953,
0.12341902405023575,
0.3321666121482849,
-0.18943507969379425,
-0.6833981871604919,
-0.024391615763306618,
0.4397112727165222,
-0.26455166935920715,
-0.16472186148166656,
-0.4209384322166443,
-0.06680652499198914,
0.6360198855400085,
-0.28811001777648926,
0.2160539180... | |
may have to explicitly set the `_ivar` as the backing). | [
0.05046790465712547,
0.3084576725959778,
0.3840782046318054,
-0.08704917132854462,
0.14246660470962524,
0.09931507706642151,
0.06805720180273056,
-0.3365389406681061,
-0.028614358976483345,
-0.025558125227689743,
-0.5307035446166992,
0.5439525246620178,
-0.12205230444669724,
-0.03471297025... | |
I'm concerned that the web hosting that I'm paying for is not configured correctly. ASP.NET Web Sites which compile and run correctly on my local machine don't work once they're deployed.
The issue I'm dealing with is a compilation error: CS0246, "Type or namespace could not be found (Are you missing a 'using' directi... | [
0.2524406313896179,
0.6645022630691528,
0.23306654393672943,
-0.10170216113328934,
0.23330846428871155,
-0.09503664821386337,
0.5534406900405884,
-0.3050801753997803,
-0.37540680170059204,
-0.6323776245117188,
-0.10184632986783981,
0.5339363217353821,
-0.2950078845024109,
0.055195871740579... | |
mode. The compilation error screen may be viewed at <http://kivin.ca/websitedemo/>
Best regards.
-- update:
If it helps troubleshoot this error, I've got the behaviour that occurs when I attempt to deploy an ASP.NET WebApplication instead of Website.
In the case that my aspx file includes a @Page direct like this:
... | [
0.27987760305404663,
0.0965951457619667,
0.6690720319747925,
-0.14758102595806122,
-0.16105595231056213,
-0.20819459855556488,
0.9091821908950806,
-0.105132557451725,
-0.21635378897190094,
-0.6461812853813171,
-0.33627015352249146,
0.9991737604141235,
-0.23321208357810974,
-0.1941495686769... | |
It's most appreciated. I've been in contact with a specialist at my web hosting company and they've advised me that this isn't a code or server configuration error, but just a missed step in my control panel.
Setting my website working directory as a virtual dir resolved the issue.
Thanks to the stack overflow communi... | [
-0.02039177343249321,
-0.020694568753242493,
0.3581789433956146,
0.022545725107192993,
-0.02434631809592247,
0.22112980484962463,
0.44544264674186707,
0.4818987250328064,
-0.2115153819322586,
-0.6272419691085815,
0.012217570096254349,
0.5068488121032715,
0.4681300222873688,
0.2217181026935... | |
I am writing a webapplication which will have widgets like iGoogle does (but with different information ;)). Since there will be different colomns I would love to hear your ideas on how to call the modules in the code. I want to define in the database what widgets are enabled and in what column they are and in what ord... | [
0.6055521965026855,
0.06862152367830276,
0.274649053812027,
0.0637018159031868,
-0.07439582794904709,
-0.23925170302391052,
0.06459226459264755,
-0.06518130004405975,
-0.323350191116333,
-0.8012766242027283,
0.2787547707557678,
0.5318819880485535,
-0.060077816247940063,
-0.1296159774065017... | |
in them and with require\_once I would include the file and execute a default command like:
```
echo ExampleWidgetClass::run();
```
Your approach sounds reasonable: insist on a well-defined interface for each widget, and then invoke that method (or those methods) for each registered widget. Some things to keep in mi... | [
0.5772435069084167,
0.06582827121019363,
0.30678343772888184,
0.16904190182685852,
0.09431808441877365,
-0.32450881600379944,
0.11762671172618866,
-0.4682106077671051,
-0.27561673521995544,
-0.5923959612846375,
-0.17395365238189697,
0.8148643970489502,
-0.3552846908569336,
-0.2754727602005... | |
request backend calls be made in a batch before the page is rendered. dispatching multiple backend requests (such as sql queries) simultaneously can yield better page performance than querying sequentially. | [
-0.027316896244883537,
-0.20305684208869934,
0.30269622802734375,
0.23259665071964264,
-0.23551629483699799,
0.10436525195837021,
0.09678290039300919,
-0.2851064205169678,
-0.2815384864807129,
-0.5990809798240662,
-0.29037806391716003,
0.3700145184993744,
-0.23905518651008606,
0.1284427046... | |
Is it possible to get a fully transparent window in Pygame (see the desktop through it)? I've found how to create a window without a frame, but there doesn't seem to be any obvious way to make it transparent.
I'd be willing to tie into system-specific technology/frameworks as long as there are solutions for both Windo... | [
0.22312010824680328,
0.028161004185676575,
0.3746345341205597,
0.14411628246307373,
-0.2615065574645996,
0.21135662496089935,
-0.07045488804578781,
0.2067776769399643,
-0.4201146364212036,
-0.5985291004180908,
0.07487661391496658,
0.3723370134830475,
-0.16754871606826782,
-0.04800462350249... | |
Although at least on Linux making it transparent is done by the window manager, not the application. | [
0.28283771872520447,
0.0852903500199318,
0.37733492255210876,
0.09966940432786942,
-0.08842737972736359,
-0.4244745969772339,
0.40942254662513733,
0.46484214067459106,
-0.2764647603034973,
-0.6765691637992859,
-0.4125971794128418,
0.5906438231468201,
-0.22676314413547516,
0.108984410762786... | |
```
File "C:\Python25\lib\SocketServer.py", line 330, in __init__
self.server_bind()
File "C:\Python25\lib\BaseHTTPServer.py", line 101, in server_bind
SocketServer.TCPServer.server_bind(self)
File "C:\Python25\lib\SocketServer.py", line 341, in server_bind
self.socket.bind(self.server_address)
File... | [
-0.06220833957195282,
0.5426244139671326,
0.16373416781425476,
-0.19916008412837982,
0.17777509987354279,
0.1899353265762329,
0.43403854966163635,
-0.01594914309680462,
-0.051807951182127,
-0.6230133771896362,
-0.12215996533632278,
0.5484691858291626,
-0.6269786953926086,
0.013049691915512... | |
or something. Try increasing the portnumber or use a user with sufficient privileges.
Hope this helps | [
0.37086889147758484,
-0.18285132944583893,
0.3868404030799866,
0.25129663944244385,
0.26822414994239807,
0.002496413653716445,
0.33617863059043884,
0.2093043327331543,
-0.1688718944787979,
-0.5193486213684082,
0.026362942531704903,
0.5986992120742798,
0.04090116545557976,
0.027179658412933... | |
**Question:**
* What is the **difference** between:
+ `vector<string>` and `vector<char *>`?
* How would I pass a value of data type: `string` to a function, that specifically accepts:
+ `const char *`?
For **instance**:
```
vector<string> args(argv, argv + argc);
vector<string>::iterator i;
void foo (const... | [
0.03684765473008156,
-0.0015483343740925193,
0.476686030626297,
0.12688954174518585,
-0.18759281933307648,
0.05560630187392235,
0.04548853635787964,
-0.17009292542934418,
-0.11017164587974548,
-0.5280033349990845,
-0.06407526880502701,
0.36630377173423767,
-0.39100900292396545,
0.060221586... | |
with allocation and deallocation functionality.
If you store `std::string`'s in a vector, or anywhere else, then everything will *just work*.
If you store char pointers, you have to do all the hard work of allocating and freeing memory, and ensuring the pointers only ever point to meaningful string data, and determin... | [
0.10239455103874207,
-0.17827798426151276,
0.02164771594107151,
-0.07141874730587006,
0.026180315762758255,
-0.0306473970413208,
-0.09912408888339996,
-0.22733990848064423,
-0.3966466784477234,
-0.5515975952148438,
-0.19783370196819305,
0.5739392042160034,
-0.45065557956695557,
-0.01155790... | |
When Silverlight downloads the assemblies in your app can it be made to download them as zipped files and then uncompress them before running? This would speed up the download time for a large application.
afaik silverlight 2 xap files are already zip compressed. So unless I misunderstood you there should not be much o... | [
0.47831249237060547,
0.03965142369270325,
0.19466058909893036,
-0.15554025769233704,
-0.25025177001953125,
-0.39092645049095154,
0.16786061227321625,
-0.4317324459552765,
-0.3971352279186249,
-0.48030662536621094,
-0.08050722628831863,
0.49704089760780334,
-0.7354061007499695,
-0.229583054... | |
;)
[Dynamically Loading an Assembly](http://www.silverlightshow.net/items/Silverlight-Dynamically-Loading-an-Assembly.aspx) | [
0.3641135096549988,
-0.15552756190299988,
0.23625557124614716,
-0.08060716092586517,
0.06561075150966644,
0.0026420149952173233,
0.1558840572834015,
-0.2371254712343216,
-0.8098849058151245,
-0.08680552989244461,
-0.2960245609283447,
0.10423007607460022,
-0.3132597506046295,
0.125482186675... | |
What I don't understand about C/C++ is:
Yes, everyone uses it to get blazingly fast executables, so they compile with optimization turned on.
But for compilation with debug information turned on, we don't care about speed. So why not include more information in that compile mode, for example detect some segfaults be... | [
0.1788993924856186,
0.1535569429397583,
-0.08641552925109863,
0.103535957634449,
-0.3135048747062683,
-0.3947448134422302,
0.338800847530365,
-0.1043892353773117,
-0.10639888793230057,
-0.1850576251745224,
-0.057803768664598465,
0.7625871896743774,
-0.31212401390075684,
-0.1814910173416137... | |
doesn't do anything that the report of `segmentation fault` wouldn't already do. But what I have in mind is just a more graceful and informative abort, which prints the file name and line number of the offending code, just like an `assert()` would do.
There are a few major problems with your suggestion:
What condition... | [
0.1331339329481125,
0.02919437363743782,
0.007916673086583614,
0.025420811027288437,
-0.016462577506899834,
-0.2953079640865326,
0.26355019211769104,
-0.20619066059589386,
-0.40632525086402893,
-0.4770682454109192,
-0.21641115844249725,
0.41193392872810364,
-0.32961878180503845,
0.12971355... | |
most insidious bugs are due to invalid pointer access, rather than `NULL` pointers.
The C and C++ programming languages provide enough flexibility so it is impossible for a runtime to determine with 100% success if a given random address is a valid pointer of an arbitrary type.
What would you like the runtime environ... | [
-0.11070196330547333,
-0.05627695843577385,
0.05634482949972153,
0.20549975335597992,
0.40298131108283997,
-0.2786986529827118,
0.5804443359375,
0.27731332182884216,
-0.4383232295513153,
-0.5379882454872131,
-0.09680698066949844,
0.15199993550777435,
-0.6610332131385803,
0.2360306084156036... | |
dump can be used by application developers to determine the state of the program when it crashed.
What you're advocating actually sounds like you want to run your application in a debugger (`gdb`) or through some form of virtualization (`valgrind`). This is already possible, but it makes no sense to do it by default, ... | [
0.6972605586051941,
0.038833484053611755,
-0.15685981512069702,
0.24713872373104095,
-0.22537565231323242,
-0.4492416977882385,
0.07451885938644409,
-0.0023940643295645714,
-0.21472500264644623,
-0.15599282085895538,
0.07088589668273926,
0.41429439187049866,
-0.5184864401817322,
0.20054663... | |
a script that does this for you transparently. | [
0.5022803544998169,
-0.017759334295988083,
-0.06125514954328537,
0.4155590236186981,
-0.049095213413238525,
0.020185982808470726,
0.2187579721212387,
0.2059553563594818,
0.12508778274059296,
-0.6157458424568176,
-0.035815510898828506,
0.42713746428489685,
-0.054749276489019394,
-0.24228906... | |
I'm using mod\_rewrite to change all the URLs on a site. Example: `http://www.site.com/about/` becomes `http://www.site.com/?action=about` (don't worry, I have nice friendly sanity checking). The problem is that for anything other than `http://www.site.com/` the CSS stylesheet won't load. I assume this is because it lo... | [
0.4037693738937378,
0.1685393899679184,
0.800894558429718,
-0.24475796520709991,
-0.09756743162870407,
-0.15880265831947327,
0.39013993740081787,
-0.0970018282532692,
-0.3033463954925537,
-0.8012203574180603,
-0.10835421085357666,
0.5683284997940063,
-0.34688663482666016,
0.283586919307708... | |
<link rel="stylesheet" href="content/style.css" type="text/css" />
</head>
<body>
...
</body>
</html>
```
Try this.
```
<link rel="stylesheet" href="/content/style.css" type="text/css" />
``` | [
0.1958850473165512,
0.01084141619503498,
0.5194092392921448,
-0.04624003916978836,
-0.11940523236989975,
-0.19491620361804962,
0.06111091002821922,
-0.23747368156909943,
-0.21997511386871338,
-0.9087479710578918,
-0.27577900886535645,
0.33011218905448914,
-0.10637951642274857,
-0.157852053... | |
In C++ you can often drastically improve the readability of your code by careful usage of the "using" keyword, for example:
```
void foo()
{
std::vector< std::map <int, std::string> > crazyVector;
std::cout << crazyVector[0].begin()->first;
}
```
becomes
```
void foo()
{
using namespace std; // limited... | [
0.4512155055999756,
-0.028759807348251343,
0.08311820775270462,
0.005831475835293531,
0.051713909953832626,
-0.5211080312728882,
0.13428957760334015,
-0.15072990953922272,
0.0426570288836956,
0.0697830468416214,
-0.14681071043014526,
0.5841265320777893,
-0.7333158850669861,
-0.181483522057... | |
Python does have the construction
```
from X import *
```
but you can also explicitly specify which names you want imported from the module (namespace):
```
from X import foo, bar, blah
```
This tends to make the code even more readable/easier to understand, since someone seeing an identifier in the source doesn'... | [
0.29319676756858826,
0.325715035200119,
0.009484931826591492,
-0.3486317992210388,
-0.15092530846595764,
-0.11940477043390274,
0.12358322739601135,
0.09681791067123413,
-0.4514004588127136,
-0.15039359033107758,
-0.1119241714477539,
0.735910952091217,
-0.6221072673797607,
-0.07023113965988... | |
usually use a mixture of the `from X import y` and `import X.y` forms, whatever I feel makes my code clearest. It's certainly a subjective thing to some extent. | [
0.6830971837043762,
0.3749246597290039,
-0.20278866589069366,
0.032694749534130096,
-0.2997049391269684,
-0.18540076911449432,
0.086088627576828,
0.19924047589302063,
0.2004675418138504,
-0.24417701363563538,
-0.43770459294319153,
0.45155736804008484,
-0.2691245973110199,
0.052895408123731... | |
Which Express edition is best suitable for starting ASP.NET web applications in C#? I imagine Visual Web Developer Express is designed for this, but what about Visual C# Express?
For web dev / practice, I would recommend [Visual Web Developer Express](http://www.microsoft.com/express/download/), [Visual Studio Express ... | [
0.048065025359392166,
-0.09967328608036041,
0.3377234637737274,
-0.0038506058044731617,
-0.4890850782394409,
-0.00539360661059618,
-0.013122939504683018,
-0.12168087810277939,
-0.22948773205280304,
-0.5971600413322449,
-0.04881324619054794,
0.3531857132911682,
-0.4033832252025604,
-0.30440... | |
apps. | [
0.3900398910045624,
0.09705556929111481,
0.09251442551612854,
0.2694492042064667,
0.12628518044948578,
0.038907241076231,
0.022628141567111015,
0.24261929094791412,
-0.2353534996509552,
-0.8346271514892578,
-0.4605443477630615,
0.38536420464515686,
-0.1420823335647583,
-0.08421479165554047... | |
It seems to me that it is more prevalent in asp.net to be "virtual directory agnostic" by always using virtual directory substitution "~/" form for paths, but this doesn't seem to be a big deal for other platforms where absolute paths are more common. I might name django as one.
Is it bad form to use absolute urls in ... | [
0.2595987021923065,
0.04810343682765961,
0.2729227542877197,
0.21166294813156128,
-0.22165903449058533,
-0.686541736125946,
0.2668039798736572,
0.4887276589870453,
-0.35947853326797485,
-0.4655856192111969,
-0.315100759267807,
0.39460110664367676,
-0.10910958051681519,
0.1576150506734848,
... | |
to copy the application over from a test or development environment and not have to worry about absolute references breaking because of server name changes. | [
0.3615099787712097,
0.1657133549451828,
0.24345402419567108,
0.4585653245449066,
0.1815461665391922,
-0.38886380195617676,
0.2820349633693695,
0.00924031250178814,
-0.10095643252134323,
-0.6206480264663696,
-0.1376100778579712,
0.4659709334373474,
-0.03723430633544922,
0.06969936192035675,... | |
I'm just started to read up on LINQ and I want to start incorporating it into my code. I know how to compute the sum of a DataTable's column by either "Foreach"-ing through the rows or by doing a compute.sum on the specific column. How do I do the equivalent with LINQ to DataSet?
If untyped (replace `int` with the corr... | [
-0.15651440620422363,
0.2391560971736908,
0.6264256238937378,
-0.1724124401807785,
-0.2013212889432907,
0.16866713762283325,
-0.03240537643432617,
-0.5190892815589905,
-0.10321421176195145,
-0.33906346559524536,
-0.041262563318014145,
0.39041927456855774,
-0.29587844014167786,
-0.031753763... | |
In my initial basic tests it is perfectly safe to do so. However, it has struck me that attempting to manipulate `this` later in a function that `delete`s `this` could be a runtime error. Is this true, and is it normally safe to `delete this`? or are there only certain cases wherein it is safe?
`delete this` is legal a... | [
-0.049502015113830566,
-0.14630478620529175,
0.06695770472288132,
-0.09708168357610703,
0.24569818377494812,
-0.2706821858882904,
0.5946395397186279,
-0.20051303505897522,
0.17966729402542114,
-0.4143388867378235,
-0.36920270323753357,
0.7689037919044495,
-0.17193230986595154,
0.1496295183... | |
dereferencing using the class's member variables.
It is usually found in reference-counted classes that, when the ref-count is decremented to 0, the `DecrementRefCount()`/`Release()`/whatever member function calls `delete this`.
`delete this` is typically considered very bad form for many reasons. It is easy to accid... | [
-0.07755737751722336,
-0.12186820060014725,
-0.016162240877747536,
-0.05092579126358032,
-0.07178539782762527,
-0.416904479265213,
0.5750722885131836,
-0.17228040099143982,
-0.08580558747053146,
-0.5057263374328613,
-0.4076036810874939,
0.529248058795929,
-0.1922846883535385,
0.70467001199... | |
object, but class B is later freeing it[self]. | [
-0.5554167628288269,
-0.11763334274291992,
0.03669131174683571,
0.14401808381080627,
-0.29796773195266724,
0.04560597613453865,
0.4194064140319824,
0.051653169095516205,
-0.2759997844696045,
-0.5183357000350952,
-0.20477819442749023,
0.21962514519691467,
-0.2245776504278183,
0.330161601305... | |
I want to be able to debug C structures without having to explicitly type every property that they consist of.
i.e. I want to be able to do something like this:
```
CGPoint cgPoint = CGPointMake(0,0);
NSLog(@"%@",cgPoint);
```
Obviously the '%@' won't work, hence the question.
You can try this:
```
NSLog(@"%@", NS... | [
0.1698666214942932,
0.3335123658180237,
0.46250051259994507,
-0.05382291600108147,
0.07315145432949066,
-0.2094653695821762,
0.13780659437179565,
-0.05058811977505684,
-0.029173260554671288,
-0.640207052230835,
-0.17114220559597015,
0.7239102125167847,
-0.35198521614074707,
0.1127961426973... | |
What different ways are Machine Keys useful in asp.net?
I think the following are correct but thought there may be more.
1. Multiple applications can use the same cookie
2. Multiple servers can work with the same viewstate
MachineKey is used for:
* ViewState encryption and validation
* Forms Authentication (or Federa... | [
0.19630004465579987,
-0.21985091269016266,
0.559464693069458,
0.4452057480812073,
0.029889743775129318,
-0.1198105588555336,
0.07319258153438568,
-0.43341064453125,
-0.3069435954093933,
-0.783080518245697,
0.10961486399173737,
0.48140251636505127,
-0.3824280798435211,
-0.05489063262939453,... | |
I converted a function to a template, and started getting this error. I must not be understanding a limitation of templates. Can someone tell me why this is broken?
I am receiving this error:
```
Undefined symbols:
"bool foo<int>(int const&, int const&)", referenced from:
_main in file1.o
ld: symbol(s) not fo... | [
0.052527882158756256,
0.131360724568367,
0.31360000371932983,
-0.36785367131233215,
0.4192887842655182,
0.22196008265018463,
0.7347934246063232,
-0.4239576756954193,
-0.028264416381716728,
-0.7401319146156311,
-0.004031206946820021,
0.7026228904724121,
-0.7239199280738831,
-0.1342034488916... | |
<< "foo!" << std::endl;
return 0;
}
```
And the second file contains:
```
template <class T> bool foo (const T& left, const T& right)
{
return true;
}
```
For the reason Uri gave, template methods are usually defined in the header file. Because yours is a function and not a method of a class, explicitly define... | [
0.2573847472667694,
0.15399979054927826,
0.4189405143260956,
-0.26337572932243347,
0.18574891984462738,
0.028630072250962257,
0.19096121191978455,
-0.38987836241722107,
-0.21524657309055328,
-0.43408069014549255,
-0.3290921449661255,
0.25062403082847595,
-0.6501867175102234,
0.009003008715... | |
int right = 2;
if (foo <int> (left, right))
std::cout << "foo!" << std::endl;
return 0;
}
```
The cpp code now sees the whole declaration of the template function.
Other solutions are listed here: [How can I avoid linker errors with my template functions?](http://www.parashift.com/c++-faq-lite/templates.ht... | [
0.16133232414722443,
0.12888813018798828,
0.4838247299194336,
-0.2505005896091461,
0.13827507197856903,
0.1570713222026825,
0.4170243740081787,
-0.7885059714317322,
-0.3957643508911133,
-0.3084850013256073,
-0.18833795189857483,
0.4960648715496063,
-0.3241167664527893,
0.002871269825845957... | |
I have a simple cocoa user interface with a list of items and a search field, implemented using NSTableView and NSSearchField, respectively. The data source and all of the bindings are set up and working nicely. I see my data in the list, and I can search through it by typing strings in the search field. As I type in m... | [
0.16992363333702087,
0.19869686663150787,
0.29251745343208313,
0.03502490371465683,
-0.06628967821598053,
0.10161751508712769,
-0.040396206080913544,
-0.04890117049217224,
-0.5414339900016785,
-0.7441647052764893,
0.028172995895147324,
0.4036068320274353,
-0.010323676280677319,
0.309870392... | |
to normal? I can make this happen by clearing the text manually (using the keyboard), but when I try to do it programmatically, the hidden items in the list do not come back.
I'm using this:
```
[searchField setStringValue:@""];
```
to clear the text in the search field, but it does not reset the list.
Any ideas? ... | [
0.23477144539356232,
-0.2075507640838623,
0.41912975907325745,
-0.009570582769811153,
0.22305947542190552,
-0.1347043216228485,
0.6420567631721497,
-0.08030923455953598,
-0.08334784209728241,
-0.37887200713157654,
-0.3220699429512024,
1.0900636911392212,
-0.5497626662254333,
-0.50424128770... | |
I have the following line of code in VS2008.
```
VirtualPathData virtualPathData =
RouteTable.Routes.GetVirtualPath(_viewContext.RequestContext,
"Home",
pageLinkValueDictionary);
```
I wish to debug this `GetVirtualpath(..)` method .. to see what it's trying to do.
I'm assuming I need... | [
0.14766047894954681,
-0.0931805968284607,
0.7245755195617676,
-0.10533968359231949,
0.21488551795482635,
-0.14358070492744446,
0.6258907318115234,
-0.28025323152542114,
-0.2586701810359955,
-0.9956514239311218,
-0.05283861979842186,
0.5969968438148499,
-0.37220677733421326,
-0.058322660624... | |
a breakpoint on that line about and debug-run. When I hit the line, I manually load in `System.Web.Routing(..)` from *MS Symbol server*. This works (the pdb is downloaded locally) and when i step INTO this line, I goto some Dissassemler code :(
Can anyone see what I'm doing wrong?
That the symbols file is downloaded d... | [
0.28827476501464844,
0.007642428856343031,
0.30596497654914856,
-0.005870773922652006,
-0.10846632719039917,
-0.06468721479177475,
0.2842933237552643,
-0.19439567625522614,
-0.03431645780801773,
-0.7209399938583374,
-0.19046996533870697,
0.34528428316116333,
-0.29737958312034607,
-0.184642... | |
etc), ASP.NET
> (System.Web), Windows Forms
> (System.Windows.Forms), ADO.NET
> (System.Data), XML (System.Xml), and
> WPF (System.Windows). We'll then be
> adding more libraries in the months
> ahead (including WCF, Workflow, and
> LINQ). The source code will be
> released under the Microsoft Reference
> License (MS-R... | [
0.564931333065033,
-0.152583047747612,
0.6849015951156616,
0.06478128582239151,
-0.03914603590965271,
-0.2597901523113251,
0.13771721720695496,
-0.251455157995224,
-0.3169703185558319,
-0.7434170842170715,
-0.3684016168117523,
0.35692521929740906,
-0.4246369004249573,
0.09008817374706268,
... | |
Here's what I'm working with:
* Several websites
* Classes/data shared between them (registration systems on individual sites, and management on a central site)
* A workflow application that runs nightly.
I need to be able to cleanly and easily share the classes between the websites and workflow component. I know thi... | [
0.6253459453582764,
0.1487622857093811,
0.0802210196852684,
0.07838065177202225,
-0.2041930854320526,
-0.43644604086875916,
0.20772290229797363,
0.11041025072336197,
-0.3793410062789917,
-0.5487159490585327,
0.062252528965473175,
0.4182211756706238,
0.14568112790584564,
0.1286640167236328,... | |
same solution. Am I nuts?
Here was the problem I was running into. In Visual Studio 2008, the Solution View is hidden by default, making it hard to add other projects, websites, etc.
[Enabling the Solution View](http://blogs.msdn.com/sayanghosh/archive/2008/02/09/visual-studio-2008-does-not-show-solution-view-when-th... | [
-0.6504257321357727,
0.024665605276823044,
0.4313746392726898,
-0.0280140470713377,
-0.0750826969742775,
0.027302181348204613,
0.22134681046009064,
0.17397964000701904,
-0.5326305627822876,
-0.37789618968963623,
-0.14406774938106537,
0.4869638681411743,
-0.5457746982574463,
-0.053540732711... | |
I'm having some trouble with a particular piece of code, if anyone can enlighten me on this matter it would be greatly appreciated, I've isolated the problem down in the following sample:
```
#include <iostream>
using namespace std;
class testing{
int test();
int test1(const testing& test2);
};
int testing::t... | [
0.21048347651958466,
0.4470357298851013,
-0.08985568583011627,
0.051327209919691086,
-0.018975380808115005,
-0.05364840850234032,
0.5253512263298035,
-0.27036866545677185,
-0.04141153022646904,
-0.3362593948841095,
-0.16726937890052795,
0.6036584377288818,
-0.2853744328022003,
0.0203940104... | |
a parameter `const testing &test2`. So within `testing::test1`, `test2const`. Then in the first line of the function:
```
test2.test()
```
The `testing::test` function is called on `test2`. That function is not declared with `const` at the signature end, so it may modify the object it is called on (the `this` pointe... | [
0.16218000650405884,
0.18561340868473053,
0.05536748841404915,
-0.08796036243438721,
-0.04420017451047897,
-0.07279510051012039,
0.1748865693807602,
-0.2128671258687973,
0.15986330807209015,
-0.17619960010051727,
-0.11842081695795059,
0.5921424031257629,
-0.3582386076450348,
0.083668015897... | |
of ‘int testing::test()’ discards qualifiers
```
`this` refers to the object the member function (`testing::test`) operates on, and in this case it is not `const`, because `testing::test` was not declared with `const`, and thus the mismatch is detected when trying to make a non-`const` pointer (`this`) refer to a `co... | [
0.009220161475241184,
0.18623167276382446,
-0.20218729972839355,
-0.0541575625538826,
-0.030124789103865623,
-0.19696636497974396,
0.3657269775867462,
-0.28406351804733276,
0.1052003875374794,
-0.3746979236602783,
-0.2310602217912674,
0.38277673721313477,
-0.24299557507038116,
0.1145059093... | |
intended functionality is). If it should, then obviously calling it on a `const` object is bad, although you can use `const_cast` to ask the compiler to override that, but this is dangerous. If it should not, then mark it `const`, so that it can be called on `const` objects as well:
```
class testing{
int test1() ... | [
0.3509315252304077,
-0.02039789967238903,
-0.12149139493703842,
-0.19615869224071503,
0.04046906903386116,
-0.3534705638885498,
0.5976073145866394,
-0.37209826707839966,
0.20458033680915833,
-0.46368929743766785,
-0.2634015679359436,
0.5140976905822754,
-0.41705116629600525,
0.010909910313... | |
I know that according to C++ standard in case the new fails to allocate memory it is supposed to throw std::bad\_alloc exception. But I have heard that some compilers such as VC6 (or CRT implementation?) do not adhere to it. Is this true ? I am asking this because checking for NULL after each and every new statement ma... | [
0.23930872976779938,
0.30075603723526,
-0.16090816259384155,
-0.14735804498195648,
-0.2390488237142563,
-0.09226075559854507,
0.3555387258529663,
-0.08808598667383194,
-0.26561543345451355,
-0.5096151828765869,
-0.10479503124952316,
0.6473383903503418,
-0.2954723536968231,
0.24350631237030... | |
on failure in Visual C++](http://support2.microsoft.com/kb/167733/en-us)
If you have old code that was written for VC6 behavior, you can get that same behavior with newer MSVC compilers (something like 7.0 and later) by linking in a object file named `nothrownew.obj`. There's actually a [fairly complicated set of rule... | [
0.0726737454533577,
0.45409831404685974,
0.09627793729305267,
-0.2015305608510971,
-0.22762446105480194,
-0.13129214942455292,
0.893242597579956,
-0.07678089290857315,
-0.5883524417877197,
-0.46050530672073364,
-0.1526617854833603,
0.6417098045349121,
-0.41645100712776184,
0.33153608441352... | |
throwing `std::bad_alloc` using the `std::nothrow` parameter:
```
SomeType *p = new(std::nothrow) SomeType;
```
This appears to work in VC6, so it could be a way to more or less mechanically fix the code to work the same with all compilers so you don't have to rework existing error handling. | [
0.31971976161003113,
0.20523296296596527,
0.032649703323841095,
-0.16913248598575592,
-0.23313923180103302,
-0.21021467447280884,
0.4741173982620239,
-0.21730738878250122,
-0.2070360630750656,
-0.473503977060318,
-0.09610868990421295,
0.5512568354606628,
-0.28975266218185425,
0.27384066581... | |
I am trying to access entity class but getting the error message "No overload method for CreateDoctor takse 3 argument" Here is my code please modify somebody..
DoctorProperty class:
```
public class DoctorProperty //class for doctor table
{
int _Id;
string _Name;
string _Address;
int _Phone;
publi... | [
0.32582375407218933,
0.2949191927909851,
0.5186957716941833,
-0.10718107968568802,
0.23708148300647736,
0.15336258709430695,
0.30643346905708313,
-0.115782231092453,
0.32144132256507874,
-0.8497658371925354,
-0.0008553950465284288,
0.5959994792938232,
-0.36196017265319824,
0.56369018554687... | |
}
set
{
_Id = value;
}
}
public string Name
{
get
{
return _Name;
}
set | [
-0.23350216448307037,
-0.30725181102752686,
0.08678220212459564,
-0.12438774853944778,
-0.02150154858827591,
-0.09546133130788803,
0.038036245852708817,
-0.1442413330078125,
0.2556365430355072,
-0.4235513210296631,
-0.3076457381248474,
0.6075722575187683,
-0.4284823536872864,
0.05775738134... | |
{
_Name = value;
}
}
public string Address
{
get
{
return _Address;
}
set
{ | [
-0.2715493142604828,
-0.1492895483970642,
0.18969067931175232,
-0.0852552130818367,
0.003989184740930796,
0.03387054055929184,
0.29437872767448425,
-0.032267335802316666,
0.2651057839393616,
-0.5458042025566101,
-0.3495388329029083,
0.5856653451919556,
-0.34223002195358276,
0.1138420552015... | |
_Address = value;
}
}
public int Phone
{
get
{
return _Phone;
}
set
{
_Phone = value; | [
-0.06766992062330246,
-0.33159586787223816,
0.4081997573375702,
-0.09987747669219971,
0.29351353645324707,
-0.04114016517996788,
0.504756510257721,
-0.17702119052410126,
0.2898003160953522,
-0.6258717179298401,
-0.450937956571579,
0.8270797729492188,
-0.32616478204727173,
-0.08847995102405... | |
}
}
}
Doctor DataLayer:
public class DoctorDataLayer
{
public string str = ConfigurationManager.ConnectionStrings["ConnectionString"].ToString();
public int AddDoctor(DoctorProperty obj)
{
SqlConnection con = new SqlConnection(str);
SqlCommand com =new SqlCommand("insert int... | [
-0.226323202252388,
0.01726185716688633,
0.6929945349693298,
-0.008777051232755184,
-0.007794786244630814,
0.20748382806777954,
0.14538311958312988,
-0.24932827055454254,
-0.08246868848800659,
-0.6815400123596191,
-0.35131511092185974,
0.5075994729995728,
-0.507274866104126,
0.707864463329... | |
public void CreateDoctor(DoctorProperty obj)
{
DoctorDataLayer dl = new DoctorDataLayer();
dl.AddDoctor(obj);
}
}
AdDoctor.aspx.cs
protected void Btnsubmit_Click(object sender, EventArgs e)
{
DoctorBusinessLayer DB = new DoctorBusinessLayer();
DoctorProperty dp = new Doct... | [
0.2882225215435028,
0.06553301215171814,
0.5865578055381775,
-0.09032367914915085,
0.03756020963191986,
0.08705729246139526,
0.289047509431839,
-0.12276071310043335,
-0.16698844730854034,
-0.6224232912063599,
-0.5136643648147583,
0.23784148693084717,
-0.3618023991584778,
0.7982250452041626... | |
formal than that; most xml parsers will respect (for example):
* 2009-02-15
* 2009-02-15T10:20:34.0000000
* 2009-02-15T10:20:34.0000000+00:00
This is always yyyy-MM-dd; the time portion is optional, as is the UTC offset.
(edit: [lucas-insasho](https://stackoverflow.com/questions/550467/date-elements-in-xml/550482#55... | [
0.04301171004772186,
-0.27076244354248047,
0.5432712435722351,
0.22938399016857147,
-0.0814276784658432,
-0.43094250559806824,
0.2490519881248474,
-0.1695018857717514,
-0.20436187088489532,
-0.22714576125144958,
-0.4017443060874939,
0.5002028942108154,
0.227290078997612,
0.1481023132801056... | |
In the answer to question #[56107](https://stackoverflow.com/questions/56107/what-is-the-best-way-to-parse-html-in-c), Erlend provided this sample c# code:
```
using mshtml;
...
object[] oPageText = { html };
HTMLDocument doc = new HTMLDocumentClass();
IHTMLDocument2 doc2 = (IHTMLDocument2)doc;
doc2.write(oPageText);
... | [
-0.10826487839221954,
0.11943965405225754,
0.36351868510246277,
0.0902184471487999,
-0.011166266165673733,
0.19761556386947632,
0.08976857364177704,
-0.35994651913642883,
-0.14565563201904297,
-0.3210524618625641,
-0.07937295734882355,
0.3582141399383545,
-0.32819852232933044,
-0.154308736... | |
opening the "Add Reference" dialog, and looking under the COM tab, not the .NET tab. It's Component Name was Microsoft HTML Object Library. | [
0.15805679559707642,
-0.1703369915485382,
0.5456129312515259,
-0.08223696798086166,
-0.44849908351898193,
-0.01605655811727047,
-0.12120945006608963,
0.14387434720993042,
-0.158321812748909,
-0.33740541338920593,
0.10692783445119858,
0.22909502685070038,
-0.5978692173957825,
0.114421881735... | |
I want to get some ideas on how I might control a video camera through an IP address. I have an API to control pan and tilt from a local machine. The code is going to be in C/C++ on Windows. I am still designing if I want multiple cameras controlled from one application or have a one camera to one application. Would SO... | [
0.35979774594306946,
-0.2092863768339157,
0.5180646181106567,
0.14902041852474213,
-0.14711612462997437,
-0.10479770600795746,
0.06883988529443741,
-0.0775989219546318,
-0.3205215632915497,
-0.45347729325294495,
0.09958261251449585,
0.683199405670166,
-0.10516514629125595,
-0.1280373036861... | |
sounds just like what you need. I'd probably make some kind of application that would be running inside a web-server, since this would handle most of the infrastructure, including authentication if needed. I'm sure both apache and IIS could do this for you quite easily. Even though your API is coded in C you could also... | [
0.5341925024986267,
0.12338234484195709,
-0.20274968445301056,
0.10339508950710297,
0.14540672302246094,
-0.038759905844926834,
0.3055473566055298,
0.33113470673561096,
-0.07106634974479675,
-0.3819039463996887,
0.11023548990488052,
0.5850703716278076,
-0.20056059956550598,
-0.062609672546... | |
I tried to include the following unsuccessfully to my ~/.profile:
```
export PATH='$HOME/opt/git/bin'
```
It seems not to work because $git gives me nothing.
I am trying to install Git.
I have also tried commands [here](https://stackoverflow.com/questions/315911/git-for-beginners-the-definitive-practical-guide/3237... | [
0.48594236373901367,
0.370100736618042,
0.3673347234725952,
-0.4241953492164612,
0.2196727842092514,
-0.09681090712547302,
0.5398426651954651,
-0.22879564762115479,
-0.11026197671890259,
-0.7019925713539124,
-0.1989300549030304,
0.9893638491630554,
-0.28300145268440247,
-0.1631961762905120... | |
So far the `hyperref` package in LaTeX has automatically linked all the items in my report correctly. But there is one that did not get linked properly, possibly because I manually added it to the table of contents like this:
```
\addcontentsline{toc}{chapter}{Bibliography}
```
How do I fix this?
You have to use the... | [
-0.14096210896968842,
-0.0564776174724102,
0.8735775947570801,
0.08672694116830826,
0.24553650617599487,
-0.17201218008995056,
0.24269741773605347,
0.15869620442390442,
-0.5116458535194397,
-0.5070549845695496,
-0.4761105477809906,
0.7945724725723267,
-0.31463348865509033,
0.06592391431331... | |
I’m having some problems with John Guenin's x\_sendfile (<http://john.guen.in/past/2007/4/17/send_files_faster_with_xsendfile/>).
When coding the download of a PDF file, I’m using the following code:
```
def send_the_file(filename)
xsendfile (“#{Rails.root}/doc/” + filename, :type => ‘application/pdf’)
end
```
bu... | [
0.1264207512140274,
0.15673545002937317,
0.48683202266693115,
-0.0171516016125679,
-0.16480183601379395,
-0.3886937201023102,
0.32863497734069824,
0.05489714443683624,
-0.13056008517742157,
-0.8694667220115662,
-0.058325089514255524,
0.7557036876678467,
-0.300713449716568,
0.12160978466272... | |
are you sure that mod\_xsendfile has been installed and configured correctly? | [
0.2028723806142807,
0.14640583097934723,
0.18946287035942078,
-0.05275823175907135,
0.36410465836524963,
-0.2932806611061096,
0.43478214740753174,
0.05739826709032059,
-0.19252178072929382,
-0.38230374455451965,
-0.004369234666228294,
0.8162847757339478,
-0.2825993001461029,
-0.31197917461... | |
How can I exit the JavaScript script much like PHP's `exit` or `die`? I know it's not the best programming practice but I need to.
[JavaScript equivalent for PHP's `die`](https://github.com/kvz/phpjs/blob/master/experimental/misc/die.js). BTW it just calls [`exit()`](https://github.com/kvz/phpjs/blob/master/experimenta... | [
-0.36657682061195374,
0.26144886016845703,
-0.06698761880397797,
0.05582551285624504,
0.07618259638547897,
-0.028550485149025917,
0.44022607803344727,
-0.2601867914199829,
-0.05015608295798302,
-0.47577279806137085,
-0.3980121612548828,
0.06367676705121994,
-0.3773097097873688,
-0.20676352... | |
bugfixed by: Brett Zamir (http://brettz9.blogspot.com)
// % note 1: Should be considered expirimental. Please comment on this function.
// * example 1: exit();
// * returns 1: null
var i;
if (typeof status === 'string') {
alert(status);
}
window.addEventListener('er... | [
0.0995011255145073,
-0.0035494824405759573,
0.07166562229394913,
-0.08211463689804077,
0.7473490238189697,
0.28738144040107727,
0.28717198967933655,
0.19078101217746735,
-0.3226528465747833,
-0.49438855051994324,
0.03561604768037796,
0.1721809208393097,
-1.0508668422698975,
0.0963333249092... | |
'copy', 'cut', 'paste',
'beforeunload', 'blur', 'change', 'click', 'contextmenu', 'dblclick', 'focus', 'keydown', 'keypress', 'keyup', 'mousedown', 'mousemove', 'mouseout', 'mouseover', 'mouseup', 'resize', 'scroll',
'DOMNodeInserted', 'DOMNodeRemoved', 'DOMNodeRemovedFromDocument', 'DOMNodeInsertedInto... | [
-0.46988752484321594,
-0.3345935642719269,
0.8158657550811768,
0.013009834103286266,
0.33848878741264343,
0.31284260749816895,
0.11245398968458176,
-0.14640013873577118,
0.06399013847112656,
-0.3154335618019104,
-0.8506592512130737,
0.8692164421081543,
-0.09562742710113525,
0.1772881001234... | |
}
for (i=0; i < handlers.length; i++) {
window.addEventListener(handlers[i], function (e) {stopPropagation(e);}, true);
}
if (window.stop) {
window.stop();
}
throw '';
}
``` | [
0.0592779703438282,
-0.38336044549942017,
0.4592140018939972,
-0.49869394302368164,
0.26578909158706665,
0.16162624955177307,
0.361865758895874,
-0.36983656883239746,
-0.053151510655879974,
-0.6201992630958557,
-0.49931830167770386,
0.527851939201355,
-0.4846549928188324,
0.127887353301048... | |
I have the following rewrite rules in my `.htaccess` file:
```
RewriteEngine on
RewriteRule ^news/([0-9]+)/?$ /?action=news&start=$1 [L]
RewriteRule ^man/([a-zA-Z0-9_]+)/?$ /?action=man&page=$1 [L]
RewriteRule ^([a-zA-Z0-9_]+)/?$ /?action=$1 [L]
```
All of then end with a `/?` to check for an optional trailing slash... | [
-0.0019304952584207058,
0.0922837182879448,
0.680617094039917,
-0.27142906188964844,
-0.11768171936273575,
0.13852174580097198,
0.4401916265487671,
-0.17770062386989594,
-0.49816635251045227,
-0.5578740239143372,
-0.26057153940200806,
0.375616192817688,
-0.23728784918785095,
0.035740453749... | |
the URL changes and looks all nasty.
Any ideas what's going on with this? I have no other rules in my `.hyaccess` file. I'll also point out that `http://www.site.com/news/0` and `http://www.site.com/news/0/` do not suffer from the same problem. Both of them redirect invisibly to `http://www.site.com/?action=news&start... | [
0.6028496026992798,
0.026300834491848946,
0.5235179662704468,
0.20203691720962524,
-0.28620007634162903,
-0.3428351879119873,
0.5327427387237549,
0.2176964432001114,
-0.23499754071235657,
-0.6334105134010315,
-0.07537972182035446,
0.34372684359550476,
-0.1473940908908844,
0.405616909265518... | |
that's the case,
```
DirectorySlash Off
```
may help. | [
0.15340490639209747,
0.5109717845916748,
0.20628567039966583,
-0.09872384369373322,
0.43640270829200745,
-0.3420751392841339,
0.022461747750639915,
0.3816621005535126,
0.026426801458001137,
-0.3945952355861664,
0.06281755119562149,
0.5902428030967712,
0.06763362884521484,
0.068915620446205... | |
Several processes with the same name are running on host. What is the cross-platform way to get PIDs of those processes by name using **python** or **jython**?
1. I want something like `pidof` but in python. (I don't have `pidof` anyway.)
2. I can't parse `/proc` because it might be unavailable (on HP-UX).
3. I do not... | [
0.19997943937778473,
0.0009844898013398051,
0.2607910633087158,
-0.09082809835672379,
-0.05204452574253082,
0.04370421916246414,
0.06392884999513626,
0.3137984275817871,
-0.3125397264957428,
-0.9821213483810425,
-0.010764085687696934,
0.521489143371582,
-0.7187386155128479,
0.3004260957241... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.