text stringlengths 0 30.5k | title stringclasses 1
value | embeddings listlengths 768 768 |
|---|---|---|
I found the following htacess that allows concatenation from within specific js files
```
<FilesMatch "\.combined\.js$">
Options +Includes
AddOutputFilterByType INCLUDES application/javascript application/json
SetOutputFilter INCLUDES
</FilesMatch>
```
e.g. Inside of script.combined.js you could have
```
< !... | [
0.2866276800632477,
0.056597743183374405,
0.3137151598930359,
-0.25161126255989075,
-0.19328175485134125,
-0.03339610993862152,
0.09922250360250473,
-0.2798578143119812,
0.02805935963988304,
-0.7767035365104675,
-0.14573697745800018,
0.26213398575782776,
-0.3170546889305115,
-0.03784593939... | |
and `application/json`
The second line `SetOutputFilter INCLUDES` processes the files for includes before outputing them but only for the files contained in the regex path `"\.combined\.js$"` and basically does what the first is doing but it's a backup.
Your missing a crucial `Option` flag. And that's `Options +Inclu... | [
0.33321914076805115,
-0.12246212363243103,
0.09689263254404068,
-0.02012632228434086,
-0.03142709285020828,
-0.23570139706134796,
0.2040255218744278,
-0.28605249524116516,
-0.28608807921409607,
-0.5770024061203003,
-0.3001601994037628,
0.4882761240005493,
-0.4705755114555359,
-0.2763088345... | |
file="libs/jquery-1.5.0.min.js" -->
<!--#include file="plugins/jquery.idletimer.js" -->
```
You will also need to enable `mod_include` module in your Apache httpd.conf. <http://httpd.apache.org/docs/2.2/mod/mod_include.html>
`LoadModule include_module modules/mod_include.so`
I'm pretty sure you got this code from t... | [
0.35771670937538147,
0.012558153830468655,
0.2577936351299286,
-0.19478127360343933,
0.1516663283109665,
-0.25958457589149475,
0.5455272197723389,
-0.7441291213035583,
-0.4034055769443512,
-0.4361710250377655,
-0.43221521377563477,
0.6923786997795105,
-0.5185222029685974,
-0.20428572595119... | |
I'm working on building a RESTful web service. I have read up on the principles of using HTTP for every mechanism as far as it will take you, and most of the time, like when fetching resources, it works pretty well.
But when I need to POST a new entry of some sort, in the interest of clarity and robustness, no matter ... | [
0.44698747992515564,
0.31505802273750305,
0.4379442632198334,
0.011173184029757977,
0.044900570064783096,
-0.1446315050125122,
0.31528031826019287,
0.37451833486557007,
-0.01801195554435253,
-0.5891052484512329,
0.2262764424085617,
0.3589532673358917,
0.03114095889031887,
0.012897108681499... | |
a nickname or an email address may be taken. Simply returning `409 Conflict` doesn't finely enough detail which of the nickname or the email address was taken.
So getting around this isn't rocket science: document a bunch of specific error codes and return an object with errors:
```
{ errors: [4, 8, 42] }
```
This ... | [
-0.011191041208803654,
0.20439940690994263,
-0.03571489453315735,
0.22520041465759277,
-0.03939301148056984,
0.10875681042671204,
0.4215063154697418,
-0.13726569712162018,
-0.1577376425266266,
-0.4971546232700348,
-0.14088571071624756,
0.5944533944129944,
0.004574496299028397,
0.0407770574... | |
be providing a well-behaved RESTful web service if I standardized an envelope to use for every request, such that, for example, there's always an object like `{ errors, isSuccessful, content }`?
I have previously built RPC-style web services that used this, but I don't want to make something that's "almost REST". If ... | [
0.37863779067993164,
0.10326746106147766,
0.37690210342407227,
-0.08647867292165756,
0.13827498257160187,
-0.32927072048187256,
0.3310290575027466,
0.07111650705337524,
-0.007862944155931473,
-0.5669273138046265,
-0.15679588913917542,
0.48258137702941895,
-0.08510104566812515,
-0.198231145... | |
this sort of problem solving might be, because most guides I've found have only detailed the simple cases.
HTTP *is* your envelope. You're doing the right thing by returning a 4\*\* error code.
Having said that, there is nothing wrong with having a descriptive body on a response – in fact **in the [HTTP RFC](http://ww... | [
0.018020452931523323,
0.1185619905591011,
0.5083075761795044,
0.20570382475852966,
-0.37525618076324463,
-0.05520063638687134,
0.47615864872932434,
-0.350542277097702,
-0.24476607143878937,
-0.6185551285743713,
-0.06351155042648315,
0.2994302213191986,
-0.11216927319765091,
-0.163313582539... | |
for the refusal in the entity.**
So you're okay to continue to use the body of a response for a more detailed description of the error(s). If you're unsure of the specific HTTP error response to use (e.g. multiple errors), and you *know* that the user should not repeat the request as they just did it, I usually fall b... | [
0.5648365020751953,
0.09044800698757172,
0.2730136215686798,
0.20811276137828827,
-0.15255482494831085,
0.14306330680847168,
0.4656253457069397,
-0.13751403987407684,
-0.18579906225204468,
-0.45929697155952454,
-0.029258698225021362,
0.6198884844779968,
-0.02592027746140957,
-0.19135779142... | |
When using the YUI3 Autocomplete widget with a URL source which returns JSON data, is there a simple way to detect HTTP error responses?
Example:
```
Y.one('#ac-input').plug(Y.Plugin.AutoComplete, {
resultHighlighter : 'phraseMatch',
source : "http://example.com/api/item/search/?q={query}",
});
```
(For ex... | [
-0.040206365287303925,
-0.02694406919181347,
0.24293303489685059,
0.09506063908338547,
-0.2416767030954361,
0.08945616334676743,
0.3157200217247009,
0.01970658078789711,
0.15762342512607574,
-0.34320393204689026,
-0.2615049481391907,
0.8435221314430237,
-0.31413549184799194,
-0.17294965684... | |
is there a simpler way to pass an error event handler to the YUI3 Autocomplete widget for this type of data source?
**Edit**: See [my follow-up answer](https://stackoverflow.com/a/10407850/1309774) for a simple solution using `Y.on('io:failure')`.
HTTP *is* your envelope. You're doing the right thing by returning a 4\... | [
-0.001336079789325595,
-0.05111927166581154,
0.24528299272060394,
0.37655356526374817,
-0.45993974804878235,
0.07120126485824585,
0.4349512755870819,
-0.2752927243709564,
-0.17949475347995758,
-0.5299403071403503,
-0.018353240564465523,
0.43776339292526245,
-0.24583406746387482,
-0.2268846... | |
make public why the request has not been fulfilled, it **SHOULD describe the reason for the refusal in the entity.**
So you're okay to continue to use the body of a response for a more detailed description of the error(s). If you're unsure of the specific HTTP error response to use (e.g. multiple errors), and you *kno... | [
0.6168057918548584,
0.07229487597942352,
0.3649970591068268,
0.18586118519306183,
-0.0981757789850235,
-0.20802193880081177,
0.4811992347240448,
0.018020695075392723,
-0.1242307648062706,
-0.3682880103588104,
-0.1525285243988037,
0.6130560040473938,
0.12909743189811707,
-0.1589397937059402... | |
I have something like this:
```
struct D {
virtual void operator() {...};
}
struct D1 : public D {
virtual void operator() {...};
}
struct D2 : public D {
virtual void operator() {...};
}
void foo(D &d) {...};
```
And so this is fine, and nicely controls the life cycle of my D's:
```
foo(D());
foo(D1()... | [
0.5042291283607483,
-0.09180945158004761,
0.3643186390399933,
-0.3613719940185547,
-0.11138916015625,
0.3413516879081726,
0.3935109078884125,
-0.1982562243938446,
-0.24580739438533783,
-0.545458972454071,
-0.19507761299610138,
0.4860745370388031,
-0.40753859281539917,
0.5654726624488831,
... | |
reference to a temporary, I could return an object, but then I slice to the base class. Alternatively, I could return a pointer from my factory, but then the client has to delete it. Other, more complicated, solutions also impose more load on the client.
Is there a way to write something like
```
D& d = make_D();
foo... | [
0.020136717706918716,
0.18324287235736847,
0.5018036961555481,
-0.05819522589445114,
0.18084047734737396,
0.28959107398986816,
0.15515145659446716,
0.06590010970830917,
-0.17506460845470428,
-0.7215678691864014,
-0.10343372821807861,
0.3496171832084656,
-0.36350753903388977,
0.389523357152... | |
downside of using a pointer is letting the user manage its memory.
If you return a smart pointer, this is no longer an issue.
```
const SmartPtr<D> make_D()
{
if(is_tuesday())
return SmartPtr(new D1());
return SmartPtr(new D2());
}
``` | [
0.17866556346416473,
-0.3930998146533966,
0.31960824131965637,
-0.015960827469825745,
0.23745490610599518,
-0.032798971980810165,
0.2091296762228012,
-0.11531154811382294,
-0.40415826439857483,
-0.5930115580558777,
-0.221424400806427,
0.45883455872535706,
-0.3191497325897217,
0.07216548919... | |
I wanted to be able to set the `keyEquivalent` of an `NSMenuItem` based on an `NSString`, e.g. : `CMD`+`R`, `ALT`+`SHIFT`+`D`, etc
For this, I created a method in an `NSString` category as following (debugging `NSLog`s included) :
```
- (NSDictionary*)toKeyEquivalent
{
NSMutableDictionary* result = [NSMutableDict... | [
-0.27682673931121826,
-0.1058182418346405,
0.4230194091796875,
-0.29475709795951843,
0.03132905438542366,
0.18201150000095367,
0.35292553901672363,
-0.5463986992835999,
-0.11041203886270523,
-0.2767236530780792,
-0.2438293844461441,
0.6288487911224365,
-0.24081507325172424,
0.1223933622241... | |
[result setValue:[parts lastObject] forKey:@"key"];
int mask = 0;
for (NSString* p in parts)
{
if ([p isEqualToString:@"CMD"])
{
NSLog(@"cmd");
mask |= NSCommandKeyMask; | [
-0.690058171749115,
-0.5403075218200684,
0.5201544761657715,
-0.26967912912368774,
0.0652603954076767,
0.3447911739349365,
0.31849148869514465,
-0.40382933616638184,
-0.07671407610177994,
-0.3485029935836792,
-0.41837868094444275,
0.47472235560417175,
0.027363356202840805,
-0.0273214336484... | |
}
else if ([p isEqualToString:@"SHIFT"])
{
NSLog(@"shift");
mask |= NSShiftKeyMask;
}
else if ([p isEqualToString:@"CTRL"]) | [
-0.5728586912155151,
-0.5332995653152466,
0.3140755295753479,
-0.2168692797422409,
0.25960054993629456,
0.16282568871974945,
0.332183301448822,
-0.28090617060661316,
-0.1988789290189743,
-0.4057420790195465,
-0.20623727142810822,
0.8456366062164307,
-0.3406921327114105,
-0.2418106943368911... | |
{
NSLog(@"ctrl");
mask |= NSControlKeyMask;
}
else if ([p isEqualToString:@"ALT"])
{
NSLog(@"alt"); | [
-0.6299957036972046,
-0.4870625138282776,
0.4418676793575287,
-0.2732169032096863,
0.04502832144498825,
0.1966829150915146,
0.4628796875476837,
-0.13323993980884552,
-0.22993844747543335,
-0.5881843566894531,
-0.2332681566476822,
0.7276478409767151,
-0.20300009846687317,
-0.027149062603712... | |
mask = NSAlternateKeyMask;
}
}
[result setValue:[NSNumber numberWithInt:mask] forKey:@"mask"];
return result;
}
}
```
Now, I'm testing that using `CMD`+`R`.
The NSLog output is :
> 2012-04-03 10:36:19.051 App[4654:903] parts :(
> CMD,
> R )
>
>
> 2012-04-03 10:36:19.05... | [
-0.3617047965526581,
-0.37881606817245483,
0.5244970917701721,
-0.26822617650032043,
-0.01474912092089653,
0.11721457540988922,
0.7928972244262695,
-0.6686670184135437,
-0.11069332808256149,
-0.5172685980796814,
-0.21884110569953918,
0.5323535203933716,
-0.0752110704779625,
-0.394051581621... | |
1048576; } - for Run
Which looks good; `mask=1048576` means `1<<20` which is equal to `NSCommandKeyMask`.
In other words, it SEEMS as if the Key Equivalent (`Command`-`R`) has been correctly interpreted.
**The weird thing, though, is that when the menu item finally appears, the Key Equivalent appearing next to is "`... | [
-0.11304393410682678,
-0.06853488832712173,
0.49003759026527405,
-0.30486950278282166,
0.12973198294639587,
-0.08969961851835251,
0.3235328495502472,
0.09158115833997726,
-0.22475233674049377,
-0.5580878853797913,
-0.5273311138153076,
0.8194093704223633,
-0.12377485632896423,
-0.1033113747... | |
im using the Fluent NHibernate together with the automapping functionality!
I'm currently using the follwing mapping statement to prevent autogenerated column values to be updated / insert
```
.Override<Entity>(map => map.Map(d => d.STATUS).Not.Insert().Not.Update())
```
It works fine so far, but now im looking for... | [
-0.3651838004589081,
0.14915330708026886,
0.549149751663208,
-0.27136746048927307,
-0.17529481649398804,
-0.07916586101055145,
0.4152854382991791,
0.011323346756398678,
0.11841162294149399,
-0.6332805156707764,
0.04523726925253868,
1.0975769758224487,
-0.5108582973480225,
0.102247923612594... | |
to Not.Insert().Not.Update()
```
Is there a way to get this?
Thanks
**Daniel**
I can't believe I have done this. ASP Classic IS my first web programming love so I had to :)
```
<%
URL="http://www.rzammit.com/pages/linux-form.asp?adv=101&loc=349&websync=ert4545445&put=4563"
Response.write ("adv = " + GetVarValue(... | [
0.047677841037511826,
-0.07067825645208359,
0.5588387250900269,
-0.03491302579641342,
0.08751901239156723,
-0.06350052356719971,
0.6553344130516052,
-0.43202829360961914,
-0.08493642508983612,
-0.5874215364456177,
-0.4908881187438965,
0.8899663686752319,
-0.3081952929496765,
-0.07452047616... | |
end if
pos1 = pos1 + len(varName) + 1
pos2=instr(mid(source,pos1), "&")-1
'to check if it was the last variable
if pos2=-1 then
str1 = mid(source, pos1)
else
str1 = mid(source, pos1, pos2)
end if
GetVarValue=str1
End Function
%>
```
With this function in your page you can ... | [
-0.181121826171875,
-0.14733676612377167,
0.9477960467338562,
-0.24128824472427368,
0.0073495651595294476,
-0.18305204808712006,
0.5460182428359985,
-0.15952719748020172,
-0.031243393197655678,
-0.4656798243522644,
-0.32427284121513367,
0.6024578213691711,
0.04230847582221031,
0.4151203334... | |
to my StackOverflow Repo :) ) | [
-0.04828784614801407,
0.035744618624448776,
0.5559648275375366,
0.03496240824460983,
0.18194462358951569,
0.1381119191646576,
-0.07376964390277863,
0.12450554966926575,
-0.3013409376144409,
-0.3208214044570923,
-0.25817567110061646,
0.43023067712783813,
-0.09125539660453796,
0.043140809983... | |
In an academic project I'm trying to setup a simple physics engine.
I am using Eigen library for vector/matrixes calculation.
I'd like to stay as much independent as I can from library/design choices I'm making, to ease future changes, so I'm using typedefs for the Eigen types.
File PhysicsEngine.h
```
#pragma once
... | [
-0.09142474830150604,
-0.10913511365652084,
0.4898918569087982,
0.14871743321418762,
-0.2858732044696808,
0.15678222477436066,
-0.06282396614551544,
-0.5677611827850342,
-0.18509837985038757,
-0.4433395564556122,
0.0855221152305603,
0.5613835453987122,
-0.3934025168418884,
0.27286350727081... | |
teacher told us?
Including the file above, in RigidBody.h, and trying to use those typedefs:
```
#pragma once
#include "PhysicsEngine.h"
namespace PhysicsEngine
{
class RigidBody
{
public:
vector3 position; // <- error C4430
real inverseMass; // <- error C4430
vec... | [
0.08645510673522949,
-0.41754183173179626,
0.4467218518257141,
0.2809177339076996,
-0.043673187494277954,
0.38784104585647583,
0.2848575711250305,
-0.19739115238189697,
-0.305087149143219,
-0.1918567419052124,
0.287217378616333,
0.378593385219574,
-0.3051135540008545,
0.15021850168704987,
... | |
vector3 netForce; // <- error C4430
quaternion orientation; // <- error C4430
matrix3 inverseInertiaTensor; // <- error C4430
vector3 rotation; // <- error C4430
vector3 netTorque; // <- error C4430
matrix4 transformationMatrix; | [
-0.4537320137023926,
-0.43817949295043945,
0.6444374918937683,
-0.18487884104251862,
-0.7839400172233582,
0.7159320116043091,
-0.1626042276620865,
-0.41063541173934937,
-0.3199222683906555,
-0.6464399099349976,
0.16835997998714447,
0.5439431071281433,
-0.483599990606308,
-0.062408518046140... | |
// <- error C4430
...
```
I get:
> error C4430: missing type specifier - int assumed. Note: C++ does not support default-int.
2) What am I doing wrong here?
Thanks in advance.
Defining a profile in a parent and then activating it from a child or from another profile is not supported by either Maven 2 or 3, cur... | [
0.23106373846530914,
-0.045581795275211334,
0.08754270523786545,
0.11653293669223785,
0.06015780195593834,
-0.21323294937610626,
0.5112348198890686,
-0.13505949079990387,
-0.19451981782913208,
-0.812594473361969,
-0.17757068574428558,
0.3964068591594696,
-0.09487702697515488,
0.19112010300... | |
other is to explicitly duplicate the config in each child module requiring it.
[1]: [Activate different Maven profiles depending on current module?](https://stackoverflow.com/questions/1018720/activate-different-maven-profiles-depending-on-current-module) ; [Why can't I activate a Maven2 profile from another profile?]... | [
0.1632814258337021,
-0.3159797191619873,
0.09632933884859085,
-0.10328905284404755,
0.3316769599914551,
0.11545055359601974,
0.330557644367218,
-0.3971560299396515,
-0.15616188943386078,
-0.5439722537994385,
-0.46014833450317383,
0.5978046655654907,
-0.16703316569328308,
-0.151703760027885... | |
[Here is a fiddle](http://jsfiddle.net/surfjam/bJU5c/2/) I made for an example. I can't for the life of me figure out what I'm missing. My intention is for the class of .tss-content to sit between #wrap-a and #tss on the z axis.
In other words, trying to get the white layer positioned between the grey and the blue lay... | [
0.3792351484298706,
-0.1648803949356079,
0.32709571719169617,
-0.18347784876823425,
-0.11270076781511307,
0.12239541113376617,
0.11728028208017349,
-0.05165279284119606,
-0.3854677677154541,
-0.6312553286552429,
0.2506549656391144,
0.10244189202785492,
0.21019041538238525,
0.33801558613777... | |
stackoverflow questions and answers [1] covering the details. There are related feature requests in Maven's issue tracker:
* <https://issues.apache.org/jira/browse/MNG-3309>
* <https://issues.apache.org/jira/browse/MNG-4565>
* <https://issues.apache.org/jira/browse/MNG-5127>
@Raghuram's suggestion to use `<pluginMana... | [
-0.07700155675411224,
-0.2230682522058487,
0.1644633710384369,
-0.037339430302381516,
0.001103472663089633,
-0.01731717772781849,
0.04420488700270653,
-0.6079189777374268,
-0.398857444524765,
-0.43824443221092224,
-0.37795811891555786,
0.41324493288993835,
-0.09105600416660309,
-0.13795489... | |
I am adding uiimageview as a subview to tabbarcontroller.view. when i pushed to other viewcontroller tabbar gets hided but the image added to the tabbarcontroller is appearing.
Please help me to remove the imageviewwhile pushing to other viewcontroller.
```
imgV=[[UIImageView alloc]initWithFrame:CGRectMake(0,... | [
-0.20977386832237244,
-0.13802994787693024,
1.1100242137908936,
0.01887422800064087,
-0.3386719226837158,
0.18945184350013733,
0.49928462505340576,
-0.3953488767147064,
-0.11252070218324661,
-1.0546690225601196,
-0.3350648880004883,
0.5258815884590149,
-0.25084346532821655,
0.4172684848308... | |
in[self.view subviews])
{
[view removeFromSuperview];
}
Login_iPhone *controller=[[Login_iPhone alloc]init];
[controller setHidesBottomBarWhenPushed:YES];
[acctExec_iPhone.imgV removeFromSuperview];
acctExec_iPhone.imgV.hidden=YES;
[self.navigationController pushViewController:controller animated:YES];
[contro... | [
-0.15037965774536133,
-0.0825420692563057,
0.8076989054679871,
0.01488384511321783,
-0.039830055087804794,
0.212783545255661,
0.28921744227409363,
-0.4935475289821625,
-0.45069706439971924,
-0.6082777976989746,
-0.20663003623485565,
0.512994110584259,
-0.24725164473056793,
-0.0722115561366... | |
i am working with JSON to send data to and from my server , but normally i work with sending one data at a time , now i want to :
retrieve all the rows from a table (mysql database) --> php put it in a JSON array + callback ---> javascript retrives it and display it out by looping through the data.
Here's my javasc... | [
0.05381697788834572,
0.06488984823226929,
0.4661640226840973,
-0.15922671556472778,
-0.2574200928211212,
-0.022843046113848686,
0.02222543954849243,
-0.052493248134851456,
-0.28636109828948975,
-0.780538022518158,
0.1335870772600174,
0.35645273327827454,
-0.3835829496383667,
0.020102104172... | |
part im not sure what to use to produce a JSONP array.
```
<?php
//connects to database
include 'connect.php';
$tbname = mysql_real_escape_string($_GET['table']);
$callback = $_GET['callback'];
//some mysql commands
//after mysql commands
//i would use this to output data but this is only for one line of data.
... | [
-0.3741013705730438,
-0.06581110507249832,
0.7586085200309753,
-0.17518197000026703,
-0.23664957284927368,
0.43032458424568176,
0.20296956598758698,
-0.6465499401092529,
-0.15802477300167084,
-0.3033793568611145,
-0.01740741916000843,
0.39959055185317993,
-0.38662004470825195,
0.0883285179... | |
array.
And how would i display it out using javascript(jquery)?
Is it using the `for` function in javascript
Print out the JSON array in PHP:
```
$query = mysql_query("SELECT * FROM ".$tbname."");
$rows = array();
while($r = mysql_fetch_assoc($query)) {
$rows[] = $r;
}
print json_encode($rows);
```
Catch and l... | [
0.24738024175167084,
-0.11598663777112961,
0.7537055611610413,
-0.22481398284435272,
-0.15527169406414032,
0.07008543610572815,
0.022753190249204636,
-0.49830183386802673,
-0.29106375575065613,
-0.4354702830314636,
-0.07517657428979874,
0.3865145742893219,
-0.4194266200065613,
0.0529519692... | |
});
});
});
```
First each loop goes over your rows/objects; second loop goes over your attributes/columns. | [
-0.03507803753018379,
0.03670310974121094,
0.4261169135570526,
-0.09994015097618103,
0.0986015647649765,
0.21792756021022797,
0.18861740827560425,
-0.32075825333595276,
-0.1337922364473343,
-0.5534307956695557,
-0.2701936662197113,
0.3872150182723999,
-0.4779496490955353,
0.149020418524742... | |
I am making an application which will have an interface similar to Photoshop: multiple separate forms all help edit an object. So, i'll have multiple forms, one of which is "main" (provides file menu, settings menu, about etc) and others have controls that edit the object opened in main form.
Lets say for simplicity ... | [
0.5298097133636475,
0.28774493932724,
0.8048421144485474,
-0.28549855947494507,
-0.19609354436397552,
0.005581983365118504,
0.06304202228784561,
-0.1713642179965973,
-0.07687725126743317,
-0.6531969904899597,
0.017244134098291397,
0.5067832469940186,
-0.439286470413208,
0.12493879348039627... | |
other application, then focus my application, only MainForm will get on top of other windows, StyleForm will remain hidden under the window of the application i focused previously.
I found answer here [Make all forms associated with a program come to the front when one form is selected](https://stackoverflow.com/ques... | [
0.04910125210881233,
-0.29144716262817383,
0.4719749689102173,
-0.1259860247373581,
-0.18541565537452698,
-0.043029800057411194,
0.2681382894515991,
-0.04823058843612671,
0.00509690772742033,
-0.6961982846260071,
-0.3654766082763672,
0.41784021258354187,
-0.31109344959259033,
0.11076388508... | |
Form1 : Form
{
Form2 f2;
public Form1()
{
InitializeComponent();
f2 = new Form2();
f2.Owner = this; // <-- This is the important thing
f2.Show();
}
}
```
This makes the subform `F2` stay on top of `Form1` and hides and shows it when the `Form1` is hidden and shown.
... | [
0.09052062034606934,
-0.24683739244937897,
0.6230769753456116,
-0.45729848742485046,
-0.24752242863178253,
-0.2830353081226349,
0.1765245646238327,
-0.3741982579231262,
-0.0946885272860527,
-0.6801211833953857,
-0.5327569246292114,
0.5502148270606995,
-0.4865350127220154,
-0.26361784338951... | |
that's important. This should work with other versions, however. | [
0.42916837334632874,
0.15956507623195648,
0.005339477676898241,
0.25037434697151184,
0.19770163297653198,
-0.25740814208984375,
-0.087537981569767,
0.06371907889842987,
-0.06568297743797302,
-0.3805258870124817,
0.13266251981258392,
0.47504591941833496,
0.08761464804410934,
-0.150078028440... | |
I want to make a slider change to a certain slide/image, based on 2 things:
1. The URL
2. The tab that was clicked
If someone has come to the site via ../tabs/#contact, then the slider needs to slide to the 2nd image.
If some has come to the site via ../tabs/#about, then the slider needs to slide to the 1st image.
... | [
0.35278525948524475,
-0.02987441048026085,
0.7100520730018616,
-0.043885983526706696,
-0.024074561893939972,
0.08621324598789215,
-0.07127054035663605,
-0.060101937502622604,
-0.22853346168994904,
-0.5852996110916138,
0.04734718054533005,
0.4006885588169098,
-0.33084985613822937,
0.3086099... | |
need to know if anyone has done anything like this before and what would be the quickest way to approach it!
Last year I wrote a similar script to load dynamic content based on what the URL was or when a link with a hash tag was clicked. However, I don't have enough time to write a complex script like that for this pr... | [
0.48302873969078064,
-0.09295975416898727,
0.44238439202308655,
-0.01743086241185665,
0.007349243387579918,
-0.4181872606277466,
0.27312079071998596,
-0.20384199917316437,
-0.1738882213830948,
-0.6409863233566284,
0.229823499917984,
0.7006247043609619,
-0.4107135832309723,
0.10932703316211... | |
fp = $(this).html().toLowerCase().replace(/\s/g,"-").replace("\'","") + "-card";
/*alert(fp);*/
$.get("ag-cms.php?fakeParameter=" + fp, function(data) {
var cardID = this.url.replace("ag-cms.php?fakeParameter=", "");
var card = $("#" + cardID, data).html();
$(".profil... | [
0.1629132181406021,
-0.2768140435218811,
1.2109578847885132,
0.014407983981072903,
0.29076313972473145,
0.28123942017555237,
0.33348867297172546,
-0.4974043667316437,
-0.39067134261131287,
-0.42143258452415466,
-0.4794129431247711,
0.5836593508720398,
-0.36210542917251587,
-0.0468741357326... | |
$(this).attr("title");
document.title = 'Albert Goodman - Chartered Accountants - ' + titleTarget;
$('#loader').html("<strong>Loading</strong> - " + titleTarget);
$('.dynamicContent, .sideBar').fadeOut("fast", function() {
$('#loader').fadeIn("fast");
});
if ($(this).attr("href").indexOf("#") != -1){
var target = $... | [
-0.15575267374515533,
0.020267866551876068,
0.8616270422935486,
-0.2095867544412613,
0.002290592761710286,
0.1531728059053421,
0.6067458391189575,
-0.3804888427257538,
-0.101290762424469,
-0.4342480003833771,
-0.6403225064277649,
0.4607306718826294,
-0.6810120940208435,
0.22804155945777893... | |
.titleBrief' );
$('#loader').hide();
});
};
});
});
```
I set the second form to `ShowInTaskBar = false`, set the `FormBorderStyle` to `SizableToolWindow` and then created it using the following code:
```
public partial class Form1 : Form
{
Form2 f2;
public Form1()
{
InitializeComponent();
... | [
-0.04080431908369064,
-0.19035518169403076,
0.8485417366027832,
-0.4089083969593048,
-0.0349615104496479,
-0.1788812279701233,
0.3625141978263855,
-0.3898361921310425,
-0.0768197774887085,
-0.4063064754009247,
-0.6115888953208923,
0.4426528513431549,
-0.3446129262447357,
0.2673293352127075... | |
and hides and shows it when the `Form1` is hidden and shown.
**EDIT**
Oh, I used Visual Studio 2010 and .NET 4 Client Profile if that's important. This should work with other versions, however. | [
0.4113677740097046,
-0.20285733044147491,
0.2167404741048813,
-0.08638005703687668,
-0.292277067899704,
-0.2760486900806427,
0.35680824518203735,
0.053713731467723846,
-0.10805190354585648,
-0.7596445679664612,
0.029222222045063972,
0.8174582719802856,
-0.2533612549304962,
-0.3013291358947... | |
`ExecWait "msiexec /i myinstaller.msi /qn" $0`
That's all I'm calling in my script. (The `/qn` is for silent installation without popping up any progress window, I've also tested without it).
It fails with an [msiexec error code](http://support.microsoft.com/kb/229683) of 1619-`This installation package could not be ... | [
0.1797911822795868,
0.17030547559261322,
0.27535930275917053,
-0.07795152068138123,
0.1322937309741974,
-0.1925954669713974,
0.8617562055587769,
-0.018640875816345215,
0.06975705176591873,
-0.699761688709259,
-0.27807512879371643,
0.8217581510543823,
-0.5306423306465149,
0.0962476655840873... | |
permissions](http://support.microsoft.com/kb/316309) that a Google search throws up.
Therefore, it must be something else in my main installer script.
After commenting out nearly everything in my script to isolate the cause:
`SetOutPath "$INSTDIR\Some directory"`
If I comment this section out and don't set an output... | [
0.18749690055847168,
0.17394837737083435,
0.4104846715927124,
0.20712952315807343,
0.09419136494398117,
-0.4220741391181946,
0.6990541815757751,
-0.08113108575344086,
-0.2716204822063446,
-0.4266611635684967,
-0.14851593971252441,
0.7266716957092285,
-0.44638654589653015,
0.234538599848747... | |
not(it doesn't), or whether I call it immediately before or several lines before.
```
showinstdetails show
OutFile test.exe
section
setoutpath "D:\back"
ExecWait "msiexec /i MyInstaller.msi /qr" $0
MessageBox MB_OK $0
sectionend
```
Found out what was wrong, with partial help from Nick and Anders above.
In my oth... | [
0.6064987182617188,
-0.12963052093982697,
0.35415884852409363,
-0.012463336810469627,
0.44983795285224915,
-0.28269362449645996,
0.48830339312553406,
-0.06889421492815018,
-0.061509694904088974,
-1.0169758796691895,
-0.3672383427619934,
0.8827365040779114,
-0.4285510778427124,
-0.289622157... | |
User is making direct payment on web site. After that I want send email to user that he was payed money. And I wont from PayPal to send him this kind of mail.
I send this params
$nvpstr = "&PAYMENTACTION=$payment\_type&AMT=$amount&CREDITCARDTYPE=$type&ACCT=$number&EXPDATE=".$expiration\_date\_month.$expiration\_date... | [
-0.173979252576828,
0.3939265012741089,
1.0809342861175537,
-0.19080208241939545,
0.27097228169441223,
0.26708897948265076,
0.07819598913192749,
-0.29770368337631226,
-0.30507177114486694,
-0.5777919888496399,
-0.2688680589199066,
0.2580086588859558,
-0.34737566113471985,
-0.01934412866830... | |
I have a question about my mysql query.
I want to count the number of records per day.
That works, but I also want to see the dates on which the count is 0.
The dates where the total is 0 is not in the resultset.
How do I do that?
This is my current query:
```
SELECT COUNT(id) AS total_per_day,
DATE_FORMAT(reg_date, ... | [
0.40694698691368103,
0.1616975963115692,
0.5243874788284302,
0.030557047575712204,
-0.10191980004310608,
0.24633418023586273,
0.044568367302417755,
0.11049948632717133,
-0.5616065859794617,
-0.49804985523223877,
0.01752202771604061,
0.010176504962146282,
0.05002685636281967,
0.538895547389... | |
I have such database structure (1 - one, 0 - many)
```
Product 1->0 Orders 0->1 Users
```
I need to find all users for specified product, I have started writing linq query but don't know how to finish it.
```
public IQueryable<User> GetUsers(int productId)
{
return _db.Products.First(p => p.Id == prod... | [
0.012629838660359383,
0.2888350784778595,
0.33412593603134155,
0.032684728503227234,
-0.11375360935926437,
0.03497237339615822,
-0.05533827468752861,
-0.3079565167427063,
0.04058088734745979,
-0.6533454060554504,
-0.07088833302259445,
0.3377295732498169,
-0.365803062915802,
0.2155096977949... | |
is to use query notation, especially when you're dealing with joins, which [don't look too pretty when using lambda expressions](https://stackoverflow.com/a/630093/684271 "LINQ: Dot Notation vs Query Expression").
```
public IQueryable<User> GetUsers(int productId)
{
return from p in _db.Products
join o... | [
-0.35612863302230835,
-0.009990526363253593,
0.615989089012146,
-0.10497419536113739,
0.17802496254444122,
0.4031641483306885,
-0.10334453731775284,
-0.34857654571533203,
-0.14296971261501312,
-0.6821565628051758,
-0.3698120415210724,
0.32409366965293884,
-0.5388654470443726,
0.05346662923... | |
I have a query with a CTE that returns multiple rows, I want to execute a Function for every row returned.
Is it possible, I checked on google, it says about using temp table to populate the result. I just want to confirm
```
with job_list as ( select JOB_ID,CREATED_DATE from job_table) ,
app_list as (select APP_ID ... | [
-0.11204147338867188,
0.21973420679569244,
0.376472145318985,
-0.02066841721534729,
-0.16843783855438232,
0.4700038433074951,
0.3083525598049164,
-0.268085777759552,
-0.29662033915519714,
-0.4844113886356354,
-0.0012578029418364167,
0.40237945318222046,
-0.4891760051250458,
0.1432262957096... | |
The multi-part identifier "jobs.JOB\_ID" could not be bound.
I want to run the function for every row returned by the `job_list` CTE and use the results as a `CTE` for another query which uses both the `CTEs`
Thanks
David
Can't you do it like this:
```
with job_list as
(
select
JOB_ID,
CREATED_DATE ... | [
0.06477740406990051,
0.2660999298095703,
0.5068523287773132,
-0.13472409546375275,
0.17186297476291656,
0.026844069361686707,
0.020084744319319725,
-0.295828253030777,
-0.2986482083797455,
-0.715869128704071,
-0.24201707541942596,
0.5126618146896362,
-0.5259469151496887,
0.2882105410099029... | |
APPLY dbo.fnGetApp(jobs.JOB_ID,9) AS something
)
select * from
job_list,
app_list
``` | [
0.26716822385787964,
0.15847443044185638,
0.31726378202438354,
-0.17866291105747223,
0.011572500690817833,
-0.08499006181955338,
0.32294946908950806,
-0.1547006368637085,
0.06000259146094322,
-0.6183247566223145,
-0.3954292833805084,
0.3626534938812256,
-0.3835950195789337,
0.0205229297280... | |
I was wandering if you could offer any guidance. I am currently writing a sprite class for a simple game engine. Previous engines I have used allow functionality to "Connect" an external function to a signal, emitted when an animation finishes.
E.g.
* create the sprite object
* create the external function
* connect... | [
0.11421577632427216,
-0.06782784312963486,
0.4413261413574219,
0.0775042399764061,
-0.3209730386734009,
-0.23594190180301666,
0.4009720981121063,
-0.11524226516485214,
-0.3315335512161255,
-0.4379260838031769,
0.195590078830719,
0.2759677767753601,
-0.122801274061203,
0.38322344422340393,
... | |
will add an amount to the players score.
I have looked into it and it looks like I need to use a callback function/ function ptr but I don't have any experience using them as of yet.
Any help would be greatly appreciated.
In c++ a function pointer can be used like this:
```
#include <iostream>
//defining a type tha... | [
0.07513182610273361,
0.09960803389549255,
0.527245819568634,
-0.3649640381336212,
0.07191967219114304,
0.15880398452281952,
-0.09322323650121689,
-0.2961515486240387,
-0.1632475107908249,
-0.4326861500740051,
0.17740540206432343,
0.7423869371414185,
-0.6807489991188049,
-0.2823938131332397... | |
returns void and takes an int'
void AFunctionThatTakesAFnPtrAsAnArg( FnPtr* fn )
{
//store the pointer to use "later".
FnPtr* local = fn;
.
.
.
//use it.
local( 3 );
}
int main( int, char** )
{
AFunctionThatTakesAFnPtrAsAnArg( AFunction );
}
```
Note the function can be global, or a s... | [
-0.25720617175102234,
-0.022781338542699814,
0.27953675389289856,
-0.094509057700634,
-0.03895122930407524,
0.18115784227848053,
0.21769753098487854,
-0.22744104266166687,
-0.04770922660827637,
-0.2138618677854538,
-0.3626241683959961,
0.48691993951797485,
-0.5231868028640747,
0.3117282092... | |
#include <iostream>
typedef void FnPtr();
void AFunction()
{
std::cout << "Animation done";
}
class Sprite
{
public:
void SetFnPointer( FnPtr* fn )
{
m_Fn = fn;
}
void DoAnimation()
{
m_Fn();
}
private:
FnPtr* m_Fn;
};
int main( int, char** )
{
Sprite s;
s.... | [
0.34350574016571045,
-0.04364253208041191,
0.8092384338378906,
-0.3126048147678375,
0.08046408742666245,
0.30270352959632874,
0.5646851062774658,
-0.38977503776550293,
-0.2008749395608902,
-0.33268409967422485,
-0.4600619375705719,
0.6982743740081787,
-0.37756437063217163,
0.12240781635046... | |
For a JUnit test I need a String which consists of multiple lines. But all I get is a single lined String. I tried the following:
```
String str = ";;;;;;\n" +
"Name, number, address;;;;;;\n" +
"01.01.12-16.02.12;;;;;;\n" +
";;;;;;\n" + | [
-0.07461445033550262,
-0.09283968061208725,
0.3871351182460785,
-0.2191072404384613,
-0.21381311118602753,
0.3484748303890228,
0.5463695526123047,
-0.07122011482715607,
0.3650524616241455,
-0.5080432295799255,
0.07780352234840393,
0.2746027410030365,
-0.4551641047000885,
-0.017779713496565... | |
";;;;;;";
```
I also tried `\n\r` instead of `\n`. System.getProperty("line.separator") doesn't work too. it produces a `\n` in String and no carriage return. So how can I solve that?
Thanks for your answers. I missed that my data is stored in a `List<String>` which is passed to the tested method. The mistake was tha... | [
0.020577695220708847,
-0.0793066993355751,
0.41047999262809753,
0.03473467379808426,
0.09379957616329193,
0.2319323718547821,
0.5008525848388672,
-0.227382630109787,
-0.2694263458251953,
-0.47710373997688293,
-0.09135391563177109,
0.24917277693748474,
-0.4023943245410919,
0.198201045393943... | |
I'm building a application where admins can add multiple users to groups. In the Add action of the UserController i've:
```
$this->set('groups', $this->User->Group->find('list'));
```
The output should be a selectbox with the different group currently existing in the groups table.
```
Groups table:
'id' 'group... | [
0.1794462352991104,
0.23046264052391052,
0.3371688425540924,
-0.09185487776994705,
-0.13157182931900024,
0.1864912509918213,
0.259938508272171,
-0.6017300486564636,
-0.13154643774032593,
-0.5564536452293396,
0.05813131108880043,
0.45949840545654297,
-0.5260876417160034,
-0.0566779300570488... | |
why I thought the String consists of just one single line, because the debugger showed me only one entry. | [
0.13465335965156555,
-0.060239650309085846,
0.12385620921850204,
0.028518956154584885,
0.13225997984409332,
0.29400554299354553,
0.2981114387512207,
-0.07971344143152237,
-0.3880443871021271,
-0.12453033030033112,
0.06998348236083984,
-0.2813127338886261,
-0.47768592834472656,
0.2343373298... | |
**What I need:** I need to have different WebViews inside a ViewFlipper and then I want to have gestureListening on ViewFlipper for Swipe actions on Left Right switching.
**What I have:** I have added WebViews in ViewFlipper and they are getting loaded.
**What is the problem:** When I want to swipe left/right, it doe... | [
0.1401376724243164,
-0.12464068084955215,
1.2229647636413574,
-0.088914655148983,
-0.2855640649795532,
-0.04886970669031143,
0.26975980401039124,
-0.5691283941268921,
-0.33682921528816223,
-0.9130641222000122,
0.27809828519821167,
0.7554994225502014,
-0.21497973799705505,
-0.05329178273677... | |
I am sharing a set of globals between different threads, so I allocate the memory as needed depending on how much is being placed into it. Kinda like a buffer. Whenever I try to free it from the same thread, but different function, glib goes crazy and segfaults.
I'm not a c programmer by far. I am trying to clear up m... | [
0.3152002990245819,
0.295445054769516,
0.23909161984920502,
-0.2486942857503891,
0.27630898356437683,
0.07852236181497574,
0.5677241086959839,
-0.2606731355190277,
-0.2906312048435211,
-0.51969975233078,
-0.10173939168453217,
0.505234956741333,
-0.46320000290870667,
0.2494542896747589,
0... | |
&
// free(*keybuffer); //I thought maybe I need to use the pointer. Then
// free(*valuesbuffer); // I thought maybe I needed to reference the address in memory.
// free(*returnbuffer); // I appreciate any help.
// free(*bufferelements);
}
void memcache_allocate_buffers(int size){
*keybuf... | [
0.09970410168170929,
0.14434640109539032,
0.48334550857543945,
-0.19774681329727173,
0.32939836382865906,
0.2590987980365753,
0.24131344258785248,
-0.33239811658859253,
-0.46803468465805054,
-0.5042067170143127,
-0.3161168396472931,
0.5833362340927124,
-0.4192829132080078,
-0.0767027735710... | |
*));
bufferelements = malloc(sizeof(int));
bufferaction = (char *)malloc(sizeof(char*));
}
```
Here is the output from valgrind.
```
3500== Invalid free() / delete / delete[]
==3500== at 0x4027C02: free (vg_replace_malloc.c:366)
==3500== by 0x4191D4C: memcache_clear_buffers (dm_memcache.c:25... | [
-0.27371856570243835,
0.27590861916542053,
0.7001394033432007,
-0.17134864628314972,
0.04874349758028984,
0.49203386902809143,
0.1728232204914093,
-0.421619176864624,
-0.3038974106311798,
-0.34475022554397583,
-0.32525888085365295,
0.37422171235084534,
-0.2934122681617737,
0.17290401458740... | |
by 0x419B106: auth_validate (authmodule.c:163)
==3500== by 0x74656CFF: ???
==3500== Address 0x41b55c0 is 0 bytes inside data symbol "bufferaction"
```
How is it an invalid free?
* malloc() and free() are not thread-safe functions. You need to protect the calls to those functions with a mutex.
* You need to prot... | [
0.029414894059300423,
0.23063541948795319,
0.13684391975402832,
-0.08537472039461136,
-0.03362659737467766,
0.17583145201206207,
0.4305608570575714,
-0.38235682249069214,
-0.37384435534477234,
-0.1275957226753235,
-0.11356103420257568,
0.5280989408493042,
-0.5896385908126831,
0.38498294353... | |
for mutex guards.
* Are the buffers arrays, or two-dimensional arrays (like arrays of C strings)? You have declared all buffers as potential two-dimensional arrays, but you never allocate the inner-most dimension.
* Never typecast the result of malloc in C. Read [this](http://c-faq.com/malloc/mallocnocast.html) and [th... | [
0.15041399002075195,
0.03213178738951683,
0.17492182552814484,
-0.15943805873394012,
0.026486573740839958,
0.0557498037815094,
0.34956231713294983,
-0.25986725091934204,
-0.30778762698173523,
-0.3132678270339966,
-0.1562928408384323,
0.6376038193702698,
-0.3545011281967163,
-0.163463070988... | |
I'm programming a Google Maps based Android application. The application itself runs fine, without any issues. I can see the map, zoom to my current location etc. etc. All permissions should be fine according to the AndroidManifest.xml. I also have an API key for the map which is working. When the map is loaded I get t... | [
0.6281441450119019,
0.19604958593845367,
0.34065473079681396,
0.16422247886657715,
0.2666555941104889,
-0.09963756799697876,
0.5450592637062073,
0.30270758271217346,
-0.06007516384124756,
-1.0029408931732178,
0.22064048051834106,
0.5836881995201111,
-0.2307884246110916,
0.12572674453258514... | |
preferred of course.
I hope that someone can confirm that this is just an API bug or maybe has some fix to the problem.
I don't know if it is an API error or not. But I can tell you one thing, I have 3 real Apps based on Maps and I see this error all the time, it never hurts if that what you need to know. Good luck | [
0.37832069396972656,
0.06203657016158104,
0.5445106625556946,
0.4359445571899414,
-0.06662900000810623,
-0.07213056087493896,
0.5987164974212646,
0.4918948709964752,
-0.1675950288772583,
-0.9248088598251343,
0.28286418318748474,
0.69569331407547,
-0.1237579882144928,
-0.16772842407226562,
... | |
I have a .csv file that contains data for only certain columns in a table. How do I import that .csv into the table leaving the other columns intact (or setting the NULL value)?
Initially the table had the same columns as the .csv file and I was using this SQL loader:
```
LOAD DATA
INFILE '"Path"/file.csv'
APPEND
INT... | [
0.21931582689285278,
0.3796595633029938,
0.47061464190483093,
-0.18346451222896576,
-0.19777578115463257,
0.06416759639978409,
0.03679382801055908,
-0.2836308181285858,
-0.26766741275787354,
-0.5560581088066101,
0.11716508120298386,
0.26159048080444336,
-0.5066073536872864,
0.1177398264408... | |
other tables, and I want to update them (using a trigger) when inserting the data from the .csv for the initial columns. So how do I import in table only the columns in .csv?
There is nothing you need to do.
Only the column values from the file will be sent.
The other columns will get their default value (typically... | [
0.06964649260044098,
0.08659957349300385,
0.2507711946964264,
0.15657779574394226,
0.016950979828834534,
-0.15547697246074677,
0.1422431468963623,
-0.02936949022114277,
-0.3918747901916504,
-0.588993489742279,
-0.099098339676857,
0.39088934659957886,
-0.4623434841632843,
0.1271930634975433... | |
I need to read a massive amount of data into a buffer (about 20gig). I have 192gb of very fast DDram available, so no issue with memory size. However, I am finding that the following code runs slower and slower the further it gets into the buffer. The Visual C profiler tells me that 68% of the 12 minute execution time ... | [
0.1667291820049286,
-0.0053393165580928326,
0.3616756200790405,
0.13282155990600586,
0.059091195464134216,
0.2563961148262024,
0.18428929150104523,
0.14253130555152893,
-0.10579103231430054,
-0.7513399720191956,
0.04779588058590889,
0.798033595085144,
0.15874718129634857,
-0.12642192840576... | |
running this.
```
#define TREAM_COUNT 9000
#define ARRAY_SIZE ONE_BILLION
#define offSet(a,b,c,d) ( ((size_t) ARRAY_SIZE * (a)) + ((size_t) TREAM_COUNT * 800 * (b)) + ((size_t) 800 * (c)) + (d) )
void myFunc(int dogex, int ptxIndex, int xtreamIndex, int carIndex)
{
short *ptx = (short *) calloc(ARRAY_SIZE * ... | [
0.3970244824886322,
-0.1592174917459488,
0.6426590085029602,
-0.09902199357748032,
0.2350880205631256,
0.3066743314266205,
0.18426796793937683,
-0.42616257071495056,
-0.10983532667160034,
-0.5015089511871338,
-0.04596971720457077,
0.6441398859024048,
-0.45685431361198425,
0.217623993754386... | |
++treamIndex)
{
short ptxValue = ptx[ offSet(dogex, ptxIndex, treamIndex, carIndex) ];
short lastPtxValue = ptx[ offSet(dogex, ptxIndex-1, treamIndex, carIndex) ];
// ....
}
}
```
The code allocated 20 blocks of one billion short ints. On a 64-bit Windows box, a short int i... | [
0.2710726857185364,
-0.21748100221157074,
0.3368820548057556,
0.006998373661190271,
0.057293832302093506,
0.40430063009262085,
0.32517313957214355,
-0.4550494849681854,
-0.21085314452648163,
-0.34082216024398804,
-0.059069402515888214,
0.1993737816810608,
-0.22180263698101044,
0.0310593489... | |
it is doesn't appear to show any parallelism. The way in which the code is parallelised could have a profound effect upon performance. You may need to provide more information.
--
Your basic problem, I suspect, revolves around cache behaviour and memory access limits.
First, with two physical CPUs of six cores each,... | [
-0.011098237708210945,
-0.3656254708766937,
0.09307980537414551,
0.07819755375385284,
-0.15713360905647278,
0.0097270542755723,
0.1305151730775833,
0.007048667874187231,
-0.13628742098808289,
-0.595276415348053,
-0.11346979439258575,
0.616322934627533,
-0.20445369184017181,
0.3725305795669... | |
sizes. Given the code is memory bus bound, rather than compute bound, hyperthreading is harmful. (Having said that, if computation is constantly outside of cache bounds anyway, this won't change much).
It's not clear (since some/much?) code is removed, how the array is being accessed and the access pattern and optimim... | [
0.10152546316385269,
-0.017184000462293625,
0.22112883627414703,
0.34442219138145447,
-0.17985372245311737,
0.029330825433135033,
-0.05034348741173744,
-0.3268928527832031,
-0.5801870822906494,
-0.8446180820465088,
-0.11077237874269485,
0.6348292231559753,
-0.05335304141044617,
0.176695436... | |
performance, by itself.
My basic advice would be break the array up into level 2 cache-sized blocks, give one block to each CPU and let it process that block. You can do that in parallel. Actually, you might be able to use hyperthreading to pre-load the cache, but that's a more advanced technique. | [
-0.036066096276044846,
-0.04481983929872513,
-0.005793961696326733,
0.25614017248153687,
-0.33151787519454956,
0.24114961922168732,
0.12481296062469482,
-0.15103189647197723,
-0.2665124237537384,
-0.5507009625434875,
-0.10894162952899933,
0.7836167216300964,
-0.09072158485651016,
-0.142307... | |
I've recently ported my `Qt` project from `qmake` to `CMake`.
My main program contains a value which depends on a `#define` directive.
I want to specify that define directive externally via `CMake` and build 3 differently named versions of the same executable.
How should I do it?
I've seen `set_target_properties` b... | [
0.26868176460266113,
0.17651090025901794,
0.3168755769729614,
-0.3128175437450409,
-0.1420951783657074,
-0.058693841099739075,
0.1276129186153412,
-0.10852859169244766,
0.15736055374145508,
-0.8783572316169739,
-0.0011621201410889626,
0.5552853345870972,
-0.4042159914970398,
0.324376791715... | |
this is not the correct syntax.
Some hint?
and I get 3 executables which prints
Are you sure that `set_target_properties` does not work? How about this one:
```
set_target_properties(myAppV1 PROPERTIES COMPILE_FLAGS "-DBUILDTYPE=1")
```
or:
```
set_target_properties(myAppV1 PROPERTIES COMPILE_DEFINITIONS "BUILDTYPE... | [
0.363076388835907,
0.43485027551651,
0.5173092484474182,
-0.05136958509683609,
-0.09160083532333374,
-0.12051937729120255,
0.11448854207992554,
-0.5022245645523071,
-0.2942725419998169,
-0.7415950298309326,
-0.05651438981294632,
0.5565881133079529,
-0.4931754469871521,
-0.2123384028673172,... | |
```
<li>
<asp:Panel ID="Panel6" runat="server">
<ul id="list2a" runat="server"> | [
-0.3506465554237366,
-0.03567100316286087,
0.3977612257003784,
-0.23695631325244904,
-0.19865265488624573,
0.13765904307365417,
-0.22048844397068024,
-0.165912464261055,
-0.5229141712188721,
-0.8189033269882202,
-0.31295815110206604,
0.3466370403766632,
-0.2879188656806946,
-0.080663055181... | |
</ul>
</asp:Panel>
</li> | [
-0.34997180104255676,
-0.18982219696044922,
0.40087661147117615,
-0.13425947725772858,
-0.12757457792758942,
0.3808547556400299,
-0.4104793071746826,
-0.1401781141757965,
-0.4728776812553406,
-0.7473442554473877,
-0.5095893740653992,
0.4982280731201172,
0.01238416600972414,
-0.272512465715... | |
<li>
<asp:Panel ID="Panel7" runat="server">
<ul id="list2b" runat="server"> | [
-0.44959062337875366,
-0.37773141264915466,
0.4812264144420624,
-0.3553641140460968,
-0.24823565781116486,
0.3337670862674713,
-0.21228666603565216,
-0.1505744904279709,
-0.6057795286178589,
-0.7658562064170837,
-0.3419635593891144,
0.2985844612121582,
-0.32070738077163696,
-0.185535356402... | |
<%--<li><a href="#">
<img src="images/img.gif" width="80" height="80" alt="image description" /> | [
-0.0017771266866475344,
-0.08727169781923294,
0.6321125626564026,
-0.08458202332258224,
-0.01094394363462925,
0.09961346536874771,
-0.0526014007627964,
-0.22664277255535126,
-0.37666231393814087,
-0.7364107966423035,
-0.17173972725868225,
0.6069613695144653,
-0.17783769965171814,
-0.106424... | |
<span class="mask"> </span>
</a></li> | [
0.0338832326233387,
-0.348565936088562,
0.1636066883802414,
-0.45474061369895935,
-0.21841350197792053,
0.09598658233880997,
0.15217691659927368,
-0.2638019919395447,
-0.35547271370887756,
-0.39942824840545654,
-0.48069584369659424,
0.4968898296356201,
-0.3959500193595886,
-0.3845410346984... | |
<li><a href="#">
<img src="images/img.gif" width="80" height="80" alt="image description" />
<span | [
0.0931713879108429,
-0.32499799132347107,
0.7928970456123352,
-0.13227860629558563,
-0.17671258747577667,
0.06844905018806458,
-0.18425914645195007,
-0.2861040532588959,
-0.6108819246292114,
-0.646246612071991,
-0.1816508024930954,
0.6023205518722534,
-0.16805680096149445,
-0.0996029153466... | |
class="mask"> </span>
</a></li>
<li><a href="#"> | [
-0.17875157296657562,
-0.4149821102619171,
0.16006030142307281,
-0.28387635946273804,
-0.06801664084196091,
0.16643916070461273,
0.2517572343349457,
-0.3859155476093292,
-0.16478392481803894,
-0.574992299079895,
-0.5495215058326721,
0.5165238380432129,
-0.37899458408355713,
-0.231699258089... | |
<img src="images/img.gif" width="80" height="80" alt="image description" />
<span class="mask"> </span> | [
0.13427209854125977,
-0.4429759681224823,
0.6076744198799133,
-0.21895946562290192,
-0.2698211073875427,
0.13816700875759125,
0.03592788055539131,
-0.2804618775844574,
-0.5642910599708557,
-0.6572358012199402,
-0.20604555308818817,
0.6324558854103088,
-0.2229316681623459,
-0.15120153129100... | |
</a></li>--%>
</ul>
</asp:Panel> | [
-0.3829313814640045,
-0.20921441912651062,
0.3143468499183655,
-0.10277094691991806,
-0.21690304577350616,
0.4676930010318756,
-0.24024835228919983,
-0.1832772195339203,
-0.4611642062664032,
-0.6989377737045288,
-0.5475000739097595,
0.48932716250419617,
0.044749174267053604,
-0.36606797575... | |
</li>
```
I am trying to add images dynamically inside the Panel and then into the ul however i need to add only 3 images in one Panel and the next 3 in the other Panel.
My code behind is as follows:
```
string query2 = "SELECT [Pic_square] From [User1] WHERE ([FB_Id] IN (SELECT [Fb_Id2] FROM [Snapshot] WHERE [F... | [
-0.443469762802124,
-0.20890912413597107,
0.8332234621047974,
-0.30737829208374023,
-0.15138760209083557,
0.2485583871603012,
-0.16354799270629883,
-0.5406230688095093,
0.0758795291185379,
-0.9395027160644531,
-0.18474335968494415,
0.5736212730407715,
-0.4572352170944214,
-0.05321279168128... | |
var adt = new SqlDataAdapter(query2, con);
ds1 = new DataSet();
adt.Fill(ds1);
int count1 = ds1.Tables[0].Rows.Count;
for (int j = 0; j < count1; j++)
{
HtmlGenericControl listitem1 = new HtmlGenericControl("li");
HtmlGenericControl anchor1 = new HtmlGener... | [
-0.12123139202594757,
-0.40351590514183044,
0.7863861918449402,
-0.40571078658103943,
-0.27576377987861633,
0.3291257917881012,
0.31199413537979126,
-0.5933635234832764,
-0.1650904417037964,
-0.41730234026908875,
-0.310589075088501,
0.40001630783081055,
-0.5800307989120483,
0.0115772429853... | |
Image im1 = new Image();
im1.ImageUrl = (string)ds1.Tables[0].Rows[j].ItemArray[0];
im1.Height = 80;
im1.Width = 80;
anchor1.Controls.Add(im1);
//anchor1.Attributes.CssStyle.Add("div", "holder");
listitem1.Controls.Add(anchor1); | [
0.0922280102968216,
-0.27801984548568726,
0.8644504547119141,
-0.17103777825832367,
-0.15119878947734833,
0.3045799732208252,
0.062213461846113205,
-0.5222288370132446,
-0.49090060591697693,
-0.4556167721748352,
-0.2941123843193054,
0.4472319483757019,
-0.4920521378517151,
0.09575518965721... | |
if(count1 <= 3)
{
list2a.Controls.Add(listitem1);
Panel6.Controls.Add(list2a);
}
else if (3 < count1 && count1 <= 6)
{ | [
0.12127930670976639,
-0.2661939561367035,
0.5669816136360168,
-0.2994300425052643,
-0.06618722528219223,
0.11035563796758652,
0.2769811749458313,
-0.8295251131057739,
-0.40437787771224976,
-0.14538033306598663,
-0.255618691444397,
0.46616509556770325,
-0.6256308555603027,
-0.24173574149608... | |
list2b.Controls.Add(listitem1);
Panel7.Controls.Add(list2b);
}
else if (6 < count1 && count1 <= 9)
{
//list2b.Controls.Add(listitem1);
list2c.Controls.Add(listitem1);
Panel8.Controls.Add(list2c); | [
-0.2346908301115036,
-0.1876036524772644,
0.40737277269363403,
-0.3288799226284027,
0.15710419416427612,
0.0927899032831192,
-0.04473003372550011,
-0.573854386806488,
-0.4174181818962097,
-0.33286598324775696,
-0.35937827825546265,
0.3661919832229614,
-0.6489223837852478,
-0.15100942552089... | |
}
else if (9 < count1 && count1 <= 12)
{
list2d.Controls.Add(listitem1);
Panel9.Controls.Add(list2d);
// list2b.Controls.Add(listitem1); | [
-0.013209392316639423,
-0.29669684171676636,
0.32822877168655396,
-0.28989487886428833,
0.3259100615978241,
-0.012271011248230934,
0.09338950365781784,
-0.5199829339981079,
-0.32138949632644653,
-0.34579339623451233,
-0.2564655840396881,
0.5134825706481934,
-0.6221903562545776,
-0.30022010... | |
// list2c.Controls.Add(listitem1);
}
else
{
// list2b.Controls.Add(listitem1);
//list2c.Controls.Add(listitem1);
//list2d.Controls.Add(listitem1); | [
-0.11457725614309311,
-0.25253912806510925,
0.32063528895378113,
-0.11356134712696075,
0.179091677069664,
-0.0692463219165802,
-0.073180191218853,
-0.5045605301856995,
-0.24776312708854675,
-0.4582050144672394,
-0.23390109837055206,
0.5249449610710144,
-0.6488891839981079,
-0.2587521672248... | |
list2e.Controls.Add(listitem1);
Panel10.Controls.Add(list2e);
}
```
But all i get are 6 photos together which i don't want
Edit: PS I do have Panels upto 10 and i have added the code
Please help?
After the line Code `listitem1.Controls.Add(anchor1);` replace it with below
```
if (j <=... | [
0.3634938597679138,
-0.10844478011131287,
0.8049330711364746,
-0.2607429325580597,
-0.04601699858903885,
0.08280560374259949,
0.10425747185945511,
-0.49231135845184326,
-0.5953924059867859,
-0.6286199688911438,
-0.06331343948841095,
0.6273564100265503,
-0.44534170627593994,
-0.508566141128... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.