text
stringlengths
0
30.5k
title
stringclasses
1 value
embeddings
listlengths
768
768
I'm developing a [Cocoa](http://en.wikipedia.org/wiki/Cocoa_%28API%29) application, and I'm using constant `NSString`s as ways to store key names for my preferences. I understand this is a good idea because it allows easy changing of keys if necessary. Plus, it's the whole 'separate your data from your logic' notio...
[ 0.35489320755004883, 0.23203052580356598, 0.18145188689231873, 0.12809032201766968, -0.05600159242749214, -0.08302915841341019, 0.11032131314277649, 0.06507674604654312, -0.3505878150463104, -0.45786774158477783, 0.02592468075454235, 0.37511831521987915, -0.34064096212387085, 0.24426108598...
if your code will not be used in mixed C/C++ environments or on other platforms.) You can include this file in each file that uses the constants or in the pre-compiled header for the project. You define these constants in a `.m` file like: ``` // Constants.m NSString *const MyFirstConstant = @"FirstConstant"; NSStri...
[ 0.3828912675380707, -0.08518005162477493, 0.24350817501544952, 0.0565904937684536, 0.1265089362859726, 0.05135996639728546, 0.1646723747253418, -0.26622816920280457, -0.016021015122532845, -0.8421661853790283, -0.09110690653324127, 0.4922986626625061, -0.36683380603790283, 0.09454735368490...
easier to read, IMO).
[ -0.3527846038341522, -0.1501026451587677, 0.06511092931032181, -0.03699035570025444, -0.26272672414779663, 0.28854355216026306, 0.05610711872577667, -0.059847380965948105, -0.21355792880058289, -0.5098035931587219, -0.6967847347259521, 0.5373157262802124, -0.24784205853939056, -0.312170773...
I have a page that highly depends on a IList (in ActionResult "MyEvents") that I pass in ViewData. Something like that: **ViewData["events"] = listOfEvents;** and in the end, I just **return View();** And in my View, I take this ViewData["events"] and do a foreach in it so I can iterate through its contents. But, thi...
[ -0.030788173899054527, -0.1755439192056656, 0.7322826385498047, -0.03542334586381912, -0.06398647278547287, -0.0032424069941043854, 0.027367623522877693, 0.14836318790912628, -0.21744200587272644, -0.7723404765129089, -0.1373424082994461, 0.3790474236011505, -0.0771116390824318, 0.17647674...
div that contains my foreach creates another whole page inside it!! I've tried to do **$("#myDiv").html(contentFromMyEvents)** and this was what happened. Just for testing, I've tried also to do **$("#myDiv").text(contentFromMyEvents)** and the whole html code with all its tags and everyting else from my page appeared...
[ 0.03881138563156128, -0.1836814284324646, 0.7261537909507751, 0.12099917232990265, -0.20993518829345703, -0.19579090178012848, 0.24194230139255524, 0.03316790983080864, -0.1439065784215927, -0.7633622884750366, -0.16907794773578644, 0.5167921185493469, -0.1412922739982605, 0.21478927135467...
then inject the result into your html document. ``` $("myDiv").load("/Controller/Action"); ``` Your ViewData will be parsed on the server side. Instead of returning View(), return a PartialView() pointing to a user control. What comes out then is just a HTML fragment.
[ 0.008958359248936176, -0.12232133746147156, 0.5441124439239502, -0.11709178984165192, -0.004661757964640856, -0.020632630214095116, 0.23007416725158691, 0.09080638736486435, 0.10679253190755844, -0.7100734710693359, -0.4797036647796631, 0.43840551376342773, -0.4488178789615631, 0.089163318...
I've just started using a cms (N2) which has a template basic implementation using a web site project template in vs2008. I've noticed that when compiling it it takes a lot longer than using a web application project which I am more use to. My questions are: 1. Why does it seem to take a lot longer to compile? 2. Whi...
[ 0.43844324350357056, 0.06716468930244446, 0.18435581028461456, 0.004598990548402071, -0.2583097219467163, -0.13151519000530243, 0.3365108370780945, -0.12724371254444122, -0.39724665880203247, -0.9072708487510681, 0.09007599949836731, 0.35566893219947815, 0.009441295638680458, 0.21741402149...
be compiled into a .dll ---- In a *Web Site Project* nothing in the project is pre-compiled, the compiler will compile everything to ensure it is valid but none of the compiled pages are uploaded. When a user first attempts to access the site each page is compiled into its own dll. This means in a *Web Site Project* yo...
[ 0.4746764302253723, 0.15939949452877045, 0.4482713043689728, 0.3367645740509033, -0.0028906003572046757, -0.2553003132343292, 0.23565520346164703, -0.1829529106616974, -0.2826065123081207, -0.7361656427383423, -0.48513567447662354, 0.1024501696228981, -0.2902325391769409, 0.217914789915084...
*Web Application project* does. [Converting to a *Web Application project*](http://webproject.scottgu.com/CSharp/Migration2/Migration2.aspx) can be more difficult then you think especially if you rely heavily the appcode folder. I personally prefer a *Web Application projects* I find them easier to use and less anno...
[ 0.4249188303947449, 0.19393636286258698, 0.21963149309158325, -0.0505077987909317, -0.1356625258922577, -0.15639492869377136, 0.38291141390800476, 0.07783108949661255, -0.5172991752624512, -0.9430688619613647, -0.21385745704174042, 0.27545231580734253, -0.23115389049053192, -0.023814667016...
*Is there a way to cause an error if every constructor doesn't initialize a given member?* Maybe something with const? I want this because I have a pile of code where I'm getting errors as a result of incorrectly computing member values. What I'd really like to do is strip out the whole mess and follow the compiler's ...
[ 0.16923467814922333, 0.26572364568710327, -0.21758189797401428, 0.005703893955796957, -0.10282128304243088, -0.08133632689714432, 0.6301347017288208, -0.042475879192352295, -0.3743096590042114, -0.4918656051158905, 0.13302797079086304, 0.29775017499923706, -0.23455680906772614, 0.127726897...
constructors like I would be for local variables. Unfortunately, C# offers no such built-in predicates. The best you can do is write a method that checks the object in question either for nullity or some pre-determined flag value and be disciplined about calling it at the end of each constructor and/or at the top of ea...
[ 0.13213835656642914, 0.2986892759799957, -0.12590573728084564, 0.24356044828891754, -0.40116605162620544, -0.20294637978076935, 0.42464977502822876, -0.08122139424085617, -0.0848439484834671, -0.36591836810112, -0.09211529046297073, 0.5699225068092346, -0.3985427916049957, -0.0014426364796...
I've been assigned to make a custom grid control in C# with windows forms. One thing I'm unsure of is how to handle showing a blinking cursor (caret) to indicate where cell editing is taking place and the next character will be shown. Does anyone know how this is done with the standard textbox? Is there a standard fr...
[ 0.14749425649642944, -0.0027995959389954805, 0.473565012216568, 0.2240949422121048, 0.019845282658934593, 0.04867901653051376, -0.04107574746012688, -0.04414987191557884, -0.09936593472957611, -0.5836310982704163, 0.20817849040031433, 0.3447186052799225, -0.27622923254966736, -0.0482593737...
that subclassing an existing class is not an option for various reason. Here you go: ``` using System; using System.Drawing; using System.Windows.Forms; using System.Runtime.InteropServices; public class MyWidget : Control { public MyWidget() { this.BackColor = Color.Yellow; } protected override void OnGotF...
[ 0.061743706464767456, -0.3113973140716553, 0.39485010504722595, -0.17093336582183838, 0.24402238428592682, -0.000630273949354887, 0.4703861474990845, -0.3806823492050171, -0.010326044633984566, -0.6363866329193115, -0.5970295071601868, 0.5028453469276428, -0.4455627501010895, 0.18539142608...
h); [DllImport("user32.dll", SetLastError = true)] private static extern bool SetCaretPos(int x, int y); [DllImport("user32.dll", SetLastError = true)] private static extern bool ShowCaret(IntPtr hWnd); [DllImport("user32.dll", SetLastError = true)] private static extern bool DestroyCaret(); } ``` I'll gl...
[ 0.420224666595459, 0.06362222880125046, 0.6014611721038818, -0.19438670575618744, 0.11842738837003708, -0.28356295824050903, 0.4564734697341919, -0.34418028593063354, 0.2993672490119934, -0.5119727253913879, -0.5326024293899536, 0.6413254141807556, -0.3327302038669586, 0.29735076427459717,...
I would like to know some good resources (book or website) on learning PHP for those who are already familiar with programming. Many of the tutorials I've been finding are for people who never programmed before and take way to long to go through to even learn basic language constructs. The optimal resource would no...
[ 0.19100245833396912, -0.11115552484989166, 0.11036566644906998, 0.25206875801086426, -0.09387519955635071, -0.19663399457931519, 0.14827047288417816, 0.19925183057785034, -0.22505396604537964, -0.5201936364173889, 0.08730939030647278, 0.6709031462669373, -0.008474252186715603, -0.202702060...
I've got a 'Task' table with the following columns (the TaskOrder is for ordering the children within the scope of the parent, not the entire table): ``` TaskId ParentTaskId TaskName TaskOrder ``` I've got this CTE query to return all the rows: ``` with tasks (TaskId, ParentTaskId, [Name]) as ( select parentTa...
[ 0.06192978471517563, 0.08186798542737961, 0.5809966325759888, 0.05539637431502342, 0.17035065591335297, 0.46775251626968384, 0.029249029234051704, 0.180925190448761, -0.024531487375497818, -0.8346378803253174, -0.03601435571908951, 0.2804964482784271, 0.0680534616112709, 0.4765636920928955...
childTasks.ParentTaskId, childTasks.[Name] from Task childTasks join tasks on childTasks.ParentTaskId = tasks.TaskId ) select * from tasks ``` This query returns all the tasks ordered by their level as you'd expect. How can I change it to order the results into their hierarchy order as...
[ -0.12882527709007263, -0.2266065925359726, 0.38009577989578247, 0.48240989446640015, 0.07720261812210083, 0.49738308787345886, 0.2147362381219864, -0.10321158170700073, -0.16522431373596191, -0.7790249586105347, 0.023145342245697975, 0.26195070147514343, -0.03324897959828377, 0.07285844534...
of [Mark's method](https://stackoverflow.com/questions/539155/ordering-recursive-query-results-in-sql-2005/539211#539211), but I'm not retaining the node path in every node, so I can more easily move them around the tree. Instead I changed my 'OrderBy' column from an int to varchar(3) left-padded with zeros so I can co...
[ -0.4316437244415283, 0.12076918035745621, 0.4698599576950073, -0.42172616720199585, -0.056156668812036514, 0.32715344429016113, 0.39559754729270935, -0.44392308592796326, -0.3741496801376343, -0.26784422993659973, 0.022467315196990967, 0.04189985617995262, -0.2692837417125702, 0.1922879815...
cast(parentTasks.OrderBy as varchar(30)) 'RowOrder' from Task parentTasks where ParentTaskId is null union all select childTasks.TaskId, childTasks.ParentTaskId, childTasks.OrderBy, childTasks.[Name], cast(tasks.RowOrder + childTasks.OrderBy as var...
[ -0.4082789123058319, -0.15047942101955414, 0.28569602966308594, -0.010231807827949524, 0.024600109085440636, 0.9919369220733643, 0.3253537118434906, -0.402322918176651, -0.06880087405443192, -0.4338933229446411, -0.3091595470905304, 0.32168257236480713, -0.06173403933644295, 0.164346516132...
from Task childTasks join tasks on childTasks.ParentTaskId = tasks.TaskId ) select * from tasks order by RowOrder ``` This returns: ``` TaskId ParentTaskId OrderBy Name RowOrder --------------------------------------------------------------------------- 1 NU...
[ -0.3404479920864105, -0.2408732771873474, 0.18416588008403778, 0.15667936205863953, 0.06287508457899094, 0.4628320336341858, 0.18974460661411285, -0.06125283241271973, -0.09505784511566162, -0.8590711355209351, -0.0930681899189949, 0.12104789912700653, 0.09025013446807861, 0.10316317528486...
001 15 1 001 Task One / Task One 001001 2 NULL 002 Task Two
[ 0.2045838087797165, 0.10497154295444489, -0.10270342230796814, 0.22632694244384766, -0.5294278860092163, 0.4579458236694336, 0.1626691073179245, -0.19819509983062744, -0.0870874747633934, -0.7068424820899963, 0.030561743304133415, -0.08567587286233902, -0.27156129479408264, -0.191092282533...
002 7 2 001 Task Two / Task One 002001 14 7 001 Task Two / Task One / Task One 002001001 8
[ 0.1634422093629837, -0.007817771285772324, 0.43553420901298523, 0.2917536497116089, -0.14092206954956055, 0.5169247984886169, -0.017874853685498238, -0.2771170735359192, -0.6058576703071594, -0.5580552220344543, -0.11048810184001923, -0.104825958609581, -0.010567598044872284, -0.1170870661...
2 002 Task Two / Task Two 002002 9 8 001 Task Two / Task Two / Task One 002002001 10 8 002
[ -0.12615050375461578, -0.059992942959070206, 0.555504560470581, 0.1908574402332306, -0.0014321221970021725, 0.32152581214904785, 0.04067602753639221, -0.15914767980575562, -0.4315246045589447, -0.8581809401512146, -0.3150319755077362, -0.029781760647892952, -0.045633040368556976, -0.325179...
Task Two / Task Two / Task Two 002002002 11 8 003 Task Two / Task Two / Task Three 002002003 3 NULL 003 Task Three 003 4
[ -0.2578458786010742, -0.07905624061822891, 0.2709328830242157, 0.008510099723935127, -0.365886926651001, 0.3130023181438446, 0.5450340509414673, -0.2666335105895996, -0.2837960124015808, -0.5007820129394531, -0.0857873186469078, 0.23893439769744873, -0.43892529606819153, -0.171018242835998...
NULL 004 Task Four 004 13 4 001 Task Four / Task One 004001 5 NULL
[ -0.023783911019563675, 0.00880750548094511, -0.06464776396751404, 0.31756821274757385, -0.3097568154335022, 0.46643584966659546, 0.36847901344299316, -0.11919008940458298, -0.21598251163959503, -0.47681504487991333, -0.10433930158615112, 0.26537391543388367, -0.3840091824531555, -0.0502720...
005 Task Five 005 6 NULL 006 Task Six 006 17 NULL
[ -0.04674173891544342, 0.05270418897271156, 0.027725720778107643, 0.22154434025287628, -0.2804471254348755, 0.30749794840812683, 0.6822214722633362, -0.22711226344108582, -0.1452741175889969, -0.04693686217069626, -0.03869887813925743, 0.34662964940071106, -0.12374451756477356, 0.1418941468...
007 Task Seven 007 18 NULL 008 Task Eight 008 19 NULL 009
[ -0.20643755793571472, -0.0918450728058815, 0.19581913948059082, 0.2915104925632477, -0.09625796228647232, 0.2728424370288849, 0.6774471402168274, 0.2607651948928833, -0.42827504873275757, -0.31036821007728577, -0.18918229639530182, 0.4777081310749054, -0.31296107172966003, -0.1090221926569...
Task Nine 009 21 19 001 Task Nine / Task One 009001 20 NULL 010 Task Ten
[ 0.012512783519923687, -0.09687761962413788, -0.14895960688591003, 0.3889375627040863, -0.43064212799072266, 0.6264633536338806, 0.325553297996521, 0.31424516439437866, -0.2870519757270813, -0.6296963095664978, -0.14095790684223175, 0.23616383969783783, 0.030268624424934387, -0.282951682806...
010 ``` It doesn't allow for an unlimited hierarchy (max 10 levels / max 1000 children per parent node - if I'd started the OrderBy at 0) but more than enough for my needs.
[ 0.18027330935001373, 0.014083219692111015, 0.29207390546798706, 0.17969031631946564, 0.1405457854270935, 0.19251754879951477, 0.3804650604724884, 0.13896049559116364, -0.16462062299251556, -0.554447591304779, -0.01164599135518074, 0.12628455460071564, -0.12010114639997482, 0.24474672973155...
I'd like to create a simple report that shows files that currently have pending changes (checked out) from a TFS 2008 server. I know that I can use the "Find in Source Control" option from Team Explorer, but I would rather generate a reporting services report. Ideally, I'd be able to show when the file was checked out ...
[ 0.3039768636226654, 0.1313144415616989, 0.2002907246351242, 0.04024037718772888, 0.10351536422967911, -0.40874600410461426, -0.07231365889310837, -0.028983555734157562, -0.18413622677326202, -0.6544287800788879, 0.12095657736063004, 0.5868383646011353, -0.05953650921583176, 0.1450572907924...
some time digging around the TFS data warehouse and looking at all of the canned Reporting Services reports that I can get my hands on, but everything seems to be geared towards work items, check-ins associated with work items, etc... I doubt the information you're looking for is in the data warehouse and even if it wa...
[ 0.7544921636581421, 0.022219344973564148, 0.13055813312530518, 0.15785710513591766, -0.11053866147994995, -0.3295036256313324, 0.2578311264514923, 0.1514636129140854, -0.42770057916641235, -0.566875159740448, 0.19980576634407043, 0.4571225345134735, -0.12690000236034393, 0.0412877798080444...
very good that it will change in the next version. It could also have performance implications if your queries are not written correctly. A better solution would be to use the TFS web services as your SSRS data source. There are services you can call to get all files that are checked out. This iformation is always cur...
[ 0.11371995508670807, -0.3387584090232849, 0.37493619322776794, 0.2864443063735962, 0.09889321029186249, -0.16023936867713928, 0.2531026601791382, 0.04902980476617813, -0.3779069781303406, -0.7499148845672607, 0.18453338742256165, 0.2808317542076111, -0.07093166559934616, -0.048780221492052...
I need to insert UIElements into a Grid that does not get generated until runtime. More specifically, I need to add UIElements to the RowDefinitions I create after I determine how many elements need to be displayed. Is there a way to contorl the Grid.Row and Grid.Column and Grid.RowSpan like in XAML for objects in C#? ...
[ 0.15446005761623383, -0.00563165545463562, 0.7388768792152405, 0.12893255054950714, -0.1062249019742012, 0.031303636729717255, 0.03929150104522705, -0.20574212074279785, -0.2054230272769928, -1.0293872356414795, 0.034459806978702545, 0.48538437485694885, -0.1532772183418274, -0.01330518350...
add UIElements as the children. This isn't working, all the UIElements end up in the first row layered on top of each other. Here is an example of what I am trying: ``` public partial class Page : UserControl { string[] _names = new string[] { "one", "two", "three" }; public Page() { InitializeCom...
[ 0.1375402808189392, -0.1402307152748108, 0.7345142960548401, -0.23631420731544495, 0.0039079817943274975, 0.18477410078048706, 0.15706568956375122, -0.3198786675930023, -0.025303436443209648, -1.003389835357666, -0.25037938356399536, 0.3584965169429779, -0.3298039734363556, 0.1953507661819...
foreach (string s in _names) { LayoutRoot.RowDefinitions.Add(new RowDefinition()); LayoutRoot.Children.Add(new Button()); } } } ``` Thanks! Apart from the Grid not really being the right tool for the job (a ListView would be) you need to tell the Button which row it belongs...
[ 0.11858241260051727, 0.009481025859713554, 0.7120218276977539, -0.46490609645843506, 0.17389433085918427, 0.15697886049747467, 0.3087972402572632, -0.2803066372871399, -0.16943737864494324, -0.8936001658439636, -0.22420921921730042, 0.5879545211791992, -0.24809472262859344, 0.2267002761363...
foreach (string s in _names) { LayoutRoot.RowDefinitions.Add(new RowDefinition()); var btn = new Button() LayoutRoot.Children.Add(btn); Grid.SetRow(btn, rowIndex); rowIndex += 1; } } ```
[ -0.06689037382602692, 0.031500477343797684, 0.5002351999282837, -0.5411443114280701, 0.25605323910713196, 0.5413243174552917, 0.18835346400737762, -0.28070029616355896, -0.30957722663879395, -0.9290457367897034, -0.32356584072113037, 0.3371833264827728, -0.3189920485019684, 0.3383688032627...
I'm curious: has anyone used D together with .NET languages? Is that even possible? What kind of stuff is easier/makes sense to do in D that's hard to do in, say, C++/CLI? Using D together with .NET is very possible. The reason: * .NET is able to import unmanaged C libraries (.dll's which export C functions) using the...
[ 0.4342700242996216, -0.12208033353090286, 0.3117198944091797, 0.223035529255867, -0.18710370361804962, -0.4002200663089752, 0.025442857295274734, -0.09246190637350082, -0.3141138255596161, -0.4914257824420929, -0.4932393431663513, 0.6013945937156677, -0.27661991119384766, 0.121473781764507...
of C++ with just about everything done simpler. Sure that's only a half story, but reasonably true.
[ 0.3996904194355011, 0.1481916606426239, -0.037870053201913834, -0.00511213717982173, 0.14013254642486572, -0.2788923382759094, 0.07695278525352478, 0.356912761926651, -0.09020238369703293, -0.010558361187577248, 0.10553959757089615, 0.36715736985206604, -0.12579427659511566, -0.11851114034...
Any suggestions on how one could go about setting up a build system that would compile one or two libraries against a couple of different platforms/targets. The main project is in Visual Studio. For example, I have a library: ``` nav.lib ``` It compiles on Windows and Linux with a few tweaks. The executable tha...
[ 0.5356051325798035, 0.2615693509578705, 0.02031884901225567, -0.07020418345928192, 0.026749446988105774, -0.015366080217063427, -0.09037809073925018, 0.13206221163272858, -0.298491895198822, -0.9438779354095459, 0.07401622086763382, 0.7976848483085632, -0.25431936979293823, -0.235329806804...
I can test out my opengles code on the windows machine as well?) I plan to change my graphics file to include based on preprocessor flags: ``` #ifdef USE_OPEN_GL_FULL #include <opengl/gl.h> #else #include <opengles/gl.h> #endif ``` So, how would you go about doing this? Using a couple of different scrip...
[ 0.5509818196296692, -0.15510159730911255, 0.34430915117263794, 0.13120383024215698, -0.16824325919151306, -0.0002764463715720922, 0.08486907929182053, -0.09198296815156937, -0.25590720772743225, -0.9663802981376648, -0.05588225647807121, 0.9379307627677917, -0.15347349643707275, -0.1103765...
you are running your automated build you just set the /build parameter to the name of the configuration you want to compile with.
[ 0.7058730721473694, -0.013555129058659077, -0.11679881811141968, -0.04011164978146553, 0.14368578791618347, 0.05936682969331741, 0.14391891658306122, 0.2244899719953537, 0.15120652318000793, -0.7632177472114563, -0.0449548102915287, 0.6725431084632874, -0.0702379047870636, -0.0035151811316...
The short version is: How do I learn the size (in bits) of an individual field of a c++ field? To clarify, an example of the field I am talking about: ``` struct Test { unsigned field1 : 4; // takes up 4 bits unsigned field2 : 8; // 8 bits unsigned field3 : 1; // 1 bit unsigned field4 : 3; // 3 bi...
[ 0.041918862611055374, -0.14207595586776733, 0.17290066182613373, -0.18325194716453552, -0.09151118993759155, -0.10920204967260361, 0.0984463319182396, -0.315588116645813, 0.07598363608121872, -0.1740763783454895, -0.15884113311767578, 0.35945332050323486, -0.08214756101369858, -0.293402761...
// normal struct variable member, 4 bytes on my system }; Test t; t.field1 = 1; t.field2 = 5; // etc. ``` To get the size of the entire Test object is easy, we just say ``` sizeof(Test); // returns 8, for 8 bytes total size ``` We can get a normal struct member through ``` sizeof(((Test*)0)->normal_member); // r...
[ -0.10849039256572723, -0.017876841127872467, 0.17825137078762054, -0.04021794721484184, -0.21238423883914948, 0.2017846554517746, 0.4343527555465698, -0.21161529421806335, -0.1968911588191986, -0.34065207839012146, -0.2822878956794739, 0.43933501839637756, -0.33901306986808777, -0.05525571...
it only returns size in bytes, but if anyone knows otherwise I'm all ears. Thanks! You can calculate the size at run time, fwiw, e.g.: ``` //instantiate Test t; //fill all bits in the field t.field1 = ~0; //extract to unsigned integer unsigned int i = t.field1; ... TODO use contents of i to calculate the bit-width of...
[ -0.10444586724042892, 0.004716023802757263, 0.3025168478488922, -0.03174930438399315, -0.16841650009155273, 0.08416192978620529, 0.3833112418651581, -0.19898512959480286, -0.29608431458473206, -0.48134100437164307, -0.05485425516963005, 0.595889687538147, 0.04295568913221359, 0.06964161247...
Does anybody have a known reliable way to create a video from a series of image files? Before you mod me down for not searching for the answer before posting the question, and before you fire off a simple message like "use FFMPEG," read the rest of this message. I'm trying to create a video, it doesn't matter too much...
[ 0.7038088440895081, 0.21761691570281982, 0.4985162615776062, 0.35633575916290283, -0.24124263226985931, -0.24935810267925262, 0.3247891664505005, 0.2838696837425232, -0.19476987421512604, -0.43803671002388, 0.19515374302864075, 0.7643576264381409, -0.12576541304588318, 0.048054322600364685...
writing a series of image files to a directory and then firing off an external program to make a video from those images. The only constraints are: it must work on my Windows Server 2008 system, and be scriptable. That is, no GUI programs that require operator intervention. I found a number of similar questions on St...
[ 0.1862807720899582, 0.014078394509851933, 0.39293113350868225, -0.022610893473029137, -0.2130599468946457, -0.31306740641593933, 0.21815072000026703, -0.18972431123256683, -0.30513641238212585, -0.49785152077674866, -0.06348109245300293, 0.8595545291900635, -0.622294008731842, -0.043115496...
-f image2 -i jpeg\*.jpg video.avi ``` One of the builds reads the images and then crashes due to data execution prevention. The other reads the first file and then spits out an error message that says "cannot find suitable codec for file jpeg/image2.jpg". Helpful, that. In any case, FFMPEG looks like a non-starter un...
[ 0.19556258618831635, 0.19439303874969482, 0.4603765606880188, 0.03403205797076225, -0.46446558833122253, -0.16663913428783417, 0.23229707777500153, -0.13756167888641357, -0.14711840450763702, -0.5715305209159851, -0.18947164714336395, 0.5418816208839417, -0.539236307144165, 0.1386172026395...
something (DirectShow, maybe, although I thought that was already installed?). Depending on what's required, I might have a difficult time justifying its installation on a server. ("What? Why do you need that on a server?") Another answer suggested the [AviFile](http://www.codeproject.com/KB/audio-video/avifilewrapper...
[ 0.5863139033317566, -0.014810541644692421, 0.46866121888160706, 0.16142334043979645, -0.17230577766895294, -0.24145448207855225, -0.012322158552706242, -0.29729023575782776, -0.3759631812572479, -0.3238641619682312, 0.041975297033786774, 0.6998031139373779, -0.32083427906036377, 0.05784736...
I'm left wondering if there is a good, reliable way to do what I want: on a Windows system, create an AVI or other common video file format from a series of images, either through a .NET API or using an external program. Any help? After working with it a while and taking a look at x264 and VideoLan, I went back to Spli...
[ 0.6866440176963806, 0.19528737664222717, 0.2364848554134369, 0.3515489101409912, -0.10592196136713028, -0.18654488027095795, 0.24241703748703003, 0.17475369572639465, -0.33041366934776306, -0.5032628178596497, 0.026405958458781242, 0.6670348644256592, -0.0825028270483017, 0.290250062942504...
I am about to kill dreamweaver...i reall wanna find something smooth and convenient (im addicted to the internal FTP stuff in dreamweaver). HELP! It's not free but I think the consensus choice is [TextMate](http://macromates.com/).
[ 0.2928469777107239, -0.21635475754737854, 0.4166358709335327, 0.10267721861600876, 0.17442980408668518, -0.3237544894218445, 0.34942853450775146, 0.3923288583755493, 0.23538735508918762, -0.8205975890159607, -0.14333811402320862, 0.5193037390708923, -0.14783258736133575, 0.2205616682767868...
I am trying to access 61616 in my iPhone app and the SCReachability code indicates that I have a valid network, but I time out trying to write to 61616. Does anyone know: A. If the iPhone EDGE/3G network has a limited port range or isn't allowed to connect to this port? B. How I can check explicitly for access to thi...
[ -0.12992213666439056, 0.3293038308620453, 0.3910936713218689, -0.1438862830400467, 0.28843778371810913, -0.13276153802871704, 0.8110651969909668, 0.13756270706653595, -0.2720947563648224, -0.8460299968719482, -0.23583729565143585, 0.5585125684738159, -0.3259468972682953, -0.007194411940872...
checking the reachability of a host can be expensive, cache the result and perform the reachability check once. checkNetwork = NO; Boolean success; const char *host_name = "foo.bar.com"; SCNetworkReachabilityRef reachability = SCNetworkReachabilityCreateWithName(NULL, host_name); SCNetworkReac...
[ -0.09853873401880264, 0.02228662557899952, 0.6477752327919006, -0.15053261816501617, 0.21197858452796936, -0.23234301805496216, 0.6633970737457275, -0.21299012005329132, -0.27534013986587524, -0.6216856837272644, -0.33621102571487427, 0.4015948474407196, -0.21787787973880768, 0.23798571527...
packet, sent by an application into > the network stack, can leave the local > computer. Note that reachability does > not guarantee that the data packet > will actually be received by the host. This has nothing to do with NAT or port restrictions. Routing is based on addresses - not on ports. So all you can find ...
[ -0.08829495310783386, -0.4792102575302124, 0.3482125401496887, 0.35190698504447937, -0.056372132152318954, -0.26001182198524475, 0.38969799876213074, -0.011685090139508247, -0.4492107629776001, -0.9819670915603638, -0.024244241416454315, -0.13974148035049438, -0.34800294041633606, 0.275359...
test yourself. Preferably when the SCNetworkReachability API tells you that a connection can be established. Just try to connect to the server on port 61616 and see whether you get a connection or a timeout. Proper timeout values and handling is crucial here.
[ 0.45626506209373474, -0.35485804080963135, -0.1410040259361267, 0.28585299849510193, 0.18871574103832245, -0.48507463932037354, 0.5254254341125488, 0.17453160881996155, -0.20868909358978271, -0.7702638506889343, 0.05397607013583183, 0.4138326346874237, -0.0052847471088171005, 0.04191623255...
When writing a http handler/module, there is an interface member to implement called - [bool IsReusable](https://learn.microsoft.com/en-us/dotnet/api/system.web.ihttphandler.isreusable). What is the significance of this member? If I set it to false (or true), what does this mean for the rest of the web app? The normal...
[ 0.1256791651248932, -0.048175692558288574, 0.3046598732471466, 0.04717821627855301, -0.174377903342247, -0.16257742047309875, 0.3387187123298645, -0.24083562195301056, 0.09879915416240692, -0.5003905296325684, -0.11942421644926071, 0.35531380772590637, -0.34386172890663147, 0.1046312078833...
to reconstruct it each time. The application will instantiate as many of these handlers as are need to handle the current load. The downside is that if the number of instances needed is larger than the instances currently present, they cause more memory to be used. Conversely they can also reduce apparent memory uses...
[ -0.015625935047864914, -0.040062014013528824, 0.3723898231983185, 0.23523792624473572, -0.016803935170173645, -0.08489244431257248, 0.5869206786155701, -0.23997600376605988, -0.4178285002708435, -0.7036089897155762, -0.28600794076919556, 0.5833268761634827, -0.19528158009052277, 0.17632657...
Consider: ``` <table border="1" width="100%" ID="Table2"> <tr> <td>100</td> </tr> </table> ``` This code still leaves an "inch" of space on both sides of the table. I am trying to get the table to span the entire width of the page. Try (in your <head> section, or existing CSS definitions)... ``` <st...
[ 0.07307639718055725, 0.07810863107442856, 0.6133595108985901, -0.06412621587514877, -0.10795319080352783, 0.11371786147356033, 0.1050039529800415, -0.4665529727935791, -0.46988311409950256, -0.8687798976898193, 0.04019302874803543, 0.07027725875377655, 0.04275140538811684, -0.1930233091115...
What is a KISS (Keep it Simple, Stupid) way to remember what Boyce-Codd normal form is and how to take a unnormalized table and BCNF it? [Wikipedia](http://en.wikipedia.org/wiki/Boyce-Codd_normal_form)'s info: not terribly helpful for me. Chris Date's definition is actually quite good, so long as you understand what h...
[ 0.11659523099660873, -0.026177220046520233, 0.8840194344520569, -0.0679536983370781, 0.05572747439146042, -0.2776797413825989, 0.24298684298992157, 0.08823281526565552, 0.09374953806400299, -0.12065298110246658, -0.1767617017030716, -0.19543881714344025, -0.22333210706710815, 0.16492019593...
fact, not a collection of facts. Changing one bit in an attribute changes the whole meaning. Your birthdate is a fact. Is your full name a fact? Well, in some cases it is, because if you change your surname your full name is different, right? But to a genealogist you have a surname and a family name, and if you change ...
[ 0.7336223125457764, 0.025675423443317413, 0.025680258870124817, 0.5294232368469238, 0.19373926520347595, -0.16977114975452423, 0.17278626561164856, 0.16368532180786133, -0.4442909359931946, -0.36994874477386475, -0.14708010852336884, -0.11745353788137436, -0.1838105022907257, 0.66974818706...
change. Your full name is not a key because it can change. Your Social Insurance Number is not a key because they get reused. Your SSN plus birthdate is not a key, even if the combination can never be reused, because an attribute cannot be a combination of two facts. A GUID is a key. A number you increment and never re...
[ 0.46263834834098816, -0.11738750338554382, 0.5780090689659119, 0.22087974846363068, 0.2889811396598816, -0.038365937769412994, 0.3434242010116577, -0.11772461235523224, -0.2686375677585602, -0.65196692943573, -0.1652461141347885, 0.28549230098724365, -0.23767885565757751, 0.191462203860282...
the fact. Suppose you had an address book with a GUID key, name and address values. It is OK to have the same name appearing twice with different keys if they represent different people and are not the "same data". If Mary Jones in accounting changes her name to Mary Smith, Mary Jones in Sales does not change her name ...
[ 0.8082428574562073, -0.0005847426364198327, 0.1726021021604538, 0.06899942457675934, 0.38358011841773987, 0.36139482259750366, 0.22731345891952515, 0.11487139761447906, -0.5326866507530212, -0.3300356864929199, 0.05296789109706879, 0.6118291616439819, -0.1814565509557724, 0.497831583023071...
key. You are also not allowed to use the key for this new single street address as a value in the address book since now the same street address key would be represented twice. Instead, you have to make a third key/value pair with values of the address book key and the street address key; you find a person's street ad...
[ 0.21031580865383148, 0.06301148980855942, 0.6410117149353027, 0.16321182250976562, 0.20813946425914764, -0.23872524499893188, 0.3103679120540619, -0.5802862048149109, -0.10753978043794632, -0.5311890840530396, -0.4492354393005371, 0.45038583874702454, -0.3374686539173126, 0.485075891017913...
there is only one) you are not allowed a city value in the same record, since if you know the address you would also know the city. This would also open up the possibility of there being more than one Taj Mahal in a different city. Instead, you have to again create a secondary Location key with unique values like the T...
[ 0.5451205372810364, -0.030958347022533417, 0.34241577982902527, 0.36437615752220154, 0.3687489628791809, -0.13385772705078125, 0.17541396617889404, -0.21416647732257843, -0.23563355207443237, -0.4639703929424286, -0.3426533341407776, 0.2941220998764038, -0.2796315848827362, 0.1890451908111...
We're using the file picker dialog to allow users to add documents into our application. The word 'Open' doesn't make a lot of sense in this case. Thanks. I would browse the [code found here](http://www.codeproject.com/KB/dialog/OpenFileDialogEx.aspx), which shows how someone extended the OpenFileDialog. Admittedly, t...
[ 0.30860456824302673, -0.014748787507414818, 0.5428631901741028, 0.12348741292953491, 0.16912853717803955, -0.3338173031806946, 0.09837473928928375, 0.14820635318756104, -0.4440079927444458, -0.5629715323448181, -0.07002735137939453, 0.43153899908065796, -0.13687489926815033, 0.249589234590...
I have an ASP.Net Web Forms application in which I'm using forms-based authentication with Membership and Role providers, which is fine for authenticating and controlling access to directories and/or files. Now I find myself needing to control read, write and delete access on individual entity instances, for example be...
[ 0.43899500370025635, 0.18080729246139526, 0.3676004111766815, -0.037438612431287766, -0.02678300440311432, -0.29515543580055237, 0.1549661010503769, -0.25312089920043945, -0.3105420172214508, -0.48284491896629333, -0.016879092901945114, 0.40898168087005615, 0.07233434170484543, 0.092126138...
way you can controller actions in ASP.Net MVC. I don't know of any out of the box way to accomplish this in the Web Forms world though, and don't know of any frameworks or other tools that might help me move in that direction. Any suggestions, both in terms of existing solutions and/or how to design my own implementati...
[ -0.04336037486791611, -0.44438523054122925, 0.37405920028686523, 0.24768410623073578, 0.022485870867967606, -0.3850115239620209, 0.4910413324832916, -0.14040005207061768, -0.21708521246910095, -0.3274753987789154, -0.3702419400215149, 0.4204414188861847, -0.2463112324476242, 0.108387261629...
In an ASP.NET MVC application during application\_start a new thread gets startet. The thread loads data into the Cache and takes 5 minutes. The application needs to be aware that the loading is in process. Thats why I want to set a flag in an application variable. I set Application["LoadingCacheActive"] to true when...
[ 0.13093626499176025, -0.08989842236042023, 0.5488221645355225, -0.11048665642738342, 0.011517048813402653, -0.16320106387138367, 0.5699700713157654, -0.26771244406700134, -0.30915266275405884, -0.7300350666046143, -0.07879307866096497, 0.37058985233306885, -0.2466711401939392, 0.0600947737...
can use a static [AutoResetEvent](http://msdn.microsoft.com/en-us/library/system.threading.autoresetevent.aspx)/[ManualResetEvent](http://msdn.microsoft.com/en-us/library/system.threading.manualresetevent.aspx) data member in your Application class. Create the event as not set initially. When you app needs to check whe...
[ 0.2764657437801361, -0.5144646167755127, 0.3770408630371094, 0.14715911448001862, 0.12433680146932602, -0.005144101567566395, 0.20739106833934784, -0.055760305374860764, -0.36539968848228455, -0.5714977383613586, -0.23208725452423096, 0.7438893914222717, -0.16353431344032288, 0.19299249351...
In C#, when I have an interface and several concrete implementations, can I cast the interface to a concrete type or is concrete type cast to interface? What are the rules in this case? Both directions are allowed in Java and C#. Downcasting needs an explicit cast and may throw an Exception if the object is not of the...
[ 0.14742682874202728, 0.09766954183578491, 0.12357838451862335, -0.32799750566482544, -0.3885578513145447, -0.04120602831244469, 0.34660762548446655, -0.32234498858451843, 0.06091637909412384, -0.6277949810028076, 0.003486048895865679, 0.7183483839035034, -0.636471688747406, -0.355265706777...
// No cast required Cat myCat = (Cat) meowAnimal; // Explicit cast needed Dog myDog = (Dog) barkAnimal; // Explicit cast needed Dog myPet = (Dog) meowAnimal; // Will compile but throws an Exception ``` and you'll want a `try` / `catch` around the explicit casts. In C# you have the useful `as` keyword: ``` Dog myDo...
[ -0.024864519014954567, 0.2098150998353958, 0.000571151846088469, -0.2082759588956833, -0.12816596031188965, -0.025081364437937737, 0.7098612785339355, -0.5088182091712952, 0.03688376024365425, -0.3684538006782532, -0.4335971176624298, 0.5394886136054993, -0.43589872121810913, -0.4231579899...
"`as`" keyword generates bytecode that does the if, assigning null of the `is` fails. But perhaps .NET has a bytecode instruction that does the equivalent of "`as`".)
[ 0.15221893787384033, -0.18735545873641968, -0.2366882860660553, -0.08612586557865143, -0.07684335112571716, -0.3276687562465668, 0.7503821849822998, -0.1916394829750061, -0.06445594877004623, -0.32288408279418945, -0.5999965667724609, 0.18408653140068054, -0.5058476328849792, 0.17501081526...
I find that randomly I get a EXC\_BAD\_ACCESS error on the iPhone when updating the status. This occurs pretty randomly. Anyone have any idea to how this make be fixed? ``` #import "TwitterViewController.h" NSString *_testUID = nil; NSString *sImageName; @implementation TwitterViewController //Turns NSLogs into co...
[ 0.2839587926864624, 0.17750877141952515, 0.4413262605667114, -0.1170983836054802, -0.055461227893829346, 0.14496469497680664, 0.3731370270252228, -0.10993355512619019, -0.28941747546195984, -0.5052642226219177, 0.06696644425392151, 0.5458522439002991, -0.1708461195230484, 0.135218143463134...
addObject:@"Awake"]; [arrayEmotes addObject:@"Shocked"]; [arrayEmotes addObject:@"Angry"]; [arrayEmotes addObject:@"Laughing"]; [arrayEmotes addObject:@"Dancing"]; [arrayEmotes addObject:@"Confused"]; [activityView startAnimating]; [currentActivity setText:@"Logging In"]; NSString *use...
[ 0.20994658768177032, -0.1938556581735611, 0.5672844052314758, 0.12613661587238312, -0.1674945205450058, -0.15655258297920227, 0.6071888208389282, -0.20237186551094055, -0.3059120774269104, -0.459018737077713, -0.20386745035648346, 0.5504454374313354, -0.10869433730840683, -0.08259420841932...
settings UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Error" message:@"Incorrect username/password stored in the settings." delegate:self cancelButtonTitle:@"OK" otherButtonTitles:nil]; [alert show]; [alert release]; NSLog(@"You forgot to specify your username/passwo...
[ 0.3513798713684082, -0.07626260817050934, 0.8047118782997131, 0.06316583603620529, 0.1771848052740097, -0.04273254796862602, 0.6302610635757446, -0.28244078159332275, 0.03398827835917473, -0.8441243171691895, -0.15859125554561615, 0.6252216100692749, -0.1357143074274063, -0.095626957714557...
updates from people the authenticated user follows. //[twitterEngine getFollowedTimelineFor:username since:nil startingAtPage:0]; _testUID = [twitterEngine testService]; } - (NSInteger)numberOfComponentsInPickerView:(UIPickerView *)thePickerView { return 1; } - (NSInteger)pickerView:(UIPickerView *)thePic...
[ -0.07649815827608109, -0.37907177209854126, 0.6724017262458801, 0.009300965815782547, 0.04288826882839203, 0.11013033986091614, 0.4165744185447693, -0.2607593536376953, -0.05224788188934326, -0.38264137506484985, -0.2816856801509857, 0.6891627311706543, -0.22600066661834717, 0.037066563963...
case 0: //Happy sImageName = @"Happy"; break; case 1: //Sad sImageName = @"Sad"; break; case
[ -0.5618890523910522, -0.18366387486457825, 0.16284863650798798, -0.08131745457649231, -0.3467421233654022, 0.2599133253097534, 0.19630184769630432, 0.15070201456546783, -0.2175154983997345, -0.34391146898269653, -0.5927867889404297, 0.3328813910484314, -0.21100588142871857, 0.0849615931510...
2: //Tongue sImageName = @"Tounge"; break; case 3: //Drunk sImageName = @"Drunk"; break; case 4:
[ -0.29550105333328247, 0.21798580884933472, 0.30416810512542725, -0.06253500282764435, -0.6136020421981812, 0.48772168159484863, 0.7006922364234924, 0.3035234212875366, -0.004104462917894125, -0.233455091714859, -0.28991463780403137, 0.40317627787590027, 0.28140923380851746, -0.009679931215...
//Bored sImageName = @"Bored"; break; case 5: //Love sImageName = @"Love"; break; case 6:
[ 0.239179328083992, 0.08647506684064865, 0.469720721244812, 0.2455081045627594, -0.34556451439857483, 0.19601133465766907, 0.16749513149261475, -0.06737476587295532, -0.05551835522055626, -0.23618291318416595, -0.4015481173992157, 0.4278930127620697, 0.28602489829063416, 0.192927747964859, ...
//Sleepy sImageName = @"Sleepy"; break; case 7: //Sick sImageName = @"Sick"; break; case 8: //Awake
[ -0.17737241089344025, 0.057384490966796875, 0.21279902756214142, -0.11049101501703262, -0.2862236797809601, 0.3717309832572937, 0.2454880326986313, 0.21396379172801971, -0.6677721738815308, -0.5262259244918823, -0.4772561192512512, 0.21593569219112396, 0.038677167147397995, 0.0909242406487...
sImageName = @"Awake"; break; case 9: //Shocked sImageName = @"Shocked"; break; case 10: //Angry
[ -0.3314725160598755, 0.0076607149094343185, -0.092281773686409, 0.1441652625799179, -1.0347273349761963, 0.25119373202323914, 0.4620533883571625, -0.12561608850955963, -0.19998426735401154, -0.2897343933582306, -0.52440345287323, 0.47245946526527405, 0.31013917922973633, -0.164665326476097...
sImageName = @"Angry"; break; case 11: //Laughing sImageName = @"Laughing"; break; case 12:
[ -0.36356356739997864, 0.20791608095169067, -0.11277734488248825, -0.01587052084505558, -0.7107359766960144, 0.4959191679954529, 0.5374757647514343, 0.1025606170296669, -0.41434478759765625, -0.23145301640033722, -0.5062031745910645, 0.6395217180252075, 0.15652406215667725, -0.1926618218421...
//Dancing sImageName = @"Dancing"; break; case 13: //Confused sImageName = @"Confused"; break; default: break; } [twitterEngine sendUpdate:[@"has changed his/her
[ -0.029705611988902092, -0.3743564188480377, 0.6704889535903931, 0.18629145622253418, -0.23431038856506348, 0.04441620409488678, 0.7838442921638489, -0.09016475081443787, -0.6852439641952515, -0.3891875147819519, -0.13068459928035736, -0.13416820764541626, 0.020980851724743843, -0.023844033...
iMood to " stringByAppendingString:sImageName]]; } // Override to allow orientations other than the default portrait orientation. - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { return (interfaceOrientation == UIInterfaceOrientationPortrait); } - (void)dealloc { ...
[ -0.017366211861371994, -0.3660523295402527, 0.7557237148284912, -0.23695801198482513, -0.08935558050870895, 0.1499169021844864, 0.4331425428390503, -0.4979584813117981, -0.1580589860677719, -0.558493971824646, -0.39303115010261536, 0.4771789312362671, -0.2708955407142639, -0.04664005711674...
[currentActivity setText:@"Logged In"]; [UIView commitAnimations]; //End of animations NSLog(@"Request succeeded (%@)", requestIdentifier); if ([requestIdentifier isEqualToString:_testUID]) { NSLog(@"[TWITTER UP]"); } } - (void)requestFailed:(NSString *)requestIdentifier withError:(...
[ -0.4761967360973358, -0.23112329840660095, 0.8917251825332642, -0.08045525848865509, 0.3124845027923584, 0.10572198033332825, 0.16026481986045837, -0.42710915207862854, -0.11418753862380981, -0.4067676365375519, -0.13902167975902557, 0.5141978859901428, -0.22707416117191315, 0.312668442726...
[[error userInfo] objectForKey:NSErrorFailingURLStringKey]); } - (void)statusesReceived:(NSArray *)statuses forRequest:(NSString *)identifier { NSLog(@"Got statuses:\r%@", statuses); } - (void)directMessagesReceived:(NSArray *)messages forRequest:(NSString *)identifier { NSLog(@"Got direct messages:\r%@", m...
[ 0.22258742153644562, -0.17751029133796692, 0.4872010052204132, -0.03884487971663475, 0.15309078991413116, -0.2632026970386505, 0.5993310809135437, -0.1815022975206375, -0.6084474325180054, -0.46263012290000916, -0.05807836353778839, 0.6050012707710266, -0.5978955626487732, 0.07741103321313...
related to sImageName when you send the update (notice how it isn't defined on a scope other than inside the switch statement - I don't really know if this would definitely cause issues, it's just something I always try to avoid. I can see it potentially causing an EXC\_BAD\_ACCESS). Anyway, try using GDB to step thro...
[ 0.02016296423971653, 0.0012034325627610087, 0.42066118121147156, 0.15327224135398865, -0.43530774116516113, -0.7167760729789734, 0.18891668319702148, 0.21779191493988037, -0.21789351105690002, -0.5352848172187805, 0.010150023736059666, 0.8710464835166931, -0.21455159783363342, 0.3298147618...
Greetings readers! So I am trying to develop a client server system.. Since I have not designed a client server system before, I thought that I would post a question and see what the experts here have to say. Requirements: .NET 3.5 WCF minimum of 2 computers, Master and Slave. The use case is a testing environment, ...
[ -0.09769585728645325, 0.07947596162557602, 0.5684173703193665, 0.46635204553604126, 0.13913565874099731, -0.0862760841846466, 0.08362375944852829, -0.25204554200172424, 0.07786407321691513, -0.8448126912117004, -0.05410308763384819, 0.48489198088645935, -0.18153074383735657, -0.01563394628...
data, unexpected events, etc. The part that I am confused about is that if the slave initiates contact with the master, doesn't that make him the master? Does this mean that I need servicehosts on both slave and master so that they can initiate activity? I decided to answer this question in a blog post: [http://dot...
[ 0.16698096692562103, -0.17994822561740875, 0.48593467473983765, -0.1621793657541275, 0.13554754853248596, -0.22384321689605713, 0.3164578676223755, -0.15428879857063293, -0.4777538478374481, -0.5901130437850952, -0.2484133243560791, 0.29024168848991394, -0.13875731825828552, 0.171360224485...
I want to make something similar to [this](http://www.nytimes.com/interactive/2009/02/02/sports/20090202_superbowl_twitter.html), but I'd like to avoid proprietary platforms (flash). I'm relatively new to development and I'm willing to learn anything. I understand that some javascript frameworks like jQuery and MooTool...
[ 0.3872034549713135, 0.025220992043614388, -0.13984382152557373, 0.14930827915668488, -0.23199453949928284, -0.19778011739253998, -0.10411490499973297, 0.1833115965127945, -0.45437169075012207, -0.623042643070221, 0.19746772944927216, 0.6065404415130615, -0.012735079973936081, -0.3178764879...
Quick question; do I always need to check for a null value after performing a safe cast? I do it this way now, but in a situation like this: ``` void button1_Click(object sender, EventArgs e) { Button = sender as Button; if (button != null) // <-- necessary? { // do stuff with 'button' } } ``...
[ 0.16155169904232025, 0.08478864282369614, 0.04673312231898308, -0.2708382308483124, -0.01241806335747242, -0.234781876206398, 0.6196483373641968, 0.08307913690805435, -0.3535948693752289, -0.5252944827079773, -0.06402041018009186, 0.3701033890247345, -0.2899025082588196, -0.040636777877807...
I would prefer a crash if a non-Button object was hooked up to a handler that should only be for buttons. EDIT: OK, thanks guys. I was just curious if there was an angle that I was missing. I agree - maybe you're better off having the app crash if a non-Button is hooked up, since this handler only makes sense for But...
[ 0.5386611819267273, -0.03495083376765251, 0.016064779832959175, 0.4891151487827301, -0.2542704939842224, -0.06747312098741531, 0.21837280690670013, 0.032903771847486496, -0.14840294420719147, -0.5076326131820679, -0.017374511808156967, 0.5235657095909119, -0.27817127108573914, -0.179843068...
Bit of oddness, seen if I do the following: ``` import javax.swing.*; public class FunkyButtonLayout { public static void main(String[] args) { JFrame frame = new JFrame(""); JPanel j0 = new JPanel(); // j0 gets added to the root pane j0.setLayout(null); JPanel j1 = new JPanel()...
[ 0.29836687445640564, -0.38989442586898804, 0.5769131183624268, -0.05349108204245567, 0.008337930776178837, 0.09711816906929016, 0.4293017089366913, -0.4450100064277649, -0.28058239817619324, -0.08543999493122101, -0.3232291638851166, 0.2680867612361908, -0.5580653548240662, 0.5279043912887...
JButton b1 = new JButton(""); // b1 gets added to j1 j1.add(b1); b1.setBounds(0, 0, 40, 32); // b1 is big j0.add(j1); j1.setBounds(0, 0, 32, 32); // j1 is not so big - b1 gets 'trimmed' frame.getContentPane().setLayout(null); // <- seems to be needed :-( frame.getCont...
[ 0.35032781958580017, -0.22293122112751007, 0.3954209089279175, -0.5426902174949646, 0.06358244270086288, 0.20033004879951477, 0.33640986680984497, -0.5480262637138367, -0.4166141748428345, -0.3655961751937866, -0.48273876309394836, 0.1802980750799179, -0.4999261498451233, -0.03056591190397...
j0.setBounds(10, 10, 32, 32); // end result: a 32x32 button with frame.setSize(125, 125); // a trimmed right border frame.setVisible(true); // in the top-left corner } } ``` I get pretty much what I'm looking for, apart from the ability to position j0 in the root pane with a layout mana...
[ -0.0568181648850441, -0.005297780502587557, 0.7524341344833374, -0.4235187768936157, 0.24124369025230408, 0.22250701487064362, 0.052691731601953506, -0.2899852395057678, -0.23581887781620026, -0.9266932606697083, -0.21357332170009613, 0.26268574595451355, -0.270122766494751, -0.08443436026...
frame.getContentPane().setLayout(null); ``` line to ``` frame.getContentPane().setLayout(new java.awt.FlowLayout()); ``` I see j0 draw as a 1x1 pixel @ the middle of the screen :-( Any ideas why? Note that this isn't just a FlowLayout thing - pretty much every layout manager messes this up. I really wa...
[ 0.07594840228557587, -0.08831509947776794, 0.6311308145523071, -0.11956647038459778, -0.13287603855133057, -0.1559152752161026, 0.2580927610397339, -0.29036998748779297, -0.2415565848350525, -0.9433168172836304, 0.08076771348714828, 0.4926367700099945, -0.5598485469818115, -0.0390133708715...
So any ideas appreciated :-) If you set the layout manager to null, you have to explicitly set the container's preferred size (that's why it's showing up so small). If you are using setBounds on a component, you are over-riding the work that the layout manager for the parent container does. I would remove all calls t...
[ 0.15892404317855835, -0.2554892301559448, 0.016325976699590683, 0.09421731531620026, 0.1865687370300293, -0.3624204695224762, -0.04164410009980202, -0.007908155210316181, -0.2887328863143921, -0.6288183927536011, 0.03392306715250015, 0.5423442721366882, -0.30154022574424744, 0.115864992141...
I have a movie that loads an flv using the VideoPlayer class. It does it with the load function. Here is a code sample of what I'm doing: ``` _root.createEmptyMovieClip("SlideA", 1); ... SlideA.loadMovie(urlContainingFunctionForLoadVideo); ... // SlideA has completely loaded SlideA.loadVideo(urlToFLV); function...
[ 0.4647386074066162, 0.16246397793293, 0.7704086899757385, -0.3270096182823181, 0.06368087232112885, -0.35515835881233215, 0.07974692434072495, -0.30018410086631775, -0.24598801136016846, -0.477526992559433, -0.19663721323013306, 0.8236691355705261, -0.44898781180381775, 0.1802484393119812,...
VideoPlayer.bytesTotal is undefined and that never changes. The file can be cached or not cached and this happens. Thoughts on how to deal with this? Data bound controls do not use reflection but a TypeDescriptor to get the properties from a data source. In the [TypeDescriptor.GetProperties](http://msdn.microsoft.com/e...
[ 0.37028616666793823, -0.13855651021003723, 0.6696844696998596, 0.4053983688354492, -0.10618656873703003, -0.33916425704956055, 0.08931680768728256, -0.24901248514652252, -0.13239504396915436, -0.523345410823822, 0.025238197296857834, 0.5555616021156311, -0.2226703017950058, 0.2763953804969...
and you can write a [TypeConverter](http://msdn.microsoft.com/en-us/library/system.componentmodel.typeconverter.aspx) class with custom property information implementation. Please refer to the remarks in the TypeConverter documentation for implementing property logic. The GetProperties implementation of your custom Ty...
[ 0.32698768377304077, -0.21319085359573364, 0.5462920665740967, 0.40642687678337097, -0.13602013885974884, -0.043028250336647034, 0.156806081533432, -0.34529656171798706, -0.21129953861236572, -0.564781129360199, -0.034655045717954636, 0.6822331547737122, -0.26253554224967957, 0.20357841253...
I'm trying to write a custom STL allocator that is derived from `std::allocator`, but somehow all calls to `allocate()` go to the base class. I have narrowed it down to this code: ``` template <typename T> class a : public std::allocator<T> { public: T* allocate(size_t n, const void* hint = 0) const { cout...
[ 0.22800284624099731, -0.0899767130613327, 0.19157272577285767, -0.30400362610816956, 0.28011471033096313, 0.28297609090805054, -0.10918688774108887, -0.03497343882918358, -0.19159077107906342, -0.6325665712356567, -0.10852216184139252, 0.3222333788871765, -0.5362909436225891, 0.21759098768...