text stringlengths 0 30.5k | title stringclasses 1
value | embeddings listlengths 768 768 |
|---|---|---|
recursive relationship among Host (as Cluster) and Host (as Server). This is kind of annoying, but it does create a single table for Host, Cluster and Server. The resulting table has a lot of nulls (Cluster rows use one bunch of columns, Server rows use a different set of columns.) You have to add a column to discrimin... | [
-0.3670044243335724,
-0.09066034108400345,
0.14651471376419067,
0.2076430469751358,
-0.29375627636909485,
-0.13071265816688538,
0.04184591397643089,
0.052414607256650925,
-0.2987607419490814,
-0.8405477404594421,
0.0818028673529625,
0.09250862896442413,
-0.3733986020088196,
0.2908837795257... | |
Server tables look very similar (essentially clones of Host) with a few columns that are different.
3. Use a Join between (Host and Cluster) or (Host and Server) based on a discriminator in Host. While fairly complex, this scales well because all Databases are joined to a Host, and the complete list of Hosts is a union... | [
-0.14119917154312134,
0.04450790211558342,
0.5423632860183716,
0.2351682186126709,
-0.1560775190591812,
0.002684063045307994,
-0.06254749745130539,
0.02515536919236183,
-0.4473387598991394,
-0.5628887414932251,
-0.03308093175292015,
-0.41985660791397095,
-0.4228432774543762,
0.308526992797... | |
have a discriminator so that you could distinguish among the various combinations of NULL values in the two FK fields. There are four possible combinations, of which two are sensible, and two might be prohibited. Trying to simply use two nullable FK's doesn't usually work out well, so you often need a status flag to se... | [
-0.048273324966430664,
0.06739502400159836,
0.10311014205217361,
0.25557637214660645,
-0.2194002866744995,
-0.06488243490457535,
0.17080126702785492,
-0.14643314480781555,
-0.2742030918598175,
-0.277406245470047,
0.026764897629618645,
-0.18163266777992249,
-0.3560139238834381,
0.3372022807... | |
We are using Spring for my application purposes, and Spring Testing framework for unit tests. We have a small problem though: the application code loads a Spring application context from a list of locations (XML files) in the classpath. But when we run our unit tests, we want some of the Spring beans to be mocks instea... | [
0.29473310708999634,
0.331646591424942,
-0.2221802920103073,
0.07572188973426819,
-0.17300133407115936,
0.4091241955757141,
0.2872404456138611,
-0.3467862606048584,
-0.29778149724006653,
-0.30833059549331665,
0.13911566138267517,
0.37695783376693726,
-0.06967122107744217,
0.061717249453067... | |
specific beans of the application context and refresh the context when desired. While doing this, I want to redefine only a small portion of the beans located in one (or several) original XML beans definition file. I cannot find an easy way to do it. It's always regarded that Spring is a unit-testing-friendly framework... | [
0.3331408202648163,
0.18787892162799835,
0.047203440219163895,
0.06336858868598938,
-0.07377082109451294,
-0.03072826936841011,
0.1217503771185875,
-0.2741146981716156,
-0.19972477853298187,
-0.5751717686653137,
0.04419797658920288,
0.22221055626869202,
-0.24258841574192047,
-0.07477274537... | |
DependencyInjectionTestExecutionListener.class,
TransactionalTestExecutionListener.class,
DirtiesContextTestExecutionListener.class})
public abstract class AbstractHibernateTests implements ApplicationContextAware {
/**
* Logger for Subclasses.
*/
protected final Logger log = LoggerFactory.ge... | [
0.037496376782655716,
-0.2564636766910553,
0.2771649658679962,
0.013187418691813946,
-0.03437372297048569,
-0.19177255034446716,
0.38129091262817383,
-0.5623769760131836,
0.16640661656856537,
-0.6068384051322937,
0.1655980944633484,
0.8325576186180115,
-0.5142749547958374,
0.04236675798892... | |
instance,
* provided via {@link ApplicationContextAware} semantics.
*/
@Override
public final void setApplicationContext(
final ApplicationContext applicationContext) {
this.applicationContext = applicationContext;
}
}
```
If there are `mock-bean.xml` in the specified locatio... | [
0.04225531592965126,
0.45344817638397217,
0.4502066373825073,
-0.03261338546872139,
0.12441746890544891,
-0.17156894505023956,
0.45456740260124207,
-0.12022657692432404,
-0.21103714406490326,
-0.8493722677230835,
-0.1306028813123703,
0.3814655542373657,
-0.33433276414871216,
0.407609462738... | |
I am looking for a good example implementation of a JavaScript/HTML AutoSuggest input box to get me started. What I am trying to implement will behave "Exactly" like the Tags input box here on stackoverflow.
If it helps I am using jQuery to perform Ajax request.
I am finding examples to help me implement this howev... | [
0.3771888017654419,
-0.11068900674581528,
0.01119257416576147,
0.007127637043595314,
-0.23403717577457428,
-0.10322219133377075,
-0.1660914570093155,
-0.1759268343448639,
-0.22408820688724518,
-0.751526415348053,
0.17959807813167572,
0.7006827592849731,
-0.09001954644918442,
-0.30428224802... | |
Refactoring legacy code, I came across this function (pseudocode):
```
int getMessage( char * buffer, int size = 300 );
```
Gee, look at that buffer just waiting to overflow. So I came up with a function using std::string, and thought it would be nice to use function overloading:
```
int getMessage( std::string & b... | [
-0.036275070160627365,
0.2043883055448532,
0.325554221868515,
-0.3991834223270416,
-0.16166327893733978,
0.12171754986047745,
0.3159206211566925,
-0.35664042830467224,
-0.18530596792697906,
-0.2674764096736908,
0.029844671487808228,
0.8509536385536194,
-0.542898416519165,
0.179680451750755... | |
parameter list (using the default value to satisfy the second parameter), gives up, but doesn't try the second function...
I wouldn't have a problem working around this issue, but I'd like to know why this fails, and whether there would be a way to make it work as intended.
As always, once the problem is solved, the s... | [
-0.10458283126354218,
0.004909727722406387,
0.4060121178627014,
-0.021425370126962662,
-0.05504123494029045,
0.2700948417186737,
0.06467967480421066,
-0.22710146009922028,
-0.2177577167749405,
-0.5014455318450928,
0.10380318760871887,
0.5942522287368774,
-0.39101898670196533,
0.18845389783... | |
was blissfully unaware of the new function.
Sorry for the bother. I've been an idiot. I hope this doesn't become a habit. ;-) | [
0.4075576364994049,
0.21426385641098022,
0.5031669735908508,
-0.021825671195983887,
0.11908988654613495,
0.08342887461185455,
0.4309384226799011,
0.4712364971637726,
-0.19513516128063202,
-0.2204853594303131,
-0.24833133816719055,
0.4522106349468231,
0.20985741913318634,
0.0231752507388591... | |
From external JS script I use document.readystate to determine whether the document is loaded.
If its not loaded I attach Onload event listner.
However when I run the script from IEPRO (similar to FF greasemonkey) on IE7 document.readystate returns 'undefined'. (I guess that IE7PRO runs the script after the document ... | [
0.07978619635105133,
0.07317262887954712,
0.4970529079437256,
-0.36963608860969543,
-0.2698255181312561,
-0.11534569412469864,
0.10663626343011856,
-0.35723909735679626,
-0.18793296813964844,
-0.5592741370201111,
-0.23241263628005981,
0.7049226760864258,
-0.28870609402656555,
-0.2007113695... | |
document.readystate
2. I cant change the document. my script is an addon to random pages I have no control of.
From [the wikipedia page](http://en.wikipedia.org/wiki/Yes_(Unix)): *"By itself, the yes command outputs 'y' or whatever is specified as an argument, followed by a newline, until stopped by the user or otherw... | [
0.1101614460349083,
0.2554669976234436,
0.6605002284049988,
-0.14340828359127045,
-0.0005475474172271788,
-0.2628495693206787,
0.28270575404167175,
-0.22979488968849182,
0.0835517942905426,
-0.7129318714141846,
-0.40358200669288635,
0.5482362508773804,
-0.317954421043396,
0.060550287365913... | |
sequence is:
1. other program terminates
2. operating system closes pipe
3. yes tries to output character
4. error happens (broken pipe)
5. yes terminates | [
-0.15028513967990875,
0.1804908812046051,
0.48843011260032654,
-0.20553573966026306,
0.2136644721031189,
0.58078932762146,
0.5941383242607117,
-0.15064920485019684,
0.18158967792987823,
-0.20754693448543549,
-0.45467501878738403,
0.24605751037597656,
-0.13547231256961823,
0.432950258255004... | |
I have a C++ dll file that uses a lot of other c++ librarys (IPP, Opencv +++) that I need to load into matlab. How can I do this?
I have tried loadlibrary and mex. The load library does not work.
The mex finds the linux things (platform independent library) and tries to include them. And that does not work.
Does any... | [
0.3331109881401062,
0.07518179714679718,
-0.13035115599632263,
-0.0032698572613298893,
-0.18151423335075378,
-0.24883060157299042,
0.15079115331172943,
0.04971485957503319,
-0.30968451499938965,
-0.5580874085426331,
0.04058552533388138,
0.7678872346878052,
-0.4182318449020386,
0.2426849603... | |
are C functions, not C++ functions. If not, then write C wrappers.
More info on exactly what you are doing when using loadlibrary would be helpful. | [
0.3485858738422394,
-0.010930049233138561,
0.06972339004278183,
0.00583147257566452,
-0.08494381606578827,
-0.623140275478363,
-0.04335329309105873,
0.07361471652984619,
-0.19264905154705048,
-0.38444983959198,
-0.3120635449886322,
0.8028332591056824,
-0.38845595717430115,
-0.1968856900930... | |
I'm working on a windows shell extension, and unfortunately, when making changes to the DLL, I must restart windows explorer (since it keeps the DLL in memory).
I found this program from Dino Esposito, but it doesn't work for me.
```
void SHShellRestart(void)
{
HWND hwnd;
hwnd = FindWindow("Progman", NULL );
... | [
0.33471763134002686,
0.08527474105358124,
0.324974000453949,
-0.058775875717401505,
0.34247276186943054,
-0.19488026201725006,
0.3468097746372223,
-0.06151846423745155,
0.0627804696559906,
-0.5560101270675659,
-0.19151435792446136,
0.6996922492980957,
-0.4425428509712219,
0.417845636606216... | |
I just want to do it the lazy way. Besides, this enables automation.
P.P.S I am using .NET for the development, but the shell restart functionality could be in C, C++ or a .NET language. It will simply be a small stand-alone executable.
A fool-proof solution:
```
foreach (Process p in Process.GetProcesses())
{
//... | [
0.4443362057209015,
0.18141131103038788,
0.337462842464447,
-0.09393785893917084,
0.47431838512420654,
-0.10594430565834045,
0.4639113247394562,
-0.03168255090713501,
0.053107850253582,
-0.30677205324172974,
-0.2744564712047577,
0.6049779057502747,
-0.3528650403022766,
0.175445556640625,
... | |
break;
}
}
catch
{ }
}
Process.Start("explorer.exe");
``` | [
-0.05768729746341705,
-0.01635507307946682,
0.012287433259189129,
-0.2820685803890228,
0.3513273000717163,
-0.20886889100074768,
0.4137651026248932,
0.11658301949501038,
-0.23662543296813965,
-0.7204386591911316,
-0.48215481638908386,
0.3381179869174957,
-0.43097618222236633,
0.68537104129... | |
I have the following code in my `btn_click` event:
```
Sqlconnection con = new Sqlconnection("server=.;database=bss;user id=ab;pwd=ab");
con.open();
SqlCommand cmd = new Sqlcommand("select * from login where username='"
+ txt4name.Text + "' and pwd='" + txt4pwd.Text + "'", con);
SqlDataReader reader = cmd.execute Re... | [
0.07771105319261551,
0.3649275302886963,
0.6167690753936768,
-0.29466012120246887,
-0.14019091427326202,
-0.09296179562807083,
0.31484195590019226,
-0.43243905901908875,
0.053608205169439316,
-0.7576169371604919,
-0.0057623242028057575,
0.4641309678554535,
-0.33908772468566895,
0.410943299... | |
SqlCommand("SELECT * FROM USERS WHERE USERNAME=@username AND PASSWORD=HASHBYTES('SHA1', @password)", myConnection))
{
myCommand.Parameters.AddWithValue("@username", user);
myCommand.Parameters.AddWithValue("@password", pass);
myConnection.Open();
SqlDataReader my... | [
-0.21282711625099182,
-0.017677687108516693,
0.5210708975791931,
0.05670618638396263,
-0.004889445845037699,
-0.12897734344005585,
0.14586469531059265,
-0.2833538055419922,
-0.09084978699684143,
-0.3810255229473114,
-0.1703004091978073,
0.5614956617355347,
-0.15653932094573975,
0.297592818... | |
your own.** | [
0.4109455943107605,
0.13763150572776794,
0.3103563189506531,
0.07470066845417023,
-0.06390628963708878,
0.2958575189113617,
0.14220653474330902,
-0.34628450870513916,
-0.24250014126300812,
-0.4068950414657593,
-0.16371271014213562,
0.3714388608932495,
-0.13395236432552338,
-0.0538734532892... | |
I've made a simple storyboard that takes a particular ListBoxItem and lets it grow by a factor of 1.3. I'd like to add this animation to every ListBoxItem I create dynamically so that it can be activated when it gets a mouse-over, but the storyboard seems to be hardcoded to that first item:
```
<Storyboard x:Name=... | [
0.3923836350440979,
-0.4934714734554291,
0.7400277256965637,
0.044339004904031754,
0.1318640559911728,
0.3700152039527893,
0.03749425336718559,
-0.1371246725320816,
-0.1250237226486206,
-0.9801008105278015,
0.03361605107784271,
0.4163323640823364,
0.06435789912939072,
0.09058782458305359,
... | |
Storyboard.TargetName="RecentNews" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)">
<SplineDoubleKeyFrame KeyTime="00:00:00.3000000" Value="1.3"/>
</DoubleAnimationUsingKeyFrames>
</Storyboard>
```
How should I go about duplicating t... | [
0.07148536294698715,
-0.16338905692100525,
0.8098387122154236,
-0.05431478098034859,
-0.34191012382507324,
0.043444640934467316,
0.2666800320148468,
-0.18855948746204376,
-0.13602635264396667,
-0.6089717745780945,
0.130990132689476,
0.6321096420288086,
-0.013239174149930477,
-0.01026539597... | |
) AS range,
(
SELECT TOP 1 value
FROM values li
WHERE li.value < lo.value
ORDER BY
li.value DESC
) AS getprev,
(
SELECT TOP 1 | [
-0.16723285615444183,
-0.2614876329898834,
0.6655141711235046,
-0.1813139170408249,
0.14480608701705933,
0.08734457194805145,
0.373277485370636,
-0.5739315152168274,
0.15359997749328613,
-0.13597026467323303,
-0.7291784882545471,
0.7594096660614014,
-0.15022152662277222,
-0.165352255105972... | |
value
FROM values li
WHERE li.value > lo.value
ORDER BY
li.value
) AS getnext
FROM values lo
) vo
GROUP BY range
ORDER BY range
```
In your case:
```
1 100 240 3
2 240 450 2
3 450 625 2
4 625 700 | [
0.006963017396628857,
0.08135800808668137,
0.8104029893875122,
-0.3743462860584259,
0.19304968416690826,
0.42333701252937317,
-0.01060400065034628,
-0.9088271856307983,
-0.05697110295295715,
-0.252508282661438,
-0.4149759113788605,
0.6874774694442749,
0.018754417076706886,
0.11770746111869... | |
2
``` | [
-0.08525408059358597,
0.5816959738731384,
0.20782893896102905,
-0.16541700065135956,
0.07494619488716125,
-0.2757788896560669,
0.12485557794570923,
-0.209294855594635,
0.01004431489855051,
-0.3982597887516022,
-0.3641735315322876,
0.4419080913066864,
-0.10498024523258209,
0.033887900412082... | |
I'm trying to edit files with vim and get the POD automatically folded (just the POD, not the Perl). I can't get it to work. I can get folding itself to work because I can manually highlight the lines and type `zF` and it folds properly.
Can anyone shed light on this?
You forgot
```
:set foldmethod=syntax
:setf perl
... | [
0.14243529736995697,
-0.23034299910068512,
0.7950958013534546,
-0.08291119337081909,
0.12030510604381561,
-0.13066744804382324,
-0.11373679339885712,
-0.12640342116355896,
-0.3251986503601074,
-0.9790041446685791,
-0.4324352741241455,
0.24810461699962616,
-0.4338497221469879,
0.13783627748... | |
I got a huge C++ third-party project with set of project in one solution. So build time is rather long and Browse Information generation takes a lot too. So what is the purpose of Browse Information? What functionality will be lost if i disable Browse information generation?
Visual Studio 6 required browse information ... | [
0.27642369270324707,
0.11643098294734955,
0.29520583152770996,
0.3023645877838135,
-0.3219717741012573,
-0.11777623742818832,
0.20515406131744385,
-0.05888388305902481,
-0.10752063244581223,
-0.49044567346572876,
0.017771948128938675,
0.7484012246131897,
-0.2139996588230133,
0.065095148980... | |
in the build process. It really helps to have more than one processor or core when using Intellisense. Otherwise it can really bog down your system. | [
0.1117071881890297,
0.14544612169265747,
-0.04605870693922043,
0.33543142676353455,
0.18664295971393585,
-0.10902254283428192,
0.013756226748228073,
0.17125138640403748,
-0.024208152666687965,
-0.6845136880874634,
0.13079486787319183,
0.5602738261222839,
0.17660343647003174,
-0.26398876309... | |
When designing a new object model I always start with the class diagram function in visual studio. Once I have drafted the first version, with a couple of tweaks based on gathering new info or a change in requirements I start working on the actual implementation.
As development gets busy and targets have to be met the... | [
0.3577843904495239,
-0.06991752237081528,
0.1504916250705719,
0.020216867327690125,
-0.1542295515537262,
0.20193715393543243,
0.09977300465106964,
0.15716879069805145,
-0.2173013538122177,
-0.9390954375267029,
0.2567054033279419,
0.5017251968383789,
-0.12970028817653656,
0.0394623242318630... | |
out.
```
xdXDocument:GetDOM("Base Printers")/dfs:myFields/dfs:dataFields
/dfs:Base_Printers[@Printer = current()]/@PNP_String
```
For some strange reason, it works when you use:
```
@Printer = current()
```
But not when you use:
```
@Printer = my:basePrinter
```
Even though both current() and my:basePrinter re... | [
0.31131935119628906,
0.19278569519519806,
0.46024036407470703,
-0.06113211438059807,
0.0678756907582283,
-0.23536360263824463,
-0.036276113241910934,
-0.07610708475112915,
-0.35517528653144836,
-0.3895374536514282,
-0.06355080008506775,
0.13334758579730988,
-0.40689438581466675,
0.49539256... | |
I have recently installed Subversion onto a Linux server ([CentOS](http://en.wikipedia.org/wiki/CentOS)) and everything works great.
I am wondering if there are any web interfaces available for managing the repositories i.e. create / delete repositories, manage users and permissions, view revision history, etc.
The i... | [
0.43364033102989197,
-0.09820043295621872,
0.08581620454788208,
0.04667149856686592,
-0.3394952714443207,
-0.1563330590724945,
0.39738354086875916,
0.2109203040599823,
-0.365334153175354,
-0.5084367990493774,
0.020122136920690536,
0.309529185295105,
-0.009369666688144207,
0.263856053352355... | |
web interfaces.
I haven't used it, but [Submin](http://supermind.nl/submin/index.html) might be what you're looking for.
If you're looking for simple repository browsing mod\_dav\_svn is minimal and works.
[Trac](http://en.wikipedia.org/wiki/Trac) was already suggested, but that has more bug-tracking-wiki-project-... | [
-0.08659356832504272,
-0.15444359183311462,
0.3496584892272949,
0.27214691042900085,
-0.23254826664924622,
-0.3984466791152954,
0.2256292700767517,
0.21804173290729523,
-0.42274847626686096,
-0.9110075235366821,
-0.17220081388950348,
0.5746890306472778,
-0.2454540729522705,
-0.101367071270... | |
Here are the steps I take to create a package shipped to the end users:
1. Use visual studio 2005 Build the project (which is library DLL written in C#), both in debug and release mode.
2. I run doxygen and create documentation
3. I create a folder structure where I put my dll documentation and some release notes
4. z... | [
0.6148204207420349,
-0.0008884920389391482,
0.18129654228687286,
-0.27660486102104187,
-0.1431722640991211,
-0.15795716643333435,
0.1264301836490631,
-0.25676003098487854,
0.1137215867638588,
-0.507003903388977,
-0.29811084270477295,
0.615801215171814,
-0.2877456247806549,
-0.2492375075817... | |
--vs2005
--relesae
--dll
--debug | [
-0.42000824213027954,
-0.3902943730354309,
0.42561620473861694,
0.13639375567436218,
-0.2344995141029358,
0.2528406083583832,
0.29301705956459045,
-0.2758573293685913,
-0.2676016092300415,
-0.6638746857643127,
-0.3010331988334656,
0.4533659517765045,
-0.27752479910850525,
0.434338241815567... | |
--dll
--documentation
--htmls files generated by doxygen
--ReleaseNotes.html
--Examples
```
I am thinking of rolling out a script to automate that. But before I do that, I would | [
0.49374285340309143,
0.28981032967567444,
0.14176563918590546,
-0.08653170615434647,
0.008974275551736355,
-0.43620237708091736,
0.14729294180870056,
-0.04078153893351555,
-0.012911675497889519,
-0.6497276425361633,
-0.20401893556118011,
0.516507089138031,
-0.4122161269187927,
-0.145981639... | |
like to find out the common practices of packaging library api type of project, particularly structure, and tools used. References and examples are highly appreciated
Thanks
I am a big believer in continuous-integration and automated builds.
We have a rule in our shop that we never, ever, ever provide deliverables to... | [
0.8173172473907471,
0.12632347643375397,
-0.047976378351449966,
-0.08902573585510254,
0.3777187764644623,
-0.12904761731624603,
0.3054262399673462,
0.26831838488578796,
0.03127443417906761,
-0.6393887996673584,
-0.07773661613464355,
0.5598183274269104,
0.04105737805366516,
0.07811066508293... | |
source code control system, and automatically triggering the "build script."
For C#, I can recommend both [CruiseControl.NET](http://ccnet.thoughtworks.com/) and [Hudson](http://hudson-ci.org/).
I can also recommend the [Pragmatic Project Automation](http://www.pragprog.com/titles/auto/pragmatic-project-automation) s... | [
0.23155352473258972,
-0.03303302451968193,
0.1928657442331314,
0.08047578483819962,
0.20353397727012634,
-0.07426674664020538,
0.03330440819263458,
0.09704408794641495,
-0.1745515614748001,
-0.5465211272239685,
-0.035023558884859085,
0.8335332870483398,
0.10080365836620331,
-0.394425034523... | |
We are using a badly written windows service, which will hang when we are trying to Stop it from code. So we need to find which process is related to that service and kill it.
Any suggestions?
WMI has this information: the Win32\_Service class.
A WQL query like
```
SELECT ProcessId FROM Win32_Service WHERE Name='MyS... | [
0.19041769206523895,
-0.08426563441753387,
0.35108041763305664,
0.028655145317316055,
0.23610572516918182,
-0.18741220235824585,
0.12470772862434387,
0.16079650819301605,
-0.38946333527565,
-0.6796206831932068,
-0.012158936820924282,
0.5854955911636353,
-0.21132193505764008,
0.259781956672... | |
I'm using the DriveInfo class in my C# project to retrieve the available bytes on given drives. How to I correctly convert this number into Mega- or Gigabytes? Dividing by 1024 will not do the job I guess. The results always differ from those shown in the Windows-Explorer.
1024 is correct for usage in programs.
The re... | [
0.2913917899131775,
0.12272676080465317,
0.38702818751335144,
0.2706020176410675,
0.05205032229423523,
0.161974236369133,
-0.1868174970149994,
-0.1280430257320404,
-0.5567513704299927,
-0.7380273938179016,
0.07249254733324051,
0.5752594470977783,
-0.29543641209602356,
0.33757373690605164,
... | |
anyway, this calculation can be done by merely shifting the bits by 10 for each magnitude:
> KB = B >> 10
>
> MB = KB >> 10 = B >> 20
>
> GB = MB >> 10 = KB >> 20 = B >> 30
Although for readability I expect successive division by 1024 is clearer. | [
-0.0015752332983538508,
-0.09185788035392761,
0.18478995561599731,
-0.18950937688350677,
-0.292336642742157,
0.2838394045829773,
0.5560619235038757,
-0.3748176097869873,
-0.3987213671207428,
-0.47308865189552307,
0.15994058549404144,
0.3384866714477539,
0.018504351377487183,
0.306783407926... | |
Using C# (vs2005) I need to copy a table from one database to another. Both database engines are SQL Server 2005. For the remote database, the source, I only have execute access to a stored procedure to get the data I need to bring locally.
The local database I have more control over as it's used by the [asp.net] app... | [
0.033158086240291595,
0.04522482305765152,
0.5080941915512085,
0.24968361854553223,
-0.24851536750793457,
-0.31502124667167664,
0.04424240067601204,
-0.041186291724443436,
-0.45596614480018616,
-0.720902681350708,
0.2105998545885086,
0.6255718469619751,
-0.3768739402294159,
0.1969547718763... | |
local table can be created with the same schema as the remote one, if it makes things simpler. The remote table has 9 columns, none of which are identity columns. There are approximately 5400 rows in the remote table, and this number grows by about 200 a year. So not a quickly changing table.
Bulk Copy feature of ADO.N... | [
-0.25164714455604553,
-0.15282371640205383,
0.5322073698043823,
0.230290025472641,
-0.06711950898170471,
0.2924481928348541,
0.3370722234249115,
0.1563865840435028,
-0.46921369433403015,
-0.7163952589035034,
0.019995277747511864,
0.42947861552238464,
-0.16990846395492554,
0.252105683088302... | |
We're monitoring usage statistics of a network interface using NetworkInterface.GetIPv4Statistics() in .NET 2.0. This isn't reporting correct statistics for connections over which VPN traffic is being tunneled. Instead - in the case of the Cisco VPN client - the usage is just attributed to a new network interface that ... | [
0.3510846793651581,
-0.07115556299686432,
0.5029380917549133,
0.19940271973609924,
0.06023678556084633,
-0.3794478476047516,
0.18274231255054474,
0.1724175661802292,
-0.40806084871292114,
-0.819015383720398,
0.06240703538060188,
0.7237017154693604,
-0.2212105393409729,
-0.15092487633228302... | |
to associate the VPN connection back to the network connection over which it's being tunneled? Failing that, does anyone know which API is being used by the status dialog to retrieve correct statistics?
At the moment we're having to manually detect connections that look like they're VPNs and add their usage to whateve... | [
0.23612874746322632,
0.0783686712384224,
0.33644330501556396,
0.043037351220846176,
0.08005424588918686,
-0.006776649039238691,
0.10005903989076614,
0.010689079761505127,
-0.4756583571434021,
-0.3510664105415344,
0.06866255402565002,
0.43881723284721375,
-0.26357266306877136,
0.35265022516... | |
static void Main()
{
var query = new WqlEventQuery("__InstanceModificationEvent", TimeSpan.FromSeconds(1),
"TargetInstance ISA 'Win32_PerfFormattedData_RemoteAccess_RasPort' AND TargetInstance.BytesReceived > 0");
var watcher = new ManagementEventWatcher(query)... | [
-0.39021092653274536,
-0.4797075092792511,
0.5835852026939392,
-0.3319745361804962,
0.36251115798950195,
-0.005527670960873365,
0.36803382635116577,
-0.029567385092377663,
-0.4220218062400818,
-0.3568571209907532,
-0.3732064962387085,
0.7004709839820862,
-0.39261889457702637,
0.50830084085... | |
Console.ReadLine();
}
static void EventArrived(object sender, EventArrivedEventArgs e)
{
var mo = e.NewEvent["TargetInstance"] as ManagementBaseObject;
Console.WriteLine("{0:#,0}: {1:#,0} bytes sent, {2:#,0} bytes received", mo["Name"], mo["BytesTransmitted"], mo["BytesReceived"]);
}
}
... | [
-0.622119665145874,
-0.24939019978046417,
0.6454532146453857,
-0.0353349931538105,
0.5725013017654419,
-0.021527225151658058,
0.24758562445640564,
-0.02035776525735855,
-0.0062543973326683044,
-0.7071228623390198,
-0.4505370259284973,
0.9790021777153015,
-0.17342950403690338,
0.02653955854... | |
I have a base class which implements the == operator.
I want to write another class, inheriting the base class, and which should reimplement the == operator.
Here is some sample code :
```
#include <iostream>
#include <string>
class Person
{
public:
Person(std::string Name) { m_Name = Name; };
bool operator==(c... | [
-0.3801070749759674,
-0.00992285180836916,
0.10182598233222961,
-0.30230551958084106,
0.08433814346790314,
0.3748038411140442,
0.36399784684181213,
-0.292001336812973,
0.010672620497643948,
-0.4122501313686371,
-0.34918975830078125,
0.5218710899353027,
-0.32661670446395874,
0.2271461933851... | |
Employee* pEmployee1 = new Employee("Foo" , 1);
Employee* pEmployee2 = new Employee("Foo" , 2);
if (*pEmployee1 == *pEmployee2)
{
std::cout << "same employee\n";
}
else
{
std::cout << "different employee\n";
}
Person* pPerson1 = pEmployee1;
Person* pPerson2 = pEmployee2;
if (*pPerson1 == ... | [
-0.20216882228851318,
0.03226681426167488,
0.1567990779876709,
-0.31115254759788513,
0.12920014560222626,
0.7329675555229187,
-0.031695932149887085,
-0.2872646450996399,
-0.0721236988902092,
-0.6478238105773926,
-0.11781766265630722,
0.2567201852798462,
-0.30189162492752075,
-0.02854564413... | |
to make sure they are different.
How am I supposed to solve this problem ?
Thanks !
What you want to do is essentiall "virtualize" the comparison operator.
~~Since operators cannot be virtual~~ (operators can be `virtual`), you will need to delegate it to something else. Here's one possible solution.
```
class Pers... | [
-0.33986687660217285,
-0.22441115975379944,
0.28666627407073975,
0.13666465878486633,
0.23390966653823853,
0.3495709300041199,
0.3685901463031769,
-0.24320277571678162,
-0.15554529428482056,
-0.7347948551177979,
-0.290949285030365,
0.8541993498802185,
-0.07096455991268158,
0.16182681918144... | |
virtual bool doCompare() = 0;
};
}
class Employee : public Person
{
/* ... */
private:
virtual bool doCompare(const Person& rhs)
{
bool bRetval = false;
const Employee* pRHSEmployee = dynamic_cast<const Employee*>(&rhs);
if (pEmployee)
{
bRetval = m_I... | [
-0.27291059494018555,
-0.18821829557418823,
0.44801759719848633,
0.013205350376665592,
0.1666395217180252,
0.4391190707683563,
0.6466301083564758,
0.10988509654998779,
0.011114494875073433,
-0.571609616279602,
-0.5028713345527649,
0.8506859540939331,
-0.0630246251821518,
0.0680511668324470... | |
}
return bRetval;
}
};
```
The question didn't make clear whether Person needs to be a concrete class. If so, you can make it not pure-virtual, and implement it to return true.
This also uses RTTI, which you may or may not be happy with. | [
-0.10239557921886444,
-0.2216336876153946,
-0.04119839891791344,
0.010814884677529335,
-0.05760486051440239,
-0.12406036257743835,
0.738908052444458,
0.0604056753218174,
0.16100190579891205,
-0.5378767848014832,
-0.22710657119750977,
0.8259391188621521,
-0.3614290654659271,
-0.023422611877... | |
I'm trying to script the creation of sites for the fab 40 Microsoft SharePoint templates. I'm having trouble finding the value for the sitetemplate parameter for the stsadm command to create the sites.
e.g.:
```
stsadm -o createsite -url http://Test/sites/Team_Site **-sitetemplate STS#0** -title "Team Site" ...
```
... | [
0.3950645923614502,
0.14460164308547974,
0.2549305260181427,
0.04071376100182533,
0.0967874825000763,
-0.24683716893196106,
0.039498470723629,
-0.019092082977294922,
-0.20258218050003052,
-0.9198511838912964,
0.08959982544183731,
0.46925610303878784,
-0.4294005334377289,
-0.036983869969844... | |
lines of PowerShell script/command to spit the Name and Title properties out on the screen:
```
[System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint")
$theSiteColl = New-Object Microsoft.SharePoint.SPSite("http://server")
$theWeb = $theSiteColl.OpenWeb()
$theWeb.GetAvailableWebTemplates(1033)... | [
0.3422733247280121,
0.07238219678401947,
0.5102365612983704,
-0.00005771768337581307,
0.3074996769428253,
-0.2201625257730484,
0.3509434163570404,
0.10014574974775314,
0.030124720185995102,
-0.6322096586227417,
-0.4760276675224304,
0.28446054458618164,
-0.2475862354040146,
0.44750395417213... | |
In management studio you can see the owner under properties but it won't let you change it. My guess is there's some stored procedure to change it and you can't do it through the gui.
Surpisingly, it's called [`sp_changedbowner`](http://msdn.microsoft.com/library/ms178630.aspx).
You can actually change it in `SQL Serv... | [
0.14769811928272247,
-0.10106662660837173,
0.29808515310287476,
-0.031518805772066116,
0.10608813166618347,
-0.5362734794616699,
-0.02086048200726509,
-0.033378321677446365,
-0.5405003428459167,
-0.6600802540779114,
0.07710728794336319,
0.729182243347168,
-0.08195749670267105,
0.2802067399... | |
I am attempting to use WinDBG or another debugger to debug a CodeGear Delphi 2007 Windows application on a remote machine. I have been unable to produce symbol files for WinDBG.
Is there a way to use WinDBG or another debugger to debug Delphi applications on a system that doesn't include the IDE?
**Edit1**
The remo... | [
-0.2833883464336395,
0.29872050881385803,
0.30949726700782776,
-0.05115586891770363,
-0.22711026668548584,
-0.14479783177375793,
0.8102179765701294,
0.020053306594491005,
-0.07222547382116318,
-0.6245285272598267,
0.05349848419427872,
0.5320891737937927,
-0.10163533687591553,
0.14341829717... | |
debugger due to firewall restrictions.
How about the remote debugger? Build your app with remote debug symbols and debug from your development machine across the network. | [
0.28043439984321594,
0.05438479408621788,
0.047053128480911255,
0.3610115051269531,
0.07286158949136734,
-0.20148760080337524,
0.355492502450943,
0.07715192437171936,
0.10320194065570831,
-0.4847353994846344,
-0.2838028371334076,
0.6874060034751892,
-0.30010420083999634,
0.2079911679029464... | |
I want to have a diagnostic log that is produced by several tasks managing data. These tasks may be in multiple threads. Each task needs to write an element (possibly with subelements) to the log; get in and get out quickly. If this were a single-task situation I'd use [XMLStreamWriter](http://java.sun.com/webservices/... | [
0.2018771767616272,
-0.06761570274829865,
0.33478429913520813,
0.17653846740722656,
0.24571672081947327,
-0.11124207824468613,
-0.011380192823708057,
-0.20762048661708832,
-0.2353813797235489,
-0.6811787486076355,
0.33352404832839966,
0.38534727692604065,
-0.12260115891695023,
-0.101672187... | |
to the log correctly and serially (one after the other and not interleaved in any way).
Any suggestions? I have a vague intuition that the way to go is to use a queue of log elements (with each one able to be produced quickly: my application is busy doing real work that's performance-sensitive), and have a separate th... | [
0.5833061337471008,
0.03829023614525795,
0.14237743616104126,
0.04594757407903671,
-0.013177325017750263,
-0.05865740403532982,
0.07594668120145798,
-0.005238634534180164,
-0.4366816580295563,
-0.5668706297874451,
-0.19172605872154236,
0.4785926938056946,
-0.21678100526332855,
-0.003607804... | |
be the obvious choice (new to me but old to the community), why reinvent the wheel...
Use a logging framework, such as [Log4j](http://logging.apache.org/log4j/). | [
0.41601112484931946,
0.03830263018608093,
0.22835440933704376,
0.24623604118824005,
-0.15913331508636475,
-0.3748449385166168,
0.05631615221500397,
-0.3325350880622864,
-0.2753029763698578,
-0.3201916217803955,
0.27686548233032227,
0.47104156017303467,
0.20153982937335968,
0.05272715911269... | |
I am still trying to get my brain wrapped around MVP. What should I use the controller class for? Is that where I access data resources?
Use a logging framework, such as [Log4j](http://logging.apache.org/log4j/). | [
0.29073941707611084,
0.047957081347703934,
-0.1750478595495224,
0.31652596592903137,
-0.11789395660161972,
-0.3021340072154999,
0.12552836537361145,
0.26221349835395813,
-0.43372243642807007,
-0.6575766205787659,
0.43663275241851807,
0.28024065494537354,
-0.09370630979537964,
0.14973589777... | |
I want to write a c array into a container and i prefer to modify it if possible.
I was thinking of using vector but it does seem to have a write(\*pchararray, len); function. String looked like the next best thing but that too doesnt have a write function?
Given
```
char myarray[10];
```
You can use an **STL `itera... | [
0.020770249888300896,
0.01214698888361454,
0.3598000109195709,
-0.13267622888088226,
-0.1333829015493393,
0.2934591770172119,
0.12977460026741028,
-0.2002987116575241,
-0.07757305353879929,
-0.47464486956596375,
-0.002247615484520793,
0.6918308138847351,
-0.5128010511398315,
-0.04167689010... | |
I am building a form with winforms - and should add a view and editable time span value.
Which controls works best for this ?
A normal edit control shows the value correctly -> but it's not really nice for changing values
the normal date time picker doesn't work
the masked edit control doesn't have got any standard... | [
0.3329165279865265,
-0.17426489293575287,
0.5680267214775085,
-0.0019736953545361757,
-0.048475779592990875,
0.07482892274856567,
0.3894844353199005,
-0.11439088732004166,
-0.16008906066417694,
-0.7201051115989685,
0.32138198614120483,
0.5355414152145386,
0.0017678955337032676,
0.172015190... | |
third the seconds.
```
//Setting the values
durationHours.Value = (Decimal)Math.Floor (data.TotalHours);
durationMin.Value = data.Minutes;
durationSeconds.Value = data.Seconds;
//Getting the values
data = new TimeSpan((int)durationHours.Value, (int)durationMin.Value, (int)durationSeconds.Value);
``` | [
-0.13949064910411835,
-0.02214500494301319,
0.5258444547653198,
-0.16893821954727173,
-0.31693071126937866,
0.3967837393283844,
0.11062543094158173,
-0.35290512442588806,
-0.6437578797340393,
-0.5413452982902527,
-0.2018236368894577,
0.3132231831550598,
-0.012190409936010838,
0.19651491940... | |
`error_log` shows the following line on startup:
> *Unable to load dynamic library
> '/usr/lib/php/extensions/no-debug-non-zts-20060613/memcache.so' -
> (null) in Unknown on line 0*
The file exists and it compiled properly. PHP version is 5.2.6. After Googling for a couple of hours I managed to find a couple of sim... | [
0.057515889406204224,
0.21232637763023376,
0.7518179416656494,
-0.17144739627838135,
0.019287802278995514,
-0.1445963978767395,
0.9249674677848816,
-0.0025695946533232927,
-0.2451566755771637,
-0.7466028332710266,
0.20477932691574097,
0.6370026469230652,
-0.12313015013933182,
0.13166534900... | |
The title pretty much says it all, but to elaborate: If I build a mySQL database on my local dev machine, populate it with data, and subsequently want to migrate the database to a shared host (in this case, Siteground,) how do I do so in a way that keeps structure and data intact?
In this case, I don't have file acces... | [
0.4635113775730133,
0.08268625289201736,
0.2817271053791046,
0.2524315118789673,
-0.09110259264707565,
-0.3798987865447998,
0.12021246552467346,
-0.06710471957921982,
-0.10891018807888031,
-0.43177732825279236,
-0.2759532928466797,
0.41277140378952026,
-0.11396808177232742,
0.2633504569530... | |
on your shared-host using the provided utilities (normaly you get **phpMyAdmin** preinstalled from your hoster, which can import dumps) | [
0.3127579689025879,
0.039478547871112823,
-0.02004099078476429,
0.2562809884548187,
0.05141668766736984,
-0.39332929253578186,
0.23516631126403809,
0.45923611521720886,
-0.13648538291454315,
-0.6145193576812744,
-0.30440300703048706,
0.40309226512908936,
-0.14688102900981903,
0.30545800924... | |
I am trying to find a good way to tail a file on a remote host. This is on an internal network of Linux machines. The requirements are:
1. Must be well behaved (no extra process laying around, or continuing output)
2. Cannot require someone's pet Perl module.
3. Can be invoked through Perl.
4. If possible, doesn't req... | [
0.49951228499412537,
-0.039688870310783386,
0.6094452738761902,
0.10001520812511444,
-0.0013497733743861318,
-0.32483163475990295,
0.27907246351242065,
-0.13081975281238556,
0.13331468403339386,
-0.33797788619995117,
-0.10782357305288315,
0.6867297887802124,
-0.41528037190437317,
0.3132945... | |
the terminal after the local ssh process dies.
```
$socket = IO:Socket::INET->new(...);
$pid = fork();
if(!$pid)
{
exec("ssh $host -f '<script which connects to socket and writes>'");
exit;
}
$client = $socket->accept;
while(<$client>)
{
print $_;
}
```
This works better because there is no output to the scre... | [
-0.3986820578575134,
-0.02184491790831089,
0.6879376173019409,
-0.30959123373031616,
0.18675100803375244,
-0.02506219409406185,
0.37301331758499146,
0.2707480490207672,
-0.12276256084442139,
-1.0157674551010132,
-0.23137246072292328,
0.5097954869270325,
-0.37157630920410156,
0.650378763675... | |
programs on a remote machine, which
can be very useful, e.g. when implementing menu services.
Multiple -t options force tty allocation, even if ssh has no local tty.
```
instead of
```
-f Requests ssh to go to background just before command execution.
This is useful if ssh is going... | [
0.12454843521118164,
-0.24729198217391968,
-0.05248052254319191,
0.2103082537651062,
0.14616872370243073,
0.036903779953718185,
0.2644043564796448,
0.07409226894378662,
-0.34319284558296204,
-0.642160177230835,
-0.5754510760307312,
0.5063271522521973,
-0.31214985251426697,
-0.0296195168048... | |
background.
This implies -n. The recommended way to start X11 programs at a remote
site is with something like ssh -f host xterm.
``` | [
0.444009929895401,
0.30597609281539917,
-0.10810504853725433,
0.1437755972146988,
-0.09785070270299911,
-0.40776127576828003,
0.12284450978040695,
0.40426215529441833,
-0.13956740498542786,
-0.6646422147750854,
-0.32863301038742065,
0.5036418437957764,
-0.24701453745365143,
0.0769747197628... | |
i have an application on my site where people can sign up to receive newsletters, and then someone in a paid group can write and send one immediately to everybody who signed up...
...meaning that i need an efficient way to loop through my database of subscribers and mail them copies of the email using php.
clearly, t... | [
0.8013875484466553,
0.1915585845708847,
0.1637297123670578,
0.08351574838161469,
0.007100691087543964,
-0.15892969071865082,
0.22175073623657227,
0.004149181768298149,
-0.2959858477115631,
-0.39373695850372314,
0.26355719566345215,
0.2539830207824707,
-0.0984697937965393,
-0.00069521035766... | |
reload it.
I have done it once using AJAX, gave me a great way to track where I was in the sending proces. Counted how many people to mail, put the id's in an array, had javascript loop and make seperate calls to a php-mail-page...
-edit-
You can have a script in php, with a simple while loop, but then you should add... | [
0.5737752318382263,
-0.14553596079349518,
0.3438912630081177,
0.12289904057979584,
-0.6085295081138611,
-0.06704086065292358,
0.3847223222255707,
-0.16138488054275513,
-0.3000692129135132,
-0.4728832244873047,
0.11782826483249664,
0.6646016240119934,
-0.14990323781967163,
-0.01457045320421... | |
While converting types, I have found myself using both VB functions and BCL Convert.To\* methods.
E.g.)
* `Cstr()` vs. `Convert.ToString()`
* `CInt()` vs. `Convert.ToInt32()`
* `CDbl()` vs. `Convert.ToInt64()`
* etc...
Are there any **subtle** differences that should be noted?
This has been covered [before](https... | [
0.1967686265707016,
0.06772618740797043,
0.19591177999973297,
-0.1966903656721115,
-0.3130447268486023,
0.022629786282777786,
0.20258627831935883,
-0.07763215899467468,
-0.4111534655094147,
-0.6611069440841675,
-0.022883083671331406,
0.5157281160354614,
-0.4838514029979706,
0.2510978579521... | |
it better than I can.
Edit Redux: Joel Coehoorn also recommends the [precursor to the above article](http://www.panopticoncentral.net/archive/2004/05/31/1100.aspx), and apparently has some benchmarking up his sleeve somewhere.
Joel wrote:
> The summary is the CInt() is an
> operator, while Convert.ToInt32() is a
> ... | [
0.20935358107089996,
-0.180583655834198,
0.2720164358615875,
0.018184328451752663,
0.29062217473983765,
-0.25378546118736267,
0.18997767567634583,
-0.3448216915130615,
-0.10188844799995422,
-0.4766814708709717,
0.09280605614185333,
0.7249080538749695,
0.00930632185190916,
-0.17421153187751... | |
I am working on coding a Tetris clone in XNA C# and am unsure of the best way to approach the data structure side of the game on a high level.
I am totally fine with the collision detection, rotations, animation etc. What I need to know the best way to do the storing of "dropped blocks" - ie blocks that are no longer ... | [
0.4250131845474243,
0.23782017827033997,
0.03880983218550682,
0.09951460361480713,
-0.16525357961654663,
-0.2083468735218048,
0.14626938104629517,
-0.06006355956196785,
0.3018812835216522,
-0.6221898198127747,
-0.07934709638357162,
0.438387930393219,
-0.2858048975467682,
0.3127456605434418... | |
I store the tetromino's final position into the game grid by then cutting the tetromino up into individual blocks(for each cell) and then set the main game grid's corresponding positions to hold these same blocks, then disappearing the tetromino once it has reached its final position. Maybe there is some drawback to my... | [
0.34194129705429077,
-0.12127005308866501,
0.25694724917411804,
0.27428683638572693,
-0.08605039864778519,
0.2852076292037964,
-0.0032021845690906048,
-0.42485442757606506,
-0.20966075360774994,
-0.37729862332344055,
-0.14671413600444794,
0.10271018743515015,
-0.057099904865026474,
0.09238... | |
am reaching out to see if anybody knows a better way or if my way is good enough?
P.S. Not homework, this will be a project for my portfolio. Thanks.
Once a block is immobile, there's nothing that distinguishes it from any other block that is now immobile. In that regard, I think it makes the most sense to store the e... | [
0.5051801204681396,
-0.020843839272856712,
0.3766857087612152,
0.13107532262802124,
-0.09708328545093536,
0.06046140566468239,
0.038617126643657684,
0.03556399047374725,
-0.31550562381744385,
-0.7399652600288391,
0.008479604497551918,
-0.07683490961790085,
0.001560737262479961,
0.171007812... | |
objects, just locations on a matrix). Storing it as a matrix will also make it easier to determine when a full line has been created. On top of that, you don't have to worry about splicing an immobile Tetromino when a line disappears. And when one does, you can just shift the entire matrix down in one fell swoop. | [
0.2718477249145508,
-0.32029566168785095,
0.3898819088935852,
0.4528854489326477,
-0.24574679136276245,
-0.12676186859607697,
0.022251220420002937,
-0.05636816471815109,
-0.4354596734046936,
-0.4281616508960724,
-0.20124602317810059,
-0.06960470974445343,
-0.22941343486309052,
0.5260527729... | |
How can I ensure to I am accesing the Certificates from my SmartCard and not form my personal certificate store in c#?
and How can I make my RSACryptoProvider to utilize my smart card certificate private key?
thanks
Wally
Descendants should work absolutely fine. Here's an example:
```
using System;
using System.Xml.... | [
0.5063956379890442,
0.13957978785037994,
0.4873276352882385,
0.3000098168849945,
0.2712794244289398,
-0.01970057375729084,
0.2710905969142914,
-0.44202566146850586,
-0.02221468649804592,
-0.5222277641296387,
0.08856602013111115,
0.43959054350852966,
-0.012189068831503391,
0.300450950860977... | |
foreach (XElement element in doc.Descendants("grandchild"))
{
Console.WriteLine(element);
}
}
}
```
Results:
> `<grandchild id="3" />`
>
> `<grandchild id="4" />` | [
0.03800833597779274,
0.5200552940368652,
0.6227933168411255,
-0.45615753531455994,
0.42832356691360474,
0.3179387152194977,
0.19176189601421356,
-0.5206286907196045,
0.4464856684207916,
-0.6573927402496338,
-0.4293307065963745,
0.310263067483902,
-0.04607594758272171,
0.4943273961544037,
... | |
It's easy to set inline CSS values with javascript. If I want to change the width and I have html like this:
```
<div style="width: 10px"></div>
```
All I need to do is:
```
document.getElementById('id').style.width = value;
```
It will change the inline stylesheet values. Normally this isn't a problem, because t... | [
0.21003927290439606,
0.22942756116390228,
0.47000399231910706,
-0.12023857235908508,
-0.28387686610221863,
0.0054354253225028515,
0.1311645656824112,
-0.36052462458610535,
-0.0074824863113462925,
-0.8335354924201965,
0.033681392669677734,
0.6855071187019348,
-0.2478887289762497,
-0.1288927... | |
change inline values, If I look for the width before I set it, when I have:
```
<div id="tId"></div>
```
The value returned is Null, so if I have Javascript that needs to know the width of something to do some logic (I increase the width by 1%, not to a specific value), getting back Null when I expect the string "50... | [
0.4030855596065521,
0.03342650830745697,
0.25836417078971863,
-0.05459817126393318,
-0.13159337639808655,
0.17144809663295746,
0.15455128252506256,
-0.14320255815982819,
-0.34357261657714844,
-0.5694313645362854,
0.2801017761230469,
0.6880409717559814,
-0.4267180263996124,
-0.0318800173699... | |
to change the global CSS so which will effictively change all elements of a peticular style at once. I've recently learned how to do this myself from a [Shawn Olson tutorial](http://www.shawnolson.net/a/503/altering-css-class-attributes-with-javascript.html). You can directly reference his code [here](http://www.shawno... | [
0.5978019833564758,
0.058027345687150955,
0.3450310528278351,
0.026280075311660767,
0.04572129249572754,
-0.07250716537237167,
0.05201907455921173,
-0.0436118058860302,
-0.4421457052230835,
-0.6411918997764587,
0.014090269804000854,
0.5428422093391418,
-0.3375556468963623,
-0.1388638019561... | |
most other browsers. The way to tell what [CSSRule](https://developer.mozilla.org/en/DOM/cssRule#CSSStyleRule) you are on is by the `selectorText` property. The working code looks something like this:
```
var cssRuleCode = document.all ? 'rules' : 'cssRules'; //account for IE and FF
var rule = document.styleSheets[sty... | [
0.4640476405620575,
-0.0081439558416605,
0.40338993072509766,
-0.2116156369447708,
-0.20732839405536652,
-0.4092704951763153,
0.3499457538127899,
-0.10530607402324677,
-0.17674137651920319,
-0.9433600306510925,
-0.3809630274772644,
0.4520230293273926,
-0.3596423268318176,
-0.11252945661544... | |
I'm currently investigating how to use the RMI distribution option in ehcache. I've configured properly ehcache.xml and replication seems to work fine. However I've 2 questions:
-> It seems ehcache/ hibernate creates 1 cache per Entity. This is fine, however when replication is in place it create 1 thread / cache to ... | [
0.27585679292678833,
0.2922148108482361,
0.4832201600074768,
0.20779284834861755,
-0.17823630571365356,
-0.12688207626342773,
0.19711756706237793,
0.026043487712740898,
-0.5072640776634216,
-0.6512518525123596,
0.4099770784378052,
0.2093464434146881,
-0.16371017694473267,
0.285981208086013... | |
in 1500 bytes, which it does not, which leads to this message in my logs: Heartbeat is not working. Configure fewer caches for replication. Size is 1747 but should be no greater than1500. Any idea on how this could be changed ?
Thanks a lot for your help
We already have one hack where we have our own custom copy of t... | [
0.53656005859375,
0.0437292642891407,
0.5777053236961365,
0.19243840873241425,
-0.20257125794887543,
0.12130621820688248,
0.4491059184074402,
0.019766759127378464,
-0.28607016801834106,
-0.5387686491012573,
0.2872561812400818,
0.02186032384634018,
0.0027209636755287647,
0.193318709731102,
... | |
lookup.
We did this a while ago and have been using it in production.
We also looked at your other issue to have a single replicator thread. First we copied RMICacheReplicatorFactory and changed createCacheEventListener() to return our copy of RMIAsynchronousCacheReplicator that we modified by making the replicationT... | [
0.43703797459602356,
-0.10516877472400665,
0.2915416359901428,
0.24077856540679932,
0.10170109570026398,
-0.15843315422534943,
0.18558530509471893,
0.26442259550094604,
-0.4366327226161957,
-0.7736775279045105,
0.45803651213645935,
0.25943559408187866,
-0.4438462257385254,
0.44247975945472... | |
What is the correct pattern or method for developing a Silverlight application (which is the Silverlight project and Web Application in a single solution)? I mean, how do you add the Service Reference if the localhost port number will be constantly changing?
Thanks.
If you select the web project in the Solution Explor... | [
0.3792162239551544,
-0.10751917958259583,
0.24464860558509827,
0.050473421812057495,
0.11133787035942078,
-0.20047636330127716,
0.33147773146629333,
-0.14812520146369934,
-0.27893444895744324,
-0.6231750845909119,
-0.05803060159087181,
0.6731857657432556,
-0.4351724088191986,
0.25014281272... | |
is not in the project's property pages, but in the Properties tool window (which is probably why it's so hard to find - took me quite some time to work this one out myself).
### Update
To switch between deployment and development, I tend to specify two SOAP bindings and then use `#ifdef DEBUG` to switch the binding o... | [
0.3111347258090973,
0.06620452553033829,
0.26645857095718384,
-0.23376819491386414,
-0.2586437165737152,
-0.09905050694942474,
0.2505738437175751,
-0.2624042332172394,
0.029292818158864975,
-0.8911474347114563,
-0.006103925872594118,
0.4972120523452759,
-0.12414620816707611,
0.201854497194... | |
<binding name="Soap_Debug" maxBufferSize="2147483647"
maxReceivedMessageSize="2147483647">
<security mode="None" />
</binding>
<binding name="Soap_Release" maxBufferSize="2147483647"
maxReceivedMessageSize="2147483647">
<security mode="None" />
</binding>
... | [
-0.5114648342132568,
0.10296895354986191,
0.3654153048992157,
-0.25577405095100403,
-0.23305457830429077,
0.1623222529888153,
0.4470013380050659,
-0.32488763332366943,
-0.07848440110683441,
-0.5252946019172668,
-0.5033643245697021,
0.34420058131217957,
-0.4439096450805664,
0.16986735165119... | |
address="http://www.mymadeupurl.com/myservices.asmx"
binding="basicHttpBinding" bindingConfiguration="Soap_Release"
contract="MyServices.MyServicesSoap" name="Soap_Release" />
<endpoint address="http://localhost:1929/mydservices.asmx"
binding="basicHttpBinding" bindingConfiguration="Soap_D... | [
0.057640451937913895,
0.22904203832149506,
0.4562142789363861,
-0.2835911214351654,
-0.25744545459747314,
0.14615146815776825,
0.4033345878124237,
-0.43458104133605957,
-0.10556664317846298,
-0.7928513288497925,
-0.2503381371498108,
0.3163911998271942,
-0.30673661828041077,
0.5169093012809... | |
Can anyone tell me some of the most important usability, accessibility and SEO guidelines, which must be taken into considerations while developing a good Web2.0 website ???
[<http://www.w3.org/WAI/>](http://www.w3.org/WAI/)
[<http://www.section508.gov/index.cfm?FuseAction=content&ID=12#Web>](http://www.section508.g... | [
0.743808388710022,
0.06985016167163849,
0.2568395137786865,
0.21821898221969604,
-0.04675556346774101,
-0.8209192752838135,
0.16507403552532196,
-0.08900564908981323,
-0.34674203395843506,
-0.8618150949478149,
-0.13073784112930298,
0.25396719574928284,
-0.22101935744285583,
-0.184624329209... | |
I am developing a Ruby on Rails website and I have an "architectural" question : my application needs some parameters and I'm wondering where to store them.
In concrete terms, my application receive some requests which are evaluated and then sent. So, the Request model must have attributes concerning these treatments ... | [
0.38263052701950073,
0.191835418343544,
-0.04318986088037491,
-0.005838884972035885,
-0.22712834179401398,
0.30474936962127686,
0.44332846999168396,
-0.10933780670166016,
-0.04490911588072777,
-0.4396739602088928,
0.2554270625114441,
0.40929484367370605,
-0.13334722816944122,
0.08135632425... | |
create a model for each one and store them in the database (and having an active record model ValidationStatus for instance) but : wouldn't it be a bite excessive to create a database/model for storing data like that?
I could also just use them in the code without "storing" them, I could store them in a YAML file...
... | [
0.24380923807621002,
-0.0139907356351614,
0.14798733592033386,
0.22423644363880157,
-0.030978985130786896,
0.011882197111845016,
0.19125154614448547,
-0.19360537827014923,
-0.4063323736190796,
-0.4556546211242676,
-0.007293412461876869,
0.7209798097610474,
-0.5112784504890442,
-0.136759340... | |
this [Railscast](http://railscasts.com/episodes/85). | [
-0.43897703289985657,
-0.3570919930934906,
0.30751824378967285,
-0.10761748254299164,
-0.06524750590324402,
-0.19210566580295563,
0.33655086159706116,
0.16699561476707458,
-0.7230324745178223,
-0.2877914011478424,
-0.16640208661556244,
-0.08820877224206924,
-0.04705119505524635,
0.02209215... | |
The other day, needed to iterate over a subset of an array at a time. Initially, I did this with splice - tearing apart the array was no problem in this case. It would return N elements at a time, or whatever was left at the end of the list. All went well.
Then it turned out I needed the array later. Instead of splice... | [
0.5363203883171082,
-0.15629974007606506,
-0.09944713115692139,
0.046986211091279984,
-0.33109527826309204,
0.2234164923429489,
0.09806849807500839,
-0.377976655960083,
-0.4019389748573303,
-0.4135512709617615,
0.2779085338115692,
0.34637123346328735,
-0.32579171657562256,
0.06359572708606... | |
this problem:
```
use strict;
use warnings;
my @array = qw(a b c d e f g h i j k l m n o p q r s t u v z x c v b a s d f g a s d f a se g);
my $numPerTest = 5;
my $index = 0;
print "Separating out the subset before grepping it, good.\n";
while ($index < @array)
{
print "Iteration $index\n";
my @subset = @arra... | [
-0.057112812995910645,
0.07758139818906784,
0.2819789946079254,
-0.2591763436794281,
0.08080247789621353,
0.14696218073368073,
0.5855951905250549,
-0.39041367173194885,
-0.30497246980667114,
-0.3168547451496124,
-0.36333370208740234,
0.3112603425979614,
-0.5210956931114197,
0.2253220677375... | |
($index < @array)
{
print "Iteration $index\n";
my @subset = grep { defined $_ } @{[ @array[$index..($index+$numPerTest)] ]};
$index += $numPerTest;
}
$index = 0;
print "Grepping the array slice directly, explodey!\n";
while ($index < @array)
{
print "Iteration $index\n";
my @subset = grep { defined $_ ... | [
-0.020557235926389694,
-0.43198028206825256,
0.24797597527503967,
-0.2837570011615753,
-0.3874036967754364,
0.08003652095794678,
0.1293659210205078,
-0.09264467656612396,
-0.2955252230167389,
-0.42331957817077637,
-0.3601248264312744,
0.25632742047309875,
-0.3285694420337677,
-0.0463997907... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.