text stringlengths 0 30.5k | title stringclasses 1
value | embeddings listlengths 768 768 |
|---|---|---|
I have a nice chunk of reuable code I'm trying to edit and keep clean of the details. I'd like to be able to edit the NSDate some NSTextField is bound to. The only thing I have is the IBOutlet to the text field. Is this possible?
Microsoft released a powertoy for Windows XP called [Open Command Prompt Here](http://www.... | [
-0.07067620009183884,
-0.483418732881546,
0.6932695508003235,
0.11829336732625961,
0.01605181209743023,
-0.038545746356248856,
0.11006273329257965,
-0.03893706202507019,
0.039550285786390305,
-0.6604062914848328,
-0.326947957277298,
1.0666749477386475,
-0.1273123025894165,
-0.1969424635171... | |
I have recently installed easyPHP at home to do some development work with my computer running as the server (Windows XP).
easyPHP sets up apache, php and mysql to work on your computer. I am having trouble setting the usernames and passwords for the mysql accounts (sadly, I've only ever done this through cPanel).
Th... | [
-0.06879409402608871,
-0.007425662130117416,
0.3063364326953888,
-0.13441628217697144,
-0.011777655221521854,
-0.20769275724887848,
0.09370408207178116,
0.37740686535835266,
-0.10718473047018051,
-1.2140294313430786,
-0.0054543837904930115,
0.660351574420929,
-0.27902787923812866,
-0.16910... | |
use this line to create a password for current user you are logged in:
```
set password = password('mynewpassword');
```
in the above command, the password() function converts the string parameter to a hashed password that will be used by mysql to authenticate users. if you use this line:
```
set password = 'mynewp... | [
-0.20709097385406494,
-0.13121822476387024,
0.6500268578529358,
-0.21770265698432922,
0.2851163148880005,
-0.26643767952919006,
0.2414747178554535,
0.15215465426445007,
0.0912494957447052,
-0.9647090435028076,
-0.3621295988559723,
0.509292721748352,
-0.20942655205726624,
0.3345606923103332... | |
creating a user and securing login with a password, you need to set permissions for the user. use the GRANT command to do this. general syntax is like this:
GRANT {PERMISSIONS} ON db.table TO user@host;
in this command, permissions are a comma separated list of permissions, like SELECT, INSERT, CREATE, DROP, DELETE. ... | [
0.2367209941148758,
-0.08307298272848129,
0.16709241271018982,
0.19594542682170868,
-0.006625031121075153,
-0.3150326609611511,
0.16921855509281158,
-0.33691373467445374,
-0.06546846777200699,
-0.8481268286705017,
-0.19431477785110474,
0.31398606300354004,
-0.3276020884513855,
0.4201894104... | |
permit on all of tables or databases.
example:
```
GRANT ALL ON myDb.* to farzad@localhost;
```
if you have not created a user, or set a password, by using the grant command you can create the user, set the password for him, and grant permissions all at once. syntax is like this:
```
GRANT {PERMISSIONS} ON db.table... | [
0.18886326253414154,
0.3487435579299927,
0.5841109752655029,
0.17717067897319794,
0.16143906116485596,
-0.5236899256706238,
0.14571049809455872,
-0.5979147553443909,
0.00906732864677906,
-0.6353108882904053,
-0.4047037363052368,
0.3263661563396454,
-0.26216745376586914,
0.33106890320777893... | |
The file contains the following data:
```
#10000000 AAA 22.145 21.676 21.588
10 TTT 22.145 21.676 21.588
1 ACC 22.145 21.676 21.588
```
I tried to skip lines starting with "#" using the following code:
```
#include <iostream>
#include <sstream>
#include <fstream>
#include <string>
using namespace std;
i... | [
0.20763632655143738,
-0.0584881566464901,
0.8112497329711914,
-0.09722782671451569,
0.3771011233329773,
0.4095408618450165,
0.4745716452598572,
-0.07348267734050751,
-0.2633625566959381,
-0.4746381640434265,
-0.14870119094848633,
0.5233299136161804,
-0.6566693782806396,
-0.2030484527349472... | |
if (tableEntry.find("#") != tableEntry.npos) {
continue;
}
int data = tableEntry;
}
}
```
But for some reason it gives this error:
> Mycode.cc:13: error: request for
> member 'find' in 'tableEntry', which
> is of non-class type 'int'
Is this more like what you want?
```
#incl... | [
-0.1732766181230545,
-0.2980036735534668,
0.7402101159095764,
-0.35122212767601013,
0.46593883633613586,
0.057600270956754684,
0.15600229799747467,
-0.29249972105026245,
-0.28853631019592285,
-0.5772857666015625,
-0.37601804733276367,
0.4193998873233795,
-0.5507637858390808,
-0.04655241966... | |
{
//the following line trims white space from the beginning of the string
line.erase(line.begin(), find_if(line.begin(), line.end(), not1(ptr_fun<int, int>(isspace))));
if(line[0] == '#') continue;
int data;
stringstream(line) >> data;
cout << "Data: " << data << end... | [
-0.02021392062306404,
-0.2448548674583435,
0.3533724546432495,
-0.5811745524406433,
0.4413861036300659,
0.4042021930217743,
0.14857910573482513,
-0.18683454394340515,
0.04167114198207855,
-0.5564440488815308,
-0.514598548412323,
0.2315288782119751,
-0.3621906638145447,
0.24783022701740265,... | |
This may be very simple, but I have no idea how to do this.
I created a photo gallery in AS3, everything is on one keyframe. In this photo gallery I have a link to home. My goal is, when someone clicks the "home" link I want everything to start over. Any ideas on how to do this in AS3?
Appreaciate it.
L.
call flas... | [
0.3551274240016937,
0.15368293225765228,
0.41681239008903503,
-0.3154105246067047,
-0.3102257251739502,
-0.5266582369804382,
0.2638465166091919,
-0.08032628148794174,
-0.20291125774383545,
-0.7892570495605469,
-0.07709167897701263,
0.672221302986145,
-0.35243576765060425,
-0.01560355722904... | |
object and replace the current flash object
with the new one | [
0.10151723027229309,
0.1679079681634903,
0.39959385991096497,
0.20979930460453033,
-0.05049624294042587,
-0.1743200570344925,
0.07269241660833359,
0.1488381177186966,
-0.20631587505340576,
-0.4260917007923126,
-0.40594246983528137,
0.4283108413219452,
-0.2690270245075226,
0.232729122042655... | |
I have this very simple script that allows the user to specify the url of any site. The the script replaces the url of the "data" attribute on an object tag to display the site of the users choice inside the object on the HTML page.
How could I validate the input so the user can't load any page from my site inside the... | [
0.4492632746696472,
0.23717208206653595,
0.6566672325134277,
-0.0569300502538681,
-0.01775403879582882,
-0.2999890148639679,
0.22946493327617645,
0.06585345417261124,
0.12422023713588715,
-0.7154086232185364,
0.07402613013982773,
0.15729883313179016,
-0.2686249613761902,
0.514220654964447,... | |
fopen(($url),"r") or die ("Can't read input stream");
$text = fread($file,16384);
if (preg_match('/<title>(.*?)<\/title>/is',$text,$found)) {
$title = $found[1];
} else {
$title = "Untitled Document";
}
?>
```
Edit: (more details)
This is NOT meant to be a proxy. I am letting the users decide w... | [
0.0375334657728672,
0.1337168961763382,
0.8387730121612549,
-0.1281726062297821,
0.011112852953374386,
-0.3788609206676483,
0.4143817126750946,
0.09771569073200226,
-0.08243238925933838,
-0.5421200394630432,
-0.17475560307502747,
0.5493471026420593,
-0.14566946029663086,
0.1854834556579589... | |
the user) Although it may display the title of any site, it will not bypass any filters in any other way.
I am also aware of vulnerabilities involved with what I am doing that's why im looking into validation.
As gahooa said, I think you need to be very careful with what you're doing here, because you're playing with ... | [
0.6779670119285583,
0.24271708726882935,
0.11260302364826202,
0.04317271336913109,
0.14436842501163483,
-0.4299076795578003,
0.45508211851119995,
-0.03112626075744629,
-0.031268179416656494,
-0.19087862968444824,
-0.07456716150045395,
0.5740779638290405,
0.026361960917711258,
0.24012315273... | |
for example if someone types "index.php" into the box. All you need to do is make sure that their URL starts with "http://" so that fopen uses the network method, instead of opening a local file. Something like this before the fopen line should do the trick:
```
if (!preg_match('/^http:\/\//', $url))
$url = 'http:... | [
0.02299705147743225,
-0.038659822195768356,
0.5323216319084167,
0.032814279198646545,
0.0712847113609314,
-0.35106992721557617,
0.08719643205404282,
0.11605978012084961,
-0.17099671065807343,
-0.5863849520683289,
-0.21728399395942688,
0.30071723461151123,
-0.1660246104001999,
0.14120157063... | |
I read in a few places that MVC requires Windows Server 2008 for full support. Can the same be achieved on a Vista Ultimate dev machine or will some things be missing?
If you have worked with MVC, have you had trouble finding relatively inexpensive hosting for Windows Server 2008? Though hosting is not as big a concer... | [
0.09196760505437851,
0.06608662009239197,
0.4988769292831421,
0.24890314042568207,
-0.2426169216632843,
-0.4368734061717987,
0.469634085893631,
-0.07224529981613159,
-0.2795024514198303,
-0.46473872661590576,
0.13417573273181915,
0.8613282442092896,
-0.2259448766708374,
0.13578566908836365... | |
some form of url rewriter, otherwise Server 2003 (IIS 6) will not know that you are trying to execute an asp.net app.
What you can do is use the mod\_rewrite [isapirewrite](http://www.isapirewrite.com/) with IIS 6 and you are good to go.
Steve Sanderson wrote a good article [here](http://blog.codeville.net/2008/07/04... | [
0.15746642649173737,
-0.32043492794036865,
0.6691169142723083,
-0.08544894307851791,
0.026130707934498787,
-0.3802741765975952,
0.4753871560096741,
-0.21679814159870148,
-0.2069672793149948,
-0.6467821598052979,
-0.3307148814201355,
0.8125888109207153,
-0.30311906337738037,
-0.118369437754... | |
I have a class that should look something like this:
```
class Family_Type1
@people = Array.new(3)
@people[0] = Policeman.new('Peter', 0)
@people[1] = Accountant.new('Paul', 0)
@people[2] = Policeman.new('Mary', 0)
def initialize(*ages)
for i in 0 ... @people.length
@people[i].... | [
0.4622337222099304,
0.11580459773540497,
0.017151087522506714,
-0.006638193968683481,
0.24925877153873444,
0.18443137407302856,
0.39982837438583374,
-0.2661324739456177,
-0.2484823763370514,
-0.8400669097900391,
0.043932102620601654,
0.22783008217811584,
-0.061570681631565094,
0.3084303140... | |
once at startup) where the size of the array and the type assigned to each parameter is defined at runtime from an external specification file.
I sort of got it to work using evals but this is really ugly. Any better way?
First off, part of the reason your example code isn't working for you is that you have two differ... | [
0.2803953289985657,
0.032955531030893326,
0.13962584733963013,
0.089931420981884,
0.01335979625582695,
0.054718758910894394,
0.1279217153787613,
0.009333773516118526,
-0.17504902184009552,
-0.9509387016296387,
0.14832338690757751,
0.8618859648704529,
-0.35333871841430664,
0.026210457086563... | |
# not instances of that class
self.class #=> Class
self == Example #=> true
@iv = "I'm a class instance variable"
def initialize
# within instance methods, we're in the context
# of an _instance_ of the Example class, so
# instance variables used here belong to that instance.
self.class #=> Exa... | [
0.19357576966285706,
-0.0034541517961770296,
0.34608110785484314,
-0.05500038340687752,
-0.09780848771333694,
-0.02262043207883835,
0.30829450488090515,
-0.34008532762527466,
0.03582002595067024,
-0.3424070477485657,
0.0603129118680954,
0.6905766725540161,
-0.3035354018211365,
0.2787572741... | |
context of the instance
@iv #=> "I'm an instance variable"
end
def self.iv
# a class method, uses the context of the class
@iv #=> "I'm a class instance variable"
end
end
```
If you want to create variables one time in a class to use in instance methods of that class, use `constants` or `class varia... | [
0.2356467992067337,
0.16465753316879272,
0.4080162048339844,
-0.1432182341814041,
-0.24787981808185577,
-0.03071279078722,
0.5424770712852478,
-0.14020410180091858,
-0.1440141797065735,
-0.2856469750404358,
-0.12154790759086609,
0.34127625823020935,
-0.5907414555549622,
0.46949926018714905... | |
# though it's legit to modify the current object
CONSTANT_VARIABLE.capitalize!
CONSTANT_VARIABLE #=> "I'm a constant"
# class variables start with a @@
@@class_variable = "I'm a class variable"
def c_and_c
[ @@class_variable, CONSTANT_VARIABLE ] #=> [ "I'm a class variable", "I'm a constant" ]
end
end... | [
0.39920639991760254,
0.04180314391851425,
0.32714855670928955,
-0.11082043498754501,
-0.12392478436231613,
0.024152342230081558,
0.06123033165931702,
-0.14675775170326233,
-0.32385504245758057,
-0.4541969895362854,
-0.12309038639068604,
0.6022292971611023,
-0.40856820344924927,
0.319609165... | |
that means
# all the Family_Type1 objects will share the same people
@@people = [ Policeman.new('Peter', 0), Accountant.new('Paul', 0), Policeman.new('Mary', 0) ]
def initialize(*ages)
@@people.zip(ages).each { |person, age| person.age = age }
end
# just an accessor method
def [](person... | [
0.17000208795070648,
0.02840220369398594,
0.6944591403007507,
0.02539953961968422,
0.4158272445201874,
0.35476699471473694,
0.24711641669273376,
-0.3513559401035309,
-0.44252318143844604,
-0.6383066177368164,
-0.26227009296417236,
0.006914506200700998,
-0.25883543491363525,
0.4305167198181... | |
#=> false
fam2[0].age == 31 #=> true
fam[0].age == 31 #=> true
```
The runtime initialization can be done with metaprogramming, as Chirantan said, but if you are only initializing a few classes, and you know what their name is, you can also do it just by using whatever you read from the file:
```
PARAMS = File.read(... | [
0.3237376809120178,
0.033818718045949936,
0.4563087224960327,
-0.13526946306228638,
0.19457712769508362,
0.22935189306735992,
0.2501194179058075,
-0.7027247548103333,
-0.39582201838493347,
-0.6797247529029846,
-0.5435328483581543,
0.03471462428569794,
-0.25905150175094604,
0.12358856201171... | |
What is the use of a static class?
I mean what are benefits of using static class and how CLR deals with static classes?
A static class simply denotes that you don't expect or need an *instance*. This is useful for utility logic, where the code is not object-specific. For example, extension methods can *only* be writte... | [
0.03872067108750343,
-0.2745532989501953,
0.10626325756311417,
0.03481641784310341,
-0.29401758313179016,
-0.22963857650756836,
0.057958200573921204,
0.17213040590286255,
-0.38533762097358704,
-0.02923065796494484,
-0.1302008181810379,
0.5041723847389221,
-0.6353727579116821,
0.21742068231... | |
a type initializer (static constructor aka `.cctor`), but you cannot have an instance constructor (aka `.ctor`)). | [
-0.12187518924474716,
-0.05011327564716339,
0.13387498259544373,
0.25001654028892517,
-0.06259865313768387,
-0.34878823161125183,
-0.011937199160456657,
0.09996525943279266,
0.01841241493821144,
-0.2715585231781006,
-0.37143927812576294,
0.37876999378204346,
-0.5557422637939453,
0.34086605... | |
Is it possible to draw a line using a graduated colour?
I want to be able to draw a straight or a curved line (if possible) where at one end of the line is Blue and the other end is Red.
Further There might be a need to have more than one gradient per-line e.g the colour going from Blue -> Green -> Red. I am thinki... | [
0.09717367589473724,
-0.29117366671562195,
0.5200597047805786,
-0.03704829514026642,
-0.03655584529042244,
0.36449432373046875,
0.153850257396698,
-0.35650619864463806,
0.04785371199250221,
-0.6856448650360107,
0.02092706970870495,
0.5065189599990845,
-0.3328780233860016,
-0.08146975189447... | |
new LinearGradientBrush(new Point(0, 0), new Point(50, 0), Color.Blue, Color.Red))
{
using (Pen aGradientPen = new Pen(aGradientBrush))
{
graphicsObject.DrawLine(aGradientPen, new Point(0, 10), new Point(100, 10));
}
}
}
``` | [
-0.21244630217552185,
-0.3245459198951721,
0.9848206639289856,
-0.2192353755235672,
0.08719829469919205,
0.48562416434288025,
-0.1837204247713089,
-0.4520164728164673,
0.032196253538131714,
-0.6344546675682068,
-0.01014411635696888,
0.5555068850517273,
-0.19754712283611298,
0.1169294565916... | |
I'm working on a software project intended for recuperating old specific hardware, mostly for non-for-profit organizations and poor schools.
I need a way to simulate old hardware so I can test the application before shipping it out.
How can I do this?
I'm not sure exactly what the question is asking for. I think you... | [
0.6753937005996704,
0.23733331263065338,
-0.09912845492362976,
0.1462199091911316,
0.2784885764122009,
-0.048468224704265594,
-0.042642757296562195,
0.1476689726114273,
-0.07066686451435089,
-0.8401123285293579,
0.2285451740026474,
0.344434529542923,
0.11845043301582336,
0.5636168718338013... | |
Has anybody an idea of how the highlighting condition has to look like, to create alternating rows in groups? I want the every row with an even number of a table group (not of the whole table) to have a different color.
Thanks in advance! :-)
Patrick
P.S.: I'm using BIRT 2.1.3
Add a highlight to the row like this:
... | [
-0.1750822365283966,
0.02980710379779339,
0.3432745933532715,
-0.19143113493919373,
-0.2397436946630478,
0.10127310454845428,
-0.037416987121105194,
0.1940620243549347,
-0.39605817198753357,
-0.39179083704948425,
-0.128604918718338,
0.24886447191238403,
-0.5225580930709839,
-0.408365488052... | |
We have a Delphi 5 application, that is built without runtime packages, dlls or external resources (i.e. a single executable). when we install it on a clients PC we get the following error messages:
> Class TListView not found
or
> Class TImage not found
We have installed it on dozens of PCs before without incident... | [
0.3170839250087738,
-0.24059560894966125,
0.2550438642501831,
0.05456443130970001,
0.04500911757349968,
-0.15892170369625092,
0.1825830191373825,
-0.019079508259892464,
-0.19388215243816376,
-0.5984681844711304,
-0.17666545510292053,
0.643560528755188,
-0.2784401476383209,
-0.0494702197611... | |
is causing this?
**EDIT**
The exe on the new PC is on 30 or so other PCs that I know of, ranging from windows XP Sp1,2,3, Windows Vista and Windows embedded. both old and new PCs were installed with an old version and then updated with the newest version. The only difference is that the version jump was higher for t... | [
0.3314763307571411,
0.23419374227523804,
0.6441659927368164,
0.17105606198310852,
-0.014445165172219276,
0.23660507798194885,
0.22499695420265198,
0.21062816679477692,
-0.4668152332305908,
-0.6616122722625732,
0.024521274492144585,
0.5389045476913452,
-0.1950143575668335,
0.185307413339614... | |
[DFM Check](http://www.vclcomponents.com/Delphi/Editors/DFM_Check-info.html) to open and close all your dfm's automatically and at [CnPack](http://www.cnpack.org/index.php?lang=en) to help you clean your uses clause.
Regards,
Lieven | [
0.5310735106468201,
0.2720814645290375,
0.6660329699516296,
-0.27559694647789,
0.06957460939884186,
-0.12601512670516968,
0.3093169927597046,
-0.5205612778663635,
-0.22536218166351318,
-0.4316675364971161,
-0.26838451623916626,
0.42733630537986755,
0.021591968834400177,
0.0385449044406414,... | |
I'm trying to move a former app from windows mobile to iphone. Any ideas which GUI in Interface Builder has the similar function as listbox?
UITableView is appropriate when you have a list, possibly a quite long one, and you want to navigate a hierarchy by tapping items on the list.
Also look at UIPickerView which is ... | [
0.37916991114616394,
-0.451901376247406,
0.4826924800872803,
0.1349489688873291,
-0.3578052222728729,
-0.1476592719554901,
0.16867248713970184,
0.10911086946725845,
-0.3888494372367859,
-0.8090203404426575,
0.31094521284103394,
0.5379477143287659,
-0.27946901321411133,
0.20155967772006989,... | |
How can I prevent mouse selecting (and moving caret) with Editable TextField(),
this one does not seem to fully work when SELECTING text, but it prevents clicking. I want to keep cursor in place where its going.
```
protected function handleMouseDEvent(evt:MouseEvent):void {
if (evt.type == MouseEvent.MOUSE_DOWN) {
va... | [
0.016251062974333763,
0.03214940428733826,
0.7552760243415833,
-0.2637632191181183,
0.3723224103450775,
-0.18980944156646729,
0.3385246992111206,
-0.29913800954818726,
-0.07906419038772583,
-0.5299028158187866,
-0.14010268449783325,
0.9867314100265503,
-0.2814134657382965,
0.14970216155052... | |
`Response.Redirect` has two overloads:
```
public void Redirect(string url)
Parameters:
url: The target location.
```
```
public void Redirect(string url, bool endResponse)
Parameters:
url: The location of the target.
endResponse: Indicates whether execution of the current page should terminate.
```
If I call the f... | [
-0.2001647651195526,
-0.2628031373023987,
0.7258888483047485,
-0.18547433614730835,
-0.1269303262233734,
-0.04908757284283638,
0.3382840156555176,
-0.2886916995048523,
-0.3387591242790222,
-0.2504919767379761,
-0.31068679690361023,
0.5813338160514832,
-0.56706303358078,
0.5687832832336426,... | |
to "true", you are effectively saying "I am done with this page, ignore anything after me".
The reason a "ThreadAbortException" is raised is so that any Finallys/Catches etc that you have written are fired, and resources are correctly cleaned up before you are sent to the next page.
From [MSDN](http://msdn.microsoft.... | [
0.3022931218147278,
-0.06625334918498993,
0.5993383526802063,
-0.04329274222254753,
-0.013079576194286346,
-0.3650234341621399,
0.6345462203025818,
0.08692502230405807,
-0.105441153049469,
-0.3731195330619812,
-0.4525891840457916,
0.47253644466400146,
-0.35309746861457825,
0.28205779194831... | |
From [`pthread_key_create`](http://www.manpagez.com/man/3/pthread_key_create/) manpage :
> An optional destructor function may
> be associated with each key value. At
> thread exit, if a key value has a
> non-NULL destructor pointer, and the
> thread has a non-NULL value associated
> with the key, the function p... | [
-0.28520816564559937,
-0.1307866871356964,
0.40598708391189575,
-0.10813134163618088,
0.1050843596458435,
0.2481493204832077,
0.28713157773017883,
-0.3806680738925934,
-0.1498912125825882,
-0.5836353302001953,
-0.647915244102478,
0.42066991329193115,
-0.3724939525127411,
0.3345688879489898... | |
> with associated destructors, there are
> still some non-NULL values with
> associated destructors, then the
> process is repeated. If, after at
> least [PTHREAD\_DESTRUCTOR\_ITERATIONS]
> iterations of destructor calls for
> out- standing non-NULL values, there
> are still some non-NULL values with
> asso- ... | [
-0.005536661483347416,
-0.054280661046504974,
0.5566072463989258,
-0.09454329311847687,
-0.0382530502974987,
0.09069832414388657,
0.5920135974884033,
0.2219005823135376,
-0.2380932718515396,
-0.85079425573349,
-0.30780506134033203,
0.49394312500953674,
-0.40704473853111267,
0.4003660976886... | |
the thread specific value is still not NULL after the first call to destructor.
Have I missed something?! (PTHREAD\_DESTRUCTOR\_ITERATIONS = 4 on glibc.)
Here is my little example :
```
#include <pthread.h>
#include <stdio.h>
#include <stdlib.h>
#define NB_THREADS 1
#define NB_KEYS 1
static pthread_key_t keys[NB_K... | [
0.37821537256240845,
-0.010791529901325703,
0.3991352617740631,
-0.3728192448616028,
0.08180191367864609,
-0.011637969873845577,
0.597223162651062,
-0.24740824103355408,
-0.3551751971244812,
-0.679976761341095,
-0.06535634398460388,
0.46263155341148376,
-0.46055641770362854,
0.690995991230... | |
printf ("\tkeys[%i] : %i\n", i, (int)pthread_getspecific(keys[i]));
pthread_mutex_unlock(&mutex);
return "End";
}
int main(int argc, char** argv)
{
int i;
void *result;
pthread_t thread[NB_THREADS];
for (i = 0; i < NB_KEYS; i++)
pthread_key_create(&keys[i], destruction);
pthread_mutex_init(&mutex... | [
0.024531466886401176,
-0.01191223319619894,
0.5957515835762024,
-0.5020093321800232,
0.33726921677589417,
0.3123379945755005,
0.6020503640174866,
-0.3853752911090851,
-0.2377140074968338,
-0.47547000646591187,
-0.6852546334266663,
0.6017588376998901,
-0.44121742248535156,
0.502862632274627... | |
lot of people using pthread in here!
So, again, I'll answer my own question :
The destructor will be called more than one time ONLY if a call to `pthread_setspecific` is done in the destructor, changing the value of the key.
This is because before calling the destructor, the key pointer is set to null and the pointe... | [
0.3903489112854004,
0.11994927376508713,
0.3697299063205719,
-0.04673248529434204,
0.015206634998321533,
-0.013519161380827427,
0.3998892307281494,
-0.21138322353363037,
-0.34926003217697144,
-0.40835174918174744,
-0.2848545014858246,
0.8281800746917725,
-0.5064181089401245,
0.206661358475... | |
php generates GIFs on the web server using a databases on a second server.
The page shows 20 GIFs, so there is some load for a short time (multiple connections)
---
Some GIFs are loaded but some are not, in `/var/www/logs/error_log`
```
[Mon Feb 23 10:05:56 2009] [error] PHP Warning: mysql_connect() [function.mysq... | [
-0.09259132295846939,
0.30740585923194885,
0.4485693573951721,
-0.06290095299482346,
-0.5207928419113159,
0.10217703878879547,
0.4386734962463379,
-0.37582507729530334,
-0.24316123127937317,
-0.5210708975791931,
0.062458302825689316,
0.3679032027721405,
-0.5513420701026917,
0.1685593426227... | |
Could not determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
```
---
Rebooting the MySQL server "resolves" the problem ... for a few days.
The 2 servers are virtual machines running OpenBSD, chroot'ed Apache and MySQL + phpMyAdmin.
unfortunately in diferent versions (OpenBSD 4.2(web) ... | [
0.021116189658641815,
0.07049641758203506,
0.5302352905273438,
0.13064374029636383,
0.0674830824136734,
-0.2306889146566391,
0.5079473257064819,
0.11237581819295883,
0.13573874533176422,
-0.5971984267234802,
-0.09352581202983856,
0.17632818222045898,
-0.06320185959339142,
0.395421385765075... | |
I have been using the following code to obtain a simple web response from Apache 2.2 in SilverLight to no avail.
```
private void bDoIt_Click(object sender, RoutedEventArgs e)
{
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(new Uri("/silverlight/TestPage2.html"));
request.Method ... | [
0.2221435308456421,
0.12123242020606995,
0.4952961802482605,
-0.23507696390151978,
-0.20562946796417236,
-0.043141819536685944,
0.45262524485588074,
-0.49589428305625916,
0.17977888882160187,
-0.6784273386001587,
0.023443637415766716,
0.3282000422477722,
-0.48897606134414673,
0.36902692914... | |
request = (HttpWebRequest)asuncResult.AsyncState;
StreamWriter postDataWriter = new StreamWriter(request.EndGetRequestStream(asuncResult));
postDataWriter.Close();
request.BeginGetResponse(new AsyncCallback(ResponceProceed), request);
}
private void ResponceProceed(IAsyncResult asunc... | [
-0.32575809955596924,
-0.3712599277496338,
0.9036378860473633,
-0.14554446935653687,
0.17283418774604797,
0.2830263078212738,
0.5900253653526306,
-0.6712793111801147,
0.06447292864322662,
-0.5356094241142273,
-0.49001336097717285,
0.5450344681739807,
-0.21017327904701233,
0.434499531984329... | |
txtData.Text = responceString;
}
```
Does anyone no a better method of doing this?
Have you tried [`WebClient`](http://msdn.microsoft.com/en-us/library/system.net.webclient(VS.95).aspx)? This exists on silverlight, and might make life easier. Presumably you'd want [`UploadStringAsync`](http://msdn.microsoft.com/e... | [
0.0793549120426178,
0.16513389348983765,
0.7921442985534668,
0.052437394857406616,
0.00026765360962599516,
-0.2606687545776367,
0.3392880856990814,
0.07341375946998596,
-0.2465081363916397,
-0.7361506819725037,
-0.2639787197113037,
0.6846488118171692,
-0.3264445960521698,
0.13937908411026,... | |
I created a SDF (SQL CE) database with Visual Studio 2008 (Add / New Item / Local Database).
Is it possible to edit this database with SQL Server Management Studio? I tried to attach it but it only offered .mdf and attaching a .sdf file results in "failed to retrieve data for this request".
If so, is it possible to c... | [
0.09738964587450027,
0.10833042860031128,
0.45505890250205994,
0.0034430017694830894,
-0.4972171187400818,
-0.12432874739170074,
0.1836303323507309,
-0.287881076335907,
-0.036532800644636154,
-0.7660027146339417,
0.11011837422847748,
0.41368719935417175,
-0.3549667000770569,
0.303319901227... | |
Type dropdown to SQL Server Compact Edition.
Then in the Database File dropdown choose New Database.... and you're ready to go. | [
0.02134862169623375,
-0.13947825133800507,
0.4238353967666626,
0.180978924036026,
0.162815123796463,
-0.5109935402870178,
-0.2352362871170044,
0.07501602172851562,
-0.23617203533649445,
-0.5085240602493286,
-0.2385805994272232,
0.4927375912666321,
-0.22055228054523468,
0.2608703076839447,
... | |
What is the best way to extend a dictionary with another one while avoiding the use of a `for` loop? For instance:
```
>>> a = { "a" : 1, "b" : 2 }
>>> b = { "c" : 3, "d" : 4 }
>>> a
{'a': 1, 'b': 2}
>>> b
{'c': 3, 'd': 4}
```
Result:
```
{ "a" : 1, "b" : 2, "c" : 3, "d" : 4 }
```
Something like:
```
a.extend(b)... | [
0.05462370067834854,
0.1193675547838211,
0.3913489580154419,
-0.19194842875003815,
0.18938323855400085,
-0.028402037918567657,
0.34695813059806824,
-0.39733099937438965,
-0.045494142919778824,
-0.6181390881538391,
-0.02056199125945568,
0.6089258790016174,
-0.12886852025985718,
-0.133071035... | |
I am programming in C++ for many years, still I have doubt about one thing. In many places in other people code I see something like:
```
void Classx::memberfunction()
{
this->doSomething();
}
```
If I need to import/use that code, I simply remove the **this->** part, and I have never seen anything broken or hav... | [
0.20633336901664734,
0.2558465301990509,
-0.04639771580696106,
-0.17635871469974518,
-0.10382736474275589,
-0.2353130280971527,
0.36320140957832336,
-0.06332045048475266,
-0.15722215175628662,
-0.5723047256469727,
0.0875973030924797,
0.6208617687225342,
-0.3605484068393707,
0.3409276902675... | |
apparent duplicate:
[Are there any reasons not to use "this" ("Self", "Me", ...)?](https://stackoverflow.com/questions/333291/are-there-any-reasons-not-to-use-this-self-me)
To guarantee you trigger compiler errors if there is a macro that might be defined with the same name as your member function and you're not certai... | [
0.12496636062860489,
0.41558071970939636,
-0.18713998794555664,
0.013496329076588154,
0.1875041425228119,
0.03712715208530426,
0.4006933569908142,
0.3238564431667328,
-0.6676384806632996,
-0.40981507301330566,
0.13628451526165009,
0.37818846106529236,
-0.5232130885124207,
0.041823662817478... | |
We start to use LDAP and I wonder why LDAP is not that popular? I read that it has faster reads than database, however slower writes.
EDIT:
Its the first time i use LDAP and i have been programming in enterprise for sometime now. That is the reason why i thought its not popular, plus i never heard about it at school.... | [
0.48554566502571106,
0.09360681474208832,
0.219411239027977,
0.2590128481388092,
-0.2174161970615387,
-0.7893410325050354,
-0.1655542552471161,
0.5616668462753296,
-0.255349338054657,
-0.8163864612579346,
0.21673721075057983,
0.5218358039855957,
-0.588434100151062,
0.10285109281539917,
-... | |
that a huge majority of business systems are based on the relational-data model, and very few are based on a hierarchical-data model.
Assuming this is the real question here :), I would provide a few partial answers, that together probably fully answer your question:
* Complexity and high bar of entry (as [@Elijah](... | [
0.3755137324333191,
0.04482109099626541,
-0.10176092386245728,
0.3255120515823364,
0.03962909057736397,
-0.29079359769821167,
0.21409930288791656,
0.17408035695552826,
0.01505929883569479,
-0.2954334616661072,
-0.23522621393203735,
0.5341825485229492,
-0.26978760957717896,
-0.1021620482206... | |
Most common business applications are OLTP (transaction) based, and require a large amount of writes (except BI-type apps, will relate to that in a moment).
* More specifically, hierarchical models are built to find **specific elements** of data, and not perform JOINs, mass SELECTs, GROUP BYs etc.(I mean this in a logi... | [
0.0033381222747266293,
0.26321566104888916,
0.08056741207838058,
0.2238190472126007,
-0.059195227921009064,
-0.25185444951057434,
0.06387722492218018,
0.1270507574081421,
-0.4963480234146118,
-0.5646555423736572,
-0.3744570016860962,
0.33363449573516846,
-0.3997458815574646,
0.019034117460... | |
than hierarchical (though this might be a result of my second point - we were mostly taught this). It's just "easier" to categorize the data in neat rows and columns... | [
-0.10346382111310959,
-0.011800559237599373,
-0.11380909383296967,
0.5918929576873779,
-0.14079813659191132,
-0.21493679285049438,
0.15977077186107635,
-0.07003086060285568,
-0.18318894505500793,
-0.7560102343559265,
0.10497692972421646,
0.224683940410614,
-0.15593348443508148,
0.052800703... | |
Suddenly my whole project stopped compiling at all, showing the following message:
> Program 'path\_to\_obj\_project\_folder' does not contain a static 'Main'
> method suitable for an entry point
I made no changes to project properties, just added some classes, moved some other classes into folders. Its an WPF Applic... | [
0.14953424036502838,
0.35546186566352844,
0.4599747955799103,
-0.13484932482242584,
-0.0075851306319236755,
-0.08725694566965103,
0.5203080773353577,
0.03532755747437477,
-0.5176724195480347,
-0.5707290768623352,
-0.1670447736978531,
0.2650894522666931,
-0.5531308054924011,
0.4239287078380... | |
does rename the `App.xaml`.
Check the properties of *App.xaml*. Is the `Build Action` still `ApplicationDefinition`? | [
-0.0864424929022789,
0.2537458539009094,
0.4221035838127136,
-0.2772238254547119,
0.17555227875709534,
-0.04251741245388985,
0.4283818304538727,
-0.0494195930659771,
-0.2135317325592041,
-0.4701741635799408,
-0.4602842926979065,
0.5088028311729431,
-0.48979058861732483,
-0.2021504491567611... | |
I am using JavaScript to specify the target link. It is not working properly. What change should I do in order for it to work correctly?
My code:
```
var link = create_element(cell, 'img');
link.setAttribute("src", "images/sub.png");
link.href = "http://localhost/";
```
As Sergei stated, you need a link with an ima... | [
0.23250070214271545,
0.17656931281089783,
0.6068178415298462,
-0.10560157895088196,
-0.08170807361602783,
-0.12914112210273743,
0.42490696907043457,
-0.2933858036994934,
-0.0502103827893734,
-0.9006758332252502,
-0.14118625223636627,
0.2453048825263977,
-0.48869162797927856,
0.168840095400... | |
Is there a way to scroll the selected node of an ASP.Net TreeView into view after a postback?
In my parrticular scenario the control is repopulated after each postback.
Thanks!
I figured it out. The TreeView control creates a javascript object on the client. It is named whatever you called the treeview with a '\_Dat... | [
-0.0752427875995636,
-0.35055291652679443,
0.4557141363620758,
0.17737847566604614,
0.05957948416471481,
0.08446801453828812,
0.19439537823200226,
0.13232803344726562,
-0.2203177958726883,
-1.0060369968414307,
-0.08896622806787491,
0.500731885433197,
-0.18315070867538452,
0.017297778278589... | |
What's the safest way to truncate the MySQL slow query log (under Linux primarily, but Windows would be handy to know) while MySQL is running?
By safe I mean:
* Mustn't cause any permissions problems
* Mustn't jump back to its original size next time its appended to
To truncate a file regardless if it is open by a ru... | [
-0.03634807467460632,
-0.17024582624435425,
0.32885128259658813,
0.14478345215320587,
0.2616855800151825,
-0.44172951579093933,
0.29510265588760376,
0.07236218452453613,
-0.14241909980773926,
-0.3953664004802704,
-0.27238020300865173,
0.6609907746315002,
-0.2105385810136795,
-0.07483582198... | |
I have an `AboutDialog` box made in glade, but the Close button doesn't work. I don't know how to connect this button to a separate function, since it sits in a widget called `dialog-action_area`.
Another problem is if I use the close button created by the window manager, I can't open it again because it has been des... | [
0.36974290013313293,
0.21498002111911774,
0.41920146346092224,
-0.07382546365261078,
0.08956253528594971,
0.012253761291503906,
0.43027666211128235,
-0.17990979552268982,
-0.005301545839756727,
-0.7726592421531677,
-0.05127530172467232,
0.672772228717804,
-0.313023179769516,
0.134779289364... | |
the Response Type constants [in the GTK documentation](http://www.pygtk.org/docs/pygtk/gtk-constants.html#gtk-response-type-constants) | [
-0.22113101184368134,
-0.1604805737733841,
0.5038967728614807,
0.002473006723448634,
-0.6823237538337708,
0.2255868762731552,
-0.04332432523369789,
-0.39972665905952454,
-0.3001619577407837,
-0.012532067485153675,
-0.37497949600219727,
0.7776256203651428,
-0.5235851407051086,
-0.1036290973... | |
I need to determine if given IP address is from some special network in order to authenticate automatically.
[Apache Commons Net](http://commons.apache.org/net/) has `org.apache.commons.net.util.SubnetUtils` that appears to satisfy your needs. It looks like you do something like this:
```
SubnetInfo subnet = (new Subn... | [
0.3425351083278656,
0.13935710489749908,
0.41824665665626526,
0.19869792461395264,
0.06442956626415253,
-0.4650406241416931,
0.6274933815002441,
-0.361524373292923,
-0.11306333541870117,
-0.5015280246734619,
-0.2470358908176422,
0.21966274082660675,
-0.1894020140171051,
0.09725692868232727... | |
I wrote some smart generic counters and managers for my models (to avoid `select count` queries etc.). Therefore I got some heavy logic going on for post\_save.
I would like to prevent handling the signal when there's no need to.
I guess the perfect interface would be:
```
instance.save(dispatch_signal=False)
```
... | [
0.0931386724114418,
-0.09777113795280457,
0.3450798988342285,
-0.025445614010095596,
-0.4028620421886444,
-0.024297155439853668,
0.313515841960907,
-0.4710959792137146,
-0.14547590911388397,
-0.5411535501480103,
0.34428495168685913,
0.5757234692573547,
-0.4014984369277954,
0.06773673743009... | |
update, which is a bit complicated since it checks many aspects of related models (i.e. it has to generate a visibility property based on a nested category tree). I can't put this logic in Model.save() because one counter depends on many different models. I'd like to have that logic in one piece, instead of fragments s... | [
0.271544486284256,
-0.32590022683143616,
0.4280472695827484,
0.018068952485919,
-0.13222865760326385,
0.19166451692581177,
0.1168786957859993,
-0.09981843829154968,
-0.2283816933631897,
-0.3659307658672333,
0.14713162183761597,
0.14156855642795563,
-0.35240253806114197,
-0.0431226342916488... | |
clear enough. Excuse my language mistakes.
A quick and dirty solution would be:
```
from django.db.models.signals import post_save
from somewhere_in_my_app import my_post_save_handler
post_save.disconnect(my_post_save_handler)
instance.save()
post_save.connect(my_post_save_handler)
```
But otherwise i strongly reco... | [
0.005928170867264271,
0.26120588183403015,
0.21551086008548737,
-0.17865748703479767,
-0.043532878160476685,
0.10069452226161957,
0.18133051693439484,
-0.03257263824343681,
0.00794155802577734,
-0.7779905796051025,
-0.22394435107707977,
0.4943685829639435,
-0.4169844686985016,
-0.081486627... | |
I setup a company maven repository using artifactory. I deployed a project of us into the repository. If I now specify a dependency to that artifact, it doesn't get retrieved. Which it should, because I declared this in my settings.xml:
```
<mirrors>
<mirror>
<id>company-internal</id>
<name>company repositor... | [
0.08184108138084412,
0.054591670632362366,
0.6459025740623474,
0.22335520386695862,
-0.18730327486991882,
0.06678254157304764,
0.12455764412879944,
-0.2859184741973877,
-0.3964909613132477,
-0.4198925197124481,
-0.14302662014961243,
0.6336583495140076,
0.03317413106560707,
0.21714712679386... | |
the configuration there), or is there a bug in artifactory? Is there something which is handled differently in case of SNAPSHOTs?
You'll have to add your company repository under the ["repositories" element](http://maven.apache.org/pom.html#Repositories).
The "mirrors" element is for specifying local mirrors for repos... | [
0.0007729167700745165,
-0.032543085515499115,
0.3077593445777893,
0.3796989321708679,
0.34191033244132996,
-0.20607949793338776,
0.12800246477127075,
0.033772461116313934,
-0.539344310760498,
-0.4014567732810974,
-0.08357241749763489,
0.31340283155441284,
0.0747530534863472,
0.151655435562... | |
Google App Engine supports a fetch operation based on a list of keys [google.appengine.ext.db.get(*keys*)](http://code.google.com/appengine/docs/python/datastore/functions.html).
I'd be interested to figure out if there is any guarantee that the result list preserves the order of the keys (i.e. keys = [`k_1`, `k_2`, `... | [
-0.35309094190597534,
0.06825631111860275,
0.5683854818344116,
-0.2056906819343567,
-0.2300729900598526,
0.36620989441871643,
0.39287784695625305,
-0.42539355158805847,
0.011565478518605232,
-0.5235564112663269,
-0.2440532147884369,
0.6981857419013977,
-0.545998752117157,
-0.09466797858476... | |
any reference that `db.keys` is equivalent to an IN select though and if there aren't any optimizations for its execution in place. Otherwise, the workaround would be quite simple (I would iterate and query myself for each key and so I'll have the guarantee that the I don't depend on `db.keys` implementation).
I have ... | [
0.363109290599823,
0.1119396910071373,
0.26327893137931824,
-0.006630058400332928,
-0.048088423907756805,
-0.18283697962760925,
0.3426882028579712,
-0.520007312297821,
0.07823996990919113,
-0.6926513314247131,
-0.049667224287986755,
0.7654648423194885,
-0.09530893713235855,
0.0819594562053... | |
investigated this and have reached similar or different conclusions.
tia,
./alex
Doing some more research I have found the following (documentation for both `db.get()` and `Model.get()`:
> If ids is a list, the method returns a list of model instances, with a None value when no entity exists for a corresponding Key... | [
0.2451188564300537,
0.0798991397023201,
-0.05079969763755798,
0.07016301155090332,
0.10160458832979202,
-0.18503417074680328,
0.10718947649002075,
-0.39814984798431396,
-0.15299834311008453,
-0.36372098326683044,
0.04204066842794418,
0.32378819584846497,
-0.27350884675979614,
0.19380871951... | |
Just wondered if anyone could give me some advice on the best way to implement keyboard shortcuts within a Silverlight based project.
Can this be done from the xaml or is it best implemented within the code behind etc...
Thanks in advance.
The quote from the documentation clarifies my question. | [
0.32964539527893066,
0.17733782529830933,
0.14056260883808136,
0.15916043519973755,
0.18426744639873505,
-0.20215503871440887,
0.15288910269737244,
0.37679848074913025,
-0.13988806307315826,
-0.3664573132991791,
0.15329495072364807,
0.4903044104576111,
0.2932567596435547,
-0.17561207711696... | |
How can I find the state of NumLock, CapsLock and ScrollLock keys in .NET?
Import the WinAPI function *GetKeyState*:
```
[DllImport("user32.dll", CharSet = CharSet.Auto, ExactSpelling = true, CallingConvention = CallingConvention.Winapi)]
public static extern short GetKeyState(int keyCode);
```
And then you can use ... | [
-0.008039085194468498,
-0.10708260536193848,
0.7722759246826172,
-0.07404834032058716,
0.16468536853790283,
-0.06609294563531876,
0.5353976488113403,
-0.3765657842159271,
-0.025251375511288643,
-0.5576868057250977,
-0.0618550144135952,
0.42215695977211,
-0.16321811079978943,
0.201838359236... | |
Although class friendship is one of the last resorts of C++, does this pattern make sense?
```
class Peer
{
public:
friend class Peer;
void GetSecret(const Peer& other)
{
const std::string& secret = other.GiveSecret();
std::cout << secret << std::endl;
}
private:
const std::string&... | [
-0.2717580199241638,
-0.09401709586381912,
0.4390276074409485,
-0.2984723746776581,
0.08589469641447067,
-0.17587818205356598,
0.44878631830215454,
-0.15038904547691345,
-0.11863405257463455,
-0.36563366651535034,
-0.16623273491859436,
0.46441560983657837,
-0.48195260763168335,
0.404585540... | |
peerB;
peerA.GetSecret(peerB);
return 0;
}
```
Ok the reason for this pattern is because the Peers are all of the same rank, and they need to share knowledge among each other, however this knowledge is secret, because no one but the peers should use it, or the program is no longer valid.
One very real exampl... | [
0.11475490778684616,
0.27298393845558167,
0.052725423127412796,
-0.04337121918797493,
0.14069420099258423,
-0.42214033007621765,
0.6173263788223267,
-0.12409760802984238,
-0.2301201969385147,
-0.597983181476593,
-0.18631744384765625,
0.3131362199783325,
-0.349020779132843,
0.60758143663406... | |
in this case. An object of a class can access the private members of any other object of the same type. It should work just fine without the friend declaration. | [
-0.27595698833465576,
-0.2104138284921646,
-0.11362585425376892,
0.23355336487293243,
0.053657643496990204,
-0.313403844833374,
0.4008474051952362,
0.23112086951732635,
-0.06653771549463272,
-0.5755658745765686,
-0.292429655790329,
0.5337666273117065,
-0.07584794610738754,
0.30945935845375... | |
I'd like to be able to get all the key-values stored in a Berkeley DB using the Ruby bindings from <http://github.com/mattbauer/bdb/tree/master> but I'm not sure how to proceed. Any pointers will be appreciated.
**UPDATE**
Here's a small script that loops over the keys and prints them. Based on Pax' answer:
```
requ... | [
0.035191792994737625,
0.1495458483695984,
0.38097870349884033,
-0.1826784461736679,
-0.28744688630104065,
-0.1000395342707634,
0.30420219898223877,
-0.33766433596611023,
0.0565313883125782,
-0.7042416930198669,
-0.26886701583862305,
0.42685747146606445,
-0.29988354444503784,
0.119093358516... | |
you would create a cursor then use it with the `DB_FIRST` flag followed by multiple invocations with the `DB_NEXT` flag until you run out of key/value pairs. You can simplify the code by using only `DB_NEXT` since, if you do that to a newly created cursor, it's the same as using `DB_FIRST`.
With the Ruby bindings, thi... | [
-0.038798391819000244,
-0.0987648293375969,
0.3017703890800476,
-0.1435408592224121,
-0.32549813389778137,
-0.016501443460583687,
0.2691706418991089,
-0.4110552966594696,
-0.05128040537238121,
-0.8262645602226257,
-0.17096857726573944,
0.5641428232192993,
-0.46183332800865173,
0.2977979183... | |
# or possibly .. (key,val,Bdb::DB_NEXT)
end
dbc.close()
``` | [
0.1874358206987381,
0.17647869884967804,
0.4697246849536896,
-0.20774689316749573,
0.09526215493679047,
-0.12715908885002136,
0.4575413465499878,
-0.051836173981428146,
0.2863781452178955,
-0.4093706011772156,
-0.48357078433036804,
0.5271211862564087,
-0.3726293444633484,
0.462502598762512... | |
I was reading this blog post: <http://www.shakie.co.uk/ramblings/feature-driven-development-riding-the-waves-of-change/> and came across the part about TestDox:
Direct quote (hence PHP):
> Take the following test case as an
> example
```
class InvoiceTest extends PHPUnit_Framework_TestCase
{
public function tes... | [
0.3172573447227478,
0.010935824364423752,
0.4117273986339569,
-0.12982098758220673,
0.0010999968508258462,
-0.10130130499601364,
0.47509676218032837,
-0.4380490481853485,
0.4865056276321411,
-0.5065648555755615,
-0.05122184380888939,
0.651660680770874,
0.04967258870601654,
0.14155867695808... | |
TestDox format this would
> translate to:
>
>
> **Invoice**
>
>
> **[x] Value is initially zero**
>
>
> **[x] Will close automatically if whole value is paid**
This would be great on some of the more agile projects I'm working on. I've been looking at TestDox and trying to track down NTestDox as I'm a .NET guy.... | [
0.4329136908054352,
-0.009081704542040825,
0.10859594494104385,
0.12980006635189056,
-0.2401895672082901,
-0.3291018009185791,
0.2537255585193634,
-0.10303138941526413,
0.11030831933021545,
-0.8678656220436096,
0.24777798354625702,
0.4706047475337982,
-0.13612230122089386,
0.02588251978158... | |
unfortunately can't help you, but nevertheless I'd like to answer your last two questions.
> Is generating documentation from your Unit tests a good plan?
Whether documenting exiting unit tests will do you any good, I do not know. There is however value to be had from being able to use human readable specifications a... | [
0.47907742857933044,
-0.008259192109107971,
-0.002893939381465316,
0.20517399907112122,
-0.21497204899787903,
-0.07733271270990372,
0.3720496892929077,
-0.28030601143836975,
-0.15492138266563416,
-0.47772154211997986,
0.25002777576446533,
0.8731110692024231,
-0.08804448693990707,
-0.024050... | |
could have a look at [Cucumber](http://cukes.info/). It should be usable with .NET (see documentation [here](http://wiki.github.com/aslakhellesoy/cucumber/ironruby-and-net)). | [
0.2724943459033966,
0.010088838636875153,
-0.044170890003442764,
0.10041124373674393,
0.0767097920179367,
0.3144231140613556,
0.04969138652086258,
0.20546174049377441,
-0.12985973060131073,
-0.5745462775230408,
0.06036074087023735,
0.5232881307601929,
-0.06209510192275047,
0.15082950890064... | |
Does anyone have real world experience of backup compression in Sql 2008, I'd like to know how it performs compared to Sql 2005 + winrar. Currently when I back up a I get a 14G file. Using rar shrinks it to <400M, a massive saving. Most of the data is similar, being figures from the stock market so I guess that makes i... | [
0.19454580545425415,
0.21027295291423798,
0.3534829318523407,
-0.0634908601641655,
-0.12952569127082825,
-0.041874371469020844,
0.15517185628414154,
-0.16635064780712128,
-0.29284214973449707,
-0.24367962777614594,
0.20237378776073456,
0.7178524136543274,
0.020197434350848198,
0.0724587887... | |
in SQL Server 2008](http://sqlcat.com/technicalnotes/archive/2008/04/21/tuning-the-performance-of-backup-compression-in-sql-server-2008.aspx).
On a side note, creating compressed backups is faster. | [
-0.3352390229701996,
-0.11807825416326523,
0.20854884386062622,
0.2539765536785126,
-0.3489980697631836,
-0.3958888053894043,
0.019440481439232826,
-0.08997935801744461,
-0.19074960052967072,
-0.22660374641418457,
-0.21610549092292786,
0.7670288681983948,
-0.35630831122398376,
-0.290100753... | |
I have specified a userControl as a dataTemplate.
```
<TabControl IsSynchronizedWithCurrentItem="True" ItemsSource="{Binding Path=Pages}">
<TabControl.ContentTemplate>
<DataTemplate>
<uc:ItemTemplateControl />
</DataTemplate>
</TabControl.ContentTemplate>
</TabControl>
```
The userControl ... | [
-0.2241441309452057,
0.18117916584014893,
0.6936202645301819,
0.0029743139166384935,
-0.16882649064064026,
-0.12204580008983612,
0.16745875775814056,
-0.18758293986320496,
-0.08866685628890991,
-0.8789756894111633,
-0.09633257240056992,
0.40568646788597107,
-0.3455117642879486,
0.224286139... | |
specify the dateTemplate as a separate resource. | [
0.17596177756786346,
0.14268215000629425,
-0.08238018304109573,
0.09592954069375992,
0.06671896576881409,
-0.3348288834095001,
-0.3715972304344177,
0.09013373404741287,
-0.0426819771528244,
-0.5983608961105347,
-0.21818213164806366,
0.14039848744869232,
0.08317770808935165,
0.2442660629749... | |
Anyone know if there is a PHP wrapper for the latest version (5.X) of [XML/SWF charts](http://www.maani.us/xml_charts/index.php)
<http://www.maani.us/charts/index.php>
*"As of version 5.0, there isn't a dedicated PHP interface for this charts tool. However, PHP or any other scripting language can still be used with XM... | [
0.2955852746963501,
-0.013856460340321064,
0.7406390309333801,
0.18979401886463165,
-0.02906147949397564,
-0.2209397554397583,
0.22172550857067108,
0.1714094877243042,
-0.40011242032051086,
-0.7414055466651917,
-0.017475562170147896,
0.4501808285713196,
0.023557797074317932,
0.046902876347... | |
I have a part in my code where I need to divide and have a remainder instead of a decimal answer.
How can I do this?
You can do what you are describing using the "%" (modulus) operator. The following code is an example of dividing with a remainder.
```
$remainder=$num % $divideby;
$number=explode('.',($num / $divideb... | [
0.27372297644615173,
0.18816134333610535,
-0.13370384275913239,
-0.232308492064476,
0.1414223462343216,
0.153039813041687,
0.32040756940841675,
-0.5067437291145325,
-0.18693454563617706,
0.005187940783798695,
0.12669822573661804,
0.29320234060287476,
-0.13337446749210358,
0.467156916856765... | |
I am looking for an elegant way to get the OS version like: "Windows XP Professional Service Pack 1" or "Windows Server 2008 Standard Edition" etc.
Is there an elegant way of doing that?
I am also interested in the processor architecture (like x86 or x64).
You can use WMI to get the product name ("Microsoft® Window... | [
-0.03266732394695282,
0.19863006472587585,
0.4448525607585907,
-0.0667148232460022,
0.12583781778812408,
-0.23979787528514862,
0.1980810910463333,
-0.06529305875301361,
-0.051426514983177185,
-0.5440956950187683,
-0.08854681998491287,
0.7001989483833313,
-0.1509392112493515,
0.118332542479... | |
"Unknown";
``` | [
0.2307867854833603,
0.3885563910007477,
-0.3477790355682373,
-0.1995144784450531,
0.029417404904961586,
0.26399993896484375,
0.022333433851599693,
0.29882267117500305,
0.13501648604869843,
-0.29767653346061707,
-0.4481283128261566,
0.5126158595085144,
-0.5526266694068909,
0.649821221828460... | |
I am using UINavigationController to move between views. When I move back and forth in views, the memory used by my app keeps on increasing. On placing NSLog statements in the dealloc method of all viewcontrollers, I noticed it was being called for only some viewcontrollers and not all that were popped.
For instance, ... | [
-0.06314173340797424,
-0.10228030383586884,
0.7223183512687683,
-0.07832375168800354,
-0.128667950630188,
0.007947541773319244,
0.17141035199165344,
0.03782196715474129,
-0.6435721516609192,
-0.8067582249641418,
0.0053566694259643555,
0.44178223609924316,
-0.2028505802154541,
0.27321138978... | |
The dealloc method was not being called if any of the references held by a viewcontroller were still in memory. In my case it was the MPMoviePlayerController object which was not released in viewcontroller1 and viewcontroller2.**
It is a case of last on, first off. So if you imagine your first view controller is the bo... | [
0.35010623931884766,
-0.11699462682008743,
0.7545062899589539,
-0.2380567342042923,
-0.05912041291594505,
-0.07802223414182663,
-0.2599804997444153,
-0.12273909151554108,
-0.5060139894485474,
-0.47260811924934387,
-0.20244406163692474,
0.6425251960754395,
-0.3400917053222656,
0.04051330685... | |
want to go back to the bottom bun then you have to pop the burger (dealloc is called every time the view is popped).
not sure why on pop to root the second view controller's dealloc wouldn't be called though..
hmm | [
0.5392682552337646,
-0.23793883621692657,
0.48650649189949036,
-0.013302435167133808,
0.023222530260682106,
-0.1398916244506836,
-0.4543749988079071,
0.5845511555671692,
-0.6900476813316345,
-0.3344455659389496,
0.2930201292037964,
0.6923474669456482,
-0.18640713393688202,
-0.2228347957134... | |
In a "multitouch" environement, any application showed on a surface can be rotated/scaled to the direction of an user. Actual solution is to drawing the application on a FBO, and draw a rotated/scaled rectangle with the texture on it. I don't think it's good for performance, and all graphics cards don't provide FBO.
T... | [
0.07901789247989655,
-0.15482395887374878,
0.8705030679702759,
0.2214859575033188,
-0.15196076035499573,
0.1095401868224144,
-0.2647148072719574,
-0.17353832721710205,
-0.35268548130989075,
-0.7918535470962524,
0.07855860888957977,
0.6533127427101135,
-0.2252562791109085,
-0.14632797241210... | |
matrix will not help, i would like to "rotate the clipping plan" generated by glViewport. (only part of the all scene).
It is a case of last on, first off. So if you imagine your first view controller is the bottom bun of a burger, you then add the burger (second view controller) and then the top burger (third view con... | [
0.46940121054649353,
-0.3609638810157776,
0.8719215989112854,
-0.10959771275520325,
-0.06630173325538635,
-0.055516596883535385,
-0.3258511424064636,
-0.3011799454689026,
-0.47391870617866516,
-0.6062524914741516,
0.08296354860067368,
0.8044254779815674,
-0.3733076751232147,
-0.22116410732... | |
(dealloc is called every time the view is popped).
not sure why on pop to root the second view controller's dealloc wouldn't be called though..
hmm | [
0.005364862270653248,
-0.4583962559700012,
0.5896333456039429,
-0.10790497809648514,
0.04568300396203995,
-0.3582164943218231,
-0.39239466190338135,
0.13199257850646973,
-0.7841762900352478,
-0.2076457142829895,
-0.16502299904823303,
0.740490198135376,
-0.2992057800292969,
-0.0422327667474... | |
I'm looking for some examples of tree structures that are used in commercial/free software projects, modern or old. I can see examples on wikipedia, but I am looking for more concrete examples and how they're used. For example primary keys in databases are (from what I've read) stored in BST structure or a variation of... | [
0.566295862197876,
0.23699133098125458,
-0.18820445239543915,
0.4386064112186432,
-0.1598067432641983,
-0.2549237906932831,
0.12911826372146606,
0.29136788845062256,
-0.5284752249717712,
-0.4012884497642517,
0.07533823698759079,
0.21868586540222168,
-0.31991177797317505,
0.1951384693384170... | |
to trees? If it is, read on.
* Needless to say most XML/Markup parsers use trees. See Apache Xerces for example. Or, the Xalan XSLT parser. Thanks [mathewsdave26](https://stackoverflow.com/users/59711/mathewsdave26) for reminding me!
* PDF is a tree based format. It has a `root` node followed by a `catalog` node(these... | [
0.28153693675994873,
-0.11091988533735275,
-0.0008973363437689841,
0.2872184216976166,
-0.3636667728424072,
-0.19812418520450592,
-0.08301042020320892,
-0.22347372770309448,
-0.4474717974662781,
-0.3127356171607971,
-0.2500894367694855,
0.12114211916923523,
-0.15847262740135193,
-0.2465696... | |
in AS. You may want to check out how the data objects are mapped. In particular the `flare.analytics` package heavily uses a graph structure, spanning trees etc.
* Social networking is the current buzzword in CS research. It goes without saying that connections/relations are very naturally modeled using graphs. Often, ... | [
0.4806087613105774,
-0.11670750379562378,
-0.012937751598656178,
0.3704308867454529,
-0.17538851499557495,
-0.19397753477096558,
0.15851189196109772,
0.12338553369045258,
-0.7407540678977966,
-0.4348493814468384,
-0.07960346341133118,
0.03716793283820152,
-0.04332321882247925,
-0.237260192... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.