text stringlengths 0 30.5k | title stringclasses 1
value | embeddings listlengths 768 768 |
|---|---|---|
= Marshal.AllocHGlobal((int)mcd.cbDetails);
mixerGetControlDetails(IntPtr.Zero, ref mcd, MIXER.GETCONTROLDETAILSF_VALUE | MIXER.OBJECTF_MIXER);
int rtn = Marshal.ReadInt32(mcd.paDetails);
Marshal.FreeHGlobal(mcd.paDetails);
return rtn != 0;
}
static void AdjustVolume(MixerInfo mi, int delta){
VO... | [
0.11840135604143143,
0.016622569411993027,
0.7484614849090576,
-0.14489291608333588,
0.12932328879833221,
0.11243505775928497,
0.6317059397697449,
-0.7713150382041931,
-0.1639951765537262,
-0.16071546077728271,
-0.3193812370300293,
0.7394841313362122,
-0.2040175050497055,
0.354844093322753... | |
volume.right = Math.Max(mi.minVolume, volume.right + delta);
}
SetVolume(mi, volume);
}
static void SetVolume(MixerInfo mi, VOLUME volume){
MIXERCONTROLDETAILS mcd = new MIXERCONTROLDETAILS();
mcd.cbStruct = (uint)Marshal.SizeOf(typeof(MIXERCONTROLDETAILS));
mcd.dwControlID = mi.volumeCtl;... | [
0.1595512181520462,
0.1410594880580902,
1.0026963949203491,
-0.02555624209344387,
0.017123661935329437,
0.04334739223122597,
0.5343222618103027,
-0.793373703956604,
-0.2881854474544525,
-0.18699918687343597,
-0.30304643511772156,
0.25565627217292786,
0.05834817513823509,
0.3909917175769806... | |
mixerSetControlDetails(IntPtr.Zero, ref mcd, MIXER.GETCONTROLDETAILSF_VALUE | MIXER.OBJECTF_MIXER);
Marshal.FreeHGlobal(mcd.paDetails);
}
static void SetMute(MixerInfo mi, bool mute){
MIXERCONTROLDETAILS mcd = new MIXERCONTROLDETAILS();
mcd.cbStruct = (uint)Marshal.SizeOf(typeof(MIXERCONTROLDETAILS))... | [
0.298161119222641,
-0.08048351109027863,
0.6258174777030945,
-0.2861851453781128,
0.07724065333604813,
0.05006007105112076,
0.8747612237930298,
-1.036832332611084,
-0.14549244940280914,
-0.2099219560623169,
-0.1639612764120102,
0.4740041196346283,
-0.3853239119052887,
0.22788183391094208,
... | |
| MIXER.OBJECTF_MIXER);
Marshal.FreeHGlobal(mcd.paDetails);
}
```
This code is huge and ugly. It's a translation of some C++ code, and with having to define all the P/Invoke stuff, it's a lot more code. But I've tested it, and it works. To use it, you simply need something like:
```
MixerInfo mi = GetMixerContr... | [
0.36756229400634766,
0.22859326004981995,
1.2288423776626587,
-0.19272403419017792,
-0.13725818693637848,
0.020153308287262917,
0.4998779296875,
-0.633253276348114,
-0.04769061133265495,
-0.3845677077770233,
-0.35503119230270386,
0.7231485247612,
-0.306835412979126,
0.28826892375946045,
... | |
// shhhh!!!!!!
```
**WARNING**
Due to the use of fixed-sized ints and field offsets, this may fail fantastically on 64-bit Windows. I don't know, I haven't tested it and haven't paid enough attention to know if these field sizes expand to 64 bits. *caveat codor*
**EDIT**
For the sake of simplicity (relatively spea... | [
0.45305177569389343,
0.21771018207073212,
0.20629817247390747,
-0.23587775230407715,
0.1243823766708374,
-0.13828109204769135,
0.8245179653167725,
0.10368189215660095,
0.0272534042596817,
-0.6903927326202393,
-0.10529516637325287,
0.9712258577346802,
-0.15634123980998993,
-0.10575172305107... | |
Recently I tried CodeSmith templates for NHibernate. As many of you might watched, there is a video explaining how to create a Petshop.Data using these templates. My question is what is the correct architecture in this approach? Should we have a BLL (or Services) layer to interact with this Petshop.Data or directly cal... | [
0.2746555805206299,
-0.0018817553063854575,
0.26209479570388794,
0.22625327110290527,
-0.38706398010253906,
0.04070765897631645,
0.21534037590026855,
-0.29854416847229004,
-0.41478511691093445,
-0.5640458464622498,
0.07738544046878815,
0.5009889006614685,
-0.34958457946777344,
0.1518210619... | |
they get populated from the database (but NHibernate takes care of that for you anyways). If you do use a Service Layer it gives you one more point of flexibility/control. I always use one. | [
0.5754172205924988,
-0.015421018935739994,
0.08853093534708023,
0.15151652693748474,
-0.06448271870613098,
-0.22420883178710938,
-0.015810959041118622,
0.1847638487815857,
-0.27141228318214417,
-0.8956459164619446,
-0.0036524194292724133,
0.4645684063434601,
-0.15610893070697784,
0.1341124... | |
Is there any reason to prefer a `CharBuffer` to a `char[]` in the following:
```
CharBuffer buf = CharBuffer.allocate(DEFAULT_BUFFER_SIZE);
while( in.read(buf) >= 0 ) {
out.append( buf.flip() );
buf.clear();
}
```
vs.
```
char[] buf = new char[DEFAULT_BUFFER_SIZE];
int n;
while( (n = in.read(buf)) >= 0 ) {
ou... | [
-0.13070669770240784,
0.1162734180688858,
0.3461880683898926,
-0.3377809524536133,
-0.14142796397209167,
0.1934538185596466,
0.21136309206485748,
-0.006045414134860039,
-0.252672016620636,
-0.5833978652954102,
-0.15881945192813873,
0.5251383185386658,
-0.46012893319129944,
0.04231777787208... | |
I'm facing a real problem in understanding how to draw a variable diagram to a linked list
In the book I'm reading its not giving enough info
I will post an example:
---
the insert:
```
public void Insert(Object newItem, Object after)
{
Node current = new Node();
Node newNode = new Node(newItem);
curr... | [
-0.24072962999343872,
-0.26581254601478577,
0.7725158929824829,
-0.13557521998882294,
0.4497932493686676,
-0.16641198098659515,
0.10615889728069305,
-0.032970625907182693,
-0.1651141345500946,
-0.6672672629356384,
-0.2512761652469635,
0.5962050557136536,
-0.3311472237110138,
0.290500074625... | |
return current;
}
public void Remove(Object n)
{
Node p = FindPrevious(n);
if (!(p.Link == null))
p.Link = p.Link.Link;
}
```
I've searched the net for more info but each time I found different info can anyone help please
Are you trying to draw it out on paper for homework? If so, the Link property o... | [
0.03762057051062584,
-0.19265404343605042,
0.35945945978164673,
-0.0792732983827591,
0.1953199952840805,
-0.08377218246459961,
0.23065949976444244,
-0.06495850533246994,
-0.3070833086967468,
-0.5090612173080444,
-0.03951098397374153,
0.20845836400985718,
-0.4575550854206085,
0.467067301273... | |
you would have two properties, the Item and the Link. Link would point to the next node in the chain and Item would point to the item outside the list.
The code you provide looks like a singly linked list. See the Wikipedia page on [linked lists](http://en.wikipedia.org/wiki/Linked_list#Singly-linked_list) for an exam... | [
0.20475073158740997,
-0.30640870332717896,
0.3995727002620697,
0.3146395981311798,
-0.08102931082248688,
0.10180331766605377,
0.023029539734125137,
-0.1912531852722168,
-0.2588181793689728,
-0.8666175007820129,
-0.03929432854056358,
0.17696382105350494,
-0.3649819493293762,
0.3193645179271... | |
One of my Websites is on a Shared Hosting Provider, running either .net 2.0 or .net 3.0, but not 3.5 SP1.
I wonder if it would be possible to still use 3.5 SP1 by simply deploying all the 3.5 assemblies into the /bin Folder, since technically it's all still the 2.0 CLR.
I know that if my Host ever updates I have to r... | [
0.710128664970398,
0.005007423926144838,
0.26680368185043335,
0.13443933427333832,
-0.04300703480839729,
-0.3763793110847473,
0.584131121635437,
0.3754730820655823,
-0.23550976812839508,
-0.37863579392433167,
0.08825793117284775,
-0.07138145714998245,
-0.10749223083257675,
0.32796046137809... | |
X"?
Primary reason is because I want to use ASP.net MVC and possibly ADO.net Entity Framework, but I do not want to make a contract with yet another Hosting provider.
Thanks!
I'm pretty sure you can't do this, but googling on the following blogs may get you the definitive answer:
[ScottGu](http://weblogs.asp.net/Sco... | [
0.39796218276023865,
0.14659735560417175,
0.5658086538314819,
0.08070792257785797,
-0.08239277452230453,
-0.29646915197372437,
0.1774054318666458,
0.13261504471302032,
-0.2741616368293762,
-0.5278611183166504,
0.009124740958213806,
0.4089944064617157,
-0.4279809594154358,
0.436708509922027... | |
should explode loudly, not having the same contracts and the like.
Personally, I wouldn't try it, especially on production. But if you can take the site down for a while, give it a go. Worst case, you have to delete the files and re-upload the old site.
YMMV :) | [
0.5912203192710876,
0.28901728987693787,
0.2575431764125824,
0.1637750267982483,
0.2136368602514267,
-0.4426642060279846,
0.16491754353046417,
0.34926000237464905,
-0.15456031262874603,
-0.2516533136367798,
-0.2600269913673401,
0.7196058034896851,
-0.09197340160608292,
0.2346460223197937,
... | |
I am developing an application using the ASP.NET MVC platform, which will be exposed as a service over the web (the [SaaS](http://en.wikipedia.org/wiki/Software_as_a_Service) model). I am trying to determine the best way to partition the URL namespace for each user account. The application will need to be accessed secu... | [
0.29829883575439453,
0.3974401652812958,
0.2734065055847168,
-0.22045469284057617,
-0.0447879433631897,
0.12637333571910858,
0.20457151532173157,
0.011068852618336678,
-0.3609251081943512,
-0.5448606014251709,
-0.03634590283036232,
0.04678668454289436,
-0.0950237438082695,
0.45806187391281... | |
would require a wildcard SSL
certificate (e.g. mapped to
\*.example.com) so each user can seamlessly access their account via
SSL. By seamless I mean without the
web browser warning the user about
SSL certificate problems. The only
drawback I can think of is that
wildcard certs seem to be
considerably more expensive th... | [
0.07171274721622467,
0.014283087104558945,
0.44315674901008606,
0.28069236874580383,
0.07532345503568649,
-0.2346908003091812,
0.41404813528060913,
0.11306789517402649,
-0.23103870451450348,
-0.6305469274520874,
-0.08945107460021973,
0.052511248737573624,
-0.17964671552181244,
0.3469781577... | |
our
servers would have to maintain the
private keys for all the users'
certs, and we would have to design a
system that allowed users to
securely transmit their private keys
to our servers. Even if we had such
a system, I feel it would be too
much of a burden on users to have to
acquire a certificate then submit
the pr... | [
0.49819374084472656,
0.2547030448913574,
0.49954137206077576,
0.234280064702034,
0.142240971326828,
-0.16403472423553467,
0.3550112843513489,
-0.06655015796422958,
-0.14823615550994873,
-0.41300860047340393,
-0.19872570037841797,
0.2412877231836319,
-0.17207731306552887,
0.1312023699283599... | |
some other big
company like Verisign who
specializes in this sort of thing.
* Despite the apparent pain of this
approach, this option does enable
some features that we may want to
provide in the future, i.e. allowing
user's to have their own branded
version of the app accessed via
their own company domain name.
Option... | [
0.4676334261894226,
0.1743946671485901,
0.6456912159919739,
0.1349562257528305,
0.06602077931165695,
-0.25833335518836975,
0.4092431366443634,
0.15913589298725128,
-0.27486225962638855,
-0.5793846249580383,
-0.23094378411769867,
0.3761439919471741,
-0.0501495823264122,
0.23565228283405304,... | |
question to you all is: what option would you choose, and why? I would especially love to hear real-world examples and experiences, but any other issues or concerns that I haven't already presented would be appreciated.
I would go with A. This solution is not very expensive, it scales well and it does not limit you to ... | [
0.4373362064361572,
-0.07387208938598633,
0.3262661397457123,
0.4956604838371277,
-0.05295826867222786,
-0.19988952577114105,
0.10819188505411148,
-0.02944794110953808,
-0.40358659625053406,
-0.39557594060897827,
0.0165682565420866,
0.2217351794242859,
0.14915241301059723,
0.08415547013282... | |
These certificates works in (almost) any browser, but they doesn't come with the validation, VeriSign provides. I don't know whether you need this.
If you go with option B, you have to purchase a certificate per user, but with a wildcard certificate, the certificate will be paid after a few sign-ups and the rest will ... | [
0.5952557325363159,
-0.004992764908820391,
0.44579392671585083,
0.4857056140899658,
0.3045992851257324,
-0.49898582696914673,
0.2392779439687729,
-0.12837810814380646,
-0.16324865818023682,
-0.3802163004875183,
0.1674140989780426,
0.08684644103050232,
0.18214282393455505,
-0.15414530038833... | |
What is the best way to block certain input keys from being used in a TextBox with out blocking special keystrokes such as `Ctrl`-`V`/`Ctrl`-`C`?
For example, only allowing the user to enter a subset of characters or numerics such as A or B or C and nothing else.
I would use the keydown-event and use the e.cancel to s... | [
0.17070968449115753,
0.01931849494576454,
0.16582496464252472,
0.16740456223487854,
0.09620561450719833,
-0.24652624130249023,
0.028219878673553467,
-0.13623498380184174,
-0.010072074830532074,
-0.3100303113460541,
-0.15696319937705994,
0.4470328092575073,
-0.23560848832130432,
0.265598326... | |
a couple of variants laying around that I use for time to time, some allowing money-formatting and input, some for time editing and so on.
The good thing to do it as a user control is that you can add to it and make it to your own killer-text-box. ;) | [
0.22291457653045654,
-0.05338038504123688,
0.38883259892463684,
0.30028218030929565,
-0.04269309341907501,
0.11370240896940231,
0.04885250702500343,
-0.07655008137226105,
-0.33297330141067505,
-0.3572302758693695,
0.40767478942871094,
0.4500238001346588,
-0.4555574953556061,
-0.04220056906... | |
I am trying to resolve Euler Problem 18 -> <http://projecteuler.net/index.php?section=problems&id=18>
I am trying to do this with c++ (I am relearning it and euler problems make for good learning/searching material)
```
#include <iostream>
using namespace std;
long long unsigned countNums(short,short,short array[][... | [
-0.0296171922236681,
0.2676062285900116,
0.5933035016059875,
-0.22024522721767426,
0.22806093096733093,
0.6366817355155945,
0.41384148597717285,
-0.44038793444633484,
-0.10479924827814102,
-0.355955570936203,
-0.2520865797996521,
0.3726399540901184,
-0.5055751204490662,
-0.0549635402858257... | |
{17,47,82,0,0,0,0,0,0,0,0,0,0,0,0},
{18,35,87,10,0,0,0,0,0,0,0,0,0,0,0},
{20,4,82,47,65,0,0,0,0,0,0,0,0,0,0}, | [
-0.3384057879447937,
0.42334362864494324,
0.39454928040504456,
-0.021082758903503418,
0.11467402428388596,
1.102288007736206,
0.09000242501497269,
-0.20506402850151062,
-0.321114718914032,
-0.20260103046894073,
-0.1389254331588745,
0.0771016851067543,
-0.18662980198860168,
0.50801533460617... | |
{19,1,23,75,3,34,0,0,0,0,0,0,0,0,0},
{88,2,77,73,7,63,67,0,0,0,0,0,0,0,0},
{99,65,4 ,28,6,16,70,92,0,0,0,0,0,0,0},
{41,41,26,56,83,40,80,70,33,0,0,0,0,0,0}, | [
-0.35116082429885864,
0.5023166537284851,
0.3923913240432739,
-0.011639685370028019,
0.18322136998176575,
1.2147347927093506,
0.17826370894908905,
-0.14713220298290253,
-0.3975014090538025,
-0.24311496317386627,
-0.11695370823144913,
0.153753861784935,
-0.21580719947814941,
0.4705296456813... | |
{41,48,72,33,47,32,37,16,94,29,0,0,0,0,0},
{53,71,44,65,25,43,91,52,97,51,14,0,0,0,0},
{70,11,33,28,77,73,17,78,39,68,17,57,0,0,0},
{91,71,52,38,17,14,91,43,58,50,27,29,48,0,0}, | [
-0.3561607003211975,
0.47280943393707275,
0.27762487530708313,
0.00925541203469038,
0.20832566916942596,
1.3204922676086426,
0.27583974599838257,
-0.09908302873373032,
-0.5010984539985657,
-0.1871490627527237,
0.003920212388038635,
0.19450493156909943,
-0.16025219857692719,
0.3679687976837... | |
{63,66,4,68,89,53,67,30,73,16,69,87,40,31,0},
{4,62,98,27,23,9,70,98,73,93,38,53,60,4,23}};
for (short i = 0;i<15;i++) {
for (short m=0;m<15;m++) {
if (piramide[i][m] == 0) | [
-0.19813019037246704,
0.022608568891882896,
0.3852260708808899,
-0.33995866775512695,
0.3467821478843689,
0.8042764663696289,
0.2882321774959564,
-0.5530892610549927,
-0.2606183588504791,
-0.31478002667427063,
-0.05099913850426674,
0.10679980367422104,
-0.2682383954524994,
0.18513724207878... | |
break;
sum = countNums(i,m,piramide,15,true,true);
if (sum > max)
max = sum;
sum = countNums(i,m,piramide,15,true,false);
if (sum > max)
max = | [
-0.12089087069034576,
-0.17541292309761047,
0.4373982846736908,
-0.21015295386314392,
0.28620684146881104,
0.0548064224421978,
0.5050792694091797,
-0.5591701865196228,
-0.4802391231060028,
0.0978778749704361,
-0.5687312483787537,
0.2646498382091522,
-0.12718245387077332,
-0.034629676491022... | |
sum;
sum = countNums(i,m,piramide,15,false,true);
if (sum > max)
max = sum;
sum = countNums(i,m,piramide,15,false,false);
if (sum > max)
max = sum; | [
-0.2049994319677353,
-0.17102505266666412,
0.6189020276069641,
-0.4515056908130646,
0.06742300093173981,
0.23366683721542358,
0.34038296341896057,
-0.6203722357749939,
-0.1362038105726242,
-0.057068221271038055,
-0.5053300261497498,
0.3065519332885742,
-0.25133073329925537,
0.1331088542938... | |
}
}
cout << max;
return 0;
}
long long unsigned countNums(short start_x,short start_y,short array[][15],short size, bool goright,bool goright2) {
long long unsigned currentSum;
currentSum = array[start_x][start_y];
if (goright) { //go right
if ((start_x + 1) < size)
start... | [
-0.193013995885849,
-0.46965163946151733,
0.6622374653816223,
-0.23897318542003632,
0.43272873759269714,
-0.08587058633565903,
-0.016033092513680458,
-0.3237515389919281,
-0.24676840007305145,
-0.025896577164530754,
-0.3866196274757385,
0.31596460938453674,
-0.09361687302589417,
0.05112871... | |
}
else //go down
if ((start_x + 1) < size)
start_x++;
if (goright2) { //still going right
for (short i = start_x, m = start_y;i< size && m < size;i++,m++) {
currentSum += array[i][m];
}
} | [
-0.22624090313911438,
-0.6577609181404114,
0.77345210313797,
-0.0032022607047110796,
0.423544704914093,
-0.053790200501680374,
0.05887279659509659,
-0.3289974331855774,
-0.3678690791130066,
-0.2544381618499756,
-0.10940562188625336,
0.41904115676879883,
-0.020745372399687767,
-0.1115194037... | |
else { //still going down
for (short i = start_x;i<size;i++) {
currentSum += array[i][start_y];
}
}
return currentSum;
}
```
The countNums function is used to go either down or diagonally.
I have tested this function like so:
```
short a = 0;
short b = 0;
cout << cou... | [
-0.1664208322763443,
-0.2766863703727722,
0.6753908395767212,
-0.23938347399234772,
0.19671189785003662,
0.29590409994125366,
-0.1111985296010971,
-0.47558221220970154,
-0.43878281116485596,
-0.3569764792919159,
-0.07848756015300751,
0.2175072878599167,
-0.16197100281715393,
-0.19568286836... | |
<< endl;
return 0;
```
And it does work (I also changed the function a little so it would print every number it was going through)
But I still don't get the right result. This goes down and to the right and still goes right (adjacent numbers to the right), goes down and keeps going down (adjacent number to the left... | [
-0.069252610206604,
0.17389416694641113,
0.478863388299942,
-0.311066210269928,
0.08144893497228622,
0.11952891200780869,
0.0962420254945755,
-0.44853150844573975,
-0.3508540391921997,
-0.18603476881980896,
-0.28453630208969116,
0.46730756759643555,
-0.2701640725135803,
0.09886585921049118... | |
is to know if I am going to go down and right or just down
goright2 is to know if I am going to continue to go down or going left
Ok so first off, I'm a little unclear as to what you think the problem is. I can't parse that second-last sentence at all...
Secondly you might want to re-think your design here. Think abou... | [
0.005861522629857063,
-0.13637031614780426,
0.3109610378742218,
0.03865496441721916,
-0.12428344786167145,
-0.252400279045105,
0.2834286093711853,
-0.049195654690265656,
-0.27308979630470276,
-0.35706043243408203,
-0.03215212747454643,
0.5924900770187378,
-0.08335288614034653,
-0.128715366... | |
a overly-generic function name `countNums` with a long list of arguments.
I think if you were to divide the problem into smaller, more easily comprehensible, chunks you might find the problems a lot easier to find. I know the approach that I would take here but I'm assuming the whole point of the exercise is to help y... | [
0.34238600730895996,
0.09856779873371124,
-0.3002982437610626,
0.07281935960054398,
-0.16459286212921143,
-0.1081835925579071,
0.3808821737766266,
-0.006601219531148672,
-0.2558084726333618,
-0.18800103664398193,
-0.11286043375730515,
0.5681237578392029,
-0.12022329866886139,
-0.0762154012... | |
What's a good algorithm to solve this problem?
I have three groups of people - group A, group B, and group C. There are the same number of people in each group. They each have a list of people in the other groups that they're willing to work with. I want to group all these people together in groups of 3 (one from A, o... | [
0.09203518182039261,
0.09754494577646255,
0.1393137276172638,
0.2145880162715912,
0.17196990549564362,
0.5558716654777527,
0.173606276512146,
-0.354862242937088,
-0.37178587913513184,
-0.5625001788139343,
0.03293599560856819,
0.34497779607772827,
-0.2748245596885681,
-0.09313993901014328,
... | |
to make everyone happy, then the algorithm should first make as many groups have three people who want to work with each other, and then make as many people in the other groups happy.
One final point: people agree on who they want to work with (if person x wants to work with person y, then y also wants to work with x)... | [
-0.04903782159090042,
-0.04819928854703903,
0.2892175614833832,
0.10724417865276337,
-0.041651152074337006,
0.1994401216506958,
0.27163946628570557,
-0.4281280040740967,
-0.27484145760536194,
-0.40303608775138855,
-0.08972522616386414,
0.5840708017349243,
-0.3720327913761139,
-0.2095766961... | |
(bi-partite graph matching) and adapt them to your needs.
<http://en.wikipedia.org/wiki/Stable_marriage_problem>
One adaptation could be to first build working pairs from groups A and B only. Then these pairs have to be paired with a worker from group C each. Let the pairs only prefer workers which both members of th... | [
-0.41904574632644653,
-0.24818265438079834,
0.27989113330841064,
0.1872212141752243,
-0.3464275002479553,
0.6628995537757874,
0.39706501364707947,
-0.6078339219093323,
-0.0680626854300499,
-0.783629834651947,
-0.18324491381645203,
0.2026648372411728,
-0.5461139678955078,
-0.041852198541164... | |
I don't know if there is an efficient algorithm giving the optimal solution for k=3. | [
-0.13191018998622894,
0.33860114216804504,
0.15009233355522156,
-0.04512786120176315,
-0.15195971727371216,
0.1312985122203827,
0.4399907886981964,
-0.18209287524223328,
-0.1681269407272339,
-0.3501059412956238,
0.17315596342086792,
0.22270013391971588,
-0.30735325813293457,
0.135207608342... | |
I have a MySQL table that will only have one row. What should my statement be for the first time I insert to this row, and for subsequent updates? I tried an insert where the primary key equals 1, but this doesn't account for the first time around when no row exists yet.
```
INSERT INTO table(col1,col2,col3) VALUES(val... | [
-0.37075361609458923,
0.2033482939004898,
0.6174364686012268,
-0.0181493628770113,
0.18177637457847595,
0.27820175886154175,
0.15777957439422607,
0.030099427327513695,
-0.17826950550079346,
-0.6740574836730957,
-0.13933832943439484,
0.4340159595012665,
-0.31773486733436584,
-0.067017965018... | |
First of all, I'm kinda new to the barcode formats and what I do know, I've learned from Wikipedia.
We have some barcodes generated by an existing app that uses the Barcode.4NET library. The barcode is in Code 128A format. The code to generate them is pretty simple, looking something like this:
```
// Create the barc... | [
0.5094670057296753,
0.6292994022369385,
0.4520571827888489,
0.04305493086576462,
-0.08300565928220749,
0.06025635451078415,
-0.062460754066705704,
-0.17104816436767578,
-0.33844754099845886,
-0.5433268547058105,
0.044620268046855927,
0.36522772908210754,
-0.19729003310203552,
0.21105507016... | |
using two libraries, I would use iTextSharp's barcode generation library since it supports Code128 barcodes. It has a few different variations of Code 128, but none of them are "Code 128A".
Here is what the code looks like for it:
```
Barcode128 code128 = new Barcode128();
code128.CodeType = Barcode.CODE128;
code128.... | [
0.11451050639152527,
0.03375581279397011,
0.41145429015159607,
0.13185933232307434,
-0.10040724277496338,
0.04146619141101837,
0.012948964722454548,
-0.3098318576812744,
-0.19785676896572113,
-0.8018411993980408,
0.010864623822271824,
0.4368650019168854,
-0.14465242624282837,
0.00822870247... | |
different).
Is anyone out there familiar enough with iTextSharp's (or iText itself) barcode components or with Code 128A barcodes to tell me how to make the iTextSharp one look exactly like the Barcode.4NET one?
Is it really necessary for them to look exactly the same? The different versions of Code 128 are all capabl... | [
0.435357928276062,
-0.06706976890563965,
0.5033695101737976,
-0.07008718699216843,
-0.19978657364845276,
0.07143332064151764,
0.17473001778125763,
-0.16435684263706207,
-0.46513131260871887,
-0.24986235797405243,
0.011920994147658348,
0.41050460934638977,
-0.47914919257164,
-0.097448386251... | |
looks like it is generating variant C, which is the most compact if the text is only decimal digits. It encodes 2 digits in the same amount of space as a single character in the other encodings. | [
-0.15894238650798798,
0.16511718928813934,
0.15721772611141205,
-0.02645534835755825,
0.05457654967904091,
0.29329541325569153,
-0.017574571073055267,
-0.13246965408325195,
-0.05803490802645683,
-0.4152720272541046,
-0.38318490982055664,
-0.012218347750604153,
-0.22314824163913727,
-0.1620... | |
What methods to use a database from Clojure are there?
I know from Clojure you can do anything you can with Java, but that means that I may end up using something overly complicated (like Hibernate) which clashes with Clojure simplicity. Any recommendations or comments?
[clojure-contrib](http://sourceforge.net/project... | [
0.3467620611190796,
0.04028784856200218,
-0.14437977969646454,
0.37093713879585266,
-0.31486135721206665,
-0.4202081561088562,
0.21515068411827087,
-0.0317428894340992,
-0.047071974724531174,
-0.41277191042900085,
0.19690482318401337,
0.44764846563339233,
-0.27264100313186646,
-0.191489517... | |
Does anyone know a way to open up an instance of the platform's (Windows/Linux/Mac) browser within a Swing window that is integrated into a Java application. No other actions would be preformed other than opening a given URL. Currently, we open a new browser window because the Java embedded browsers have been insuffici... | [
0.4171592593193054,
0.30239662528038025,
0.060562774538993835,
0.2223665565252304,
-0.14911675453186035,
-0.333437979221344,
0.3864733874797821,
0.06005401536822319,
-0.42279863357543945,
-0.6812679171562195,
0.008230133913457394,
0.1980549842119217,
-0.12087175250053406,
0.153781771659851... | |
I have a ComboBox bound to an ObservableCollection of decimals. What is the correct way to apply our currency converter to the items?
Edit:
a) I have an existing currency converter that I must use
b) .NET 3.0
Do I need to template the items?
Your best bet if you have some code to do the conversion is indeed to run e... | [
0.42626604437828064,
-0.19880607724189758,
0.6636052131652832,
-0.028729699552059174,
0.04855484142899513,
-0.09635140746831894,
0.25826022028923035,
-0.395951509475708,
-0.08003603667020798,
-0.778937041759491,
0.1871621161699295,
0.46253877878189087,
-0.23813718557357788,
0.1942882835865... | |
/>
</DataTemplate>
</Window.Resources>
<ComboBox
ItemSource="... some list of Thing instances ..."
ItemTemplate="{StaticResource thingTemplate}" />
```
So you just define your CurrencyConverter class such that it implements IValueConverter and calls your code to turn the given amount into a formatted str... | [
0.25065553188323975,
-0.10045529156923294,
0.4229581952095032,
-0.11548478156328201,
0.0176530908793211,
0.12561720609664917,
-0.2675287127494812,
-0.16243986785411835,
-0.24166414141654968,
-0.48234543204307556,
0.062320757657289505,
0.5120537877082825,
0.09789595752954483,
0.103950373828... | |
I have objects that are defined by the Entity Framework that I have then added additional methods and properties to via partial classes. I think I understand most of the limitations around doing this, but wanted to confirm something I am seeing (or hopefully learn what I need to do to make this work).
I have a partial... | [
0.25859335064888,
0.0247652567923069,
0.14557969570159912,
0.24662256240844727,
-0.15879108011722565,
-0.24392879009246826,
0.08737186342477798,
0.15475055575370789,
-0.09417039901018143,
-0.614741861820221,
0.201769158244133,
0.535099446773529,
-0.007278224918991327,
0.44946181774139404,
... | |
i.e. I was expecting to see the properties on the entity framework and the property being definied in code via the partial class come via the Data Service call.
Is this the case? Are the partial classes completely ignored when ADO.Net Data Services is querying for data? If so what is the best practice for getting a re... | [
0.18835638463497162,
0.1067175418138504,
0.19215945899486542,
-0.0688268393278122,
-0.09309211373329163,
-0.3643184006214142,
0.17384858429431915,
-0.06976410001516342,
-0.11162769794464111,
-0.5287601351737976,
-0.17103083431720734,
0.27451053261756897,
-0.21766163408756256,
0.31695914268... | |
you are asking "How to add a
> read-only property to an existing
> entity that is exposed by the EF
> provider"? In V1, there is no good way
> to do this. For EF, we load the
> metadata using the EF metadata api's
> and hence we don't do any reflection.
> Hence additional properties that you
> might have added ... | [
0.5371462106704712,
-0.28548210859298706,
0.3662552535533905,
0.2850007116794586,
-0.2064829021692276,
-0.6555134654045105,
0.16961801052093506,
-0.572557806968689,
-0.30156922340393066,
-0.4524412155151367,
0.16271352767944336,
0.36778414249420166,
-0.32383349537849426,
0.4101335704326629... | |
model, we don't know how to
> deal with them in updates. We don't
> want to lose data siliently in the
> server also."
So it looks like this is functionality that is not able to be exposed via ADO.Net Data Services. | [
0.2842598855495453,
0.07245130091905594,
0.5015823245048523,
0.22522392868995667,
0.15016034245491028,
-0.2862852215766907,
0.47051262855529785,
0.03287677466869354,
-0.20457521080970764,
-0.6467285752296448,
0.2711887061595917,
0.6020483374595642,
-0.13980500400066376,
0.27835795283317566... | |
I find myself attached to a project to integerate an interpreter into an existing application. The language to be interpreted is a derivative of Lisp, with application-specific builtins. Individual 'programs' will be run batch-style in the application.
I'm surprised that over the years I've written a couple of compile... | [
0.04673158749938011,
0.1631985753774643,
0.09154242277145386,
-0.1561746895313263,
-0.09108909964561462,
0.38671839237213135,
0.023189175873994827,
0.044722333550453186,
0.005793147720396519,
-0.6646936535835266,
0.0010716808028519154,
0.37911179661750793,
-0.5457783341407776,
-0.182827204... | |
handled with a yacc/bison grammar (it is now)
* suggestions of full VM/Interpreter ecologies like NekoVM and LLVM are probably not practical for this project. Self-contained is better, even if this sounds like NIH.
What I'm really looking for is reading material on the fundamentals of implementing interpreters. I did ... | [
0.027555499225854874,
-0.051116324961185455,
-0.1820966601371765,
0.0032212496735155582,
-0.2868563234806061,
0.4057236909866333,
0.3647408187389374,
-0.49267685413360596,
-0.20394305884838104,
-0.4160844087600708,
-0.23122020065784454,
0.6351131796836853,
-0.2505093812942505,
-0.709323883... | |
presenting bytecode and 'Scheme to C' compilers."
* [NekoVM](http://nekovm.org/). As I've mentioned above, I doubt that we'd be allowed to incorporate an entire VM framework to support this project.
* [Structure and Interpretation of Computer Programs](http://mitpress.mit.edu/sicp/full-text/book/book.html). Originally ... | [
0.09729337692260742,
0.3381566107273102,
-0.09214046597480774,
-0.2877102494239807,
-0.15322059392929077,
0.2474290430545807,
0.47253289818763733,
-0.4246014356613159,
-0.26398980617523193,
-0.3275755047798157,
-0.10735772550106049,
0.1986505389213562,
-0.4310282766819,
-0.6156540513038635... | |
[Scheme from Scratch](http://peter.michaux.ca/articles/scheme-from-scratch-introduction). Peter Michaux is attacking various implementations of Scheme, from a quick-and-dirty Scheme interpreter written in C (for use as a bootstrap in later projects) to compiled Scheme code. Very interesting so far.
* [Language Implemen... | [
0.21635504066944122,
0.4123309552669525,
0.03791012242436409,
-0.4510813057422638,
-0.6187810897827148,
0.12288223206996918,
0.5636711120605469,
-0.5930103659629822,
-0.1642477959394455,
-0.33862975239753723,
0.13519838452339172,
0.4001823663711548,
-0.5825753211975098,
-0.2019280642271042... | |
interesting in providing an outline of the various tasks associated with the implementation of a Basic interpreter. I've seen mixed reviews for this one but as it is cheap (I have it on order used for around $3.50) I'll give it a spin.
So how about it? Is there a good book that takes the neophyte by the hand and shows... | [
0.06973614543676376,
0.20573993027210236,
-0.14355161786079407,
0.064360111951828,
-0.03808046877384186,
0.2276357263326645,
0.30857518315315247,
0.08449525386095047,
0.06949034333229065,
-0.5361660122871399,
0.04760443791747093,
0.614108145236969,
-0.17755432426929474,
-0.1560389846563339... | |
path to an arbitrary code file and executing it in our application environment. The builtins are used to affect our in-memory data representation.
* it should not be hideously slow. The current tree walker seems acceptable.
* The language is *based* on Lisp, but is not Lisp, so no standards compliance required.
* As me... | [
0.3289410471916199,
0.1381855458021164,
0.2805308401584625,
0.2959595322608948,
-0.11993441730737686,
-0.1332918405532837,
0.4702514111995697,
0.1703195869922638,
-0.1545565128326416,
-0.8038504719734192,
0.11870622634887695,
0.468645840883255,
-0.24070806801319122,
-0.36492377519607544,
... | |
overkill, if you feel you are overqualified for the first parts of the book jump to chapter 4 and start interpreting away (although I feel this would be a loss since chapters 1-3 really are that good!).
Add LISP in Small Pieces (LISP from now on), chapters 1-3. Especially chapter 3 if you need to implement any non-tri... | [
-0.24815206229686737,
0.27441737055778503,
0.04844590276479721,
0.003800660837441683,
-0.21327444911003113,
-0.016224294900894165,
0.6087313294410706,
-0.3326891362667084,
-0.15291644632816315,
-0.21306125819683075,
-0.025986818596720695,
0.5559648871421814,
-0.4476568102836609,
-0.4890288... | |
actually need to be able to execute lisp code?
* does it need to be fast?
* does it need standards compliance? Common Lisp? R5RS? R6RS? Any SFRIs you need?
If you need anything more fancy than a simple syntax tree walker I would strongly recommend embedding a fast scheme subsystem. Gambit scheme comes to mind: [http:/... | [
0.4262191653251648,
-0.003559823613613844,
0.15220661461353302,
0.30253729224205017,
-0.02776331454515457,
-0.15175391733646393,
0.44151243567466736,
0.019402630627155304,
-0.303628534078598,
-0.5036764144897461,
0.18057437241077423,
0.5602567791938782,
-0.21052324771881104,
-0.40924015641... | |
and you can probably learn from them. V8 cites two important papers: <http://code.google.com/apis/v8/design.html> and squirrelfish cites a couple: <http://webkit.org/blog/189/announcing-squirrelfish/> .
There is also the canonical scheme papers: <http://library.readscheme.org/page1.html> for the RABBIT compiler.
If I... | [
0.3010408282279968,
0.13203959167003632,
-0.16661792993545532,
-0.16669981181621552,
-0.4428810179233551,
0.1593969464302063,
0.16161464154720306,
-0.4496481120586395,
-0.406497061252594,
-0.4617435336112976,
0.0030138215515762568,
0.060117531567811966,
-0.45922401547431946,
-0.14113348722... | |
This might be too opinionated a question, but looking for help!
I have been trying to refine my ASP.NET MVC program structure. I just started using it at preview 5 and it is my first foray into business application development -- so everyting is new!
At the controller level, I have a service object responsible for ta... | [
0.44829314947128296,
-0.18357765674591064,
0.534480631351471,
0.032132457941770554,
-0.22463269531726837,
-0.30772635340690613,
-0.046449609100818634,
0.06904453039169312,
-0.29351359605789185,
-0.5240782499313354,
-0.032106585800647736,
0.5756848454475403,
-0.3074011504650116,
0.024960784... | |
I see, this object is not a database object, but an object specific to the view.
So now I want to add user validation. The problem is, I'm not sure where to put it. It makes the most sense to me to do it in the Service layer. The Service layer is responsible for all the business logic and validation is business logic.... | [
0.4251454472541809,
0.4030866026878357,
0.39231792092323303,
0.07801584154367447,
-0.16583602130413055,
-0.12582509219646454,
0.0702754333615303,
0.06744754314422607,
-0.14788326621055603,
-0.3952212929725647,
-0.0317283533513546,
0.6300192475318909,
-0.07308901846408844,
0.273287773132324... | |
(checking if a user input field has a corresponding database record for example), and the view object has no concept of a database, only the Service.
So some options I see are:
* Do validation in the Service.Method on the parameters passed to the method.
* Do validation in the view object before calling Service.Metho... | [
0.46431511640548706,
0.21216100454330444,
0.535368025302887,
-0.07379221171140671,
-0.1675357222557068,
-0.08288020640611649,
0.15965117514133453,
-0.33076852560043335,
-0.16583502292633057,
-0.16597622632980347,
-0.14013265073299408,
0.8219969868659973,
-0.1373424381017685,
0.173633009195... | |
Block and liked being able to use stock validators for everything, but I'm not sure how to make it fit into a seperate view object and service layer. It would be easy if they (view object / service) were the same object, which is maybe what people do? Like I said, its all new to me and I'm looking for best practice / p... | [
0.6523141860961914,
0.07821394503116608,
0.42227163910865784,
0.17328672111034393,
-0.08662544190883636,
-0.320186585187912,
0.021432748064398766,
-0.4018222391605377,
0.039533309638500214,
-0.2560386061668396,
0.007636047899723053,
0.23339861631393433,
-0.02507735788822174,
-0.01370548270... | |
stuff in the business layer as well, so if I expose that logic through web services or use it in another application later, I still have validation where it is most important (IMO). | [
0.34183457493782043,
0.1782969832420349,
0.05807584151625633,
0.22530648112297058,
-0.037452902644872665,
-0.09715655446052551,
-0.10387789458036423,
0.00953825656324625,
-0.3606921434402466,
-0.36631324887275696,
-0.06938619911670685,
0.4069088399410248,
0.21885435283184052,
-0.1760632395... | |
I have a JSF form that needs to upload a file via an icon click (i.e. without showing the textfield/browse button of the file upload component).
Is it possible to trigger the file-open dialog and uploading functionality of the upload component via some other component type?
In my opinion, it's never too late to adopt... | [
0.4356083571910858,
-0.10846817493438721,
0.448621928691864,
-0.019789474084973335,
-0.37919485569000244,
-0.45706379413604736,
0.3308093845844269,
-0.32399609684944153,
0.09064258635044098,
-0.6797218322753906,
-0.13800838589668274,
1.040145993232727,
-0.06456620246171951,
-0.063227161765... | |
and so on.
At this point in your project, you may find it difficult to get tests written for some aspects of your framework. Don't give up though, even if you can't test some areas, your quality will be the better for the areas you can test, and your skills will improve for the experience. | [
0.6753396987915039,
0.2648102045059204,
-0.331431120634079,
0.3264234662055969,
0.19275708496570587,
-0.10687538236379623,
0.5591610670089722,
0.13668404519557953,
0.040176305919885635,
-0.7990309596061707,
0.1208137795329094,
0.5088776350021362,
0.3814449608325958,
0.10128220170736313,
... | |
We have a bunch of data on S3 (images) but just started reading about Mosso Files (rackspace). Sometime this month they are going to add CDN capabilities so any file you upload is part of the limelight CDN.
Anyone using this service, it's not as well documented or publicized at S3.
Yes, it's not well documented or pu... | [
0.654176652431488,
0.06635412573814392,
0.4099985361099243,
-0.021565061062574387,
-0.004019636195152998,
-0.5574157238006592,
0.156902015209198,
0.46781080961227417,
-0.3796985447406769,
-0.5646278858184814,
0.14793920516967773,
0.41319090127944946,
-0.12601321935653687,
-0.00756322359666... | |
Yet, it's still cheap and worth especially with CDN.
I am using the service and it's pretty good and cost effective compare to S3. | [
0.3255140781402588,
-0.008454035967588425,
0.0815802663564682,
0.3631540536880493,
-0.2244582176208496,
-0.07634204626083374,
0.2065625935792923,
0.3318216800689697,
0.013635738752782345,
-0.6238181591033936,
0.24928994476795197,
0.5493903756141663,
0.38915449380874634,
0.02083213627338409... | |
Are there any Web page designing software out there that allow me to drag and drop controls just like desktop applications. I found it quite difficult to design a web page using the designer in Visual Studio 2008 as it constrains me to a flow or grid layout. (I am not an accomplished designer but there should be some e... | [
0.22676876187324524,
-0.0726073831319809,
0.12599006295204163,
0.3554287552833557,
0.07960519939661026,
-0.11975570768117905,
-0.30539482831954956,
0.20987136662006378,
-0.469479501247406,
-0.42195695638656616,
0.09663845598697662,
0.41627973318099976,
-0.05652386695146561,
-0.398530155420... | |
One of my programs requires a reliable way to log across unreliable network (ie internet). The sender or receiver may go offline any time and can come back later. But any message sent by client should not be missed. Obviously syslog does not fit the bill. I am exploring the use of messaging servers like Apache ActiveMQ... | [
0.3826836943626404,
-0.027508068829774857,
0.24425411224365234,
0.04601924121379852,
-0.545136034488678,
-0.208207368850708,
0.6714909076690674,
0.350098580121994,
-0.44619667530059814,
-0.4959750473499298,
-0.07099688053131104,
0.49341997504234314,
-0.3100459575653076,
0.18487468361854553... | |
I'm dealing with an Oracle DBA at the moment, who has sent me some profiling he's done. One of the terms in his report is 'Buffer Gets', any idea what this actually means? My guess is bytes retrieved from a buffer, but I have no idea really. Here is some sample output:
```
Buffer Gets Executions Gets per Exec %... | [
0.33742111921310425,
0.07114269584417343,
0.1504354327917099,
0.34158408641815186,
-0.00313667138107121,
0.25476980209350586,
0.06108313426375389,
-0.05311279743909836,
-0.56657874584198,
-0.42376479506492615,
0.11886999756097794,
0.3486841320991516,
-0.05753108859062195,
0.226871415972709... | |
6980.57 6873.46 4212400674
Module: JDBC Thin Client
SELECT fieldOne, fieldTwo, fieldThree, fieldFour, fieldFive FROM TableExample
WHERE fieldOne = 'example'
```
It would also be handy to know what 'Gets per Exec' means, as I guess they are related? I'm a programmer, but not a DBA.
Oracle storage is arranged into bl... | [
0.27894240617752075,
0.07039973884820938,
-0.06633686274290085,
0.0592513233423233,
-0.08503390848636627,
0.14106473326683044,
-0.10686664283275604,
-0.2014230638742447,
-0.1671760231256485,
-0.2913177013397217,
-0.2490728199481964,
0.5113228559494019,
-0.03638504073023796,
-0.015053755603... | |
in memory. If so, the in-memory version is used. If it does not have the block in memory then it will read it from disk into memory.
So a buffer get represents the number of times Oracle had to access a block. The reads could have been satisfied either from memory (the buffers) or have resulted in a physical IO.
Sinc... | [
0.03142978996038437,
-0.33831754326820374,
-0.021446462720632553,
0.36642223596572876,
-0.21122077107429504,
0.22997741401195526,
0.1481701135635376,
-0.3373715877532959,
-0.17821824550628662,
-0.5559220314025879,
0.12431389093399048,
0.5973293781280518,
0.022949954494833946,
-0.2989035546... | |
Using google's [Protocul Buffers](http://code.google.com/p/protobuf/), I have a service already written in Java which has its own data structures already. I'd like to use pb to delivering messages and I'm looking for a way to serialize the existing data structures that I have in Java to pb.
I can start by defining all ... | [
0.3368273079395294,
0.17809082567691803,
0.09329765290021896,
0.09853598475456238,
-0.28534337878227234,
0.21779470145702362,
-0.0063734338618814945,
0.08873774856328964,
-0.1902340203523636,
-0.783912181854248,
-0.06656114012002945,
0.16570167243480682,
-0.45229095220565796,
0.00707655819... | |
class to pb? Can I have a pb attribute of type Plane? (when Plane is not a pb, it's a Java class)
No, you can't. Fields in protobuf messages are always the primitives (numbers, strings and byte arrays, basically), protobuf enums (which are generated as Java enums) or protobuf messages - and repeated versions of all of ... | [
0.11921580135822296,
-0.30522817373275757,
-0.22338658571243286,
0.06387843936681747,
-0.27470719814300537,
0.1380549818277359,
-0.018786538392305374,
0.058199554681777954,
0.023794451728463173,
-0.5302245616912842,
-0.024440942332148552,
0.3552751839160919,
-0.561641275882721,
-0.04331210... | |
sure that the fields were always generated with the same name, to maintain compatibility. One thing you *could* do is annotate the Java classes and write code to generate the .proto file based on those annotations - or even potentially serialize directly to proto format using the annotations. Personally I'd recommend c... | [
0.6037986874580383,
0.1507217139005661,
-0.5777071714401245,
0.24939218163490295,
-0.011455927044153214,
-0.24303042888641357,
0.05922172963619232,
0.09949753433465958,
-0.4286578893661499,
-0.4983210563659668,
-0.15155449509620667,
0.4731616675853729,
-0.6240133047103882,
-0.2723630368709... | |
in seeing it. | [
-0.21510785818099976,
0.23438352346420288,
-0.3443475067615509,
0.1331004649400711,
-0.675751805305481,
-0.3363264501094818,
0.2448950707912445,
-0.1637166291475296,
-0.14369548857212067,
-0.552904486656189,
0.4093559980392456,
0.2714814245700836,
-0.08847935497760773,
0.3909079134464264,
... | |
I have a very tricky situation (for my standards) in hand. I have a script that needs to read a script variable name from [ConfigParser](https://docs.python.org/2/library/configparser.html). For example, I need to read
```
self.post.id
```
from a .cfg file and use it as a variable in the script. How do I achieve thi... | [
0.21410270035266876,
0.38711822032928467,
0.07111936807632446,
-0.11404416710138321,
-0.15058323740959167,
-0.18715716898441315,
0.37358877062797546,
-0.35131189227104187,
0.055148568004369736,
-0.5143167972564697,
0.12434045225381851,
0.5296682715415955,
-0.04244077950716019,
0.0582654699... | |
config = ConfigParser.ConfigParser()
config.read('/path/to/test.ini')
newvar = config.get('head', 'var')
print eval(newvar)
class TestPost:
def __init__(self, id):
self.id = id
test = Test()
test.getPost() # prints 5
``` | [
0.21148651838302612,
0.19021248817443848,
0.09214404225349426,
-0.1254648119211197,
0.04936162009835243,
0.1192333921790123,
0.42551854252815247,
-0.66224604845047,
0.0006280426168814301,
-0.5946230292320251,
-0.07753251492977142,
0.4553098976612091,
-0.24296090006828308,
-0.06640750169754... | |
I have a sharepoint event handler which I want to activate for a single list, not all the lists in the site. How do I go about this?
Got the answer. We need to run this code, maybe in a console app. I still didn't get how to remove the event handler once it has been added though...
```
string siteUrl = Console.ReadLin... | [
0.24046845734119415,
-0.11481082439422607,
0.6605750322341919,
-0.1681148111820221,
0.06464061886072159,
-0.16475048661231995,
0.28890296816825867,
-0.2847732603549957,
-0.18045349419116974,
-0.6796994209289551,
-0.21130482852458954,
0.6076986193656921,
-0.3756265938282013,
0.0881534591317... | |
Is there an issue with databinding in WPF when you bind to the current source (Path=".") and using a converter? The two way binding doesn't seem to work in this situation.
I know I could change the path, but I want to be able to pass the "Name" value to the converter.
I can't get the following example to work:
```
<... | [
-0.03395570442080498,
-0.032899897545576096,
0.5685103535652161,
-0.07743001729249954,
-0.19835908710956573,
-0.22973348200321198,
-0.11317791044712067,
-0.5516612529754639,
-0.14912286400794983,
-0.40600550174713135,
-0.14309856295585632,
0.59963458776474,
-0.06122276186943054,
0.11599023... | |
<TextBox.Text>
<Binding
Path="."
UpdateSourceTrigger="PropertyChanged"
Converter="{StaticResource converter}"
ConverterParameter="Name" | [
-0.13947010040283203,
-0.16341587901115417,
0.559226930141449,
-0.002896732185035944,
0.09879160672426224,
-0.14111636579036713,
0.17692740261554718,
-0.4017940163612366,
-0.09497162699699402,
-0.632859468460083,
-0.387116402387619,
0.5789981484413147,
-0.35148879885673523,
0.1611334383487... | |
/>
</TextBox.Text>
</TextBox>
<TextBlock Text="{Binding Path=Name}"/>
</StackPanel>
</Window>
class TestConverter : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
{
return Reverse(value, parameter);
... | [
0.13459564745426178,
-0.1690080314874649,
0.20181739330291748,
-0.17076709866523743,
-0.24435484409332275,
0.3749672770500183,
0.28304657340049744,
-0.27585744857788086,
0.23065423965454102,
-0.3646763563156128,
-0.07196371257305145,
0.3852173388004303,
-0.5902311205863953,
0.4211687445640... | |
if (value == null)
throw new ArgumentNullException("value", "value is null.");
if (parameter == null)
throw new ArgumentNullException("parameter", "parameter is null.");
Person p = (Person)value;
if (parameter.ToString() == "Name")
{
StringBuilder sb... | [
-0.47003525495529175,
-0.35879242420196533,
0.2740040719509125,
-0.34325310587882996,
0.055198878049850464,
0.2911936640739441,
0.5408246517181396,
-0.6785346269607544,
-0.13500088453292847,
-0.18785624206066132,
-0.5423876643180847,
0.5145253539085388,
-0.3746187388896942,
0.1456578224897... | |
new StringBuilder();
for (int i = p.Name.Length - 1; i >= 0; i--)
{
sb.Append(p.Name[i]);
}
return sb.ToString();
}
throw new NotImplementedException();
}
}
public class | [
0.08046703040599823,
-0.4842642843723297,
0.409077912569046,
-0.3811784088611603,
0.11311425268650055,
0.19556871056556702,
0.505608856678009,
-0.8185662031173706,
-0.20120668411254883,
-0.4812321364879608,
-0.32512882351875305,
0.32446375489234924,
-0.4111325144767761,
0.2257191240787506,... | |
Person:INotifyPropertyChanged
{
private string name;
public string Name
{
get
{
return name;
}
set
{
name = value;
if (PropertyChanged != null) | [
-0.4396745562553406,
-0.4496994614601135,
-0.15573814511299133,
0.1224062517285347,
0.12449660897254944,
0.3042651414871216,
0.35931888222694397,
0.0009892354719340801,
-0.09585422277450562,
-0.3280031681060791,
-0.3481754660606384,
0.5518364906311035,
-0.16772186756134033,
0.0956129655241... | |
PropertyChanged(this, new PropertyChangedEventArgs("Name"));
}
}
public event PropertyChangedEventHandler PropertyChanged;
}
```
Got the answer. We need to run this code, maybe in a console app. I still didn't get how to remove the event handler once it has been added though...
```
string siteUrl = Co... | [
0.06805607676506042,
-0.14157527685165405,
0.774194598197937,
-0.019020797684788704,
0.041845083236694336,
-0.2316587120294571,
0.17664587497711182,
-0.47084325551986694,
-0.30937039852142334,
-0.529927670955658,
-0.2473098188638687,
0.7413904666900635,
0.01168361958116293,
0.2999023199081... | |
**My goal is to get Limewire(JAVA) and Songbird(XULRunner) to run together.**
I was thinking the best way is to run the XUL application(songbird) inside a JAVA swing panel. Is there another way?
Would it be better or possible to have the GUI entirely in XUL, and then access my JAVA objects somehow?
How would I go ab... | [
0.4923003017902374,
0.2899152338504791,
-0.010461957193911076,
-0.04951435700058937,
-0.24146249890327454,
0.11568205058574677,
0.1269751936197281,
0.16149790585041046,
-0.18167489767074585,
-0.6978955864906311,
0.19285854697227478,
0.385468989610672,
-0.2776707708835602,
0.060714960098266... | |
I have a textbox whose value I want to set based on the inner text of an anchor tag. In other words, when someone clicks on this anchor:
```
<a href="javascript:void();" class="clickable">Blah</a>
```
I want my textbox to populate with the text "Blah". Here is the code I am currently using:
```
<script type="text/j... | [
0.30000147223472595,
0.19921241700649261,
0.8331167101860046,
-0.36046063899993896,
0.30284494161605835,
-0.0838288888335228,
-0.0902806892991066,
-0.3662039041519165,
-0.1414412409067154,
-0.6919562220573425,
-0.34994634985923767,
0.6585042476654053,
-0.41373103857040405,
-0.0861988142132... | |
and one textbox with the id "textbox".
I've substituted the code above with code to just show a javascript alert with $(this).html() and it seems to show the correct value. I have also changed the $(this).html() to be a hardcoded string and it setes the textbox value correctly. But when I combine them the textbox simp... | [
0.11066394299268723,
0.08164951950311661,
0.372505247592926,
-0.08621951937675476,
0.02863033302128315,
0.08195765316486359,
0.14694371819496155,
-0.4444170892238617,
-0.2885158658027649,
-0.40552711486816406,
-0.16498422622680664,
0.6352773904800415,
-0.4891318380832672,
-0.09895920008420... | |
$("input#textbox").val($(this).html());
});
});
</script>
```
Maybe you forgot to give a class name "clickable" to your links? | [
0.07369068264961243,
0.034680042415857315,
0.4818532168865204,
-0.25125735998153687,
0.2937394678592682,
-0.20827631652355194,
0.47049567103385925,
0.4639851450920105,
-0.18305064737796783,
-0.5856884717941284,
-0.41760289669036865,
0.7001492381095886,
-0.4083443582057953,
0.02909933030605... | |
I have a List of custom object, which consist of a custom list.
```
class person{
string name;
int age;
List<friend> allMyFriends;
}
class friend{
string name;
string address;
}
```
I'trying to bind a list of these objects to a GridView and the Grid should create for each friend a column and write the nam... | [
0.22930477559566498,
0.1607803851366043,
0.31935977935791016,
-0.18507035076618195,
-0.0960041955113411,
0.11600886285305023,
0.22290171682834625,
-0.3331298828125,
-0.18725472688674927,
-0.7983101606369019,
0.21123850345611572,
0.4733865559101105,
-0.190064936876297,
0.4694603383541107,
... | |
the class definitions and so on, if they need to inherit from some interfaces or so on.
I googled a lot, but no example really seemed to cover this case.
Could the use of a objectSourceControl solve my problem in some way?
### Update:
To give some more information:
In the end I have a list of persons, while each pe... | [
-0.11504260450601578,
0.004996020346879959,
0.3122943341732025,
0.2229112684726715,
-0.08628608286380768,
0.18697702884674072,
0.1468910276889801,
-0.17557677626609802,
-0.1984052062034607,
-0.9374586939811707,
-0.057953424751758575,
0.29123809933662415,
-0.18049100041389465,
0.24644428491... | |
in the grid.
```
friend1 friend2
x peter
x x adam
```
At the moment a intercept the RowDataBound event and since the binding only creates the rows with the names and not the columns, because the only property on my person object is the name. Is there a way to force the binding to look t... | [
-0.42872563004493713,
0.12521864473819733,
0.5114885568618774,
-0.16705270111560822,
-0.2169245183467865,
0.0909309983253479,
0.19284608960151672,
-0.2793872356414795,
-0.11011262983083725,
-0.5170088410377502,
-0.033778320997953415,
0.020182328298687935,
-0.5452628135681152,
0.20030894875... | |
this using a DataTable as your datasource for the Grid. I don't like the idea of moving from a nice clean object to a DataTable, but it provides support for the dynamic binding you need. I modified your friend object to have a few constructors. This allowed me to cleanup the static code declaration but might not be nec... | [
0.010201819241046906,
-0.21582798659801483,
0.30058324337005615,
0.10589931160211563,
0.0011167317861691117,
-0.12878388166427612,
-0.03750770539045334,
-0.2104736864566803,
-0.22944828867912292,
-0.5755199193954468,
0.24227593839168549,
0.3834678530693054,
-0.2222699671983719,
0.061256483... | |
to work in a single iteration of the allPerson object but I preferred two iterations to make the code easier to read.
The solution is written for c# 3.5 but could be converted for older versions by changing the static data declaration. I hope this helps.
```
public partial class _Default : System.Web.UI.Page
{
pr... | [
-0.06727533787488937,
-0.15100859105587006,
0.47886553406715393,
0.0040642558597028255,
0.15270553529262543,
0.16491350531578064,
0.44928082823753357,
-0.33537107706069946,
-0.13862913846969604,
-0.7261913418769836,
0.017362918704748154,
0.5667027235031128,
-0.24176687002182007,
-0.1545177... | |
new person()
{
name = "Dan",
age = 21,
allMyFriends = new List<friend>() { new friend("James"), new friend("John"), new friend("Matt") } | [
-0.32834169268608093,
-0.25977158546447754,
0.3965350389480591,
-0.21363306045532227,
0.44932857155799866,
0.22133411467075348,
0.5039666295051575,
0.2602127492427826,
-0.4680047631263733,
-0.9071589708328247,
-0.37320852279663086,
0.002998142736032605,
0.16903339326381683,
0.3172022700309... | |
},
new person()
{
name = "James",
age = 21,
allMyFriends = new List<friend>() { new friend("Dan"), new friend("Matt"), new friend("Tom") } | [
-0.276588499546051,
-0.20793010294437408,
0.46107786893844604,
-0.1743529587984085,
0.6699673533439636,
0.24239107966423035,
0.5024575591087341,
0.330759197473526,
-0.4390954375267029,
-0.6655377149581909,
-0.35685494542121887,
0.2537953555583954,
0.042774006724357605,
0.40282925963401794,... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.