text stringlengths 0 30.5k | title stringclasses 1
value | embeddings listlengths 768 768 |
|---|---|---|
MWD001 6.1 build 7601 (Windows Server 2008 R2 Standard Edition Service Pack 1) i586
Build Date
Feb 2 2012 20:10:58
Compiler
MSVC9 (Visual C++ 2008)
Architecture
x86
Configure Command
cscript /nologo configure.js "--enable-snapshot-build" "--enable-debug-pack" "--disable-zts" "--disable-isapi" "--disable... | [
-0.1997641623020172,
0.01832619681954384,
0.6430457234382629,
-0.06716062128543854,
-0.13399270176887512,
-0.28419265151023865,
0.626654863357544,
-0.5423101782798767,
-0.06507756561040878,
-0.7558982968330383,
-0.2354639172554016,
0.6710370182991028,
-0.4427294433116913,
0.005903264973312... | |
have a section that looks like this:

If you do not get that section in your `phpinfo()`. Make sure that you are using the right version. There are both non-thread-safe and thread-safe versions of the extension.
Finally, check your `extension_dir` se... | [
0.25571805238723755,
0.040040697902441025,
0.5990529656410217,
0.037294331938028336,
0.005871008615940809,
-0.12945657968521118,
0.16159483790397644,
0.12293186038732529,
-0.0742320641875267,
-0.6502225399017334,
-0.18866989016532898,
0.8206872940063477,
-0.4571658670902252,
0.172439932823... | |
be extracted to your `ext` directory when you extracted the extension. | [
0.022687040269374847,
-0.07968506217002869,
0.5142020583152771,
-0.19405274093151093,
0.5055851340293884,
-0.027915265411138535,
0.10980289429426193,
0.2548156678676605,
0.014172946102917194,
-0.47577106952667236,
-0.45982295274734497,
0.4560181498527527,
-0.18175539374351501,
0.1248670890... | |
I want to create a table with String keyvalues and integer data. Right now I am leaning towards creating a two-dimensional HashMap:
```
HashMap<String, HashMap<String, Integer>>
```
Is that going to be my fastest and most flexible option? I am using it to create a language model so there will be a lot of changes and... | [
-0.19961726665496826,
0.02411014400422573,
0.25541481375694275,
0.025221694260835648,
-0.16319184005260468,
0.005406613927334547,
-0.057644300162792206,
-0.18738135695457458,
-0.22340160608291626,
-1.202069640159607,
-0.050575368106365204,
0.3943037688732147,
-0.42235618829727173,
-0.11008... | |
`equals` and `hashCode`!).
This is simpler (insert doesn't have to check whether the sub-map is created or not) and probably faster (only 1 hash lookup instead of 2).
If you know of some character that can't be in either of your strings, then you could just use `String` instead of `Pair<String>` where the key is the ... | [
-0.3461702764034271,
-0.18924544751644135,
0.20139427483081818,
-0.1583172082901001,
-0.21834179759025574,
0.024808291345834732,
0.08483733236789703,
-0.3961704969406128,
0.05918062850832939,
-0.7081138491630554,
0.05635638162493706,
0.5163246393203735,
-0.2679627537727356,
-0.070990785956... | |
Is there any way to set an organizer's name with ri\_cal?
The RFC shows it done this way:
```
ORGANIZER;CN="John Smith":MAILTO:jsmith@host.com
```
But I can't figure out if there is a way to add the `;CN="foo"` part to the `ORGANIZER` entry with ri\_cal.
Gave up, switched to the [icalendar gem](http://icalendar.ru... | [
0.48507311940193176,
0.4299670159816742,
-0.03742032125592232,
-0.21930377185344696,
-0.015110153704881668,
0.040926799178123474,
0.1521710455417633,
0.0306495763361454,
-0.24118909239768982,
-0.17926475405693054,
0.2491152435541153,
0.348503440618515,
-0.4877568185329437,
0.69035446643829... | |
I hope this is the right place to ask this.
I would like to work on an Android build with a completely custom OS. I was inspired by [this project](https://bitbucket.org/floren/inferno/overview) that ported Inferno to Android.
I would like to do this legally (obeying all terms of service and what-not) if possible, and... | [
0.9893712997436523,
0.46893683075904846,
0.2115907371044159,
-0.015918578952550888,
0.2671104073524475,
-0.27537286281585693,
0.0745852068066597,
-0.04350602626800537,
-0.43839699029922485,
-0.4920881688594818,
0.10424008220434189,
0.5649024844169617,
-0.13298393785953522,
-0.1270375549793... | |
would like to buy a phone from the carrier anyway just to make sure it will be supportable.
Head over to the AOSP source, and clone it. Strip out what you don't need in your branch and begin the kernel patching! You'll need to modify the kernel in portions to make it compatible (fairly) with the device you're on. The A... | [
0.5334343910217285,
0.08129607141017914,
0.45201969146728516,
0.13976213335990906,
0.3922805190086365,
0.029889073222875595,
0.031118124723434448,
-0.09554501622915268,
0.12260404974222183,
-0.686298131942749,
-0.06143703684210777,
0.743602991104126,
-0.467837929725647,
-0.2146155834197998... | |
it out on your platform. | [
0.15550073981285095,
-0.25175905227661133,
0.05785892903804779,
-0.022157151252031326,
-0.248331218957901,
-0.14585036039352417,
0.14897751808166504,
0.06957383453845978,
-0.2403477430343628,
-0.3986520767211914,
0.5303869247436523,
0.3487703204154968,
-0.059663597494363785,
-0.10626413673... | |
Consider some function `foo`:
```
def foo(input)
input * 2
end
```
How to get the max value of input for some array `a`?
```
a = [3, 5, 7, 9, 6]
```
Something like the following (which doesn't work) should return 9:
```
a.max do |value|
foo(value)
end
```
How to do it?
Ruby 1.9.2
You need `max_by` , not `... | [
0.32458066940307617,
0.11574736982584,
0.16364531219005585,
-0.1890338957309723,
-0.29165583848953247,
0.19233489036560059,
0.39541441202163696,
-0.5146541595458984,
0.005307831335812807,
-0.2654815912246704,
-0.00303312367759645,
0.5571277141571045,
-0.5694350600242615,
-0.009405676275491... | |
#=> "horse"
a.max {|a,b| a.length <=> b.length } #=> "albatross"
```
So `max` does take a block, but it doesn't do what you expected it to.
`max_by`:
> Returns the object in enum that gives the maximum value from the given
> block.
>
>
> If no block is given, an enumerator is returned instead.
```
a = %w(alba... | [
0.22734664380550385,
-0.08669723570346832,
-0.12074533104896545,
0.08690370619297028,
-0.1379195749759674,
0.40481531620025635,
0.3630266487598419,
-0.47887173295021057,
-0.09613994508981705,
-0.27182042598724365,
-0.12674304842948914,
0.46693915128707886,
-0.5421932339668274,
-0.079858914... | |
I am using JavaScript code to show the multiple pin points on Google Maps using Brownfield. I set the first clicked point as the center point, and when the user clicks on any other point (which is not the center point) I want to display a route mapped from the center point to that clicked point.
I would appreciate hel... | [
0.3780962824821472,
0.2516769468784332,
0.5954908132553101,
-0.036260318011045456,
-0.13405191898345947,
0.15732809901237488,
0.054650552570819855,
-0.44260790944099426,
-0.08414044231176376,
-0.49014607071876526,
0.14160290360450745,
-0.09601833671331406,
-0.4816708266735077,
0.4275694787... | |
<=> b.
```
a = %w(albatross dog horse)
a.max #=> "horse"
a.max {|a,b| a.length <=> b.length } #=> "albatross"
```
So `max` does take a block, but it doesn't do what you expected it to.
`max_by`:
> Returns the object in enum that gives the maximum value from the given
> block.
> ... | [
0.22013208270072937,
0.03731746971607208,
-0.05899601802229881,
0.044289544224739075,
-0.1274918019771576,
0.4219594895839691,
0.3756618797779083,
-0.5253387093544006,
-0.09640433639287949,
-0.3532130718231201,
-0.15594802796840668,
0.3929916322231293,
-0.5852387547492981,
-0.0322318598628... | |
#=> "albatross"
``` | [
-0.10753204673528671,
0.41302064061164856,
0.15694426000118256,
0.010088632814586163,
-0.01183680072426796,
0.07949040085077286,
0.28383713960647583,
0.21464139223098755,
-0.0939951092004776,
-0.43106168508529663,
-0.46197766065597534,
0.2973569333553314,
-0.41197535395622253,
0.1656677573... | |
Just for fun I created a project that created about 5 GB of memory and did not delete it. As long as the application is running that "memory leak" is there. The second I close my application the memory within 2 seconds is back down to normal as if my program never ran. So the questions have to be asked.
Does Windows 7... | [
0.3920365571975708,
0.2550135850906372,
0.5382192730903625,
0.12404419481754303,
0.05094364657998085,
-0.29656219482421875,
0.5012018084526062,
0.16607743501663208,
-0.7119210958480835,
-0.12412194907665253,
-0.24583375453948975,
0.8042649626731873,
0.027440553531050682,
0.1244140788912773... | |
allocated to it. Cleaning up memory leaks may be a perceived by-product of this, but the OS does not actually see it that way. It does not know that the program had been leaking memory, just that it had allocated it. | [
0.028688201680779457,
0.10249488800764084,
-0.1635454148054123,
0.31519392132759094,
0.029026374220848083,
0.04453463479876518,
-0.04518376663327217,
0.054566431790590286,
-0.4568893611431122,
-0.49121156334877014,
-0.2797858715057373,
0.13914139568805695,
-0.18648092448711395,
0.134615674... | |
I m creating custom checkbox and radio button in pure css but they are not showing perfectly in IE7 .
any body help in
code is there please check it
**HTML**
```
<ul>
<li>
<fieldset>
<legend id="title1" class="desc">
Select a Choice
</legend>
<div>
<span>
<input id="Field1_0" name="Field1" type="radio" class="fi... | [
-0.0060324412770569324,
-0.06821813434362411,
0.5470383763313293,
-0.25010645389556885,
-0.1709652990102768,
0.08164194226264954,
0.08751903474330902,
-0.8163716197013855,
-0.08741158992052078,
-0.8882055878639221,
-0.13817395269870758,
0.6626379489898682,
0.013289431110024452,
-0.13082031... | |
div > span > input[type='checkbox']
{
opacity: 0;
float: left;
width: 18px;
}
li:not(#foo) > fieldset > div > span > input[type='radio'] + label,
li:not(#foo) > fieldset > div > span > input[type='checkbox'] + label {
margin: 0;
clear: none;
padding: 5px 0 4px 24px;
/* Make look clickable ... | [
-0.22815380990505219,
-0.026534421369433403,
0.8835381269454956,
-0.20761284232139587,
0.09677720069885254,
0.03156460076570511,
0.22863376140594482,
-0.4177028238773346,
-0.26623791456222534,
-0.5122404098510742,
-0.5108661651611328,
0.6395249962806702,
-0.4523763954639435,
0.168470382690... | |
> fieldset > div > span > input[type='checkbox']:checked + label {
background-image: url(https://css-tricks.com/wufoo/themes/customradiosandcheckboxes/check.png);
}
```
[Live demo here](http://jsfiddle.net/rohitazad/Vsvg2/79/) <http://jsfiddle.net/rohitazad/Vsvg2/79/>
**:checked** is the property of css3 which n... | [
0.3636830151081085,
-0.251717746257782,
0.412837952375412,
-0.2519990801811218,
-0.20768113434314728,
-0.25177261233329773,
0.3907955288887024,
-0.3960307836532593,
-0.23381905257701874,
-0.7113485336303711,
-0.15986685454845428,
0.3955690562725067,
-0.31303170323371887,
-0.353194802999496... | |
I want to use a CompletionService to process the results from a series of threads *as they are completed*. I have the service in a loop to take the Future objects it provides as they become available, but I don't know the best way to determine when all the threads have completed (and thus to exit the loop):
```
import... | [
0.2709360122680664,
0.006152634508907795,
0.40062806010246277,
-0.2701033055782318,
0.24906355142593384,
0.449846088886261,
0.4893830418586731,
-0.22852036356925964,
-0.32624152302742004,
-0.4855417013168335,
-0.3110820949077606,
0.21830344200134277,
-0.47950372099876404,
0.422698825597763... | |
final ThreadPoolExecutor threadPool = (ThreadPoolExecutor) Executors.newFixedThreadPool(MAX_THREADS);
final CompletionService<Integer> service = new ExecutorCompletionService<Integer>(threadPool);
for (int i=0; i<TOTAL_THREADS; i++){
service.submit(new MyCallable(i));
}
int... | [
-0.041197650134563446,
-0.5700270533561707,
0.8712427616119385,
-0.3961614668369293,
0.24082408845424652,
0.5222026705741882,
0.41816696524620056,
-0.10948383063077927,
-0.11353155225515366,
-0.8263053297996521,
-0.3576619029045105,
0.269009530544281,
0.0006865221657790244,
0.5552814006805... | |
int result = future.get();
System.out.println(" took: " + result);
finished++;
}while(finished < TOTAL_THREADS);
System.out.println("Shutting down");
threadPool.shutdown();
}
public static class MyCallable implements Callable<Integer>{ | [
-0.05030697211623192,
-0.4539024233818054,
0.5336795449256897,
-0.23931440711021423,
0.28286013007164,
0.23372821509838104,
0.23214735090732574,
0.004512588493525982,
-0.024435916915535927,
-0.28328582644462585,
-0.3571728467941284,
0.4721095860004425,
-0.235078364610672,
0.46506467461586,... | |
final int id;
public MyCallable(int id){
this.id = id;
System.out.println("Submitting: " + id);
}
@Override
public Integer call() throws Exception {
Thread.sleep(1000);
System.out.println("finished: " + id); | [
-0.055048421025276184,
-0.1781703233718872,
0.5016910433769226,
-0.26429253816604614,
0.4325876832008362,
0.1450417935848236,
0.2555546462535858,
-0.1670781821012497,
-0.03001498617231846,
-0.6216620206832886,
-0.3417530059814453,
0.4668982923030853,
-0.08915794640779495,
0.559567689895629... | |
return id;
}
}
}
```
I've tried checking the state of the ThreadPoolExecutor, but I know the getCompletedTaskCount and getTaskCount methods are only approximations and shouldn't be relied upon. Is there a better way to ensure that I've retrieved all the Futures from the CompletionService than counting the... | [
0.27585309743881226,
-0.029528943821787834,
0.339594304561615,
-0.12304791063070297,
0.35084542632102966,
-0.04360179975628853,
0.1712484359741211,
0.018307100981473923,
-0.357954204082489,
-0.5744912028312683,
0.07643162459135056,
0.6784083843231201,
-0.1489686667919159,
0.097442165017127... | |
isn't a way to ask the CompletionService or its Executor what's left to be returned.
Answering to these questions gives you the answer?
* Do your asynchronous tasks create other tasks submitted to `CompletionService`?
* Is `service` the only object that is supposed to handle the tasks created in your application?
Bas... | [
0.40538305044174194,
0.08480258285999298,
0.06565409898757935,
0.033165354281663895,
0.07786540687084198,
0.15398041903972626,
0.027877194806933403,
-0.04763638973236084,
-0.11432106792926788,
-0.40631070733070374,
-0.27567732334136963,
0.37100765109062195,
0.02236923575401306,
0.169738844... | |
What are the `input` types you can use in IIS rewrite rules? The ones I mean are like as follows:
```
<conditions>
<add input="{HTTP_HOST}" type=”Pattern” pattern="^www\.mysite\.com$" negate="true">
</conditions>
```
* HTTP\_HOST
* URL
* REQUEST\_FILENAME
* ?
You can try the below input types. See also [referen... | [
-0.08335266262292862,
0.08304427564144135,
0.506470799446106,
-0.08060185611248016,
-0.07000944763422012,
-0.1473337560892105,
0.25459024310112,
-0.4949464499950409,
-0.1905992031097412,
-0.8612810373306274,
-0.10642383247613907,
0.4863400161266327,
-0.42789530754089355,
0.2107167840003967... | |
This is in reference to Python 3.2. Pertinent grammar rules are as follows (<http://docs.python.org/py3k/reference/grammar.html>):
```
power: atom trailer* ['**' factor]
atom: ('(' [yield_expr|testlist_comp] ')' |
'[' [testlist_comp] ']' |
'{' [dictorsetmaker] '}' |
NAME | NUMBER | STRING+ | '...'... | [
0.24089115858078003,
-0.031271498650312424,
0.12383298575878143,
-0.1822725087404251,
-0.27569064497947693,
-0.32940202951431274,
0.14330749213695526,
-0.7054150104522705,
0.03055567294359207,
-0.29070064425468445,
-0.26784396171569824,
0.5571964383125305,
-0.3367738127708435,
-0.163873970... | |
(`NUMBER`), `1` is not a function and therefore you cannot call it with something like `1()`. My question is: given an instance of the `power` grammar rule, could its `atom` be substituted with any rule of `atom`'s other than `NAME` in a parse tree of a Python program and still run?
**EDIT (ANSWER):**
Anything that i... | [
-0.07781105488538742,
0.09669532626867294,
0.11599132418632507,
0.014909814111888409,
-0.10403712093830109,
-0.13284628093242645,
0.19606800377368927,
-0.4530337452888489,
0.09763692319393158,
-0.274753600358963,
-0.4948660433292389,
0.507411539554596,
-0.5084366798400879,
-0.1768684536218... | |
method are callable).
This means you can do stuff like:
```
>>> eval.__call__.__call__("print(\"x\")")
x
```
Or even crazier (useless) stuff:
```
>>> a = lambda x : [abs, lambda y : y][0 if x < 0 else 1](x)
>>> a(1)
1
>>> a(-1)
1
>>> a(0)
0
```
```
>>> 1()
Traceback (most recent call last):
File "<stdin>", line... | [
-0.16416822373867035,
-0.008799646981060505,
0.3708367645740509,
0.06154417619109154,
-0.10623815655708313,
-0.07543521374464035,
0.44774189591407776,
-0.607487142086029,
-0.08069755882024765,
-0.19227509200572968,
0.10516737401485443,
0.48142117261886597,
-0.43160074949264526,
0.067428275... | |
If I have a link like this:
```
<a data-btn="login"></a>
```
If I wished to select in jQuery using the data attribute which should I do?
```
var a = $("[data-btn='login']"); //This?
var a = $("[data-btn=login]"); //Or this?
```
As of jQuery 1.5, [both approaches will work](https://api.jquery.com/category/sele... | [
0.1979682892560959,
-0.057893216609954834,
0.43190741539001465,
-0.13314154744148254,
-0.35415059328079224,
-0.18239374458789825,
0.08102581650018692,
0.029260363429784775,
-0.16788940131664276,
-0.5777769088745117,
-0.1203320249915123,
0.6224647164344788,
-0.3305448591709137,
0.1660902798... | |
I have the following vertex shader:
```c
attribute vec4 Position;
attribute vec4 SourceColor;
varying vec4 DestinationColor;
uniform mat4 Projection;
void main(void) {
DestinationColor = SourceColor;
gl_Position = Projection * Position;
}
```
I then try to apply the following matrix to the `Projection` unif... | [
-0.15120038390159607,
0.0237028356641531,
0.9301947355270386,
-0.3306605815887451,
0.17645861208438873,
0.3606998026371002,
0.177008718252182,
-0.22471168637275696,
-0.21302580833435059,
-0.6285841464996338,
0.1335473507642746,
0.32452142238616943,
-0.2900542914867401,
0.448432058095932,
... | |
multiply then you say it works fine?
Couple ideas:
* Check glGetError
* Check shader compile/link status (glGetShader/Programiv)
* Is the program bound during glUniform call?
* Is projectionSlot a valid value? | [
0.16249051690101624,
-0.0007027779356576502,
0.637295663356781,
-0.23703794181346893,
-0.15833862125873566,
0.22894945740699768,
0.018221886828541756,
-0.4160982668399811,
-0.4029238820075989,
-0.3463776111602783,
0.03834037855267525,
0.5264944434165955,
-0.40621858835220337,
-0.2252153903... | |
I'm trying to implement an RSA attack in Java and I need to compute math operations like floor and ceil to BigInteger variables. As we know math.ceil and math.floor only apply to double variables, do you know any other way I can compute floor and ceil for BigIntegers? Thank you.
```
store = out.toString("UTF-8");
```
... | [
0.1688307225704193,
0.13446317613124847,
0.1057998538017273,
0.0021254783496260643,
-0.03836309164762497,
-0.03670050948858261,
0.35493648052215576,
-0.05745791643857956,
-0.4133239686489105,
-0.4965498447418213,
-0.08296167850494385,
0.3883751630783081,
-0.6379726529121399,
0.298016339540... | |
ByteArrayInputStream constructor | [
-0.15627597272396088,
0.06791159510612488,
0.15434062480926514,
0.21082529425621033,
-0.4280698299407959,
0.06864692270755768,
-0.2970151901245117,
-0.017455752938985825,
-0.029726499691605568,
-0.05898284539580345,
0.20240344107151031,
0.3601781129837036,
-0.19623005390167236,
0.097182556... | |
I am running my development on Ubuntu 11.10, and RubyMine
Here is my development settings for the database.yml: which RubyMine created for me
```
development:
adapter: postgresql
encoding: unicode
database: mydb_development
pool: 5
username: myuser
password:
```
when I try to run the app, I get this err... | [
0.15513283014297485,
0.49522846937179565,
0.28616467118263245,
-0.07533899694681168,
-0.05302097648382187,
-0.0013559114886447787,
0.30024901032447815,
0.04436754435300827,
0.05955447256565094,
-0.7470126748085022,
-0.10852865874767303,
0.48880958557128906,
-0.38682064414024353,
-0.0938301... | |
then, please advice.
```
Exiting
/home/sam/.rvm/gems/ruby-1.9.3-p0@project/gems/activerecord-3.2.3/lib/active_record/connection_adapters/postgresql_adapter.rb:1194:in `initialize': FATAL: Peer authentication failed for user "project" (PG::Error)
from /home/sam/.rvm/gems/ruby-1.9.3-p0@project/gems/activerecord-3.2... | [
-0.5387065410614014,
0.5853981971740723,
0.6581839323043823,
-0.33071601390838623,
0.2354193925857544,
0.2878366708755493,
0.8424866795539856,
-0.8372858166694641,
-0.2647918164730072,
-0.34946081042289734,
-0.27639999985694885,
0.7104663252830505,
-0.17554998397827148,
0.3272005021572113,... | |
from /home/sam/.rvm/gems/ruby-1.9.3-p0@project/gems/activerecord-3.2.3/lib/active_record/connection_adapters/abstract/connection_pool.rb:398:in `retrieve_connection'
from /home/sam/.rvm/gems/ruby-1.9.3-p0@project/gems/activerecord-3.2.3/lib/active_record/connection_adapters/abstract/connection_specification.rb:168:... | [
-0.23504292964935303,
0.39293357729911804,
0.6084168553352356,
-0.3683934807777405,
0.25069594383239746,
0.38078516721725464,
0.45902371406555176,
-0.7657220363616943,
-0.4806322455406189,
-0.32414528727531433,
-0.553145706653595,
0.3837016522884369,
-0.20866984128952026,
0.137706488370895... | |
`each'
from /home/sam/.rvm/gems/ruby-1.9.3-p0@project/gems/railties-3.2.3/lib/rails/initializable.rb:54:in `run_initializers'
from /home/sam/.rvm/gems/ruby-1.9.3-p0@project/gems/railties-3.2.3/lib/rails/application.rb:136:in `initialize!'
from /home/sam/.rvm/gems/ruby-1.9.3-p0@project/gems/railties-3.2.3/li... | [
0.03699236363172531,
0.30904191732406616,
0.5513517260551453,
-0.30794063210487366,
0.21437087655067444,
0.40165549516677856,
0.3651542663574219,
-1.2398204803466797,
-0.032440897077322006,
-0.3255422115325928,
-0.4441494643688202,
0.337119996547699,
-0.2819627821445465,
-0.073930129408836... | |
/home/sam/.rvm/gems/ruby-1.9.3-p0@project/gems/rack-1.4.1/lib/rack/server.rb:200:in `app'
from /home/sam/.rvm/gems/ruby-1.9.3-p0@project/gems/railties-3.2.3/lib/rails/commands/server.rb:46:in `app'
from /home/sam/.rvm/gems/ruby-1.9.3-p0@project/gems/rack-1.4.1/lib/rack/server.rb:301:in `wrapped_app'
from /h... | [
-0.08260831236839294,
0.5512842535972595,
0.8570119142532349,
-0.6132004261016846,
0.28988420963287354,
0.8230754137039185,
0.4179791212081909,
-0.8868213295936584,
-0.2481086701154709,
-0.44002389907836914,
-0.5756030678749084,
0.6067890524864197,
-0.16523659229278564,
-0.0641424432396888... | |
5. Otherwise if it's not localhost definitely tell that app where to find its database.
```
development:
adapter: postgresql
encoding: unicode
database: kickrstack_development
host: localhost
pool: 5
username: kickrstack
password: secret
```
Make sure your user credentials are set correctly by creatin... | [
-0.07790570706129074,
0.15813569724559784,
0.617969274520874,
-0.10385451465845108,
0.08802144229412079,
0.016189856454730034,
0.47320452332496643,
-0.10066086798906326,
-0.11741691827774048,
-0.6989150047302246,
-0.46294140815734863,
0.5873388648033142,
-0.257396399974823,
0.1514165848493... | |
database "dcaclab_development" owner "guy_on_stackoverflow";
```
Now update your database.yml file after you've confirmed creating the database, user, password and set these privileges. Don't forget host: localhost. | [
0.24732553958892822,
0.2526988387107849,
0.4236604869365692,
0.022785313427448273,
0.24644294381141663,
-0.5829629302024841,
0.028858810663223267,
0.6061957478523254,
-0.2376108318567276,
-0.7570745944976807,
-0.09912308305501938,
0.6434714794158936,
-0.3043770492076874,
0.3623703420162201... | |
Friends,
My school project is having an xml data file:
```
<patients>
<patient>
<regNo>2012/Mar/003</regNo>
<name>Jhon</name>
<add>Somewhere</add>
<mobile>0000</mobile>
.
.
.
<stay>2</stay>
<costofroom>100</costofroom>
<total>200</total>
</patient>
</patients>
```
My Windowsform "**EditPatients\_Load**" is able to f... | [
-0.2799640893936157,
0.4281841516494751,
0.8300329446792603,
0.011804476380348206,
0.32881608605384827,
0.35231703519821167,
0.24421122670173645,
-0.060122329741716385,
-0.1512397676706314,
-0.7715620398521423,
0.42622917890548706,
0.40570521354675293,
0.4213072657585144,
-0.03893538564443... | |
//</add><mobile>0000</mobile><stay>2</stay><costofroom>100</costofroom><total>200</total>
//</patient></patients>";
XDocument xmlDoc = XDocument.Load(@"c:\abc.xml");
var items = (from item in xmlDoc.Descendants("patient")
where item.Element("name").Value == "... | [
-0.017101464793086052,
-0.15863823890686035,
0.9563062787055969,
-0.21795965731143951,
0.4268465042114258,
0.549735963344574,
-0.19178707897663116,
-0.645902156829834,
-0.41329026222229004,
-0.590335488319397,
-0.17888107895851135,
0.34043848514556885,
0.019438782706856728,
0.2552293241024... | |
select item);
if (items.Count() > 0)
{
var item = items.First();
item.SetElementValue("add", "New New Address");
xmlDoc.Save(@"c:\abc.xml", SaveOptions.None); | [
-0.06716762483119965,
-0.2803800702095032,
0.48755955696105957,
-0.2269352525472641,
0.23237690329551697,
0.15389485657215118,
0.08637133240699768,
-0.5571931004524231,
-0.19517774879932404,
-0.5187830328941345,
-0.6150415539741516,
0.30364909768104553,
-0.4290855824947357,
0.3224912583827... | |
}
```
You can get single element using
```
var item = (from item in xmlDoc.Descendants("patient")
where item.Element("name").Value == "Jhon"
select item).FirstOrDefault();
```
then update it using `SetElementValue()` method.
//Updated Xml
```
<?xml versi... | [
-0.368769109249115,
-0.0657520592212677,
0.5093472003936768,
-0.1448078602552414,
0.15488876402378082,
0.4179390072822571,
-0.05705868825316429,
-0.6557077169418335,
-0.2550693452358246,
-0.9637212753295898,
-0.32752108573913574,
0.16955308616161346,
-0.21379530429840088,
0.315557301044464... | |
<mobile>0000</mobile>
<stay>2</stay>
<costofroom>100</costofroom>
<total>200</total>
</patient>
</patients>
```
Reference:
[Update XML with C# using Linq](https://stackoverflow.com/questions/1487653/update-xml-with-c-sharp-using-linq) | [
-0.06406459212303162,
0.04542264714837074,
1.1034845113754272,
-0.060251008719205856,
0.29137489199638367,
0.2794729769229889,
-0.18671083450317383,
-0.5235719084739685,
-0.44627541303634644,
-0.4807063639163971,
-0.15108171105384827,
0.5581138730049133,
0.0694037675857544,
0.0040706777945... | |
I receive the following error when trying to run the app on my device.
```
error: failed to launch '/Users/michael/Library/Developer/Xcode/DerivedData/Build/Products/Debug-iphoneos/Word Processor.app/Word Processor' -- No such file or directory (/Users/michael/Library/Developer/Xcode/DerivedData/Build/Products/Debug-i... | [
0.1499992460012436,
0.34376153349876404,
0.3819933831691742,
-0.03242265433073044,
0.3688351809978485,
0.2785726487636566,
0.6806001663208008,
-0.16933338344097137,
-0.16482985019683838,
-0.5517386794090271,
0.008082892745733261,
0.7908510565757751,
-0.15537697076797485,
-0.202231794595718... | |
setting do I need to change to make this work properly.? Looking at the error message, it seems to be looking in my mac for the app. But this doesn't make sense since I am trying to run it on my 4th gen iPod touch. I am using Xcode 4.3.1 and iOS 5.1
With Mountain Lion and the latest version of Xcode (4.4.4F250), none o... | [
0.3960482180118561,
0.27288469672203064,
0.6914013624191284,
-0.11833001673221588,
0.20349207520484924,
-0.13333693146705627,
0.6405037045478821,
-0.3210465908050537,
-0.2971610724925995,
-0.4588722288608551,
-0.29053717851638794,
0.7264764308929443,
-0.7135198712348938,
0.1859293729066848... | |
window, quit it)
4. Delete derived data folder `rm -fr ~/Library/Developer/Xcode/DerivedData` (console)
5. Start Xcode,connect device & run the project | [
0.23856012523174286,
-0.3024439811706543,
0.6526429057121277,
0.17788077890872955,
0.13345903158187866,
-0.22228050231933594,
0.2683769464492798,
-0.27049216628074646,
0.26073867082595825,
-0.3280865252017975,
-0.394684374332428,
0.3837488293647766,
-0.03277275711297989,
0.2935045659542084... | |
Ok, lets start with the code. I am looping through a returned array of dictionaries and creating (or updating) objects based on them. In this method I'm trying find or create a new entity. And then if the object is supposed to be deleted, I'd like to do so and not waste time updating it with the new information.
```
-... | [
0.060427598655223846,
-0.0980634093284607,
0.24468474090099335,
0.11395721137523651,
0.0037200618535280228,
0.046365294605493546,
0.2697395086288452,
-0.23025034368038177,
-0.20185093581676483,
-0.7039324641227722,
-0.16289401054382324,
0.5362403988838196,
-0.2181907296180725,
0.1736867874... | |
if ([[dictionary objectForKey:@"deleted_at"] isKindOfClass:[NSString class]]) {
if ([updateObject isNew]){
NSError *error = nil;
[objectStore.managedObjectContext save:&error];
if (error) {
NSLog(@"error saving before delete: %@",error);
return... | [
-0.611367404460907,
-0.22553154826164246,
0.1712062954902649,
-0.22978614270687103,
0.27873051166534424,
0.11568648368120193,
0.49180349707603455,
-0.09929550439119339,
0.07745064795017242,
-0.5102083683013916,
-0.3998526334762573,
0.8026543259620667,
-0.08277375251054764,
0.15242053568363... | |
}
// [objectStore.managedObjectContext deleteObject:updateObject];
// [objectStore.managedObjectCache delete:updateObject];
}
else {
[objectStore.managedObjectContext deleteObject:updateObject];
}
return;
}
[updateObject updateWith:dic... | [
-0.645058810710907,
-0.326542466878891,
0.38799917697906494,
-0.008872391656041145,
0.09768111258745193,
0.052792519330978394,
0.14818154275417328,
-0.20488189160823822,
0.2720102071762085,
-0.11217596381902695,
-0.3375527858734131,
0.8341665267944336,
-0.17867989838123322,
-0.020349536091... | |
to be aware of is the deleted\_at section with the (1) save section, (2) delete object from context, and (3) delete object from cache. I have tried a few combinations of those three but I don't get the desired results.
If I delete it from the cache (just #3):
* The objects get saved but they have no attributes.
If I... | [
-0.19260457158088684,
0.16178862750530243,
0.3857719302177429,
0.10391296446323395,
0.11117038875818253,
0.05937373265624046,
0.5251227021217346,
-0.03673839941620827,
-0.46623852849006653,
-0.7932668328285217,
-0.28784021735191345,
0.4869859516620636,
-0.18502432107925415,
0.1975710391998... | |
'NSObjectInaccessibleException', reason: 'CoreData could not fulfill a fault for '0xed27810 <x-coredata://4EE6AD5A-CC34-460A-A97A-0909454126A4/User/p166>''
```
So what is the proper way to remove a "new" object from NSMangedObjectContext?
It's easier to get the `RKManagedObjectStore` instance with `[[RKObjectManager ... | [
-0.23620115220546722,
-0.012550054118037224,
0.21927309036254883,
-0.009501458145678043,
0.06157064810395241,
-0.07655227184295654,
0.6236899495124817,
-0.32326552271842957,
-0.4032926559448242,
-0.7475185394287109,
-0.353664755821228,
0.5742258429527283,
-0.37856894731521606,
0.1188097670... | |
a reference to the object
Resource *resource = [Resource findFirstByAttribute:@"myID" withValue:[dictionary objectForKey:@"id"]];
//see if "deleted_at" exists in dictionary
if ([[dictionary objectForKey:@"deleted_at"] isKindOfClass:[NSString class]])
{
//check to see if object exists in the con... | [
-0.17671823501586914,
-0.027089912444353104,
0.23378042876720428,
0.04797667637467384,
0.27001020312309265,
-0.006020507775247097,
0.3058781921863556,
-0.019451892003417015,
0.04064072668552399,
-0.7894530296325684,
-0.2191370725631714,
0.6443624496459961,
-0.1534624993801117,
0.3387163281... | |
}
} else {
//no "deleted at", so create the object
if (!resource) {
//resource is nil (it doesn't exist in the context), so we need to create it
resource = [Resource object];
}
[resource updateWith:dictionary];
} | [
-0.3203948438167572,
-0.2439987063407898,
0.0431201308965683,
0.015771184116601944,
0.38641107082366943,
0.07163174450397491,
0.2331586331129074,
0.12541596591472626,
-0.0007538963691331446,
-0.6989572048187256,
-0.11787256598472595,
0.6144179105758667,
-0.14123135805130005,
0.288074165582... | |
NSError *error = nil;
[objectStore.managedObjectContext save:&error];
if (error) {
NSLog(@"error saving before delete: %@",error);
}
}
``` | [
-0.6139539480209351,
-0.07005438208580017,
0.049918338656425476,
-0.16414715349674225,
0.11302882432937622,
-0.007615992333739996,
0.4572289288043976,
-0.08749168366193771,
-0.1894056499004364,
-0.5321601629257202,
-0.14659860730171204,
0.6215723752975464,
-0.1559513658285141,
0.1563826948... | |
The following is a jquery code that would run when a check box is clicked... But right now I need to assign an id for the input type ,so that this function should work work only for that particular id, what could be the solution?
```
<!-- HTML PART -->
<li><input id='checkbox' type='checkbox' value='1' checked="check... | [
0.06854807585477829,
-0.3151063323020935,
0.5268300175666809,
-0.12969987094402313,
0.13815362751483917,
-0.021408749744296074,
0.3852817714214325,
-0.32628652453422546,
0.001959317596629262,
-0.5548692345619202,
-0.3178795576095581,
0.7209205031394958,
-0.5310161113739014,
-0.151888027787... | |
I have two tables in a SQLite DB, and both have the following fields:
idnumber, firstname, middlename, lastname, email, login
One table has all of these populated, the other doesn't have the idnumber, or middle name populated.
I'd LIKE to be able to do something like:
```
select idnumber, firstname, middlename, la... | [
-0.14029404520988464,
0.3028700649738312,
0.2969009280204773,
0.038635268807411194,
-0.058081623166799545,
0.15330307185649872,
-0.05527880787849426,
-0.2017340064048767,
0.016987351700663567,
-0.7077125310897827,
0.3484267294406891,
0.2525101602077484,
-0.3811628222465515,
0.2770378887653... | |
real duplicates since the second user table doesn't have all the fields populated (e.g. "20, bob, alan, smith, bob@bob.com, bob" is not the same as "NULL, bob, NULL, smith, bob@bob.com, bob").
Any ideas? What am I missing? All I want to do is dedupe based on "login".
Thanks!
As you say `union` will remove duplicate... | [
0.3355550169944763,
0.37986767292022705,
-0.07064705342054367,
0.1795734465122223,
0.3822377622127533,
0.15938419103622437,
0.24904687702655792,
0.1898277997970581,
-0.7634100317955017,
-0.703513503074646,
0.35878095030784607,
0.44295915961265564,
-0.5382319688796997,
0.5236856937408447,
... | |
only way I can think would be creating a new table [...]
That is not necessary. I think you can do the following:
```
select login, max(idnumber), max(firstname), max(middlename), max(lastname),
max(email) from (
select idnumber, firstname, middlename, lastname, email, login from users1
union
select i... | [
-0.1898553967475891,
0.06211809068918228,
0.4397670328617096,
-0.08631068468093872,
0.11578298360109329,
0.12041988223791122,
-0.14997830986976624,
-0.27292191982269287,
-0.053110282868146896,
-0.8608891367912292,
-0.1510547399520874,
0.5548989772796631,
-0.1378050595521927,
0.073914274573... | |
Suppose you declare a simple "license" table in a doctrine schema, consisting say of 3 fields, `name, licenseNumber, expirationDate`.
You can create a simple query to instantiate the collection of license objects. But what if you wanted to add a "virtual" field to it, for example,`select *, (now() > expirationDate) as... | [
0.5429205894470215,
0.053513601422309875,
0.36402031779289246,
0.23264119029045105,
0.029771102592349052,
-0.22448046505451202,
0.032076235860586166,
-0.5021108388900757,
0.028562994673848152,
-0.11891846358776093,
-0.08879032731056213,
0.5356981754302979,
0.1751604825258255,
0.39328077435... | |
or else I'm misunderstanding something.
As you say `union` will remove duplicate records (note that `union all` won't!). Two records are considered duplicates when all their column values match. In the example you considered in your question it is clear that `NULL` is not equal to `20` or `'alan'` so those records won'... | [
0.16831161081790924,
0.18626517057418823,
0.24999922513961792,
0.13058722019195557,
0.33826327323913574,
0.029833277687430382,
0.10922330617904663,
-0.07561910152435303,
-0.3695682883262634,
-0.8861308693885803,
0.02718079462647438,
0.3727971017360687,
-0.4254780411720276,
0.25700378417968... | |
union
select idnumber, firstname, middlename, lastname, email, login from users2
) final
group by login
```
However, if you're sure that you only have different values on `idnumber` and `middlename` you can max only those fields and group by all the rest. | [
0.0621456615626812,
-0.28766903281211853,
0.5557581782341003,
-0.030462410300970078,
0.16986270248889923,
-0.13257598876953125,
-0.2621311843395233,
-0.41382354497909546,
0.04997039958834648,
-0.8180398941040039,
-0.16034922003746033,
0.3317791521549225,
-0.3035343587398529,
0.424289524555... | |
I am using tiptip and there is option of create a box when a link is mouseover.
So, the only way to do this is to get a screenshot of the html (how?) and using tiptip to do the popup preview, are there any way to do it more directly?
Since there are >30 html website i need to create a preview, thank you.
Rather than... | [
0.6290221810340881,
-0.07871740311384201,
0.5761063098907471,
0.11755054444074631,
-0.4754187762737274,
-0.2173561155796051,
0.16112567484378815,
-0.30405864119529724,
-0.10824037343263626,
-0.7561682462692261,
0.5474687218666077,
0.5067594647407532,
-0.2965032160282135,
-0.200282260775566... | |
What's the best way to push new code to a production ring server without restarting the whole JVM?
Currently I use wrap-reload in production, but this doesn't quite work for me because sometimes I want to run commands in the repl (doing database migrations for example) before ring starts handling requests with the new... | [
0.49909621477127075,
0.05757615342736244,
0.2614641785621643,
-0.23487526178359985,
-0.28266260027885437,
-0.14577250182628632,
0.2213899940252304,
-0.11062277853488922,
-0.4808926582336426,
-0.15217599272727966,
-0.016666952520608902,
0.7782689929008484,
-0.00610719621181488,
0.0669317990... | |
if I could get a sanity check by someone who does. Does this technique seem reasonable?
The idea is to have a path (/admin/reload-clj) that causes all the clojure code to be reloaded.
```
(defonce ^:dynamic *jetty*)
(declare reload-clj)
(defn app [req]
...
(when (= (req :uri) "/admin/reload-clj") (reload-clj req))... | [
-0.08858736604452133,
-0.0023240777663886547,
0.6374513506889343,
-0.053803008049726486,
0.3245651423931122,
-0.20066030323505402,
0.5438719987869263,
-0.46113768219947815,
-0.2961711287498474,
-0.2542850375175476,
-0.41359052062034607,
0.7475784420967102,
-0.3687528967857361,
0.0072188726... | |
"Clojure reload success!"))
{:status 200
:headers {"Content-Type" "text/plain"}
:body "Reloading..."})
(defn -main [& args]
(start-jetty))
```
The code you have will work, though you should be aware that `:reload-all` only loads a namespace and that namespaces dependencies. It does not recursively load dependen... | [
-0.19872863590717316,
-0.07721658796072006,
0.8512041568756104,
0.11484063416719437,
0.28185340762138367,
-0.4098629355430603,
0.4925919771194458,
-0.4183659851551056,
-0.3514644205570221,
-0.3291875720024109,
-0.40213850140571594,
0.8661825656890869,
-0.2818100154399872,
-0.35831186175346... | |
then fail on restart.
Loading code can also have side effects which could screw up your production environment. Although its good style to avoid these, the only way to truly be sure something unexpected won't happen is to do a JVM restart.
The best way to do a zero-downtime deploy on the JVM is a rolling deploy using... | [
0.01579980179667473,
-0.10448427498340607,
0.16562840342521667,
0.05524570122361183,
0.20733727514743805,
-0.2500702440738678,
0.5542058944702148,
0.03753155842423439,
-0.21593643724918365,
-0.22663046419620514,
-0.3583603501319885,
0.6788949370384216,
-0.17907629907131195,
-0.124024577438... | |
I am making an application in Android, which requires sending bitmap object from one activity and displaying that bitmap object sent on the second activity page. But , I am getting a blank screen
Here is a sample of my code for sending the Bitmap object :-
```
Intent intent = new Intent(Display2.this, Display3.class... | [
0.5644738674163818,
-0.24861223995685577,
0.9284047484397888,
-0.2945541739463806,
-0.022826382890343666,
0.012350795790553093,
0.5634212493896484,
-0.5295074582099915,
0.03602141514420509,
-0.9183956980705261,
-0.22464875876903534,
0.6204281449317932,
-0.38622209429740906,
-0.216127961874... | |
// TODO Auto-generated method stub
super.onCreate(savedInstanceState);
Bitmap bitmap = (Bitmap)getIntent().getParcelableExtra("BitmapImage");
ImageView myIV = (ImageView) findViewById(R.id.imageView1);
bitmap = bitmap.createBitmap(myIV.getWidth(), myIV.getHeight(), Bitmap.Config.RGB_565)... | [
0.468607634305954,
-0.3911236524581909,
0.619519829750061,
0.06689552962779999,
0.1404414027929306,
-0.13874652981758118,
0.33430221676826477,
-0.705191433429718,
0.03500630706548691,
-0.4987613260746002,
-0.29942452907562256,
0.5033146142959595,
-0.11715181916952133,
-0.11035645753145218,... | |
NewActivity.class);
intent.putExtra("BitmapImage", bitmap);
```
and retrieve it on the other end:
```
Bitmap bitmap = (Bitmap) intent.getParcelableExtra("BitmapImage");
``` | [
0.29350873827934265,
-0.3629950284957886,
0.6349279284477234,
-0.059081997722387314,
0.3583964407444,
-0.32979995012283325,
0.32126057147979736,
-0.544234037399292,
0.05360466614365578,
-0.5740946531295776,
-0.2793179452419281,
0.5591853857040405,
-0.38305801153182983,
0.015632018446922302... | |
I need an expression for PHP preg\_replace so just replace "[" and "]" with "(" and ")" only for none PHP arrays.
Please read the question and see the sample carefully...
Thank you...
Sample:
```
// input
$foo[];
bar["name"];
// output
$foo[];
bar("name");
```
Bitmap implements Parcelable object, so you could alwa... | [
0.3091493546962738,
-0.06300967186689377,
0.5550583600997925,
-0.12300105392932892,
0.13358354568481445,
-0.0565253309905529,
0.3162056803703308,
-0.5785380601882935,
0.218515545129776,
-0.3828510046005249,
-0.17213371396064758,
0.4224778115749359,
-0.18983961641788483,
-0.1354022771120071... | |
I am working on a multinational project where target audience for logs might be from two nationalities. Therefore it is becoming important to log in more than one language , I am thinking about writing to 2 different log folders based on language every time I am logging something, but I am also wondering if there's som... | [
0.6200107932090759,
0.22143802046775818,
-0.1937539279460907,
-0.2022458016872406,
-0.049778878688812256,
-0.23515349626541138,
0.6827858686447144,
0.6345044374465942,
-0.5457692742347717,
-0.5284338593482971,
-0.09627430886030197,
0.3208804726600647,
-0.32901710271835327,
-0.2502711117267... | |
standard for technical information, and which I guess is the language you know best) and to make sure that the language you use is **clear**, **grammatically correct** and **unambiguous**. Then if one of the technicians cannot understand it, they can very easily and efficiently run it through a machine translation engi... | [
0.7381095886230469,
0.3635677695274353,
0.40498414635658264,
0.19395214319229126,
0.2700316607952118,
-0.2925809323787689,
0.1317565143108368,
0.12558439373970032,
-0.19962020218372345,
-0.4750969707965851,
-0.3662879467010498,
0.863165020942688,
0.06821190565824509,
-0.10550634562969208,
... | |
can understand. If the message isn't clear, has typos or abbreviations, then that's where machine translation fails spectacularly. | [
0.0797010064125061,
0.3374384939670563,
0.20078928768634796,
0.382357656955719,
0.059592023491859436,
-0.109977126121521,
0.6652244329452515,
0.4118298888206482,
0.0743153765797615,
-0.5819517970085144,
-0.4704904556274414,
0.5344585180282593,
-0.18381984531879425,
-0.33096957206726074,
... | |
I'm trying to write a small application and have come across a compile time error using auto\_ptr.
I originally tired creating a smart pointer with class I created but the same error occurs if I try and create a smart pointer of type int so there must be something else I'm doing wrong. I was following the example give... | [
0.5506007671356201,
0.39411649107933044,
0.08116430044174194,
-0.3250533938407898,
0.035560302436351776,
-0.13810397684574127,
0.5726013779640198,
-0.35302603244781494,
0.19488582015037537,
-0.6818996667861938,
0.2807953357696533,
0.6484376192092896,
-0.6975927352905273,
0.2785016894340515... | |
explicit MainWindow(QWidget *parent = 0);
~MainWindow();
private slots:
/*
Some QT stuff here, removed for clarity / size...
*/
private:
Ui::MainWindow *ui;
/*
Object for storage of data and calculation of DOSE index score.
*/
std::auto_ptr<int> pdoseIn(new int); // A simple s... | [
-0.15580187737941742,
-0.1186070665717125,
0.4861583113670349,
-0.1781289428472519,
-0.0015631699934601784,
0.12461976706981659,
0.24139806628227234,
-0.3991558253765106,
0.31534820795059204,
-0.6813004612922668,
-0.1474900245666504,
0.6380947232246399,
-0.45798158645629883,
-0.04203756526... | |
DOSE_Calac
{
public:
// constructor
DOSE_Calac();
// set and get functions live here, removed for clarity / size.
// function for caulating DOSE indexpoints
int CalcDOSEPoints();
private:
unsigned int dyspnoeaScale;
unsigned int fev1;
bool smoker;
unsigned int anualExacerbations;
unsigned i... | [
0.6676504611968994,
0.19640934467315674,
0.40251901745796204,
-0.26126986742019653,
-0.09801638126373291,
0.025326086208224297,
0.24664469063282013,
-0.7337164282798767,
0.45783111453056335,
-0.6122434139251709,
-0.021378032863140106,
0.6793048977851868,
-0.638418436050415,
0.1964775919914... | |
declare it and initialize in the constructor:
```
std::auto_ptr<int> pdoseIn;
MainWindow()
: pdoseIn(new int)
{}
``` | [
-0.3151181936264038,
-0.13735033571720123,
0.315346360206604,
-0.5079370737075806,
0.22289885580539703,
-0.0014334035804495215,
0.13769273459911346,
0.08426877111196518,
0.28582271933555603,
-0.45236828923225403,
-0.5890236496925354,
0.42792612314224243,
-0.33754411339759827,
0.02664601244... | |
I have to take 2 values from DateTimePicker and then compare their values with that in database.
Code:
```
string dt_start = dateTimePicker1.Value.ToShortDateString();
string dt_end = dateTimePicker2.Value.ToShortDateString();
string mySelectQuery = "Select * from " + out_table + " WHERE [Date] Between " + dt_start +... | [
-0.14963430166244507,
0.06297437101602554,
0.6032938957214355,
-0.09563183039426804,
0.418854683637619,
-0.11733926087617874,
0.22910161316394806,
-0.1802113950252533,
0.027397651225328445,
-0.6010499000549316,
-0.010949338786303997,
0.5366140007972717,
-0.08394433557987213,
0.343825459480... | |
I want to write some test cases for my web app, but stuck at some cases such as "This token should be expired in 30 days". Nobody likes to wait for 30 days before the tests finish.
There are also other cases regarding some scheduled events to happen, like "Send this email 2 weeks after the user sign up", "Generate a b... | [
0.7596344351768494,
0.18557870388031006,
0.029306938871741295,
0.12266521155834198,
0.06712830066680908,
-0.19674591720104218,
0.26340073347091675,
-0.11431087553501129,
0.05102397873997688,
-0.5900090932846069,
0.47229716181755066,
0.2776966691017151,
0.06192521005868912,
-0.0497416630387... | |
define the expiration in milliseconds. That way you can easily write tests because your test environments can define an expiration of 1 ms. The production environment will obviously define the appropriate duration. Typically these can be set as config values or db values. | [
0.5687795877456665,
-0.28223833441734314,
0.49103808403015137,
-0.11583516746759415,
0.13100218772888184,
-0.15062788128852844,
0.34030842781066895,
-0.21275553107261658,
0.07555331289768219,
-0.3131098449230194,
-0.21291688084602356,
-0.016155511140823364,
-0.041580602526664734,
0.1370786... | |
i want to redirect all the old url to my new url
My main reason behind this is admin will enter an address like this one
<http://mysite.com/oil--gas/corrosion-management-summit-in-oil-and-gas!e29> on my site and i want to get this unknow address and redirect this address to specific file and get the url and search it... | [
0.16681696474552155,
0.3641991913318634,
0.3903341591358185,
0.04822635278105736,
-0.09806450456380844,
-0.3491692543029785,
0.007229343522340059,
-0.10657212883234024,
-0.20312295854091644,
-0.5222488641738892,
-0.010546790435910225,
0.6660335063934326,
-0.1853387951850891,
0.561754286289... | |
you can use the function GetElementsByTagName() to create an XmlNodeList that can be accessed similar to an array.
<http://msdn.microsoft.com/en-us/library/dc0c9ekk.aspx>
```
//Create the XmlDocument.
XmlDocument doc = new XmlDocument();
doc.Load("books.xml");
//Display all the book titles.
XmlNodeList elemList = do... | [
0.15880735218524933,
0.00829019770026207,
0.9468045830726624,
0.16117289662361145,
0.06168483942747116,
-0.14889143407344818,
-0.16497966647148132,
-0.5308094024658203,
-0.20916907489299774,
-0.7531302571296692,
-0.5454215407371521,
0.3817145824432373,
-0.31478288769721985,
0.2540583312511... | |
Is there any way to save an array of JSON object to a mongodb with only **one** call?
something like:
```
schemeObject.save(array_of_json_object, callback);
```
I'm using `mongoosejs`
I do not think its possible with mongooosejs. You can however use BATCH insert of mongodb ,which is supported natively.
Helpful link... | [
0.28510263562202454,
-0.21061432361602783,
-0.036917150020599365,
-0.1350656896829605,
-0.0552607998251915,
0.013169483281672001,
-0.06072413548827171,
0.1444922238588333,
-0.559757649898529,
-0.4835483133792877,
0.021686751395463943,
0.7555640339851379,
-0.44943347573280334,
-0.2298677414... | |
kan anyone tell me if/how its possible to predefine some default values when creating a product.
Like: default taxclass, product is "visible" and "in stock".
I hope someone can help me.
Ik have magento 1.6.2 CE
Probably via config files.
Try, in app/etc/local.xml (or in any config.xml in local/your\_package/one\_of... | [
0.05362304300069809,
-0.03126584738492966,
0.11284228414297104,
0.09660542011260986,
-0.1102200299501419,
0.10357271134853363,
-0.3213975727558136,
-0.07600237429141998,
0.03203224763274193,
-0.46168750524520874,
0.01556739304214716,
0.29340603947639465,
0.16493619978427887,
-0.18048998713... | |
change default values. | [
0.1130165383219719,
0.020314117893576622,
-0.16590788960456848,
0.2559085786342621,
-0.10019491612911224,
-0.12875866889953613,
0.15189534425735474,
0.2356041818857193,
0.06511877477169037,
-0.7378451228141785,
-0.6878668069839478,
0.5694036483764648,
-0.5333024859428406,
0.039724007248878... | |
Usually I'm good with this type of thing, but this is bugging me. I had to write this function last week, and writing it recursively made the most sense, although now I'm trying to find a way to make it iterative to incorporate it into another function I'm writing. This is the recursive version of the function,
```
de... | [
0.023396624252200127,
0.27414271235466003,
0.3945917785167694,
-0.30761054158210754,
-0.09297135472297668,
0.13943910598754883,
0.2694832384586334,
-0.23589785397052765,
-0.0025357073172926903,
-0.4273274838924408,
-0.15621010959148407,
0.6674768924713135,
-0.4894850254058838,
0.0955998450... | |
None], 'B': [('BF', 0.5), None, None], 'E': [('ADBFGCE', 17.0), None, None], 'D': [('AD', 4.0), None, None], 'G': [('BFG', 6.25), None, None], 'F': [('BF', 0.5), None, None], 'ADBFG': [('ADBFGC', 6.25), ('AD', 4.25), ('BFG', 2.0)], 'BF': [('BFG', 5.75), ('B', 0.5), ('F', 0.5)], 'ADBFGC': [('ADBFGCE', 2.5), ('ADBFG', 6.... | [
-0.14436152577400208,
0.3162343502044678,
0.5216269493103027,
-0.1427169293165207,
0.08101710677146912,
0.7612408995628357,
0.19370074570178986,
-0.22076332569122314,
-0.12177115678787231,
-0.7129800319671631,
-0.6396470069885254,
0.5847655534744263,
-0.572921097278595,
0.01875254698097706... | |
<is_in_stock>1</is_in_stock>
</item_options>
</cataloginventory>
</default>
```
Not sure about tax\_class\_id and visibility, but you may try & go with config.xml as well in order to set or change default values. | [
0.32240456342697144,
0.00923842191696167,
-0.03716016560792923,
0.10276325047016144,
0.07265103608369827,
-0.2701825499534607,
-0.5116989612579346,
-0.19657407701015472,
-0.11391620337963104,
-0.33854952454566956,
-0.08169762790203094,
0.44577646255493164,
-0.0015400982229039073,
-0.158591... | |
I have a simple application which basically consists of a line of buttons and a ListView of items to be selected and manipulated. There might be only one item in the list or a few. However, I would prefer if the list would populate from the bottom of the ListView, since the way most people hold their phones makes it ea... | [
0.5670784115791321,
-0.0700858011841774,
0.7585217952728271,
0.03484049066901207,
0.17969539761543274,
0.027264129370450974,
-0.1516856998205185,
-0.2559361755847931,
-0.30358365178108215,
-0.6365073919296265,
0.09873159229755402,
0.8445464372634888,
-0.21077872812747955,
-0.14550451934337... | |
@The Berga answer to otherwise this won't work. | [
0.4983808696269989,
0.2086423635482788,
0.17769485712051392,
0.0000610706556471996,
-0.24918794631958008,
0.20304183661937714,
0.6137081980705261,
-0.1020081639289856,
0.04284556210041046,
-0.39639225602149963,
0.023789502680301666,
0.8325175046920776,
-0.11601819843053818,
-0.053163167089... | |
I have been learning Python2.7 for a little bit now. I'm using Windows 7 64 bit BTW. I started learning GUI's and have been trying to use wxpython and IDLE for this. So I type out some code:
```
import wx
app = wx.App()
win = wx.Frame(None)
win.Show()
app.MainLoop()
```
I run the program, and the window pops up, but... | [
0.048433512449264526,
0.34413209557533264,
0.25926846265792847,
-0.1681230515241623,
0.21182972192764282,
0.4463742971420288,
0.4444248676300049,
0.2231229990720749,
-0.5396115779876709,
-0.6285616159439087,
-0.24807463586330414,
0.47908738255500793,
-0.5320066213607788,
-0.025748986750841... | |
get
self.not_empty.wait(remaining)
File "C:\Python27\lib\threading.py", line 263, in wait
_sleep(delay)
typeError: 'int' object is not callable
```
What is wrong and how do I fix it?
Thanks.
The crash is most likely happening at the point when you try and start the event loop. See this bug report: <http://bugs.pytho... | [
0.262802392244339,
-0.10251814126968384,
0.15038342773914337,
-0.24672380089759827,
0.07330738008022308,
-0.11370830237865448,
0.37292781472206116,
-0.03131420537829399,
-0.43184202909469604,
-0.6024420261383057,
0.06957616657018661,
0.7328283190727234,
-0.48775362968444824,
-0.04568216204... | |
the ones from GUI toolkits. | [
-0.1051819920539856,
-0.14145463705062866,
-0.013098693452775478,
0.4240632951259613,
-0.11924237012863159,
0.07803098112344742,
-0.4364110827445984,
-0.08926614373922348,
-0.12033502757549286,
-0.3735009729862213,
-0.24924880266189575,
0.8380661606788635,
-0.04109667241573334,
-0.20761792... | |
I am working on a section of a project that uses large number of sum methods. These sum methods are applied on a Datatable
To test the best method, I use the following
**Datatable structure**
```
class LogParser
{
public DataTable PGLStat_Table = new DataTable();
public LogParser()
{
PGLStat_... | [
0.05039437487721443,
0.04909028485417366,
0.6676803827285767,
-0.04414333030581474,
0.012166084721684456,
-0.0649944469332695,
0.2633104920387268,
-0.4151913821697235,
-0.28501856327056885,
-0.44512927532196045,
-0.27901434898376465,
0.4688984155654907,
-0.18916746973991394,
0.165730401873... | |
PGLStat_Table.Columns.Add("cper", typeof(decimal));
PGLStat_Table.Columns.Add("dper", typeof(decimal));
PGLStat_Table.Columns.Add("occurancedata", typeof(string));
}
}
```
**Following method is used to Fill the table**
```
LogParser pglp = new LogParser();
Random r2 = new Random();
fo... | [
-0.41505229473114014,
-0.2655763328075409,
0.9401208162307739,
-0.0828058049082756,
0.041784804314374924,
0.44175976514816284,
0.051431797444820404,
-0.4342174232006073,
-0.686162531375885,
-0.18573173880577087,
-0.31469932198524475,
0.262433797121048,
-0.43433353304862976,
0.1876935958862... | |
Methods used to calculate Sum
**Method 1 using Compute**
```
Stopwatch s2 = new Stopwatch();
s2.Start();
object sumObject;
sumObject = pglp.PGLStat_Table.Compute("Sum(count)", " ");
s2.Stop();
long d1 = s2.ElapsedMilliseconds;
```
**Method 2 using Foreach loop**
```
s2.Restart();
int totalcount = 0;
foreach (DataR... | [
-0.205356165766716,
-0.3566347360610962,
0.8865448832511902,
-0.18357814848423004,
-0.07857545465230942,
0.43583473563194275,
0.44152870774269104,
-0.8332754969596863,
-0.5755607485771179,
-0.34180450439453125,
0.03928976133465767,
0.49958187341690063,
-0.09643077850341797,
0.1754995286464... | |
");
```
The Linq statement produces an error
> Arithmetic operation resulted in an overflow.
Whereas the Compute and Foreach loop are still able to complete the computation although maybe incorrect.
Is such a behaviour cause of concern or am I missing a directive ?
(also the figures computed are large)
***Query... | [
-0.3593161702156067,
-0.221763476729393,
0.8034284710884094,
0.022120581939816475,
-0.05571294575929642,
0.031650468707084656,
0.12436740845441818,
-0.4507824182510376,
-0.5128539204597473,
-0.1749938577413559,
-0.10224606841802597,
0.4859732389450073,
-0.40077975392341614,
-0.222689241170... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.