text
stringlengths
0
30.5k
title
stringclasses
1 value
embeddings
listlengths
768
768
I want to create a new row in my database on a table that has a couple of foreign key relationships and I haven't been able to get a handle on what order and what calls need to be made. This is what I have so far: ``` db.Models.Order order = DB.Models.Order.CreateOrder( apple ); order.CustomerReference.Attach( ( from ...
[ -0.07467932999134064, 0.3845663368701935, 0.5360029935836792, -0.2992296814918518, 0.3733166754245758, 0.2772584557533264, 0.2134525328874588, -0.3720993101596832, -0.2470095306634903, -0.4270993173122406, -0.14268220961093903, 0.5830134153366089, -0.42443737387657166, 0.3879665732383728, ...
state. Objects loaded > using the NoTracking merge option are > always detached. Any ideas? *(Thanks John for the grammar fixes)* So I figured it out. This is what you have to do: ``` db.Models.Order order = DB.Models.Order.CreateOrder( apple ); order.Customer = (from c in db.Customer where c.Id == custId select c...
[ 0.008099059574306011, -0.022283678874373436, 0.13121871650218964, -0.04299459978938103, -0.015597560442984104, 0.17206516861915588, 0.5319883227348328, 0.02981792949140072, -0.3080688416957855, -0.6732034087181091, -0.29208946228027344, 0.6675129532814026, -0.2785034477710724, 0.0977681875...
I have 2 classes with a LINQ association between them i.e.: ``` Table1: Table2: ID ID Name Description ForiegnID ``` The association here is between **Table1.ID -> Table2.ForiegnID** I need to be able to change the value of Table2.ForiegnID, however I can't and think it is be...
[ -0.08761103451251984, 0.23851916193962097, 0.14623156189918518, 0.11453013122081757, -0.11003963649272919, 0.008860267698764801, 0.16363456845283508, -0.007393519394099712, -0.26552218198776245, -0.517367959022522, -0.01742737926542759, 0.17247261106967926, 0.026047443971037865, 0.15017271...
associated field Table2.ForiegnID? Check out the designer.cs file. This is the key's property ``` [Column(Storage="_ParentKey", DbType="Int")] public System.Nullable<int> ParentKey { get { return this._ParentKey; } set { if ((this._ParentKey != value)) { //This c...
[ -0.10320581495761871, -0.0627615749835968, 0.328838586807251, -0.06058952957391739, 0.17579321563243866, 0.08986169844865799, 0.18546009063720703, -0.17655548453330994, -0.17257073521614075, -0.4876374900341034, -0.21157535910606384, 0.2689264118671417, -0.323376327753067, 0.56719386577606...
{ throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException(); } //This code is present regardless of association this.OnParentKeyChanging(value); this.SendPropertyChanging(); this._ParentKey = value;
[ 0.04145088419318199, -0.05972402170300484, 0.35588255524635315, -0.1397312730550766, 0.3161427974700928, 0.005530277732759714, 0.4432350695133209, -0.24027809500694275, -0.09283120930194855, -0.38520291447639465, -0.16228540241718292, 0.337571382522583, -0.2222186028957367, 0.5301598310470...
this.SendPropertyChanged("ParentKey"); this.OnServiceAddrIDChanged(); } } } ``` And this is the associations property. ``` [Association(Name="Parent_Child", Storage="_Parent", ThisKey="ParentKey", IsForeignKey=true, DeleteRule="CASCADE")] public Parent Parent { get { return th...
[ -0.1667635589838028, -0.0698360949754715, 0.39489972591400146, -0.1016785055398941, 0.2832770049571991, -0.12649886310100555, 0.4071217179298401, -0.2593315839767456, -0.18754491209983826, -0.5429174304008484, -0.1606055647134781, 0.2223130762577057, -0.19337421655654907, 0.735541403293609...
|| (this._Parent.HasLoadedOrAssignedValue == false))) { this.SendPropertyChanging(); if ((previousValue != null)) { this._Parent.Entity = null; previousValue.Exemptions.Remove(this);
[ -0.16293172538280487, -0.08950095623731613, 0.5893521904945374, -0.41021281480789185, 0.39065244793891907, -0.237859845161438, 0.8009721636772156, -0.5437545776367188, -0.06680771708488464, 0.0069609517231583595, -0.49944424629211426, 0.38236111402511597, -0.2736577093601227, 0.51578629016...
} this._Parent.Entity = value; if ((value != null)) { value.Exemptions.Add(this); this._ParentKey = value.ParentKey; }
[ -0.02592451311647892, -0.013055221177637577, 0.16043387353420258, -0.1545129269361496, 0.4151441156864166, -0.17368373274803162, 0.38107940554618835, -0.5162129998207092, -0.10000627487897873, 0.008126569911837578, -0.41267845034599304, 0.28981590270996094, -0.3467496931552887, 0.440145075...
else { this._ParentKey = default(Nullable<int>); } this.SendPropertyChanged("Parent"); } } } ``` It's best to assign changes through the association instead of the key. That way, you don't have to worry about whether the parent is loaded.
[ -0.06462813913822174, 0.04092938452959061, 0.12409331649541855, -0.3599846363067627, 0.13444532454013824, -0.12191428989171982, 0.27066439390182495, -0.09777748584747314, -0.16701805591583252, -0.6080171465873718, -0.31384679675102234, 0.6668347716331482, -0.44112616777420044, 0.2979157567...
I have a bunch of XML that has lines that look like this ``` <_char font_name="/ITC Stone Serif Std Bold" italic="true" /> ``` but sometimes look like this ``` <_char font_size="88175" italic="true" font_name="/ITC Stone Serif Std Bold" /> ``` Here's what I need to do * Replace **italic="true"** with **italic="f...
[ 0.2137259840965271, 0.48825207352638245, 0.24610015749931335, -0.22355161607265472, -0.17945624887943268, 0.0779433324933052, 0.4110628068447113, -0.23405864834785461, 0.18641453981399536, -0.7030732035636902, 0.1910645216703415, 0.40944600105285645, -0.18431580066680908, 0.165600582957267...
would require a single regex. If scripting's the only way to do it, then so be it. Does the simple use of '|' operator satisfy you ? ``` name="/ITC Stone Sans Std Bold"[^>]italic="(true)"|italic="(true)"[^>]font_name="/ITC Stone Serif Std Bold" ``` That should detect any line with the attribute name before of after ...
[ 0.014202632009983063, 0.33084890246391296, 0.3138856589794159, -0.2160254865884781, -0.18684306740760803, 0.18969981372356415, 0.4058462977409363, -0.34416142106056213, 0.3487606346607208, -0.37314265966415405, -0.233049675822258, 0.6337875723838806, -0.18892355263233185, -0.16665576398372...
I'm not exactly sure how to ask this question really, and I'm no where close to finding an answer, so I hope someone can help me. I'm writing a Python app that connects to a remote host and receives back byte data, which I unpack using Python's built-in struct module. My problem is with the strings, as they include m...
[ 0.12339917570352554, 0.19132594764232635, 0.11333806067705154, -0.14939014613628387, -0.05482444539666176, 0.3604937493801117, 0.23006413877010345, 0.23877505958080292, -0.117409348487854, -0.6114773154258728, -0.34206050634384155, 0.15323090553283691, -0.30307599902153015, -0.016460970044...
^B - Baltic * ^J - Japanese * ^C - Cyrillic * ^G - Greek And so on... I need a way to convert this sort of string into Unicode, but I'm really not sure how to do it. I've read up on Python's codecs and string.encode/decode, but I'm none the wiser really. I should mention as well, that I have no control over how the st...
[ 0.24956177175045013, 0.4071064889431, 0.06778095662593842, -0.1386667788028717, -0.46532708406448364, 0.29802417755126953, 0.16551823914051056, 0.508942723274231, -0.2007603943347931, -0.5544998645782471, -0.20441418886184692, 0.06547168642282486, -0.3349095284938812, -0.006186294369399548...
to split up the string on those control characters and decode it accordingly. Here's a (very slow) example of such a function that handles latin1 and shift-JIS: ``` latin1 = "latin-1" japanese = "Shift-JIS" control_l = "\x0c" control_j = "\n" encodingMap = { control_l: latin1, control_j: japanese} def funk...
[ -0.37527549266815186, -0.22744783759117126, 0.09535150229930878, 0.11385282129049301, 0.060441840440034866, 0.2296391725540161, -0.09325442463159561, -0.11188153177499771, 0.003240898484364152, -0.3351849317550659, -0.361501008272171, 0.25265491008758545, -0.4247027337551117, -0.1890717744...
currentCodec = encodingMap[ch] accum = "" else: accum += ch output += accum.decode(currentCodec) return output ``` A faster version might use str.split, or regular expressions. (Also, as you can see in this example, "^J" is the control character for "newline", so your input da...
[ -0.13096971809864044, -0.28818055987358093, 0.5126929879188538, -0.14649254083633423, 0.35072189569473267, -0.0631818026304245, 0.058949846774339676, -0.06210245192050934, -0.03801863268017769, -0.4073418378829956, -0.2106306105852127, 0.3309803009033203, -0.5776316523551941, 0.07980726659...
I start a .Net server side program on my local workstation, but soon it throws a security exception. I searched the web for answers, but no quick fix was found / worked. I just want to run my program. How do I get rid of the exception? I fully trust the program, because its mine. Edit: Oh, yes, I do run the program fr...
[ 0.5342973470687866, 0.423809289932251, 0.24904155731201172, 0.14721110463142395, -0.01561745349317789, -0.10201678425073624, 0.3975844085216522, 0.16131316125392914, -0.09126042574644089, -0.6523954272270203, 0.04674222320318222, 0.3046269416809082, -0.08741293847560883, 0.0676619112491607...
my drive, it works. [.NET 3.5 SP1 has better support for running applications on the local intranet.](http://blogs.msdn.com/shawnfa/archive/2008/05/12/fulltrust-on-the-localintranet.aspx) If you can't target 3.5 SP1, you can map the share you're running the application from to a local drive and [use CasPol to set tha...
[ 0.39224138855934143, -0.06570594757795334, 0.6793699264526367, 0.03559162840247154, -0.07798020541667938, -0.32428133487701416, 0.1950322538614273, 0.06146133318543434, -0.11872917413711548, -0.5395850539207458, -0.09265600889921188, 0.9468371868133545, -0.23520061373710632, 0.128101930022...
OK, so instead of writing a whole bunch of access control specs, and duplicating them across many of my spec files, I'm looking to create a custom matcher. So instead of this: ``` describe "access control" do it "should prevent access by non-logged-in users" it "should prevent access by normal users" it "should ...
[ 0.31105220317840576, 0.13492801785469055, 0.2686140835285187, 0.1452716588973999, -0.13994649052619934, -0.5172423124313354, -0.04511893913149834, -0.07409989833831787, -0.2290406972169876, -0.3356875777244568, -0.09236647188663483, 0.764661431312561, -0.604017972946167, 0.0733565688133239...
I can go about doing something like this? OK, [I have found a method of achieving this](http://matthall.wordpress.com/2008/10/14/a-helper-for-testing-access-control-with-rspec/), though it doesn't use a custom matcher. Include the following code in your spec\_helper.rb: ``` def access_control (code, options={}) opti...
[ 0.295235812664032, -0.2167617231607437, 0.7550057768821716, 0.11853399872779846, 0.21000294387340546, -0.30504801869392395, 0.7808008193969727, -0.4221252501010895, -0.10804761201143265, -0.5546339750289917, -0.09407154470682144, 0.4226149022579193, -0.25476136803627014, 0.1707043200731277...
eval code response.should redirect_to(login_path) end end end ``` And call it as follows: ``` access_control("get :index", {:allow => [:super_admin], :disallow => [:quentin, :admin]}) ``` You can then use it to build up a complete list of methods that should be restricted, and the users to which they a...
[ -0.14071746170520782, -0.1461178958415985, 0.4240094721317291, -0.03144173324108124, -0.07654476910829544, 0.16678355634212494, 0.4473276138305664, -0.46402865648269653, -0.18937167525291443, -0.431892454624176, -0.3522188365459442, 0.395820289850235, -0.48865610361099243, -0.0016767174238...
I need to perform some action when my application receives focus. I've tried hooking both GotFocus- and Enter-events, but they only trigger when focus changes within my application. Scenario is that my application detects some problem that must be resolved elsewhere, and I would like to do the check again when the ...
[ 0.22512488067150116, -0.1981036365032196, 0.6117101907730103, -0.13112516701221466, 0.05898899585008621, -0.230300635099411, 0.43177416920661926, -0.27922725677490234, -0.21462155878543854, -0.6288198828697205, -0.3934052586555481, 0.7092604637145996, -0.22556942701339722, -0.2566983699798...
I'm in a Microsoft IE environment, but I want to use cygwin for a number of quick scripting tasks. How would I configure it to use my windows proxy information? Ruby gems, ping, etc are all trying to make direct connections. How can I get them to respect the proxy information that IE and firefox use? Just for the reco...
[ 0.45623505115509033, 0.35307881236076355, 0.31761276721954346, 0.0012876358814537525, -0.0670800507068634, -0.2197982668876648, 0.327019065618515, 0.09097383916378021, 0.05933857709169388, -0.7790878415107727, 0.1408836990594864, 0.3465842306613922, -0.11391513794660568, 0.3799377977848053...
Ideally, something cross-platform. The CPAN is probably the best way to go. Take a look at [Term::Screen:Uni](http://search.cpan.org/~tpaba/Term-Screen-Uni-0.04/lib/Term/Screen/Uni.pm): ``` require Term::Screen::Uni; my $scr = new Term::Screen::Uni; $scr->clrscr() ```
[ 0.08463423699140549, -0.07152912020683289, 0.4795728921890259, 0.23319603502750397, 0.14852429926395416, -0.21748237311840057, -0.22602641582489014, -0.02663036249577999, -0.3424592912197113, -0.704806923866272, -0.20472773909568787, 0.4517100155353546, 0.005603136029094458, -0.04617050290...
Can I have a custom service providing the storage of the models I use in Django? That service would not be speaking SQL. I would like to build a web frontend to a system that consists of multiple services linked with a network based IPC, one of which provides an interface to commonly used, persistent objects (stored i...
[ 0.4200287461280823, 0.22224056720733643, 0.15305855870246887, 0.3125249445438385, -0.009935377165675163, -0.17709678411483765, -0.06765022873878479, -0.051317114382982254, -0.3835400640964508, -0.3982810378074646, 0.3570035696029663, 0.5096812844276428, -0.2042318433523178, 0.4429438710212...
end up being implemented in Django, too, but the communication between it and the web frontend would not be using SQL. You might take a look at [An introduction to using couchdb with django](http://lethain.com/entry/2008/aug/18/an-introduction-to-using-couchdb-with-django/). Dunno if connecting to CouchDB is directly s...
[ 0.4404248297214508, 0.05796704441308975, 0.2484668493270874, 0.25615394115448, -0.11200229823589325, -0.6646392941474915, -0.0309760682284832, 0.21176183223724365, -0.3306467533111572, -0.6938239932060242, 0.2397611439228058, 0.5128790140151978, -0.04687277600169182, -0.006277610547840595,...
I have implemented what I thought was a pretty decent representation of MVC in several web applications but since having joined crackoverflow, I'm finding that perhaps my initial definitions were a bit simplistic and thus I'd really like some clarification on the differences between the Data Access Layer and the Model ...
[ 0.4487714171409607, 0.19566117227077484, 0.3072338104248047, 0.148521289229393, -0.018004432320594788, -0.2567604184150696, -0.04019223526120186, 0.0745527446269989, -0.34183165431022644, -0.5959105491638184, 0.05980073660612106, 0.8474264144897461, -0.09005486965179443, 0.3003044426441192...
objects that met the criteria for the get() function. These data access objects are referenced directly from the controller scripts which contain my business logic. If it matters, I'm working in PHP and MySQL but am interested in suggestions that might be coded in other languages. **UPDATE:** For a more specific ex...
[ 0.02443738840520382, 0.11155804991722107, 0.24088267982006073, 0.10095631331205368, -0.038308028131723404, -0.03663928434252739, 0.07439917325973511, -0.02402237057685852, 0.1049022451043129, -0.6361474394798279, -0.020369790494441986, 0.5249030590057373, -0.2653621733188629, 0.37072792649...
protected $email; protected $username; protected $password; protected $company_id; protected $active // Bool that holds either a 0 or 1 public function __construct ( $user_id ) // Uses Primary Key to know which record to construct { $sql = //Sql to get this information from the ...
[ 0.056882794946432114, 0.26115548610687256, 0.07032874971628189, -0.25591468811035156, 0.2400960475206375, -0.07576200366020203, 0.16602563858032227, -0.07617184519767761, -0.15648490190505981, -0.05992405116558075, -0.2330756038427353, 0.5000072717666626, -0.39606910943984985, 0.2128512561...
the query. } public function insert(){} public function update(){} public function delete(){} public static function get($filters, $orderVals, $limit){} // An object such as user might also contain the following function definition public static function login($username, $password){...
[ -0.13320037722587585, -0.13469256460666656, 0.43921494483947754, 0.13100536167621613, 0.043143391609191895, -0.08919835835695267, 0.19378219544887543, -0.1996905654668808, -0.042833443731069565, -0.48444029688835144, -0.2912663519382477, 0.5582882165908813, -0.4882856011390686, 0.247995793...
stand alone as a good, clean, high-fidelity model of real-world entities. If it's a business domain, they might be customers, plans, products, payments, all that kind of stuff. Your application works with these classes. The idea is that your application is a model of real-world handling of the domain objects. Your appl...
[ 0.34460189938545227, 0.4039692282676697, -0.13975979387760162, 0.23019148409366608, -0.532415509223938, 0.1653960794210434, 0.3443776071071625, -0.18402022123336792, -0.2968195974826813, -0.3611413240432739, -0.043466467410326004, 0.1867125928401947, -0.3420962691307068, 0.0785484835505485...
have foreign-key lookup issues, and yes, you do have to make your model objects aware of some data access components so that a model object can find each other objects given just foreign keys instead of the actual object. A good ORM layer handles this navigation issue for you.] A model full of SQL isn't a good model. ...
[ 0.05377307906746864, 0.12358208000659943, 0.21547402441501617, 0.39798882603645325, 0.1736811101436615, -0.3059186339378357, -0.007193959783762693, 0.2447391301393509, -0.3054782450199127, -0.6369935870170593, -0.12308505177497864, 0.19276916980743408, -0.018168745562434196, 0.322723567485...
to relational database tables. A SQL-oriented data access layer would reconstruct your model from a relational database and persist your model in a relational database. A YAML data access layer would read and write YAML files from your model. Sometimes, the object-relational mapping (ORM) design pattern is used to mak...
[ 0.06591714173555374, -0.047781653702259064, 0.23128286004066467, 0.31969624757766724, 0.220772847533226, 0.042650818824768066, -0.18274392187595367, 0.022255949676036835, -0.3974396288394928, -0.4816877841949463, -0.34992021322250366, 0.34543654322624207, -0.3725748658180237, 0.23082865774...
because it is independent of SQL, YAML, JSON, XML or some other serialization technique. If your DAO creates and persists model objects, I think you've got the model parts of MVC implemented reasonably well. You can look at ORM packages to get additional ideas of the state of the art. I'm a fan of [iBatis](http://ibat...
[ 0.20161569118499756, 0.3032469153404236, 0.28957802057266235, -0.21977642178535461, -0.17947177588939667, -0.3746161460876465, 0.2479914277791977, 0.08342595398426056, -0.2562997043132782, -0.3269360065460205, -0.13422004878520966, 0.6034607291221619, -0.45067188143730164, 0.13063146173954...
I have a need to work with Windows executables which are made for x86, x64, and IA64. I'd like to programmatically figure out the platform by examining the files themselves. My target language is PowerShell but a C# example will do. Failing either of those, if you know the logic required that would be great. (from ano...
[ 0.0948525071144104, 0.321022629737854, 0.05138674005866051, 0.11964568495750427, -0.16828452050685883, -0.14122596383094788, 0.3163953721523285, 0.24725750088691711, -0.040079981088638306, -0.7997587323188782, -0.05675201863050461, 0.44357064366340637, -0.33362311124801636, 0.0835949853062...
that as the target platform. The Exploring PE Headers (K. Stanton,MSDN) blog entry that showed me the offset, as another response noted. ``` public enum MachineType { Native = 0, I386 = 0x014c, Itanium = 0x0200, x64 = 0x8664 } public static MachineType GetMachineType(string fileName) { const int PE_POINTER_O...
[ 0.38358622789382935, -0.14809006452560425, 0.15586157143115997, 0.016636695712804794, -0.10164166241884232, 0.282417893409729, -0.1282753348350525, -0.539073646068573, 0.25385338068008423, -0.8674150109291077, -0.16666187345981598, 0.5638959407806396, -0.20828089118003845, 0.19460166990756...
4096); } // dos header is 64 bytes, last element, long (4 bytes) is the address of the PE header int PE_HEADER_ADDR = BitConverter.ToInt32(data, PE_POINTER_OFFSET); int machineUint = BitConverter.ToUInt16(data, PE_HEADER_ADDR + MACHINE_OFFSET); return (MachineType)machineUint; } ```
[ -0.03329499438405037, 0.04779544845223427, 0.42026200890541077, -0.09080332517623901, 0.22954674065113068, 0.3903392553329468, 0.12797871232032776, -0.5753405690193176, 0.17706380784511566, -0.7578326463699341, -0.2102789282798767, 0.5723426342010498, -0.20914295315742493, 0.18478627502918...
For example: ``` javac Foo.java Note: Foo.java uses unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details. ``` This comes up in Java 5 and later if you're using collections without type specifiers (e.g., `Arraylist()` instead of `ArrayList<String>()`). It means that the compiler can't chec...
[ 0.0802016332745552, 0.03505717217922211, 0.29688841104507446, -0.18080253899097443, -0.22656533122062683, -0.3382401764392853, 0.4789328873157501, -0.361171692609787, -0.5679304599761963, -0.44220295548439026, -0.3446885049343109, 0.40781736373901367, -0.6722080111503601, 0.286660581827163...
I have a main frame with a splitter. On the left I have my (imaginatively named) CAppView\_Leftand on the right I have CAppView\_Right\_1and CAppView\_Right\_2. Through the following code I initialise the two primary views correctly: ``` if (!m_wndSplitter.CreateStatic(this, 1, 2)) { TRACE0("Failed to CreateStatic...
[ 0.0445142425596714, -0.16939707100391388, 0.5813122987747192, -0.26477763056755066, 0.20073463022708893, 0.3461144268512726, 0.2436663806438446, -0.2539745569229126, -0.06992466002702713, -0.9257789850234985, 0.1488262414932251, 0.579296886920929, -0.27101582288742065, 0.13974212110042572,...
inside the right frame, however when I try to add this: ``` if (!m_wndSplitter.CreateView(0, 1, RUNTIME_CLASS(CAppView_Right_2), CSize(375, 200), pContext)) { TRACE0("Failed to create first right pane\n"); return FALSE; } ``` VS compiles but fails to run the application, raising an exception telling me I hav...
[ 0.3769305646419525, 0.06802642345428467, 0.40363776683807373, 0.019710859283804893, 0.10000099241733551, 0.07206163555383682, 0.1685551106929779, -0.2808486223220825, -0.16646505892276764, -0.7605153918266296, 0.007887779735028744, 0.6340033411979675, -0.10068012773990631, 0.24493384361267...
own code.
[ 0.3135718107223511, 0.28788381814956665, -0.20617124438285828, 0.30724263191223145, -0.18074719607830048, 0.13741625845432281, 0.23474982380867004, 0.09675014019012451, 0.16609197854995728, -0.6376034021377563, 0.11788009852170944, 0.2562071681022644, -0.1977183222770691, -0.36856177449226...
I need a way to do key-value lookups across (potentially) hundreds of GB of data. Ideally something based on a distributed hashtable, that works nicely with Java. It should be fault-tolerant, and open source. The store should be persistent, but would ideally cache data in memory to speed things up. It should be able ...
[ 0.3419686257839203, 0.09585912525653839, 0.37889033555984497, 0.1671474128961563, -0.034958384931087494, -0.31239745020866394, -0.010609030723571777, -0.13967540860176086, -0.09638199210166931, -0.4134852886199951, 0.22733476758003235, 0.330131471157074, -0.1241389662027359, 0.290317237377...
free. ``` java.util.Map map = Hazelcast.getMap ("mymap"); map.put ("key1", "value1"); ``` Regards, -talip
[ 0.12356460094451904, -0.09796721488237381, 0.3688812553882599, 0.2716571092605591, 0.02961725927889347, -0.38451698422431946, 0.46412158012390137, -0.19192947447299957, -0.1633078157901764, -0.8369186520576477, -0.46266481280326843, 0.7045364379882812, -0.40297502279281616, -0.011466326192...
I'm using the PHP function imagettftext() to convert text into a GIF image. The text I am converting has Unicode characters including Japanese. Everything works fine on my local machine (Ubuntu 7.10), but on my webhost server, the Japanese characters are mangled. What could be causing the difference? Everything should ...
[ 0.19525790214538574, 0.18826113641262054, 0.35176241397857666, 0.04608851671218872, -0.10153719782829285, 0.34434542059898376, 0.33096668124198914, -0.3673975467681885, -0.1607992947101593, -0.81211918592453, -0.15719695389270782, 0.644830584526062, -0.36530473828315735, 0.0986200794577598...
colors imagefilledrectangle($im, 0, 0, 159, 159, $white); // Add the text imagettftext($im, 12, 0, 20, 20, $black, $font, $text); imagegif($im); imagedestroy($im); ``` Here's the solution that finally worked for me: ``` $text = "你好"; // Convert UTF-8 string to HTML entities $text = mb_convert_encoding($text, 'HTML-...
[ -0.07070723176002502, -0.24091418087482452, 0.7370246052742004, -0.2826153337955475, 0.020677493885159492, 0.518248438835144, 0.21520398557186127, -0.36761894822120667, -0.09574539214372635, -0.7634227275848389, -0.2913692891597748, 0.8067446947097778, -0.6346909403800964, -0.0867243334650...
} } ``` Converting the string to HTML entities works except that the function imagettftext() doesn't accept named entities. For example, ``` &#26085;&#26412;&#35486; ``` is OK, but ``` &ccedil; ``` is not. Converting back to ISO-8859-1, converts the named entities back to characters, but there is a second prob...
[ -0.2637464106082916, 0.16709266602993011, 0.4884442985057831, -0.19638267159461975, -0.061115216463804245, 0.1058049127459526, 0.37564054131507874, 0.024612246081233025, 0.13015705347061157, -0.638023853302002, -0.07989271730184555, 0.5571228861808777, -0.2614782452583313, -0.0986418351531...
doesn't really accept UTF-8 strings on my server.
[ 0.1179528534412384, -0.0359424464404583, 0.18801817297935486, -0.013973350636661053, 0.05148256570100784, 0.10305171459913254, 0.3584469258785248, 0.8183194994926453, 0.012266766279935837, -0.14065250754356384, 0.18360890448093414, -0.02601875364780426, -0.07434875518083572, 0.293632417917...
Is there a way to tell the debugger to stop just before returning, on whichever statement exits from the method, be it return, exception, or fall out the bottom? I am inspired by the fact that the Java editor shows me all the places that my method *can* exit - it highlights them when you click on the return type of the...
[ -0.08407935500144958, 0.035025566816329956, -0.018541373312473297, -0.04767249897122383, 0.20467764139175415, -0.30043840408325195, 0.14328241348266602, 0.09806890785694122, 0.016033830121159554, -0.44415023922920227, -0.11006675660610199, 0.3084941804409027, -0.16948750615119934, -0.07375...
are two checkboxes: "Method Entry", "Method Exit". Check the latter.
[ -0.04985474795103073, 0.03289248049259186, 0.10934232920408249, 0.3805190622806549, 0.47711309790611267, 0.2252867966890335, 0.1236165314912796, 0.24870483577251434, 0.02523280866444111, -0.5113171935081482, -0.1162138432264328, -0.23226521909236908, -0.3099970817565918, -0.407631576061248...
I've got a spreadsheet with plenty of graphs in it and one sheet with loads of data feeding those graphs. I've plotted the data on each graph using ``` =Sheet1!$C5:$C$3000 ``` This basically just plots the values in C5 to C3000 on a graph. Regularly though I just want to look at a subset of the data i.e. I might ...
[ 0.6325417757034302, 0.38522660732269287, 0.42001187801361084, 0.28655487298965454, 0.10508987307548523, 0.223190039396286, -0.020730845630168915, -0.19662751257419586, -0.49522319436073303, -0.8093881607055664, 0.5794191360473633, 0.27147752046585083, -0.032467976212501526, 0.2720097899436...
single sheet that it reads in the row number from and plots all the graphs from C5 to C 'row number' would be best. Any help would be much appreciated. OK, I had to do a little more research, here's how to make it work, completely within the spreadsheet (without VBA): Using A1 as the end of your desired range, and th...
[ 0.48277267813682556, 0.1214754730463028, 0.3796268105506897, 0.10954254120588303, -0.1711190938949585, 0.1912466585636139, -0.04810965806245804, -0.37776434421539307, -0.47029805183410645, -0.27033931016921997, 0.13794644176959991, 0.14721634984016418, -0.21576350927352905, 0.1677515059709...
tab of the chart SOURCE DATA dialog, and change your VALUES statement to: =Sheet1!MYDATA Now everytime you change the A1 cell value, it'll change the chart. Thanks to Robert Mearns for catching the flaws in my previous answer.
[ 0.247978076338768, 0.3033130466938019, 0.40199437737464905, 0.17415639758110046, 0.1777651309967041, 0.11386135965585709, 0.3397623896598816, -0.044782303273677826, -0.49743345379829407, -0.4765104353427887, 0.11744198203086853, 0.4231080412864685, -0.405446320772171, -0.12133032083511353,...
So I made some timers for a quiz. The thing is, I just realized when I put ``` javascript: alert("blah"); ``` in the address, the popup alert box **pauses** my timer. Which is very unwanted in a quiz. I don't think there is any way to stop this behaviour... but I'll ask anyway. If there is not, mind suggesting wh...
[ 0.2660630941390991, 0.21283160150051117, 0.26903772354125977, -0.13216833770275116, -0.31830739974975586, 0.0017777611501514912, 0.64817875623703, 0.0244442168623209, -0.10934782773256302, -0.8777804970741272, -0.1231556385755539, 0.5316894054412842, -0.13024462759494781, -0.00687198154628...
Do something with msg here. I always write mine to console.log, // but then I have rarely found a use for a real modal dialog, // and most can be handled by the browser (like window.onbeforeunload). }; ```
[ 0.04604645445942879, 0.0928962230682373, 0.4872065484523773, -0.0025645443238317966, 0.09055181592702866, -0.18576712906360626, 0.4416270852088928, 0.5951958298683167, -0.10263954102993011, -0.7961908578872681, -0.24862167239189148, 0.6642761826515198, -0.3450751304626465, -0.0197704099118...
We recently switched our Windows software packages from RPM (cygwin) to MSI (wix). Having a native packaging is a much welcome change and we intend to stick with it. However, MSI feels overly complicated for what it does and doesn't seem to provide some basic abilities. But I'm probably mistaken. Is there a way to lis...
[ 0.2166905701160431, -0.12891645729541779, 0.5244395136833191, -0.004574483726173639, -0.00933716632425785, -0.20635385811328888, 0.18204154074192047, 0.1065971627831459, -0.2782421410083771, -0.6577687859535217, -0.10564649850130081, 0.4753231704235077, -0.4160306453704834, 0.3422888815402...
= objWMIService.ExecQuery _ ("SELECT * FROM Win32_Product") If colSoftware.Count > 0 Then Set objFSO = CreateObject("Scripting.FileSystemObject") Set objTextFile = objFSO.CreateTextFile( _ "c:\SoftwareList.txt", True) For Each objSoftware in colSoftware objTextFile.WriteLine objSof...
[ -0.10209974646568298, 0.26528364419937134, 0.6536799073219299, -0.19764524698257446, 0.06413497030735016, 0.1559223085641861, 0.262935996055603, -0.39796292781829834, 0.0017110479529947042, -0.7071834206581116, -0.4979270100593567, 0.4612458348274231, -0.38006630539894104, 0.01410094834864...
Does anyone have any experience hosting the Windows Workflow designer surface? I've seen a couple of rather difficult to follow examples on MSDN, but not much else - certainly nothing that offers an explanation into the process of hosting WF that is clear or easy to read... Are there better resources out there for host...
[ 0.35974356532096863, 0.0292347501963377, -0.09113352000713348, 0.05059608072042465, -0.5311828851699829, 0.01432283315807581, -0.036498889327049255, -0.05334736034274101, -0.30863791704177856, -0.528926432132721, 0.22033600509166718, 0.355683296918869, 0.07987997680902481, 0.06043285876512...
the workflow designer. Will update the post as soon as I am able to dig it out.
[ 0.37398001551628113, 0.16562969982624054, 0.32345882058143616, 0.18157905340194702, -0.21331948041915894, -0.18910755217075348, 0.09550066292285919, 0.3151797354221344, 0.1054176315665245, -0.7005965113639832, -0.22039131820201874, 0.2052079439163208, 0.150802880525589, 0.02308386750519275...
How can I make my window not have a title bar but appear in the task bar with some descriptive text? If you set the Form's .Text property then .net gives it a title bar, which I don't want. ``` this.ControlBox = false; this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; thi...
[ 0.5228712558746338, 0.07097049057483673, 0.5899388194084167, -0.12178798764944077, 0.19831037521362305, -0.3243950605392456, 0.5519985556602478, -0.24469661712646484, 0.1758795529603958, -0.707033634185791, -0.09786760061979294, 0.6669638752937317, -0.3118946850299835, 0.31052759289741516,...
task bar"; ``` I've found a partial solution, to override CreateParams: ``` protected override System.Windows.Forms.CreateParams CreateParams { get { System.Windows.Forms.CreateParams cp = base.CreateParams; cp.Style &= ~0x00C00000; // WS_CAPTION return cp...
[ 0.138556569814682, 0.18599049746990204, 0.6750380396842957, -0.24502018094062805, 0.2819758653640747, 0.11463994532823563, 0.5526246428489685, -0.1697711944580078, -0.318716824054718, -0.7013148665428162, -0.15021292865276337, 0.33170515298843384, -0.3359598219394684, 0.26376181840896606, ...
as if they have a title bar, ie it's taller than it should be. Is there any good solution to this? One approach to look into might be to set the `FormBorderStyle` property of your `Form` to `None` (instead of `FixedDialog`). The drawback to this approach is that you lose the borders of your window as well as the Titl...
[ 0.376158744096756, -0.1977524608373642, 0.6919538378715515, -0.20763204991817474, 0.1901341676712036, -0.5704843401908875, 0.5812155604362488, -0.4046121835708618, -0.30925655364990234, -0.7187051177024841, -0.17303171753883362, 0.5406188368797302, -0.16828371584415436, 0.29007089138031006...
event handlers. I would also be interested to hear about better solutions.
[ 0.5368661880493164, -0.2787957787513733, -0.02982761524617672, 0.28361207246780396, -0.06594211608171463, 0.07096488028764725, -0.10872291773557663, 0.08273611962795258, -0.451782763004303, -0.42614224553108215, -0.06398934870958328, 0.3320365846157074, 0.05780261754989624, -0.338289409875...
I’m using the gcc in MinGW that comes with Strawberry Perl, on Windows XP. I’d like to have [ddd](http://www.gnu.org/software/ddd/) (the Data Display Debugger) as well but apparently on Windows the simplest way to get ddd is by running Cygwin. So what's the bare minimum of Cygwin I can install to get ddd up and running...
[ 0.46243059635162354, 0.1053209900856018, 0.19595563411712646, -0.1203511506319046, -0.45949241518974304, -0.35892680287361145, 0.18003761768341064, 0.40304410457611084, -0.11800980567932129, -0.7367898225784302, -0.014945452101528645, 0.7874727249145508, -0.12014210224151611, 0.23337589204...
Base: base-files, grep Develop: ddd, gdb Math: gnuplot
[ -0.04572881758213043, 0.18701009452342987, 0.06817564368247986, 0.29034703969955444, -0.296564519405365, 0.21617335081100464, 0.035918645560741425, -0.2954738438129425, -0.03239373862743378, -0.31724822521209717, -0.5217669010162354, 0.18369241058826447, -0.46283212304115295, 0.05633065477...
I am a complete beginner trying to develop for FCKeditor so please bear with me here. I have been tasked with developing a custom plugin that will allow users to browse a specific set of images that the user uploads. Essentially the user first attaches images, then uses the FCKeditor to insert those images. So I have ...
[ 0.5745413899421692, -0.22104226052761078, 0.601408064365387, 0.031077289953827858, -0.11621592193841934, -0.35196158289909363, -0.07178384065628052, -0.1384568065404892, -0.31738319993019104, -0.6844252943992615, 0.12888304889202118, 0.3505784869194031, -0.2335055023431778, -0.094416335225...
the site. 2) How should I pass the querystring to mybrowser.asp? 3) Any other recommendations for developing FCKeditor plugins? Any sample plugins that might be helpful to me? EDIT: The querystring passed to the plugin page will be the exact same as the one on the host page. (This is a very specific plugin that wil...
[ 0.2409808486700058, -0.07096090912818909, 0.5639031529426575, 0.28295624256134033, -0.2529088258743286, -0.5326187610626221, 0.1792883425951004, 0.021022990345954895, -0.30816906690597534, -0.5122517347335815, -0.09638603776693344, 0.3619300127029419, -0.38362550735473633, -0.2911683917045...
started. ``` // Register the related command. // RegisterCommand takes the following arguments: CommandName, DialogCommand // FCKDialogCommand takes the following arguments: CommandName, // Dialog Title, Path to HTML file, Width, Height FCKCommands.RegisterCommand( 'MyBrowser', new FCKDialogCommand( ...
[ -0.06478523463010788, -0.0933387503027916, 1.03078031539917, -0.0638468861579895, 0.10872545838356018, 0.3867719769477844, 0.1207956001162529, -0.3548230230808258, -0.31125983595848083, -0.8421814441680908, -0.417383074760437, 0.37804174423217773, -0.37927067279815674, -0.10670769959688187...
following arguments: CommandName, Button Caption var button = new FCKToolbarButton( 'MyBrowser', 'Select An Image' ) ; button.IconPath = FCKPlugins.Items['MyBrowser'].Path + 'img.png' ; FCKToolbarItems.RegisterItem( 'MyBrowser', button ) ; ``` Edit: I haven't tested this, but you should be able to append the que...
[ -0.3076038360595703, -0.08062776923179626, 0.7428618669509888, 0.160401850938797, 0.17806831002235413, 0.3341180384159088, 0.27117231488227844, -0.3051854372024536, -0.2918694019317627, -0.6733699440956116, -0.32939285039901733, 0.5379282832145691, -0.43583253026008606, 0.01386212930083274...
I would like to create a window with a progressbar which shows the current status of Spring's object instantiation. From Spring.Net's [documentation](http://www.springframework.net/docs/1.1.2/reference/html/objects.html#objects-factory-customizing) it seems that `IObjectPostProcessors` is the right point to start and t...
[ 0.018418079242110252, -0.26769036054611206, 0.20665337145328522, -0.04820229485630989, 0.056798603385686874, 0.18853504955768585, 0.13090093433856964, 0.014280078001320362, -0.47536003589630127, -0.5956117510795593, -0.07379994541406631, 0.2721942365169525, -0.062411896884441376, -0.031146...
application start up to the user? When I interview people for a position of Client-Side developer I try to figure out: ``` 1) Understanding DOM (what is that, how is it related to HTML etc) 2) Understanding XML/namespaces 3) Understanding JavaScript (object-oriented? what otherwise) 4) Knowing approaches to component...
[ 0.002646014792844653, 0.34001192450523376, 0.34115517139434814, 0.13475656509399414, 0.12215517461299896, -0.27904635667800903, 0.2633626461029053, -0.3221670687198639, -0.11878403276205063, -0.5991029739379883, -0.25097307562828064, 0.5919222235679626, -0.13482666015625, -0.29553309082984...
interviewee is suggested to pick technologies he would put into his brand-new creature, suggest ones that might be missing from the current client-side platform.
[ 0.6520142555236816, -0.11195128411054611, 0.14191821217536926, 0.3258386552333832, 0.28371915221214294, 0.2953559458255768, -0.06560693681240082, -0.06731273978948593, 0.20836055278778076, -0.2682850658893585, -0.07930881530046463, 0.45409631729125977, 0.44320476055145264, 0.10155099630355...
When working on a VS2005 project that involves referencing Microsoft.SharePoint.dll, building the project causes Microsoft.SharePoint.Search.dll to be copied to my bin folder. Why is this? Okay, maybe it's just a bug, but I want to know the mechanism. [Edit: Copy local is most definitely turned off -- Microsoft.ShareP...
[ 0.718360960483551, 0.1626468300819397, 0.3014756441116333, 0.19118042290210724, -0.1594320386648178, -0.43463680148124695, 0.3110700845718384, 0.10268222540616989, -0.06846657395362854, -0.6678248643875122, 0.143413245677948, 0.5445830225944519, -0.1839122325181961, 0.6811422109603882, -...
Is there code in VBA I can wrap a function with that will let me know the time it took to run, so that I can compare the different running times of functions? Unless your functions are very slow, you're going to need a very high-resolution timer. The most accurate one I know is `QueryPerformanceCounter`. Google it for ...
[ 0.14496830105781555, -0.18379658460617065, 0.2603311538696289, -0.051326118409633636, 0.01092445943504572, 0.03626830503344536, 0.1855746954679489, -0.07700219005346298, -0.23728331923484802, -0.5112259387969971, 0.33222246170043945, 0.5935269594192505, -0.3234243094921112, 0.1300555467605...
Declare Function QueryPerformanceCounter Lib "kernel32" (lpPerformanceCount As LARGE_INTEGER) As Long Private Declare Function QueryPerformanceFrequency Lib "kernel32" (lpFrequency As LARGE_INTEGER) As Long Private m_CounterStart As LARGE_INTEGER Private m_CounterEnd As LARGE_INTEGER Private m_crFrequency As Double P...
[ -0.3981301784515381, 0.016844041645526886, 0.5587481260299683, -0.2725127935409546, -0.02109498344361782, 0.25818076729774475, 0.1737925112247467, -0.34672030806541443, -0.03869326040148735, -0.23779867589473724, -0.30101245641708374, 0.8763108253479004, -0.42986634373664856, -0.0052038556...
QueryPerformanceFrequency PerfFrequency m_crFrequency = LI2Double(PerfFrequency) End Sub Public Sub StartCounter() QueryPerformanceCounter m_CounterStart End Sub Property Get TimeElapsed() As Double Dim crStart As Double Dim crStop As Double QueryPerformanceCounter m_CounterEnd crStart = LI2Double(m_C...
[ -0.32967519760131836, -0.013091014698147774, 0.9413329362869263, -0.207115039229393, 0.1818952113389969, 0.11908881366252899, 0.27725034952163696, -0.7304414510726929, -0.15973035991191864, -0.1867041140794754, -0.4422486126422882, 0.790785014629364, -0.08849116414785385, 0.360536098480224...
I'm getting XML like this: `<Items> <Row attr1="val"></Row> <Row attr1="val2"></Row> </Items>` This is valid XML, as you know, but another library I'm using is busted and it will only accept XML in this format: `<Items> <Row attr1="val"/> <Row attr1="val2"/> </Items>` I'm already reading the XML into XmlDocument...
[ 0.15288276970386505, 0.2980749011039734, 0.4012550711631775, 0.0913965106010437, -0.008825709111988544, -0.35089781880378723, 0.3547067642211914, -0.3929849863052368, -0.10890978574752808, -0.7923805117607117, -0.2629376947879791, 0.6007910966873169, -0.021044112741947174, 0.18009695410728...
How do I generate a random number between `0` and `n`? Use [`rand(range)`](http://www.ruby-doc.org/core-2.1.3/Kernel.html#method-i-rand) From [Ruby Random Numbers](http://www.codeodor.com/index.cfm/2007/3/25/Ruby-random-numbers/1042): > If you needed a random integer to simulate a roll of a six-sided die, you'd use: ...
[ 0.1820898950099945, -0.0011981716379523277, -0.13678593933582306, 0.039313942193984985, -0.4891204535961151, -0.03476174548268318, -0.011939582414925098, -0.2574305534362793, -0.4102077782154083, -0.16286326944828033, -0.02027939260005951, 0.2776842713356018, -0.24154837429523468, 0.011254...
to guess 10 numbers](http://www.eggheadcafe.com/software/aspnet/35817496/random-integer-within-a-r.aspx), you can initialize them with: ``` 10.times.map{ 20 + Random.rand(11) } #=> [26, 26, 22, 20, 30, 26, 23, 23, 25, 22] ``` Note: * Using `Random.new.rand(20..30)` (using `Random.new`) generally would not be a go...
[ -0.02115410752594471, -0.022489983588457108, 0.0973944142460823, -0.109200619161129, 0.0028747436590492725, 0.31321364641189575, 0.17397835850715637, -0.5328759551048279, -0.3840439021587372, -0.29852861166000366, -0.16372011601924896, 0.19034457206726074, -0.3816587030887604, 0.0008996150...
digits](https://stackoverflow.com/questions/5722881/generate-a-random-number-with-7-digits/5723105#5723105). This is why the equivalent of `Random.new.rand(20..30)` would be `20 + Random.rand(11)`, since `Random.rand(int)` returns “a random integer greater than or equal to zero and *less than the argument*.” `20..30` ...
[ -0.19066345691680908, -0.027475515380501747, -0.03913233056664467, -0.13672293722629547, -0.14663028717041016, 0.35616743564605713, -0.21673323214054108, -0.40496793389320374, -0.3999756872653961, -0.22728551924228668, 0.12450229376554489, 0.3968943953514099, -0.19103026390075684, 0.141731...
When I go back to school after Thanksgiving, I'll be taking a course in CS Theory covering topics such as deterministic and nondeterministic finite state machines, turing machines, pushdown automata and a few other things. However, I haven't found a good application that can produce a visual representation of them as w...
[ 0.21108241379261017, 0.30678120255470276, -0.11320467293262482, 0.20426151156425476, -0.29939964413642883, -0.10677965730428696, 0.23834040760993958, 0.6180662512779236, -0.5259032845497131, -0.835082471370697, -0.08323195576667786, -0.14661891758441925, 0.04160545393824577, -0.13629993796...
I don't have a better answer for you than that.
[ 0.36325082182884216, 0.26899391412734985, -0.2533625364303589, 0.35671818256378174, -0.1249210387468338, 0.12870077788829803, 0.1382945477962494, 0.08772313594818115, 0.011977394111454487, -0.1971990019083023, 0.29899826645851135, 0.059669043868780136, -0.1953684389591217, 0.30390325188636...
What are the key differences between Microsoft's SQL Server 2005 and SQL Server 2008? Are there any compelling reasons for upgrading (any edition, as I have a customer with multiple editions)? Or is there a website with either a chart or bullet point comparison of the two servers? Also, is there anything noteworthy ...
[ -0.41073930263519287, -0.17148126661777496, 0.3033553659915924, 0.1276349276304245, -0.25970223546028137, -0.254492849111557, 0.3364185690879822, 0.04288505017757416, -0.3212171792984009, -0.3634173274040222, -0.10576488077640533, 0.5047674775123596, -0.2945660948753357, -0.099796600639820...
or groups from consuming high levels or resources. * Hot Plug CPU. Add CPUs on the fly. * Performance Studio. Collection of performance monitoring tools. * *Installation improvements. Disk images and service pack uninstall options.* * Dynamic Development. New ADO and Visual Studio options as well as Dot Net 3. * Entity...
[ 0.11152573674917221, -0.0931391790509224, 0.4368888735771179, 0.16073453426361084, 0.07179313153028488, 0.20444472134113312, -0.12900377810001373, -0.15138502418994904, -0.5267950296401978, -0.6531568765640259, -0.39163097739219666, 0.5395783185958862, -0.2500433921813965, 0.09817698597908...
entire table to a stored procedure. * Spatial Data. Data type for storing Latitude, Longitude, and GPS entries. * Full Text Search. Native Indexes, thesaurus as metadata, and backup ability. * SQL Server Integration Service. Improved multiprocessor support and faster lookups. * MERGE. TSQL command combining Insert, Upd...
[ -0.31028082966804504, -0.016953203827142715, 0.4853029251098633, 0.08830256015062332, -0.14474275708198547, -0.0012065796181559563, 0.2318045049905777, -0.17391957342624664, -0.7147316932678223, -0.5260075330734253, -0.17657499015331268, 0.2521938383579254, -0.3415347635746002, 0.129531666...
you need [hierarchical data types](http://blogs.msdn.com/manisblog/archive/2007/08/17/sql-server-2008-hierarchyid.aspx)? Do you currently store files in the database and want to switch over to [SQL Server's new filestream feature](http://blogs.msdn.com/rdoherty/archive/2007/10/12/getting-traction-with-sql-server-2008-f...
[ -0.14134441316127777, -0.02298756316304207, 0.07662862539291382, 0.3423461616039276, -0.038645654916763306, -0.11029617488384247, -0.016218675300478935, -0.14448553323745728, -0.39323991537094116, -0.5918745398521423, 0.04781199246644974, 0.664978563785553, 0.08149996399879456, 0.227980792...
I think all of the tutorials and stuff are great on blogs, but sometimes when you actually build an application the way you would code or interact with a system is quite different. I was wondering if you all knew some good real world type ASP.NET MVC applications that have the source code available for experimentation...
[ 0.3672398626804352, 0.12706929445266724, 0.160835400223732, 0.3736823499202728, -0.16032123565673828, -0.18048128485679626, 0.0988006666302681, 0.14703421294689178, -0.6187414526939392, -0.5107253789901733, -0.09517333656549454, 0.5090239644050598, 0.323975533246994, 0.06459145247936249, ...
you know of [storefront](http://blog.wekeroad.com/mvc-storefront/). I've heard it's a good tutorial and it comes with source code.
[ 0.6203468441963196, 0.07093747705221176, 0.21858902275562286, -0.013066883198916912, 0.37811967730522156, -0.2239561229944229, 0.12145581841468811, 0.706979513168335, -0.1770167350769043, -0.46056798100471497, 0.11015515774488449, 0.5451878309249878, 0.3789018392562866, 0.03804295882582664...
What’s the difference between the `System.Array.CopyTo()` and `System.Array.Clone()`? The **[Clone()](http://msdn.microsoft.com/en-us/library/system.array.clone.aspx)** method returns a new array (a shallow copy) object containing all the elements in the original array. The **[CopyTo()](http://msdn.microsoft.com/en-us/...
[ 0.22563005983829498, -0.040205974131822586, 0.3182111978530884, 0.0758679211139679, 0.45221802592277527, 0.0428415946662426, -0.0857938826084137, -0.4264256954193115, -0.019982395693659782, -0.5309240818023682, 0.08358662575483322, 0.35908082127571106, -0.3711974620819092, 0.45570489764213...
Clone return a new array. 2- CopyTo let you specify an index (if required) to the destination array. ``` Edit: Remove the wrong example.
[ 0.34971654415130615, 0.046225655823946, 0.013744596391916275, -0.039281539618968964, 0.28586122393608093, -0.14154011011123657, 0.14142896234989166, -0.006041773594915867, 0.08791220933198929, -0.8423871994018555, 0.035146310925483704, 0.5738263130187988, -0.5897608399391174, 0.30108690261...
So, what is the best way to prevent an XSRF attack for a GAE application? Imagine the following: 1. Anyone can see a user's public object, and the db.Model id is used in the request to figure out which object to show. Malicious user now has the id. 2. Malicious user creates their own object and checks out the delete f...
[ 0.32179880142211914, 0.15625949203968048, 0.38750144839286804, -0.20330694317817688, -0.43682923913002014, -0.27066853642463684, 0.4774988293647766, -0.4861803352832794, 0.05686364695429802, -0.496814101934433, -0.010048401542007923, 0.6418797969818115, -0.35290205478668213, 0.248188301920...
using the actual ID part of the key. One idea I had was to use the full key value in delete requests, but would that prevent a malicious user from being able to figure this out? As far as I know, the key is some combination of the model class type, the app id, and the object instance id, so they could probably derive t...
[ 0.6839043498039246, -0.18382515013217926, 0.03628132492303848, 0.3648524582386017, 0.18499572575092316, 0.22906146943569183, -0.03669163957238197, -0.2530999183654785, -0.3014705777168274, -0.23786428570747375, 0.14543142914772034, 0.4820408821105957, -0.4419821500778198, -0.08409388363361...
value written via js to the form. I won't want to exclude non-javascript users, so the cookie solution is no good - for the hidden form value, I would have to do a datastore write on every request that displayed a deletable object - not an ideal situation for a scalable app! Any other ideas out there? When you generat...
[ 0.20238493382930756, 0.019161805510520935, 0.31083303689956665, 0.05923375114798546, -0.2829535901546478, -0.21730808913707733, 0.449792742729187, 0.027465296909213066, -0.036587923765182495, -0.6272198557853699, -0.08701159805059433, 0.477082759141922, -0.3046541213989258, 0.0886887833476...
form and the value from the cookie match. Your random token shouldn't just be a random number. You should encrypt the combination of a random number and the user's identity, to make it difficult for attackers to forge their own tokens. You should also use different encryption keys for the value stored in the form and ...
[ 0.39671197533607483, -0.2060786336660385, 0.379205584526062, 0.44579821825027466, -0.010148740373551846, -0.3910982608795166, 0.31631091237068176, -0.5475024580955505, 0.0027005011215806007, -0.5068039894104004, -0.16776229441165924, 0.38696351647377014, -0.17885220050811768, -0.0404281951...
form; and doesn't require writing to the datastore. This approach is still vulnerable to cross-site scripting attacks, where an attacker could retrieve the hidden value from the form or submit the form, so thoroughly test your site for cross-site scripting vulnerabilities. This approach is also vulnerable to ["clickja...
[ 0.30601033568382263, -0.08639798313379288, 0.26117703318595886, 0.14689627289772034, 0.07281751185655594, -0.5974597334861755, 0.27921196818351746, -0.1256532073020935, -0.12253527343273163, -0.47522395849227905, -0.3221193552017212, 0.5969669818878174, -0.09420482814311981, -0.06589848548...
I have a row of data that I need to modify in a database, using a stored procedure. But in order to call that stored procedure, I need to know the name of the each column. How do I determine the name of the columns? (Hardcoding is not an option as we are talking a LOT of columns whose names may change). EDIT: given th...
[ 0.5505423545837402, 0.08288633823394775, 0.03704250231385231, 0.0908186137676239, 0.3363361060619354, 0.1473982036113739, 0.004730008076876402, -0.28306901454925537, -0.3142956495285034, -0.11831021308898926, 0.28237539529800415, 0.8290349841117859, -0.20743323862552643, -0.168841034173965...
is the index of the column.
[ -0.18676777184009552, 0.0485052615404129, 0.5938270688056946, -0.06211485341191292, -0.19823375344276428, -0.173799067735672, -0.2284456044435501, -0.13766348361968994, 0.033858172595500946, -0.23087230324745178, -0.11120748519897461, -0.06745009124279022, -0.22722937166690826, 0.326575219...
Is there any real practical difference between "java -server" and "java -client"? All I can find on Sun's site is a vague > "-server starts slower but should run faster". What are the real differences? (Using JDK 1.6.0\_07 currently.) This is really linked to *HotSpot* and the default *option values* ([Java HotSpo...
[ 0.16550768911838531, 0.02047516219317913, 0.6070152521133423, -0.042707882821559906, -0.26610952615737915, 0.06260193139314651, -0.191788449883461, -0.18971972167491913, -0.24858896434307098, -0.484952449798584, -0.13450782001018524, 0.5381413102149963, -0.13514851033687592, -0.11083066463...
but use different compilers that are suited to the distinctly unique performance characteristics of clients and servers. These differences include the compilation inlining policy and heap defaults. > > > Although the Server and the Client VMs are similar, the Server VM has been specially tuned to maximize peak operat...
[ 0.12544524669647217, -0.2272871881723404, 0.4523542821407318, 0.10816965997219086, -0.16695061326026917, -0.13968616724014282, 0.05029260367155075, -0.22217945754528046, -0.12226354330778122, -0.7590754628181458, -0.15864256024360657, 0.47522833943367004, -0.39728954434394836, 0.0604795254...
of the JDK. The Client VM offers improved run time performance for applications and applets. The Java HotSpot Client VM has been specially tuned to reduce application start-up time and memory footprint, making it particularly well suited for client environments. In general, the client system is better for GUIs. So the...
[ -0.3318594694137573, 0.14831925928592682, 0.48520833253860474, -0.02014990895986557, -0.46391621232032776, -0.11227397620677948, 0.031762804836034775, -0.28427258133888245, -0.20151382684707642, -0.8506807088851929, -0.1510499268770218, 0.8519378900527954, -0.38247689604759216, -0.13641729...
VM can start up faster and requires a smaller memory footprint. > > > The Server VM contains an advanced adaptive compiler that supports many of the same types of optimizations performed by optimizing C++ compilers, as well as some optimizations that cannot be done by traditional compilers, such as aggressive inlinin...
[ -0.0003564088838174939, -0.07008663564920425, 0.4782673418521881, -0.07644127309322357, -0.20210914313793182, 0.055666133761405945, 0.16481870412826538, -0.4137936532497406, -0.041452568024396896, -0.64437335729599, -0.16620635986328125, 0.6550872325897217, -0.43320369720458984, -0.0821870...
time, but for a different reason than the hotspot options, being packaged differently with a much smaller kernel. --- [G. Demecki](https://stackoverflow.com/users/1037316/g-demecki) points out [in the comments](https://stackoverflow.com/questions/198577/real-differences-between-java-server-and-java-client/198651?nore...
[ -0.42865297198295593, 0.15878765285015106, 0.3211807310581207, 0.004649841692298651, -0.08507722616195679, 0.04700527340173721, 0.4302176535129547, -0.20677641034126282, -0.563564658164978, -0.34851643443107605, -0.45286881923675537, 0.6019341349601746, -0.41460299491882324, 0.145390838384...