text stringlengths 0 30.5k | title stringclasses 1
value | embeddings listlengths 768 768 |
|---|---|---|
across it, its this CSS for the select element
```
margin : 0.5em 0px
``` | [
-0.3584769070148468,
0.0031135184690356255,
0.4453541338443756,
-0.076475128531456,
-0.0044661760330200195,
0.0016360512236133218,
-0.37572112679481506,
-0.010144342668354511,
0.18543805181980133,
-0.6604917049407959,
0.1156010702252388,
0.0885339230298996,
0.09677878022193909,
0.025853151... | |
I am trying to get the number of students enrolled in courses via a single SQL statement, but not using sub-queries. So far I can only figure out how to do it using sub-queries. Is there another way?
Consider the following database setup:
```
create table student (id integer not null primary key);
create table cours... | [
0.24473312497138977,
0.16743412613868713,
0.3165067136287689,
0.09847068786621094,
0.347106009721756,
0.3034236431121826,
-0.14545129239559174,
-0.18018405139446259,
0.0020628285128623247,
-0.594876229763031,
-0.15759897232055664,
0.2587987184524536,
-0.012836717069149017,
0.31598037481307... | |
2.
I can achieve this easily using sub-queries:
> SELECT COUNT(\*) FROM (SELECT DISTINCT STUDENT FROM COURSE\_ENROLMENT) AS DATA;
I want to get the count without using a sub-query.
I am using Postgresql 8.3 but am looking for a vendor agnostic solution.
How about this:
```
SELECT course, COUNT(DISTINCT student)
F... | [
0.15739235281944275,
0.04634811356663704,
0.18524014949798584,
0.045607034116983414,
-0.0005934240762144327,
0.013249575160443783,
-0.24622325599193573,
-0.16939499974250793,
0.02374480478465557,
-0.593863308429718,
-0.14474068582057953,
0.39174583554267883,
0.06191384419798851,
0.13461510... | |
I'm trying to execute a number of functions using eval(), and I need to create some kind of environment for them to run. It is said in documentation that you can pass globals as a second parameter to eval().
But it seems to not work in my case. Here's the simpified example (I tried two approaches, declaring variable g... | [
-0.037899475544691086,
0.049327075481414795,
0.07461010664701462,
-0.019505266100168228,
-0.20922960340976715,
0.16826476156711578,
0.23489029705524445,
-0.02141440287232399,
-0.33118513226509094,
-0.3977075517177582,
0.08013942837715149,
0.6928066611289978,
-0.3538171350955963,
-0.1202999... | |
I do to pass that `test_variable` into `my_func()`? Assuming I can't pass it as a parameter.
*test\_variable* should be global in test.py. You're getting a name error because you're trying to declare a variable global that doesn't yet exist.
So your my\_test.py file should be like this:
```
test_variable = None
def ... | [
-0.05262341350317001,
0.253621906042099,
0.20738081634044647,
-0.10943354666233063,
-0.10727671533823013,
-0.09218260645866394,
0.43232646584510803,
0.07826075702905655,
-0.1706295758485794,
-0.4488135874271393,
-0.08695506304502487,
0.4137570261955261,
-0.06301150470972061,
0.228315636515... | |
I have a problem executing oracle procedures from Visual Studio 2008's Server Explorer,
when i try to execute a procedure all the input parameters are doubled!
it only happend to me in one workstation, i've tried to reinstall oracle products,
but it doesn't helped me...
i get the following error message when i try e... | [
-0.095303475856781,
0.31201404333114624,
0.021971670910716057,
-0.15171469748020172,
-0.27751976251602173,
0.1401616483926773,
0.4632880985736847,
-0.3378026485443115,
-0.44756820797920227,
-0.4019084572792053,
0.045426223427057266,
0.6431779861450195,
-0.579249918460846,
-0.01330723334103... | |
I have a mocked object that is passed as a constructor argument to another object.
How can I test that a mocked object's property has been called? This is code I am using currently:
```
INewContactAttributes newContact = MockRepository.GenerateMock<INewContactAttributes>();
newContact.Stub(x => x.Forenames).Return("O... | [
0.2720739543437958,
0.150957852602005,
0.4312759339809418,
-0.21041834354400635,
-0.09038113802671432,
0.14545267820358276,
0.594111979007721,
-0.44262680411338806,
0.1347331702709198,
-0.6395182013511658,
0.1459628790616989,
0.7517141699790955,
-0.08479678630828857,
0.10556656867265701,
... | |
you call Repeat.Any() ? This is not supported in AssertWasCalled()."
So how do I cater for the multiple calls?
`newContact.AssertWasCalled(x => { var dummy = x.Forenames; }, options => options.Repeat.AtLeastOnce());`
`Repeat.Any` does not work with `AssertWasCalled` because 0 counts as any... so if it WASN'T called, ... | [
0.06669561564922333,
-0.10513945668935776,
0.4881714880466461,
-0.2729223072528839,
-0.004194543231278658,
-0.2689874768257141,
0.6835918426513672,
-0.29560038447380066,
-0.052574582397937775,
-0.103098064661026,
0.05587192252278328,
1.0333445072174072,
-0.24811355769634247,
0.187683895230... | |
I use an installation of Xampp to test my files locally before I upload them to my web server. My web pages usually contain a lot of 'hardcoded' links, which means to test any links (or any forms etc) I need to change the hardcoded link to point to localhost, and then rechange it after I am done testing.
What I am loo... | [
0.3669632077217102,
0.1975202113389969,
0.3227880895137787,
0.04071475565433502,
-0.018292482942342758,
-0.08587472885847092,
0.30542805790901184,
0.27083221077919006,
-0.2543952465057373,
-0.9394031763076782,
0.029928704723715782,
0.2549075484275818,
0.0046788835898041725,
0.2719942033290... | |
if I were to enter 'www.mysite.com/example/view.php" in my browser, I would actually be looking at 'localhost/example/view.php'.
Is such a thing possible?
Two solutions come to my mind:
1. Use relative URLs (preferred)
2. Add your external URL to your hosts file which can be found either in
C:\WINDOWS\system32\drive... | [
0.2639121413230896,
0.006626884452998638,
0.5631089806556702,
0.05722174420952797,
-0.15594768524169922,
-0.11967027187347412,
0.25660568475723267,
0.412038654088974,
-0.44145259261131287,
-0.8587801456451416,
0.28102588653564453,
0.4511101543903351,
0.009989778511226177,
0.414035677909851... | |
I have SQL Server 2005 install on my PC and am having execution problems with an SSIS Package stored in the filesystem. I want to stored this in the MSDB database but don't know how to do this.
I watched this video:
<http://download.microsoft.com/download/5/3/0/5303799D-8739-4BDC-8062-337368357391/SQLServerAgentTroubl... | [
0.05011722072958946,
0.11571041494607925,
0.30046167969703674,
0.0016690371558070183,
0.08019367605447769,
-0.007394345011562109,
0.45553192496299744,
0.011426571756601334,
-0.09078594297170639,
-0.8379729986190796,
0.21532268822193146,
0.6021532416343689,
-0.11179453879594803,
0.260454118... | |
has a drop down that allows you to specify Integration Services. You can use this to get to your MSDB package repository.
However, to get your SSIS package in there, the easiest way is to build it for deployment so you get a .manifest file. Run this and you can choose to install it to MSDB. | [
0.08745542913675308,
-0.398180216550827,
0.00947637390345335,
0.28441184759140015,
0.1141865998506546,
-0.3238307237625122,
0.31204381585121155,
0.13050509989261627,
-0.052428584545850754,
-1.1599867343902588,
0.0660976693034172,
0.15894180536270142,
-0.5153217911720276,
0.0506851598620414... | |
Simple really - in Tools, Options, Text Editor, C#, New Lines, New Line Options for braces, there is not an option for properties...
Or am I going mad and just can't find it?
EDIT: I am using an add-in that is generating the code and reportedly uses the VS settings.... but doesn't seem to, so I've given up on this is... | [
0.6238451600074768,
-0.24722927808761597,
0.195140540599823,
0.2772539556026459,
-0.07374447584152222,
0.0863487720489502,
0.5452730059623718,
0.05394130200147629,
-0.09960444271564484,
-0.2376229614019394,
0.015503881499171257,
0.8279879689216614,
-0.2542524039745331,
-0.16719523072242737... | |
We have updated our site recently; the old one had around 300 pages... the new one about 80 ;)
This because in the old structure we had, for every argument, many pages. Instead, now we have just one page with a 'summary'.
For example, the old structure about the 'car' argument was:
1. Main page, 'cars'
2. sub-page, ... | [
0.5098447203636169,
0.5737665891647339,
0.4489375352859497,
0.2861281633377075,
-0.32234230637550354,
0.46822863817214966,
0.1300065815448761,
-0.02880917862057686,
-0.20807261765003204,
-0.23545673489570618,
0.1407398283481598,
0.7517608404159546,
0.1329527497291565,
0.12700344622135162,
... | |
topic is the same) pages pointing on one page.
Do you think this is good for seo, or will be better redirect just the old main page and give a 404 not found to the old sub-pages?
It's much better to have the multiple 301s. You don't want your customers to see a 404.
There's no SEO penalty (that I'm aware of) for havi... | [
0.32690730690956116,
-0.17539532482624054,
0.42286476492881775,
0.26239001750946045,
-0.5321782231330872,
-0.2533550560474396,
0.048279017210006714,
-0.06815584003925323,
-0.5228511691093445,
-0.2977917790412903,
0.2406613677740097,
0.6067951917648315,
-0.210404634475708,
-0.39457377791404... | |
What is the difference between
```
public function Foo(ref Bar bar)
{
bar.Prop = 1;
}
public function Foo(Bar bar)
{
bar.Prop = 1;
}
```
essentially what is the point of "ref". isn't an object always by reference?
The point is that you never actually pass an *object*. You pass a *reference* - and the argument... | [
0.2125481814146042,
0.29619666934013367,
0.6221096515655518,
-0.19561101496219635,
-0.2833845317363739,
0.0564291812479496,
0.22255724668502808,
-0.3717222511768341,
-0.11430858075618744,
-0.31250399351119995,
-0.13560622930526733,
0.6106126308441162,
-0.35412752628326416,
0.29039919376373... | |
so the caller doesn't see any change to their variable.
See [my article on argument passing](http://pobox.com/~skeet/csharp/parameters.html) for more details. | [
0.08479995280504227,
-0.08646652102470398,
0.3130395710468292,
0.17736871540546417,
-0.1952345222234726,
0.012413431890308857,
0.2750187814235687,
0.08507188409566879,
-0.27947261929512024,
-0.26269182562828064,
-0.25411468744277954,
0.48557278513908386,
-0.16312289237976074,
-0.1013300344... | |
I have iframe on a page, the iframe and the parent page are in different domain, can a javascript code on the parent page access elements inside this iframe?
It should not be able to if the pages are from different domains, the browsers security sandbox should prevent this type of access. It might work when the two pag... | [
0.4279194176197052,
0.44112733006477356,
0.09906578063964844,
0.08895835280418396,
0.017737777903676033,
-0.02103326842188835,
0.1297149509191513,
-0.10584604740142822,
0.10410399734973907,
-0.6024633049964905,
0.23628006875514984,
0.05531039834022522,
-0.18866831064224243,
0.3876083195209... | |
I'm interested in MyLyn. I'm using Eclipse Ganymede and I have access to a BugZilla installation for the project I'm working on.
I wonder if the BugZilla installation will have to be changed/configured in any way or if I'm able to use MyLyn against it "out of the box"?
Will I have to setup some special kind of MyLyn ... | [
0.4574553072452545,
-0.26666513085365295,
0.38147926330566406,
0.17569944262504578,
0.1520628035068512,
0.328967422246933,
-0.6350049376487732,
0.18329712748527527,
-0.36700382828712463,
-0.7114093899726868,
0.6094213128089905,
0.47015780210494995,
0.0776258334517479,
0.2653922438621521,
... | |
of the box, just give it a try and specify the BugZilla server your tasks come from. | [
0.5550042986869812,
-0.13171248137950897,
-0.12544706463813782,
0.25244519114494324,
0.17762331664562225,
-0.23780852556228638,
-0.0735454186797142,
0.41660141944885254,
-0.14258618652820587,
-0.5079865455627441,
-0.05125976726412773,
0.42331111431121826,
-0.4701406955718994,
0.00906921643... | |
I have a MS SQL table McTable with column BigMacs nvarchar(255). I would like to get rows with BigMacs value greater than 5.
What I do is:
```
select * from
(
select
BigMacs BigMacsS,
CAST(BigMacs as Binary) BigMacsB,
CAST(BigMacs as int) BigMacsL
from
McTable
where
B... | [
-0.24836841225624084,
0.20872995257377625,
0.3873472809791565,
-0.0794382318854332,
-0.025682006031274796,
0.18977364897727966,
0.1791847199201584,
-0.20305167138576508,
-0.11472293734550476,
-0.5379789471626282,
0.1766669601202011,
0.5407909154891968,
-0.19296930730342865,
0.2046018689870... | |
I get an error:
> State 1, Line 67 Conversion failed
> when converting the nvarchar value
> '\*\*\*' to
> data type int.
But when I remove last filter `where Cast(table.BigMacsL as int) > 5` it works and I get this result:
```
6 0x360000000000000000000000000000000000000000000000000000000000 6
23 0x320033000... | [
-0.2474132776260376,
0.5661688446998596,
0.5054282546043396,
0.023443283513188362,
-0.029956156387925148,
0.05954181030392647,
0.4897477924823761,
-0.663711667060852,
0.01707310788333416,
-0.7370133399963379,
0.21869271993637085,
0.4854835569858551,
-0.23674418032169342,
0.3025639653205871... | |
0x340035000000000000000000000000000000000000000000000000000000 45
46 0x340036000000000000000000000000000000000000000000000000000000 46
47 0x340037000000000000000000000000000000000000000000000000000000 47
44 0x340034000000000000000000000000000000000000000000000000000000 44
44 0x3400340000000000000000000000000000... | [
-0.33068937063217163,
0.48091721534729004,
0.2081516534090042,
0.31863850355148315,
0.03709737956523895,
0.12793004512786865,
0.4866958260536194,
-0.6977247595787048,
-0.20227865874767303,
-0.7571115493774414,
0.18467915058135986,
0.5335777401924133,
-0.5287069082260132,
0.1978156864643097... | |
so You can easily get this error on your database:
Create database TestDB, create table with:
```
USE [TestDB]
GO
/****** Object: Table [dbo].[TestTable] Script Date: 04/08/2009 16:27:40 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[TestTable](
[ID] [int] IDENTITY(1,1) NOT NULL,... | [
-0.2222680300474167,
-0.06521466374397278,
0.1882665902376175,
0.08512880653142929,
-0.08405649662017822,
0.044669363647699356,
0.41812270879745483,
-0.2473135143518448,
-0.07115369290113449,
-0.5460603833198547,
-0.15243390202522278,
0.41901686787605286,
-0.29963353276252747,
0.2304092049... | |
(MyVal) values (' g dfg dfg df')
insert into TestDB.dbo.TestTable (MyVal) values ('f sd 4t4gsdf')
insert into TestDB.dbo.TestTable (MyVal) values ('f df 4 trwefg')
insert into TestDB.dbo.TestTable (MyVal) values ('f sd f4 fgsfg sd')
insert into TestDB.dbo.TestTable (MyVal) values ('54534534')
insert into TestDB.dbo.Te... | [
0.006500119809061289,
0.22384274005889893,
0.4190785884857178,
-0.1498304009437561,
-0.06927182525396347,
0.5216171741485596,
0.19079731404781342,
-0.5437842011451721,
0.3516803979873657,
-0.9417812824249268,
-0.11515133827924728,
0.2504135072231293,
0.03344050794839859,
0.3693279623985290... | |
>
>
> 454
And when you try to get filtered values with this query:
```
select
*
from
(
select
CAST(MyVal as int) MyValInt
from
dbo.TestTable
where
IsNumeric(MyVal) = 1
) tabela
where | [
-0.07555758953094482,
-0.20552825927734375,
0.16821534931659698,
-0.10571740567684174,
-0.024201059713959694,
0.1118973046541214,
0.27629512548446655,
-0.47202008962631226,
0.27350419759750366,
-0.5350472331047058,
0.043755996972322464,
0.1345083862543106,
-0.06835032254457474,
0.181565955... | |
tabela.MyValInt > 6
```
You should get this error that should not occur:
Msg 245, Level 16, State 1, Line 1
Conversion failed when converting the nvarchar value 'fd' to data type int.
New answer for your revised scripts. What is happening is that the SQL Server query optimiser is optimising out your subquery. It is ... | [
-0.22511667013168335,
0.04899698495864868,
0.4719814658164978,
0.05071204900741577,
-0.014939096756279469,
0.1241401731967926,
0.3487786650657654,
-0.025021623820066452,
-0.15791475772857666,
-0.53232741355896,
0.10692116618156433,
0.505820095539093,
-0.37606704235076904,
0.310297816991806... | |
what is actually being carried out. You will see the following predicate being applied on the scan:
```
CONVERT(int,[testdb].[dbo].[TestTable].[MyVal],0)>(6)
AND isnumeric(CONVERT_IMPLICIT(varchar(510),
[testdb].[dbo].[TestTable].[MyVal],0))=(1)
```
So regardless of the structure of your query, it is trying to d... | [
0.34294068813323975,
-0.1985403597354889,
0.6334965825080872,
-0.07590901106595993,
-0.06867896020412445,
0.05047483369708061,
0.1935950219631195,
-0.49659425020217896,
0.18923015892505646,
-0.5419183969497681,
0.04092898964881897,
0.48663440346717834,
-0.20076727867126465,
-0.030521044507... | |
will be different, so I'd suggest storing the primary key along with the int value in the table variable, and then doing your final query as a join like this:
```
DECLARE @integers table (
ID int,
MyValInt int
)
INSERT
INTO @integers
SELECT ID, CAST(MyVal AS int)
FROM dbo.TestTable
WHERE ISNUMERIC(M... | [
0.2610940933227539,
0.005114369094371796,
0.3546341359615326,
-0.25416722893714905,
0.09645286202430725,
0.07590062916278839,
0.16067640483379364,
-0.6575101017951965,
0.2017250508069992,
-0.41984090209007263,
0.1111186295747757,
0.3415411710739136,
-0.23388685286045074,
0.1923404783010482... | |
ON b.ID = t.ID
WHERE t.MyValInt > 6
``` | [
0.4240209460258484,
0.3743407726287842,
0.20555558800697327,
-0.2766527235507965,
0.1231079027056694,
-0.07952897250652313,
0.16569213569164276,
-0.16578276455402374,
-0.06960234045982361,
-0.5444203615188599,
-0.1862664669752121,
0.5382464528083801,
-0.3501245975494385,
0.4470616281032562... | |
Hi guys, ive got a stupid problem.
----------------------------------
My Custom handler is working 100% on Asp.NET Development server but when i publish the site to IIS 5.1 whenever i try to run Comment/Find (which finds a user via an AJAX call) (i know the naming of my handler sux!!! :)
I get this error:
-----------... | [
0.13040101528167725,
0.29732322692871094,
0.39039164781570435,
-0.025834307074546814,
-0.19452790915966034,
-0.368738055229187,
0.6137882471084595,
0.2860645055770874,
-0.301693320274353,
-0.8936688303947449,
-0.2288655787706375,
0.5864236354827881,
-0.3105371296405792,
-0.0467591844499111... | |
you want.
```
HTTP 405 - Resource not allowed
Internet Information Services
Technical Information (for support personnel)
```
* More information:
Microsoft Support
```
My code for the AJAX call is:
-----------------------------
```
function findUser(skip, take) {
http.open("post", 'Comment/FindUser',... | [
0.15080785751342773,
-0.004608786199241877,
0.7249166965484619,
0.09961144626140594,
0.025520795956254005,
-0.1475214660167694,
0.26156046986579895,
-0.00276127434335649,
0.11523480713367462,
-0.8246277570724487,
-0.4129161536693573,
0.7795142531394958,
-0.3764360249042511,
-0.063683643937... | |
http.setRequestHeader("Skip", skip);
http.setRequestHeader("Take", take);
http.setRequestHeader("Connection", "close");
//display loading gif
document.getElementById('ctl00_ContentPlaceHolder1_DivUsers').innerHTML = 'Loading, Please Wait...<br /><img src="Images/loading.gif" /><br /><br... | [
0.09928140789270401,
-0.4581729471683502,
0.6886123418807983,
-0.018123606219887733,
-0.0967513844370842,
0.1845807284116745,
0.13117732107639313,
-0.42044639587402344,
-0.18656675517559052,
-0.7032866477966309,
-0.42805635929107666,
0.35541680455207825,
-0.49935704469680786,
0.14300423860... | |
http.send(null);
}
```
Please can anyone help me??
Make sure you have allowed the extension on the IIS server. The development server does this automatially for you.
If you open up the properties of the web site then go to the Home Directory Tab and click the configuration button.
In there try adding the extension... | [
0.696074903011322,
0.21756385266780853,
0.15598897635936737,
0.006807185709476471,
-0.12495363503694534,
-0.17300932109355927,
0.5038870573043823,
-0.05973384901881218,
-0.26533016562461853,
-0.8720724582672119,
0.023784426972270012,
0.4939867854118347,
-0.3207825720310211,
0.1310637593269... | |
I've written an application to watch a folder, and whenever a PowerPoint document is dropped into it, it goes through the slides within it and generates png images of each slide. This works fine in a windows forms application but I've put exactly the same code in a windows service, used the same test file and it fails ... | [
0.26083388924598694,
0.10956287384033203,
0.6153072118759155,
-0.050493959337472916,
0.0721583291888237,
-0.020977994427084923,
0.35221782326698303,
-0.11901954561471939,
-0.15922929346561432,
-0.5854530334472656,
0.08875369280576706,
0.4435065686702728,
-0.23370198905467987,
0.13869249820... | |
rule out permissions problems but I can't think of anything else to try.
Any suggestions?
There is no way to tell what the problem is without a lot more information. It could be any number of things. If the OS is XP or earlier then the user's profile will not be loaded when the service runs so PP may not be able to ac... | [
0.18552815914154053,
0.16033366322517395,
0.31132930517196655,
0.2964455485343933,
0.021310457959771156,
-0.22385051846504211,
0.23628224432468414,
0.03077782690525055,
-0.3634190559387207,
-0.5172211527824402,
0.020421193912625313,
0.573131263256073,
-0.10265447944402695,
0.26303005218505... | |
The real error may not even be a security issue, it is not uncommon for developers to use either ERROR\_ACCESS\_DENIED or ERROR\_OUT\_OF\_MEMORY as a catch all for unexpected errors.
But the real issue is that PowerPoint is very much a user land application - it shouldn't be used in a service. Setting the service to i... | [
-0.08111293613910675,
0.07590026408433914,
0.27119770646095276,
0.34948280453681946,
0.04006650298833847,
-0.05243305116891861,
0.28219014406204224,
0.26317548751831055,
-0.11889282613992691,
-0.5520235300064087,
0.013860358856618404,
0.5191848874092102,
-0.16634613275527954,
0.14540733397... | |
to convert PowerPoint slides to image files. A quick search on Google returns many possibilities that look to be much more suitable for use in a service and most of them are quite cheap. | [
0.4126463532447815,
-0.18189966678619385,
0.48133695125579834,
0.6243385076522827,
0.08423328399658203,
0.013854444026947021,
-0.22629620134830475,
0.07020490616559982,
-0.29976481199264526,
-0.6306555867195129,
0.12397467344999313,
0.21132978796958923,
-0.012716247700154781,
0.12782810628... | |
There is a statement in the MySQL Docs (<http://dev.mysql.com/doc/refman/5.0/en/adding-udf.html>) that is bothering me:
> *"A UDF contains code that becomes part of the running server, so when you write a UDF, you are bound by any and all constraints that otherwise apply to writing server code. For example, **you may ... | [
0.44136348366737366,
0.30702728033065796,
0.4691214859485626,
-0.36079978942871094,
-0.13945452868938446,
-0.4488314986228943,
0.13199082016944885,
-0.09058867394924164,
-0.42045220732688904,
-0.5718137621879578,
-0.20769290626049042,
0.421424001455307,
-0.6722159385681152,
0.4500522017478... | |
at all of libstdc++, but going by the "For example" bit meaning that this warning is applicable to more than libstdc++ I would suggest that this means be wary of standard libraries in general as they may peform things that wouldn't work in a UDF environment.
For example (digging back to C) strtok maintains a local st... | [
0.19245374202728271,
-0.045202627778053284,
0.1275973618030548,
-0.024786118417978287,
-0.23859572410583496,
-0.5128353238105774,
0.7699296474456787,
0.07262157648801804,
-0.25267714262008667,
-0.4105319380760193,
-0.2913852632045746,
0.28597742319107056,
-0.529819130897522,
0.190955221652... | |
you have no control as to where and when the function is called.
Thus I would say that anything that would not work in a multithreaded environment should be avoided.
But note that the above is based purely on my speculation, and is not based in reality. | [
0.2627199590206146,
0.14558790624141693,
-0.04918169975280762,
0.1813284158706665,
-0.09149783849716187,
-0.22132040560245514,
0.23563739657402039,
0.0011566898319870234,
0.030485546216368675,
-0.3318979740142822,
-0.1596645712852478,
0.7923350930213928,
-0.3478337824344635,
0.178970560431... | |
I assume everyone here is familiar with the adage that all text files should end with a newline. I've known of this "rule" for years but I've always wondered — why?
Because that’s [how the POSIX standard defines a **line**](https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_206):
> **3.206... | [
0.1520567238330841,
-0.12306655198335648,
0.7838805913925171,
-0.1428774744272232,
0.20513306558132172,
-0.45264932513237,
0.2246355265378952,
0.2576179504394531,
-0.2601378858089447,
-0.33498677611351013,
-0.36279118061065674,
0.47874611616134644,
0.016803529113531113,
0.4061795473098755,... | |
tools expect this convention and work with it. For instance, when concatenating files with `cat`, a file terminated by newline will have a different effect than one without:
```
*$* **more** a.txt
foo
*$* **more** b.txt
bar*$* **more** c.txt
baz
*$* **cat** {a,b,c}.txt
foo
barbaz
```
And, as the previous example also... | [
0.2669151723384857,
0.02105330489575863,
0.524319052696228,
-0.13193508982658386,
-0.08348222076892853,
-0.26294898986816406,
0.2861565053462982,
-0.008062462322413921,
-0.2222159206867218,
-0.8657121062278748,
-0.5645371675491333,
0.7643875479698181,
-0.2914056181907654,
0.206308051943779... | |
newline, making commands such as `cat` useful is much harder: how do you make a command to concatenate files such that
1. it puts each file’s start on a new line, which is what you want 95% of the time; but
2. it allows merging the last and first line of two files, as in the example above between `b.txt` and `c.txt`?
... | [
0.16744489967823029,
-0.47430938482284546,
0.5073918104171753,
-0.07414302229881287,
-0.014606022275984287,
-0.05241730064153671,
-0.04335632175207138,
-0.2536359429359436,
-0.24206854403018951,
-0.6891865730285645,
-0.17153510451316833,
0.3425137996673584,
-0.2858176529407501,
0.359039902... | |
pasted together with other files. This is almost certainly not convenient.
… Or you need to introduce a special sentinel character to mark a line that is supposed to be continued rather than terminated. Well, now you’re stuck with the same situation as on POSIX, except inverted (line continuation rather than line term... | [
0.1732993721961975,
-0.26938503980636597,
0.41874533891677856,
0.16383294761180878,
-0.17010535299777985,
-0.22306528687477112,
0.45634499192237854,
0.3465612232685089,
-0.39000895619392395,
-0.5877358913421631,
-0.449788361787796,
0.2554978132247925,
-0.26999008655548096,
0.46617534756660... | |
data (e.g. programming code) it makes parsing minimally more complicated: it generally means that parsers have to be rewritten. If a parser was originally written with the POSIX definition in mind, then it might be easier to modify the token stream rather than the parser — in other words, add an “artificial newline” to... | [
-0.1485396772623062,
0.030712366104125977,
0.06537872552871704,
0.5238638520240784,
-0.10471168160438538,
0.026226192712783813,
0.20166267454624176,
-0.20859132707118988,
-0.09405599534511566,
-0.45330920815467834,
-0.17930614948272705,
0.39906686544418335,
-0.20020705461502075,
-0.0438710... | |
i want to add select query result into dataset, so i can write new query to run on it to get net dataset but how?
**Original query:**
```
**MyDATASET=(**
select x, y,z from table1
union all
select k,l,m from table2
)
**i wan to this** select * from this.MyDATASET
```
Well, you could perhaps create a CTE, UDF or vie... | [
0.1595219373703003,
-0.09535688161849976,
0.6275572776794434,
0.08018187433481216,
-0.26465827226638794,
0.1449422836303711,
-0.3672293424606323,
-0.10415440797805786,
-0.16159142553806305,
-0.888293981552124,
0.05129389837384224,
0.5831064581871033,
-0.21754063665866852,
0.414001315832138... | |
I want to halt one thread till another thread has finished initializing without using pthread\_join.
I tried using a join but it leads to a deadlock due to some asynchronous inter-thread communication system that we have.
Right now, I'm using a (custom) lock to achieve this.
In Thread 1:
```
lock_OfflineWorker.Lock()... | [
-0.03445543721318245,
-0.21925599873065948,
0.6550264954566956,
-0.22282278537750244,
0.308212012052536,
-0.2276054173707962,
0.18551599979400635,
0.1674848347902298,
-0.39312440156936646,
-0.5083797574043274,
-0.36425572633743286,
0.7029287815093994,
-0.6561115384101868,
0.205435708165168... | |
use a pthread condition to wait until the job reaches the wanted state.
The thread1 waits with `pthread_cond_wait()` and the thread2 signals it with `pthread_cond_signal()`.
You need :
```
bool condition ; // or anything else to be tested
pthread_mutex_t mutex ;
pthread_cond_t cond ;
```
The first thre... | [
0.23027625679969788,
-0.0835694670677185,
0.4084986448287964,
-0.3634938597679138,
0.4549059271812439,
0.013242417015135288,
0.4392228424549103,
-0.2558659017086029,
-0.09397182613611221,
-0.517626166343689,
-0.4206562042236328,
0.45978933572769165,
-0.2675345540046692,
0.2547673285007477,... | |
&mutex );
```
The other thread does this when appropriate :
```
pthread_mutex_lock( &mutex );
condition = true ; // or false ...
pthread_cond_signal( &cond );
pthread_mutex_unlock( &mutex );
``` | [
0.019360234960913658,
0.21868784725666046,
0.36270231008529663,
-0.39162999391555786,
0.3851657509803772,
0.12830805778503418,
0.6744704842567444,
-0.37863460183143616,
-0.1998552531003952,
-0.3080042898654938,
-0.6018210053443909,
0.5919734239578247,
-0.4758110046386719,
0.484823673963546... | |
I have object called Foo. Right now it implements IFoo which has a lot of properties on it.
I have one class that only depends on a few of those properties so i create IMeasurableFoo (which just has a few properties)
to avoid duplicate code, i now have IFoo : IMeasurableFoo as i moved the properties into IMeasurableF... | [
0.02655688114464283,
0.03344257175922394,
0.3857094645500183,
-0.05758359655737877,
-0.2612549364566803,
0.1929570883512497,
0.09318934381008148,
0.19077818095684052,
-0.1558692306280136,
-0.7238933444023132,
0.5106902718544006,
0.572446346282959,
-0.3697715997695923,
0.4157056212425232,
... | |
the other way around)
No, it's not "more generic interface inheriting from a specific interface". `IMeasurableFoo`, having only several properties, is *the* generic interface, whereas `IFoo` is more specific, since it refines the knowledge about the `IMeasurableFoo`. Think `IList` inheriting from `IEnumerable`. | [
0.0021985191851854324,
-0.20073193311691284,
0.2563436031341553,
0.15633273124694824,
-0.1652502417564392,
-0.2502477765083313,
0.2834915518760681,
0.13432979583740234,
-0.022667400538921356,
-0.8822706937789917,
-0.10188662260770798,
0.4220077693462372,
-0.3686354160308838,
0.298603475093... | |
I had a previous question [can jquery ajax call external webservice?](https://stackoverflow.com/questions/727183/can-jquery-ajax-call-external-webservice)
and some good developers answered me to use jsonp, but i don't know how to use it, i am trying to call my service using this code:
```
$.ajax({
type... | [
-0.02851850725710392,
0.1450594663619995,
0.28129497170448303,
-0.17920027673244476,
-0.3707648515701294,
-0.11351396888494492,
0.3586892783641815,
0.13119125366210938,
-0.10640305280685425,
-0.48626554012298584,
-0.10459021478891373,
0.639712929725647,
-0.14302600920200348,
-0.07538890093... | |
dataType: "jsonp",
success: function(msg) {alert(msg);}
});
```
and this is my service code:
```
[WebMethod]
public string HelloWorld() {
return "Hello World " ;
}
```
anyone have examples or can explain this issue for me?
**UPDATE**:
I wrote the code again to be like this:
```... | [
-0.07541774213314056,
-0.06294849514961243,
0.6606034636497498,
-0.34840112924575806,
0.14595676958560944,
-0.13759994506835938,
0.5434688925743103,
0.11006280779838562,
0.0003629034326877445,
-0.7433815598487854,
-0.37493929266929626,
0.5715113282203674,
-0.34733182191848755,
0.1003866121... | |
\"y\":100} )";
}
```
But it always give me this error when back: "missing ; before statement
[Break on this error] ( {"x":10 , "y":100} )"
and never call the success function, can anyone help with that?
I've had a similiar problem, unfortunately I don't have the code at hand.
From memory:
* Add [ScriptService] as... | [
0.0008787228143773973,
0.178035706281662,
0.5037830471992493,
0.1169470027089119,
-0.18034018576145172,
-0.36019471287727356,
0.47232431173324585,
0.2107723355293274,
-0.1234096884727478,
-0.45380401611328125,
-0.34100207686424255,
0.916533887386322,
-0.11435774713754654,
-0.03017606399953... | |
I'm using the QNetworkAccessManager to download files from the web, it provides an easy API to the task. But I wish to add a download rate limit to the class, so all http replies won't exceed that limit (I see no reason to limit the requests).
I've googled abit and found an interesting post [here](http://doc.trolltech... | [
0.5674384832382202,
-0.014980180189013481,
0.4259982705116272,
-0.03381123021245003,
-0.2877379357814789,
-0.20059089362621307,
0.23251457512378693,
0.06426756829023361,
-0.03244999423623085,
-0.9670544266700745,
0.16294753551483154,
0.6429614424705505,
-0.26915180683135986,
0.393843024969... | |
the subclassed QTcpSocket somehow (this might involve subclassing even more classes, the QHttp\* ones).
2. use the classes offered in the article and build my own QNetworkAccessManager around those.
3. the QNetworkAccessManager allows the use of a proxy. I could write a fake proxy class that will have the bandwidth thr... | [
0.40072140097618103,
-0.16206811368465424,
0.46780461072921753,
0.1333809643983841,
-0.33349478244781494,
-0.21649837493896484,
0.2618447244167328,
-0.14610402286052704,
-0.017136262729763985,
-0.7309194207191467,
0.32287800312042236,
0.5278545618057251,
-0.5314056873321533,
0.261150509119... | |
to making get/post requests with the QHttp I create a RcTcpSocket, add it to my RateController and use QHttp::setSocket(QTcpSocket\*). I still didn't find a solution to keep using QNetworkAccessManager but this is close enough and works very good. | [
0.2884388566017151,
-0.2546316385269165,
0.6508877873420715,
0.22531452775001526,
-0.08194982260465622,
-0.24071703851222992,
0.2547245919704437,
-0.08695489913225174,
-0.024700859561562538,
-0.5984732508659363,
0.2569253146648407,
0.4031018316745758,
-0.3168535828590393,
0.243917539715766... | |
I would like to create a shortcut on the desktop using VBScript code. I have a virtual Drive in my computer. (Virtual Drive is like G drive) I want this shortcut to explore that Drive directly. For this I find out that Shortcut with following string as a TargetPath would work for me:
C:\WINDOWS\explorer.exe /n,::{20D0... | [
0.0990302562713623,
-0.05912364274263382,
0.3168511986732483,
0.1511387974023819,
-0.08177930861711502,
0.12672048807144165,
0.3526128828525543,
0.10261252522468567,
-0.07973158359527588,
-0.8553618788719177,
0.2995005249977112,
0.5430806279182434,
-0.3092012107372284,
0.03600889816880226,... | |
programmatically, that can explore the virtual drive (available in my system). I need to get it in Vista OS.
Regards
Sumeet Nandan Garg
I am generting .lnk file programmatically now using Win32 method i.e. (IWshShortcut)shell.CreateShortcut() to create the Shortcut file. And it works like charm. Thanks.!! | [
0.1459021270275116,
-0.03466577082872391,
0.2162865698337555,
-0.04602699726819992,
-0.053145114332437515,
-0.1226598471403122,
0.1363510638475418,
0.2641757130622864,
0.034040432423353195,
-0.6516705751419067,
-0.014938713982701302,
0.61202073097229,
-0.01853872276842594,
0.07912272959947... | |
we are planning to implement sql server 2005 cluster in next few months. i wanted to know what steps / precautions need to be taken as a database developer when trying to achieve this? do we need to change any ado.net code (in front end) / stored procs etc etc? are there any best practices to be followed?
reason i am ... | [
-0.04570296034216881,
0.15296131372451782,
0.4607957899570465,
0.06062864512205124,
0.022872233763337135,
-0.2886391580104828,
0.08712846785783768,
-0.019382109865546227,
-0.20720970630645752,
-0.3884071707725525,
-0.08029152452945709,
0.46476131677627563,
-0.04970084875822067,
0.007175602... | |
so that it works on load balanced environment). now this is at your web server level. i just wanted to the right things to do when trying to scale out at database server level
i am sorry if this question is stupid. please excuse my limited knowledge on this subject :-)
You have to make no front end changes to implemen... | [
0.09338248521089554,
-0.09350021183490753,
0.27441689372062683,
-0.026796594262123108,
0.026766711845993996,
-0.21662351489067078,
0.033847324550151825,
0.11951858550310135,
-0.2876276969909668,
-0.5612375140190125,
-0.08296554535627365,
0.40430936217308044,
-0.294294148683548,
0.205798044... | |
doing nothing until your primary fails, in which case the failover happens automatically and your database is serving connections again after a 10-20 second delay.
Another issue is the cache on the secondary node is empty, so you may see some performance impact after failover. You can implement a "warm" cache on your ... | [
-0.028569219633936882,
-0.16271433234214783,
0.3835091292858124,
0.21328067779541016,
0.21613967418670654,
-0.20481161773204803,
0.7672301530838013,
0.1030413955450058,
-0.5510257482528687,
-0.6840337514877319,
-0.3874395787715912,
0.3363282382488251,
-0.12340109050273895,
0.16958473622798... | |
I'm a full time software developer, but on the side I'm teaching a university course on web services. I'm going over security right now and was wondering if any of you all have had any security breaches that you could tell about (details obscured as needed) that I could share with my students. Real life stories are a l... | [
0.8383261561393738,
0.1621662825345993,
0.04869440943002701,
0.13832715153694153,
0.26686298847198486,
-0.4207708537578583,
0.3612308204174042,
0.4013126790523529,
-0.35085248947143555,
-0.44207099080085754,
0.17608025670051575,
0.4711587131023407,
0.4519161283969879,
0.1324523240327835,
... | |
needed for storing the session ID.
But I got confused since the session ID was also transmitted in the URL and I didn’t saw a reason for why there was a need for cookies. So I took a look into my cookie jar to see what oh so important information have to be stored in cookies.
Beside a cookie for the session ID there ... | [
0.528631329536438,
0.3420123755931854,
-0.14604422450065613,
0.11737547069787979,
0.060304056853055954,
-0.11664070188999176,
0.3566599488258362,
-0.025932516902685165,
-0.21488885581493378,
-0.18874002993106842,
0.39047378301620483,
0.7474117279052734,
0.015902696177363396,
0.127186834812... | |
number (e.g. from 12345 to 12346) to see what happens.
Now guess what: I now was logged in as a different user *without* any further request for authentication just by changing the cookie! The `customer_id` cookie value was abviously not just for identification (*Who am I?*) but also for authentication (*Am I really t... | [
0.349897563457489,
-0.10327495634555817,
0.5780370235443115,
0.04710536450147629,
0.09714044630527496,
-0.0372801199555397,
0.11598622798919678,
0.136415496468544,
-0.3469577729701996,
-0.10561913251876831,
-0.1048433855175972,
0.41431233286857605,
-0.08999314159154892,
0.24819572269916534... | |
As far as I can tell, these two pieces of javascript behave the same way:
**Option A:**
```
function myTimeoutFunction()
{
doStuff();
setTimeout(myTimeoutFunction, 1000);
}
myTimeoutFunction();
```
**Option B:**
```
function myTimeoutFunction()
{
doStuff();
}
myTimeoutFunction();
setInterval(myTimeou... | [
0.3015541732311249,
-0.22210898995399475,
0.5941509008407593,
-0.1006002351641655,
0.2832908630371094,
0.03811164200305939,
0.28306153416633606,
-0.28872066736221313,
-0.00320353708229959,
-0.8565685749053955,
-0.23955528438091278,
0.6233436465263367,
-0.10042226314544678,
0.03768762201070... | |
`setInterval` will execute **exactly** every 1000ms, it is important to note that `setInterval` will also delay, since JavaScript isn't a multi-threaded language, which means that - if there are other parts of the script running - the interval will have to wait for that to finish.
In [this Fiddle](http://jsfiddle.net/... | [
0.0295746847987175,
-0.42874616384506226,
0.7512405514717102,
-0.09368660300970078,
-0.13993187248706818,
-0.4031842350959778,
0.6648329496383667,
-0.44908249378204346,
-0.2404588758945465,
-0.6783117651939392,
0.05872300639748573,
0.38563716411590576,
-0.18249689042568207,
-0.039422713220... | |
second), the interval will never quite reach an average of 50 iterations per second.
The delay is almost always negligible, but if you're programming something really precise, you should go for a *self-adjusting timer* (which essentially is a timeout-based timer that constantly adjusts itself for the delay it's create... | [
0.25448843836784363,
-0.37506768107414246,
0.21033567190170288,
0.0385180301964283,
0.13965804874897003,
0.22068046033382416,
0.5245115756988525,
-0.1840282529592514,
-0.16253429651260376,
-0.6904193758964539,
0.20873060822486877,
0.3354663848876953,
-0.16141517460346222,
0.081162340939044... | |
In continuation of: [Storing DataRelation in xml?](https://stackoverflow.com/questions/729634/storing-datarelation-in-xml)
Thanks to everybody for answers to my earlier thread. However, could I ask the reason why everybody is not supporting this XML based approach? What exactly will be the problems? I can apply connst... | [
0.07978025823831558,
-0.027837052941322327,
0.5454481840133667,
0.2742922008037567,
-0.07841046154499054,
-0.2652599811553955,
0.08489124476909637,
0.18612828850746155,
-0.6294623613357544,
-0.3530116379261017,
-0.11625085771083832,
0.47090718150138855,
-0.13979369401931763,
0.077780187129... | |
reading,
Saurabh.
Database management systems are specifically designed to store data and retrieve it quickly, to preserve the integrity of the data and to leverage concurrent access to the data.
XML, on the other hand, was originally designed for documents, separating the content from the presentation. It became a ha... | [
0.23612730205059052,
0.11683567613363266,
0.02626391127705574,
0.43087130784988403,
-0.10136096179485321,
-0.2320082038640976,
0.23199400305747986,
0.07532267272472382,
-0.19881892204284668,
-0.4275727868080139,
-0.26929304003715515,
0.24100452661514282,
-0.15908648073673248,
0.28589013218... | |
but just because you can serialize DataSet objects to XML doesn't make it a good place to store data for multiple users.
When you're faced with two tools, one which was designed to do exactly what you need to do (in this case a DBMS) and one that was designed to do something else but has been kludged to do what you wa... | [
0.2446514517068863,
-0.19123026728630066,
-0.16844569146633148,
0.559036135673523,
-0.09426562488079071,
-0.42770102620124817,
0.011467262171208858,
-0.08409329503774643,
-0.22062262892723083,
-0.5800696611404419,
-0.15975666046142578,
0.22779273986816406,
-0.2743855118751526,
0.0361392535... | |
I have a package with a
```
public abstract class Player { /*...*/ }
```
and these
```
public abstract class GamePlayer extends Player { /*...*/ }
public abstract class TournamentPlayer extends Player { /*...*/ }
public abstract class StatelessPlayer extends Player { /*...*/ }
```
Users of the package need Player... | [
0.16291511058807373,
-0.05869065970182419,
0.30279865860939026,
-0.3009087145328522,
0.047715771943330765,
-0.5444085597991943,
-0.1849498599767685,
-0.45386621356010437,
-0.21757625043392181,
-0.5975749492645264,
-0.023428071290254593,
0.7475878000259399,
-0.40557894110679626,
0.174185991... | |
they won't be able to call the constructor or extend it themselves. If you don't already *have* an explicit constructor in `Player`, create one (as otherwise the compiler will create a default public parameterless constructor).
(Note that I've only suggested doing this to the *constructor*. The class itself can be pub... | [
-0.012304851785302162,
-0.24504972994327545,
-0.02732815407216549,
-0.11482839286327362,
-0.08128875494003296,
-0.297793447971344,
0.4133642017841339,
-0.0020018157083541155,
-0.3482595980167389,
-0.8578547835350037,
-0.26920974254608154,
0.5936987400054932,
-0.5232937335968018,
0.21706326... | |
I created a Java application which is the only application active on a workstation. (Similar to a kiosk system)
The problem is that the application has to be up and running as fast as possible after starting the computer.
I'm wondering **which one of the major operating systems can be configured to provide the shorte... | [
0.6300080418586731,
0.03151974827051163,
0.15882296860218048,
0.08496879041194916,
0.05053301155567169,
0.004661417566239834,
0.12093549221754074,
0.17565247416496277,
-0.2409687340259552,
-0.9361878633499146,
-0.028563961386680603,
0.8674312233924866,
0.017758121713995934,
-0.009986290708... | |
So if someone knows that Linux could have much better chances of a quick startup then I would put my time in there.
I'd also appreciate general hints on tuning boot times and Java startup times.
If you're running your application inside of a kiosk like machine where you don't need any other applications running, and y... | [
0.4262920618057251,
0.18505427241325378,
-0.29695433378219604,
0.30374398827552795,
0.1894737184047699,
-0.14354047179222107,
0.02820240519940853,
0.3570405840873718,
-0.18253906071186066,
-0.6584720015525818,
0.19094215333461761,
0.8984351754188538,
0.2867458462715149,
-0.1081429272890091... | |
Anyone had a chance to use the javascript MVC framework with ASP.NET MVC?
Basically i looking for advise on a way of using them together if possible, my asp.net MVC app i can't get rid of but i would love to use some sort of separation of concern for the javascript / Jquery...
Anybody used something like this? I am t... | [
0.5913255214691162,
0.08904613554477692,
-0.040143806487321854,
0.14170189201831818,
-0.2582947909832001,
-0.22442908585071564,
0.051704708486795425,
0.09144281595945358,
-0.33708181977272034,
-0.6436127424240112,
0.2546975612640381,
0.7716615200042725,
-0.2832891047000885,
-0.110163301229... | |
side by side with asp.net mvc?
Only once. The foreach statement is syntactic sugar for (in your case)...
```
{
IEnumerator<XmlNode> enumerator = node.SelectNodes("Property").GetEnumerator();
XmlNode nodeP;
while(enumerator.MoveNext())
{
nodeP = enumerator.Current;
propsList.Add(nodeP... | [
-0.10601148009300232,
-0.5558104515075684,
0.4444313049316406,
-0.0029141632840037346,
0.05048792064189911,
0.12568393349647522,
0.06304838508367538,
-0.4338647127151489,
-0.2698177993297577,
-0.6994062066078186,
-0.3448787033557892,
0.4089584946632385,
-0.26817163825035095,
0.067665480077... | |
Please excuse my lack of knowledge here but could someone let me know how i can get the first 16 bits of a 32 bit hex number.
That depends on what you mean by "first". Given a number, such as `0xdeadbeef`, would you consider `0xdead` or `0xbeef` to be "first"?
If the former, divide the number by 65536 (as an integer).... | [
0.10173871368169785,
-0.19444260001182556,
-0.07827316224575043,
-0.127674400806427,
-0.07799078524112701,
0.19637607038021088,
0.024732697755098343,
-0.23687809705734253,
-0.3280843496322632,
-0.3036963641643524,
-0.14585712552070618,
0.3524688184261322,
-0.20709963142871857,
-0.037949513... | |
precise details. | [
0.1825615018606186,
0.30358612537384033,
-0.029232265427708626,
0.4587993919849396,
0.20944654941558838,
-0.11024264991283417,
0.06973003596067429,
0.03302515298128128,
-0.16692693531513214,
-0.9348604083061218,
-0.020761292427778244,
0.361056923866272,
0.006059969309717417,
-0.22130301594... | |
I've got a weird problem. It looks like if my IIS6 locked an application's web.config. If I try to edit it, Windows complains that the web.config is used by another process.
Using Process Explorer I can see that the file is owned by w3wp.exe. Removing the virtual directory and stopping the website wasn't useful at all... | [
0.4237448275089264,
0.13045457005500793,
0.29488322138786316,
0.06542801856994629,
0.05801333114504814,
-0.44270575046539307,
0.4474286735057831,
0.22023573517799377,
-0.501471221446991,
-0.6965969800949097,
-0.1851782649755478,
0.49686941504478455,
-0.12190422415733337,
0.7004790306091309... | |
I'm writing a Word/VBA macro for a document template. Every time a user saves/creates a new document from the template, the document needs an ID embedded in the text. How can I (as simple as possible) implement auto-increment for this ID? The ID is numeric.
The system has to have some kind of mechanism to avoid differ... | [
0.7567524909973145,
0.3828694820404053,
0.24351902306079865,
-0.06904014945030212,
0.2851059138774872,
0.11755329370498657,
0.20294585824012756,
-0.20762328803539276,
-0.24584025144577026,
-0.6517984867095947,
0.22964411973953247,
0.4057525098323822,
-0.3109785318374634,
0.181298166513443,... | |
from the macro, or call a PHP page with an SQLite database, but is there other, smarter solutions?
Note that I can't use UUID or GUID, since the IDs need to be usable by humans as well as machines. Our customers must be able to say over the phone: "... and about this, then, with ID 436 ...?"
It seems I found a way to ... | [
0.3489941358566284,
-0.11431524157524109,
0.5126950740814209,
-0.052450791001319885,
-0.004852793645113707,
-0.10361678153276443,
-0.22453176975250244,
-0.2374926209449768,
-0.2293928861618042,
-0.6115938425064087,
-0.22913385927677155,
0.698637068271637,
-0.43478506803512573,
0.1130206882... | |
On Error Resume Next
Open sFile For Binary Access Read Write Lock Read Write As #nFile
If Err.Number <> 0 Then
' Return -1 if the file couldn't be opened exclusively
GetNextID = -1
Err.Clear
Exit Function
End If
On Error GoTo 0
GetNextID = 1 + Val(Input(LOF(nFile), #... | [
-0.016924122348427773,
-0.21960772573947906,
0.6826243996620178,
-0.3716238737106323,
0.291458398103714,
0.219257652759552,
0.3152177929878235,
-0.1809990555047989,
-0.2636050879955292,
-0.40494757890701294,
-0.42650383710861206,
0.7829873561859131,
-0.15646852552890778,
-0.122424408793449... | |
1, CStr(GetNextID)
Close #nFile
End Function
```
Simply call this function until it doesn't return -1 anymore. Neat. | [
0.10477032512426376,
0.08634960651397705,
0.6893194913864136,
-0.24847924709320068,
0.05124226212501526,
-0.35868263244628906,
0.4571968913078308,
0.07182049006223679,
-0.19031216204166412,
-0.6555261015892029,
-0.47043880820274353,
0.33622273802757263,
-0.4614747166633606,
0.2940391898155... | |
I'm writing a contextual "factory" that will maintain a dictionary of converter/acting objects which inherit from some Converter class. This class has a method:
```
- (Class)classResponsibility
```
Or something similar, such that a StringConverter class would implement the method as:
```
- (Class)classResponsibilit... | [
0.043326810002326965,
-0.03967151418328285,
0.2189665287733078,
-0.23811806738376617,
0.02264256589114666,
0.08899720758199692,
0.1421821415424347,
-0.21025647222995758,
0.05343172326683998,
-0.30690693855285645,
-0.07501792907714844,
0.7080853581428528,
-0.451919287443161,
0.1830190569162... | |
than I'll go with it.
You're using `setValue:forKey:` which only takes `NSString`s as keys. you should be using `setObject:forKey:` instead. A class object (pointers to class objects can be passed as type `Class`) is a full-fledged Objective-C object (a class object is an instance of its meta-class, and you can use all... | [
0.0843430832028389,
-0.06603070348501205,
0.4152255952358246,
0.2572592496871948,
0.12054760009050369,
-0.2913292944431305,
0.17107519507408142,
-0.0969366505742073,
-0.04305252432823181,
-0.4759390652179718,
-0.013830677606165409,
0.8216696381568909,
-0.17138159275054932,
0.21167765557765... | |
NSObject class defines a *class method* `+copyWithZone:`, whose [documentation](http://developer.apple.com/library/mac/#documentation/Cocoa/Reference/Foundation/Classes/NSObject_Class/Reference/Reference.html#//apple_ref/doc/uid/20000050-copyWithZone_) explicitly says that it "lets you use a class object as a key to an... | [
-0.02859083004295826,
0.2471519261598587,
0.10241799056529999,
-0.07639246433973312,
0.2578491270542145,
-0.25632011890411377,
0.22223946452140808,
0.1358543336391449,
-0.21919140219688416,
-0.37962907552719116,
-0.027875332161784172,
0.27136126160621643,
-0.4051750898361206,
0.00811010971... | |
I've got a table with a large number of rows that is not suitable for paging. The rows in this table can be sorted by clicking a column header which triggers a client side sorting algoritm based on <http://www.exforsys.com/tutorials/jquery/jquery-basic-alphabetical-sorting.html> The function dynamically adds an "expand... | [
0.09888561815023422,
0.056938860565423965,
0.6847766637802124,
-0.19715173542499542,
0.34669429063796997,
0.03714045509696007,
0.02941666543483734,
-0.0650051161646843,
-0.10223165154457092,
-0.6000881791114807,
-0.08030059188604355,
0.20643670856952667,
0.0738610103726387,
0.3213745653629... | |
slower to sort.
As the sorting is only done to make it easier for the user to find the row(s) that they are looking for I figured things could be speeded up by cropping the key values with substr(0,7) or something (eight chars should provide more than enough precision). However, I found that doing a substr() incurred... | [
-0.16552899777889252,
-0.11053832620382309,
0.2997625172138214,
0.006979367695748806,
-0.07102495431900024,
0.39326924085617065,
0.13459432125091553,
-0.3143199682235718,
-0.3602287769317627,
-0.65255206823349,
0.013616757467389107,
0.42466604709625244,
-0.33083897829055786,
-0.04754144325... | |
row.sortKey = $(row).children('td').eq(column).text().toUpperCase()
})
rows.sort(function(a, b) {
if (a.sortKey < b.sortKey) return -1
if (a.sortKey > b.sortKey) return 1
return 0
})
$.each(rows, function(index, row) {
$table.children('tbody').append(row)
row.sortKey = null
})
```
EDIT: Here is th... | [
-0.1679093986749649,
-0.027391528710722923,
0.7106159329414368,
-0.2452557384967804,
0.19642479717731476,
0.5662072896957397,
0.19629596173763275,
-0.5363746285438538,
-0.07390835136175156,
-0.7995134592056274,
-0.21067114174365997,
0.3543981611728668,
-0.4658518135547638,
0.29081028699874... | |
{
var colIndex = this.cellIndex;
for(i=0;i<rows.length;i++) {
rows[i].sortKey = $(rows[i].childNodes[colIndex]).text().toUpperCase();
}
rows.sort(function(a, b) {
if (a.sortKey < b.sortKey) return -1; | [
-0.17510543763637543,
-0.15038253366947174,
0.6329519152641296,
-0.5589064955711365,
0.4193769097328186,
0.6609135270118713,
0.26038071513175964,
-0.2293565720319748,
-0.3082985579967499,
-0.391403466463089,
-0.21837277710437775,
0.27423256635665894,
-0.6079031229019165,
0.3081012070178985... | |
if (a.sortKey > b.sortKey) return 1;
return 0;
});
for(i=0;i<rows.length;i++) {
storage.push(rows[i]);
rows[i].sortKey = null; | [
-0.21190336346626282,
-0.3912140727043152,
0.4894866645336151,
-0.6677159667015076,
0.3021876811981201,
0.271499365568161,
0.14808687567710876,
-0.43181112408638,
-0.1945548802614212,
-0.48274174332618713,
-0.4480183720588684,
0.07546843588352203,
-0.37410295009613037,
0.33591416478157043,... | |
}
$table.children('tbody').append(storage);
});
});
});
```
one optimization that i can think of is to modify this code:
```
$.each(rows, function(index, row) {
$table.children('tbody').append(row)
row.sortKey = null
})
```
to instead of appending one row at a time, append la... | [
-0.08061403781175613,
0.17693395912647247,
0.3040493130683899,
-0.13571740686893463,
0.31264838576316833,
0.3888626992702484,
0.13318337500095367,
-0.26059842109680176,
-0.2701207399368286,
-0.8049299120903015,
-0.14562678337097168,
0.48639142513275146,
-0.47803807258605957,
0.299505263566... | |
the string | [
0.009089726023375988,
-0.29528096318244934,
0.2411709576845169,
-0.007778963074088097,
-0.1421980857849121,
0.20062068104743958,
-0.044738538563251495,
-0.06672245264053345,
-0.30972617864608765,
-0.038020383566617966,
-0.09823264181613922,
0.1463925540447235,
-0.310404509305954,
0.4869932... | |
I am working on my first Drupal project on XAMPP in my MacBook. It's a prototype and receives positive feedback from my client.
I am going to deploy the project on a Linux VPS two weeks later. Is there a better way than 're-do'ing everything on the server from scratch?
* install Drupal
* download modules (CCK, Views,... | [
0.513886034488678,
0.11323394626379013,
0.6066294312477112,
0.027821926400065422,
-0.02759864553809166,
-0.2307245433330536,
0.08812595158815384,
0.3228539824485779,
-0.2683336138725281,
-0.8249205350875854,
-0.07234015315771103,
0.4440028965473175,
-0.13059847056865692,
0.0815382823348045... | |
but the critical first step is getting the full source tree of your site into version control. When changes are made on the testing server or staging server, you see if they work, you commit, then you update on the live server. Rollbacks and deployment gets a lot, lot simpler. For clusters of multiple webheads you can ... | [
0.5022062659263611,
-0.09856545925140381,
0.34463196992874146,
0.17599278688430786,
-0.05118335038423538,
-0.507009744644165,
0.2343074381351471,
0.13284994661808014,
-0.5532011389732361,
-0.8172528743743896,
-0.1728154569864273,
0.4318315386772156,
-0.08469487726688385,
0.1792681515216827... | |
the files directory, use a symlink in the 'proper' location to point to a server-side directory outside of the webroot. That lets your source control repo include all the code and a symlink, instead of all the code and all the files users have uploaded.
* Databases are trickier; cleaning up the dev/staging DB and pushi... | [
0.5170637965202332,
0.011562934145331383,
0.5461311936378479,
0.14444537460803986,
-0.052922528237104416,
-0.33464160561561584,
0.14292536675930023,
-0.25712454319000244,
-0.2682574689388275,
-0.5308745503425598,
-0.3414510190486908,
0.6461344957351685,
-0.25838083028793335,
0.070371881127... | |
slides out. | [
-0.4965522289276123,
0.09572616964578629,
0.5055299401283264,
0.230326309800148,
0.2730502188205719,
-0.34331294894218445,
0.12740840017795563,
0.09550756961107254,
0.36681196093559265,
-0.5228875279426575,
-0.04148919880390167,
-0.09553263336420059,
0.37783849239349365,
0.3339394927024841... | |
I am having utf-8 encoded file containing arabic text and I have to search it.
My problem are diacritics, how to search skipping them?
Like if you load that text in Internet Explorer (converting text in HTML ofcourse ), IE is skipping those diacritics?
Any help?
**Edit1**: Search is simply performed by following co... | [
-0.1254468709230423,
0.06812582165002823,
0.5170871019363403,
-0.16234755516052246,
0.005108891986310482,
0.047147419303655624,
0.4311392307281494,
-0.09214179962873459,
-0.18440711498260498,
-0.9454205632209778,
-0.62629634141922,
0.36319682002067566,
-0.32511329650878906,
0.0151935629546... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.