text stringlengths 0 30.5k | title stringclasses 1
value | embeddings listlengths 768 768 |
|---|---|---|
there is much else you could do to speed this up.
However, you do have a memory management issue which could speed up the process to some extent.
```
for (int i = 1; i < 19; i++) {
UIImage *image = [UIImage imageNamed:[NSString stringWithFormat:@"%@_Hole%d_", courseName, i]];
imageView = [[UIImageView a... | [
0.04369339719414711,
-0.13194048404693604,
0.912928581237793,
-0.15050676465034485,
-0.10593005269765854,
0.13365551829338074,
0.2814377546310425,
-0.341804563999176,
-0.06507107615470886,
-0.942436933517456,
-0.21415409445762634,
0.4888615012168884,
-0.057018157094717026,
0.24300093948841... | |
I tried printing messages using the System.out.println("Console message") but the messages are not getting printed in the console. Any specific reasons for this? How to print the console messages then?
i can see another window named DDMS. what is the use of it?
Please help
Regards,
Bunty
I just redid the page and bu... | [
0.35399147868156433,
0.19901596009731293,
0.3859586715698242,
0.30081209540367126,
-0.27415603399276733,
0.12326523661613464,
0.23235924541950226,
0.08856198936700821,
-0.3794809877872467,
-0.9440696835517883,
0.42067766189575195,
0.47287601232528687,
-0.2094751000404358,
0.239130273461341... | |
I have the following @MappedSuperClass and @Entity :
```
@MappedSuperclass
public class SuperClass implements Serializable {....}
@Entity
@Inheritance(strategy=InheritanceType.TABLE_PER_CLASS)
@Table(name = "TABLE1")
public class Table1 extends SuperClass implements Serializable {...}
@Entity
@Inheritance(strategy=... | [
-0.3155965507030487,
0.17032822966575623,
0.4087299108505249,
0.028965512290596962,
0.02739614248275757,
0.04589371383190155,
0.2580137550830841,
-0.5908353924751282,
-0.4962839186191559,
-0.5388311147689819,
0.010690070688724518,
0.5725986957550049,
-0.33446258306503296,
0.370119035243988... | |
an id class.
This type is not eligible for builtin identity, so it must declare an id class.
```
I don't understand why the attribute @Id are not found in the @Entity Class.
If anyone have any ideas, feel free to help me :)
Regards,
Cytemax
My @Entity class must have an @IdClass(SuperClassPK.class), because my p... | [
0.16333726048469543,
0.04051261022686958,
0.3017602860927582,
0.32015034556388855,
0.08138260245323181,
-0.14902997016906738,
0.15870480239391327,
-0.09162449091672897,
0.1226046234369278,
-0.6649518609046936,
0.016063189134001732,
0.7413025498390198,
-0.175548255443573,
0.2369932383298874... | |
I have a JQM app with one specific page that I do not want styled.
All I have found so far is `data-role='none'` - but I don't want to have to apply that to every element on the page... Is there a way to turn if off just for this one page?
You can use `data-enhance="false"` in conjunction with `$.mobile.ignoreContentE... | [
0.2807675004005432,
0.3932764530181885,
0.7990034818649292,
-0.25257304310798645,
-0.0145850395783782,
-0.09221302717924118,
0.6423892378807068,
-0.17694422602653503,
-0.16880828142166138,
-0.45632630586624146,
-0.21258939802646637,
0.6155344247817993,
-0.3163023889064789,
0.15861837565898... | |
CPU intensive to search parent elements for the `data-attribute`, so this is turned-off by default.
Here is a demo: <http://jsfiddle.net/ZtJyL/1/> | [
-0.0977650061249733,
-0.1762315183877945,
0.1412307173013687,
-0.04137163236737251,
-0.011047838255763054,
-0.16711196303367615,
-0.12420110404491425,
-0.11524011194705963,
-0.2356170266866684,
-0.5842331051826477,
-0.3374153971672058,
0.5908030867576599,
-0.358200341463089,
-0.05445083230... | |
I have declared a function for showing a dialog box in jQuery
```
<script type="text/javascript">
function showDialog(str,strtitle)
{
if(!strtitle) strtitle='Error message';
$('#dialog').dialog('destroy');
$('#dialog').show();
$('#dialog').html(str);
$("#dialog").dialog({
resizable: false,
width: 400,
col... | [
0.2731342613697052,
0.19110284745693207,
0.6773297190666199,
-0.3702433407306671,
0.09540616720914841,
0.060051292181015015,
0.28724536299705505,
-0.34116607904434204,
0.04695611819624901,
-0.568813145160675,
-0.29680323600769043,
0.16302354633808136,
-0.6019187569618225,
0.165966153144836... | |
$(this).dialog("close"); }},
overlay: { opacity: 0.2, background: "cyan" },title:strtitle});}
</script>
```
And I'm calling this function, in another javascript code:
```
<script type="text/javascript">
var myFile = document.getElementById('myfile');
//binds to onchange event of the input field... | [
0.09909474104642868,
-0.028977900743484497,
0.9044738411903381,
-0.4074632227420807,
0.34471777081489563,
0.15580369532108307,
0.19828903675079346,
-0.5165060758590698,
-0.08634844422340393,
-0.7479268312454224,
-0.4136413633823395,
0.6750532388687134,
-0.40900710225105286,
0.0564529038965... | |
it writes Undefined, Why the dialog box is not showing. The first function is declred in the head, and the second in the body portion.
`document.write()` is writing what is returned by `showDialog()`. Since that function isn't returning anything, it will write `Undefined`.
The document.write() is not necessary, just s... | [
-0.1211436539888382,
-0.0073584397323429585,
0.7988279461860657,
-0.08627019822597504,
0.01831040345132351,
-0.186097651720047,
-0.05036694183945656,
-0.04829137772321701,
0.07168726623058319,
-0.4956962764263153,
-0.13025642931461334,
0.5425158143043518,
-0.3763442039489746,
-0.0607836432... | |
I swear to god, that I had seen something like (below) on one of the MSDN Article but I cant find this property attribute documentation anywhere.
```
public class MyViewModel{
[Required]
public bool Important {get;set;}
[ValidationDependsOn("Important")]
public bool HasVIPAccess {get;set;}
}
```
If you loo... | [
0.27463287115097046,
0.3842732906341553,
0.3373608887195587,
-0.027868712320923805,
0.05137809365987778,
-0.5209270119667053,
0.4738689363002777,
-0.056091200560331345,
-0.20121796429157257,
-0.5084244012832642,
-0.06416697055101395,
0.6513462066650391,
-0.020449360832571983,
0.15626706182... | |
attribute on must equal `OtherProperty`
ex
```
public class MyViewModel{
[Required]
public bool Important {get;set;}
[Compare("Important")]
public bool HasVIPAccess {get;set;}
}
```
**Note : Require MVC 3+**
if you wanna other validation attributes you can check [Mvc.ValidationTookit](http://blogs.msdn.c... | [
0.1566857546567917,
0.16542981564998627,
0.666803777217865,
0.005349735729396343,
-0.27350351214408875,
-0.06504576653242111,
0.29799899458885193,
-0.5305153727531433,
-0.19026769697666168,
-0.3615921437740326,
0.02489556558430195,
0.7486861348152161,
-0.2221255749464035,
0.160604089498519... | |
CompareAttribute made use of this feature | [
0.06653732061386108,
-0.12088281661272049,
0.13657617568969727,
0.08351924270391464,
-0.013837876729667187,
0.10680016875267029,
0.06268049031496048,
0.02652635984122753,
0.027830127626657486,
-0.5416675806045532,
-0.060346510261297226,
0.23300738632678986,
0.10804245620965958,
-0.01764850... | |
I am trying to delete rows from a listview. When I click delete, the row is removed. The ListView, however, fails to update. I have to click the back button and come back to see the item removed. Is there a way to refresh the page, after an item has been removed? Here is my code:
```
public class OrderHistoryAdapter :... | [
0.04529782757163048,
-0.022396549582481384,
0.5469245314598083,
-0.28828394412994385,
0.24201808869838715,
0.059034980833530426,
0.3316686153411865,
-0.0981535091996193,
-0.20351481437683105,
-0.7690858840942383,
-0.23758770525455475,
0.5587067604064941,
-0.30999234318733215,
0.26296138763... | |
_orders = orders;
}
public override View GetView(int position, View convertView, ViewGroup parent)
{
var item = _orders.ElementAt(position);
var view = (convertView ??
this._context.LayoutInflater.Inflate(
Resource.Layout.OrderHistoryDetailsRow,
... | [
-0.22780197858810425,
-0.28162533044815063,
0.5543859601020813,
-0.2904929518699646,
0.11981921643018723,
0.45798182487487793,
0.4612894058227539,
-0.48978009819984436,
-0.28263819217681885,
-0.5156666040420532,
-0.33984363079071045,
0.4240608215332031,
-0.2672118544578552,
0.2572582960128... | |
false)) as RelativeLayout;
TextView orderHistoryText = view.FindViewById<TextView>(Resource.Id.orderHistoryText);
orderHistoryText.Text = ((Order)item).Date.ToShortDateString();
view.FindViewById<TextView>(Resource.Id.btnDeleteOrder).Click += delegate
{
OrderRepository order... | [
-0.17109315097332,
-0.2396554797887802,
0.6801532506942749,
-0.0990276113152504,
0.07530117779970169,
0.3423278033733368,
0.7222247123718262,
-0.6505025029182434,
-0.40019863843917847,
-0.48236900568008423,
-0.43257078528404236,
0.48794540762901306,
-0.20557472109794617,
0.6077203750610352... | |
NotifyDataSetChanged();
};
//Finally return the view
return view;
}
public override int Count
{
get { return _orders.Count(); }
}
public Order GetOrder(int position)
{
return _orders.ElementAt(position);
}
public override | [
0.11019491404294968,
-0.5052497982978821,
0.5779681205749512,
-0.3158780634403229,
0.2581217586994171,
0.11390967667102814,
0.48692166805267334,
-0.5988966822624207,
-0.04359743371605873,
-0.484856516122818,
-0.3256765604019165,
0.5392915606498718,
-0.45282167196273804,
-0.0771112889051437... | |
Java.Lang.Object GetItem(int position)
{
return null;
}
public override long GetItemId(int position)
{
return position;
}
}
```
Even though you're deleting it in the repository the object is still sitting in the list of orders stored in the adapter (`_orders`). Try removing the obj... | [
-0.16949041187763214,
-0.1758994162082672,
0.14539939165115356,
-0.3428790867328644,
0.33533474802970886,
-0.2667059004306793,
0.518539309501648,
-0.29610246419906616,
-0.287870317697525,
-0.5942360758781433,
-0.4199085533618927,
0.2121170461177826,
-0.4972321391105652,
0.15251770615577698... | |
I know this is very vague but im new to C++. Im making a calculator as a first time project, and what im wanting to do is, if replied to with 'y', make the script rerun from the beginning...basically.
```
#include <iostream>
#include <stdio.h>
#include <math.h>
using namespace std;
int main()
{
cout << "H... | [
-0.03932863101363182,
0.3443908095359802,
0.2652021050453186,
0.09968402236700058,
0.3005279004573822,
0.22537359595298767,
0.2967628836631775,
0.062052540481090546,
0.1348389983177185,
-0.689006507396698,
-0.08031304180622101,
0.5961543917655945,
-0.3383139967918396,
0.03973283991217613,
... | |
e)Square Root\n f)Hypotenuse\n";
scanf ("%c", &choice);
switch (choice)
{
case 'a':
{
int a;
int b; | [
-0.10666131228208542,
-0.254315048456192,
0.24132221937179565,
-0.28001075983047485,
0.370680570602417,
-0.027095647528767586,
0.07266470789909363,
-0.5672087073326111,
0.12137746065855026,
-0.3538033664226532,
-0.6259850263595581,
0.5460359454154968,
-0.44876646995544434,
0.05200633034110... | |
cout << "Addition\n";
cout << "Please enter a number:\n";
cin >> a;
cout << "Please enter your second number:\n";
cin >> b; | [
-0.3196389377117157,
-0.21770794689655304,
0.0859266072511673,
-0.46932199597358704,
-0.028107402846217155,
0.16736122965812683,
-0.3253200352191925,
0.013585531152784824,
-0.05569511279463768,
-0.7042638063430786,
-0.5887506604194641,
0.24215079843997955,
-0.504366397857666,
0.04149541631... | |
cin.ignore();
int result = a + b;
cout << "Calculating...\n";
cout << "Your total is:\n"<<" "<<result;
cin.get();
break; | [
0.14991812407970428,
-0.23478688299655914,
0.392556756734848,
-0.32468798756599426,
0.3574788272380829,
0.10682858526706696,
-0.05471361055970192,
-0.1710120588541031,
-0.47739189863204956,
-0.20747412741184235,
-0.39251700043678284,
0.40947645902633667,
-0.47176647186279297,
0.12232691049... | |
}
case 'b':
{
int c;
int d;
cout << "Subtraction\n";
cout | [
-0.28286656737327576,
-0.16006360948085785,
-0.03401491418480873,
-0.4500771462917328,
0.3740377128124237,
0.27566128969192505,
0.01311130914837122,
-0.2581120729446411,
0.24176061153411865,
-0.30800846219062805,
-0.6763362288475037,
0.47075745463371277,
-0.4593772292137146,
-0.03478500247... | |
<< "Please enter a number:\n";
cin >> c;
cout << "Please enter your second number:\n";
cin >> d;
cin.ignore();
int result2 = c - d; | [
-0.01500716432929039,
-0.29785338044166565,
0.22916577756404877,
-0.2905958294868469,
0.3075563609600067,
-0.01689748466014862,
-0.10391420125961304,
-0.193539097905159,
-0.1723242998123169,
-0.4011290669441223,
-0.6113911867141724,
0.3516487181186676,
-0.48911693692207336,
0.2349697947502... | |
cout << "Calculating...\n";
cout << "Your total is:\n"<<" "<<result2;
cin.get();
break;
}
case 'c': | [
-0.09178519994020462,
-0.10366787761449814,
0.27202102541923523,
-0.22218544781208038,
0.4527305066585541,
0.1759503036737442,
-0.1926892250776291,
-0.17715896666049957,
-0.28581368923187256,
-0.17975792288780212,
-0.5003794431686401,
0.5033526420593262,
-0.13760989904403687,
-0.0368598289... | |
{
int e;
int f;
cout << "Multiplication\n";
cout << "Please enter a number:\n";
cin >> e; | [
-0.2125782072544098,
-0.3032396733760834,
0.20214630663394928,
-0.28695812821388245,
0.2227657437324524,
-0.0022544185630977154,
-0.0898483395576477,
0.03490684926509857,
0.020956162363290787,
-0.47919759154319763,
-0.7529557943344116,
0.5234841704368591,
-0.5154821276664734,
0.03776807710... | |
cout << "Please enter your second number:\n";
cin >> f;
cin.ignore();
int result3 = e * f;
cout << "Calculating...\n"; | [
-0.1921827644109726,
-0.3247557580471039,
0.3765869140625,
-0.3882383704185486,
0.19793541729450226,
0.16097640991210938,
-0.1083400696516037,
-0.2296033799648285,
-0.2080259472131729,
-0.5823924541473389,
-0.3749087154865265,
0.3495347499847412,
-0.5469064116477966,
-0.12233524024486542,
... | |
cout << "Your total is:\n"<<" "<<result3;
cin.get();
break;
}
case 'd':
{ | [
-0.17350007593631744,
-0.21267129480838776,
0.3251792788505554,
-0.2966213524341583,
0.3290984034538269,
0.1290515959262848,
-0.07569663226604462,
-0.04501015692949295,
-0.21698956191539764,
-0.42480581998825073,
-0.5274075865745544,
0.43962833285331726,
-0.22942207753658295,
0.19926182925... | |
int g;
int h;
cout << "Division\n";
cout << "Please enter a number:\n";
cin >> g;
cout << "Please enter your second number:\n"; | [
-0.5036472678184509,
-0.22064071893692017,
0.11788960546255112,
-0.31445273756980896,
-0.042999617755413055,
0.06819567084312439,
-0.16118048131465912,
-0.0851450264453888,
-0.12376148253679276,
-0.7541452646255493,
-0.6995231509208679,
0.27913835644721985,
-0.5632036328315735,
0.069197826... | |
cin >> h;
cin.ignore();
int result4 = g / h;
cout << "Calculating...\n";
cout << "Your total is:\n"<<" "<<result4; | [
-0.024653835222125053,
-0.239610493183136,
0.48866942524909973,
-0.17567387223243713,
0.20809118449687958,
0.18327060341835022,
-0.2520800828933716,
-0.34461095929145813,
-0.3950924277305603,
-0.41893959045410156,
-0.34189683198928833,
0.3944520950317383,
-0.3824770450592041,
0.03472221270... | |
cin.get();
break;
}
case 'e':
{
int x;
#define square ((x)*(x)) | [
0.2521126866340637,
-0.4440014064311981,
0.25490379333496094,
-0.006873325444757938,
0.03661755099892616,
-0.031191779300570488,
-0.03774555027484894,
-0.5358186364173889,
-0.1752714067697525,
-0.6374722123146057,
-0.26970377564430237,
0.30379730463027954,
-0.38864779472351074,
0.160327300... | |
cout << "Square Root\n";
cout << "Please enter a number:\n";
cin >> x;
cin.ignore();
cout << "Calculating...\n"; | [
-0.19715572893619537,
-0.05283374711871147,
0.12468018382787704,
-0.20005592703819275,
0.18235477805137634,
0.09072109311819077,
-0.0908518135547638,
-0.0001491967705078423,
-0.13954328000545502,
-0.47645723819732666,
-0.4909585416316986,
0.20222260057926178,
-0.6092475652694702,
0.0425343... | |
cout << "Your total is:\n"<<" "<<square;
cin.get();
break;
}
case 'f':
{
int i; | [
-0.22636954486370087,
-0.2332863211631775,
0.4126526713371277,
-0.35400694608688354,
0.09305838495492935,
0.20502619445323944,
-0.14359380304813385,
-0.2519020140171051,
-0.17173102498054504,
-0.49107468128204346,
-0.5143935084342957,
0.3614194095134735,
-0.2576429843902588,
0.069020703434... | |
int j;
cout << "Hypotenuse\n";
cout << "Enter your smaller side:\n";
cin >> i;
cout << "Please enter the longer side:\n"; | [
-0.2958057224750519,
-0.045879121869802475,
0.474079430103302,
-0.5009578466415405,
0.014665377326309681,
0.17617516219615936,
0.06735285371541977,
-0.03084673546254635,
-0.025392895564436913,
-0.6053266525268555,
-0.6840355396270752,
0.27113622426986694,
-0.29886263608932495,
-0.034008920... | |
cin >> j;
cin.get();
int hypotenuse = ((i*i)+(j*j));
cout << "Calculating...\n";
cout << "The hypotenuse is the square root of:\n"<<" "<<hypotenuse; | [
-0.07624560594558716,
-0.08736801147460938,
0.2274087518453598,
-0.20404218137264252,
-0.06798804551362991,
0.291195809841156,
0.03168419376015663,
-0.36707979440689087,
0.05013800039887428,
-0.4306889474391937,
-0.45489028096199036,
0.33553755283355713,
-0.3297727406024933,
-0.04680595546... | |
cin.ignore();
cout << "Would you like to do another problem?\n y)Yes\n n)No\n";
cin >> resp; //this is where im trying to test this at
}
default:
{ | [
0.07362154871225357,
-0.3514136075973511,
0.265372097492218,
-0.07373884320259094,
0.5247618556022644,
-0.14744225144386292,
0.0771348774433136,
0.029079552739858627,
-0.37330272793769836,
-0.43072471022605896,
-0.18261109292507172,
0.6408318877220154,
-0.671619176864624,
0.112475983798503... | |
cout << " \n";
cout << "Error: Undefined response\n";
cout << "Contact the source programmer for details\n";
}
}
}
```
Unfortunately the expanded state always resets whenever the focus is lost and onCreate() is not called when it gets the focus again but | [
0.14729814231395721,
0.01831609196960926,
0.40806129574775696,
-0.2538966238498688,
0.4746391773223877,
0.1206839308142662,
0.23303121328353882,
0.42458996176719666,
-0.20009469985961914,
-0.7161847352981567,
-0.7379701137542725,
0.6230285167694092,
-0.4322422444820404,
0.16301466524600983... | |
onStart(). So my workaround for now is to manually store the IDs of all expanded items and expand them in onStart() again. I implemented a subclass of ExpandableListActivity to reuse the behavior.
```
public class PersistentExpandableListActivity extends ExpandableListActivity {
private long[] expandedIds;
@Override... | [
0.18958716094493866,
-0.6292887330055237,
1.0311634540557861,
-0.15371568500995636,
0.33052942156791687,
0.0849166065454483,
0.4038771688938141,
-0.47061288356781006,
-0.4157702326774597,
-0.5296480059623718,
-0.39138516783714294,
0.7517443895339966,
-0.3599928617477417,
0.3241177797317505... | |
state) {
super.onRestoreInstanceState(state);
long[] expandedIds = state.getLongArray("ExpandedIds");
if (expandedIds != null) {
restoreExpandedState(expandedIds);
}
}
private long[] getExpandedIds() {
ExpandableListView list = getExpandableListView();
ExpandableListAdapter adapter = ge... | [
0.08489996939897537,
-0.5454282164573669,
0.7560145258903503,
-0.45113807916641235,
0.43307381868362427,
0.2542732059955597,
0.66524738073349,
-0.6297692656517029,
-0.3112935423851013,
-0.5515977144241333,
-0.6300355792045593,
0.47110822796821594,
-0.3239428699016571,
0.4157654047012329,
... | |
if(list.isGroupExpanded(i)) {
expandedIds.add(adapter.getGroupId(i));
}
}
return toLongArray(expandedIds);
} else {
return null;
}
}
private void restoreExpandedState(long[] expandedIds) {
this.expandedIds = expandedIds;
if (expandedIds != null) {
... | [
0.10995416343212128,
-0.6355606317520142,
0.7033575773239136,
-0.4546375572681427,
0.37387171387672424,
0.00494799017906189,
0.3163379430770874,
-0.29830750823020935,
-0.31867945194244385,
-0.4856804609298706,
-0.3845881521701813,
0.8356510400772095,
-0.3121193051338196,
0.2377073913812637... | |
getExpandableListView();
ExpandableListAdapter adapter = getExpandableListAdapter();
if (adapter != null) {
for (int i=0; i<adapter.getGroupCount(); i++) {
long id = adapter.getGroupId(i);
if (inArray(expandedIds, id)) list.expandGroup(i);
}
... | [
-0.32586655020713806,
-0.7839543223381042,
0.449078232049942,
-0.4399503767490387,
0.27932077646255493,
0.036576274782419205,
0.31793564558029175,
-0.5180596709251404,
-0.17487259209156036,
-0.6730084419250488,
-0.5181756019592285,
0.5344128012657166,
-0.5507056713104248,
0.093738809227943... | |
}
}
private static boolean inArray(long[] array, long element) {
for (long l : array) {
if (l == element) {
return true;
}
}
return false;
}
private static long[] toLongArray(List<Long> list) {
long[] ret = new long[list.size()];
int i = 0;
for (Long e : list)
... | [
-0.055951833724975586,
-0.6552902460098267,
0.32865265011787415,
-0.3128613829612732,
0.18452852964401245,
0.2606052756309509,
0.3010566234588623,
-0.4501849412918091,
0.011145537719130516,
-0.08039665222167969,
-0.295269638299942,
0.8693500757217407,
-0.4869418740272522,
0.371609956026077... | |
= e.longValue();
return ret;
}
}
```
Maybe someone has a better solution though. | [
-0.05965461954474449,
-0.14588074386119843,
0.4122881293296814,
-0.18221019208431244,
0.38153785467147827,
-0.15538643300533295,
0.4533171057701111,
-0.2202465832233429,
0.018089400604367256,
-0.5340428948402405,
-0.3297378420829773,
0.565889298915863,
-0.17491555213928223,
0.3885136544704... | |
I have a project with 5000+ resource strings in it. Almost all of them have periods in their identifier.
We're switching over to automatically generating strongly-typed classes, and of course, because of the periods, we see a few thousand warnings
> The resource name 'blah' is not a valid identifier.
I know it isn't... | [
0.3148011267185211,
0.08133469521999359,
0.2661243677139282,
0.008047400042414665,
-0.011701221577823162,
0.08356354385614395,
0.36643344163894653,
-0.10369855165481567,
-0.5093023777008057,
-0.34174901247024536,
-0.13970127701759338,
0.29232779145240784,
-0.1530507355928421,
0.38396924734... | |
this warning.
Yes, you cannot suppress this warning, it is generated by the resource designer in the IDE. When it auto-generates the code from the Properties\Resources.resx file to the Properties\Resources.Designer.cs file. Look at the .resx file and check the "name" attribute on the `<data>` elements. A period in the... | [
0.35821232199668884,
-0.0838451012969017,
0.32867541909217834,
0.08095762878656387,
0.25114330649375916,
-0.38169947266578674,
0.3552784025669098,
-0.07271628081798553,
-0.26331427693367004,
-0.5430064797401428,
-0.15288136899471283,
0.4686121344566345,
-0.4251954257488251,
0.5848039388656... | |
I want to list out an array of objects and have the items spread out evenly horizontally. If it wasn't a databound array I would just make a grid with the right number of columns and assign each item to a column. Problem is I don't know how to do that with a databound list control.
As a cheap alternative I have the it... | [
0.06528466939926147,
-0.06273815780878067,
0.5105860829353333,
-0.10411551594734192,
-0.04128904640674591,
0.10532436519861221,
-0.3648393154144287,
-0.3011898100376129,
-0.4232136905193329,
-0.9731617569923401,
0.18660742044448853,
0.20001640915870667,
-0.10870831459760666,
0.224853411316... | |
<ItemsPanelTemplate>
<StackPanel Orientation="Horizontal" />
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
<ItemsControl.ItemTemplate>
<DataTemplate>
<Grid>
<Grid.RowDefinitions> | [
-0.42972373962402344,
-0.2688589096069336,
0.35069403052330017,
0.15116341412067413,
-0.21963858604431152,
0.4934467077255249,
-0.3650519549846649,
-0.36633652448654175,
-0.7206939458847046,
-0.851944088935852,
-0.12751010060310364,
-0.1860363930463791,
0.25169697403907776,
-0.050085294991... | |
<RowDefinition Height="auto" />
<RowDefinition />
<RowDefinition Height="auto" />
</Grid.RowDefinitions> | [
-0.29842033982276917,
-0.013942385092377663,
0.21280892193317413,
-0.19089949131011963,
-0.08087822049856186,
0.37655484676361084,
-0.1912139505147934,
-0.4040209949016571,
-0.3829060196876526,
-0.8518932461738586,
0.03355846554040909,
0.5606441497802734,
-0.17825810611248016,
-0.122402265... | |
<Label Content="{Binding Path=Name}" Grid.Row="0" />
<ScrollBar Orientation="Vertical" Grid.Column="0" Grid.Row="1" Minimum="0" Maximum="100000" Value="{Binding Path=DelayInMicroseconds}" SmallChange="100" LargeChange="1000" />
<TextBox Text="{Binding Path=DelayInMicroseconds}" G... | [
-0.13339880108833313,
-0.33281031250953674,
0.776350736618042,
0.27138060331344604,
0.005382020957767963,
0.16869325935840607,
-0.04325801134109497,
-0.6033034920692444,
-0.39385244250297546,
-0.6084871888160706,
0.05377420037984848,
0.08808878809213638,
-0.09363853931427002,
0.36604946851... | |
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
```
Is there a way I can spread them out evenly?
I generally spread list items apart with a margin on the ItemTemplate. Put the margin on the non-starting side (i.e. if the list populates from the left, put the margin on the right). In this way,... | [
0.263753741979599,
-0.2137909233570099,
0.6503704190254211,
0.033331360667943954,
-0.31835269927978516,
0.2483372837305069,
-0.4629058241844177,
-0.3262336850166321,
-0.271075040102005,
-0.9612671732902527,
0.20374491810798645,
-0.026056744158267975,
-0.05789930000901222,
0.235338926315307... | |
<Grid Margin="0 0 8 0">
<Grid.RowDefinitions>
<RowDefinition Height="auto" />
<RowDefinition />
<RowDefinition Height="auto" /> | [
-0.31873151659965515,
-0.011564233340322971,
0.37859147787094116,
-0.16615968942642212,
-0.06832855939865112,
0.4595395028591156,
-0.33352968096733093,
-0.3877025842666626,
-0.3223646283149719,
-0.8103129863739014,
0.14297768473625183,
0.6224236488342285,
0.01432707067579031,
-0.0482012070... | |
</Grid.RowDefinitions>
<Label Content="{Binding Path=Name}" Grid.Row="0" />
<ScrollBar Orientation="Vertical" Grid.Column="0" Grid.Row="1" Minimum="0" Maximum="100000" Value="{Binding Path=DelayInMicroseconds}" SmallChange="100" LargeChange="1000" />
<TextBox Text="{Bindi... | [
-0.10011132806539536,
-0.25535303354263306,
0.749158501625061,
0.19885535538196564,
0.17090335488319397,
0.21397730708122253,
-0.14534123241901398,
-0.7505513429641724,
-0.40304630994796753,
-0.654225766658783,
0.08618859201669693,
0.2144397497177124,
-0.1389899104833603,
0.339152872562408... | |
In my Qt symbian app, I have over ride the negative exit button with back to come back on main screen and then again over ride it with exit to close the app, my app is working fine on emulator but when I test it on device it shows exit button instead of back, some time it shows back also but if I go to the same page tw... | [
-0.07753189653158188,
0.15602168440818787,
0.5011969804763794,
-0.024587994441390038,
-0.1142602264881134,
0.01108370441943407,
0.45656725764274597,
-0.06541954725980759,
-0.05068697780370712,
-0.5924740433692932,
0.3604278266429901,
0.9358662962913513,
-0.3292653262615204,
0.1764095574617... | |
using
```
back->setSoftKeyRole(QAction::NegativeSoftKey);
this->addAction(back);
```
to over ride the exit button before loading the screen and
```
back->setSoftKeyRole(QAction::NegativeSoftKey);
this->removeAction(back);
```
to removing back button when coming back to mainWindow.
Create vertical layout and Widg... | [
-0.04626999795436859,
-0.16984136402606964,
0.9033558368682861,
0.046571142971515656,
0.08111963421106339,
0.21558308601379395,
0.10939250886440277,
-0.2731245160102844,
0.014760533347725868,
-0.8576123714447021,
0.08408773690462112,
0.5120922327041626,
-0.04981456324458122,
0.230824604630... | |
Need to change li position by clicking to move up or to move down.
```
<div>
<ul>
<li>Item1 <a class="moveUp">Move Up</a> <a class="moveDown">Move Down</a></li>
<li>Item2 <a class="moveUp">Move Up</a> <a class="moveDown">Move Down</a></li>
<li>Item3 <a class="moveUp">Move Up</a> <a class="moveDown">Mo... | [
-0.4620208442211151,
-0.10056869685649872,
0.46428269147872925,
-0.15914833545684814,
0.16501712799072266,
0.49611273407936096,
0.09703370183706284,
-0.5070415735244751,
-0.2740285098552704,
-0.6772133708000183,
-0.08565638214349747,
0.3694921135902405,
-0.398726224899292,
-0.0338192693889... | |
but it doesn't work:
```
$(".moveUp").click(function () {
var thisLine = $(this).parent();
var prevLine = thisLine.prev();
prevLine.insertAfter(thisLine);
});
```
Hope some one can help me...
This should work and will also not move the element outside of the UL when you try and move it up at the top or d... | [
-0.27498045563697815,
-0.15691936016082764,
0.8504053354263306,
-0.34634336829185486,
0.4352332055568695,
0.3399583399295807,
0.3751618266105652,
-0.30364251136779785,
-0.2159435898065567,
-0.5952706336975098,
-0.27337777614593506,
0.6565425992012024,
-0.4811609387397766,
0.177947476506233... | |
{
liItem.insertAfter(liItem.next())
}
});
```
Working Example: <http://jsfiddle.net/BDecp/>
Also, your code should be wrapped with this:
```
$(document).ready(function () {
//Code Here
});
``` | [
0.41976040601730347,
-0.14618365466594696,
0.6590716242790222,
-0.11527436971664429,
0.3373425602912903,
-0.397582471370697,
0.02967139519751072,
-0.43179410696029663,
-0.13398490846157074,
-0.6619121432304382,
-0.44175487756729126,
0.6698737144470215,
-0.29692956805229187,
-0.224259942770... | |
Can we installed two instances of Express edition?
I have one instance installed and when I try to install 2nd one, Product Key page/optionbs is grayed out (Specify Free Eidtion / Enter Prod. Key)
Is it by design or due to something I am missing here?
Thanks.
This should work and will also not move the element outsid... | [
-0.05801574885845184,
-0.29820048809051514,
0.4926302134990692,
-0.2619101405143738,
0.19619110226631165,
0.18979109823703766,
0.34583279490470886,
-0.2709607183933258,
0.02303582802414894,
-0.9404767155647278,
-0.0589943565428257,
0.6894611716270447,
-0.5936028957366943,
0.074602104723453... | |
}
});
$('.moveDown').click(function(){
var liItem = $(this).parent();
if (liItem.next().is('li'))
{
liItem.insertAfter(liItem.next())
}
});
```
Working Example: <http://jsfiddle.net/BDecp/>
Also, your code should be wrapped with this:
```
$(document).ready(function () {
//Code Here
});
... | [
0.2869569957256317,
-0.14552508294582367,
0.7542859315872192,
-0.27915865182876587,
0.5741702318191528,
-0.18433943390846252,
0.09261802583932877,
-0.49589645862579346,
-0.2536381483078003,
-0.6270994544029236,
-0.47934490442276,
0.6212408542633057,
-0.42265787720680237,
-0.013377985917031... | |
Look at this simple page:
```
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<style type="text/css">
body {padding:20px;}
#outer {background-color:#ff0000;}
#inner {width:500px; border:1px solid #0000ff;}
</style>
</head>
... | [
0.2945452332496643,
-0.16048353910446167,
0.40257519483566284,
-0.3242526054382324,
0.0009693563333712518,
0.011240142397582531,
0.03517693281173706,
-0.4276759922504425,
-0.34733033180236816,
-0.8530105352401733,
-0.28052404522895813,
0.4442708194255829,
-0.06166990101337433,
-0.033387985... | |
<p>Why the hell outer div bg color does not expand?</p>
</div>
</div>
</body>
</html>
```
**When browser page is shrinked below the width of `<div id="inner">`** (i.e. `500px` in this example) and **then you scroll browser page to the right**, you will see that the right side of the inner div does not have t... | [
0.18490272760391235,
-0.22195906937122345,
0.6137641072273254,
-0.34920984506607056,
0.03953699767589569,
0.014943481422960758,
0.18871743977069855,
0.026362447068095207,
-0.41526272892951965,
-0.8012517094612122,
-0.19719795882701874,
0.6449934244155884,
-0.12096776813268661,
0.0788601189... | |
width so it can not be set to `width:500px;` too).
**EDIT:** in other words I would like to see the red background color of the outer div to fill the total 500px width of the inner div and not to shrink to browser size leaving the right side of the inner div with no red background. In order to do this I can not simply... | [
0.07576654851436615,
-0.19068840146064758,
0.5727478861808777,
-0.12983852624893188,
-0.012668670155107975,
0.003583453129976988,
0.0004537778440862894,
0.009432177990674973,
-0.42479565739631653,
-0.9040516018867493,
-0.17293253540992737,
0.5659646391868591,
-0.07721293717622757,
-0.05444... | |
<http://jsfiddle.net/q8P7Y/>
I have a problem of showing the final score at the end, there is many ways I can go about doing it but I'm not sure what would be the best.
As you can see the next button is just a show/hide of divs and not pages. The score is an id, so obviously only appearing once and it is outside of t... | [
0.28186577558517456,
0.2079831212759018,
0.690626323223114,
0.09086944162845612,
-0.14495013654232025,
-0.3231935203075409,
-0.09874594956636429,
0.08285972476005554,
-0.1770620346069336,
-0.5058785080909729,
-0.04719148203730583,
0.1395852416753769,
0.11288998275995255,
0.3866467177867889... | |
last, but then the score wasn't updating even when using
```
document.getElementsByName("score").innerHTML = score;
```
instead of
```
document.getElementById("score").innerHTML = score;
```
But no luck.
Any ideas on how to go about this?
You can't. At least not that way.
Try this:
```
For Each gal In galle... | [
0.049139901995658875,
0.01351167168468237,
0.9093095660209656,
0.057153891772031784,
-0.17586985230445862,
-0.1355876624584198,
0.03505164757370949,
-0.36786946654319763,
-0.3294945955276489,
-0.7165940403938293,
0.020098164677619934,
0.29242071509361267,
-0.22283878922462463,
-0.007378180... | |
I have a C# plugin that uses a separate C++ DLL. The only reference to that DLL is from within the plugin itself. The parent application loads all plugins in their own AppDomain and unloads this AppDomain when the plugin is unloaded.
I have checked, and I definitely see the application's memory drop when I unload the ... | [
0.08249912410974503,
0.3449503779411316,
0.13969434797763824,
-0.15144014358520508,
-0.04585165157914162,
-0.0144160445779562,
0.24318094551563263,
0.1490420550107956,
-0.35693538188934326,
-0.6111076474189758,
-0.16408799588680267,
0.4940195679664612,
-0.5279027819633484,
0.27026739716529... | |
for a while, but I still can't figure out why just this DLL stays in memory.
AppDomains are a pure managed code construct. Nothing like that exists in native code, nor does Windows have any idea about it. So the scope for a loaded native DLL is the process. Technically, the pinvoke marshaller could reference count the ... | [
0.042214132845401764,
-0.060015685856342316,
0.34947219491004944,
0.2117447555065155,
-0.12152393162250519,
0.06766913086175919,
0.07353639602661133,
-0.13506600260734558,
-0.4854357838630676,
-0.5528855919837952,
-0.03552835434675217,
0.42458799481391907,
-0.2665528655052185,
0.4598044753... | |
through a marshaled delegate.
Clearly disaster strikes if the AppDomain manager unloads a DLL that's used that way, that's a nasty and impossible to diagnose AccessViolation. Particularly nasty since it can trigger a long time after the AppDomain got unloaded.
So the marshaller doesn't implement that kind of counting... | [
0.541584849357605,
-0.05966277793049812,
0.02703896351158619,
0.22447191178798676,
-0.011195105500519276,
-0.29921045899391174,
0.23679699003696442,
-0.43196117877960205,
-0.6068958044052124,
-0.301565945148468,
-0.2635284662246704,
0.4378942847251892,
-0.4515172839164734,
0.23067016899585... | |
the DLL. And pinvoke FreeLibrary() **twice** to get it unloaded forcibly. Neither Windows nor the CLR can't see that you are cheating. You *must* ensure that the DLL can't be used after this. | [
0.31213846802711487,
-0.09681928157806396,
0.49601462483406067,
0.1363426148891449,
-0.037180010229349136,
-0.4820345938205719,
0.24856068193912506,
0.05208265036344528,
-0.2900615632534027,
-0.5267149806022644,
-0.3746830224990845,
0.7018764019012451,
-0.2058529555797577,
0.10029088705778... | |
```
$("#button_title_delete").click(function(){
jQuery.ajax({type:'POST',
url:'delete.php',
data: 'id='+$("bid").val(),
success: function(veri) { $("#delete_result").html(veri);}
});
});
```
When i click the button with "button\_title\_delete" id, this function w... | [
0.0555846132338047,
0.16777485609054565,
0.500917911529541,
-0.0012499764561653137,
-0.15703119337558746,
-0.1283160001039505,
0.5185607075691223,
-0.00993826612830162,
-0.2599033713340759,
-0.5768868327140808,
0.0026905317790806293,
0.8231120109558105,
-0.24857737123966217,
0.288637071847... | |
to use jQuery's [`.on()`](http://api.jquery.com/on/) method to attach the click event. | [
0.1849658042192459,
-0.16482818126678467,
0.5130463242530823,
-0.053895484656095505,
0.1444559097290039,
-0.2066769003868103,
-0.13875001668930054,
0.08546485751867294,
-0.06777767837047577,
-0.2555489242076874,
-0.4510982930660248,
0.4249716103076935,
-0.021170109510421753,
0.019880758598... | |
I'd like to create a progress bar showing the status of a file reading.
I read the file using a C++ class Reader that contains a variable \_progress.
How can I tell to Cocoa to update the progress bar with the value of reader.\_progress without writing any ObjC code in the Reader class?
Any help would be appreciated.... | [
-0.05528503283858299,
0.1482023447751999,
0.6802354454994202,
-0.06110216677188873,
0.20769335329532623,
0.16169175505638123,
0.17204850912094116,
-0.2070508897304535,
-0.3131803870201111,
-0.8970507979393005,
-0.19141972064971924,
0.2392531931400299,
-0.48462504148483276,
0.14078600704669... | |
< 100.)
{
dispatch_async(dispatch_get_main_queue(), ^{
[pc.pi setDoubleValue:reader._progress];
[pc.pi setNeedsDisplay:YES];
});
}
}; // end of progressBlock
// Finally, run the block on a different thread
dispatch_queue_t queue = dispatch_get_global_queue(0, 0);
dispatc... | [
-0.17763008177280426,
-0.37652480602264404,
0.6433175206184387,
-0.2411915808916092,
-0.021632524207234383,
0.34918850660324097,
0.2284785360097885,
-0.4894021451473236,
-0.15852603316307068,
-1.0360816717147827,
-0.04293762147426605,
0.39624184370040894,
-0.45236220955848694,
0.2664920091... | |
Block_release(_cb);
_cb = Block_copy(cb);
}
}
void (^_cb)(double);
protected:
private:
};
int Reader::read()
{
string buffer;
unsigned atomid = 0;
ifstream file;
file.open(_filename.c_str(), ifstream::in);
if (!file.is_open())
{
return IOERROR;
}
file.seekg(0, ios_base::end);
float eof = (float) fil... | [
0.08774691820144653,
0.26946955919265747,
0.7269861698150635,
-0.3204403221607208,
0.4008738398551941,
0.13035690784454346,
0.12546925246715546,
-0.6846303343772888,
-0.27348724007606506,
-0.48496150970458984,
-0.6157647967338562,
0.45512300729751587,
-0.38531580567359924,
0.14670976996421... | |
[[ProgressController alloc] init];
[pc showWindow:sender];
Reader reader("test.txt");
reader.setCallback(^(double progress)
{
dispatch_async(dispatch_get_main_queue(), ^{
[pc.pi setDoubleValue:progress];
[pc.pi setNeedsDisplay:YES];
});
});
reader.read();
}
```
Thanks for your help.
Final... | [
-0.11411864310503006,
-0.06540761142969131,
0.5809047222137451,
-0.047184888273477554,
0.07705101370811462,
-0.002882702276110649,
0.5177457928657532,
-0.21437765657901764,
-0.22663424909114838,
-0.6353135108947754,
-0.4375244081020355,
0.37078210711479187,
-0.4369584321975708,
0.153312578... | |
there some basic optimization I miss here?
Thanks very much for your help. | [
0.22895365953445435,
0.15149207413196564,
-0.25324010848999023,
0.4829753637313843,
0.16769039630889893,
-0.11508901417255402,
0.2446834146976471,
0.7327021360397339,
0.01576034538447857,
-0.7163184285163879,
0.2175339013338089,
0.48755231499671936,
0.12949979305267334,
-0.2088840454816818... | |
Given the functions:
```
let doTrue = fun(x) -> true
let doFalse = fun(x) -> false
```
I want to reuse the function signature so that i can get
```
let myFunDefinition = ??? // <-- this is the function signature that i am trying to reuse
let doTrue = myFunDefinition -> true // <-- now i don't have to type fun(x) an... | [
0.22199001908302307,
0.14267033338546753,
0.55251544713974,
-0.23363153636455536,
-0.24868419766426086,
-0.05785047635436058,
0.030209233984351158,
-0.3332471251487732,
-0.2895306944847107,
-0.37463152408599854,
-0.04934113100171089,
0.7605399489402771,
-0.5253545045852661,
-0.103276647627... | |
I don't think that this is really relevant to your question because I don't see what it would mean to "reuse" the signature. Instead, it seems like you want some form of text macro that will allow you to type `myFunDefinition` and have that replaced by the text `fun (x)`. Aside from the fact that your replacement text ... | [
0.5521246790885925,
0.09419760853052139,
0.19195517897605896,
0.2313477098941803,
-0.026878980919718742,
-0.011934487149119377,
0.23102831840515137,
0.47366270422935486,
-0.5172709226608276,
-0.4592803418636322,
0.024458108469843864,
0.4798740744590759,
-0.06081979721784592,
0.151026114821... | |
concise formulation `let doTrue x = ...` instead of `let doTrue = fun x -> ...`
* If you actually want `doTrue` and `doFalse` to be the *application* of some other function to `true` and `false`, then that is easy:
```
let myFunDefinition b = {{some function of b}}
let doTrue = myFunDefinition true
let doFalse = myFu... | [
0.1553005874156952,
-0.052895110100507736,
0.5422482490539551,
-0.4176860451698303,
-0.01422558818012476,
-0.16351769864559174,
0.11821968853473663,
-0.30899032950401306,
0.19902177155017853,
-0.45614859461784363,
-0.42811617255210876,
0.8032564520835876,
-0.3678975999355316,
-0.2098857164... | |
instead want some other sort of abstraction, then the other answers make some reasonable guesses as to what that might mean. In general, you will get more helpful answers if you spend more time articulating your question so that it clearly communicates what you are trying to do. | [
0.5041152238845825,
0.0009880398865789175,
-0.18614982068538666,
0.6297358274459839,
-0.05539489910006523,
0.10440821945667267,
0.3216479420661926,
-0.07227291166782379,
-0.07946649938821793,
-0.7434327602386475,
-0.2668946385383606,
0.511198103427887,
0.0782640352845192,
-0.13175044953823... | |
I have a table which contains many records. I'm looking for an efficient way to count how many times an element is repeated.
Example table:
```
id name
1 ana
2 john
3 tom
4 ana
5 john
```
I've done so far , but it is inefficient.
```
$number = 0;
for ($i =1 ; $i <= mysql_num_rows($qu... | [
0.12030858546495438,
0.24132108688354492,
0.2846390902996063,
-0.0980391725897789,
0.258821040391922,
0.49303922057151794,
0.49033233523368835,
-0.4777129292488098,
-0.3267902433872223,
-0.3513193428516388,
0.25672101974487305,
0.21624326705932617,
-0.3238535225391388,
0.38276544213294983,... | |
if ( $table[$i] == $table[$j])
$number++;
if ($number > 2 )
echo $number;
```
You can do this directly in SQL
```
SELECT `name`, COUNT(*) AS `count`
FROM `table`
GROUP BY `name`
```
It will be more efficient, since you don't have to transfer every row to PHP. | [
-0.08260956406593323,
0.08591724932193756,
0.29210275411605835,
-0.2819734811782837,
-0.16912899911403656,
-0.13040533661842346,
0.09141053259372711,
-0.4608161151409149,
-0.12212251126766205,
-0.2595510482788086,
-0.04743681102991104,
0.28335869312286377,
-0.40040624141693115,
-0.09374153... | |
I have a dependency that sometimes cannot be resolved (don't get to it... it is ok)
```
<dependency>
<groupId>com.g.g</groupId>
<artifactId>art123</artifactId>
<version>1</version>
<type>rar</type>
<scope>system</scope
<systemPath>some location</systemPath>
</dependency>
```
when I clean install the entire pr... | [
0.3870149850845337,
-0.07411062717437744,
0.3147544860839844,
-0.186594620347023,
-0.026106664910912514,
-0.13497531414031982,
0.2666908800601959,
-0.31363511085510254,
-0.13168641924858093,
-0.7237828373908997,
-0.21629710495471954,
0.604712724685669,
-0.2921280860900879,
0.03535412251949... | |
Current project is an Mvc4 application, I had Ioc working and recently it just stopped.
```
DependencyResolver.SetResolver(New UnityDependencyResolver(RegisterIocServices()))
```
That line was working, and now I am getting the following error:
> ArgumentException was unhandled by user code
>
>
> The type Unity.Mv... | [
0.11590956151485443,
0.2005680799484253,
0.37835609912872314,
-0.13723208010196686,
0.07713355869054794,
-0.17445023357868195,
0.5803734660148621,
0.026592036709189415,
-0.2882566750049591,
-0.7311726808547974,
0.04367940127849579,
0.5650708079338074,
-0.2037239968776703,
0.310540080070495... | |
intermittently, doing a full solution clean and build resolved it once in awhile. It would work, then all of a sudden revert to the error message.
So I finally gave up on Unity.Mvc this morning and implemented Autofac instead. Once I set up my bootstrapper file for Autofac, it worked on the first compile and has been ... | [
0.016978424042463303,
-0.00855225883424282,
0.4587467312812805,
-0.36845946311950684,
-0.21276810765266418,
0.14358586072921753,
0.5306342840194702,
-0.21762727200984955,
-0.10252900421619415,
-0.5936015844345093,
0.156930074095726,
0.9323144555091858,
-0.4097798466682434,
-0.1203271374106... | |
MyCompany.Data.Repositories
Imports MyCompany.Services
Imports MyCompany.Web.Mvc.Public.Bootstrap
Imports MyCompany.Web.Mvc.Public.Services
#End Region
#Region "Assembly Meta"
' This tells the app to run the "Start" method prior to running the App_Start method in Global.asax
<Assembly: WebActivator.PreApplicationSta... | [
-0.22173823416233063,
0.1829710602760315,
0.6163216233253479,
-0.20783112943172455,
0.11474310606718063,
0.25979143381118774,
0.2683423161506653,
-0.3020474910736084,
-0.1732611060142517,
-0.717009425163269,
-0.3886459469795227,
0.19046834111213684,
-0.42089712619781494,
0.0540543198585510... | |
''' <remarks>
''' This line of code below could alternatively be placed in Global.asax App_Start(), doing
''' so in this manner ensures that this gets run "PreStart".
''' </remarks>
Public Shared Sub Initialize()
' Create Unity dependency container.
Dim dependenc... | [
-0.0772419273853302,
-0.14601917564868927,
0.4174838960170746,
-0.2868371605873108,
0.28610876202583313,
-0.05963495001196861,
0.4149993360042572,
0.027734816074371338,
-0.06704796850681305,
-0.6732375621795654,
-0.2332279235124588,
0.36967790126800537,
-0.34621724486351013,
0.308492183685... | |
' Set DI resolver
DependencyResolver.SetResolver(New AutofacDependencyResolver(dependencyContainer))
End Sub
''' <summary>
''' Registers the IOC types/services.
''' </summary>
''' <returns></returns>
''' <remarks></remarks>
Private Shared Function Bu... | [
-0.04728008061647415,
-0.3838452398777008,
0.5426326394081116,
-0.025058943778276443,
-0.11994046717882156,
0.12169166654348373,
0.1648234874010086,
-0.3728265166282654,
0.2524489164352417,
-0.562558114528656,
-0.43350842595100403,
0.43412163853645325,
-0.7332252860069275,
0.01874534226953... | |
Dim builder = New ContainerBuilder
With builder
' Register Controllers
.RegisterControllers(Assembly.GetExecutingAssembly())
' Custom MyCompany/Mvc objects
.RegisterType(Of FormsAuthenticationService)().As(Of IFormsAuthenticationService)().In... | [
0.20529623329639435,
-0.19421668350696564,
0.7161431908607483,
0.15048730373382568,
-0.1256701499223709,
0.18055132031440735,
0.34900468587875366,
-0.6008008122444153,
-0.041750483214855194,
-0.5094941854476929,
-0.2231101542711258,
0.4732365608215332,
-0.37635400891304016,
0.1815523952245... | |
.RegisterType(Of AccountMembershipService)().As(Of IMembershipService)().InstancePerHttpRequest()
'***************************************************************
'* MyCompany service objects.
'***************************************************************
... | [
-0.17303849756717682,
0.25746291875839233,
0.5964922308921814,
0.12911297380924225,
-0.2788468897342682,
-0.11601077020168304,
0.2650672495365143,
-0.13610367476940155,
-0.23520278930664062,
-0.9892711639404297,
-0.26119574904441833,
0.21715307235717773,
-0.15842317044734955,
0.13389624655... | |
builder.RegisterAssemblyTypes(GetType(CatalogCodeService).Assembly).
Where(Function(t) t.Name.EndsWith("Service")).AsImplementedInterfaces().InstancePerHttpRequest()
'***************************************************************
'* MyCompany repository objects (us... | [
0.009500385262072086,
0.2345939725637436,
0.19122473895549774,
0.18385133147239685,
-0.5332701802253723,
0.23068471252918243,
0.5225868821144104,
-0.4474209249019623,
0.021735314279794693,
-0.8676862716674805,
-0.1862102746963501,
0.2652665078639984,
-0.19361159205436707,
0.324919313192367... | |
' This is auto registration, it replaces all the individual registration lines of code below.
builder.RegisterAssemblyTypes(GetType(CatalogCodeRepository).Assembly).
Where(Function(t) t.Name.EndsWith("Repository")).AsImplementedInterfaces().InstancePerHttpRequest()
End Wi... | [
0.20853778719902039,
0.25407490134239197,
0.3091789782047272,
-0.1261410117149353,
-0.13378585875034332,
0.06807621568441391,
0.5368286967277527,
-0.533596396446228,
-0.01661725901067257,
-0.6992185711860657,
-0.18482869863510132,
0.4287112057209015,
-0.38744431734085083,
0.478156775236129... | |
I have 2 `Android` library projects. *LibraryA* and *LibraryB*.
I have a project called *project1* which needs to reference classes and stuff that are in *LibraryA* and *LibraryB*.
I am using the auto generated `Ant` script inside `eclipse` to build all the projects. Note: that i have removed all other builders from ... | [
0.7162615060806274,
0.33666887879371643,
0.08339238166809082,
-0.294508695602417,
-0.26402607560157776,
0.1654779016971588,
0.1433141827583313,
-0.049960698932409286,
0.0022790483199059963,
-0.8709007501602173,
0.11144059896469116,
0.6708999872207642,
-0.3046931326389313,
0.028357654809951... | |
`imports cannot be resolved` and numerous other errors. Basically it is telling me the references to the library projects is not there. It is also telling me the `R's` cannot be resolved either.
**I thought ADT17 was going to fix this issue but it still persists. Am i doing something wrong? How can i solve this issue,... | [
0.29549580812454224,
0.31780746579170227,
0.46830853819847107,
0.04774184897542,
-0.14911900460720062,
-0.10297884047031403,
0.48383837938308716,
-0.20193356275558472,
-0.3028225898742676,
-0.7172567248344421,
-0.05156950280070305,
0.865298867225647,
-0.4202181100845337,
0.1897186636924743... | |
require editing the auto generated build.xml that android generates. It seems like this type of thing should be working out of the box.
I figured out the problem. `gen` was not included as a `src` folder for the project. Once i included `gen` as a source folder all the `R` references started working.
**I do NOT have t... | [
0.37278470396995544,
0.43326544761657715,
0.31933170557022095,
-0.23314926028251648,
-0.07473214715719223,
0.038271062076091766,
0.37740761041641235,
-0.22489702701568604,
0.19067169725894928,
-0.9386712312698364,
0.1840931922197342,
0.9067702889442444,
-0.32838332653045654,
0.223896935582... | |
is what i was doing pre-ADT17 and was hoping to avoid in ADT17, but it seems like this issue is still not resovled. If anyone has any suggestions on how to fix that problem, please let me know. | [
0.2358580082654953,
0.14206568896770477,
0.17916248738765717,
0.25282129645347595,
0.1418028175830841,
-0.2841684818267822,
0.269752562046051,
0.32478389143943787,
-0.20207247138023376,
-0.6991199851036072,
-0.11809658259153366,
0.3319910764694214,
0.02442522533237934,
0.13861437141895294,... | |
So i've been writing some applications in C and using OpenMP for parallelization. I implemented a Monte-Carlo Pi estimate and found that the normal rand() function is not reentrent and thread-safe. The recommendation is to use the drand48\_r option.
Now here is the problem, my application compiles fine on Linux eg. Ub... | [
0.05638556554913521,
0.12858641147613525,
0.1478424370288849,
-0.17707942426204681,
-0.05881771817803383,
0.07517635077238083,
0.3437787890434265,
-0.33636537194252014,
-0.04842379316687584,
-0.47506001591682434,
0.07399370521306992,
0.6386100053787231,
-0.3971971869468689,
0.2852967083454... | |
&randBuffer);
drand48_r(&randBuffer, &x);
printf("Random number: %f\n", x);
return EXIT_SUCCESS;
}
```
I read up about it and I found a note in the man pages that,
> These functions are GNU extensions and are not portable.
Here is a link to it: <http://www.kernel.org/doc/man-pages/online/pages/man3/drand48... | [
-0.33942416310310364,
-0.0687946155667305,
0.14207348227500916,
-0.14916355907917023,
-0.26581573486328125,
0.014016018249094486,
0.17400169372558594,
-0.5829190611839294,
-0.25350478291511536,
-0.5406134724617004,
-0.10243935883045197,
0.771668553352356,
-0.36535027623176575,
0.2725802063... | |
same type of random generator as `drand48` but compared to that receives the state of the random generator as a function parameter, so it perfectly does the job.
The `_r` extensions store the result in place (the second parameter) and return an error code that is always guaranteed to be `0`. I don't see much use in al... | [
-0.03766676411032677,
-0.0007490766001865268,
0.08612271398305893,
-0.08985276520252228,
-0.0927051305770874,
-0.20943386852741241,
0.13313838839530945,
-0.23480263352394104,
-0.11003457754850388,
-0.5123310089111328,
0.05717608332633972,
0.8758968114852905,
-0.31585225462913513,
0.1806911... | |
I'm testing some cookies that I'm creating via JavaScript. Is there a way to check if the cookie was set in Chrome Developer Tools or something similar?
To check the current page's cookies using Chrome:
**Option 1**
1. Open Developer Tools (usually F12)
2. Click the "Application" tab (used to be "Resources")
3. Expan... | [
0.6863390207290649,
-0.00338542927056551,
0.4183594286441803,
0.13935399055480957,
-0.06828277558088303,
-0.3262157142162323,
0.38938668370246887,
-0.27090945839881897,
-0.043635014444589615,
-1.0109927654266357,
-0.03666989877820015,
0.8341502547264099,
-0.14070594310760498,
-0.3278740942... | |
data using javascript. Note that the results will be restricted based on how websites are allowed to access local data from other sites ([see MDN Same-origin policy](https://developer.mozilla.org/en-US/docs/Web/Security/Same-origin_policy)).
**Option 3**
There is also `chrome://settings/siteData` (was previously sett... | [
0.5264573693275452,
-0.21993760764598846,
0.3349115550518036,
-0.016769997775554657,
-0.1277209222316742,
-0.42962101101875305,
0.033212706446647644,
0.0584157295525074,
0.09269576519727707,
-0.7809892892837524,
-0.07588894665241241,
0.3227216899394989,
-0.2290603667497635,
0.1602549552917... | |
I'm trying to create a preferences window.
In it I have some checkbox style NSButtons. The problem is that they aren't updating when I call the `setState:` method. I access the `standarUserDefaults` when then window is initialized to get the state they should be in and was planning to change them depending on what s... | [
0.17706298828125,
-0.04141267389059067,
0.20417624711990356,
0.06341949105262756,
0.034036554396152496,
0.1365651935338974,
0.26211318373680115,
-0.28541916608810425,
-0.06988658756017685,
-0.5604131817817688,
0.2749136984348297,
0.35313284397125244,
-0.3531425893306732,
0.1282542943954467... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.